From d3ce401cba46b33a1893313feabab08681b6258d Mon Sep 17 00:00:00 2001 From: Tyrant Davis Date: Mon, 6 Aug 2018 11:02:00 -0500 Subject: [PATCH] Indicate if spalshpage is marked as public or not. --- app/assets/stylesheets/osem-splash.scss | 4 ++++ app/views/admin/splashpages/show.html.haml | 4 ++++ spec/features/splashpage_spec.rb | 2 ++ 3 files changed, 10 insertions(+) diff --git a/app/assets/stylesheets/osem-splash.scss b/app/assets/stylesheets/osem-splash.scss index 32cbb822..bba69916 100644 --- a/app/assets/stylesheets/osem-splash.scss +++ b/app/assets/stylesheets/osem-splash.scss @@ -174,3 +174,7 @@ } } } + +#publicorprivate { + padding-top: 30px; +} diff --git a/app/views/admin/splashpages/show.html.haml b/app/views/admin/splashpages/show.html.haml index ec625385..52d84ab0 100644 --- a/app/views/admin/splashpages/show.html.haml +++ b/app/views/admin/splashpages/show.html.haml @@ -49,6 +49,10 @@ - if can? :destroy, @splashpage = link_to 'Delete', admin_conference_splashpage_path, method: :delete, data: { confirm: 'Are you sure?' }, class: 'btn btn-danger' + - if @conference.splashpage && @conference.splashpage.public + %p.text-muted#publicorprivate Public + - else + %p.text-muted#publicorprivate Private - else .row .col-md-12.text-right diff --git a/spec/features/splashpage_spec.rb b/spec/features/splashpage_spec.rb index 02b12f73..7c7bd14b 100644 --- a/spec/features/splashpage_spec.rb +++ b/spec/features/splashpage_spec.rb @@ -19,6 +19,7 @@ feature Splashpage do expect(flash).to eq('Splashpage successfully created.') expect(current_path).to eq(admin_conference_splashpage_path(conference.short_title)) + expect(page.has_text?('Private')).to be true end context 'splashpage already created' do @@ -34,6 +35,7 @@ feature Splashpage do expect(flash).to eq('Splashpage successfully updated.') expect(current_path).to eq(admin_conference_splashpage_path(conference.short_title)) + expect(page.has_text?('Public')).to be true click_link 'Edit' expect(page.has_checked_field?('Make splash page public?')).to be true