From cdb27ee2e8c83515b0eab3e2ff9d29c8195be632 Mon Sep 17 00:00:00 2001 From: tuuli Date: Thu, 14 Jun 2018 16:42:24 +0200 Subject: [PATCH] Show share titles if there are shares on the page --- app/views/pages/_local_share_analytics_header.slim | 2 +- app/views/pages/_shares_editor.slim | 7 +++---- app/views/pages/_sp_share_analytics_header.slim | 2 +- 3 files changed, 5 insertions(+), 6 deletions(-) diff --git a/app/views/pages/_local_share_analytics_header.slim b/app/views/pages/_local_share_analytics_header.slim index 135a446f1..828df1cf4 100644 --- a/app/views/pages/_local_share_analytics_header.slim +++ b/app/views/pages/_local_share_analytics_header.slim @@ -1,4 +1,4 @@ -h3#champaign-shares-header.hidden-irrelevant = "Shares managed by Champaign:" +h3 id='champaign-shares-header' class=(hide_title ? 'hidden-irrelevant': '') = "Shares managed by Champaign:" th th = "Content" th diff --git a/app/views/pages/_shares_editor.slim b/app/views/pages/_shares_editor.slim index 2dfcebc5f..6704a9644 100644 --- a/app/views/pages/_shares_editor.slim +++ b/app/views/pages/_shares_editor.slim @@ -5,17 +5,16 @@ table.table.shares-editor__existing__shareprogress thead.shares-editor__stats-heading.hidden-closed - = render 'sp_share_analytics_header' + = render 'sp_share_analytics_header', hide_title: @sp_variations.blank? tbody - @sp_variations.each do |variation| = render variation, page: @page - - = render 'links_to_share_progress' + = render 'links_to_share_progress' table.table.shares-editor__existing__champaign thead.shares-editor__stats-heading.hidden-closed - = render 'local_share_analytics_header' + = render 'local_share_analytics_header', hide_title: @local_variations.blank? tbody - @local_variations.each do |variation| diff --git a/app/views/pages/_sp_share_analytics_header.slim b/app/views/pages/_sp_share_analytics_header.slim index 8aa44c6d6..dd483a65e 100644 --- a/app/views/pages/_sp_share_analytics_header.slim +++ b/app/views/pages/_sp_share_analytics_header.slim @@ -1,4 +1,4 @@ -h3#share-progress-shares-header.hidden-irrelevant = "Shares managed by ShareProgress:" +h3 id='share-progress-shares-header' class=(hide_title ? 'hidden-irrelevant': '') = "Shares managed by ShareProgress:" th th = "Content" th