activoate 0.7.2 → 0.7.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
data/README CHANGED
@@ -1,4 +1,4 @@
1
- # Activoate 0.6.8 #
1
+ # Activoate 0.7.2 #
2
2
 
3
3
  We're setting up this repository, more info soon!
4
4
 
@@ -43,7 +43,7 @@ module ActivoHelper
43
43
  #
44
44
  # Returns an anchor tag
45
45
  def add_button(path)
46
- button(path, t("activoated.add", :default => 'Add'), 'add')
46
+ button(path, t("activoate.add", :default => 'Add'), 'add')
47
47
  end
48
48
 
49
49
  # Wraps the button helper, creating a cancel button
@@ -55,7 +55,7 @@ module ActivoHelper
55
55
  #
56
56
  # Returns an anchor tag
57
57
  def cancel_button(path)
58
- button(path, t("activoated.cancel", :default => 'Cancel'), 'cross')
58
+ button(path, t("activoate.cancel", :default => 'Cancel'), 'cross')
59
59
  end
60
60
 
61
61
  # Wraps the button helper, creating an edit button
@@ -69,7 +69,7 @@ module ActivoHelper
69
69
  #
70
70
  # Returns an anchor tag
71
71
  def edit_button(path, alternative_icon = false)
72
- button(path, t("activoated.edit", :default => 'Edit'), alternative_icon ? 'edit' : 'application_edit')
72
+ button(path, t("activoate.edit", :default => 'Edit'), alternative_icon ? 'edit' : 'application_edit')
73
73
  end
74
74
 
75
75
  # Wraps the button helper, creating a delete button
@@ -84,10 +84,10 @@ module ActivoHelper
84
84
  # Returns an anchor tag
85
85
  def delete_button(path, alternative_icon = false)
86
86
  options = {
87
- :confirm => t("activoated.confirm", :default => "Are you sure?"),
87
+ :confirm => t("activoate.confirm", :default => "Are you sure?"),
88
88
  :method => :delete
89
89
  }
90
- button(path, t("activoated.delete", :default => 'Delete'), alternative_icon ? 'delete' : 'cross', options)
90
+ button(path, t("activoate.delete", :default => 'Delete'), alternative_icon ? 'delete' : 'cross', options)
91
91
  end
92
92
 
93
93
  # Displays a button
@@ -102,7 +102,7 @@ module ActivoHelper
102
102
  #
103
103
  # Returns an anchor tag
104
104
  def button(path, caption = 'click-me', icon = 'show', options = {})
105
- default_options = { :class => "button", :confirm => false, :method => :get }
105
+ default_options = { :class => "button", :confirm => false }
106
106
  options = default_options.merge(options)
107
107
 
108
108
  link_to path, options do
@@ -1,3 +1,3 @@
1
1
  module Activoate
2
- VERSION = "0.7.2"
2
+ VERSION = "0.7.5"
3
3
  end
@@ -98,18 +98,21 @@ module Activoate
98
98
  end
99
99
 
100
100
  def generate_views
101
+ form_file_name = options.formtastic ? 'view_form_formtastic.html.erb' : 'view_form.html.erb'
102
+ show_file_name = options.attrtastic ? 'view_show_attrtastic.html.erb' : 'view_show.html.erb'
103
+
101
104
  views = {
102
105
  'crud' => {
103
106
  'view_tables.html.erb' => File.join('app/views', @controller_file_path, "index.html.#{options.engine}"),
104
107
  'view_new.html.erb' => File.join('app/views', @controller_file_path, "new.html.#{options.engine}"),
105
108
  'view_edit.html.erb' => File.join('app/views', @controller_file_path, "edit.html.#{options.engine}"),
106
- options.formtastic ? 'view_form_formtastic.html.erb' : 'view_form.html.erb' => File.join('app/views', @controller_file_path, "_form.html.#{options.engine}"),
107
- options.attrtastic ? 'view_show_attrtastic.html.erb' : 'view_show.html.erb' => File.join('app/views', @controller_file_path, "show.html.#{options.engine}"),
108
- 'view_sidebar.html.erb' => File.join('app/views', @controller_file_path, "_sidebar.html.#{options.engine}")
109
+ form_file_name => File.join('app/views', @controller_file_path, "_form.html.#{options.engine}"),
110
+ show_file_name => File.join('app/views', @controller_file_path, "show.html.#{options.engine}"),
111
+ 'view_sidebar.html.erb' => File.join('app/views', "shared", "_sidebar.html.#{options.engine}")
109
112
  },
110
113
  'text' => {
111
114
  'view_text.html.erb' => File.join('app/views', @controller_file_path, "show.html.#{options.engine}"),
112
- 'view_sidebar.html.erb' => File.join('app/views', @controller_file_path, "_sidebar.html.#{options.engine}")
115
+ 'view_sidebar.html.erb' => File.join('app/views', "shared", "_sidebar.html.#{options.engine}")
113
116
  }
114
117
  }
115
118
  selected_views = views[options.themed_type]
@@ -1,15 +1,15 @@
1
1
  <div class="block">
2
2
  <%%= secondary_navigation do |nav| %>
3
- <%% nav.item t("activoated.list", :default => "List"), <%= controller_routing_path %>_path %>
4
- <%% nav.item t("activoated.new", :default => "New"), new_<%= singular_controller_routing_path %>_path %>
5
- <%% nav.item t("activoated.edit", :default => "Edit"), edit_<%= singular_controller_routing_path %>_path, :active => true %>
3
+ <%% nav.item t("activoate.list", :default => "List"), <%= controller_routing_path %>_path %>
4
+ <%% nav.item t("activoate.new", :default => "New"), new_<%= singular_controller_routing_path %>_path %>
5
+ <%% nav.item t("activoate.edit", :default => "Edit"), edit_<%= singular_controller_routing_path %>_path, :active => true %>
6
6
  <%% end %>
7
7
  <div class="content">
8
- <h2 class="title"><%%= t("activoated.edit", :default => "Edit") %> <%= model_name %></h2>
8
+ <h2 class="title"><%%= t("activoate.edit", :default => "Edit") %> <%= model_name %></h2>
9
9
  <div class="inner">
10
10
  <%%= render :partial => "form", :locals => { :url => <%= singular_controller_routing_path %>_path(@<%= resource_name %>) } %>
11
11
  </div>
12
12
  </div>
13
13
  </div>
14
14
 
15
- <%% content_for :sidebar, render(:partial => 'sidebar') -%>
15
+ <%% content_for :sidebar, render(:partial => 'shared/sidebar') -%>
@@ -7,7 +7,7 @@
7
7
  </div>
8
8
  <%- end -%>
9
9
  <div class="group navform wat-cf">
10
- <%%= submit_button t("activoated.save", :default => "Save"), 'tick' %>
10
+ <%%= submit_button t("activoate.save", :default => "Save"), 'tick' %>
11
11
  <%%= cancel_button <%= controller_routing_path %>_path %>
12
12
  </div>
13
13
  <%% end -%>
@@ -6,7 +6,7 @@
6
6
  <%% end %>
7
7
 
8
8
  <div class="group navform wat-cf">
9
- <%%= submit_button t("activoated.save", :default => "Save"), 'tick' %>
9
+ <%%= submit_button t("activoate.save", :default => "Save"), 'tick' %>
10
10
  <%%= cancel_button <%= controller_routing_path %>_path %>
11
11
  </div>
12
12
  <%% end %>
@@ -1,16 +1,16 @@
1
1
  <div class="block">
2
2
  <div class="secondary-navigation">
3
3
  <ul class="wat-cf">
4
- <li class="first"><%%= link_to "#{t("activoated.list", :default => "List")}", <%= controller_routing_path %>_path %></li>
5
- <li class="active"><%%= link_to "#{t("activoated.new", :default => "New")}", new_<%= singular_controller_routing_path %>_path %></li>
4
+ <li class="first"><%%= link_to "#{t("activoate.list", :default => "List")}", <%= controller_routing_path %>_path %></li>
5
+ <li class="active"><%%= link_to "#{t("activoate.new", :default => "New")}", new_<%= singular_controller_routing_path %>_path %></li>
6
6
  </ul>
7
7
  </div>
8
8
  <div class="content">
9
- <h2 class="title"><%%= t("activoated.new", :default => "New")%> <%= model_name %></h2>
9
+ <h2 class="title"><%%= t("activoate.new", :default => "New")%> <%= model_name %></h2>
10
10
  <div class="inner">
11
11
  <%%= render :partial => "form", :locals => { :url => <%= controller_routing_path %>_path } %>
12
12
  </div>
13
13
  </div>
14
14
  </div>
15
15
 
16
- <%% content_for :sidebar, render(:partial => 'sidebar') -%>
16
+ <%% content_for :sidebar, render(:partial => 'shared/sidebar') -%>
@@ -1,13 +1,13 @@
1
1
  <div class="block">
2
2
  <div class="secondary-navigation">
3
3
  <ul class="wat-cf">
4
- <li class="first"><%%= link_to "#{t("activoated.list", :default => "List")}", <%= controller_routing_path %>_path %></li>
5
- <li><%%= link_to "#{t("activoated.new", :default => "New")}", new_<%= singular_controller_routing_path %>_path %></li>
6
- <li class="active"><%%= link_to "#{t("activoated.show", :default => "Show")}", <%= singular_controller_routing_path %>_path %></li>
4
+ <li class="first"><%%= link_to "#{t("activoate.list", :default => "List")}", <%= controller_routing_path %>_path %></li>
5
+ <li><%%= link_to "#{t("activoate.new", :default => "New")}", new_<%= singular_controller_routing_path %>_path %></li>
6
+ <li class="active"><%%= link_to "#{t("activoate.show", :default => "Show")}", <%= singular_controller_routing_path %>_path %></li>
7
7
  </ul>
8
8
  </div>
9
9
  <div class="content">
10
- <h2 class="title"><%%= t("activoated.show", :default => "Show")%> <%= model_name %></h2>
10
+ <h2 class="title"><%%= t("activoate.show", :default => "Show")%> <%= model_name %></h2>
11
11
  <div class="inner">
12
12
  <% columns.each do |column| %>
13
13
  <p>
@@ -23,4 +23,4 @@
23
23
  </div>
24
24
  </div>
25
25
 
26
- <%% content_for :sidebar, render(:partial => 'sidebar') -%>
26
+ <%% content_for :sidebar, render(:partial => 'shared/sidebar') -%>
@@ -1,18 +1,24 @@
1
1
  <div class="block">
2
2
  <div class="secondary-navigation">
3
3
  <ul class="wat-cf">
4
- <li class="first"><%%= link_to "#{t("activoated.list", :default => "List")}", <%= controller_routing_path %>_path %></li>
5
- <li><%%= link_to "#{t("activoated.new", :default => "New")}", new_<%= singular_controller_routing_path %>_path %></li>
6
- <li class="active"><%%= link_to "#{t("activoated.show", :default => "Show")}", <%= singular_controller_routing_path %>_path %></li>
4
+ <li class="first"><%%= link_to "#{t("activoate.list", :default => "List")}", <%= controller_routing_path %>_path %></li>
5
+ <li><%%= link_to "#{t("activoate.new", :default => "New")}", new_<%= singular_controller_routing_path %>_path %></li>
6
+ <li class="active"><%%= link_to "#{t("activoate.show", :default => "Show")}", <%= singular_controller_routing_path %>_path %></li>
7
7
  </ul>
8
8
  </div>
9
9
  <div class="content">
10
- <h2 class="title"><%%= t("activoated.show", :default => "Show")%> <%= model_name %></h2>
10
+ <h2 class="title"><%%= t("activoate.show", :default => "Show")%> <%= model_name %></h2>
11
11
  <div class="inner">
12
- <%%= semantic_attributes_for @user do |attr| %>
12
+ <%%= semantic_attributes_for @<%= model_name.underscore %> do |attr| %>
13
13
  <%%= attr.attributes do %>
14
14
  <% columns.each do |column| %>
15
+ <% if column.type == :boolean %>
16
+ <%%= attr.attribute :<%= column.name %> do %>
17
+ <%%= @<%= model_name.underscore %>.<%= column.name %> ? t("activoate.yes", :default => "Yes") : t("activoate.no", :default => "No") %>
18
+ <%% end %>
19
+ <% else %>
15
20
  <%%= attr.attribute :<%= column.name %> %>
21
+ <%- end -%>
16
22
  <%- end %>
17
23
  <%% end %>
18
24
  <%% end %>
@@ -24,4 +30,4 @@
24
30
  </div>
25
31
  </div>
26
32
 
27
- <%% content_for :sidebar, render(:partial => 'sidebar') -%>
33
+ <%% content_for :sidebar, render(:partial => 'shared/sidebar') -%>
@@ -1,7 +1,7 @@
1
1
  <div class="block">
2
2
  <%%= secondary_navigation do |nav| %>
3
- <%% nav.item t("activoated.list", :default => "List"), <%= controller_routing_path %>_path, :active => true %>
4
- <%% nav.item t("activoated.new", :default => "New"), new_<%= singular_controller_routing_path %>_path %>
3
+ <%% nav.item t("activoate.list", :default => "List"), <%= controller_routing_path %>_path, :active => true %>
4
+ <%% nav.item t("activoate.new", :default => "New"), new_<%= singular_controller_routing_path %>_path %>
5
5
  <%% end %>
6
6
  <div class="content">
7
7
  <% if options.mass_destroy %>
@@ -9,7 +9,7 @@
9
9
  <%% c.item delete_button(users_path(@user), true) %>
10
10
  <%% end %>
11
11
  <%- end -%>
12
- <h2 class="title"><%%= t("activoated.all", :default => "All") %> <%= plural_model_name %></h2>
12
+ <h2 class="title"><%%= t("activoate.all", :default => "All") %> <%= plural_model_name %></h2>
13
13
  <div class="inner">
14
14
  <table class="table">
15
15
  <tr>
@@ -22,7 +22,7 @@
22
22
  <% unless columns.empty? -%>
23
23
  <th><%%= t("activerecord.attributes.<%= singular_controller_routing_path %>.<%= columns.first.name %>", :default => t("activerecord.labels.<%= columns.first.name %>", :default => "<%= columns.first.name.capitalize %>")) %></th>
24
24
  <% end -%>
25
- <th><%%= t("activoated.created_at", :default => "Created at") %></th>
25
+ <th><%%= t("activoate.created_at", :default => "Created at") %></th>
26
26
  <th class="last">&nbsp;</th>
27
27
  </tr>
28
28
  <%% @<%= plural_resource_name %>.each do |<%= resource_name %>| -%>
@@ -38,11 +38,11 @@
38
38
  <% end -%>
39
39
  <td><%%= <%= resource_name %>.created_at %></td>
40
40
  <td class="last">
41
- <%%= link_to "#{t("activoated.show", :default => "Show")}", <%= singular_controller_routing_path %>_path(<%= resource_name %>) %>
41
+ <%%= link_to "#{t("activoate.show", :default => "Show")}", <%= singular_controller_routing_path %>_path(<%= resource_name %>) %>
42
42
  |
43
- <%%= link_to "#{t("activoated.edit", :default => "Edit")}", edit_<%= singular_controller_routing_path %>_path(<%= resource_name %>) %>
43
+ <%%= link_to "#{t("activoate.edit", :default => "Edit")}", edit_<%= singular_controller_routing_path %>_path(<%= resource_name %>) %>
44
44
  |
45
- <%%= link_to "#{t("activoated.delete", :default => "Delete")}", <%= singular_controller_routing_path %>_path(<%= resource_name %>), :method => :delete, :confirm => "#{t("activoated.confirm", :default => "Are you sure?")}" %>
45
+ <%%= link_to "#{t("activoate.delete", :default => "Delete")}", <%= singular_controller_routing_path %>_path(<%= resource_name %>), :method => :delete, :confirm => "#{t("activoate.confirm", :default => "Are you sure?")}" %>
46
46
  </td>
47
47
  </tr>
48
48
  <%% end -%>
@@ -58,4 +58,4 @@
58
58
  </div>
59
59
  </div>
60
60
 
61
- <%% content_for :sidebar, render(:partial => 'sidebar') -%>
61
+ <%% content_for :sidebar, render(:partial => 'shared/sidebar') -%>
@@ -15,4 +15,4 @@
15
15
  </div>
16
16
  </div>
17
17
 
18
- <%% content_for :sidebar, render(:partial => 'sidebar') -%>
18
+ <%% content_for :sidebar, render(:partial => 'shared/sidebar') -%>
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: activoate
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.7.2
4
+ version: 0.7.5
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -13,7 +13,7 @@ date: 2011-12-14 00:00:00.000000000Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: rails
16
- requirement: &70288578976680 !ruby/object:Gem::Requirement
16
+ requirement: &70164905980620 !ruby/object:Gem::Requirement
17
17
  none: false
18
18
  requirements:
19
19
  - - ! '>='
@@ -21,7 +21,7 @@ dependencies:
21
21
  version: 3.0.0
22
22
  type: :runtime
23
23
  prerelease: false
24
- version_requirements: *70288578976680
24
+ version_requirements: *70164905980620
25
25
  description: Helps to use Activo 2 theme on Rails 3 applications and provides handy
26
26
  helpers and generators to use with formtastic/attrtastic
27
27
  email: