schofield 0.0.11 → 0.1.0

Sign up to get free protection for your applications and to get access to all the features.
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.0.11
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 => 3 }
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
- %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 %>)}?"
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
@@ -5,7 +5,7 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = %q{schofield}
8
- s.version = "0.0.11"
8
+ s.version = "0.1.0"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["Marc Tauber"]
metadata CHANGED
@@ -4,9 +4,9 @@ version: !ruby/object:Gem::Version
4
4
  prerelease: false
5
5
  segments:
6
6
  - 0
7
+ - 1
7
8
  - 0
8
- - 11
9
- version: 0.0.11
9
+ version: 0.1.0
10
10
  platform: ruby
11
11
  authors:
12
12
  - Marc Tauber