simplificator-activist 0.0.2 → 0.0.4
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/activist/block_helpers.rb +12 -1
- data/lib/activist/button_helpers.rb +5 -1
- data/simplificator-activist.gemspec +1 -1
- metadata +2 -2
@@ -9,7 +9,8 @@ module Activist
|
|
9
9
|
end
|
10
10
|
end
|
11
11
|
end
|
12
|
-
|
12
|
+
|
13
|
+
# :block_class : a class applied to the outermost div
|
13
14
|
def section_block(title, options = {})
|
14
15
|
builder = Builder.new(self)
|
15
16
|
yield builder
|
@@ -21,5 +22,15 @@ module Activist
|
|
21
22
|
:class => :content),
|
22
23
|
:class => [:block, options[:block_class]])
|
23
24
|
end
|
25
|
+
|
26
|
+
def sidebar_block(title, &block)
|
27
|
+
content = capture(&block)
|
28
|
+
content_for(:sidebar) do
|
29
|
+
content_tag(:div, :class => ['sidebar-block']) do
|
30
|
+
content_tag(:h4, title) + content_tag(:p, content)
|
31
|
+
end
|
32
|
+
end
|
33
|
+
end
|
34
|
+
|
24
35
|
end
|
25
36
|
end
|
@@ -16,7 +16,11 @@ module Activist
|
|
16
16
|
|
17
17
|
def delete_button_link(path, text = 'Delete', confirmation = 'Are you sure')
|
18
18
|
link_to((image_tag('icons/application_delete.png', :class => :medium) + text).html_safe, path, :method => :delete, :class => 'button', :confirm => confirmation)
|
19
|
-
|
20
19
|
end
|
20
|
+
|
21
|
+
def add_button_link(path, text = 'Add')
|
22
|
+
link_to((image_tag('icons/application_add.png', :class => :medium) + text).html_safe, path, :class => 'button')
|
23
|
+
end
|
24
|
+
|
21
25
|
end
|
22
26
|
end
|