Introduce Program to include cfp/rooms/tracks/events/event_types/difficulty_levels
This commit is contained in:
parent
028b82fda8
commit
444356fbc7
117 changed files with 1812 additions and 905 deletions
|
|
@ -1,37 +1,37 @@
|
|||
- if event.transition_possible? :accept
|
||||
%li= link_to 'Accept event',
|
||||
accept_admin_conference_event_path(@conference.short_title, event),
|
||||
accept_admin_conference_program_event_path(@conference.short_title, event),
|
||||
method: :patch, id: "accept_event_#{event.id}"
|
||||
|
||||
- if @conference.email_settings.send_on_accepted?
|
||||
%li= link_to 'Accept event (without email)',
|
||||
accept_admin_conference_event_path(@conference.short_title, event, send_mail: false),
|
||||
accept_admin_conference_program_event_path(@conference.short_title, event, send_mail: false),
|
||||
method: :patch, hint: 'Accept this event without sending an automated email.',
|
||||
id: "accept_event_without_mail_#{event.id}"
|
||||
|
||||
- if event.transition_possible? :reject
|
||||
%li= link_to 'Reject event',
|
||||
reject_admin_conference_event_path(@conference.short_title, event),
|
||||
reject_admin_conference_program_event_path(@conference.short_title, event),
|
||||
method: :patch, confirm: 'Are you sure?', id: "reject_event_#{event.id}"
|
||||
|
||||
- if @conference.email_settings.send_on_rejected?
|
||||
%li= link_to 'Reject event (without email)',
|
||||
reject_admin_conference_event_path(@conference.short_title, event, send_mail: false),
|
||||
reject_admin_conference_program_event_path(@conference.short_title, event, send_mail: false),
|
||||
method: :patch, confirm: 'Are you sure?', id: "reject_event_without_mail_#{event.id}"
|
||||
|
||||
- if event.transition_possible? :restart
|
||||
%li= link_to 'Start review',
|
||||
restart_admin_conference_event_path(@conference.short_title, event),
|
||||
restart_admin_conference_program_event_path(@conference.short_title, event),
|
||||
method: :patch, id: "restart_event_#{event.id}"
|
||||
|
||||
- if event.transition_possible? :confirm
|
||||
%li= link_to 'Confirm event',
|
||||
confirm_admin_conference_event_path(@conference.short_title, event),
|
||||
confirm_admin_conference_program_event_path(@conference.short_title, event),
|
||||
method: :patch, id: "confirm_event_#{event.id}",
|
||||
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',
|
||||
cancel_admin_conference_event_path(@conference.short_title, event),
|
||||
cancel_admin_conference_program_event_path(@conference.short_title, event),
|
||||
method: :patch, id: "cancel_event_#{event.id}",
|
||||
hint: 'Mark this event as cancelled. Usually this means that the speakers had to cancel their appearance.'
|
||||
hint: 'Mark this event as cancelled. Usually this means that the speakers had to cancel their appearance.'
|
||||
|
|
|
|||
|
|
@ -6,7 +6,7 @@
|
|||
%div
|
||||
%a.pull-right.comment-reply-link{href: "#"} Reply
|
||||
.comment-reply
|
||||
= form_tag "#{comment_admin_conference_event_path(@conference.short_title, comment.commentable_id)}", method: :post do
|
||||
= form_tag "#{comment_admin_conference_program_event_path(@conference.short_title, comment.commentable_id)}", method: :post do
|
||||
%input{name: "parent", type: "hidden", value: "#{comment.id}"}
|
||||
%input{name: "authenticity_token", type: "hidden", value: "#{form_authenticity_token}"}
|
||||
%textarea{name: "comment"}
|
||||
|
|
|
|||
|
|
@ -5,7 +5,7 @@
|
|||
%br
|
||||
%small
|
||||
= @event.subtitle
|
||||
= link_to 'Edit', edit_admin_conference_event_path(@conference.short_title, @event), class: 'btn btn-mini btn-primary pull-right'
|
||||
= link_to 'Edit', edit_admin_conference_program_event_path(@conference.short_title, @event), class: 'btn btn-mini btn-primary pull-right'
|
||||
|
||||
.row
|
||||
.col-md-12
|
||||
|
|
@ -24,7 +24,7 @@
|
|||
%ul.dropdown-menu
|
||||
- @event_types.each do |type|
|
||||
%li= link_to type.title,
|
||||
admin_conference_event_path(@conference.short_title,
|
||||
admin_conference_program_event_path(@conference.short_title,
|
||||
@event,
|
||||
event: { event_type_id: type.id }),
|
||||
method: :patch
|
||||
|
|
@ -33,7 +33,7 @@
|
|||
%b Highlight
|
||||
%td
|
||||
= check_box_tag @conference.short_title, @event.id, @event.is_highlight,
|
||||
method: :patch, url: "/admin/conference/#{@conference.short_title}/events/#{@event.id}?event[is_highlight]=",
|
||||
method: :patch, url: "/admin/conference/#{@conference.short_title}/program/events/#{@event.id}?event[is_highlight]=",
|
||||
class: 'switch-checkbox', data: { size: 'small',
|
||||
off_color: 'warning',
|
||||
on_text: 'Yes',
|
||||
|
|
@ -63,7 +63,7 @@
|
|||
%ul.dropdown-menu
|
||||
- @tracks.each do |track|
|
||||
%li= link_to track.name,
|
||||
admin_conference_event_path(@conference.short_title,
|
||||
admin_conference_program_event_path(@conference.short_title,
|
||||
@event,
|
||||
event: { track_id: track.id }),
|
||||
method: :patch
|
||||
|
|
@ -80,7 +80,7 @@
|
|||
<b class="caret"></b>
|
||||
%ul.dropdown-menu
|
||||
- @difficulty_levels.each do |difficulty|
|
||||
%li= link_to difficulty.title, admin_conference_event_path(@conference.short_title,
|
||||
%li= link_to difficulty.title, admin_conference_program_event_path(@conference.short_title,
|
||||
@event,
|
||||
event: { difficulty_level_id: difficulty.id }),
|
||||
method: :patch
|
||||
|
|
@ -89,7 +89,7 @@
|
|||
%b Requires Registration
|
||||
%td
|
||||
= check_box_tag @conference.short_title, @event.id, @event.require_registration,
|
||||
method: :patch, url: "/admin/conference/#{@conference.short_title}/events/#{@event.id}?event[require_registration]=",
|
||||
method: :patch, url: "/admin/conference/#{@conference.short_title}/program/events/#{@event.id}?event[require_registration]=",
|
||||
class: 'switch-checkbox', data: { size: 'small',
|
||||
off_color: 'warning',
|
||||
on_text: 'Yes',
|
||||
|
|
@ -137,7 +137,7 @@
|
|||
%b Description
|
||||
%td= simple_format(@event.description)
|
||||
|
||||
- if @conference.call_for_paper && @conference.call_for_paper.rating && @conference.call_for_paper.rating > 0
|
||||
- if @conference.program && @conference.program.rating && @conference.program.rating > 0
|
||||
= render partial: 'voting'
|
||||
|
||||
.row
|
||||
|
|
@ -147,7 +147,7 @@
|
|||
%ul.media
|
||||
%div
|
||||
.row-fluid
|
||||
= form_tag(comment_admin_conference_event_path(@conference.short_title, @event.id), method: :post) do
|
||||
= form_tag(comment_admin_conference_program_event_path(@conference.short_title, @event.id), method: :post) do
|
||||
= text_area_tag(:comment, '')
|
||||
= submit_tag 'Add Comment', class: 'btn btn-primary pull-right'
|
||||
%br
|
||||
|
|
|
|||
|
|
@ -4,11 +4,11 @@
|
|||
%b Rating
|
||||
%td
|
||||
- if @event.average_rating.to_f > 0
|
||||
#{@event.average_rating}/#{@conference.call_for_paper.rating}
|
||||
#{@event.average_rating}/#{@conference.program.rating}
|
||||
- else
|
||||
Rating: 0/#{@conference.call_for_paper.rating}
|
||||
Rating: 0/#{@conference.program.rating}
|
||||
|
||||
- @conference.call_for_paper.rating.times do |counter|
|
||||
- @conference.program.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');"
|
||||
|
|
@ -27,12 +27,12 @@
|
|||
%td
|
||||
%b Your vote
|
||||
%td
|
||||
- @conference.call_for_paper.rating.times do |counter|
|
||||
- @conference.program.rating.times do |counter|
|
||||
- voted = @event.voted?(@event, current_user)
|
||||
- if voted && voted.rating == counter+1
|
||||
= link_to "", vote_admin_conference_event_path(@conference.short_title, @event, :rating => counter+1), :remote => true, :id =>"label#{counter+1}", :class => "myrating", :voted => true
|
||||
= link_to "", vote_admin_conference_program_event_path(@conference.short_title, @event, :rating => counter+1), :remote => true, :id =>"label#{counter+1}", :class => "myrating", :voted => true
|
||||
- else
|
||||
= link_to "", vote_admin_conference_event_path(@conference.short_title, @event, :rating => counter+1), :remote => true, :id =>"label#{counter+1}", :class => "myrating"
|
||||
= link_to "", vote_admin_conference_program_event_path(@conference.short_title, @event, :rating => counter+1), :remote => true, :id =>"label#{counter+1}", :class => "myrating"
|
||||
%br
|
||||
|
||||
- if @ratings.length > 0
|
||||
|
|
@ -42,7 +42,7 @@
|
|||
%td
|
||||
= rate.name
|
||||
%td
|
||||
- @conference.call_for_paper.rating.times do |counter|
|
||||
- @conference.program.rating.times do |counter|
|
||||
- voted = @event.voted?(@event, rate.user)
|
||||
- if voted && voted.rating == counter+1
|
||||
= label_tag "label#{counter+1}", "", :class => "othersrating", :voted => true
|
||||
|
|
|
|||
|
|
@ -15,7 +15,7 @@
|
|||
%b ID
|
||||
%th
|
||||
%b Title
|
||||
- if @conference.call_for_paper && @conference.call_for_paper.rating && @conference.call_for_paper.rating > 0
|
||||
- if @program.rating_enabled?
|
||||
%th
|
||||
%b Rating
|
||||
%th
|
||||
|
|
@ -39,16 +39,16 @@
|
|||
%td
|
||||
= event.id
|
||||
%td
|
||||
=link_to event.title, admin_conference_event_path(@conference.short_title, event)
|
||||
=link_to event.title, admin_conference_program_event_path(@conference.short_title, event)
|
||||
|
||||
- if @conference.call_for_paper && @conference.call_for_paper.rating && @conference.call_for_paper.rating > 0
|
||||
- if @program.rating_enabled?
|
||||
%td.col-md-1{'data-order' => "#{event.average_rating}"}
|
||||
- if event.average_rating.to_f > 0
|
||||
#{event.average_rating}/#{@conference.call_for_paper.rating}
|
||||
#{event.average_rating}/#{@program.rating}
|
||||
%br
|
||||
#{pluralize(event.voters.length, 'voter')}
|
||||
%br
|
||||
- @conference.call_for_paper.rating.times do |counter|
|
||||
- @program.cfp.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');"
|
||||
|
|
@ -63,7 +63,7 @@
|
|||
%span.label.label-danger
|
||||
Not rated
|
||||
- else
|
||||
0/#{@conference.call_for_paper.rating}
|
||||
0/#{@program.rating}
|
||||
%br
|
||||
|
||||
- if event.submitter && event.submitter.registrations && event.submitter.registrations.count < 1
|
||||
|
|
@ -85,7 +85,7 @@
|
|||
|
||||
%td{'data-order' => "#{event.require_registration}"}
|
||||
= check_box_tag @conference.short_title, event.id, event.require_registration,
|
||||
method: :patch, url: "/admin/conference/#{@conference.short_title}/events/#{event.id}?event[require_registration]=",
|
||||
method: :patch, url: "/admin/conference/#{@conference.short_title}/program/events/#{event.id}?event[require_registration]=",
|
||||
class: 'switch-checkbox', data: { size: 'small',
|
||||
off_color: 'warning',
|
||||
on_text: 'Yes',
|
||||
|
|
@ -93,7 +93,7 @@
|
|||
|
||||
%td{'data-order' => "#{event.is_highlight}"}
|
||||
= check_box_tag @conference.short_title, event.id, event.is_highlight,
|
||||
method: :patch, url: "/admin/conference/#{@conference.short_title}/events/#{event.id}?event[is_highlight]=",
|
||||
method: :patch, url: "/admin/conference/#{@conference.short_title}/program/events/#{event.id}?event[is_highlight]=",
|
||||
class: 'switch-checkbox', data: { size: 'small',
|
||||
off_color: 'warning',
|
||||
on_text: 'Yes',
|
||||
|
|
@ -110,7 +110,7 @@
|
|||
%ul.dropdown-menu
|
||||
- @event_types.each do |type|
|
||||
%li= link_to type.title,
|
||||
admin_conference_event_path(@conference.short_title,
|
||||
admin_conference_program_event_path(@conference.short_title,
|
||||
event,
|
||||
event: { event_type_id: type.id }),
|
||||
method: :patch
|
||||
|
|
@ -125,7 +125,7 @@
|
|||
%ul.dropdown-menu
|
||||
- @tracks.each do |track|
|
||||
%li= link_to track.name,
|
||||
admin_conference_event_path(@conference.short_title,
|
||||
admin_conference_program_event_path(@conference.short_title,
|
||||
event,
|
||||
event: { track_id: track.id }),
|
||||
method: :patch
|
||||
|
|
@ -140,7 +140,7 @@
|
|||
%ul.dropdown-menu
|
||||
- @difficulty_levels.each do |difficulty_level|
|
||||
%li= link_to difficulty_level.title,
|
||||
admin_conference_event_path(@conference.short_title,
|
||||
admin_conference_program_event_path(@conference.short_title,
|
||||
event,
|
||||
event: { difficulty_level_id: difficulty_level.id }),
|
||||
method: :patch
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue