fixed table width, no td in index if no voting options

This commit is contained in:
Stella 2014-03-02 10:36:22 +02:00
parent 0dbd513c8a
commit 68c119b443
3 changed files with 27 additions and 26 deletions

View file

@ -13,8 +13,9 @@
%b ID
%th
%b Title
%th
%b Rating
- if @conference.call_for_papers.rating != 0
%th
%b Rating
%th
%b Submitter
%th
@ -31,25 +32,24 @@
= event.id
%td
=link_to event.title, admin_conference_event_path(@conference.short_title, event)
%td{:style => "width:96px"}
- if @conference.call_for_papers.rating != 0
- if @conference.call_for_papers.rating != 0
%td{:style => "width:96px"}
- if event.average_rating.to_f > 0
Rating: #{event.average_rating}/#{@conference.call_for_papers.rating}
%b #{event.average_rating}/#{@conference.call_for_papers.rating}
%br
Voters: #{event.voters.length}
#{pluralize(event.voters.length, 'voter')}
%br
- @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"
- else
Rating: 0/#{@conference.call_for_papers.rating}
%br
- @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"
- else
= link_to "(enable voting)", admin_conference_cfp_info_path(@conference.short_title)
- if event.submitter.registrations.count < 1
- bgcolor="#F7819F"
- else