Commit 66bdeedfb78c9417cc1bf723652c9588d4ce22ff
1 parent
99a71058
Exists in
staging
and in
20 other branches
Ticket #85: Put the interests block under the plugin scope
Showing
5 changed files
with
44 additions
and
44 deletions
Show diff stats
plugins/person_tags/lib/person_tags_block.rb
... | ... | @@ -1,29 +0,0 @@ |
1 | -class PersonTagsBlock < Block | |
2 | - def view_title | |
3 | - self.default_title | |
4 | - end | |
5 | - | |
6 | - def tags | |
7 | - owner.tag_list | |
8 | - end | |
9 | - | |
10 | - def extra_option | |
11 | - {} | |
12 | - end | |
13 | - | |
14 | - def self.description | |
15 | - _('Fields of Interest') | |
16 | - end | |
17 | - | |
18 | - def help | |
19 | - _('Things that this person is interested in') | |
20 | - end | |
21 | - | |
22 | - def default_title | |
23 | - _('Fields of Interest') | |
24 | - end | |
25 | - | |
26 | - def self.expire_on | |
27 | - { profile: [:profile] } | |
28 | - end | |
29 | -end |
plugins/person_tags/lib/person_tags_plugin.rb
plugins/person_tags/lib/person_tags_plugin/interests_block.rb
0 → 100644
... | ... | @@ -0,0 +1,29 @@ |
1 | +class PersonTagsPlugin::InterestsBlock < Block | |
2 | + def view_title | |
3 | + self.default_title | |
4 | + end | |
5 | + | |
6 | + def tags | |
7 | + owner.tag_list | |
8 | + end | |
9 | + | |
10 | + def extra_option | |
11 | + {} | |
12 | + end | |
13 | + | |
14 | + def self.description | |
15 | + _('Fields of Interest') | |
16 | + end | |
17 | + | |
18 | + def help | |
19 | + _('Things that this person is interested in') | |
20 | + end | |
21 | + | |
22 | + def default_title | |
23 | + _('Fields of Interest') | |
24 | + end | |
25 | + | |
26 | + def self.expire_on | |
27 | + { profile: [:profile] } | |
28 | + end | |
29 | +end | ... | ... |
... | ... | @@ -0,0 +1,14 @@ |
1 | +<%= block_title(block.view_title, block.subtitle) %> | |
2 | + | |
3 | +<div class="person-tags-block"> | |
4 | + <% unless block.tags.size == 0 %> | |
5 | + <ul> | |
6 | + <% block.tags.each do |tag| %> | |
7 | + <li><%= tag %></li> | |
8 | + <% end %> | |
9 | + </ul> | |
10 | + <% else %> | |
11 | + <div class="person-tags-block-none"><%= c_('None') %></div> | |
12 | + <% end %> | |
13 | + <br style="clear:both" /> | |
14 | +</div> | ... | ... |
plugins/person_tags/views/blocks/person_tags.html.erb
... | ... | @@ -1,14 +0,0 @@ |
1 | -<%= block_title(block.view_title, block.subtitle) %> | |
2 | - | |
3 | -<div class="person-tags-block"> | |
4 | - <% unless block.tags.size == 0 %> | |
5 | - <ul> | |
6 | - <% block.tags.each do |tag| %> | |
7 | - <li><%= tag %></li> | |
8 | - <% end %> | |
9 | - </ul> | |
10 | - <% else %> | |
11 | - <div class="person-tags-block-none"><%= c_('None') %></div> | |
12 | - <% end %> | |
13 | - <br style="clear:both" /> | |
14 | -</div> |