2013-08-27 12:38:57 +03:00
|
|
|
= render :partial => "events_stats"
|
2013-06-30 10:30:25 +00:00
|
|
|
|
2014-03-17 16:36:32 +01:00
|
|
|
.row
|
|
|
|
|
.col-md-12
|
2013-05-07 15:09:13 +02:00
|
|
|
%h2
|
|
|
|
|
Events
|
|
|
|
|
- if @events
|
|
|
|
|
= "(#{@events.length})"
|
|
|
|
|
.well
|
|
|
|
|
%table.table.table-striped.table-bordered.table-hover#events
|
|
|
|
|
%thead
|
2013-06-14 13:17:40 +02:00
|
|
|
%th
|
|
|
|
|
%b ID
|
2013-05-07 15:09:13 +02:00
|
|
|
%th
|
|
|
|
|
%b Title
|
2014-07-21 12:36:15 +02:00
|
|
|
- if @conference.call_for_papers && @conference.call_for_papers.rating && @conference.call_for_papers.rating > 0
|
2014-03-02 10:36:22 +02:00
|
|
|
%th
|
|
|
|
|
%b Rating
|
2013-05-07 15:09:13 +02:00
|
|
|
%th
|
|
|
|
|
%b Submitter
|
2013-07-11 09:04:54 +02:00
|
|
|
%th
|
|
|
|
|
%b Speaker
|
2013-05-07 15:09:13 +02:00
|
|
|
%th
|
|
|
|
|
%b Type
|
2013-06-14 13:17:40 +02:00
|
|
|
%th
|
|
|
|
|
%b Track
|
2014-02-23 16:09:09 +02:00
|
|
|
%th
|
|
|
|
|
%b Difficulty
|
2013-05-07 15:09:13 +02:00
|
|
|
%th
|
|
|
|
|
%b State
|
|
|
|
|
- @events.each do |event|
|
|
|
|
|
%tr
|
|
|
|
|
%td
|
2013-06-14 13:17:40 +02:00
|
|
|
= event.id
|
2013-05-07 15:09:13 +02:00
|
|
|
%td
|
2013-06-14 13:17:40 +02:00
|
|
|
=link_to event.title, admin_conference_event_path(@conference.short_title, event)
|
2014-06-26 15:43:24 +03:00
|
|
|
|
2014-07-21 12:36:15 +02:00
|
|
|
- if @conference.call_for_papers && @conference.call_for_papers.rating && @conference.call_for_papers.rating > 0
|
2014-03-02 10:36:22 +02:00
|
|
|
%td{:style => "width:96px"}
|
2014-06-26 15:43:24 +03:00
|
|
|
- if event.average_rating.to_f > 0
|
2014-03-04 23:35:34 +02:00
|
|
|
#{event.average_rating}/#{@conference.call_for_papers.rating}
|
2014-03-02 10:36:22 +02:00
|
|
|
%br
|
|
|
|
|
#{pluralize(event.voters.length, 'voter')}
|
2014-02-23 15:03:21 +02:00
|
|
|
%br
|
2014-03-02 10:36:22 +02:00
|
|
|
- @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"
|
2013-08-16 12:46:49 +03:00
|
|
|
- else
|
2014-03-04 23:35:34 +02:00
|
|
|
0/#{@conference.call_for_papers.rating}
|
2013-09-02 16:15:02 +03:00
|
|
|
%br
|
2013-08-16 13:03:31 +03:00
|
|
|
|
2014-07-21 12:36:15 +02:00
|
|
|
- if event.submitter && event.submitter.registrations && event.submitter.registrations.count < 1
|
2013-06-14 13:17:40 +02:00
|
|
|
- bgcolor="#F7819F"
|
2014-06-26 15:43:24 +03:00
|
|
|
- else
|
2013-06-14 13:17:40 +02:00
|
|
|
- bgcolor=""
|
|
|
|
|
%td{:style=>"background-color: #{bgcolor}"}
|
2013-05-07 15:09:13 +02:00
|
|
|
- if !event.submitter.nil?
|
2014-06-23 19:07:50 +03:00
|
|
|
=link_to event.submitter.name, admin_user_path(event.submitter)
|
2013-06-14 13:17:40 +02:00
|
|
|
- if event.submitter.registrations.count < 1
|
|
|
|
|
(Unregistered!)
|
2013-05-07 15:09:13 +02:00
|
|
|
- else
|
|
|
|
|
Unknown submitter
|
2013-07-11 09:04:54 +02:00
|
|
|
%td
|
|
|
|
|
- if speaker = event.speakers.first
|
2014-06-23 19:07:50 +03:00
|
|
|
= link_to speaker.name, admin_user_path(speaker)
|
2013-07-11 09:04:54 +02:00
|
|
|
- else
|
|
|
|
|
Unknown speaker
|
|
|
|
|
- l = link_to "Change", edit_admin_conference_event_speaker_path(@conference.short_title, event), :remote => true
|
|
|
|
|
= "(#{l})".html_safe
|
2013-05-07 15:09:13 +02:00
|
|
|
%td
|
2014-05-14 10:38:36 +02:00
|
|
|
.btn-group
|
|
|
|
|
%button{:type=>"button", :class=>"btn btn-link dropdown-toggle", "data-toggle"=>"dropdown"}
|
2013-07-28 22:10:45 +03:00
|
|
|
- if event.event_type.nil?
|
|
|
|
|
Event Type
|
|
|
|
|
- else
|
|
|
|
|
= event.event_type.title
|
2014-05-14 10:38:36 +02:00
|
|
|
%span.caret
|
2013-07-28 22:10:45 +03:00
|
|
|
%ul.dropdown-menu
|
|
|
|
|
- @event_types.each do |type|
|
|
|
|
|
%li= link_to type.title, admin_conference_event_path(@conference.short_title, event, :event_type_id => type.id) ,
|
|
|
|
|
:method => :put, :event_type_id => type.id
|
2013-06-14 13:17:40 +02:00
|
|
|
%td
|
2014-05-14 10:38:36 +02:00
|
|
|
.btn-group
|
|
|
|
|
%button{:type=>"button", :class=>"btn btn-link dropdown-toggle", "data-toggle"=>"dropdown"}
|
2013-06-14 13:17:40 +02:00
|
|
|
- if event.track.nil?
|
|
|
|
|
Track
|
|
|
|
|
- else
|
|
|
|
|
= event.track.name
|
2014-05-14 10:38:36 +02:00
|
|
|
%span.caret
|
2013-06-14 13:17:40 +02:00
|
|
|
%ul.dropdown-menu
|
|
|
|
|
- @tracks.each do |track|
|
|
|
|
|
%li= link_to track.name, admin_conference_event_path(@conference.short_title, event, :track_id => track.id) ,
|
|
|
|
|
:method => :put, :track_id => track.id
|
2014-02-23 16:09:09 +02:00
|
|
|
%td
|
|
|
|
|
= event.difficulty_level.title if @conference.use_difficulty_levels && event.difficulty_level
|
2013-05-07 15:09:13 +02:00
|
|
|
%td
|
|
|
|
|
- if event.state == "withdrawn"
|
|
|
|
|
Withdrawn
|
|
|
|
|
- else
|
2014-05-14 10:38:36 +02:00
|
|
|
.btn-group
|
|
|
|
|
%button{:type=>"button", :class=>"btn btn-link dropdown-toggle", "data-toggle"=>"dropdown"}
|
2013-05-07 15:09:13 +02:00
|
|
|
= event.state.humanize
|
2014-05-14 10:38:36 +02:00
|
|
|
%span.caret
|
|
|
|
|
%ul.dropdown-menu{:role=>"menu"}
|
2014-06-17 10:40:57 +03:00
|
|
|
= render 'change_state_dropdown', event: event
|
2013-05-07 15:09:13 +02:00
|
|
|
|
|
|
|
|
:javascript
|
|
|
|
|
$(document).ready(function() {
|
|
|
|
|
$('#events').dataTable( {
|
|
|
|
|
"bPaginate": false
|
|
|
|
|
} );
|
|
|
|
|
} );
|