Indicate if spalshpage is marked as public or not.

This commit is contained in:
Tyrant Davis 2018-08-06 11:02:00 -05:00 committed by James Mason
parent 7127834263
commit d3ce401cba
3 changed files with 10 additions and 0 deletions

View file

@ -174,3 +174,7 @@
} }
} }
} }
#publicorprivate {
padding-top: 30px;
}

View file

@ -49,6 +49,10 @@
- if can? :destroy, @splashpage - if can? :destroy, @splashpage
= link_to 'Delete', admin_conference_splashpage_path, = link_to 'Delete', admin_conference_splashpage_path,
method: :delete, data: { confirm: 'Are you sure?' }, class: 'btn btn-danger' 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 - else
.row .row
.col-md-12.text-right .col-md-12.text-right

View file

@ -19,6 +19,7 @@ feature Splashpage do
expect(flash).to eq('Splashpage successfully created.') expect(flash).to eq('Splashpage successfully created.')
expect(current_path).to eq(admin_conference_splashpage_path(conference.short_title)) expect(current_path).to eq(admin_conference_splashpage_path(conference.short_title))
expect(page.has_text?('Private')).to be true
end end
context 'splashpage already created' do context 'splashpage already created' do
@ -34,6 +35,7 @@ feature Splashpage do
expect(flash).to eq('Splashpage successfully updated.') expect(flash).to eq('Splashpage successfully updated.')
expect(current_path).to eq(admin_conference_splashpage_path(conference.short_title)) expect(current_path).to eq(admin_conference_splashpage_path(conference.short_title))
expect(page.has_text?('Public')).to be true
click_link 'Edit' click_link 'Edit'
expect(page.has_checked_field?('Make splash page public?')).to be true expect(page.has_checked_field?('Make splash page public?')).to be true