osem-fcy/app/views/admin/events/_voting.html.haml
Shlok Srivastava e92114a257 multiple changes
fix blind voting
added more tests
2017-04-28 10:16:13 +00:00

32 lines
837 B
Text

%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
%tr
%td
Voters
%td
= 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)