<% if user_signed_in? %> <% if current_user != @page_collection.user %> <% if @page_collection.followed_by?(current_user) %> <%= link_to unfollow_page_collection_path(@page_collection), class: "hoverable btn #{PageCollection.color}", style: 'width: 100%' do %> <%= PageCollection.icon %>   Unfollow <% end %> <% else %> <%= link_to follow_page_collection_path(@page_collection), class: "hoverable btn #{PageCollection.color}", style: 'width: 100%' do %> <%= PageCollection.icon %>   Follow for updates <% end %> <% end %> <% end %> <% else %> <%= link_to follow_page_collection_path(@page_collection), class: "hoverable btn #{PageCollection.color} disabled", style: 'width: 100%' do %> Sign in to follow this Collection <% end %> <% end %> <%= render partial: 'page_collections/quick_add' %> <% if user_signed_in? && @page_collection.user == current_user %>
<%= form_for @page_collection do |f| %>
<%= f.text_area :description, class: 'materialize-textarea' %> <%= f.label :description, 'Collection Description' %>
You can add details for this collection to explain what kinds of pages you'd like it to contain.
<%= f.submit 'Save changes', class: 'btn right blue white-text' %>
<% end %>
<% else %> <% if @page_collection.description? %>
<%= simple_format @page_collection.description %>
<% end %> <% end %>
In this collection
<%= link_to @page_collection, class: "collection-item #{PageCollection.text_color}" do %> <%= PageCollection.icon %> All Pages <%= @page_collection.accepted_submissions.count %> <% end %> <% @page_collection.page_types.each do |pt| %> <% klass = content_class_from_name(pt) %> <%= link_to(send(pt.downcase.pluralize + '_page_collection_path', @page_collection), class: "collection-item #{klass.color} white-text") do %> <%= klass.icon %> <%= pt.pluralize %> <%= @page_collection.accepted_submissions.where(content_type: pt).count %> <% end %> <% end %>
Curator
<%= link_to @page_collection.user, class: "#{User.text_color}" do %> <%= image_tag @page_collection.user.image_url(size=20), class: 'left circle', style: 'margin-right: 8px;' %> <%= @page_collection.user.display_name %> <% end %>

<% if @page_collection.contributors.any? %>
Contributors
<% @page_collection.contributors.each do |user| %>
<%= link_to user, class: "#{User.text_color}" do %> <%= image_tag user.image_url(size=20), class: 'left circle', style: 'margin-right: 8px;' %> <%= user.display_name %> <% end %>
<% end %>
<% end %> <% if user_signed_in? && current_user == @page_collection.user %> <% end %>