mirror of
https://github.com/indentlabs/notebook.git
synced 2025-10-26 11:19:22 +00:00
allow all collection viewers to see more posts from a particular user
This commit is contained in:
parent
76558c92a3
commit
0de4effd60
@ -173,4 +173,8 @@ p.long-form {
|
||||
color: orange !important;
|
||||
cursor: pointer;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.spaced-paragraphs p {
|
||||
margin-bottom: 1em;
|
||||
}
|
||||
|
||||
@ -0,0 +1,4 @@
|
||||
<div class="card-panel <%= PageCollection.color %> darken-3 white-text">
|
||||
Showing all submitted pages from <%= link_to contributor.display_name, contributor, class: "#{User.color}-text" %>.
|
||||
Click <%= link_to 'here', @page_collection, class: 'blue-text text-lighten-3' %> to see all pages regardless of author.
|
||||
</div>
|
||||
@ -1,5 +1,5 @@
|
||||
<% if user_signed_in? && (@page_collection.allow_submissions? || @page_collection.user == current_user) %>
|
||||
<ul class="collapsible">
|
||||
<ul class="hoverable collapsible">
|
||||
<li>
|
||||
<div class="collapsible-header blue white-text">
|
||||
<i class="material-icons <%= PageCollection.color %>-text text-darken-2"><%= PageCollection.icon %></i>
|
||||
|
||||
@ -1,5 +1,118 @@
|
||||
<%= content_for :full_width_page_header do %>
|
||||
<%= render partial: 'content/components/collection_header', locals: { collection: @page_collection } %>
|
||||
|
||||
<div class="row">
|
||||
<div class="col s12 m12 l7">
|
||||
<div class="card">
|
||||
<div class="card-content">
|
||||
<div class="card-title">
|
||||
<% 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: "btn #{PageCollection.color} lighten-2 right" do %>
|
||||
<i class="material-icons left"><%= PageCollection.icon %></i>
|
||||
Unfollow
|
||||
<% end %>
|
||||
|
||||
<% else %>
|
||||
<%= link_to follow_page_collection_path(@page_collection), class: "btn #{PageCollection.color} right" do %>
|
||||
<i class="material-icons left"><%= PageCollection.icon %></i>
|
||||
Follow for updates
|
||||
<% end %>
|
||||
<% end %>
|
||||
<% end %>
|
||||
<% else %>
|
||||
<%= link_to '#', class: "btn #{PageCollection.color} lighten-2 right disabled" do %>
|
||||
<i class="material-icons left"><%= PageCollection.icon %></i>
|
||||
Follow
|
||||
<% end %>
|
||||
<% end %>
|
||||
|
||||
About this collection
|
||||
</div>
|
||||
<br />
|
||||
<% if user_signed_in? && @page_collection.user == current_user %>
|
||||
<%= form_for @page_collection do |f| %>
|
||||
<div class="input-field">
|
||||
<%= f.text_area :description, class: 'materialize-textarea' %>
|
||||
<%= f.label :description, 'Collection Description' %>
|
||||
<div class="help-text">You can add details for this collection to explain what kinds of pages you'd like it to contain.</div>
|
||||
</div>
|
||||
<%= f.submit 'Save changes', class: 'btn right blue white-text' %>
|
||||
<div class="clearfix"></div>
|
||||
|
||||
<% end %>
|
||||
<% else %>
|
||||
<% if @page_collection.description? %>
|
||||
<div class="spaced-paragraphs">
|
||||
<%= simple_format @page_collection.description %>
|
||||
</div>
|
||||
<% end %>
|
||||
<% end %>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col s12 m12 l5">
|
||||
<div class="card">
|
||||
<div class="card-content">
|
||||
<div class="card-title">In this collection</div>
|
||||
|
||||
<%= render partial: 'page_collections/quick_add' %>
|
||||
|
||||
<div class="collection">
|
||||
<%= link_to @page_collection, class: "collection-item #{PageCollection.color}-text" do %>
|
||||
<i class="material-icons left"><%= PageCollection.icon %></i>
|
||||
All Pages
|
||||
<span class="badge brown-text"><%= @page_collection.accepted_submissions.count %></span>
|
||||
<% end %>
|
||||
<% @page_collection.page_types.each do |pt| %>
|
||||
<% klass = pt.constantize %>
|
||||
<%= link_to(send(pt.downcase.pluralize + '_page_collection_path', @page_collection), class: "collection-item #{klass.color} white-text") do %>
|
||||
<i class="material-icons left"><%= klass.icon %></i>
|
||||
<%= pt.pluralize %>
|
||||
<span class="badge white-text"><%= @page_collection.accepted_submissions.where(content_type: pt).count %></span>
|
||||
<% end %>
|
||||
<% end %>
|
||||
</div>
|
||||
|
||||
<div class="grey-text uppercase">Curator</div>
|
||||
<div>
|
||||
<%= link_to @page_collection.user, class: "#{User.color}-text" do %>
|
||||
<%= image_tag @page_collection.user.image_url(size=20), class: 'left circle', style: 'margin-right: 8px;' %>
|
||||
<%= @page_collection.user.display_name %>
|
||||
<% end %>
|
||||
</div>
|
||||
|
||||
<% if @page_collection.contributors.any? %>
|
||||
<div class="grey-text uppercase">Contributors</div>
|
||||
<% @page_collection.contributors.each do |user| %>
|
||||
<div>
|
||||
<%= link_to user, class: "#{User.color}-text" do %>
|
||||
<%= image_tag user.image_url(size=20), class: 'left circle', style: 'margin-right: 8px;' %>
|
||||
<%= user.display_name %>
|
||||
<% end %>
|
||||
</div>
|
||||
<% end %>
|
||||
<br />
|
||||
<% end %>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<% if @pages.empty? %>
|
||||
<div class="card-panel">
|
||||
This collection doesn't have any approved public pages yet. Please check back later!
|
||||
</div>
|
||||
<% else %>
|
||||
<%= render partial: 'page_collections/sort_bar' %>
|
||||
<% if !!@show_contributor_highlight %>
|
||||
<%= render partial: 'page_collections/contributor_highlight_bar', locals: { contributor: @highlighted_contributor } %>
|
||||
<% end %>
|
||||
<%= render partial: 'page_collections/stream', locals: { pages: @pages } %>
|
||||
<% end %>
|
||||
|
||||
<% end %>
|
||||
|
||||
<div class="row">
|
||||
@ -11,10 +124,7 @@
|
||||
<% else %>
|
||||
<%= render partial: 'page_collections/sort_bar' %>
|
||||
<% if !!@show_contributor_highlight %>
|
||||
<div class="card-panel <%= PageCollection.color %> darken-3 white-text">
|
||||
Showing all submitted pages from <%= link_to @highlighted_contributor.display_name, @highlighted_contributor, class: "#{User.color}-text" %>.
|
||||
Click <%= link_to 'here', @page_collection, class: 'blue-text text-lighten-3' %> to see all pages regardless of author.
|
||||
</div>
|
||||
<%= render partial: 'page_collections/contributor_highlight_bar', locals: { contributor: @highlighted_contributor } %>
|
||||
<% end %>
|
||||
<%= render partial: 'page_collections/stream', locals: { pages: @pages } %>
|
||||
<% end %>
|
||||
|
||||
Loading…
Reference in New Issue
Block a user