voting visual changes
This commit is contained in:
parent
4356616566
commit
52543589e4
7 changed files with 44 additions and 21 deletions
|
|
@ -13,7 +13,7 @@
|
|||
.span12
|
||||
%table.table
|
||||
%tr
|
||||
%td
|
||||
%td{:style => "width:20%"}
|
||||
%b Type
|
||||
%td
|
||||
.dropdown
|
||||
|
|
@ -113,6 +113,10 @@
|
|||
%td
|
||||
%b Description
|
||||
%td= simple_format(@event.description)
|
||||
|
||||
- if @conference.call_for_papers.rating > 0
|
||||
= render :partial => "voting"
|
||||
|
||||
- if @event.event_attachments.size > 0
|
||||
%table.table
|
||||
%thead
|
||||
|
|
@ -142,11 +146,7 @@
|
|||
%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!"
|
||||
- if @conference.call_for_papers.rating > 0
|
||||
.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
|
||||
|
|
|
|||
|
|
@ -1,7 +1,29 @@
|
|||
%table#myeventratings{:style=>"width: 20%"}
|
||||
%table.table#myrating
|
||||
%tr
|
||||
%td{:style => "width:20%"}
|
||||
%b Rating
|
||||
%td
|
||||
%b Your vote:
|
||||
- if @event.average_rating.to_f > 0
|
||||
#{@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');"
|
||||
- else
|
||||
= label_tag "label_rating", "", :class => "avgrating"
|
||||
%tr
|
||||
%td
|
||||
%b Voters
|
||||
%td
|
||||
= @event.voters.length
|
||||
(
|
||||
= @ratings.map {|x| "#{x.first_name} #{x.last_name}"}.join ', '
|
||||
)
|
||||
%tr
|
||||
%td Your vote
|
||||
%td
|
||||
- @conference.call_for_papers.rating.times do |counter|
|
||||
- voted = @event.voted?(@event, current_user.person)
|
||||
|
|
|
|||
|
|
@ -31,12 +31,12 @@
|
|||
= event.id
|
||||
%td
|
||||
=link_to event.title, admin_conference_event_path(@conference.short_title, event)
|
||||
%td
|
||||
%td{:style => "width:96px"}
|
||||
- if @conference.call_for_papers.rating != 0
|
||||
- if event.average_rating.to_f > 0
|
||||
Rating: (#{event.average_rating}/#{@conference.call_for_papers.rating})
|
||||
Rating: #{event.average_rating}/#{@conference.call_for_papers.rating}
|
||||
- else
|
||||
Rating: (0/#{@conference.call_for_papers.rating})
|
||||
Rating: 0/#{@conference.call_for_papers.rating}
|
||||
%br
|
||||
|
||||
- @conference.call_for_papers.rating.times do |counter|
|
||||
|
|
|
|||
|
|
@ -1 +1 @@
|
|||
$('table#myeventratings').replaceWith("<%= escape_javascript(render :partial => 'voting') %>");
|
||||
$('table#myrating').replaceWith("<%= escape_javascript(render :partial => 'voting') %>");
|
||||
Loading…
Add table
Add a link
Reference in a new issue