ensl.org/app/helpers/gathers_helper.rb
jamal d6e0a5d1d1 Revert "Fix some logic errors with captains"
Revert "Change Gather style to volunteer captains"

This reverts commits fb7d361, d8134ca, and ebd60d1.
2014-12-08 09:35:40 -05:00

21 lines
651 B
Ruby

module GathersHelper
def render_gather
if @gather.status == Gather::STATE_RUNNING
headers['Gather'] = 'running'
render partial: 'running', layout: false
elsif @gather.status == Gather::STATE_VOTING
if @gatherer and @gather.gatherer_votes.first(conditions: { user_id: cuser.id })
headers['Gather'] = 'voted'
else
headers['Gather'] = 'voting'
end
render partial: 'voting', layout: false
elsif @gather.status == Gather::STATE_PICKING or @gather.status == Gather::STATE_FINISHED
headers['Gather'] = 'picking'
render partial: 'picking', layout: false
end
end
end