osem-fcy/app/views/admin/events/_voting.html.haml

33 lines
857 B
Text
Raw Normal View History

2016-09-22 20:06:46 -04:00
%hr
- if @program.rating_enabled
- if @program.voting_period?
- if @program.show_voting?
%table.table
%thead
%td.col-md-2
%b Overall Votes
- @votable_fields.each do |field|
%tr
%td.col-md-2
= field.title
%td
= rating_for @event, field.title, disable: true, star: field.stars
2016-07-05 16:44:53 +03:00
%tr
%td
2016-09-22 20:06:46 -04:00
Voters
2016-07-05 16:44:53 +03:00
%td
2016-09-22 20:06:46 -04:00
= raters(@votable_fields)
%table.table
%thead
%td.col-md-2
%b Your Votes
- @votable_fields.each do |field|
%tr
%td.col-md-2
= field.title
%td
= rating_for_user @event, current_user, field.title, star: field.stars
- else
%b
= voting_open_or_close(@program)