Added accessibility support to interest and add facilitator buttons and made facilitation buttons and message make more sense

This commit is contained in:
Godwin
2016-06-11 18:15:30 -07:00
parent 30954e7907
commit abe0b3a40d
8 changed files with 40 additions and 18 deletions
@@ -303,5 +303,6 @@ class ApplicationController < LinguaFrancaApplicationController
params,
current_user,
).deliver_now if Rails.env.preview? || Rails.env.production?
logger.info "Missing translation found for: #{key}"
end
end
+3 -5
View File
@@ -913,7 +913,7 @@ class ConferencesController < ApplicationController
set_conference
set_conference_registration
@workshops = Workshop.where(:conference_id => @this_conference.id)
@my_workshops = Workshop.joins(:workshop_facilitators).where(:workshop_facilitators => {:user_id => current_user.id}, :conference_id => @this_conference.id)#, :workshop_facilitator => current_user.id)
@my_workshops = Workshop.joins(:workshop_facilitators).where(:workshop_facilitators => {:user_id => current_user.id}, :conference_id => @this_conference.id)
render 'workshops/index'
end
@@ -1084,11 +1084,9 @@ class ConferencesController < ApplicationController
WorkshopInterest.create(:workshop_id => workshop.id, :user_id => current_user.id) unless interested
if request.xhr?
interest = workshop.interested?(current_user) ? :remove_interest : :show_interest
css_class = workshop.interested?(current_user) ? :delete : :add
render json: [ {
selector: 'button[value="toggle_interest"]',
html: view_context.button_tag(interest, :value => :toggle_interest, :class => css_class)
selector: '.interest-button',
html: view_context.interest_button(workshop)
} ]
else
# go back to the workshop