bootstrap_actioncell 0.1.7 → 0.1.8

Sign up to get free protection for your applications and to get access to all the features.
@@ -3,12 +3,14 @@ module BootstrapActioncell
3
3
  def ac_buttons(resource,buttons=[],actions=[],options={})
4
4
  options = {
5
5
  :clear_default_buttons => false,
6
+ :edit_button => true,
7
+ :delete_button => true,
6
8
  :edit_icon => "pencil",
7
9
  :delete_icon => "remove"
8
10
  }.deep_merge(options)
9
11
  unless options[:clear_default_buttons]
10
- buttons << {:path => url_for(:controller => resource.class.name.demodulize.underscore.pluralize, :action => 'edit', :id => resource.id), :options => {:class => "btn btn-mini", "data-toggle" => "tooltip", :title => "Edit"}, :icon => options[:edit_icon]} if current_ability.blank? or can? :update, resource
11
- buttons << {:path => url_for(:controller => resource.class.name.demodulize.underscore.pluralize, :action => 'destroy', :id => resource.id), :options => {:class => "btn btn-mini", "data-toggle" => "tooltip", :title => "Delete", :method => "delete", :confirm => "Are you sure you want to delete this #{resource.class.name.demodulize.underscore.split("_").join(" ")}?"}, :icon => options[:delete_icon]} if current_ability.blank? or can? :destroy, resource
12
+ buttons << {:path => url_for(:controller => resource.class.name.demodulize.underscore.pluralize, :action => 'edit', :id => resource.id), :options => {:class => "btn btn-mini", "data-toggle" => "tooltip", :title => "Edit"}, :icon => options[:edit_icon]} if options[:edit_button] and (current_ability.blank? or can? :update, resource)
13
+ buttons << {:path => url_for(:controller => resource.class.name.demodulize.underscore.pluralize, :action => 'destroy', :id => resource.id), :options => {:class => "btn btn-mini", "data-toggle" => "tooltip", :title => "Delete", :method => "delete", :confirm => "Are you sure you want to delete this #{resource.class.name.demodulize.underscore.split("_").join(" ")}?"}, :icon => options[:delete_icon]} if options[:delete_button] and (current_ability.blank? or can? :destroy, resource)
12
14
  end
13
15
  render :partial => "bootstrap_actioncell/buttons", :locals => {:resource => resource, :buttons => buttons, :actions => actions}
14
16
  end
@@ -1,3 +1,3 @@
1
1
  module BootstrapActioncell
2
- VERSION = "0.1.7"
2
+ VERSION = "0.1.8"
3
3
  end
metadata CHANGED
@@ -1,18 +1,20 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: bootstrap_actioncell
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.7
4
+ version: 0.1.8
5
+ prerelease:
5
6
  platform: ruby
6
7
  authors:
7
8
  - MacKinley Smith
8
9
  autorequire:
9
10
  bindir: bin
10
11
  cert_chain: []
11
- date: 2013-06-20 00:00:00.000000000 Z
12
+ date: 2013-07-01 00:00:00.000000000 Z
12
13
  dependencies:
13
14
  - !ruby/object:Gem::Dependency
14
15
  name: rails
15
16
  requirement: !ruby/object:Gem::Requirement
17
+ none: false
16
18
  requirements:
17
19
  - - ~>
18
20
  - !ruby/object:Gem::Version
@@ -20,6 +22,7 @@ dependencies:
20
22
  type: :runtime
21
23
  prerelease: false
22
24
  version_requirements: !ruby/object:Gem::Requirement
25
+ none: false
23
26
  requirements:
24
27
  - - ~>
25
28
  - !ruby/object:Gem::Version
@@ -27,6 +30,7 @@ dependencies:
27
30
  - !ruby/object:Gem::Dependency
28
31
  name: sqlite3
29
32
  requirement: !ruby/object:Gem::Requirement
33
+ none: false
30
34
  requirements:
31
35
  - - ! '>='
32
36
  - !ruby/object:Gem::Version
@@ -34,6 +38,7 @@ dependencies:
34
38
  type: :development
35
39
  prerelease: false
36
40
  version_requirements: !ruby/object:Gem::Requirement
41
+ none: false
37
42
  requirements:
38
43
  - - ! '>='
39
44
  - !ruby/object:Gem::Version
@@ -41,6 +46,7 @@ dependencies:
41
46
  - !ruby/object:Gem::Dependency
42
47
  name: bundler
43
48
  requirement: !ruby/object:Gem::Requirement
49
+ none: false
44
50
  requirements:
45
51
  - - ~>
46
52
  - !ruby/object:Gem::Version
@@ -48,6 +54,7 @@ dependencies:
48
54
  type: :development
49
55
  prerelease: false
50
56
  version_requirements: !ruby/object:Gem::Requirement
57
+ none: false
51
58
  requirements:
52
59
  - - ~>
53
60
  - !ruby/object:Gem::Version
@@ -55,6 +62,7 @@ dependencies:
55
62
  - !ruby/object:Gem::Dependency
56
63
  name: rake
57
64
  requirement: !ruby/object:Gem::Requirement
65
+ none: false
58
66
  requirements:
59
67
  - - ! '>='
60
68
  - !ruby/object:Gem::Version
@@ -62,6 +70,7 @@ dependencies:
62
70
  type: :development
63
71
  prerelease: false
64
72
  version_requirements: !ruby/object:Gem::Requirement
73
+ none: false
65
74
  requirements:
66
75
  - - ! '>='
67
76
  - !ruby/object:Gem::Version
@@ -69,6 +78,7 @@ dependencies:
69
78
  - !ruby/object:Gem::Dependency
70
79
  name: minitest
71
80
  requirement: !ruby/object:Gem::Requirement
81
+ none: false
72
82
  requirements:
73
83
  - - ! '>='
74
84
  - !ruby/object:Gem::Version
@@ -76,6 +86,7 @@ dependencies:
76
86
  type: :development
77
87
  prerelease: false
78
88
  version_requirements: !ruby/object:Gem::Requirement
89
+ none: false
79
90
  requirements:
80
91
  - - ! '>='
81
92
  - !ruby/object:Gem::Version
@@ -83,6 +94,7 @@ dependencies:
83
94
  - !ruby/object:Gem::Dependency
84
95
  name: haml-rails
85
96
  requirement: !ruby/object:Gem::Requirement
97
+ none: false
86
98
  requirements:
87
99
  - - ! '>='
88
100
  - !ruby/object:Gem::Version
@@ -90,6 +102,7 @@ dependencies:
90
102
  type: :runtime
91
103
  prerelease: false
92
104
  version_requirements: !ruby/object:Gem::Requirement
105
+ none: false
93
106
  requirements:
94
107
  - - ! '>='
95
108
  - !ruby/object:Gem::Version
@@ -117,25 +130,32 @@ files:
117
130
  - README.rdoc
118
131
  homepage: ''
119
132
  licenses: []
120
- metadata: {}
121
133
  post_install_message:
122
134
  rdoc_options: []
123
135
  require_paths:
124
136
  - lib
125
137
  required_ruby_version: !ruby/object:Gem::Requirement
138
+ none: false
126
139
  requirements:
127
140
  - - ! '>='
128
141
  - !ruby/object:Gem::Version
129
142
  version: '0'
143
+ segments:
144
+ - 0
145
+ hash: 4387830660976375494
130
146
  required_rubygems_version: !ruby/object:Gem::Requirement
147
+ none: false
131
148
  requirements:
132
149
  - - ! '>='
133
150
  - !ruby/object:Gem::Version
134
151
  version: '0'
152
+ segments:
153
+ - 0
154
+ hash: 4387830660976375494
135
155
  requirements: []
136
156
  rubyforge_project:
137
- rubygems_version: 2.0.3
157
+ rubygems_version: 1.8.25
138
158
  signing_key:
139
- specification_version: 4
159
+ specification_version: 3
140
160
  summary: Adds helper for bootstrap-style actioncells in tables
141
161
  test_files: []
checksums.yaml DELETED
@@ -1,15 +0,0 @@
1
- ---
2
- !binary "U0hBMQ==":
3
- metadata.gz: !binary |-
4
- NWJhNGM0NzRkZDNlNDViZTRhNDYxZGUyZTA4MWRjYmRhZWNhOTE4MA==
5
- data.tar.gz: !binary |-
6
- ZjBmODI4MDM4MDlhZGRiMTVkOTg3NzFiMzgwMDZhZWFmMDc0OTc3Ng==
7
- !binary "U0hBNTEy":
8
- metadata.gz: !binary |-
9
- ZGNhMmQ3MzJiOTkzOWYyNzI1YTJiNTc5YmUwMWZlMDE1Y2Y1MTg0OGY2OGUz
10
- OTQ4OTgwNDljMzBkMGNjNzE1NDBlZWI1MDUwOTZjNTIwZjZkYWFlODQ1YWE1
11
- YzEyZjBlMzRlYTcwZjU0M2Y0YTY3OGJmNjUzZjRlZDY2NmYzZTU=
12
- data.tar.gz: !binary |-
13
- NzJlMTZmZWM1YjNkNzhkYTc4ZjBmY2M5MDcxMzUwMmI2MTM5Y2Y0ZWFmNDcz
14
- NzlmNDdjNzMwNGMzYjYxYTJlMjVmN2FjYmI5MTNhMTMwZjI3YjdiY2MxY2U2
15
- NDViZWY5MTY0MTY2NmMyZmRhZDYzYTI1NzRmM2IxNmQ1YWEyYzk=