Changed Ruby syntax in views. Fixed #1326
This commit is contained in:
parent
b0a84ad1c6
commit
1ca448df6f
74 changed files with 371 additions and 376 deletions
|
|
@ -9,7 +9,7 @@
|
|||
'Difficulty Level',
|
||||
'Room',
|
||||
'State']
|
||||
= CSV.generate_line ["All Events"]
|
||||
= CSV.generate_line ['All Events']
|
||||
= CSV.generate_line headers
|
||||
- @events.each do |event|
|
||||
= CSV.generate_line([event.id, event.title, event.abstract, (event.time.present? ? "#{event.time.strftime("%Y-%m-%d")} #{event.time.strftime("%I:%M%p")} " : ''),
|
||||
|
|
|
|||
|
|
@ -1,15 +1,15 @@
|
|||
%div{style: "padding-left:#{padding}px"}
|
||||
%div{ style: "padding-left:#{padding}px" }
|
||||
.well.comment-section
|
||||
%strong= comment.user.name
|
||||
%i= comment.created_at
|
||||
%p.comment-body= comment.body
|
||||
%div
|
||||
%a.pull-right.comment-reply-link{href: "#"} Reply
|
||||
%a.pull-right.comment-reply-link{ href: '#' } Reply
|
||||
.comment-reply
|
||||
= semantic_form_for :comment, url: "#{comment_admin_conference_program_event_path(@conference.short_title, comment.commentable_id)}", method: :post do |f|
|
||||
= semantic_form_for :comment, url: '#{comment_admin_conference_program_event_path(@conference.short_title, comment.commentable_id)}', method: :post do |f|
|
||||
= f.input :body
|
||||
%input{name: "parent", type: "hidden", value: "#{comment.id}"}
|
||||
%input{name: "authenticity_token", type: "hidden", value: "#{form_authenticity_token}"}
|
||||
%button.btn.btn-primary.pull-right{name: "button", type: "submit"} Add Reply
|
||||
%input{ name: 'parent', type: 'hidden', value: '#{comment.id}' }
|
||||
%input{ name: 'authenticity_token', type: 'hidden', value: '#{form_authenticity_token}' }
|
||||
%button.btn.btn-primary.pull-right{ name: 'button', type: 'submit' } Add Reply
|
||||
- comment.children.each do |child|
|
||||
= render "nested_comments", comment: child, padding: 50
|
||||
= render 'nested_comments', comment: child, padding: 50
|
||||
|
|
|
|||
|
|
@ -99,7 +99,7 @@
|
|||
- if @event.require_registration
|
||||
= registered_text(@event)
|
||||
|
||||
-if @program.languages.present?
|
||||
- if @program.languages.present?
|
||||
%tr
|
||||
%td
|
||||
%b Language
|
||||
|
|
|
|||
|
|
@ -3,4 +3,3 @@
|
|||
= f.input :email
|
||||
= f.input :name
|
||||
= remove_association_link :user, f
|
||||
|
||||
|
|
|
|||
|
|
@ -10,7 +10,7 @@
|
|||
Rating: 0/#{@program.rating}
|
||||
|
||||
- @program.rating.times do |counter|
|
||||
- if @event.average_rating.to_f.round == counter+1
|
||||
- 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
|
||||
|
|
@ -30,18 +30,18 @@
|
|||
%td
|
||||
- if @program.voting_period?
|
||||
- @program.rating.times do |counter|
|
||||
- if @event.voted?(current_user) && @event.user_rating(current_user) == counter+1
|
||||
= 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
|
||||
- if @event.voted?(current_user) && @event.user_rating(current_user) == counter + 1
|
||||
= 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_program_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
|
||||
- else
|
||||
- @conference.program.rating.times do |counter|
|
||||
- if @event.voted?(current_user) && @event.user_rating(current_user) == counter+1
|
||||
= label_tag "label#{counter+1}", '', class: 'othersrating', voted: true
|
||||
- if @event.voted?(current_user) && @event.user_rating(current_user) == counter + 1
|
||||
= label_tag "label#{counter + 1}", '', class: 'othersrating', voted: true
|
||||
= javascript_tag "$('label[voted=true]').prevAll().andSelf().addClass('bright');"
|
||||
- else
|
||||
= label_tag "label#{counter+1}", '', class: 'othersrating'
|
||||
= label_tag "label#{counter + 1}", '', class: 'othersrating'
|
||||
(#{voting_open_or_close(@program)})
|
||||
|
||||
- if @program.show_voting?
|
||||
|
|
@ -54,11 +54,11 @@
|
|||
%td
|
||||
- @conference.program.rating.times do |counter|
|
||||
|
||||
- if @event.voted?(rate.user) && @event.user_rating(rate.user) == counter+1
|
||||
= label_tag "label#{counter+1}", "", :class => "othersrating", :voted => true
|
||||
- if @event.voted?(rate.user) && @event.user_rating(rate.user) == counter + 1
|
||||
= label_tag "label#{counter + 1}", "", class: 'othersrating', voted: true
|
||||
= javascript_tag "$('label[voted=true]').prevAll().andSelf().addClass('bright');"
|
||||
- else
|
||||
= label_tag "label#{counter+1}", "", :class => "othersrating"
|
||||
= label_tag "label#{counter + 1}", "", class: 'othersrating'
|
||||
:javascript
|
||||
$(function () {
|
||||
var checkedId = $("a[voted='true']").attr('id');
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@
|
|||
#{pluralize(event.voters.length, 'voter')}
|
||||
%br
|
||||
- @program.rating.times do |counter|
|
||||
- if event.average_rating.to_f.round == counter+1
|
||||
- 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
|
||||
|
|
|
|||
|
|
@ -1 +1 @@
|
|||
= render 'proposals/form'
|
||||
= render 'proposals/form'
|
||||
|
|
|
|||
|
|
@ -7,26 +7,26 @@
|
|||
.btn-group.pull-right
|
||||
- if can? :read, Event
|
||||
.btn-group
|
||||
%button.btn.btn-default.dropdown-toggle{"data-toggle" => "dropdown", :type => "button", :class => 'btn btn-success'}
|
||||
%button.btn.btn-default.dropdown-toggle{ 'data-toggle' => 'dropdown', type: 'button', class: 'btn btn-success' }
|
||||
Export PDF
|
||||
%span.caret
|
||||
%ul.dropdown-menu{:role => "menu"}
|
||||
%ul.dropdown-menu{ role: 'menu' }
|
||||
%li= link_to 'All Events', admin_conference_program_events_path(@conference.short_title, format: :pdf, event_export_option: 'all')
|
||||
%li= link_to 'Confirmed Events', admin_conference_program_events_path(@conference.short_title, format: :pdf, event_export_option: 'confirmed')
|
||||
%li= link_to 'All Events with Comments', admin_conference_program_events_path(@conference.short_title, format: :pdf, event_export_option: 'all_with_comments')
|
||||
.btn-group
|
||||
%button.btn.btn-default.dropdown-toggle{"data-toggle" => "dropdown", :type => "button", :class => 'btn btn-success'}
|
||||
%button.btn.btn-default.dropdown-toggle{ 'data-toggle' => 'dropdown', type: 'button', class: 'btn btn-success' }
|
||||
Export CSV
|
||||
%span.caret
|
||||
%ul.dropdown-menu{:role => "menu"}
|
||||
%ul.dropdown-menu{ role: 'menu' }
|
||||
%li= link_to 'All', admin_conference_program_events_path(@conference.short_title, format: :csv, event_export_option: 'all')
|
||||
%li= link_to 'Confirmed', admin_conference_program_events_path(@conference.short_title, format: :csv, event_export_option: 'confirmed')
|
||||
%li= link_to 'All with Comments', admin_conference_program_events_path(@conference.short_title, format: :csv, event_export_option: 'all_with_comments')
|
||||
.btn-group
|
||||
%button.btn.btn-default.dropdown-toggle{"data-toggle" => "dropdown", :type => "button", :class => 'btn btn-success'}
|
||||
%button.btn.btn-default.dropdown-toggle{ 'data-toggle' => 'dropdown', type: 'button', class: 'btn btn-success' }
|
||||
Export XLS
|
||||
%span.caret
|
||||
%ul.dropdown-menu{:role => "menu"}
|
||||
%ul.dropdown-menu{ role: 'menu' }
|
||||
%li= link_to 'All', admin_conference_program_events_path(@conference.short_title, format: :xlsx, event_export_option: 'all')
|
||||
%li= link_to 'Confirmed', admin_conference_program_events_path(@conference.short_title, format: :xlsx, event_export_option: 'confirmed')
|
||||
%li= link_to 'All with Comments', admin_conference_program_events_path(@conference.short_title, format: :xlsx, event_export_option: 'all_with_comments')
|
||||
|
|
@ -34,14 +34,14 @@
|
|||
All the submissions of your speakers
|
||||
.row
|
||||
.col-md-4
|
||||
= render partial: 'admin/conferences/doughnut_chart', locals: {title: 'Events state', data: @event_distribution}
|
||||
= render partial: 'admin/conferences/doughnut_chart', locals: { title: 'Events state', data: @event_distribution }
|
||||
.col-md-4
|
||||
= render partial: 'admin/conferences/doughnut_chart', locals: {title: 'Confirmed events scheduled', data: @scheduled_event_distribution}
|
||||
= render partial: 'admin/conferences/doughnut_chart', locals: { title: 'Confirmed events scheduled', data: @scheduled_event_distribution }
|
||||
.col-md-4
|
||||
= render partial: 'admin/conferences/doughnut_chart', locals: {title: 'Tracks of confirmed events', data: @tracks_distribution_confirmed}
|
||||
= render partial: 'admin/conferences/doughnut_chart', locals: { title: 'Tracks of confirmed events', data: @tracks_distribution_confirmed }
|
||||
.row
|
||||
.col-md-12
|
||||
%div.margin-event-table
|
||||
.margin-event-table
|
||||
%table.table.table-striped.table-bordered.table-hover.datatable
|
||||
%thead
|
||||
%th
|
||||
|
|
@ -55,7 +55,7 @@
|
|||
%b Submitter
|
||||
%th
|
||||
%b Speaker
|
||||
-if @program.languages.present?
|
||||
- if @program.languages.present?
|
||||
%th
|
||||
%b Language
|
||||
%th
|
||||
|
|
@ -80,17 +80,17 @@
|
|||
= link_to event.title, admin_conference_program_event_path(@conference.short_title, event)
|
||||
|
||||
- if @program.rating_enabled?
|
||||
%td.col-md-1{'data-order' => "#{event.average_rating}"}
|
||||
%td.col-md-1{ 'data-order' => "#{event.average_rating}" }
|
||||
= render partial: 'voting_index', locals: { event: event }
|
||||
|
||||
- if event.submitter && event.submitter.registrations && event.submitter.registrations.count < 1
|
||||
- bgcolor="#F7819F"
|
||||
- bgcolor = '#F7819F'
|
||||
- else
|
||||
- bgcolor=""
|
||||
%td{:style=>"background-color: #{bgcolor}"}
|
||||
- bgcolor = ''
|
||||
%td{ style: "background-color: #{bgcolor}" }
|
||||
- if @program.show_voting?
|
||||
- unless event.submitter.nil?
|
||||
=link_to event.submitter.name, admin_user_path(event.submitter)
|
||||
= link_to event.submitter.name, admin_user_path(event.submitter)
|
||||
- if event.submitter.registrations.count < 1
|
||||
(Unregistered!)
|
||||
- else
|
||||
|
|
@ -106,11 +106,11 @@
|
|||
- else
|
||||
%i Hidden
|
||||
|
||||
-if @program.languages.present?
|
||||
- if @program.languages.present?
|
||||
%td
|
||||
= event.language
|
||||
|
||||
%td.text-center{'data-order' => "#{event.require_registration}"}
|
||||
%td.text-center{ 'data-order' => "#{event.require_registration}" }
|
||||
= check_box_tag @conference.short_title, event.id, event.require_registration,
|
||||
method: :patch, url: "/admin/conferences/#{@conference.short_title}/program/events/#{event.id}?event[require_registration]=",
|
||||
class: 'switch-checkbox', data: { size: 'small',
|
||||
|
|
@ -121,7 +121,7 @@
|
|||
%br
|
||||
= link_to registered_text(event), registrations_admin_conference_program_event_path(@conference.short_title, event), class: 'btn btn-xs btn-default'
|
||||
|
||||
%td.text-center{'data-order' => "#{event.is_highlight}"}
|
||||
%td.text-center{ 'data-order' => "#{event.is_highlight}" }
|
||||
= check_box_tag @conference.short_title, event.id, event.is_highlight,
|
||||
method: :patch, url: "/admin/conferences/#{@conference.short_title}/program/events/#{event.id}?event[is_highlight]=",
|
||||
class: 'switch-checkbox', data: { size: 'small',
|
||||
|
|
@ -131,7 +131,7 @@
|
|||
|
||||
%td
|
||||
.btn-group
|
||||
%button{type: 'button', class: 'btn btn-link dropdown-toggle', 'data-toggle' => 'dropdown'}
|
||||
%button{ type: 'button', class: 'btn btn-link dropdown-toggle', 'data-toggle' => 'dropdown' }
|
||||
- if event.event_type.nil?
|
||||
Event Type
|
||||
- else
|
||||
|
|
@ -146,7 +146,7 @@
|
|||
method: :patch
|
||||
%td
|
||||
.btn-group
|
||||
%button{type: 'button', class: 'btn btn-link dropdown-toggle', 'data-toggle' => 'dropdown'}
|
||||
%button{ type: 'button', class: 'btn btn-link dropdown-toggle', 'data-toggle' => 'dropdown' }
|
||||
- if event.track.nil?
|
||||
Track
|
||||
- else
|
||||
|
|
@ -161,7 +161,7 @@
|
|||
method: :patch
|
||||
%td
|
||||
.btn-group
|
||||
%button{type: 'button', class: 'btn btn-link dropdown-toggle', 'data-toggle' => 'dropdown'}
|
||||
%button{ type: 'button', class: 'btn btn-link dropdown-toggle', 'data-toggle' => 'dropdown' }
|
||||
- if event.difficulty_level.nil?
|
||||
Difficulty
|
||||
- else
|
||||
|
|
@ -177,10 +177,10 @@
|
|||
|
||||
%td
|
||||
.btn-group
|
||||
%button{type: 'button', class: 'btn btn-link dropdown-toggle', 'data-toggle' => 'dropdown'}
|
||||
%button{ type: 'button', class: 'btn btn-link dropdown-toggle', 'data-toggle' => 'dropdown' }
|
||||
= event.state.humanize
|
||||
%span.caret
|
||||
%ul.dropdown-menu{role: 'menu'}
|
||||
%ul.dropdown-menu{ role: 'menu' }
|
||||
= render 'change_state_dropdown', event: event
|
||||
%td.text-center
|
||||
= link_to "#{event.comment_threads.count}", admin_conference_program_event_path(@conference.short_title, event), anchor: 'comments-div'
|
||||
|
|
|
|||
|
|
@ -40,5 +40,5 @@
|
|||
%td
|
||||
- if event_registration.registration.attended
|
||||
%i.fa.fa-check.text-success
|
||||
-else
|
||||
- else
|
||||
%i.fa.fa-close.text-danger
|
||||
|
|
|
|||
|
|
@ -3,20 +3,20 @@
|
|||
%li.active
|
||||
= link_to 'All Events', '#all', 'data-toggle' => 'tab'
|
||||
%li
|
||||
%a{href: '#missing-commercial', 'data-toggle' => 'tab'}
|
||||
%a{ href: '#missing-commercial', 'data-toggle' => 'tab' }
|
||||
Events without Commercials
|
||||
%span.label.label-danger{style: 'border-radius: 1em;'}
|
||||
%span.label.label-danger{ style: 'border-radius: 1em;' }
|
||||
= @events_missing_commercial.length
|
||||
%li
|
||||
%a{href: '#requirements', 'data-toggle' => 'tab'}
|
||||
%a{ href: '#requirements', 'data-toggle' => 'tab' }
|
||||
Speaker Requirements
|
||||
%span.label.label-success{style: 'border-radius: 1em;'}
|
||||
%span.label.label-success{ style: 'border-radius: 1em;' }
|
||||
= @events_with_requirements.length
|
||||
|
||||
%li
|
||||
%a{href: '#missing-speakers', 'data-toggle' => 'tab'}
|
||||
%a{ href: '#missing-speakers', 'data-toggle' => 'tab' }
|
||||
Missing Speakers
|
||||
%span.label.label-danger{style: 'border-radius: 1em;'}
|
||||
%span.label.label-danger{ style: 'border-radius: 1em;' }
|
||||
= @missing_event_speakers.length
|
||||
|
||||
.tab-content
|
||||
|
|
@ -51,13 +51,13 @@
|
|||
.small (Presented by #{event.speaker_names})
|
||||
|
||||
- %w(registered biography commercials subtitle difficulty_level).each do |info|
|
||||
%td{'data-order' => "#{progress_status[info]}"}
|
||||
%span{class: class_for_todo(progress_status[info])}
|
||||
%span{class: [icon_for_todo(progress_status[info]), 'fa-lg']}
|
||||
%td{ 'data-order' => "#{progress_status[info]}" }
|
||||
%span{ class: class_for_todo(progress_status[info]) }
|
||||
%span{ class: [icon_for_todo(progress_status[info]), 'fa-lg'] }
|
||||
- if @program.tracks.any?
|
||||
%td{'data-order' => "#{progress_status['track']}"}
|
||||
%span{class: class_for_todo(progress_status['track'])}
|
||||
%span{class: [icon_for_todo(progress_status['track']), 'fa-lg']}
|
||||
%td{ 'data-order' => "#{progress_status['track']}" }
|
||||
%span{ class: class_for_todo(progress_status['track']) }
|
||||
%span{ class: [icon_for_todo(progress_status['track']), 'fa-lg'] }
|
||||
|
||||
#missing-commercial.tab-pane
|
||||
.row
|
||||
|
|
|
|||
|
|
@ -1,13 +1,13 @@
|
|||
.tabbable
|
||||
%ul.nav.nav-tabs
|
||||
%li.active
|
||||
= link_to "Proposal", "#proposal-content", "data-toggle"=>"tab"
|
||||
= link_to 'Proposal', '#proposal-content', 'data-toggle' => 'tab'
|
||||
%li
|
||||
= link_to "History", "#history-content", "data-toggle"=>"tab"
|
||||
= link_to 'History', '#history-content', 'data-toggle' => 'tab'
|
||||
%li
|
||||
%a{href: '#proposal-tasks', "data-toggle"=>"tab"}
|
||||
%a{ href: '#proposal-tasks', 'data-toggle' => 'tab' }
|
||||
Tasks
|
||||
%span.label.label-danger{style: 'border-radius: 1em;'}
|
||||
%span.label.label-danger{ style: 'border-radius: 1em;' }
|
||||
- progress_status = @event.progress_status
|
||||
= progress_status.reject{ |_key, value| value || value.nil? }.length
|
||||
%li
|
||||
|
|
@ -47,7 +47,7 @@
|
|||
id: @event.id, anchor: 'commercials-content')
|
||||
|
||||
%small.text-muted
|
||||
= distance_of_time_in_words(Time.now,version.created_at) + ' ago'
|
||||
= distance_of_time_in_words(Time.now, version.created_at) + ' ago'
|
||||
%br
|
||||
= "(#{version.created_at.strftime('%B %-d, %Y %H:%M')})"
|
||||
|
||||
|
|
@ -65,28 +65,28 @@
|
|||
%table.table.table-hover
|
||||
%tr
|
||||
%td= link_to 'Submitter must be registered to the conference', admin_conference_registrations_path(@event.program.conference.short_title)
|
||||
%td{'class'=>class_for_todo(progress_status['registered'])}
|
||||
%span{'class'=>[icon_for_todo(progress_status['registered']), 'fa-lg']}
|
||||
%td{ 'class' => class_for_todo(progress_status['registered']) }
|
||||
%span{ 'class' => [icon_for_todo(progress_status['registered']), 'fa-lg'] }
|
||||
%tr
|
||||
%td= link_to 'Fill out submitter biography', edit_admin_user_path(@event.submitter)
|
||||
%td{'class'=>class_for_todo(progress_status['biography'])}
|
||||
%span{'class'=>[icon_for_todo(progress_status['biography']), 'fa-lg']}
|
||||
%td{ 'class' => class_for_todo(progress_status['biography']) }
|
||||
%span{ 'class' => [icon_for_todo(progress_status['biography']), 'fa-lg'] }
|
||||
%tr
|
||||
%td= link_to 'Add a subtitle', edit_admin_conference_program_event_path(@event.program.conference.short_title, @event)
|
||||
%td{'class'=>class_for_todo(progress_status['subtitle'])}
|
||||
%span{'class'=>[icon_for_todo(progress_status['subtitle']), 'fa-lg']}
|
||||
%td{ 'class' => class_for_todo(progress_status['subtitle']) }
|
||||
%span{ 'class' => [icon_for_todo(progress_status['subtitle']), 'fa-lg'] }
|
||||
%tr
|
||||
%td= link_to 'Add a commercial', edit_admin_conference_program_event_path(@event.program.conference.short_title, @event, anchor: 'commercials-content')
|
||||
%td{'class'=>class_for_todo(progress_status['commercials'])}
|
||||
%span{'class'=>[icon_for_todo(progress_status['commercials']), 'fa-lg']}
|
||||
%td{ 'class' => class_for_todo(progress_status['commercials']) }
|
||||
%span{ 'class' => [icon_for_todo(progress_status['commercials']), 'fa-lg'] }
|
||||
- unless progress_status['track'].nil?
|
||||
%tr
|
||||
%td= link_to 'Add a track', edit_admin_conference_program_event_path(@event.program.conference.short_title, @event)
|
||||
%td{'class'=>class_for_todo(progress_status['track'])}
|
||||
%span{'class'=>[icon_for_todo(progress_status['track']), 'fa-lg']}
|
||||
%td{ 'class' => class_for_todo(progress_status['track']) }
|
||||
%span{ 'class' => [icon_for_todo(progress_status['track']), 'fa-lg'] }
|
||||
%tr
|
||||
%td= link_to 'Add a difficulty level', edit_admin_conference_program_event_path(@event.program.conference.short_title, @event)
|
||||
%td{'class'=>class_for_todo(progress_status['difficulty_level'])}
|
||||
%span{'class'=>[icon_for_todo(progress_status['difficulty_level']), 'fa-lg']}
|
||||
%td{ 'class' => class_for_todo(progress_status['difficulty_level']) }
|
||||
%span{ 'class' => [icon_for_todo(progress_status['difficulty_level']), 'fa-lg'] }
|
||||
#proposal-commercials.tab-pane
|
||||
= render partial: 'shared/media_items', locals: { commercials: @event.commercials }
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue