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:
Michael Ball 2020-02-06 01:37:38 -08:00
commit 4306fbe636
82 changed files with 423 additions and 428 deletions

View file

@ -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?

View file

@ -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: []
)

View file

@ -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