%= content_for :title, "Portfolio | #{@site.person_name}"+(@tag ? " / #{@tag.name}" : '') %>
<%= content_for :container_class, 'portfolio_site_item' %>
<%= render 'portfolio/shared/header' %>
Portfolio <%= @tag ? " / #{@tag.name}" : '' %>
<%= link_to :back, class: 'go_back' do %>
Back
<% end %>
<% if @tag %>
<%= render partial: 'projects_group',
locals: { title: nil, projects: @site.site_projects.published.tagged_with(@tag) } %>
<%= link_to 'Se all', portfolio_projects_path(@site.key), class: 'btn btn-default' %>
<% else %>
<% @site.site_projects.published.group_by_categories.each do |categ| %>
<%= render partial: 'projects_group',
locals: { title: categ.name, projects: categ.site_projects.published } %>
<% end %>
<%= render partial: 'projects_group',
locals: {
title: @site.site_projects.published.categorized.count > 0 ? 'Others' : '',
projects: @site.site_projects.published.uncategorized
} %>
<% end %>