Merge branch 'master' into admin-ticketing
* master: (61 commits) Replace more Commercials with Materials Rename more commericals to materials UI -- Repalce "Commerials" with "Materials". Re-order Conference Associations Cleanup CSS add Snap! style block attachments hide venue link if there is no venue link No dropshadow Text with drop shadow for now Tidy up the look of lodging panels Show reg status for tickets. Tweak CSS, fix loding order Move the venue description to below the map. Update lodging styling. Add description for venu when map is shown. CSS tweaks... Make the edit form not so wide. Support markdown in more fields Cleanup CSS ordering, fix coloring for navdropdowns dumb...fix order of link_to args ARRRGHHH, another typo...same line... fix typo ...
This commit is contained in:
commit
4306fbe636
82 changed files with 423 additions and 428 deletions
|
|
@ -17,10 +17,10 @@ module Admin
|
|||
|
||||
if @commercial.save
|
||||
redirect_to admin_conference_commercials_path,
|
||||
notice: 'Commercial was successfully created.'
|
||||
notice: 'Materials were successfully created.'
|
||||
else
|
||||
redirect_to admin_conference_commercials_path,
|
||||
error: 'An error prohibited this Commercial from being saved: '\
|
||||
error: 'An error prohibited materials from being saved: '\
|
||||
"#{@commercial.errors.full_messages.join('. ')}."
|
||||
|
||||
end
|
||||
|
|
@ -29,17 +29,17 @@ module Admin
|
|||
def update
|
||||
if @commercial.update(commercial_params)
|
||||
redirect_to admin_conference_commercials_path,
|
||||
notice: 'Commercial was successfully updated.'
|
||||
notice: 'Materials were successfully updated.'
|
||||
else
|
||||
redirect_to admin_conference_commercials_path,
|
||||
error: 'An error prohibited this Commercial from being saved: '\
|
||||
error: 'An error prohibited materials from being saved: '\
|
||||
"#{@commercial.errors.full_messages.join('. ')}."
|
||||
end
|
||||
end
|
||||
|
||||
def destroy
|
||||
@commercial.destroy
|
||||
redirect_to admin_conference_commercials_path, notice: 'Commercial was successfully destroyed.'
|
||||
redirect_to admin_conference_commercials_path, notice: 'Materials were successfully removed.'
|
||||
end
|
||||
|
||||
def render_commercial
|
||||
|
|
@ -60,9 +60,9 @@ module Admin
|
|||
errors = Commercial.read_file(params[:file]) if params[:file]
|
||||
|
||||
if !params[:file]
|
||||
flash[:error] = 'Empty file detected while adding commercials to Event'
|
||||
flash[:error] = 'Empty file detected while adding materials to Event'
|
||||
elsif errors.all? { |_k, v| v.blank? }
|
||||
flash[:notice] = 'Successfully added commercials.'
|
||||
flash[:notice] = 'Successfully added materials.'
|
||||
else
|
||||
errors_text = ''
|
||||
errors_text << 'Unable to find event with ID: ' + errors[:no_event].join(', ') + '. ' if errors[:no_event].any?
|
||||
|
|
|
|||
|
|
@ -82,7 +82,7 @@ module Admin
|
|||
|
||||
def registration_params
|
||||
params.require(:registration).permit(
|
||||
:user_id, :conference_id, :arrival, :departure, :attended,
|
||||
:user_id, :conference_id, :attended,
|
||||
:volunteer, :other_special_needs, :accepted_code_of_conduct,
|
||||
vchoice_ids: [], qanswer_ids: [], qanswers_attributes: [], event_ids: []
|
||||
)
|
||||
|
|
|
|||
|
|
@ -12,10 +12,10 @@ module Admin
|
|||
|
||||
if @commercial.save
|
||||
redirect_to admin_conference_venue_path,
|
||||
notice: 'Commercial was successfully created.'
|
||||
notice: 'Materials successfully created.'
|
||||
else
|
||||
redirect_to admin_conference_venue_path,
|
||||
error: 'An error prohibited this Commercial from being saved: '\
|
||||
error: 'An error prohibited materials from being saved: '\
|
||||
"#{@commercial.errors.full_messages.join('. ')}."
|
||||
|
||||
end
|
||||
|
|
@ -24,17 +24,17 @@ module Admin
|
|||
def update
|
||||
if @commercial.update(commercial_params)
|
||||
redirect_to admin_conference_venue_path,
|
||||
notice: 'Commercial was successfully updated.'
|
||||
notice: 'Materials successfully updated.'
|
||||
else
|
||||
redirect_to admin_conference_venue_path,
|
||||
error: 'An error prohibited this Commercial from being saved: '\
|
||||
error: 'An error prohibited materials from being saved: '\
|
||||
"#{@commercial.errors.full_messages.join('. ')}."
|
||||
end
|
||||
end
|
||||
|
||||
def destroy
|
||||
@commercial.destroy
|
||||
redirect_to admin_conference_venue_path, notice: 'Commercial was successfully destroyed.'
|
||||
redirect_to admin_conference_venue_path, notice: 'Materials successfully destroyed.'
|
||||
end
|
||||
|
||||
def render_commercial
|
||||
|
|
|
|||
|
|
@ -12,27 +12,27 @@ class CommercialsController < ApplicationController
|
|||
|
||||
if @commercial.save
|
||||
redirect_to edit_conference_program_proposal_path(conference_id: @conference.short_title, id: @event.id, anchor: 'commercials-content'),
|
||||
notice: 'Commercial was successfully created.'
|
||||
notice: 'Materials were successfully created.'
|
||||
else
|
||||
redirect_to edit_conference_program_proposal_path(conference_id: @conference.short_title, id: @event.id, anchor: 'commercials-content'),
|
||||
error: "An error prohibited this Commercial from being saved: #{@commercial.errors.full_messages.join('. ')}."
|
||||
error: "An error prohibited these materials from being saved: #{@commercial.errors.full_messages.join('. ')}."
|
||||
end
|
||||
end
|
||||
|
||||
def update
|
||||
if @commercial.update(commercial_params)
|
||||
redirect_to edit_conference_program_proposal_path(conference_id: @conference.short_title, id: @event.id, anchor: 'commercials-content'),
|
||||
notice: 'Commercial was successfully updated.'
|
||||
notice: 'Materials were successfully updated.'
|
||||
else
|
||||
redirect_to edit_conference_program_proposal_path(conference_id: @conference.short_title, id: @event.id, anchor: 'commercials-content'),
|
||||
error: "An error prohibited this Commercial from being saved: #{@commercial.errors.full_messages.join('. ')}."
|
||||
error: "An error prohibited materials from being saved: #{@commercial.errors.full_messages.join('. ')}."
|
||||
end
|
||||
end
|
||||
|
||||
def destroy
|
||||
@commercial.destroy
|
||||
redirect_to edit_conference_program_proposal_path(conference_id: @conference.short_title, id: @event.id),
|
||||
notice: 'Commercial was successfully destroyed.'
|
||||
notice: 'Materials were successfully destroyed.'
|
||||
end
|
||||
|
||||
def render_commercial
|
||||
|
|
|
|||
|
|
@ -108,9 +108,9 @@ class ConferenceRegistrationsController < ApplicationController
|
|||
end
|
||||
|
||||
def registration_params
|
||||
params.require(:registration)
|
||||
params.permit(:registration)
|
||||
.permit(
|
||||
:conference_id, :arrival, :departure,
|
||||
:conference_id,
|
||||
:volunteer, :accepted_code_of_conduct,
|
||||
vchoice_ids: [], qanswer_ids: [],
|
||||
qanswers_attributes: [],
|
||||
|
|
|
|||
|
|
@ -54,7 +54,7 @@ class ConferencesController < ApplicationController
|
|||
@tickets = @conference.tickets.visible.order('price_cents')
|
||||
end
|
||||
if splashpage.include_lodgings
|
||||
@lodgings = @conference.lodgings.order('name')
|
||||
@lodgings = @conference.lodgings.order('id')
|
||||
end
|
||||
if splashpage.include_sponsors
|
||||
@sponsorship_levels = @conference.sponsorship_levels.eager_load(
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue