From 0de4effd601eefd1f4f3bbc07bc2b0876af7a2f3 Mon Sep 17 00:00:00 2001 From: Andrew Brown Date: Thu, 1 Oct 2020 16:29:37 -0700 Subject: [PATCH] allow all collection viewers to see more posts from a particular user --- app/assets/stylesheets/content.css.scss | 6 +- .../_contributor_highlight_bar.html.erb | 4 + .../page_collections/_quick_add.html.erb | 2 +- app/views/page_collections/show.html.erb | 118 +++++++++++++++++- 4 files changed, 124 insertions(+), 6 deletions(-) create mode 100644 app/views/page_collections/_contributor_highlight_bar.html.erb diff --git a/app/assets/stylesheets/content.css.scss b/app/assets/stylesheets/content.css.scss index 50930eab..f1e18ee1 100644 --- a/app/assets/stylesheets/content.css.scss +++ b/app/assets/stylesheets/content.css.scss @@ -173,4 +173,8 @@ p.long-form { color: orange !important; cursor: pointer; } -} \ No newline at end of file +} + +.spaced-paragraphs p { + margin-bottom: 1em; +} diff --git a/app/views/page_collections/_contributor_highlight_bar.html.erb b/app/views/page_collections/_contributor_highlight_bar.html.erb new file mode 100644 index 00000000..8819d8f2 --- /dev/null +++ b/app/views/page_collections/_contributor_highlight_bar.html.erb @@ -0,0 +1,4 @@ +
+ 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. +
\ No newline at end of file diff --git a/app/views/page_collections/_quick_add.html.erb b/app/views/page_collections/_quick_add.html.erb index e5a70fa4..5945b088 100644 --- a/app/views/page_collections/_quick_add.html.erb +++ b/app/views/page_collections/_quick_add.html.erb @@ -1,5 +1,5 @@ <% if user_signed_in? && (@page_collection.allow_submissions? || @page_collection.user == current_user) %> -