cirandas.net

ref: master

plugins/sniffer/views/blocks/interests.html.erb


<%= block_title block.title, block.subtitle %>

<% if block.owner.is_a?(Profile) %>
  
    <% block.interests.each do |interest| %>
  • <%= interest.product_category.name %>
  • <% end %>
<% if logged_in? and (current_user.person.is_admin?(environment) or profile.admins.include?(current_user.person)) %> <%= _('Edit %{inputs} and %{block.interests}') % { :inputs => link_to(_("products' inputs"), :controller => "products_plugin/page", :action => :index), :interests => link_to(_('declared interests'), :controller => :sniffer_plugin_myprofile, :action => :edit), } %> <% end %>
<% else %>
    <% block.interests.each do |interest| %>
  • <% profile = interest.is_a?(SnifferPlugin::Opportunity) ? interest.profile : interest.product.enterprise %> <%= _('%{interest} from %{profile}') % { :interest => interest.product_category.name, :profile => link_to_profile(profile.name, profile), } %>
  • <% end %>
<% end %>