Retire semantic_form_for

Also a buttload of form cleanups...
This commit is contained in:
Henne Vogelsang
2022-02-23 17:52:16 +01:00
parent 350b1ebbbe
commit 81853d1ef9
136 changed files with 1825 additions and 1441 deletions

View File

@@ -94,11 +94,6 @@ $(function () {
return false;
});
$("#event-comment-link").click(function(){
$("#comments-div").toggle();
return false;
});
$(".comment-reply").hide();
$(".user-details-popover").popover();
$("#comments-div").hide();

View File

@@ -68,7 +68,6 @@ module Admin
def new
@conference = Conference.new
@organizations = Organization.accessible_by(current_ability, :update).pluck(:name, :id)
end
def create

View File

@@ -12,11 +12,12 @@ module Admin
def update
authorize! :update, @conference.program
@program = @conference.program
params['program']['languages'] = params['program']['languages'].join(',') if params['program']['languages'].present?
@program.assign_attributes(program_params)
send_mail_on_schedule_public = @program.notify_on_schedule_public?
event_schedules_count_was = @program.event_schedules.count
if @program.update(program_params)
if @program.save
ConferenceScheduleUpdateMailJob.perform_later(@conference) if send_mail_on_schedule_public
respond_to do |format|
format.html do
@@ -40,7 +41,7 @@ module Admin
private
def program_params
params.require(:program).permit(:rating, :schedule_public, :schedule_interval, :schedule_fluid, :languages, :blind_voting, :voting_start_date, :voting_end_date, :selected_schedule_id)
params.require(:program).permit(:rating, :schedule_public, :schedule_interval, :schedule_fluid, :blind_voting, :voting_start_date, :voting_end_date, :selected_schedule_id, :languages)
end
end
end

View File

@@ -3,7 +3,7 @@
module Admin
class QuestionsController < Admin::BaseController
load_and_authorize_resource :conference, find_by: :short_title
load_and_authorize_resource through: :conference, except: [:new, :create]
load_and_authorize_resource except: [:new, :create]
def index
authorize! :index, Question.new(conference_id: @conference.id)

View File

@@ -20,7 +20,7 @@ module Admin
respond_to do |format|
format.html
format.json do
render json: RegistrationDatatable.new(view_context: view_context, conference: @conference)
render json: RegistrationDatatable.new({}, conference: @conference, view_context: view_context)
end
format.pdf { render 'index', layout: false }
format.xlsx do

View File

@@ -17,7 +17,7 @@ module Admin
def create
@ticket = @conference.tickets.new(ticket_params)
if @ticket.save(ticket_params)
if @ticket.save
redirect_to admin_conference_tickets_path(conference_id: @conference.short_title),
notice: 'Ticket successfully created.'
else

View File

@@ -24,7 +24,7 @@ class ConferenceRegistrationsController < ApplicationController
end
authorize! :new, @registration, message: message
# @user variable needs to be set so that _sign_up_form_embedded works properly
# @user needs to be set for devise/registrations/new_embedded
@user = @registration.build_user
end
@@ -42,7 +42,7 @@ class ConferenceRegistrationsController < ApplicationController
@registration = @conference.registrations.new(registration_params)
@user = if current_user.nil?
# @user variable needs to be set so that _sign_up_form_embedded works properly
# @user needs to be set for devise/registrations/new_embedded
@registration.build_user(user_params)
else
current_user

View File

@@ -3,16 +3,6 @@
class RegistrationsController < Devise::RegistrationsController
prepend_before_action :check_captcha, only: [:create]
def edit
@openids = Openid.where(user_id: current_user.id).order(:provider)
super
end
def update
@openids = Openid.where(user_id: current_user.id).order(:provider)
super
end
protected
def after_update_path_for(resource)

View File

@@ -1,10 +1,15 @@
# frozen_string_literal: true
class RegistrationDatatable < AjaxDatatablesRails::Base
class RegistrationDatatable < AjaxDatatablesRails::ActiveRecord
extend Forwardable
def_delegator :@view, :edit_admin_conference_registration_path
def initialize(params, opts = {})
@view = opts[:view_context]
super
end
def view_columns
@view_columns ||= {
id: { source: 'Registration.id', cond: :eq },

View File

@@ -0,0 +1,13 @@
# frozen_string_literal: true
module EventTypesHelper
##
# Includes functions related to event_types
##
##
# ====Returns
# * +String+ -> number of registrations / max allowed registrations
def event_type_select_options(event_types = {})
event_types.map { |type| ["#{type.title} - #{show_time(type.length)}", type.id] }
end
end

View File

@@ -46,14 +46,6 @@ module EventsHelper
end
end
def track_selector_input(form)
if @program.tracks.confirmed.cfp_active.any?
form.input :track_id, as: :select,
collection: @program.tracks.confirmed.cfp_active.pluck(:name, :id),
include_blank: '(Please select)'
end
end
def rating_tooltip(event, max_rating)
"#{event.average_rating}/#{max_rating}, #{pluralize(event.voters.length, 'vote')}"
end

View File

@@ -1,5 +1,9 @@
%h1
Editing
= @booth.title
= render 'booths/form'
.row
.col-md-12
.page-header
%h1
Edit #{t'booth'}
= @booth.title
.row
.col-md-8
= render 'booths/form'

View File

@@ -1,3 +1,8 @@
%h1 New #{t'booth'}
= render 'booths/form'
.row
.col-md-12
.page-header
%h1
New #{t'booth'}
.row
.col-md-8
= render 'booths/form'

View File

@@ -1,28 +1,20 @@
.row
.col-md-12
.page-header
%h1
Call for
= cfp.cfp_type.capitalize
.row
.col-md-8
= semantic_form_for(cfp, url: cfp_form_url(cfp, conference),
html: { multipart: true,
data: { end_conference: conference.end_date.to_s } }) do |f|
= f.input :cfp_type, as: :hidden
= f.input :start_date, as: :string,
input_html: { class: 'form-control',
id: 'registration-period-start-datepicker' }
= f.input :end_date, as: :string,
input_html: { class: 'form-control',
id: 'registration-period-end-datepicker' }
= f.input :description, hint: markdown_hint,
input_html: { rows: 2, data: { provide: 'markdown' } }
- if cfp.cfp_type == 'events'
= f.input :enable_registrations, as: :boolean,
hint: 'Allow submitters to request registration?'
- else
= f.input :enable_registrations, as: :hidden
%p.text-right
= f.action :submit, as: :button,
button_html: { class: 'btn btn-primary' }
= form_for(@cfp, url: (@cfp.new_record? ? admin_conference_program_cfps_path : admin_conference_program_cfp_path(@conference.short_title, @cfp)), data: { end_conference: @conference.end_date.to_s }) do |f|
= f.hidden_field :cfp_type
.form-group
= f.label :start_date, "Start Date"
= f.text_field :start_date, class: 'form-control', id: 'registration-period-start-datepicker', start_date: @conference.start_date, end_date: @conference.end_date
.form-group
= f.label :end_date, "End Date"
= f.text_field :end_date, class: 'form-control', id: 'registration-period-end-datepicker', start_date: @conference.start_date, end_date: @conference.end_date
.form-group
= f.label :description, "Description"
= f.text_area :description, rows: 2, data: { provide: 'markdown' }
%span.help-block
= markdown_hint
- if @cfp.cfp_type == 'events'
.checkbox
%label
= f.check_box :enable_registrations
Allow submitters to request registration?
%p.text-right
= f.submit nil, { class: 'btn btn-success' }

View File

@@ -1 +1,9 @@
= render 'form', cfp: @cfp, conference: @conference
.row
.col-md-12
.page-header
%h1
Call for
= @cfp.cfp_type.capitalize
.row
.col-md-8
= render 'form'

View File

@@ -1 +1,9 @@
= render 'form', cfp: @cfp, conference: @conference
.row
.col-md-12
.page-header
%h1
Call for
= @cfp.cfp_type.capitalize
.row
.col-md-8
= render 'form'

View File

@@ -13,10 +13,13 @@
#resource-placeholder{ style: 'background-color:#d3d3d3; float: left; width: 400px; height: 250px; margin: 5px; border-width: 1px; border-style: solid; border-color: rgba(0,0,0,.2);' }
.row
.col-md-6
= semantic_form_for(@commercial, url: admin_conference_commercials_path(conference_id: @conference.short_title)) do |f|
= f.input :url, label: 'URL', as: :string, input_html: { required: 'required', autofocus: true },
hint: 'Just paste the url of your video/photo provider. YouTube, Vimeo, SpeakerDeck, SlideShare, Instagram, Flickr.'
= f.action :submit, as: :button, button_html: { class: 'btn btn-primary pull-right', disabled: true }
= form_for(@commercial, url: admin_conference_commercials_path(conference_id: @conference.short_title)) do |f|
.form-group
= f.label :url
= f.url_field :url, required: 'required', autofocus: true, class: 'form-control'
%span.help-block
Just paste the url of your video/photo provider. YouTube, Vimeo, SpeakerDeck, SlideShare, Instagram, Flickr.
= f.submit nil, { class: 'btn btn-primary pull-right', id: 'commercial_submit_action', disabled: true }
%hr
- @commercials.each_slice(3) do |slice|
@@ -29,9 +32,13 @@
= render partial: 'shared/media_item', locals: { commercial: commercial }
.caption
- if can? :update, commercial
= semantic_form_for commercial, url: admin_conference_commercial_path(conference_id: @conference.short_title, id: commercial) do |f|
= f.input :url, label: 'URL', as: :string, input_html: { id: "commercial_url_#{commercial.id}", required: 'required' }, hint: 'Just paste the url of your video/photo provider'
= f.action :submit, as: :button, button_html: { class: 'btn btn-success' }, label: 'Update'
= form_for commercial, url: admin_conference_commercial_path(conference_id: @conference.short_title, id: commercial) do |f|
.form-group
= f.label :url
= f.url_field :url, id: "commercial_url_#{commercial.id}", required: 'required'
%span.help-block
Just paste the url of your video/photo provider
= f.submit nil, { class: 'btn btn-success' }
- if can? :destroy, commercial
= link_to 'Delete', admin_conference_commercial_path(@conference.short_title, commercial.id),
method: :delete, data: { confirm: 'Are you sure?' }, class: 'btn btn-danger'

View File

@@ -0,0 +1,95 @@
%h4
Basic Information
%hr
- if f.object.new_record?
.form-group
= f.label :organization, "Organization"
= f.select :organization_id, Organization.accessible_by(current_ability, :update).pluck(:name, :id)
.form-group
= f.label :title, "Title"
%abbr{title: 'This field is required'} *
= f.text_field :title, required: true, class: 'form-control', placeholder: 'Title'
%span.help-block
The name of your conference as it shall appear throughout the site. Example: 'openSUSE Conference 2013'
.form-group
= f.label :title, "Short Title"
%abbr{title: 'This field is required'} *
= f.text_field :short_title, required: true, pattern: '[a-zA-Z0-9_-]+', title: 'Only letters, numbers, underscores, and dashes.', prepend: conferences_url + '/', class: 'form-control', placeholder: 'Short Title'
%span.help-block
A short and unique handle for your conference, using only letters, numbers, underscores, and dashes. This will be used to identify your conference in URLs etc. Example:
%em
froscon2011
- unless f.object.new_record? # We are showing more fields on the edit form
.form-group
= f.text_area :description, rows: 5, data: { provide: 'markdown' }, class: 'form-control'
%span.help-block
= markdown_hint('A description of the conference.')
.form-group
= f.color_field :color, size: 6, class: 'form-control'
%span.help-block
The color will be used for the dashboard, for instance.
.form-group
= f.label :picture, 'Conference Logo'
- if f.object.picture?
= image_tag f.object.picture.thumb.url
= f.file_field :picture
%span.help-block
This will be displayed on the front page.
= f.hidden_field :picture_cache
= f.select :ticket_layout, Conference.ticket_layouts.keys, {}, class: 'form-control'
%span.help-block
Layout type for tickets of the conference.
%h4
Scheduling
%hr
= f.time_zone_select :timezone, nil, { default: 'UTC' }, { class: 'form-control' }
%span.help-block
Please select in what time zone your conference will take place.
.form-group
= f.label :start_date, "Start Date"
%abbr{title: 'This field is required'} *
= f.text_field :start_date, id: 'conference-start-datepicker', required: true, class: 'form-control'
.form-group
= f.label :end_date, "End Date"
%abbr{title: 'This field is required'} *
= f.text_field :end_date, id: 'conference-end-datepicker', required: true, class: 'form-control'
- unless f.object.new_record? # We are showing more fields on the edit form
.form-group
= f.number_field :start_hour, size: 2, min: 0, max: 23, class: 'form-control'
%span.help-block
= rescheduling_hint(@affected_event_count)
.form-group
= f.number_field :end_hour, size: 2, min: 1, max: 24, class: 'form-control'
%span.help-block
= rescheduling_hint(@affected_event_count)
%h4
Registrations
%hr
.form-group
= f.number_field :registration_limit, in: 0..9999, class: 'form-control'
%span.help-block
Limit the number of registrations to the conference (0 no limit). Please note that the registration limit
does not apply to speakers of confirmed events, they will still be able to register even if the limit has been reached.
You currently have
= pluralize(@conference.registrations.count, 'registration')
%h4
Booths
%hr
.form-group
= f.number_field :booth_limit, in: 0..9999, class: 'form-control'
%span.help-block
= (t'booth').capitalize
limit is the maximum number of
= (t'booth').pluralize
that you can accept for this conference. By setting this number (0 no limit) you can be sure that you are not
going to accept more
= (t'booth').pluralize
than the conference can accommodate. You currently have
= pluralize(@conference.booths.accepted.count, "accepted #{t'booth'}") + '.'
%p.text-right
- if f.object.new_record?
= f.submit nil, { class: 'btn btn-success' }
- else
= f.submit nil, { class: 'btn btn-success', data: { confirm: 'Are you sure you want to proceed?' } }

View File

@@ -6,27 +6,5 @@
The most basic settings of your conference
.row
.col-md-8
= semantic_form_for(@conference, url: admin_conference_path(@conference.short_title), html: {multipart: true}) do |f|
= f.input :title, hint: "The full title of the conference, e.g. 'openSUSE Conference 2014'"
= f.input :short_title, hint: "A short title, e.g. 'oSC14', to be used in URLs"
= f.input :description, hint: markdown_hint('A description of the conference.'), input_html: { rows: 5, data: { provide: 'markdown' } }
= f.input :color, hint: 'The color will be used eg for the dashboard.', input_html: {size: 6, type: 'color'}
= f.label 'Conference Logo'
%br
- if @conference.picture?
= image_tag @conference.picture.thumb.url
= f.input :picture, label: false, hint: 'This will be displayed on the front page.'
= f.hidden_field :picture_cache
= f.input :ticket_layout, as: :select, collection: Conference.ticket_layouts.keys, hint: "Layout type for tickets of the conference."
= f.inputs name: 'Scheduling' do
= f.input :timezone, as: :time_zone, hint: 'The conference time zone'
= f.input :start_date, as: :string, input_html: { id: 'conference-start-datepicker', readonly: 'readonly' }
= f.input :end_date, as: :string, input_html: { id: 'conference-end-datepicker', readonly: 'readonly' }
= f.input :start_hour, input_html: {size: 2, type: 'number', min: 0, max: 23}, hint: rescheduling_hint(@affected_event_count)
= f.input :end_hour, input_html: {size: 2, type: 'number', min: 1, max: 24}, hint: rescheduling_hint(@affected_event_count)
= f.inputs name: 'Registrations' do
= f.input :registration_limit, as: :number, in: 0..9999, hint: 'Limit the number of registrations to the conference (0 no limit). Please note that the registration limit doesn\'t apply to speakers of confirmed events (they will still be able to register even if it has been reached). You currently have ' + pluralize(@conference.registrations.count, 'registration')
= f.inputs name: 'Booths' do
= f.input :booth_limit, as: :number, in: 0..9999,
hint: "#{(t'booth').capitalize } limit is the maximum number of #{(t'booth').pluralize} that you can accept for this conference. By setting this number (0 no limit) you can be sure that you are not going to accept more #{(t'booth').pluralize} than the conference can accommodate. You currently have " + pluralize(@conference.booths.accepted.count, "accepted #{t'booth'}") +'.'
= f.action :submit, as: :button, button_html: { class: 'btn btn-primary', data: { confirm: 'Are you sure you want to proceed?' } }
= form_for(@conference, url: admin_conference_path(@conference.short_title), html: {multipart: true}) do |f|
= render partial: 'form_fields', locals: { f: f }

View File

@@ -1,15 +1,4 @@
.row
.col-md-8
= semantic_form_for(@conference, url: admin_conferences_path) do |f|
= f.inputs 'Basic Information' do
= f.input :organization, as: :select, collection: @organizations
= f.input :title, hint: "The name of your conference as it shall appear throughout the site. Example: 'OpenSUSE Conference 2013'",
input_html: { required: 'required' }
= f.input :short_title, hint: "A short and unique handle for your conference, using only letters, numbers, underscores, and dashes. This will be used to identify your conference in URLs etc. Example: 'froscon2011'",
input_html: { required: 'required', pattern: '[a-zA-Z0-9_-]+', title: 'Only letters, numbers, underscores, and dashes.' }, prepend: conferences_url + '/'
= f.inputs 'Scheduling' do
= f.input :timezone, as: :time_zone, default: Time.zone.name, hint: 'Please select in what time zone your conference will take place.'
= f.input :start_date, as: :string, input_html: { id: 'conference-start-datepicker', required: 'required' }
= f.input :end_date, as: :string, input_html: { id: 'conference-end-datepicker', required: 'required' }
= f.actions do
= f.action :submit, button_html: {class: 'btn btn-success pull-right'}
= form_for(@conference, url: admin_conferences_path) do |f|
= render partial: 'form_fields', locals: { f: f }

View File

@@ -6,17 +6,53 @@
How people can contact you
.row
.col-md-8
= semantic_form_for(@contact, url: admin_conference_contact_path(@conference.short_title), html: {multipart: true}) do |f|
= f.inputs name: 'Mail' do
= f.input :email, input_html: { autofocus: true }, hint: 'Contact email address for your conference. Will be used as reply-to address in emails sent out by the system.'
= f.input :sponsor_email, hint: 'This will appear in the sponsor segment of the splash for the sponsors to contact to the organizers'
= f.inputs name: 'Social Media' do
= f.input :social_tag, hint: "The hashtag you'll use on Twitter and Google+. Don't include the '#' sign!'"
= f.input :blog, hint: 'This will appear in the social media section as a link to your conference blog.'
= f.input :facebook, hint: 'This will appear in the social media section as a link to the Facebook page of your Conference'
= f.input :googleplus, label: 'Google+ Url', hint: 'This will appear in the social media section as a link to the Google+ Page of your Conference'
= f.input :twitter, hint: 'This will appear in the social media section as a link to the Twitter Page of your Conference'
= f.input :instagram, hint: 'This will appear in the social media section as a link to the Instagram Page of your Conference'
= f.input :mastodon, hint: 'This will appear in the social media section as a link to the Mastodon Page of your Conference'
= f.input :youtube, hint: 'This will appear in the social media section as a link to the YouTube channel for your conference.'
= f.action :submit, as: :button, button_html: { class: 'btn btn-primary' }
= form_for(@contact, url: admin_conference_contact_path(@conference.short_title), html: {multipart: true}) do |f|
%h4
Mail
%hr
.form-group
= f.label :email
= f.email_field :email, autofocus: true, class: 'form-control'
%span.help-block
Contact email address for your conference. Will be used as reply-to address in emails sent out by the system.
= f.label :sponsor_email
= f.email_field :sponsor_email, class: 'form-control'
%span.help-block
This will appear in the sponsor segment of the splash for the sponsors to contact to the organizers.
%h4
Social Media
%hr
.form-group
= f.label :social_tag
= f.text_field :social_tag, class: 'form-control'
%span.help-block
The hashtag you'll use on Twitter and Google+. Don't include the '#' sign!
= f.label :blog, 'Blog URL'
= f.url_field :blog, class: 'form-control'
%span.help-block
This will appear in the social media section as a link to your conference blog.
= f.label :facebook, 'Facebook URL'
= f.url_field :facebook, class: 'form-control'
%span.help-block
This will appear in the social media section as a link to the Facebook page of your Conference'
= f.label :googleplus, 'Google+ URL'
= f.url_field :googleplus, class: 'form-control'
%span.help-block
This will appear in the social media section as a link to the Google+ Page of your Conference'
= f.label :twitter, 'Twitter URL'
= f.url_field :twitter, class: 'form-control'
%span.help-block
This will appear in the social media section as a link to the Twitter Page of your Conference'
= f.label :instagram, 'Insta URL'
= f.url_field :instagram, class: 'form-control'
%span.help-block
This will appear in the social media section as a link to the Instagram Page of your Conference
= f.label :mastodon, 'Mastodon URL'
= f.url_field :mastodon, class: 'form-control'
%span.help-block
This will appear in the social media section as a link to the Mastodon Page of your Conference
= f.label :youtube, 'Youtube URL'
= f.url_field :youtube, class: 'form-control'
%span.help-block
This will appear in the social media section as a link to the YouTube channel for your conference.
= f.submit nil, class: 'btn btn-primary'

View File

@@ -1,16 +1,13 @@
.row
.col-md-12
.page-header
%h1
- if @difficulty_level.new_record?
New
Difficulty Level
= @difficulty_level.title
.row
.col-md-8
= semantic_form_for(@difficulty_level, url: (@difficulty_level.new_record? ? admin_conference_program_difficulty_levels_path : admin_conference_program_difficulty_level_path(@conference.short_title, @difficulty_level))) do |f|
= f.input :title, input_html: { autofocus: true }, required: true
= f.input :description, input_html: {rows: 3, class: 'span6'}
= f.input :color, input_html: {size: 6, type: 'color'}
%p.text-right
= f.action :submit, as: :button, button_html: { class: 'btn btn-primary' }
= form_for(@difficulty_level, url: (@difficulty_level.new_record? ? admin_conference_program_difficulty_levels_path : admin_conference_program_difficulty_level_path(@conference.short_title, @difficulty_level))) do |f|
.form-group
= f.label :title
%abbr{title: 'This field is required'} *
= f.text_field :title, autofocus: true , required: true, class: 'form-control'
.form-group
= f.label :description
= f.text_area :description, rows: 3, class: 'span6 form-control'
.form-group
= f.label :color
= f.color_field :color, class: 'form-control'
%p.text-right
= f.submit nil, class: 'btn btn-primary'

View File

@@ -0,0 +1,9 @@
.row
.col-md-12
.page-header
%h1
Edit Difficulty Level
= @difficulty_level.title
.row
.col-md-8
= render partial: 'form'

View File

@@ -0,0 +1,8 @@
.row
.col-md-12
.page-header
%h1
Create Difficulty Level
.row
.col-md-8
= render partial: 'form'

View File

@@ -1,6 +1,6 @@
.row
.col-md-8
= semantic_form_for(@settings, url: admin_conference_email_path(@conference.short_title, @conference.email_settings), html: {multipart: true}) do |f|
= form_for(@settings, url: admin_conference_email_path(@conference.short_title, @conference.email_settings), html: {multipart: true}) do |f|
.row
.col-md-12
%div{ role: 'tabpanel' }
@@ -19,43 +19,77 @@
/ Tab panes
.tab-content
#onboarding.tab-pane.active{ role: 'tabpanel' }
= f.input :send_on_registration, label: 'Send an email when the user registers for the conference?', input_html: {'data-name' => 'email_settings_registration_subject', 'class' => 'send_on_radio'}
= f.input :registration_subject
= f.input :registration_body, input_html: { rows: 10, cols: 20 }
.checkbox
%label
= f.check_box :send_on_registration, data: {name: 'email_settings_registration_subject'}, class: 'send_on_radio'
Send an email when the user registers for the conference?
.form-group
= f.label :registration_subject, 'Subject'
= f.text_field :registration_subject, class: 'form-control'
.form-group
= f.label :registration_body, 'Body'
= f.text_area :registration_body, rows: 10, cols: 20, class: 'form-control'
%a.btn.btn-link.control_label.load_template{ 'data-subject-input-id' => 'email_settings_registration_subject', 'data-subject-text' => 'Thank you for registering',
'data-body-input-id' => 'email_settings_registration_body',
'data-body-text' => "Dear {name},\n\nThank you for Registering for the conference {conference}.\nPlease complete your registration by filling out your travel information.\n\nIf you are unable to attend please unregister online:\n{registrationlink}\n\nFeel free to contact us with any questions or concerns.\nWe look forward to see you there.\n\nBest wishes\n\n{conference} Team" } Load Template
%a.btn.btn-link.control_label.template_help_link{ 'data-name' => 'registration_help' } Show Help
= render partial: 'help', locals: { id: 'registration_help', show_event_variables: false }
#proposal.tab-pane{ role: 'tabpanel' }
= f.input :send_on_submitted_proposal, label: 'Send an email when the proposal is submitted', input_html: { 'data-name' => 'email_settings_proposal_submited_subject', 'class' => 'send_on_radio' }
= f.input :submitted_proposal_subject
= f.input :submitted_proposal_body, input_html: { rows: 10, cols: 20 }
.checkbox
%label
= f.check_box :send_on_submitted_proposal, data: { name: 'email_settings_proposal_submited_subject'}, class: 'send_on_radio'
Send an email when the proposal is submitted
.form-group
= f.label :submitted_proposal_subject, 'Subject'
= f.text_field :submitted_proposal_subject, class: 'form-control'
.form-group
= f.label :submitted_proposal_body, 'Body'
= f.text_area :submitted_proposal_body, input_html: { rows: 10, cols: 20 }, class: 'form-control'
%a.btn.btn-link.control_label.load_template{ 'data-subject-input-id' => 'email_settings_submitted_proposal_subject', 'data-subject-text' => 'Your proposal has been submitted successfully', 'data-body-input-id' => 'email_settings_submitted_proposal_body', 'data-body-text' => "Dear {name}\n\nThank you for submitting your proposal {eventtitle}.\n\nOur team will review it and get back to you as soon as possible.\n\nFeel free to contact us with any questions or concerns.\n\nBest wishes\n\n{conference} Team" } Load Template
%a.btn.btn-link.control_label.template_help_link{ 'data-name' => 'submitted_proposal_help' } Show Help
= render partial: 'help', locals: { id: 'submitted_proposal_help', show_event_variables: true }
= f.input :send_on_accepted, label: 'Send an email when the proposal is accepted?', input_html: { 'data-name' => 'email_settings_accepted_subject', 'class' => 'send_on_radio' }
= f.input :accepted_subject
= f.input :accepted_body, input_html: { rows: 10, cols: 20 }
.checkbox
%label
= f.check_box :send_on_accepted, data: { name: 'email_settings_accepted_subject' }, class: 'send_on_radio'
Send an email when the proposal is accepted?
.form-group
= f.label :accepted_subject, 'Subject'
= f.text_field :accepted_subject, class: 'form-control'
.form-group
= f.label :accepted_body, 'Body'
= f.text_area :accepted_body, rows: 10, cols: 20, class: 'form-control'
%a.btn.btn-link.control_label.load_template{ 'data-subject-input-id' => 'email_settings_accepted_subject',
'data-subject-text' => 'Your submission has been accepted',
'data-body-input-id' => 'email_settings_accepted_body',
'data-body-text' => "Dear {name}\n\nWe are very pleased to inform you that your submission {eventtitle} has been accepted for the conference {conference}.\n\nThe public page of your submission can be found at:\n{proposalslink}\nIf you haven´t already registered for {conference}, please do as soon as possible:\n{registrationlink}\n\nFeel free to contact us with any questions or concerns.\n\nWe look forward to seeing you there.\n\nBest wishes\n\n{conference} Team" } Load Template
%a.btn.btn-link.control_label.template_help_link{ 'data-name' => 'accepted_help' } Show Help
= render partial: 'help', locals: { id: 'accepted_help', show_event_variables: true }
= f.input :send_on_rejected, label: 'Send an email when the proposal is rejected?', input_html: { 'data-name' => 'email_settings_rejected_subject', 'class' => 'send_on_radio' }
= f.input :rejected_subject
= f.input :rejected_body, input_html: { rows: 10, cols: 20 }
.checkbox
%label
= f.check_box :send_on_rejected, data: { name: 'email_settings_rejected_subject'}, class: 'send_on_radio'
Send an email when the proposal is rejected?
.form-group
= f.label :rejected_subject, 'Subject'
= f.text_field :rejected_subject, class: 'form-control'
.form-group
= f.label :rejected_body, 'Body'
= f.text_area :rejected_body, rows: 10, cols: 20, class: 'form-control'
%a.btn.btn-link.control_label.load_template{ 'data-subject-input-id' => 'email_settings_rejected_subject',
'data-subject-text' => 'Your submission has been rejected',
'data-body-input-id' => 'email_settings_rejected_body',
'data-body-text' => "Dear {name},\n\nThank you for your submission {eventtitle} for the conference {conference}.\nAfter careful consideration we are sorry to inform you that your submission has been rejected.\n\n\nBest wishes\n\n{conference} Team" } Load Template
%a.btn.btn-link.control_label.template_help_link{ 'data-name' => 'rejected_help' } Show Help
= render partial: 'help', locals: {id: 'rejected_help', show_event_variables: true}
= f.input :send_on_confirmed_without_registration, label: "Send an email when a user has a confirmed proposal, but isn't yet registered?", input_html: {'data-name' => 'email_settings_confirmed_without_registration_subject', 'class' => 'send_on_radio'}
= f.input :confirmed_without_registration_subject
= f.input :confirmed_without_registration_body, input_html: { rows: 10, cols: 20 }
.checkbox
%label
= f.check_box :send_on_confirmed_without_registration, data: {name: 'email_settings_confirmed_without_registration_subject'}, class: 'send_on_radio'
Send an email when a user has a confirmed proposal, but isn't yet registered?
.form-group
= f.label :confirmed_without_registration_subject, 'Subject'
= f.text_field :confirmed_without_registration_subject, class: 'form-control'
.form-group
= f.label :confirmed_without_registration_body, 'Body'
= f.text_area :confirmed_without_registration_body, rows: 10, cols: 20, class: 'form-control'
%a.btn.btn-link.control_label.load_template{ 'data-subject-input-id' => 'email_settings_confirmed_without_registration_subject',
'data-subject-text' => 'Your proposal has been confirmed without registration',
'data-body-input-id' => 'email_settings_confirmed_without_registration_body',
@@ -63,27 +97,48 @@
%a.btn.btn-link.control_label.template_help_link{ 'data-name' => 'confirmed_help' } Show Help
= render partial: 'help', locals: {id: 'confirmed_help', show_event_variables: true}
#notifications.tab-pane{ role: 'tabpanel' }
= f.input :send_on_conference_dates_updated, label: 'This is to notify all participants that the conference dates has been changed.', input_html: { 'data-name' => 'email_settings_conference_dates_updated_subject', 'class' => 'send_on_radio' }
= f.input :conference_dates_updated_subject
= f.input :conference_dates_updated_body, input_html: { rows: 10, cols: 20 }
.checkbox
%label
= f.check_box :send_on_conference_dates_updated, data: { name: 'email_settings_conference_dates_updated_subject'}, class: 'send_on_radio'
Send an email when to all participants if the conference dates are changed?
.form-group
= f.label :conference_dates_updated_subject, 'Subject'
= f.text_field :conference_dates_updated_subject, class: 'form-control'
.form-group
= f.label :conference_dates_updated_body, 'Body'
= f.text_area :conference_dates_updated_body, rows: 10, cols: 20, class: 'form-control'
%a.btn.btn-link.control_label.load_template{ 'data-subject-input-id' => 'email_settings_conference_dates_updated_subject',
'data-subject-text' => 'The dates of the conference have changed',
'data-body-input-id' => 'email_settings_conference_dates_updated_body',
'data-body-text' => "Dear {name},\n\nThe date of {conference} has changed.\n New Dates : {conference_start_date} - {conference_end_date}.\n\nFeel free to contact us with any questions or concerns.\n\nWe look forward to seeing you there.\n\nBest wishes\n\n{conference} Team" } Load Template
%a.btn.btn-link.control_label.template_help_link{ 'data-name' => 'updated_dates_help' } Show Help
= render partial: 'help', locals: {id: 'updated_dates_help', show_event_variables: false}
= f.input :send_on_conference_registration_dates_updated, label: 'This is to notify all participants that the conference registration dates has been changed.', input_html: {'data-name' => 'email_settings_conference_registration_dates_updated_subject', 'class' => 'send_on_radio'}
= f.input :conference_registration_dates_updated_subject
= f.input :conference_registration_dates_updated_body, input_html: { rows: 10, cols: 20 }
.checkbox
%label
= f.check_box :send_on_conference_registration_dates_updated, data: { name: 'email_settings_conference_registration_dates_updated_subject' }, class: 'send_on_radio'
Send an email when to all participants if the conference registration dates changed?
.form-group
= f.label :conference_registration_dates_updated_subject, 'Subject'
= f.text_field :conference_registration_dates_updated_subject, class: 'form-control'
.form-group
= f.label :conference_registration_dates_updated_body, 'Body'
= f.text_area :conference_registration_dates_updated_body, rows: 10, cols: 20, class: 'form-control'
%a.btn.btn-link.control_label.load_template{ 'data-subject-input-id' => 'email_settings_conference_registration_dates_updated_subject',
'data-subject-text' => 'The registration dates have changed',
'data-body-input-id' => 'email_settings_conference_registration_dates_updated_body',
'data-body-text' => "Dear {name},\n\nThe registration date of {conference} has changed.\n New Dates : {registration_start_date} - {registration_end_date}.\n\nFeel free to contact us with any questions or concerns.\n\nWe look forward to seeing you there.\n\nBest wishes\n\n{conference} Team" } Load Template
%a.btn.btn-link.control_label.template_help_link{ 'data-name' => 'updated_registrations_dates_help' } Show Help
= render partial: 'help', locals: {id: 'updated_registrations_dates_help', show_event_variables: false}
= f.input :send_on_venue_updated, label: 'Send an email on updating the Venue.', input_html: { 'data-name' => 'email_settings_venue_updated_subject', 'class' => 'send_on_radio' }
= f.input :venue_updated_subject
= f.input :venue_updated_body, input_html: { rows: 10, cols: 20 }
.checkbox
%label
= f.check_box :send_on_venue_updated, data: { name: 'email_settings_venue_updated_subject'}, class: 'send_on_radio'
Send an email on updating the Venue?
.form-group
= f.label :venue_updated_subject, 'Subject'
= f.text_field :venue_updated_subject, class: 'form-control'
.form-group
= f.label :venue_updated_body, 'Body'
= f.text_area :venue_updated_body, rows: 10, cols: 20, class: 'form-control'
%a.btn.btn-link.control_label.load_template{ 'data-subject-input-id' => 'email_settings_venue_updated_subject',
'data-subject-text' => 'The venue has changed',
'data-body-input-id' => 'email_settings_venue_updated_body',
@@ -91,18 +146,32 @@
%a.btn.btn-link.control_label.template_help_link{ 'data-name' => 'updated_venue_help' } Show Help
= render partial: 'help', locals: {id: 'updated_venue_help', show_event_variables: false}
#cfp.tab-pane{ role: 'tabpanel' }
= f.input :send_on_program_schedule_public, hint: 'This will notify all participants when the dates are updated or when the schedule is made public'
= f.input :program_schedule_public_subject, hint: 'This subject will used whenever dates are updated or when the schedule is made public'
= f.input :program_schedule_public_body, input_html: { rows: 10, cols: 20 }
.checkbox
%labl
= f.check_box :send_on_program_schedule_public
Send an email when to all participants if the schedule is made public?
.form-group
= f.label :program_schedule_public_subject, 'Subject'
= f.text_field :program_schedule_public_subject, class: 'form-control'
.form-group
= f.label :program_schedule_public_body, 'Body'
= f.text_area :program_schedule_public_body, rows: 10, cols: 20, class: 'form-control'
%a.btn.btn-link.control_label.load_template{ 'data-subject-input-id' => 'email_settings_program_schedule_public_subject',
'data-subject-text' => 'The schedule has been released',
'data-body-input-id' => 'email_settings_program_schedule_public_body',
'data-body-text' => "Dear {name},\n\nThe schedule for {conference} has been announced.\nLink to Schedule {schedule_link}\n\nBest wishes\n{conference} Team" } Load Template
%a.btn.btn-link.control_label.template_help_link{ 'data-name' => 'updated_cfp_help' } Show Help
= render partial: 'help', locals: {id: 'updated_cfp_help', show_event_variables: false}
= f.input :send_on_cfp_dates_updated, hint: 'This will notify all participants when the dates are updated or when the schedule is made public'
= f.input :cfp_dates_updated_subject, hint: 'This subject will used whenever dates are updated or when the schedule is made public'
= f.input :cfp_dates_updated_body, input_html: { rows: 10, cols: 20 }
.checkbox
%label
= f.check_box :send_on_cfp_dates_updated
Send an email when to all participants if call for paper dates are updated?
.form-group
= f.label :cfp_dates_updated_subject, 'Subject'
= f.text_field :cfp_dates_updated_subject, class: 'form-control'
.form-group
= f.label :cfp_dates_updated_body, 'Body'
= f.text_area :cfp_dates_updated_body, rows: 10, cols: 20, class: 'form-control'
%a.btn.btn-link.control_label.load_template{ 'data-subject-input-id' => 'email_settings_cfp_dates_updated_subject',
'data-subject-text' => 'The Call for Papers dates have changed',
'data-body-input-id' => 'email_settings_cfp_dates_updated_body',
@@ -110,18 +179,30 @@
%a.btn.btn-link.control_label.template_help_link{ 'data-name' => 'updated_cfp_help' } Show Help
= render partial: 'help', locals: {id: 'updated_cfp_help', show_event_variables: false}
#booth.tab-pane{ role: 'tabpanel' }
= f.input :send_on_booths_acceptance
= f.input :booths_acceptance_subject
= f.input :booths_acceptance_body, input_html: { rows:10, cols: 20 }
.check_box
%label
= f.check_box :send_on_booths_acceptance
.form-group
= f.label :booths_acceptance_subject, 'Subject'
= f.text_field :booths_acceptance_subject, class: 'form-control'
.form-group
= f.label :booths_acceptance_body, 'Body'
= f.text_area :booths_acceptance_body, rows:10, cols: 20, class: 'form-control'
%a.btn.btn-link.control_label.load_template{ 'data-subject-input-id' => 'email_settings_booths_acceptance_subject',
'data-subject-text' => "Your #{t'booth'} has been accepted!",
'data-body-input-id' => 'email_settings_booths_acceptance_body',
'data-body-text' => "Dear {name},\n\nWe are pleased to inform you that your #{t'booth'} request {booth_title} has been accepted for the conference {conference}.\nPlease click the confirm button to let us know you can make it as soon as possible!\n\nFeel free to contact us with any questions or concerns.\n\nWe are looking forward to seeing you there.\n\nBest wishes\n\n{conference} Team"} Load Template
%a.btn.btn-link.control_label.template_help_link{ 'data-name' => 'booth_acceptance_help' } Show help
= render partial: 'help', locals: {id: 'booth_acceptance_help', show_event_variables: false}
= f.input :send_on_booths_rejection
= f.input :booths_rejection_subject
= f.input :booths_rejection_body, input_html: { rows:10, cols:20 }
.checkbox
%label
= f.check_box :send_on_booths_rejection
.form-group
= f.label :booths_rejection_subject, 'Subject'
= f.text_field :booths_rejection_subject, class: 'form-control'
.form-group
= f.label :booths_rejection_body, 'Body'
= f.text_area :booths_rejection_body, rows:10, cols:20, class: 'form-control'
%a.btn.btn-link.control_label.load_template{ 'data-subject-input-id' => 'email_settings_booths_rejection_subject',
'data-subject-text' => "Your #{t'booth'} request has been rejected",
'data-body-input-id' => 'email_settings_booths_rejection_body',
@@ -131,4 +212,4 @@
.row
.col-md-12
= f.action :submit, as: :button, button_html: { class: 'btn btn-primary' }
= f.submit nil, { class: 'btn btn-primary' }

View File

@@ -1,19 +1,29 @@
.row
.col-md-12
.page-header
%h1
- if @event_type.new_record?
New
Event Type
= @event_type.title
.row
.col-md-12
= semantic_form_for(@event_type, url: (@event_type.new_record? ? admin_conference_program_event_types_path : admin_conference_program_event_type_path(@conference.short_title, @event_type))) do |f|
= f.input :title, input_html: { autofocus: true }
= f.input :length, input_html: {size: 3, type: 'number', step: @event_type.program.schedule_interval, min: @event_type.program.schedule_interval}
= f.input :description
= f.input :minimum_abstract_length, input_html: {size: 3}
= f.input :maximum_abstract_length, input_html: {size: 3}
= f.input :color, input_html: { size: 6, type: 'color' }
%p.text-right
= f.action :submit, as: :button, button_html: { class: 'btn btn-primary' }
= form_for(@event_type, url: (@event_type.new_record? ? admin_conference_program_event_types_path : admin_conference_program_event_type_path(@conference.short_title, @event_type))) do |f|
.form-group
= f.label :title
%abbr{title: 'This field is required'} *
= f.text_field :title, autofocus: true, required: true, class: 'form-control'
.form-group
= f.label :length
= f.number_field :length, size: 3, step: @event_type.program.schedule_interval, min: @event_type.program.schedule_interval, class: 'form-control'
%span.help-block
In steps of
= @event_type.program.schedule_interval
and minimum
= @event_type.program.schedule_interval
.form-group
= f.label :description
= f.text_field :description, class: 'form-control'
.form-group
= f.label :minimum_abstract_length
%abbr{title: 'This field is required'} *
= f.number_field :minimum_abstract_length, size: 3, required: true, class: 'form-control'
.form-group
= f.label :maximum_abstract_length
%abbr{title: 'This field is required'} *
= f.number_field :maximum_abstract_length, size: 3, required: true, class: 'form-control'
.form-group
= f.label :color
= f.color_field :color, class: 'form-control'
%p.text-right
= f.submit nil, class: 'btn btn-primary'

View File

@@ -0,0 +1,9 @@
.row
.col-md-12
.page-header
%h1
Edit Event Type
= @event_type.title
.row
.col-md-8
= render partial: 'form'

View File

@@ -0,0 +1,8 @@
.row
.col-md-12
.page-header
%h1
Create Event Type
.row
.col-md-8
= render partial: 'form'

View File

@@ -6,8 +6,9 @@
%div
%a.pull-right.comment-reply-link{ href: '#' } Reply
.comment-reply
= semantic_form_for :comment, url: comment_admin_conference_program_event_path(@conference.short_title, comment.commentable_id), method: :post do |f|
= f.input :body
= form_for :comment, url: comment_admin_conference_program_event_path(@conference.short_title, comment.commentable_id), method: :post do |f|
.form-group
= f.text_area :body, class: 'form-control'
%input{ name: 'parent', type: 'hidden', value: comment.id }
%input{ name: 'authenticity_token', type: 'hidden', value: '#{form_authenticity_token}' }
%button.btn.btn-primary.pull-right{ name: 'button', type: 'submit' } Add Reply

View File

@@ -122,17 +122,19 @@
- cache [@conference, @event, @comments] do
.row
= link_to "Comments (#{@comment_count})", '#', id: 'event-comment-link'
#comments-div
.col-md-12
%h4
Comments
= "(#{@comment_count})"
= link_to('#comment-collapse', class: 'btn btn-link', role: 'button', data: {toggle: "collapse" }) do
Show
%hr
%ul.media
%div
.row-fluid
= semantic_form_for :comment, url: comment_admin_conference_program_event_path(@conference.short_title, @event.id), method: :post do |f|
= f.input :body
= f.submit 'Add Comment', class: 'btn btn-primary pull-right'
%br
%br
- @comments.each do |comment|
%div
= render partial: 'nested_comments', locals: { comment: comment, padding: 0}
.collapse#comment-collapse
- @comments.each do |comment|
= render partial: 'nested_comments', locals: { comment: comment, padding: 0}
= form_for(:comment, url: comment_admin_conference_program_event_path(@conference.short_title, @event.id), method: :post) do |f|
.form-group
= f.text_area :body, class: 'form-control'
.text-right
= f.submit nil, class: 'btn btn-primary'

View File

@@ -28,21 +28,21 @@
.modal-dialog
.modal-content
.modal-header
%h1 Add commercials to events
.text-muted
Upload your file with data in the following format:
%b Event_ID:Commercial_Link
, eg.
%br
%b 11:https://youtube.com/myvideo
%h1
Add commercials to events
.modal-body
= semantic_form_for '',
url: mass_upload_commercials_admin_conference_program_path(@conference.short_title),
method: :post do |f|
= f.input 'file', as: :file
= form_for('', url: mass_upload_commercials_admin_conference_program_path(@conference.short_title), method: :post) do |f|
.form-group
= f.file_field 'file', as: :file
%span.help-block
Upload your file with data in the following format:
%b Event_ID:Commercial_Link
for instance:
%pre
11:https://youtube.com/myvideo
23:https://vimeo.com/myvideo
.modal-footer
= f.submit 'Add', class: 'btn btn-primary'
= f.submit nil, class: 'btn btn-primary'
.row
.col-md-4
= render 'donut_chart', title: 'Events state',

View File

@@ -1,19 +1,20 @@
.row
.col-md-12
.page-header
%h1
- if @lodging.new_record?
New
Lodging
= @lodging.name
.row
.col-md-8
= semantic_form_for(@lodging, url: (@lodging.new_record? ? admin_conference_lodgings_path : admin_conference_lodging_path(@conference.short_title, @lodging))) do |f|
= f.input :name, input_html: { autofocus: true}
= f.input :website_link, input_html: { type: :url }
= f.input :description, input_html: { rows: 5, cols: 20, data: { provide: 'markdown' } }, hint: markdown_hint
- if @lodging.picture?
= image_tag @lodging.picture.thumb.url
= f.input :picture
%p.text-right
= f.action :submit, as: :button, button_html: { class: 'btn btn-primary' }
= form_for(@lodging, url: (@lodging.new_record? ? admin_conference_lodgings_path : admin_conference_lodging_path(@conference.short_title, @lodging))) do |f|
.form-group
= f.label :name
%abbr{title: 'This field is required'} *
= f.text_field :name, require: true, autofocus: true, class: 'form-control'
.form-group
= f.label :website_link
= f.url_field :website_link, class: 'form-control'
.form-group
= f.label :description
= f.text_area :description, rows: 5, cols: 20, data: { provide: 'markdown' }, class: 'form-control'
%span.help-block
= markdown_hint
.form-group
- if @lodging.picture?
= image_tag @lodging.picture.thumb.url
= f.label :picture
= f.file_field :picture, class: 'form-control'
%p.text-right
= f.submit nil, { class: 'btn btn-primary' }

View File

@@ -0,0 +1,9 @@
.row
.col-md-12
.page-header
%h1
Edit Lodging
= @lodging.name
.row
.col-md-8
= render partial: 'form'

View File

@@ -0,0 +1,8 @@
.row
.col-md-12
.page-header
%h1
Create Lodging
.row
.col-md-8
= render partial: 'form'

View File

@@ -1,20 +1,22 @@
= semantic_form_for(@organization, url: (@organization.new_record? ? admin_organizations_path : admin_organization_path(@organization))) do |f|
= f.inputs name: 'Organization details' do
= f.input :name, as: :string, required: true
= f.input :description, as: :text,
input_html: { rows: 10, data: { provide: 'markdown' } },
hint: markdown_hint,
placeholder: 'Decribe about your organization...'
= f.input :code_of_conduct, as: :text,
input_html: { rows: 10, data: { provide: 'markdown' } },
hint: markdown_hint,
placeholder: 'Rules governing behavior and dispute resolution...'
= form_for(@organization, url: (@organization.new_record? ? admin_organizations_path : admin_organization_path(@organization))) do |f|
.form-group
= f.label :name, "Name"
%abbr{title: 'This field is required'} *
= f.text_field :name, required: true, class: 'form-control', placeholder: 'Name'
.form-group
= f.text_area :description, rows: 10, data: { provide: 'markdown' }, class: 'form-control', placeholder: 'Decribe about your organization...'
%span.help-block
= markdown_hint
.form-group
= f.text_area :code_of_conduct, rows: 10, data: { provide: 'markdown' }, class: 'form-control', placeholder: 'Rules governing behavior and dispute resolution...'
%span.help-block
= markdown_hint
.form-group
= image_tag f.object.picture.thumb.url if f.object.picture?
- if @organization.picture?
= image_tag(@organization.picture.thumb.url, width: '20%')
= f.input :picture
= f.file_field :picture
%p.text-right
- if @organization.new_record?
= f.submit 'Create Organization', class: 'btn btn-success'
- else
= f.submit 'Update Organization', class: 'btn btn-success'
%button{type: 'submit', class: 'btn btn-success'}
- if @organization.new_record?
Create Organization
- else
Update Organization

View File

@@ -0,0 +1,9 @@
.row
.col-md-12
.page-header
%h1
Edit Organization
= @organization.name
.row
.col-md-8
= render partial: 'form'

View File

@@ -0,0 +1,8 @@
.row
.col-md-12
.page-header
%h1
Create Organization
.row
.col-md-8
= render partial: 'form'

View File

@@ -8,15 +8,11 @@
.row.col-md-3
- if ( can? :assign_org_admins, @organization )
= semantic_form_for :user,
url: assign_org_admins_admin_organization_path(@organization,
@role.name), method: :post do |u|
= u.label 'Add user by email: '
.input-group
= u.input :email, label: false, placeholder: "User's email"
.input-group-btn
= u.submit 'Add', id: 'user-add', class: 'btn btn-primary'
= form_for :user, url: assign_org_admins_admin_organization_path(@organization, @role.name), method: :post do |f|
.form-group
= f.label :email, 'Add user by email: '
= f.text_field :email, placeholder: "User's email", class: 'form-control', required: true
= f.submit 'Add', id: 'user-add', class: 'btn btn-primary'
.row
.col-md-12

View File

@@ -1,17 +1,51 @@
.row
.col-md-12
.page-header
%h1 Program
.row
.col-md-8
= semantic_form_for(@program, url: admin_conference_program_path(@conference.short_title), html: {multipart: true}) do |f|
= f.input :schedule_public, label: 'Show Schedule on the home and splash page'
= f.input :schedule_fluid, label: 'Allow submitters to change their event after it is scheduled'
= f.input :rating, hint: 'Enter the number of different rating levels you want to have for voting on proposals. Enter 0 if you do not want to vote on proposals.'
= f.input :languages, hint: "Enter the languages allowed for events as values of #{link_to('ISO 639-1', 'http://www.loc.gov/standards/iso639-2/php/code_list.php', target: "_blank")} language codes separated with commas. The first language would be the default language. Leave it blank if you do not want to specify languages.".html_safe
= f.input :schedule_interval, input_html: { autofocus: true }, hint: "It is the minimal time interval of your schedule. The value should be 5, 6, 10, 12, 15, 20, 30 or 60. Warning! Some events could be unscheduled when changing this value."
= f.input :blind_voting, hint: 'Enable this feature if you do not want to show voting results and voters prior to user submitting a vote. For the feature to work you need to set the voting dates below as well'
= f.input :voting_start_date, as: :string, input_html: { id: 'datetimepicker-voting_start_date', value: (f.object.voting_start_date.to_formatted_s(:db_without_seconds) unless f.object.voting_start_date.nil?) }
= f.input :voting_end_date, as: :string, input_html: { id: 'datetimepicker-voting_end_date', value: (f.object.voting_end_date.to_formatted_s(:db_without_seconds) unless f.object.voting_end_date.nil?) }
%p.text-right
= f.action :submit, as: :button, button_html: {class: 'btn btn-primary'}
= form_for(@program, url: admin_conference_program_path(@conference.short_title), html: {multipart: true}) do |f|
.checkbox
%label
= f.check_box :schedule_public
Show Schedule on the home and splash page
.checkbox
%label
= f.check_box :schedule_fluid
Allow submitters to change their event after it is scheduled
%h4
Voting
%hr
.form-group
= f.label :rating
= f.number_field :rating, class: 'form-control'
%span.help-block
Enter the number of different rating levels you want to have for voting on proposals.
Enter 0 if you do not want to vote on proposals.
.checkbox
%label
= f.check_box :blind_voting
Enable blind voting
%span.help-block
If you do not want to show other peoples votes prior to submitting a vote.
For the feature to work you need to set the voting dates below as well
.form-group
= f.label :voting_start_date
= f.text_field :voting_start_date, id: 'datetimepicker-voting_start_date', value: (f.object.voting_start_date.to_formatted_s(:db_without_seconds) unless f.object.voting_start_date.nil?), class: 'form-control'
= f.label :voting_end_date
= f.text_field :voting_end_date, id: 'datetimepicker-voting_end_date', value: (f.object.voting_end_date.to_formatted_s(:db_without_seconds) unless f.object.voting_end_date.nil?), class: 'form-control'
%h4
Languages
%hr
%p
Current Languages:
- if f.object.languages.present?
= f.object.languages_list.to_sentence
- else
Any Language
.form-group
= f.label :languages
= f.select :languages, I18nData.languages.invert, { include_blank: 'Any Language', include_hidden: false }, { multiple: true, class: 'form-control' }
%span.help-block
The languages allowed for events.
.form-group
= f.number_field :schedule_interval, autofocus: true, class: 'form-control'
%span.help-block
It is the minimal time interval of your schedule. The value should be 5, 6, 10, 12, 15, 20, 30 or 60.
Warning! Some events could be unscheduled when changing this value.
%p.text-right
= f.submit nil, class: 'btn btn-primary'

View File

@@ -0,0 +1,8 @@
.row
.col-md-12
.page-header
%h1
Edit Program
.row
.col-md-8
= render partial: 'form'

View File

@@ -0,0 +1,8 @@
.row
.col-md-12
.page-header
%h1
Create Program
.row
.col-md-8
= render partial: 'form'

View File

@@ -34,7 +34,10 @@
%dt
Languages:
%dd
= @program.languages
- if @program.languages.present?
= @program.languages_list.to_sentence
- else
Any Language
%dt
Public Schedule
%dd#schedule_public

View File

@@ -1,4 +1,3 @@
.nested-fields
= f.inputs do
= f.input :title
= remove_association_link :answer, f
= f.text_field :title
= remove_association_link :answer, f

View File

@@ -1,10 +1,17 @@
.row
.col-md-6
%legend Question
= f.input :title, label: 'Your Question'
= f.input :question_type
= f.input :global, label: 'Make Global',
hint: '(Global questions are available for selection to all conferences)'
.form-group
= f.label :title, 'Your Question'
= f.text_field :title, class: 'form-control'
.form-group
= f.select :question_type_id, QuestionType.all.pluck(:title, :id), {}, { class: 'form-control' }
.checkbox
%label
= f.check_box :global
Make Global
%span.help-block
Global questions are available for selection to all conferences
.col-md-6.hidden{id: 'answers_col'}
= dynamic_association :answers, 'Answers', f,
hint: 'Insert your answers in the order you want them to appear'

View File

@@ -2,8 +2,6 @@
Edit Question
%h3
"#{@question.title}"
= semantic_form_for(@question, url: admin_conference_question_path(@conference.short_title, @question.id)) do |f|
= form_for(@question, url: admin_conference_question_path(@conference.short_title, @question.id)) do |f|
= render partial: 'form', locals: {f: f}
= f.submit 'Save', class: 'btn btn-primary', confirm: 'Are you sure you want to make these changes?'

View File

@@ -11,7 +11,7 @@
.row
.col-md-12
- if @questions.count > 0
= semantic_form_for(@conference, url: update_conference_admin_conference_questions_path(@conference.short_title)) do |f|
= form_for(@conference, url: update_conference_admin_conference_questions_path(@conference.short_title)) do |f|
.questions{id: 'myquestions'}
= render partial: 'questions'
- if can? :update, Question.new(conference_id: @conference.id)
@@ -25,7 +25,7 @@
%h3{id: 'new-question-header'}
Add new question
.modal-body
= semantic_form_for(@new_question, url: admin_conference_questions_path(@conference.short_title), method: :post) do |f|
= form_for(@new_question, url: admin_conference_questions_path(@conference.short_title), method: :post) do |f|
= render partial: 'form', locals: {f: f}
%button{class: 'btn btn-primary'}
Save

View File

@@ -1,11 +1,11 @@
.row
.col-md-12
.page-header
%h1 Registration Period
.row
.col-md-8
= semantic_form_for(@registration_period, url: admin_conference_registration_period_path(@conference.short_title)) do |f|
= f.input :start_date, as: :string, input_html: { id: 'registration-period-start-datepicker', start_date: @conference.start_date, end_date: @conference.end_date }
= f.input :end_date, as: :string, input_html: { id: 'registration-period-end-datepicker' }
%p.text-right
= f.submit 'Save Registration Period', class: 'btn btn-primary'
= form_for(@registration_period, url: admin_conference_registration_period_path(@conference.short_title)) do |f|
.form-group
= f.label :start_date
%abbr{title: 'This field is required'} *
= f.text_field :start_date, required: true, 'data-end-conference': @conference.end_date.to_s, id: 'registration-period-start-datepicker', class: 'form-control'
.form-group
= f.label :end_date
%abbr{title: 'This field is required'} *
= f.text_field :end_date, required: true, id: 'registration-period-end-datepicker', class: 'form-control'
%p.text-right
= f.submit 'Save Registration Period', class: 'btn btn-primary'

View File

@@ -0,0 +1,8 @@
.row
.col-md-12
.page-header
%h1
Edit Registration Period
.row
.col-md-8
= render partial: 'form'

View File

@@ -0,0 +1,8 @@
.row
.col-md-12
.page-header
%h1
New Registration Period
.row
.col-md-8
= render partial: 'form'

View File

@@ -7,12 +7,20 @@
= link_to 'Edit User', edit_admin_user_path(@user), class: 'btn btn-primary pull-right' if can? :edit, @user
.row
.col-md-6
= semantic_form_for(@registration, url: admin_conference_registration_path(@conference.short_title, @registration)) do |f|
= f.inputs 'Personal Information' do
= semantic_fields_for :user do |u|
= u.input :name, as: :string
= u.input :nickname, as: :string
= u.input :affiliation, placeholder: 'Company/User Group/nothing', as: :string
= f.inputs 'Registration Information' do
= form_for(@registration, url: admin_conference_registration_path(@conference.short_title, @registration)) do |f|
%h4
Personal Information
%hr
= fields_for :user do |u|
.form-group
= u.label :name
= u.text_field :name, class: 'form-control'
= u.label :nickname
= u.text_field :nickname, class: 'form-control'
= u.label :affiliation
= u.text_field :affiliation, placeholder: 'Company/User Group etc.', class: 'form-control'
%h4
Registration Information
%hr
= render partial: 'conference_registrations/registration_info', locals: { f: f }
= f.action :submit, button_html: { class: 'btn btn-primary' }
= f.submit nil, class: 'btn btn-primary'

View File

@@ -1,16 +1,20 @@
.row
.col-md-12
.page-header
%h1
- if @resource.new_record?
New
Resource
.row
.col-md-8
= semantic_form_for(@resource, :url => (@resource.new_record? ? admin_conference_resources_path : admin_conference_resource_path(@conference.short_title, @resource))) do |f|
= f.input :name, input_html: { autofocus: true }
= f.input :description, input_html: { rows: 5, data: { provide: 'markdown' } }
= f.input :used
= f.input :quantity
%p.text-right
= f.action :submit, as: :button, button_html: { class: 'btn btn-primary' }
= form_for(@resource, :url => (@resource.new_record? ? admin_conference_resources_path : admin_conference_resource_path(@conference.short_title, @resource))) do |f|
.form-group
= f.label :name
%abbr{title: 'This field is required'} *
= f.text_field :name, required: true, autofocus: true, class: 'form-control'
.form-group
= f.label :description
= f.text_area :description, rows: 5, data: { provide: 'markdown' }, class: 'form-control'
%span.help-block
= markdown_hint
.form-group
= f.label :used
%abbr{title: 'This field is required'} *
= f.number_field :used, required: true, class: 'form-control'
.form-group
= f.label :quantity
%abbr{title: 'This field is required'} *
= f.number_field :quantity, required: true, class: 'form-control'
%p.text-right
= f.submit nil, { class: 'btn btn-primary' }

View File

@@ -0,0 +1,9 @@
.row
.col-md-12
.page-header
%h1
Edit Resource
= @resource.name
.row
.col-md-8
= render 'form'

View File

@@ -1 +1,8 @@
= render 'form'
.row
.col-md-12
.page-header
%h1
Create Resource
.row
.col-md-8
= render 'form'

View File

@@ -1,15 +1,5 @@
.row
.col-md-12
.page-header
%h2
Role
= @role.name.titleize
.text-muted
= @role.description
= semantic_form_for @role, url: @url do |f|
.row
.col-md-5
= f.input :description, input_html: { autofocus: true }
= f.action :submit, as: :button, button_html: { class: 'btn btn-primary' }
= form_for @role, url: @url do |f|
.form-group
= f.label :description
= f.text_field :description, autofocus: true, class: 'form-control'
= f.submit nil, { class: 'btn btn-primary' }

View File

@@ -0,0 +1,11 @@
.row
.col-md-12
.page-header
%h2
Role
= @role.name.titleize
.text-muted
= @role.description
.row
.col-md-5
= render partial: 'form'

View File

@@ -17,16 +17,15 @@
= link_to @track.name, admin_conference_program_track_path(@conference.short_title, @track)
.row.col-md-3
- if ( can? :toggle_user, @role ) && !@role.new_record?
.row
.col-md-3
- if ( can? :toggle_user, @role ) && !@role.new_record?
= semantic_form_for :user, url: @url, method: :post do |u|
= u.label 'Add user by email: '
.input-group
= u.input :email, input_html: { autofocus: true }, label: false, placeholder: "User's email"
.input-group-btn
= u.submit 'Add', id: 'user-add', class: 'btn btn-primary'
= form_for :user, url: @url, method: :post do |f|
.form-group
= f.label :email, 'Add user by email: '
= f.email_field :email, autofocus: true, placeholder: "User's email", class: 'form-control'
= f.submit 'Add', id: 'user-add', class: 'btn btn-primary'
.row
.col-md-12

View File

@@ -1,15 +1,9 @@
.row
.col-md-12
.page-header
%h1
- if @room.new_record?
New
Room
= @room.name
.row
.col-md-8
= semantic_form_for(@room, url: (@room.new_record? ? admin_conference_venue_rooms_path : admin_conference_venue_room_path(@conference.short_title, @room))) do |f|
= f.input :name, input_html: { autofocus: true }
= f.input :size, label: 'Capacity', input_html: {size: 5}
%p.text-right
= f.action :submit, as: :button, button_html: { class: 'btn btn-primary' }
= form_for(@room, url: (@room.new_record? ? admin_conference_venue_rooms_path : admin_conference_venue_room_path(@conference.short_title, @room))) do |f|
.form-group
= f.label :name
%abbr{title: 'This field is required'} *
= f.text_field :name, autofocus: true, required: true, class: 'form-control'
= f.label :size, 'Capacity'
= f.number_field :size, size: 5, class: 'form-control'
%p.text-right
= f.submit nil, class: 'btn btn-primary'

View File

@@ -0,0 +1,9 @@
.row
.col-md-12
.page-header
%h1
Edit Room
= @room.name
.row
.col-md-8
= render partial: 'form'

View File

@@ -0,0 +1,8 @@
.row
.col-md-12
.page-header
%h1
New Room
.row
.col-md-8
= render partial: 'form'

View File

@@ -5,6 +5,8 @@
New Track Schedule
.row
.col-md-12
= semantic_form_for @schedule, url: admin_conference_schedules_path(@conference.short_title) do |f|
= f.input :track, collection: Track.accessible_by(current_ability).where(program: @program).self_organized.confirmed.pluck(:name, :id), include_blank: false
= f.action :submit, as: :button, button_html: { class: 'btn btn-primary' }
= form_for @schedule, url: admin_conference_schedules_path(@conference.short_title) do |f|
.form-group
= f.select :track, Track.accessible_by(current_ability).where(program: @program).confirmed.pluck(:name, :id), { include_blank: false }, { class: 'form-control' }
= f.submit nil, class: 'btn btn-primary'

View File

@@ -1,66 +1,71 @@
.row
.col-md-12
.page-header
%h1 Splashpage
= semantic_form_for(@splashpage, url: admin_conference_splashpage_path(@conference.short_title)) do |f|
.row
.col-md-12
= f.inputs name: 'Components' do
%ul.fa-ul
%li
%th
%button.btn.btn-default#select-all{ type: "button" }
Select All
%th
%button.btn.btn-default#unselect-all{ type: "button" }
Unselect All
%li
= f.input :include_cfp, label: 'Display call for papers and call for tracks, while open', input_html: { checked: params[:action] == 'new' || @splashpage.try(:include_cfp) }
%li
= f.input :include_program, label: 'Display the program', input_html: { checked: params[:action] == 'new' || @splashpage.try(:include_program) }
%ul.fa-ul
%li
= f.input :include_tracks, label: 'Include confirmed tracks', input_html: { checked: params[:action] == 'new' || @splashpage.try(:include_tracks) }
%li
= f.input :include_booths, label: "Include confirmed #{(t'booth').pluralize}", input_html: { checked: params[:action] == 'new' || @splashpage.try(:include_booths) }
%li
= f.input :include_registrations, label: 'Display the registration period', input_html: { checked: params[:action] == 'new' || @splashpage.try(:include_registrations) }
%li
= f.input :include_tickets, label: 'Display tickets', input_html: { checked: params[:action] == 'new' || @splashpage.try(:include_tickets) }
%li
= f.input :include_venue, label: 'Display the venue', input_html: { checked: params[:action] == 'new' || @splashpage.try(:include_venue) }
%li
= f.input :include_lodgings, label: 'Display the lodgings', input_html: { checked: params[:action] == 'new' || @splashpage.try(:include_lodgings) }
%li
= f.input :include_sponsors, label: 'Display sponsors', input_html: { checked: params[:action] == 'new' || @splashpage.try(:include_sponsors) }
%li
= f.input :include_social_media, label: 'Display social media links', input_html: { checked: params[:action] == 'new' || @splashpage.try(:include_social_media) }
= f.inputs name: 'Access' do
%ul.fa-ul
%li
= f.input :public, label: 'Make splash page public?'
.row
.col-md-12
%p.text-right
= f.submit 'Save Changes', class: 'btn btn-primary'
= form_for(@splashpage, url: admin_conference_splashpage_path) do |f|
.checkbox
%label
= f.check_box :include_cfp
Display call for papers and call for tracks?
.checkbox
%label
= f.check_box :include_program
Display the program?
.checkbox
%label
= f.check_box :include_tracks
Include confirmed tracks in the program?
.checkbox
%label
= f.check_box :include_booths
Include confirmed
= (t'booth').pluralize
in the program?
.checkbox
%label
= f.check_box :include_registrations
Display the registration period?
.checkbox
%label
= f.check_box :include_tickets
Display the tickets?
.checkbox
%label
= f.check_box :include_venue
Display the venue?
.checkbox
%label
= f.check_box :include_lodgings
Display the lodgings?
.checkbox
%label
= f.check_box :include_sponsors
Display the sponsors?
.checkbox
%label
= f.check_box :include_social_media
Display the social media links?
%h4
Access
%hr
.checkbox
%label
= f.check_box :public
Make splash page public?
.text-right
.checkbox
%label
= check_box_tag 'selectAll'
Select / Deselect All
= f.submit 'Save', { class: 'btn btn-primary' }
:javascript
$(document).ready(function(){
$('#select-all').click(function(event) {
var parent = $(this).parents('.inputs:last');
parent.find('.input.checkbox input[type=checkbox]').prop('checked',true);
});
$('#unselect-all').click(function(event) {
var parent = $(this).parents('.inputs:last');
parent.find('.input.checkbox input[type=checkbox]').prop('checked',false);
});
$('#selectAll').click(function() {
if (this.checked) {
$(':checkbox').each(function() {
this.checked = true;
});
} else {
$(':checkbox').each(function() {
this.checked = false;
});
}
});
});

View File

@@ -0,0 +1,8 @@
.row
.col-md-12
.page-header
%h1
Configure Splashpage
.row
.col-md-8
= render partial: 'form'

View File

@@ -0,0 +1,8 @@
.row
.col-md-12
.page-header
%h1
Configure Splashpage
.row
.col-md-8
= render partial: 'form'

View File

@@ -55,7 +55,7 @@
.row
.col-md-12
- if can? :update, @splashpage
= link_to 'Edit', edit_admin_conference_splashpage_path, class: 'btn btn-primary'
= link_to 'Configure', edit_admin_conference_splashpage_path, class: 'btn btn-primary'
- if can? :destroy, @splashpage
= link_to 'Delete', admin_conference_splashpage_path,
method: :delete, data: { confirm: 'Are you sure?' }, class: 'btn btn-danger'

View File

@@ -1,19 +1,23 @@
.row
.col-md-12
.page-header
%h1
-if @sponsor.new_record?
New
Sponsor
= @sponsor.name
.row
.col-md-8
= semantic_form_for(@sponsor, url: (@sponsor.new_record? ? admin_conference_sponsors_path : admin_conference_sponsor_path(@conference.short_title, @sponsor))) do |f|
= f.input :name, input_html: { autofocus: true }
= f.input :description, input_html: { rows: 5, cols: 20, data: { provide: 'markdown' } }, hint: markdown_hint
= image_tag f.object.picture.thumb.url if f.object.picture?
= f.input :picture
= f.input :website_url
= f.input :sponsorship_level, collection: @conference.sponsorship_levels
%p.text-right
= f.action :submit, as: :button, button_html: { class: 'btn btn-primary' }
= form_for(@sponsor, url: (@sponsor.new_record? ? admin_conference_sponsors_path : admin_conference_sponsor_path(@conference.short_title, @sponsor))) do |f|
.form-group
= f.label :name
%abbr{title: 'This field is required'} *
= f.text_field :name, required: true, autofocus: true, class: 'form-control'
.form-group
= f.label :description
= f.text_area :description, rows: 5, cols: 20, data: { provide: 'markdown' }, class: 'form-control'
%span.help-block
= markdown_hint
.form-group
= f.label :picture
= image_tag f.object.picture.thumb.url if f.object.picture?
= f.file_field :picture
.form-group
= f.label :website_url
%abbr{title: 'This field is required'} *
= f.url_field :website_url, required: true, class: 'form-control'
.form-group
= f.label :sponsorship_level_id, 'Level'
= f.select :sponsorship_level_id, @conference.sponsorship_levels.pluck(:title, :id), { include_blank: false }, { class: 'form-control' }
%p.text-right
= f.submit nil, class: 'btn btn-primary'

View File

@@ -0,0 +1,9 @@
.row
.col-md-12
.page-header
%h1
Edit Sponsor
= @sponsor.name
.row
.col-md-8
= render partial: 'form'

View File

@@ -0,0 +1,8 @@
.row
.col-md-12
.page-header
%h1
Create Sponsor
.row
.col-md-8
= render partial: 'form'

View File

@@ -1,14 +1,8 @@
.row
.col-md-12
.page-header
%h1
- if @sponsorship_level.new_record?
New
Sponsorship Level
= @sponsorship_level.title
.row
.col-md-8
= semantic_form_for(@sponsorship_level, url: (@sponsorship_level.new_record? ? admin_conference_sponsorship_levels_path : admin_conference_sponsorship_level_path(@conference.short_title, @sponsorship_level))) do |f|
= f.input :title, input_html: { autofocus: true }
%p.text-right
= f.action :submit, as: :button, button_html: { class: 'btn btn-primary' }
= form_for(@sponsorship_level, url: (@sponsorship_level.new_record? ? admin_conference_sponsorship_levels_path : admin_conference_sponsorship_level_path(@conference.short_title, @sponsorship_level))) do |f|
.form-group
= f.label :title
%abbr{title: 'This field is required'} *
= f.text_field :title, autofocus: true, required: true, class: 'form-control'
%p.text-right
= f.submit nil, class: 'btn btn-primary'

View File

@@ -0,0 +1,9 @@
.row
.col-md-12
.page-header
%h1
Edit Sponsorship Level
= @sponsorship_level.title
.row
.col-md-8
= render partial: 'form'

View File

@@ -0,0 +1,8 @@
.row
.col-md-12
.page-header
%h1
New Sponsorship Level
.row
.col-md-8
= render partial: 'form'

View File

@@ -11,82 +11,85 @@
= @survey_question.title
.col-md-6
= semantic_form_for @survey_question, url: @url do |f|
.row
.col-md-12
= f.input :title, input_html: { autofocus: true }
= f.input :mandatory
.survey-possible-answers{ class: @survey_question.choice? ? '' : 'hidden' }
= f.input :possible_answers, hint: 'Comma separated', input_html: { rows: 3 }
.row
.col-md-6
= f.input :min_choices
.col-md-6
= f.input :max_choices
%hr
.row
.col-md-6
%label{ required: 'required' }
Type of Question:
.form-group
%select.selectpicker.form-control{ id: 'survey_question_kind', name: 'survey_question[kind]' }
- SurveyQuestion.kinds.each do |kind|
%option{ id: "#{kind.second}", 'data-icon' => "fa fa-#{SurveyQuestion::ICONS[kind.first.to_sym]}", selected: @survey_question.kind == kind.first }
= kind.first
.col-md-6
= form_for @survey_question, url: @url do |f|
.form-group
= f.text_field :title, autofocus: true, class: 'form-control'
.checkbox
%label
Preview:
.panel.panel-default
.panel-body{ id: 'survey_question_preview' }
%p{ id: 'title', style: 'word-wrap: break-word' }
= @survey_question.title.blank? ? 'What is your answer?' : @survey_question.title
.kinds.boolean{ class: @survey_question.boolean? ? '' : 'hidden' }
%input{ type: 'radio', name: 'radio' } Yes
= f.check_box :mandatory
Mandatory?
.survey-possible-answers{ class: @survey_question.choice? ? '' : 'hidden' }
.form-group
= f.text_area :possible_answers, rows: 3, class: 'form-control'
%span.help-block
Comma separated
.form-group
= f.label :min_choices
= f.number_field :min_choices, class: 'form-control'
.form-group
= f.label :max_choices
= f.number_field :max_choices, class: 'form-control'
.form-group
%label{ required: 'required' }
Type of Question:
.form-group
%select.selectpicker.form-control{ id: 'survey_question_kind', name: 'survey_question[kind]' }
- SurveyQuestion.kinds.each do |kind|
%option{ id: "#{kind.second}", 'data-icon' => "fa fa-#{SurveyQuestion::ICONS[kind.first.to_sym]}", selected: @survey_question.kind == kind.first }
= kind.first
= f.submit nil, class: 'btn btn-primary'
.col-md-6
%label
Preview:
%span.help-block
This is how you visitors will see the question in the survey.
.panel.panel-default
.panel-body{ id: 'survey_question_preview' }
%p{ id: 'title', style: 'word-wrap: break-word' }
= @survey_question.title.blank? ? 'What is your answer?' : @survey_question.title
.kinds.boolean{ class: @survey_question.boolean? ? '' : 'hidden' }
%input{ type: 'radio', name: 'radio' } Yes
%br
%input{ type: 'radio', name: 'radio' } No
.kinds.choice{ class: @survey_question.choice? ? '' : 'hidden' }
- if @survey_question.possible_answers.blank?
- if @survey_question.single_choice?
.radio
%label
%input{ type: 'radio' }
Choice
- else
.checkbox
%label
%input{ type: 'checkbox' }
Choice 1
.checkbox
%label
%input{ type: 'checkbox' }
Choice 2
.checkbox
%label
%input{ type: 'checkbox' }
Choice 3
- else
- @survey_question.possible_answers.split(',').map(&:strip).each do |option|
- if @survey_question.single_choice?
%input{ type: 'radio', name: 'radio' }
= option
%br
%input{ type: 'radio', name: 'radio' } No
.kinds.choice{ class: @survey_question.choice? ? '' : 'hidden' }
- if @survey_question.possible_answers.blank?
- if @survey_question.single_choice?
%input{ type: 'radio', name: 'radio' } Choice 1
%br
%input{ type: 'radio', name: 'radio' } Choice 2
%br
%input{ type: 'radio', name: 'radio' } Choice 3
- else
%input{ type: 'checkbox', name: 'checkbox' } Choice 1
%br
%input{ type: 'checkbox', name: 'checkbox' } Choice 2
%br
%input{ type: 'checkbox', name: 'checkbox' } Choice 3
- else
- @survey_question.possible_answers.split(',').map(&:strip).each do |option|
- if @survey_question.single_choice?
%input{ type: 'radio', name: 'radio' }
= option
%br
- else
%input{ type: 'checkbox', name: 'checkbox' }
= option
%br
.kinds.string{ class: @survey_question.string? ? '' : 'hidden' }
%input.form-control
.kinds.text{ class: @survey_question.text? ? '' : 'hidden' }
%textarea.form-control{ rows: 4 }
.kinds.datetime{ class: @survey_question.datetime? ? '' : 'hidden' }
.form-group{ class: 'datetimepicker' }
.input-group
.input-group-addon
%span.fa.fa-calendar
%input.form-control{ readonly: 'readonly' }
.kinds.numeric{ class: @survey_question.numeric? ? '' : 'hidden' }
%input.form-control{ type: 'number' }
= f.submit 'Save', class: 'btn btn-primary'
- else
%input{ type: 'checkbox', name: 'checkbox' }
= option
%br
.kinds.string{ class: @survey_question.string? ? '' : 'hidden' }
%input.form-control
.kinds.text{ class: @survey_question.text? ? '' : 'hidden' }
%textarea.form-control{ rows: 4 }
.kinds.datetime{ class: @survey_question.datetime? ? '' : 'hidden' }
.form-group{ class: 'datetimepicker' }
.input-group
.input-group-addon
%span.fa.fa-calendar
%input.form-control{ readonly: 'readonly' }
.kinds.numeric{ class: @survey_question.numeric? ? '' : 'hidden' }
%input.form-control{ type: 'number' }

View File

@@ -7,12 +7,22 @@
%h1 Edit Survey: #{ @survey.title }
.col-md-6
= semantic_form_for @survey, url: @url do |f|
= form_for @survey, url: @url do |f|
= f.hidden_field :surveyable_type
= f.hidden_field :surveyable_id
= f.input :title
= f.input :description, input_html: { rows: 3 }
= f.input :target, as: :select, collection: Survey.targets.keys, label: "When to ask"
= f.input :start_date, as: :string, input_html: { class: 'datetimepicker' }
= f.input :end_date, as: :string, input_html: { class: 'datetimepicker' }
= f.submit 'Save', class: 'btn btn-primary'
.form-group
= f.label :title
%abbr{title: 'This field is required'} *
= f.text_field :title, class: 'form-control'
.form-group
= f.label :description
= f.text_area :description, rows: 3, class: 'form-control'
.form-group
= f.label :target, "When to ask"
= f.select :target, Survey.targets.keys, class: 'form-control'
.form-group
= f.label :start_date
= f.text_field :start_date, class: 'datetimepicker', class: 'form-control'
= f.label :end_date
= f.text_field :end_date, class: 'datetimepicker', class: 'form-control'
= f.submit nil, class: 'btn btn-primary'

View File

@@ -11,7 +11,6 @@
%label
%input{ type: 'radio', name: "survey_submission[#{survey_question.id}][]", value: 'No', checked: survey_reply.text == 'No' }
No
- elsif survey_question.choice?
%input{ type: 'hidden', name: "survey_submission[#{survey_question.id}][]" }
- possible_answers = survey_question.possible_answers.split(',').map(&:strip)

View File

@@ -21,12 +21,9 @@
= link_to 'Stats' , '#stats-content', 'data-toggle' => 'tab'
.tab-content
.tab-pane.active#questions-content
= semantic_form_for 'survey_submission', url: '#' do |f|
- @survey.survey_questions.each.with_index(1) do |survey_question, question_index|
.row
.col-md-12
- survey_reply = survey_question.survey_replies.new(survey_question_id: survey_question.id, user_id: current_user.id)
= render partial: 'survey_question', locals: { survey_question: survey_question, question_index: question_index, survey_reply: survey_reply }
- @survey.survey_questions.each.with_index(1) do |survey_question, question_index|
- survey_reply = survey_question.survey_replies.new(survey_question_id: survey_question.id, user_id: current_user.id)
= render partial: 'survey_question', locals: { survey_question: survey_question, question_index: question_index, survey_reply: survey_reply }
= link_to 'Add Question', new_admin_conference_survey_survey_question_path(@conference.short_title, @survey), class: 'btn btn-success pull-right'
.tab-pane#replies-content
= render partial: 'survey_replies'

View File

@@ -1,18 +1,25 @@
.row
.col-md-12
.page-header
%h1
- if @ticket.new_record?
New
= @ticket.title
Ticket
.row
.col-md-8
= semantic_form_for(@ticket, url: (@ticket.new_record? ? admin_conference_tickets_path : admin_conference_ticket_path(@conference.short_title, @ticket))) do |f|
= f.input :title, input_html: { autofocus: true }
= f.input :description, input_html: { rows: 5, data: { provide: 'markdown' } }
= f.input :price
= f.input :price_currency, as: :select, class: 'form-control', collection: ['USD', 'EUR', 'GBP', 'INR', 'CNY', 'CHF'], include_blank: false
= f.input :registration_ticket, hint: 'A registration ticket is with which user register for the conference.'
%p.text-right
= f.action :submit, as: :button, button_html: { class: 'btn btn-primary' }
= form_for(@ticket, url: (@ticket.new_record? ? admin_conference_tickets_path : admin_conference_ticket_path(@conference.short_title, @ticket))) do |f|
.form-group
= f.label :title
%abbr{title: 'This field is required'} *
= f.text_field :title, required: true, autofocus: true, class: 'form-control'
.form-group
= f.text_area :description, rows: 5, data: { provide: 'markdown' }, class: 'form-control'
.form-group
= f.label :price
= f.number_field :price, class: 'form-control'
- if Ticket.where(conference: @conference).empty?
.form-group
= f.label :price_currency, 'Currency'
= f.select :price_currency, ['USD', 'EUR', 'GBP', 'INR', 'CNY', 'CHF'], { include_blank: false }, { class: 'form-control' }
- else
= hidden_field_tag "ticket[price_currency]", f.object.conference.tickets.first.price_currency
%span.help-block
Your conference tickets are in
= f.object.conference.tickets.first.price_currency
.checkbox
%label
= f.check_box :registration_ticket
A registration ticket is with which user register for the conference.
%p.text-right
= f.submit nil, class: 'btn btn-primary'

View File

@@ -0,0 +1,9 @@
.row
.col-md-12
.page-header
%h1
Edit Ticket
= @ticket.title
.row
.col-md-8
= render partial: 'form'

View File

@@ -0,0 +1,8 @@
.row
.col-md-12
.page-header
%h1
Create Ticket
.row
.col-md-8
= render partial: 'form'

View File

@@ -1,28 +1,2 @@
.row
.col-md-12
.page-header
%h1
-if @track.new_record?
New
= @track.name
Track
.row
.col-md-12
= semantic_form_for(@track, url: (@track.new_record? ? admin_conference_program_tracks_path(@conference.short_title) : admin_conference_program_track_path(@conference.short_title, @track))) do |f|
= f.input :name, input_html: { autofocus: true }
= f.input :short_name, hint: "A short and unique handle for the track, using only letters, numbers, underscores, and dashes. This will be used to identify the track in URLs etc. Example: 'my_awesome_track'", input_html: { required: 'required', pattern: '[a-zA-Z0-9_-]+', title: 'Only letters, numbers, underscores, and dashes.' }
= f.input :color, input_html: {size: 6, type: 'color'}, required: true
= f.input :start_date, as: :string, input_html: { id: 'registration-period-start-datepicker', start_date: @conference.start_date, end_date: @conference.end_date, required: @track.self_organized_and_accepted_or_confirmed? }
= f.input :end_date, as: :string, input_html: { id: 'registration-period-end-datepicker', required: @track.self_organized_and_accepted_or_confirmed? }
- if @conference.venue.try(:rooms).present?
= f.input :room, as: :select, collection: (@conference.venue.rooms).map {|room| ["#{room.name}", room.id]}, include_blank: true, label: 'Room', input_html: { class: 'select-help-toggle', required: @track.self_organized_and_accepted_or_confirmed? }
- else
%b
Please add a
= link_to 'venue', admin_conference_venue_path(@conference.short_title)
with
= link_to 'rooms', admin_conference_venue_rooms_path(@conference.short_title)
, if you want to select a room for the track.
= f.input :description, input_html: {rows: 2, data: { provide: 'markdown' } }, hint: markdown_hint
= f.input :cfp_active, label: 'Allow event submitters to select this track for their proposal'
= f.action :submit, as: :button, button_html: { class: 'btn btn-primary' }
= form_for(@track, url: (@track.new_record? ? admin_conference_program_tracks_path(@conference.short_title) : admin_conference_program_track_path(@conference.short_title, @track))) do |f|
= render partial: 'tracks/form_fields', locals: { f: f }

View File

@@ -0,0 +1,9 @@
.row
.col-md-12
.page-header
%h1
Edit Tack
= @track.name
.row
.col-md-12
= render partial: 'form'

View File

@@ -0,0 +1,8 @@
.row
.col-md-12
.page-header
%h1
New Track
.row
.col-md-12
= render partial: 'form'

View File

@@ -1,26 +0,0 @@
= semantic_form_for [:admin, @user] do |f|
= f.inputs 'Basic Information' do
- unless @user.new_record?
.pull-right
%b
Confirmed?
- if can? :toggle_confirmation, @user
= check_box_tag @user.id, @user.id, @user.confirmed?,
url: "#{toggle_confirmation_admin_user_path(@user.id)}?user[to_confirm]=",
class: 'switch-checkbox',
readonly: false
- else
= check_box_tag @user.id, @user.id, @user.confirmed?,
url: "#{toggle_confirmation_admin_user_path(@user.id)}?user[to_confirm]=",
class: 'switch-checkbox',
readonly: true
= f.input :is_admin, hint: 'An admin can create a new conference, manage users and make other users admins.'
= f.input :name, as: :string
= f.input :username, :as => :string if @user.new_record?
= f.input :email
= f.input :password if @user.new_record?
= f.input :affiliation, as: :string
= f.input :biography, input_html: { rows: 10, data: { provide: 'markdown' } },
hint: markdown_hint
= f.actions do
= f.action :submit, button_html: {class: 'btn btn-primary'}

View File

@@ -0,0 +1,7 @@
.row
.col-md-12
.page-header
%h1
Create User
= form_for [:admin, @user] do |f|
= render partial: 'devise/registrations/form_fields', locals: { f: f, full: true }

View File

@@ -12,17 +12,47 @@
.tab-content
#details-content.tab-pane.active
.col-md-8
= semantic_form_for(@venue, url: admin_conference_venue_path(@conference.short_title)) do |f|
= f.inputs :name, :website
= f.input :description, input_html: { rows: 5, cols: 20, data: { provide: 'markdown' } }, hint: markdown_hint
= f.label 'Venue Logo'
%br
- if @venue.picture?
= image_tag @venue.picture.thumb.url
= f.input :picture, label: false, hint: 'This will be displayed on the venue are of the splash page.'
= f.hidden_field :picture_cache
= f.inputs :street, :postalcode, :city, :country, :latitude, :longitude
= f.action :submit, as: :button, button_html: { class: 'btn btn-primary' }
= form_for(@venue, url: admin_conference_venue_path(@conference.short_title)) do |f|
.form-group
= f.label :name
%abbr{title: 'This field is required'} *
= f.text_field :name, required: true, class: 'form-control'
.form-group
= f.label :website
= f.url_field :website, class: 'form-control'
.form-group
= f.label :description
= f.text_area :description, rows: 5, cols: 20, data: { provide: 'markdown' }
%span.help-block
= markdown_hint
.form-group
= f.label 'Logo'
%br
- if @venue.picture?
= image_tag @venue.picture.thumb.url
= f.file_field :picture
= f.hidden_field :picture_cache
%span.help-block
This will be displayed on the venue are of the splash page.
.form-group
= f.label :street
%abbr{title: 'This field is required'} *
= f.text_field :street, required: true, class: 'form-control'
= f.label :postalcode
= f.text_field :postalcode, class: 'form-control'
= f.label :city
%abbr{title: 'This field is required'} *
= f.text_field :city, required: true, class: 'form-control'
.form-group
= f.label :country
= f.select :country, I18nData.countries.invert, { include_hidden: false }, { class: 'form-control' }
.form-group
= f.label :latitude
= f.text_field :latitude, class: 'form-control'
.form-group
= f.label :longitude
= f.text_field :longitude, class: 'form-control'
= f.submit nil, class: 'btn btn-primary'
#commercials-content.tab-pane
- if can? :create, @venue.commercial and @venue.id
@@ -34,10 +64,13 @@
.row
.col-md-6
= semantic_form_for(Commercial.new,as: :commercial, url: admin_conference_venue_venue_commercial_path(conference_id: @conference.short_title)) do |f|
= f.input :url, label: 'URL', as: :string, input_html: { required: 'required', type: 'url' },
hint: 'Just paste the url of your video/photo provider. Currently supported: YouTube, Vimeo, SpeakerDeck, SlideShare, Instagram, Flickr.'
= f.action :submit, as: :button, button_html: { class: 'btn btn-primary pull-right', disabled: true }
= form_for(Commercial.new,as: :commercial, url: admin_conference_venue_venue_commercial_path(conference_id: @conference.short_title)) do |f|
.form-group
= f.label :url
= f.url_field :url, class: 'form-control', required: 'required'
%span.help-block
Just paste the url of your video/photo provider. Currently supported: YouTube, Vimeo, SpeakerDeck, SlideShare, Instagram, Flickr.
= f.submit nil, class: 'btn btn-primary pull-right', id: 'commercial_submit_action', disabled: true
%hr
- else
- if @venue.commercial.persisted?
@@ -47,9 +80,13 @@
= render partial: 'shared/media_item', locals: { commercial: @venue.commercial }
.caption
- if can? :update, @venue.commercial
= semantic_form_for @venue.commercial, as: :commercial, url: admin_conference_venue_venue_commercial_path(conference_id: @conference.short_title, id: @venue.commercial.id) do |f|
= f.input :url, label: 'URL', as: :string, input_html: { id: "commercial_url_#{@venue.commercial.id}", required: 'required' }, hint: 'Just paste the url of your video/photo provider'
= f.action :submit, as: :button, button_html: { class: 'btn btn-success' }, label: 'Update'
= form_for @venue.commercial, as: :commercial, url: admin_conference_venue_venue_commercial_path(conference_id: @conference.short_title, id: @venue.commercial.id) do |f|
.form-group
= f.label :url
= f.url_field :url, id: "commercial_url_#{@venue.commercial.id}", class: 'form-control', required: 'required'
%span.help-block
Just paste the url of your video/photo provider. Currently supported: YouTube, Vimeo, SpeakerDeck, SlideShare, Instagram, Flickr.
= f.submit nil, class: 'btn btn-success'
- if can? :destroy, @venue.commercial
= link_to 'Delete', admin_conference_venue_venue_commercial_path(conference_id: @conference.short_title, id: @venue.commercial.id),
method: :delete, data: { confirm: 'Are you sure?' }, class: 'btn btn-danger'

View File

@@ -1,7 +0,0 @@
<div class="nested-fields">
<%= f.inputs do %>
<%= f.date_select :day %>
<%= f.input :description, input_html: {rows: '2', class: 'col-md-8'} %>
<%= remove_association_link :vday, f %>
<% end %>
</div>

View File

@@ -0,0 +1,4 @@
.nested-fields
= f.date_select :day
= f.text_field :description, rows: '2', class: 'col-md-8'
= remove_association_link :vday, f

View File

@@ -1,8 +0,0 @@
<div class="nested-fields">
<%= f.inputs do %>
<%= f.input :title %>
<%= f.input :description, input_html: {rows: '2', class: 'col-md-8'}%>
<%= f.input :vdays, collection: @conference.vdays.map {|x| [x.day, x.id]}, label: 'Position is required for the following days:'%>
<%= remove_association_link :vposition, f %>
<% end %>
</div>

View File

@@ -0,0 +1,6 @@
.nested-fields
= f.text_field :title
= f.text_area :description, rows: '2', class: 'col-md-8'
= f.label :vdays, 'Position is required for the following days:'
= f.select :vdays, @conference.vdays.pluck(:day, :id)
= remove_association_link :vposition, f

View File

@@ -1,14 +1,15 @@
.row
.col-md-8
= semantic_form_for(@conference, url: admin_conference_volunteers_update_path(@conference.short_title)) do |f|
= f.action :submit, as: :button, button_html: {class: 'btn btn-primary'}
%br
%br
= f.input :use_volunteers, label: 'Enable Volunteering'
.row
.col-md-6
= f.input :use_vdays, label: false
= dynamic_association :vdays, "Volunteer Days", f
.col-md-6
= f.input :use_vpositions, label: false
= dynamic_association :vpositions, "Volunteer positions", f
= form_for(@conference, url: admin_conference_volunteers_update_path(@conference.short_title)) do |f|
= f.submit nil, class: 'btn btn-primary'
.checkbox
%label
= f.check_box :use_volunteers
Enable Volunteering
.checkbox
%label
= f.check_box :use_vdays
= dynamic_association :vdays, "Volunteer Days", f
.col-md-6
= f.check_box :use_vpositions
= dynamic_association :vpositions, "Volunteer positions", f

View File

@@ -1,74 +1,70 @@
.container
.row
.col-md-8
= form_for(@booth, url: @url) do |f|
.form-group
= f.label :title, 'Title'
%abbr{title: 'This field is required'} *
= f.text_field :title, autofocus: true, required: true, class: 'form-control', placeholder: 'Title'
.form-group
= f.label :description, 'Description'
%abbr{title: 'This field is required'} *
= f.text_area :description, rows: 5, data: { provide: 'markdown' }, required: true, class: 'form-control'
%span.help-block
This field becomes public upon request acceptance
.form-group
= f.label :reasoning, 'How it fits the conference'
%abbr{title: 'This field is required'} *
= f.text_area :reasoning, rows: 5, data: { provide: 'markdown' }, required: true, class: 'form-control'
.form-group
= f.label :submitter_relationship, 'Submitter\'s relation'
%abbr{title: 'This field is required'} *
= f.text_field :submitter_relationship, rows: 5, required: true, class: 'form-control'
%span.help-block
e.g. employee, comunity manager, etc
.form-group
= f.label :website_url, 'Website URL'
%abbr{title: 'This field is required'} *
= f.text_field :website_url, class: 'form-control', required: true, placeholder: 'URL'
.form-group
= f.text_field :responsible_ids, multiple: true, class: "form-control", id: "booth_responsibles", placeholder: "Responsibles"
%span.help-block
= "The people responsible for the #{t 'booth'}. You can only select existing users."
.form-group
= image_tag f.object.picture.thumb.url if f.object.picture?
= f.label :picture, 'Picture'
= f.file_field :picture
= form_for(@booth, url: @url) do |f|
.form-group
= f.label :title, 'Title'
%abbr{title: 'This field is required'} *
= f.text_field :title, autofocus: true, required: true, class: 'form-control', placeholder: 'Title'
.form-group
= f.label :description, 'Description'
%abbr{title: 'This field is required'} *
= f.text_area :description, rows: 5, data: { provide: 'markdown' }, required: true, class: 'form-control'
%span.help-block
This field becomes public upon request acceptance
.form-group
= f.label :reasoning, 'How it fits the conference'
%abbr{title: 'This field is required'} *
= f.text_area :reasoning, rows: 5, data: { provide: 'markdown' }, required: true, class: 'form-control'
.form-group
= f.label :submitter_relationship, 'Submitter\'s relation'
%abbr{title: 'This field is required'} *
= f.text_field :submitter_relationship, rows: 5, required: true, class: 'form-control'
%span.help-block
e.g. employee, comunity manager, etc
.form-group
= f.label :website_url, 'Website URL'
%abbr{title: 'This field is required'} *
= f.text_field :website_url, class: 'form-control', required: true, placeholder: 'URL'
.form-group
= f.text_field :responsible_ids, multiple: true, class: "form-control", id: "booth_responsibles", placeholder: "Responsibles"
%span.help-block
The people responsible for the `t('booth')`. You can only select existing users.
.form-group
= image_tag f.object.picture.thumb.url if f.object.picture?
= f.label :picture, 'Picture'
= f.file_field :picture
%p.text-right
%button{type: 'submit', class: 'btn btn-success'}
- if @booth.new_record?
Create `(t'booth').capitalize` Request
- else
Update `(t'booth').capitalize` Request
%p.text-right
%button{type: 'submit', class: 'btn btn-success'}
- if @booth.new_record?
= "Create #{(t'booth').capitalize } Request"
- else
= "Update #{(t'booth').capitalize } Request"
:javascript
$(document).ready(function() {
$('#booth_responsibles').selectize({
persist: false,
create: false,
valueField: 'id',
labelField: 'username',
searchField: 'username',
load: function(query, callback) {
if (!query.length) return callback();
$.ajax({
url: "#{search_users_path}.json",
type: 'GET',
dataType: 'json',
data: {
query: query,
},
error: function(res) {
console.log("selectize error");
callback();
},
success: function(res) {
console.log("selectize success");
// console.log(res);
callback(res.users);
}
});
}
});
:javascript
$(document).ready(function() {
$('#booth_responsibles').selectize({
persist: false,
create: false,
valueField: 'id',
labelField: 'username',
searchField: 'username',
load: function(query, callback) {
if (!query.length) return callback();
$.ajax({
url: "#{search_users_path}.json",
type: 'GET',
dataType: 'json',
data: {
query: query,
},
error: function(res) {
console.log("selectize error");
callback();
},
success: function(res) {
console.log("selectize success");
// console.log(res);
callback(res.users);
}
});
}
});
});

View File

@@ -1,6 +1,9 @@
.container
%h1
Editing
= @booth.title
= render 'form'
.row
.col-md-12
.page-header
%h1
Edit Booth
= @booth.title
.row
.col-md-8
= render 'form'

View File

@@ -1,51 +1,50 @@
.container
.row
.col-md-12.page-header
%h1
Your #{t'booth'} requests for
= @conference.title
.row
.col-md-12
.margin-booth-table
%table.table.table-striped.table-hover
%thead
%th
%b State
%th
%b Logo
%th
%b Title
%th
%b Actions
- @booths.each do |booth|
%tr
%td{ style: "padding:20px 8px 20px 8px;" }
- if (booth.state == 'to_accept' || booth.state == 'to_reject')
- show_state = 'new'
- else
- show_state = booth.state
%span{ title: show_state, class: "fa #{status_icon(booth)}" }
%td
- if booth.logo_link
= image_tag(booth.picture.thumb.url, width: '20%')
%td
= link_to booth.title, conference_booth_path(@conference.short_title, booth)
%td
-if can? :edit, booth
= link_to 'Edit', edit_conference_booth_path(@conference.short_title, booth.id),
class: 'btn btn-default'
- if booth.transition_possible? :withdraw
= link_to 'Withdraw',
withdraw_conference_booth_path(@conference.short_title, booth),
method: :patch, class: 'btn btn-mini btn-warning', id: "withdraw_booth_#{booth.id}",
data: { confirm: 'Are you sure you really want to withdraw this request?' }
- if booth.transition_possible? :confirm
= link_to 'Confirm',
confirm_conference_booth_path(@conference.short_title, booth),
method: :patch, class: 'btn btn-mini btn-success', id: "confirm_booth_#{booth.id}"
- if booth.transition_possible? :restart
= link_to 'Re-submit',
restart_conference_booth_path(@conference.short_title, booth),
method: :patch, class: 'btn btn-mini btn-success', id: "restart_booth_#{booth.id}"
.pull-right
= link_to "Add #{(t'booth').capitalize }", new_conference_booth_path(@conference.short_title), class: 'button btn btn-primary'
.row
.col-md-12.page-header
%h1
Your #{t'booth'} requests for
= @conference.title
.row
.col-md-12
.margin-booth-table
%table.table.table-striped.table-hover
%thead
%th
%b State
%th
%b Logo
%th
%b Title
%th
%b Actions
- @booths.each do |booth|
%tr
%td{ style: "padding:20px 8px 20px 8px;" }
- if (booth.state == 'to_accept' || booth.state == 'to_reject')
- show_state = 'new'
- else
- show_state = booth.state
%span{ title: show_state, class: "fa #{status_icon(booth)}" }
%td
- if booth.logo_link
= image_tag(booth.picture.thumb.url, width: '20%')
%td
= link_to booth.title, conference_booth_path(@conference.short_title, booth)
%td
-if can? :edit, booth
= link_to 'Edit', edit_conference_booth_path(@conference.short_title, booth.id),
class: 'btn btn-default'
- if booth.transition_possible? :withdraw
= link_to 'Withdraw',
withdraw_conference_booth_path(@conference.short_title, booth),
method: :patch, class: 'btn btn-mini btn-warning', id: "withdraw_booth_#{booth.id}",
data: { confirm: 'Are you sure you really want to withdraw this request?' }
- if booth.transition_possible? :confirm
= link_to 'Confirm',
confirm_conference_booth_path(@conference.short_title, booth),
method: :patch, class: 'btn btn-mini btn-success', id: "confirm_booth_#{booth.id}"
- if booth.transition_possible? :restart
= link_to 'Re-submit',
restart_conference_booth_path(@conference.short_title, booth),
method: :patch, class: 'btn btn-mini btn-success', id: "restart_booth_#{booth.id}"
.pull-right
= link_to "Add #{(t'booth').capitalize }", new_conference_booth_path(@conference.short_title), class: 'button btn btn-primary'

View File

@@ -1,4 +1,8 @@
.container
%h1 Request a #{t'booth'}
= render 'form'
.row
.col-md-12
.page-header
%h1
Request a #{t'booth'}
.row
.col-md-8
= render 'form'

View File

@@ -1,9 +0,0 @@
.container
.row
.col-md-12
.page-header
%h1 Editing Commercial
.row
.col-md-12
= semantic_form_for @commercial, url: conference_program_proposal_commercial_path(conference_id: @conference.short_title, proposal_id: @event.id, id: @commercial.id) do |f|
= render 'form', f: f

View File

@@ -1,9 +0,0 @@
.container
.row
.col-md-12
.page-header
%h1 New Commercial
.row
.col-md-12
= semantic_form_for @commercial, url: conference_program_proposal_commercials_path(conference_id: @conference.short_title, proposal_id: @event.id) do |f|
= render 'form', f: f

View File

@@ -1,34 +1,9 @@
.container
.row
.col-md-12
.page-header
%h1
Registration for
= @conference.title
.row
.col-md-8
- unless current_user
%legend
%span
=link_to('#signup', role: 'tab', "aria-controls" => "home", "data-toggle" => "tab") do
= ENV['OSEM_NAME'] || 'OSEM'
Account
%span.pull-right#account-already
=link_to('#signin', role: 'tab', "aria-controls" => "home", "data-toggle" => "tab") do
Already have an account?
.tab-content
.tab-pane.active{role: 'tabpanel', id: 'signup'}
= semantic_form_for(@registration, url: conference_conference_registration_path(@conference.short_title)) do |f|
= render partial: 'devise/shared/sign_up_form_embedded'
= render partial: 'registration_info', locals: { f: f }
= f.input :conference_id, as: :hidden, value: @conference.id
.row
.col-md-12
%p.pull-right
- if @conference.user_registered?(current_user)
= f.action :submit, button_html: { value: 'Update Registration', class: 'btn btn-primary' }
- else
=f.action :submit, button_html: { value: 'Register', class: 'btn btn-primary', id: 'register' }
.tab-pane{role: 'tabpanel', id: 'signin'}
= render partial: 'devise/shared/sign_in_form_embedded'
= form_for(@registration, url: conference_conference_registration_path(@conference.short_title)) do |f|
= render partial: 'devise/registrations/new_embedded'
= render partial: 'registration_info', locals: { f: f }
= f.hidden_field :conference_id, value: @conference.id
%p.pull-right
- if @conference.user_registered?(current_user)
= f.submit 'Update Registration', { class: 'btn btn-primary' }
- else
=f.submit 'Register', { class: 'btn btn-primary', id: 'register' }

View File

@@ -6,22 +6,25 @@
I have read and accepted the
= code_of_conduct_link
- else
= f.input :accepted_code_of_conduct,
label: "I have read and accept the #{code_of_conduct_link}".html_safe,
required: true
.checkbox
%label
= f.check_box :accepted_code_of_conduct, required: true
I have read and accept the
= code_of_conduct_link
%abbr{title: 'This field is required'} *
- if @conference.program.events.with_registration_open.any? || @registration.events.any?
= f.inputs 'Pre-registration required for the following:' do
- @registration.events_ordered.each do |event|
%label
= hidden_field_tag "registration[event_ids][]", nil
= check_box_tag "registration[event_ids][]", event.id, event.registrations.include?(@registration)
= event.title
.text-muted
= registered_text(event)
- if event.scheduled?
(Scheduled on: #{event.time.to_date})
%br
%h4
Pre-registration required for the following:
- @registration.events_ordered.each do |event|
%label
= hidden_field_tag "registration[event_ids][]", nil
= check_box_tag "registration[event_ids][]", event.id, event.registrations.include?(@registration)
= event.title
.text-muted
= registered_text(event)
- if event.scheduled?
(Scheduled on: #{event.time.to_date})
%br
= render 'conferences/code_of_conduct', organization: @conference.organization

View File

@@ -0,0 +1,23 @@
.container
.row
.col-md-12
.page-header
%h1
Registration for
= @conference.title
.row
.col-md-8
- unless current_user
%legend
%span
=link_to('#signup', role: 'tab', "aria-controls" => "home", "data-toggle" => "tab") do
= ENV['OSEM_NAME'] || 'OSEM'
Account
%span.pull-right#account-already
=link_to('#signin', role: 'tab', "aria-controls" => "home", "data-toggle" => "tab") do
Already have an account?
.tab-content
.tab-pane.active{role: 'tabpanel', id: 'signup'}
= render partial: 'form'
.tab-pane{role: 'tabpanel', id: 'signin'}
= render partial: 'devise/sessions/new_embedded'

View File

@@ -0,0 +1,23 @@
.container
.row
.col-md-12
.page-header
%h1
Registration for
= @conference.title
.row
.col-md-8
- unless current_user
%legend
%span
=link_to('#signup', role: 'tab', "aria-controls" => "home", "data-toggle" => "tab") do
= ENV['OSEM_NAME'] || 'OSEM'
Account
%span.pull-right#account-already
=link_to('#signin', role: 'tab', "aria-controls" => "home", "data-toggle" => "tab") do
Already have an account?
.tab-content
.tab-pane.active{role: 'tabpanel', id: 'signup'}
= render partial: 'form'
.tab-pane{role: 'tabpanel', id: 'signin'}
= render partial: 'devise/sessions/new_embedded'

Some files were not shown because too many files have changed in this diff Show More