Expose Conference.code_of_conduct

This commit is contained in:
Henne Vogelsang 2024-06-07 17:35:41 +02:00
parent 85149dc837
commit 9f1e877ea0
No known key found for this signature in database
GPG key ID: 97DDB66BDAF8D4D6
10 changed files with 33 additions and 31 deletions

View file

@ -1,18 +0,0 @@
= content_for :splash_nav do
%li
= link_to 'Code of Conduct', '#',
data: { toggle: 'modal', target: '#modal-code-of-conduct'}
- content_for :modals do
- cache '#CoC-modal' do
.modal.fade{ id: "modal-code-of-conduct" }
.modal-dialog
.modal-content
.modal-header
%button.close{ data: { dismiss: 'modal' } }
%i.fa-solid.fa-xmark
%h3.modal-title Code of Conduct
.modal-body
= markdown conference.code_of_conduct
.modal-footer
= link_to 'permalink', :code_of_conduct

View file

@ -26,8 +26,8 @@
= link_to "View Conference", conference_path(conference.short_title), class: 'btn btn-default'
- if conference.program and conference.program.schedule_public
= link_to "Schedule", conference_schedule_path(conference.short_title), class: 'btn btn-default'
- unless conference.code_of_conduct.blank?
= link_to "Code of Conduct", :code_of_conduct, class: 'btn btn-default'
- if conference.code_of_conduct.present?
= link_to "Code of Conduct", code_of_conduct_conference_path(conference.short_title), class: 'btn btn-default'
- if conference.registration_open?
- if conference.user_registered?(current_user)
= link_to "My Registration", conference_conference_registration_path(conference.short_title), class: 'btn btn-default'

View file

@ -27,3 +27,9 @@
- if contact.email?
= mail_to "#{ contact.email }" do
%i.fa-solid.fa-envelope.fa-4x
.row
.col-md-12
- if @conference.code_of_conduct.present?
%hr
%p.text-center
= link_to "Code of Conduct", code_of_conduct_conference_path(@conference.short_title)

View file

@ -0,0 +1,10 @@
.container
.row
.col-md-12
.page-header
%h1
= @conference.short_title
Code Of Conduct
.row
.col-md-12
= markdown @conference.code_of_conduct

View file

@ -18,9 +18,6 @@
#splash
- if @conference.code_of_conduct.present?
= render 'code_of_conduct'
-# header/description
= render 'header', conference: @conference, venue: @conference.venue