mirror of
https://github.com/openSUSE/osem.git
synced 2026-08-13 19:54:02 +00:00
Expose Conference.code_of_conduct
This commit is contained in:
parent
85149dc837
commit
9f1e877ea0
10 changed files with 33 additions and 31 deletions
|
|
@ -181,7 +181,7 @@ module Admin
|
||||||
:vpositions_attributes, :use_volunteers, :color,
|
:vpositions_attributes, :use_volunteers, :color,
|
||||||
:sponsorship_levels_attributes, :sponsors_attributes,
|
:sponsorship_levels_attributes, :sponsors_attributes,
|
||||||
:registration_limit, :ticket_layout,
|
:registration_limit, :ticket_layout,
|
||||||
:booth_limit)
|
:booth_limit, :code_of_conduct)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
|
||||||
|
|
@ -108,6 +108,8 @@ class ConferencesController < ApplicationController
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
def code_of_conduct; end
|
||||||
|
|
||||||
private
|
private
|
||||||
|
|
||||||
def conference_finder_conditions
|
def conference_finder_conditions
|
||||||
|
|
|
||||||
|
|
@ -32,6 +32,11 @@
|
||||||
%span.help-block
|
%span.help-block
|
||||||
This will be displayed on the front page.
|
This will be displayed on the front page.
|
||||||
= f.hidden_field :picture_cache
|
= f.hidden_field :picture_cache
|
||||||
|
.form-group
|
||||||
|
= f.text_area :code_of_conduct, rows: 10, data: { provide: 'markdown' }, class: 'form-control'
|
||||||
|
%span.help-block
|
||||||
|
Rules governing behavior and dispute resolution...
|
||||||
|
= markdown_hint
|
||||||
= f.select :ticket_layout, Conference.ticket_layouts.keys, {}, class: 'form-control'
|
= f.select :ticket_layout, Conference.ticket_layouts.keys, {}, class: 'form-control'
|
||||||
%span.help-block
|
%span.help-block
|
||||||
Layout type for tickets of the conference.
|
Layout type for tickets of the conference.
|
||||||
|
|
|
||||||
|
|
@ -1,16 +1,14 @@
|
||||||
- unless @conference.code_of_conduct.blank?
|
- if @conference.code_of_conduct.present?
|
||||||
- code_of_conduct_link = link_to 'Code of Conduct', '#',
|
|
||||||
data: { toggle: 'modal', target: '#modal-code-of-conduct'}
|
|
||||||
- if @registration.accepted_code_of_conduct
|
- if @registration.accepted_code_of_conduct
|
||||||
= icon 'fa-solid', 'square-check'
|
= icon 'fa-solid', 'square-check'
|
||||||
I have read and accepted the
|
I have read and accepted the
|
||||||
= code_of_conduct_link
|
= link_to "Code of Conduct", code_of_conduct_conference_path(@conference.short_title)
|
||||||
- else
|
- else
|
||||||
.checkbox
|
.checkbox
|
||||||
%label
|
%label
|
||||||
= f.check_box :accepted_code_of_conduct, required: true
|
= f.check_box :accepted_code_of_conduct, required: true
|
||||||
I have read and accept the
|
I have read and accept the
|
||||||
= code_of_conduct_link
|
= link_to "Code of Conduct", code_of_conduct_conference_path(@conference.short_title)
|
||||||
%abbr{title: 'This field is required'} *
|
%abbr{title: 'This field is required'} *
|
||||||
|
|
||||||
- if @conference.program.events.with_registration_open.any? || @registration.events.any?
|
- if @conference.program.events.with_registration_open.any? || @registration.events.any?
|
||||||
|
|
@ -26,5 +24,3 @@
|
||||||
- if event.scheduled?
|
- if event.scheduled?
|
||||||
(Scheduled on: #{event.time.to_date})
|
(Scheduled on: #{event.time.to_date})
|
||||||
%br
|
%br
|
||||||
|
|
||||||
= render 'conferences/code_of_conduct'
|
|
||||||
|
|
|
||||||
|
|
@ -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
|
|
||||||
|
|
@ -26,8 +26,8 @@
|
||||||
= link_to "View Conference", conference_path(conference.short_title), class: 'btn btn-default'
|
= link_to "View Conference", conference_path(conference.short_title), class: 'btn btn-default'
|
||||||
- if conference.program and conference.program.schedule_public
|
- if conference.program and conference.program.schedule_public
|
||||||
= link_to "Schedule", conference_schedule_path(conference.short_title), class: 'btn btn-default'
|
= link_to "Schedule", conference_schedule_path(conference.short_title), class: 'btn btn-default'
|
||||||
- unless conference.code_of_conduct.blank?
|
- if conference.code_of_conduct.present?
|
||||||
= link_to "Code of Conduct", :code_of_conduct, class: 'btn btn-default'
|
= link_to "Code of Conduct", code_of_conduct_conference_path(conference.short_title), class: 'btn btn-default'
|
||||||
- if conference.registration_open?
|
- if conference.registration_open?
|
||||||
- if conference.user_registered?(current_user)
|
- if conference.user_registered?(current_user)
|
||||||
= link_to "My Registration", conference_conference_registration_path(conference.short_title), class: 'btn btn-default'
|
= link_to "My Registration", conference_conference_registration_path(conference.short_title), class: 'btn btn-default'
|
||||||
|
|
|
||||||
|
|
@ -27,3 +27,9 @@
|
||||||
- if contact.email?
|
- if contact.email?
|
||||||
= mail_to "#{ contact.email }" do
|
= mail_to "#{ contact.email }" do
|
||||||
%i.fa-solid.fa-envelope.fa-4x
|
%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)
|
||||||
|
|
|
||||||
10
app/views/conferences/code_of_conduct.html.haml
Normal file
10
app/views/conferences/code_of_conduct.html.haml
Normal 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
|
||||||
|
|
@ -18,9 +18,6 @@
|
||||||
|
|
||||||
|
|
||||||
#splash
|
#splash
|
||||||
- if @conference.code_of_conduct.present?
|
|
||||||
= render 'code_of_conduct'
|
|
||||||
|
|
||||||
-# header/description
|
-# header/description
|
||||||
= render 'header', conference: @conference, venue: @conference.venue
|
= render 'header', conference: @conference, venue: @conference.venue
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -192,6 +192,10 @@ Osem::Application.routes.draw do
|
||||||
get :events
|
get :events
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
member do
|
||||||
|
get 'code-of-conduct'
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
namespace :api, defaults: {format: 'json'} do
|
namespace :api, defaults: {format: 'json'} do
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue