mirror of
https://github.com/openSUSE/osem.git
synced 2026-08-13 19:54:02 +00:00
135 lines
6.5 KiB
Text
135 lines
6.5 KiB
Text
= render :partial => "events_stats"
|
|
|
|
.row
|
|
.col-md-12
|
|
%h2
|
|
Events
|
|
- if @events
|
|
= "(#{@events.length})"
|
|
.well
|
|
%table.table.table-striped.table-bordered.table-hover#events
|
|
%thead
|
|
%th
|
|
%b ID
|
|
%th
|
|
%b Title
|
|
- unless @conference.call_for_papers.blank? or @conference.call_for_papers.rating > 0
|
|
%th
|
|
%b Rating
|
|
%th
|
|
%b Submitter
|
|
%th
|
|
%b Speaker
|
|
%th
|
|
%b Type
|
|
%th
|
|
%b Track
|
|
%th
|
|
%b Difficulty
|
|
%th
|
|
%b State
|
|
- @events.each do |event|
|
|
%tr
|
|
%td
|
|
= event.id
|
|
%td
|
|
=link_to event.title, admin_conference_event_path(@conference.short_title, event)
|
|
|
|
- if @conference.call_for_papers.rating != 0
|
|
%td{:style => "width:96px"}
|
|
- if event.average_rating.to_f > 0
|
|
#{event.average_rating}/#{@conference.call_for_papers.rating}
|
|
%br
|
|
#{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
|
|
0/#{@conference.call_for_papers.rating}
|
|
%br
|
|
|
|
- if event.submitter.registrations.count < 1
|
|
- bgcolor="#F7819F"
|
|
- else
|
|
- bgcolor=""
|
|
%td{:style=>"background-color: #{bgcolor}"}
|
|
- if !event.submitter.nil?
|
|
=link_to event.submitter.public_name, admin_person_path(event.submitter)
|
|
- if event.submitter.registrations.count < 1
|
|
(Unregistered!)
|
|
- else
|
|
Unknown submitter
|
|
%td
|
|
- if speaker = event.speakers.first
|
|
= link_to speaker.public_name, admin_person_path(speaker)
|
|
- else
|
|
Unknown speaker
|
|
- l = link_to "Change", edit_admin_conference_event_speaker_path(@conference.short_title, event), :remote => true
|
|
= "(#{l})".html_safe
|
|
%td
|
|
.dropdown
|
|
= link_to "#", :class => "dropdown-toggle", :id => "type-dropdown" do
|
|
- if event.event_type.nil?
|
|
Event Type
|
|
- else
|
|
= event.event_type.title
|
|
<b class="caret"></b>
|
|
%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
|
|
%td
|
|
.dropdown
|
|
= link_to "#", :class => "dropdown-toggle", :id => "track-dropdown" do
|
|
- if event.track.nil?
|
|
Track
|
|
- else
|
|
= event.track.name
|
|
<b class="caret"></b>
|
|
%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
|
|
%td
|
|
= event.difficulty_level.title if @conference.use_difficulty_levels && event.difficulty_level
|
|
%td
|
|
- if event.state == "withdrawn"
|
|
Withdrawn
|
|
- else
|
|
.dropdown
|
|
= link_to "#", :class => "dropdown-toggle" do
|
|
= event.state.humanize
|
|
<b class="caret"></b>
|
|
%ul.dropdown-menu
|
|
- if event.transition_possible? :accept
|
|
%li= link_to "Accept event (no email)", update_state_admin_conference_event_path(@conference.short_title, event, :transition => :accept, :send_mail => false),
|
|
:method => :put, :hint => "Accept this event without sending an automated email."
|
|
%li= link_to "Accept event (WITH email)", update_state_admin_conference_event_path(@conference.short_title, event, :transition => :accept, :send_mail => true),
|
|
:method => :put, :hint => "Accept this event and send an automated email."
|
|
- if event.transition_possible? :reject
|
|
%li= link_to "Reject event (no email)", update_state_admin_conference_event_path(@conference.short_title, event, :transition => :reject, :send_mail => false),
|
|
:method => :put, :confirm => "Are you sure?",
|
|
:hint => "Reject this event without sending an automated email."
|
|
%li= link_to "Reject event (WITH email)", update_state_admin_conference_event_path(@conference.short_title, event, :transition => :reject, :send_mail => true),
|
|
:method => :put, :confirm => "Are you sure?",
|
|
:hint => "Reject this event and send an automated email."
|
|
- if event.transition_possible? :start_review
|
|
%li= link_to "Start review", update_state_admin_conference_event_path(@conference.short_title, event, :transition => :start_review),
|
|
:method => :put
|
|
- if event.transition_possible? :confirm
|
|
%li= link_to "Confirm event", update_state_admin_conference_event_path(@conference.short_title, event, :transition => :confirm),
|
|
:method => :put, :hint => "Confirm that the speaker(s) will be present and that the event will actually take place."
|
|
- if event.transition_possible? :cancel
|
|
%li= link_to "Cancel event", update_state_admin_conference_event_path(@conference.short_title, event, :transition => :cancel),
|
|
:method => :put, :hint => "Mark this event as cancelled. Usually this means that the speakers had to cancel their appearance."
|
|
|
|
:javascript
|
|
$(document).ready(function() {
|
|
$('#events').dataTable( {
|
|
"bPaginate": false
|
|
} );
|
|
} );
|