check if voting is enabled by organizers

This commit is contained in:
differentreality 2013-08-16 13:03:31 +03:00
parent 834362491e
commit 609b3d45fe
2 changed files with 16 additions and 14 deletions

View file

@ -142,10 +142,11 @@
%td
= link_to "Delete", conference_proposal_event_attachment_path(@conference.short_title, @event.id, a.id),
:method => :delete, :confirm => "Are you sure you want to delete this attachment? It's permanant!"
.row-fluid
= link_to "Votes (#{@event.voters.length})", "#", :id => "votes-link"
#votes-div
= render :partial => 'voting'
- if @conference.call_for_papers.rating
.row-fluid
= link_to "Votes (#{@event.voters.length})", "#", :id => "votes-link"
#votes-div
= render :partial => 'voting'
.row-fluid
= link_to "Comments (#{@comment_count})", "#", :id => "event-comment-link"
#comments-div

View file

@ -115,17 +115,18 @@
= event.id
%td
=link_to event.title, admin_conference_event_path(@conference.short_title, event)
- if event.average_rating.to_f > 0
Rating: (#{event.average_rating}/#{@conference.call_for_papers.rating})
- else
Rating: (0/#{@conference.call_for_papers.rating})
- @conference.call_for_papers.rating.times do |counter|
- if event.average_rating.to_f.round == counter+1
= label_tag "label_rating", "", :class => "avgrating", :avgrate => true
= javascript_tag "$('label[avgrate=true]').prevAll().andSelf().addClass('bright');"
- if @conference.call_for_papers.rating
- if event.average_rating.to_f > 0
Rating: (#{event.average_rating}/#{@conference.call_for_papers.rating})
- else
= label_tag "label_rating", "", :class => "avgrating"
Rating: (0/#{@conference.call_for_papers.rating})
- @conference.call_for_papers.rating.times do |counter|
- if event.average_rating.to_f.round == counter+1
= label_tag "label_rating", "", :class => "avgrating", :avgrate => true
= javascript_tag "$('label[avgrate=true]').prevAll().andSelf().addClass('bright');"
- else
= label_tag "label_rating", "", :class => "avgrating"
- if event.submitter.registrations.count < 1
- bgcolor="#F7819F"