diff --git a/plugins/person_tags/lib/person_tags_block.rb b/plugins/person_tags/lib/person_tags_block.rb deleted file mode 100644 index 57ba39e..0000000 --- a/plugins/person_tags/lib/person_tags_block.rb +++ /dev/null @@ -1,29 +0,0 @@ -class PersonTagsBlock < Block - def view_title - self.default_title - end - - def tags - owner.tag_list - end - - def extra_option - {} - end - - def self.description - _('Fields of Interest') - end - - def help - _('Things that this person is interested in') - end - - def default_title - _('Fields of Interest') - end - - def self.expire_on - { profile: [:profile] } - end -end diff --git a/plugins/person_tags/lib/person_tags_plugin.rb b/plugins/person_tags/lib/person_tags_plugin.rb index 9512080..a3f8210 100644 --- a/plugins/person_tags/lib/person_tags_plugin.rb +++ b/plugins/person_tags/lib/person_tags_plugin.rb @@ -22,7 +22,7 @@ class PersonTagsPlugin < Noosfero::Plugin def self.extra_blocks { - PersonTagsBlock => { type: Person } + PersonTagsPlugin::InterestsBlock => { type: Person } } end diff --git a/plugins/person_tags/lib/person_tags_plugin/interests_block.rb b/plugins/person_tags/lib/person_tags_plugin/interests_block.rb new file mode 100644 index 0000000..53fe87c --- /dev/null +++ b/plugins/person_tags/lib/person_tags_plugin/interests_block.rb @@ -0,0 +1,29 @@ +class PersonTagsPlugin::InterestsBlock < Block + def view_title + self.default_title + end + + def tags + owner.tag_list + end + + def extra_option + {} + end + + def self.description + _('Fields of Interest') + end + + def help + _('Things that this person is interested in') + end + + def default_title + _('Fields of Interest') + end + + def self.expire_on + { profile: [:profile] } + end +end diff --git a/plugins/person_tags/views/blocks/interests.html.erb b/plugins/person_tags/views/blocks/interests.html.erb new file mode 100644 index 0000000..64956bb --- /dev/null +++ b/plugins/person_tags/views/blocks/interests.html.erb @@ -0,0 +1,14 @@ +<%= block_title(block.view_title, block.subtitle) %> + +
+ <% unless block.tags.size == 0 %> + + <% else %> +
<%= c_('None') %>
+ <% end %> +
+
diff --git a/plugins/person_tags/views/blocks/person_tags.html.erb b/plugins/person_tags/views/blocks/person_tags.html.erb deleted file mode 100644 index 64956bb..0000000 --- a/plugins/person_tags/views/blocks/person_tags.html.erb +++ /dev/null @@ -1,14 +0,0 @@ -<%= block_title(block.view_title, block.subtitle) %> - -
- <% unless block.tags.size == 0 %> - - <% else %> -
<%= c_('None') %>
- <% end %> -
-
-- libgit2 0.21.2