schofield 0.0.11 → 0.1.0
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/VERSION +1 -1
- data/generators/schofield_controller/templates/index_partial.rb +8 -3
- data/schofield.gemspec +1 -1
- metadata +2 -2
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.0
|
1
|
+
0.1.0
|
@@ -2,7 +2,7 @@
|
|
2
2
|
|
3
3
|
%table#<%= sco_underscored_plural %>
|
4
4
|
|
5
|
-
= render :partial => 'shared/admin/table_header', :locals => { :columns => %w( Title ), :buttons =>
|
5
|
+
= render :partial => 'shared/admin/table_header', :locals => { :columns => %w( Title ), :buttons => <%= %w(show edit destroy).inject(0) {|count,item| count += actions.include?(item) ? 1 : 0 } %> }
|
6
6
|
|
7
7
|
%tbody
|
8
8
|
|
@@ -11,7 +11,12 @@
|
|
11
11
|
%tr
|
12
12
|
|
13
13
|
%td&= <%= sco_underscored %>
|
14
|
-
|
14
|
+
<%- if actions.include?('show') -%>
|
15
15
|
%td= link_to_button 'Show', admin_<%= sco_underscored %>_path(<%= sco_underscored %>)
|
16
|
+
<%- end -%>
|
17
|
+
<%- if actions.include?('edit') -%>
|
16
18
|
%td= link_to_button 'Edit', edit_admin_<%= sco_underscored %>_path(<%= sco_underscored %>)
|
17
|
-
|
19
|
+
<%- end -%>
|
20
|
+
<%- if actions.include?('destroy') -%>
|
21
|
+
%td= link_to_button 'Delete', admin_<%= sco_underscored %>_path(<%= sco_underscored %>), :method => 'delete', :confirm => "Are you sure you want to delete the <%= sco_humanized %>: #{h(<%= sco_underscored %>)}?"
|
22
|
+
<%- end -%>
|
data/schofield.gemspec
CHANGED