diff --git a/app/views/admin/campaigns/_form.html.haml b/app/views/admin/campaigns/_form.html.haml index 507cb540..6b826300 100644 --- a/app/views/admin/campaigns/_form.html.haml +++ b/app/views/admin/campaigns/_form.html.haml @@ -2,14 +2,14 @@ .col-md-12 .page-header %h1 - -if @campaign.new_record? + - if @campaign.new_record? New Campaign = @campaign.name .row .col-md-8 - = semantic_form_for(@campaign, :url => (@campaign.new_record? ? admin_conference_campaigns_path : admin_conference_campaign_path(@conference.short_title, @campaign))) do |f| + = semantic_form_for(@campaign, url: (@campaign.new_record? ? admin_conference_campaigns_path : admin_conference_campaign_path(@conference.short_title, @campaign))) do |f| = f.inputs do = f.input :name = f.inputs name: 'UTM Parameters' do diff --git a/app/views/admin/campaigns/index.html.haml b/app/views/admin/campaigns/index.html.haml index 97e29dd8..7066474e 100644 --- a/app/views/admin/campaigns/index.html.haml +++ b/app/views/admin/campaigns/index.html.haml @@ -18,16 +18,16 @@ %tbody - @campaigns.each do |campaign| %tr - %td{'id'=> "name_#{campaign.id}"} + %td{ 'id' => "name_#{campaign.id}" } = campaign.name - %td{'id'=> "visits_#{campaign.id}"} + %td{ 'id' => "visits_#{campaign.id}" } = campaign.visits_count - %td{'id'=> "registrations_#{campaign.id}"} + %td{ 'id' => "registrations_#{campaign.id}" } = campaign.registrations_count - %td{'id'=> "submissions_#{campaign.id}"} + %td{ 'id' => "submissions_#{campaign.id}" } = campaign.submissions_count %td - %a.copyLink{'href'=> '#', 'data-url'=>root_path + campaign.url_parameters} + %a.copyLink{ 'href' => '#', 'data-url' => root_path + campaign.url_parameters } Copy link %td .btn-group diff --git a/app/views/admin/cfps/_form.html.haml b/app/views/admin/cfps/_form.html.haml index 57acd091..e8110406 100644 --- a/app/views/admin/cfps/_form.html.haml +++ b/app/views/admin/cfps/_form.html.haml @@ -4,8 +4,8 @@ %h1 Call for Papers .row .col-md-8 - = semantic_form_for(@cfp, url: admin_conference_program_cfp_path(@conference.short_title),html: {multipart: true}) do |f| - = f.input :start_date, as: :string, input_html: { id: "registration-period-start-datepicker", start_date: @conference.start_date, end_date: @conference.end_date, readonly: "readonly" } - = f.input :end_date, as: :string, input_html: { id: "registration-period-end-datepicker", readonly: "readonly" } + = semantic_form_for(@cfp, url: admin_conference_program_cfp_path(@conference.short_title), html: {multipart: true}) do |f| + = f.input :start_date, as: :string, input_html: { id: 'registration-period-start-datepicker', start_date: @conference.start_date, end_date: @conference.end_date, readonly: 'readonly' } + = f.input :end_date, as: :string, input_html: { id: 'registration-period-end-datepicker', readonly: 'readonly' } %p.text-right - = f.action :submit, as: :button, button_html: { class: "btn btn-primary" } + = f.action :submit, as: :button, button_html: { class: 'btn btn-primary' } diff --git a/app/views/admin/cfps/show.html.haml b/app/views/admin/cfps/show.html.haml index af7a2415..09441508 100644 --- a/app/views/admin/cfps/show.html.haml +++ b/app/views/admin/cfps/show.html.haml @@ -52,7 +52,7 @@ Edit = link_to(admin_conference_program_cfp_path(@conference.short_title), method: 'delete', class: 'btn btn-danger', data: { confirm: 'Are you sure you want to delete the CfP?' }) do Delete --else +- else .row .col-md-12.text-right = link_to 'Create Call for Papers', new_admin_conference_program_cfp_path(@conference.short_title), class: 'btn btn-primary' diff --git a/app/views/admin/comments/index.html.haml b/app/views/admin/comments/index.html.haml index dd504f65..d7dccd14 100644 --- a/app/views/admin/comments/index.html.haml +++ b/app/views/admin/comments/index.html.haml @@ -7,15 +7,15 @@ .col-md-12 %ul.nav.nav-tabs#commentsTable %li.active - %a{:href=>"#unread_comments", "data-toggle"=>"tab"} + %a{ href: '#unread_comments', 'data-toggle' => 'tab' } %span.fa.fa-comment Unread %li - %a{:href=>"#posted_comments", "data-toggle"=>"tab"} + %a{ href: '#posted_comments', 'data-toggle' => 'tab' } %span.fa.fa-pencil Posted %li - %a{:href=>"#all_comments", "data-toggle"=>"tab"} + %a{ href: '#all_comments', 'data-toggle' => 'tab' } %span.fa.fa-comments-o All .tab-content diff --git a/app/views/admin/commercials/index.html.haml b/app/views/admin/commercials/index.html.haml index 5534ad03..32779e2c 100644 --- a/app/views/admin/commercials/index.html.haml +++ b/app/views/admin/commercials/index.html.haml @@ -4,7 +4,7 @@ %h1 Commercials %p.text-muted Conference commercials will be displayed on the events in the - = link_to "schedule,", conference_schedule_path(@conference.short_title) + = link_to 'schedule,', conference_schedule_path(@conference.short_title) if the event speaker didn't add an event commercial. - if can? :create, @conference.commercials.new .row @@ -25,7 +25,7 @@ - if commercial.persisted? .col-md-4 .thumbnail - .flexvideo{ id: "resource-content-#{commercial.id}"} + .flexvideo{ id: "resource-content-#{commercial.id}" } = render partial: 'shared/media_item', locals: { commercial: commercial } .caption - if can? :update, commercial diff --git a/app/views/admin/conferences/_campaigns.html.haml b/app/views/admin/conferences/_campaigns.html.haml index 8a3dd9d2..e979562a 100644 --- a/app/views/admin/conferences/_campaigns.html.haml +++ b/app/views/admin/conferences/_campaigns.html.haml @@ -8,15 +8,15 @@ since #{campaigns.values[0]['created_at']}. %p That is - %strong{'style'=>"color: #{target_progress_color(campaigns.values[0]['progress'])};"} + %strong{ 'style' => "color: #{target_progress_color(campaigns.values[0]['progress'])};" } #{campaigns.values[0]['progress']} % of your target, there are - %strong{'style'=>"color: #{days_left_color(campaigns.values[0]['days_left'])};"} + %strong{ 'style' => "color: #{days_left_color(campaigns.values[0]['days_left'])};" } #{pluralize(campaigns.values[0]['days_left'], 'day')} left. .row .col-md-12 - %div{'style'=>'display: none;', 'id'=>"#{name}"} - - campaigns.drop(1).each do |(key, value)| + %div{ 'style' => 'display: none;', 'id' => "#{name}" } + - campaigns.drop(1).each do |(_key, value)| %div %p Your target "#{value['target_name']}" from campaign "#{value['campaign_name']}" has generated @@ -25,16 +25,16 @@ since #{value['created_at']}. %p That is - %strong{'style'=>"color: #{target_progress_color(value['progress'])};"} + %strong{ 'style' => "color: #{target_progress_color(value['progress'])};" } #{value['progress']} % of your target, there are - %strong{'style'=>"color: #{days_left_color(value['days_left'])};"} + %strong{ 'style' => "color: #{days_left_color(value['days_left'])};" } #{pluralize(value['days_left'], 'day')} left. .row .col-md-12 - if campaigns.length > 1 - %a.show_targets{'href'=>'#', 'data-name'=>"#{name}"} + %a.show_targets{ 'href' => '#', 'data-name' => "#{name}" } more - else %h5.text-warning.text-center - No Campaigns! \ No newline at end of file + No Campaigns! diff --git a/app/views/admin/conferences/_doughnut_chart.html.haml b/app/views/admin/conferences/_doughnut_chart.html.haml index 9e2990f9..c8ef55fc 100644 --- a/app/views/admin/conferences/_doughnut_chart.html.haml +++ b/app/views/admin/conferences/_doughnut_chart.html.haml @@ -1,6 +1,6 @@ .text-center %h4 #{title} - %canvas.doughnut_chart{"data-chart"=>data.to_json} + %canvas.doughnut_chart{ 'data-chart' => data.to_json } - if data - data.each do |key, value| - %span{"style"=>"border-bottom: 3px solid #{value['color']}"} #{key}: #{value['value']} \ No newline at end of file + %span{ 'style' => "border-bottom: 3px solid #{value['color']}" } #{key}: #{value['value']} diff --git a/app/views/admin/conferences/_line_chart.html.haml b/app/views/admin/conferences/_line_chart.html.haml index c57a6e09..cd49df10 100644 --- a/app/views/admin/conferences/_line_chart.html.haml +++ b/app/views/admin/conferences/_line_chart.html.haml @@ -5,25 +5,25 @@ = title .row .col-md-12 - .chart_data{ "data-chart"=>"#{y.to_json}", "data-conferences"=>"#{conferences.to_json}", - "data-deactive"=>"#{deactive_conferences.to_json}", "data-weeks"=>"#{x.to_json}", - "data-active"=>"#{active_conferences.to_json}"} - %canvas.line_chart{ :id => "line_chart_#{name}", "data-name"=>"#{name}" } + .chart_data{ 'data-chart' => "#{y.to_json}", 'data-conferences' => "#{conferences.to_json}", + 'data-deactive' => "#{deactive_conferences.to_json}", 'data-weeks' => "#{x.to_json}", + 'data-active' => "#{active_conferences.to_json}" } + %canvas.line_chart{ id: "line_chart_#{name}", 'data-name' => "#{name}" } .row .col-md-12 .text-center = unit .row .col-md-12 - .conferenceCheckboxes{ :id => "#{name}Checkboxes", "data-name"=>"#{name}" } + .conferenceCheckboxes{ id: "#{name}Checkboxes", 'data-name' => "#{name}" } - if active_conferences && deactive_conferences && conferences && conferences.length > 1 - active_conferences.each do |conference| %div - %span{ "style"=>"border-bottom: 3px solid #{conference[:color]};", "data-chart"=> "#{name}" } - %input{ "type"=>"checkbox", "name"=>"#{conference[:short_title]}", "checked"=>"checked"} + %span{ 'style' => "border-bottom: 3px solid #{conference[:color]};", 'data-chart' => "#{name}" } + %input{ 'type' => 'checkbox', 'name' => "#{conference[:short_title]}", 'checked' => 'checked' } #{conference[:short_title]} - deactive_conferences.each do |conference| %div - %span{"style"=>"border-bottom: 3px solid #{conference[:color]};", "data-chart"=> "#{name}" } - %input{"type"=>"checkbox", "name"=>"#{conference[:short_title]}" } + %span{ 'style' => "border-bottom: 3px solid #{conference[:color]};", 'data-chart' => "#{name}" } + %input{ 'type' => 'checkbox', 'name' => "#{conference[:short_title]}" } #{conference[:short_title]} diff --git a/app/views/admin/conferences/_recent_submissions.html.haml b/app/views/admin/conferences/_recent_submissions.html.haml index 0f6c0037..359d5586 100644 --- a/app/views/admin/conferences/_recent_submissions.html.haml +++ b/app/views/admin/conferences/_recent_submissions.html.haml @@ -19,7 +19,7 @@ %td= link_to event.title, admin_conference_program_event_path(event.program.conference.short_title, event) %td= link_to event.program.conference.title, admin_conference_path(event.program.conference.short_title) %td - .span{'class'=>label_for(event.state)} #{event.state.humanize} + .span{ 'class' => label_for(event.state) } #{event.state.humanize} - else %h5.text-warning.text-center No submissions! diff --git a/app/views/admin/conferences/_recent_users.html.haml b/app/views/admin/conferences/_recent_users.html.haml index 1a7a81e2..9c7e1082 100644 --- a/app/views/admin/conferences/_recent_users.html.haml +++ b/app/views/admin/conferences/_recent_users.html.haml @@ -14,12 +14,12 @@ %td= link_to user.email, admin_user_path(user.id) %td= user.created_at.strftime('%m/%d/%Y') %td - = check_box_tag user.id, user.id, user.confirmed?, - method: :patch, - url: "/admin/users/#{user.id}/toggle_confirmation?user[to_confirm]=", - class: 'switch-checkbox', + = check_box_tag user.id, user.id, user.confirmed?, + method: :patch, + url: "/admin/users/#{user.id}/toggle_confirmation?user[to_confirm]=", + class: 'switch-checkbox', readonly: true, - data: { size: 'small', on_color: 'success', off_color: 'warning', on_text: 'Yes', off_text: 'No' } + data: { size: 'small', on_color: 'success', off_color: 'warning', on_text: 'Yes', off_text: 'No' } - else %h5.text-warning.text-center No sign ups! diff --git a/app/views/admin/conferences/_targets.html.haml b/app/views/admin/conferences/_targets.html.haml index 682d02ca..88f6c8a1 100644 --- a/app/views/admin/conferences/_targets.html.haml +++ b/app/views/admin/conferences/_targets.html.haml @@ -7,13 +7,13 @@ Target 1 .row .col-md-10 - .progress{'title'=>"#{targets.keys[0]}"} - .progress-bar{ 'role'=>'progressbar', 'aria-valuenow'=>"#{targets.values[0]}", 'aria-valuemin'=>'0', - 'aria-valuemax'=>'100', 'style'=>"width: #{targets.values[0]}%;"} + .progress{ 'title' => "#{targets.keys[0]}" } + .progress-bar{ 'role' => 'progressbar', 'aria-valuenow' => " #{targets.values[0]}", 'aria-valuemin' => '0', + 'aria-valuemax' => '100', 'style' => "width: #{targets.values[0]}%;" } = "#{targets.values[0]} %" .row .col-md-8.col-md-offset-2 - %div{'style'=>'display: none;', 'id'=>"#{name}"} + %div{ 'style' => 'display: none;', 'id' => "#{name}" } - targets.drop(1).each_with_index do |(key, value), index| .row .col-md-10 @@ -21,12 +21,12 @@ = "Target #{index + 2}" .row .col-md-10 - .progress{'title'=>"#{key}"} - .progress-bar{ 'role'=>'progressbar', 'aria-valuenow'=>"#{value}", 'aria-valuemin'=>'0', - 'aria-valuemax'=>'100', 'style'=>"width: #{value}%;" } + .progress{ 'title' => "#{key}" } + .progress-bar{ 'role' => 'progressbar', 'aria-valuenow' => "#{value}", 'aria-valuemin' => '0', + 'aria-valuemax' => '100', 'style' => "width: #{value}%;" } = "#{value} %" .row .col-md-2.col-md-offset-2 - if targets.length > 1 - %a.show_targets{'href'=>'#', 'data-name'=>"#{name}"} + %a.show_targets{ 'href' => '#', 'data-name' => "#{name}" } more diff --git a/app/views/admin/conferences/_todo_list.html.haml b/app/views/admin/conferences/_todo_list.html.haml index 387a47c7..6a091f11 100644 --- a/app/views/admin/conferences/_todo_list.html.haml +++ b/app/views/admin/conferences/_todo_list.html.haml @@ -3,11 +3,11 @@ %h4 Conference progress .progress - .progress-bar{ 'role'=>'progressbar', 'aria-valuenow'=>"#{conference_progress['process']}", 'aria-valuemin'=>'0', - 'aria-valuemax'=>'100', 'style'=>"width: #{conference_progress['process']}%;" } + .progress-bar{ 'role' => 'progressbar', 'aria-valuenow' => "#{conference_progress['process']}", 'aria-valuemin' => '0', + 'aria-valuemax' => '100', 'style' => "width: #{conference_progress['process']}%;" } = conference_progress['process'] + '%' - %li{'class'=>"list-group-item #{class_for_todo(conference_progress['registration'])}"} - %span{'class'=>icon_for_todo(conference_progress['registration'])} + %li{ 'class' => "list-group-item #{class_for_todo(conference_progress['registration'])}" } + %span{ 'class' => icon_for_todo(conference_progress['registration']) } - if can? :update, @conference - if conference.registration_period = link_to 'Set up registration period', edit_admin_conference_registration_period_path(conference_progress['short_title']) @@ -15,14 +15,14 @@ = link_to 'Set up registration period', new_admin_conference_registration_period_path(conference_progress['short_title']) - else Set up registration period - %li{'class'=>"list-group-item #{class_for_todo(conference_progress['cfp'])}"} - %span{'class'=>icon_for_todo(conference_progress['cfp'])} + %li{ 'class' => "list-group-item #{class_for_todo(conference_progress['cfp'])}" } + %span{ 'class' => icon_for_todo(conference_progress['cfp']) } - if can? :update, Cfp.new(program_id: @program.id) = link_to 'Set up call for papers', admin_conference_program_cfp_path(conference_progress['short_title']) - else Set up call for papers - %li{'class'=>"list-group-item #{class_for_todo(conference_progress['venue'])}"} - %span{'class'=>icon_for_todo(conference_progress['venue'])} + %li{ 'class' => "list-group-item #{class_for_todo(conference_progress['venue'])}" } + %span{ 'class' => icon_for_todo(conference_progress['venue']) } - if can? :update, @conference.venue - if conference.venue = link_to 'Add venue', edit_admin_conference_venue_path(conference_progress['short_title']) @@ -30,32 +30,32 @@ = link_to 'Add venue', new_admin_conference_venue_path(conference_progress['short_title']) - else Add venue - %li{'class'=>"list-group-item #{class_for_todo(conference_progress['rooms'])}"} - %span{'class'=>icon_for_todo(conference_progress['rooms'])} + %li{ 'class' => "list-group-item #{class_for_todo(conference_progress['rooms'])}" } + %span{ 'class' => icon_for_todo(conference_progress['rooms']) } - if @conference.venue && (can? :update, @conference.venue.rooms.build) = link_to 'Add rooms', admin_conference_venue_rooms_path(conference_progress['short_title']) - else Add rooms - %li{'class'=>"list-group-item #{class_for_todo(conference_progress['tracks'])}"} - %span{'class'=>icon_for_todo(conference_progress['tracks'])} + %li{ 'class' => "list-group-item #{class_for_todo(conference_progress['tracks'])}" } + %span{ 'class' => icon_for_todo(conference_progress['tracks']) } - if can? :update, @conference.program.tracks.build = link_to 'Add tracks', admin_conference_program_tracks_path(conference_progress['short_title']) - else Add tracks - %li{'class'=>"list-group-item #{class_for_todo(conference_progress['event_types'])}"} - %span{'class'=>icon_for_todo(conference_progress['event_types'])} + %li{ 'class' => "list-group-item #{class_for_todo(conference_progress['event_types'])}" } + %span{ 'class' => icon_for_todo(conference_progress['event_types']) } - if can? :update, @conference.program.event_types.build = link_to 'Add event types', admin_conference_program_event_types_path(conference_progress['short_title']) - else Add event types - %li{'class'=>"list-group-item #{class_for_todo(conference_progress['difficulty_levels'])}"} - %span{'class'=>icon_for_todo(conference_progress['difficulty_levels'])} + %li{ 'class' => "list-group-item #{class_for_todo(conference_progress['difficulty_levels'])}" } + %span{ 'class' => icon_for_todo(conference_progress['difficulty_levels']) } - if can? :update, @conference.program.difficulty_levels.build = link_to 'Add difficulty levels', admin_conference_program_difficulty_levels_path(conference_progress['short_title']) - else Add difficulty levels - %li{class: "list-group-item #{class_for_todo(conference_progress['splashpage'])}"} - %span{'class'=>icon_for_todo(conference_progress['splashpage'])} + %li{ class: "list-group-item #{class_for_todo(conference_progress['splashpage'])}" } + %span{ 'class' => icon_for_todo(conference_progress['splashpage']) } - if can? :update, @conference = link_to 'Set up a Splashpage', admin_conference_splashpage_path(conference_progress['short_title']) - else diff --git a/app/views/admin/conferences/_top_submitter.html.haml b/app/views/admin/conferences/_top_submitter.html.haml index 1589785f..9f220249 100644 --- a/app/views/admin/conferences/_top_submitter.html.haml +++ b/app/views/admin/conferences/_top_submitter.html.haml @@ -6,7 +6,7 @@ - @top_submitter.each do |key, value| .row.top-submitter .col-md-2 - = image_tag(key.gravatar_url(size: '25'), title: "Yo #{key.name}!", :alt => '', 'class'=>'img-circle img-responsive text-center') + = image_tag(key.gravatar_url(size: '25'), title: "Yo #{key.name}!", alt: '', 'class' => 'img-circle img-responsive text-center') .col-md-10 %h4 = link_to key.name, admin_user_path(key) diff --git a/app/views/admin/conferences/edit.html.haml b/app/views/admin/conferences/edit.html.haml index f038ec8b..de8d6316 100644 --- a/app/views/admin/conferences/edit.html.haml +++ b/app/views/admin/conferences/edit.html.haml @@ -6,23 +6,23 @@ The most basic settings of your conference .row .col-md-8 - = semantic_form_for(@conference, :url => admin_conference_path(@conference.short_title),:html => {:multipart => true}) do |f| - = f.input :title, :hint => "The full title of the conference, e.g. 'openSUSE Conference 2014'" - = f.input :short_title, :hint => "A short title, e.g. 'oSC14', to be used in URLs" + = semantic_form_for(@conference, url: admin_conference_path(@conference.short_title), html: {multipart: true}) do |f| + = f.input :title, hint: "The full title of the conference, e.g. 'openSUSE Conference 2014'" + = f.input :short_title, hint: "A short title, e.g. 'oSC14', to be used in URLs" = f.input :description, hint: markdown_hint('A description of the conference.'), input_html: { rows: 5, data: { provide: 'markdown-editable' } } - = f.input :color, :hint => "The color will be used eg for the dashboard.", :input_html => {:size => 6, :type => "color"} + = f.input :color, hint: 'The color will be used eg for the dashboard.', input_html: {size: 6, type: 'color'} = f.label 'Conference Logo' %br - if @conference.picture? = image_tag @conference.picture.thumb.url - = f.input :picture, :label => false, :hint => "This will be displayed on the front page." + = f.input :picture, label: false, hint: 'This will be displayed on the front page.' = f.hidden_field :picture_cache - = f.inputs :name => "Scheduling" do - = f.input :timezone, :as => :time_zone, :hint => "The conference time zone" - = f.input :start_date, :as => :string, :input_html => { :id => "conference-start-datepicker", :readonly => "readonly" } - = f.input :end_date, :as => :string, :input_html => { :id => "conference-end-datepicker", :readonly => "readonly" } - = f.input :start_hour, :input_html => {size: 2, type: 'number', min: 0, max: 23} - = f.input :end_hour, :input_html => {size: 2, type: 'number', min: 1, max: 24} - = f.inputs name: "Registrations" do - = f.input :registration_limit, as: :number, in: 0..9999, hint: "Limit the number of registrations to the conference (0 no limit). You currently have " + pluralize(@conference.registrations.count,'registration') - = f.action :submit, :as => :button, :button_html => {:class => "btn btn-primary"} + = f.inputs name: 'Scheduling' do + = f.input :timezone, as: :time_zone, hint: 'The conference time zone' + = f.input :start_date, as: :string, input_html: { id: 'conference-start-datepicker', readonly: 'readonly' } + = f.input :end_date, as: :string, input_html: { id: 'conference-end-datepicker', readonly: 'readonly' } + = f.input :start_hour, input_html: {size: 2, type: 'number', min: 0, max: 23} + = f.input :end_hour, input_html: {size: 2, type: 'number', min: 1, max: 24} + = f.inputs name: 'Registrations' do + = f.input :registration_limit, as: :number, in: 0..9999, hint: 'Limit the number of registrations to the conference (0 no limit). You currently have ' + pluralize(@conference.registrations.count, 'registration') + = f.action :submit, as: :button, button_html: {class: 'btn btn-primary'} diff --git a/app/views/admin/conferences/index.html.haml b/app/views/admin/conferences/index.html.haml index 71c2c916..24c2d0f2 100644 --- a/app/views/admin/conferences/index.html.haml +++ b/app/views/admin/conferences/index.html.haml @@ -8,7 +8,7 @@ %small #{'User'.pluralize(@total_user)} - if @new_user - %span.label.label-success{title: "+ #{@new_user} since you last logged in!"} + %span.label.label-success{ title: "+ #{@new_user} since you last logged in!" } + = @new_user .col-sm-4.col-xs-4 @@ -20,7 +20,7 @@ %small #{'Registration'.pluralize(@total_reg)} - if @new_reg - %span.label.label-success{title: "+#{@new_reg} since you last logged in!"} + %span.label.label-success{ title: "+#{@new_reg} since you last logged in!" } + = @new_reg .col-sm-4.col-xs-4 @@ -32,7 +32,7 @@ %small #{'Submission'.pluralize(@total_submissions)} - if @new_submissions - %span.label.label-success{title: "+#{@new_submissions} since you last logged in!"} + %span.label.label-success{ title: "+#{@new_submissions} since you last logged in!" } + = @new_submissions @@ -47,7 +47,7 @@ x: @registration_weeks, unit: 'weeks' } .col-md-4 - = render partial: 'doughnut_chart', locals: { title: 'Events',data: @event_distribution } + = render partial: 'doughnut_chart', locals: { title: 'Events', data: @event_distribution } .row#submissions .col-md-8 = render partial: 'line_chart', locals: { title: 'Submissions over time', @@ -59,20 +59,20 @@ x: @cfp_weeks, unit: 'weeks' } .col-md-4 - = render partial: 'doughnut_chart', locals: { title: 'User',data: @user_distribution } + = render partial: 'doughnut_chart', locals: { title: 'User', data: @user_distribution } .row .col-md-8 %ul.nav.nav-tabs#recentTable %li.active - %a{:href=>"#recent_user", "data-toggle"=>"tab"} + %a{ href: '#recent_user', 'data-toggle' => 'tab' } %span.fa.fa-user Recent Users %li - %a{:href=>"#recent_reg", "data-toggle"=>"tab"} + %a{ href: '#recent_reg', 'data-toggle' => 'tab' } %span.fa.fa-check-square Recent Registrations %li - %a{:href=>"#recent_submissions", "data-toggle"=>"tab"} + %a{ href: '#recent_submissions', 'data-toggle' => 'tab' } %span.fa.fa-file-text Recent Submissions .tab-content diff --git a/app/views/admin/conferences/new.html.haml b/app/views/admin/conferences/new.html.haml index 5c0cfb09..014758de 100644 --- a/app/views/admin/conferences/new.html.haml +++ b/app/views/admin/conferences/new.html.haml @@ -1,11 +1,11 @@ .row .col-md-8 - = semantic_form_for(@conference, :url => admin_conferences_path) do |f| + = semantic_form_for(@conference, url: admin_conferences_path) do |f| = f.inputs 'Basic Information' do = f.input :title, hint: "The name of your conference as it shall appear throughout the site. Example: 'OpenSUSE Conference 2013'", input_html: { required: 'required' } = f.input :short_title, hint: "A short and unique handle for your conference, using only letters, numbers, underscores, and dashes. This will be used to identify your conference in URLs etc. Example: 'froscon2011'", - input_html: { required: 'required', pattern: '[a-zA-Z0-9_-]+', title: 'Only letters, numbers, underscores, and dashes.' }, :prepend => conferences_url + '/' + input_html: { required: 'required', pattern: '[a-zA-Z0-9_-]+', title: 'Only letters, numbers, underscores, and dashes.' }, prepend: conferences_url + '/' = f.inputs 'Scheduling' do = f.input :timezone, as: :time_zone, default: Time.zone.name, hint: 'Please select in what time zone your conference will take place.' = f.input :start_date, as: :string, input_html: { id: 'conference-start-datepicker', required: 'required' } diff --git a/app/views/admin/conferences/show.html.haml b/app/views/admin/conferences/show.html.haml index 7ce1c408..dec58da8 100644 --- a/app/views/admin/conferences/show.html.haml +++ b/app/views/admin/conferences/show.html.haml @@ -12,7 +12,7 @@ %small #{'Registration'.pluralize(@total_reg)} - if @new_reg - %span.label.label-success{title: "+#{@new_reg} since you last logged in!"} + %span.label.label-success{ title: "+#{@new_reg} since you last logged in!" } + = @new_reg @@ -25,7 +25,7 @@ %small #{'Submission'.pluralize(@total_submissions)} - if @new_submissions - %span.label.label-success{title: "+#{@new_submissions} since you last logged in!"} + %span.label.label-success{ title: "+#{@new_submissions} since you last logged in!" } + = @new_submissions @@ -38,7 +38,7 @@ %small #{'Hour'.pluralize(@program_length)} - if @new_reg - %span.label.label-success{title: "+#{@new_program_length} since you last logged in!"} + %span.label.label-success{ title: "+#{@new_program_length} since you last logged in!" } + = @new_program_length @@ -73,11 +73,11 @@ .col-md-12#doughnut %ul.nav.nav-tabs#doughnut_tabs %li.active - %a{:href=>"#distribution_all", "data-toggle"=>"tab"} + %a{ href: '#distribution_all', 'data-toggle' => 'tab' } %span.fa.fa-star All %li - %a{:href=>"#distribution_confirmed", "data-toggle"=>"tab"} + %a{ href: '#distribution_confirmed', 'data-toggle' => 'tab' } %span.fa.fa-comment Confirmed .tab-content @@ -102,11 +102,11 @@ .col-md-8 %ul.nav.nav-tabs#recentTable %li.active - %a{:href=>"#recent_reg", "data-toggle"=>"tab"} + %a{ href: '#recent_reg', 'data-toggle' => 'tab' } %span.fa.fa-user Recent Registrations %li - %a{:href=>"#recent_submissions", "data-toggle"=>"tab"} + %a{ href: '#recent_submissions', 'data-toggle' => 'tab' } %span.fa.fa-file-text Recent Submissions .tab-content diff --git a/app/views/admin/contacts/edit.html.haml b/app/views/admin/contacts/edit.html.haml index 9dd62b88..872977b0 100644 --- a/app/views/admin/contacts/edit.html.haml +++ b/app/views/admin/contacts/edit.html.haml @@ -6,11 +6,11 @@ How people can contact you .row .col-md-8 - = semantic_form_for(@contact, :url => admin_conference_contact_path(@conference.short_title),:html => {:multipart => true}) do |f| - = f.inputs :name => 'Mail' do + = semantic_form_for(@contact, url: admin_conference_contact_path(@conference.short_title), html: {multipart: true}) do |f| + = f.inputs name: 'Mail' do = f.input :email, hint: 'Contact email address for your conference. Will be used as reply-to address in emails sent out by the system.' = f.input :sponsor_email, hint: 'This will appear in the sponsor segment of the splash for the sponsors to contact to the organizers' - = f.inputs :name => 'Social Media' do + = f.inputs name: 'Social Media' do = f.input :social_tag, hint: "The hashtag you'll use on Twitter and Google+. Don't include the '#' sign!'" = f.input :facebook, hint: 'This will appear in the social media section as link to the Facebook page of your Conference' = f.input :googleplus, label: 'Google+ Url', hint: 'This will appear in the social media section as the link to the Google+ Page of your Conference' diff --git a/app/views/admin/difficulty_levels/_form.html.haml b/app/views/admin/difficulty_levels/_form.html.haml index 534fa179..fa47a88b 100644 --- a/app/views/admin/difficulty_levels/_form.html.haml +++ b/app/views/admin/difficulty_levels/_form.html.haml @@ -8,9 +8,9 @@ = @difficulty_level.title .row .col-md-8 - = semantic_form_for(@difficulty_level, :url => (@difficulty_level.new_record? ? admin_conference_program_difficulty_levels_path : admin_conference_program_difficulty_level_path(@conference.short_title, @difficulty_level))) do |f| - = f.input :title, :required => true - = f.input :description, :input_html => {:rows => 3, :class => "span6"} - = f.input :color, :input_html => {:size => 6, :type => "color"} + = semantic_form_for(@difficulty_level, url: (@difficulty_level.new_record? ? admin_conference_program_difficulty_levels_path : admin_conference_program_difficulty_level_path(@conference.short_title, @difficulty_level))) do |f| + = f.input :title, required: true + = f.input :description, input_html: {rows: 3, class: 'span6'} + = f.input :color, input_html: {size: 6, type: 'color'} %p.text-right - = f.action :submit, as: :button, button_html: { class: 'btn btn-primary' } \ No newline at end of file + = f.action :submit, as: :button, button_html: { class: 'btn btn-primary' } diff --git a/app/views/admin/difficulty_levels/index.html.haml b/app/views/admin/difficulty_levels/index.html.haml index 85b598b5..ed7b3730 100644 --- a/app/views/admin/difficulty_levels/index.html.haml +++ b/app/views/admin/difficulty_levels/index.html.haml @@ -20,10 +20,10 @@ %td = difficulty_level.description %td - %span.label{style: "background-color: #{difficulty_level.color}; color: #{ contrast_color(difficulty_level.color) };"} + %span.label{ style: "background-color: #{difficulty_level.color}; color: #{ contrast_color(difficulty_level.color) };" } = difficulty_level.color %td - .btn-group{role: "group"} + .btn-group{ role: 'group' } = link_to 'Edit', edit_admin_conference_program_difficulty_level_path(@conference.short_title, difficulty_level.id), method: :get, class: 'btn btn-primary' = link_to 'Delete', admin_conference_program_difficulty_level_path(@conference.short_title, difficulty_level.id), diff --git a/app/views/admin/emails/_help.html.haml b/app/views/admin/emails/_help.html.haml index d71b6f9e..535cd097 100644 --- a/app/views/admin/emails/_help.html.haml +++ b/app/views/admin/emails/_help.html.haml @@ -1,4 +1,4 @@ -.template-help{:id => id} +.template-help{ id: id } Valid attributes: %table.table %tr @@ -48,7 +48,7 @@ %tr %td {cfp_end_date} %td The call for papers end date - -if @conference.program.schedule_public + - if @conference.program.schedule_public %td {schedule_link} %td The link to complete schedule of the conference - if @conference.splashpage && @conference.splashpage.public diff --git a/app/views/admin/emails/index.html.haml b/app/views/admin/emails/index.html.haml index 4470748b..4b380b86 100644 --- a/app/views/admin/emails/index.html.haml +++ b/app/views/admin/emails/index.html.haml @@ -3,103 +3,103 @@ = semantic_form_for(@settings, url: admin_conference_email_path(@conference.short_title, @conference.email_settings), html: {multipart: true}) do |f| .row .col-md-12 - %div{role: "tabpanel"} + %div{ role: 'tabpanel' } / Nav tabs - %ul.nav.nav-tabs{role: "tablist"} - %li.active{role: "presentation"} - %a{"aria-controls" => "onboarding", "data-toggle" => "tab", href: "#onboarding", role: "tab"} Onboarding - %li{role: "presentation"} - %a{"aria-controls" => "proposal", "data-toggle" => "tab", href: "#proposal", role: "tab"} Proposal - %li{role: "presentation"} - %a{"aria-controls" => "notifications", "data-toggle" => "tab", href: "#notifications", role: "tab"} Update Notifications - %li{role: "presentation"} - %a{"aria-controls" => "cfp", "data-toggle" => "tab", href: "#cfp", role: "tab"} Call for Papers + %ul.nav.nav-tabs{ role: 'tablist' } + %li.active{ role: 'presentation' } + %a{ 'aria-controls' => 'onboarding', 'data-toggle' => 'tab', href: '#onboarding', role: 'tab' } Onboarding + %li{ role: 'presentation' } + %a{ 'aria-controls' => 'proposal', 'data-toggle' => 'tab', href: '#proposal', role: 'tab' } Proposal + %li{ role: 'presentation' } + %a{ 'aria-controls' => 'notifications', 'data-toggle' => 'tab', href: '#notifications', role: 'tab' } Update Notifications + %li{ role: 'presentation' } + %a{ 'aria-controls' => 'cfp', 'data-toggle' => 'tab', href: '#cfp', role: 'tab' } Call for Papers / Tab panes .tab-content - #onboarding.tab-pane.active{role: "tabpanel"} - = f.input :send_on_registration, label: "Send an email when the user registers for the conference?", input_html: {"data-name"=>"email_settings_registration_subject", "class"=>"send_on_radio"} + #onboarding.tab-pane.active{ role: 'tabpanel' } + = f.input :send_on_registration, label: 'Send an email when the user registers for the conference?', input_html: {'data-name' => 'email_settings_registration_subject', 'class' => 'send_on_radio'} = f.input :registration_subject = f.input :registration_body, input_html: { rows: 10, cols: 20 } - %a.btn.btn-link.control_label.load_template{'data-subject-input-id' => 'email_settings_registration_subject', 'data-subject-text' => 'Thank you for registering', - 'data-body-input-id'=>'email_settings_registration_body', - 'data-body-text'=>"Dear {name},\n\nThank you for Registering for the conference {conference}.\nPlease complete your registration by filling out your travel information.\n\nIf you are unable to attend please unregister online:\n{registrationlink}\n\nFeel free to contact us with any questions or concerns.\nWe look forward to see you there.\n\nBest wishes\n\n{conference} Team"} Load Template - %a.btn.btn-link.control_label.template_help_link{"data-name"=>"registration_help"} Show Help - = render partial: 'help', locals: {id: 'registration_help', show_event_variables: false} - #proposal.tab-pane{role: "tabpanel"} - = f.input :send_on_accepted, label: "Send an email when the proposal is accepted?", input_html: {"data-name"=>"email_settings_accepted_subject", "class"=>"send_on_radio"} + %a.btn.btn-link.control_label.load_template{ 'data-subject-input-id' => 'email_settings_registration_subject', 'data-subject-text' => 'Thank you for registering', + 'data-body-input-id' => 'email_settings_registration_body', + 'data-body-text' => "Dear {name},\n\nThank you for Registering for the conference {conference}.\nPlease complete your registration by filling out your travel information.\n\nIf you are unable to attend please unregister online:\n{registrationlink}\n\nFeel free to contact us with any questions or concerns.\nWe look forward to see you there.\n\nBest wishes\n\n{conference} Team" } Load Template + %a.btn.btn-link.control_label.template_help_link{ 'data-name' => 'registration_help' } Show Help + = render partial: 'help', locals: { id: 'registration_help', show_event_variables: false } + #proposal.tab-pane{ role: 'tabpanel' } + = f.input :send_on_accepted, label: 'Send an email when the proposal is accepted?', input_html: { 'data-name' => 'email_settings_accepted_subject', 'class' => 'send_on_radio' } = f.input :accepted_subject = f.input :accepted_body, input_html: { rows: 10, cols: 20 } - %a.btn.btn-link.control_label.load_template{'data-subject-input-id' => 'email_settings_accepted_subject', + %a.btn.btn-link.control_label.load_template{ 'data-subject-input-id' => 'email_settings_accepted_subject', 'data-subject-text' => 'Your submission has been accepted', - 'data-body-input-id'=>'email_settings_accepted_body', - 'data-body-text'=>"Dear {name}\n\nWe are very pleased to inform you that your submission {eventtitle} has been accepted for the conference {conference}.\n\nThe public page of your submission can be found at:\n{proposalslink}\nIf you haven´t already registered for {conference}, please do as soon as possible:\n{registrationlink}\n\nFeel free to contact us with any questions or concerns.\n\nWe look forward to seeing you there.\n\nBest wishes\n\n{conference} Team"} Load Template - %a.btn.btn-link.control_label.template_help_link{"data-name"=>"accepted_help"} Show Help - = render partial: 'help', locals: {id: 'accepted_help', show_event_variables: true} - = f.input :send_on_rejected, label: "Send an email when the proposal is rejected?", input_html: {"data-name"=>"email_settings_rejected_subject", "class"=>"send_on_radio"} + 'data-body-input-id' => 'email_settings_accepted_body', + 'data-body-text' => "Dear {name}\n\nWe are very pleased to inform you that your submission {eventtitle} has been accepted for the conference {conference}.\n\nThe public page of your submission can be found at:\n{proposalslink}\nIf you haven´t already registered for {conference}, please do as soon as possible:\n{registrationlink}\n\nFeel free to contact us with any questions or concerns.\n\nWe look forward to seeing you there.\n\nBest wishes\n\n{conference} Team" } Load Template + %a.btn.btn-link.control_label.template_help_link{ 'data-name' => 'accepted_help' } Show Help + = render partial: 'help', locals: { id: 'accepted_help', show_event_variables: true } + = f.input :send_on_rejected, label: 'Send an email when the proposal is rejected?', input_html: { 'data-name' => 'email_settings_rejected_subject', 'class' => 'send_on_radio' } = f.input :rejected_subject = f.input :rejected_body, input_html: { rows: 10, cols: 20 } - %a.btn.btn-link.control_label.load_template{'data-subject-input-id' => 'email_settings_rejected_subject', + %a.btn.btn-link.control_label.load_template{ 'data-subject-input-id' => 'email_settings_rejected_subject', 'data-subject-text' => 'Your submission has been rejected', - 'data-body-input-id'=>'email_settings_rejected_body', - 'data-body-text'=>"Dear {name},\n\nThank you for your submission {eventtitle} for the conference {conference}.\nAfter careful consideration we are sorry to inform you that your submission has been rejected.\n\n\nBest wishes\n\n{conference} Team"} Load Template - %a.btn.btn-link.control_label.template_help_link{"data-name"=>"rejected_help"} Show Help + 'data-body-input-id' => 'email_settings_rejected_body', + 'data-body-text' => "Dear {name},\n\nThank you for your submission {eventtitle} for the conference {conference}.\nAfter careful consideration we are sorry to inform you that your submission has been rejected.\n\n\nBest wishes\n\n{conference} Team" } Load Template + %a.btn.btn-link.control_label.template_help_link{ 'data-name' => 'rejected_help' } Show Help = render partial: 'help', locals: {id: 'rejected_help', show_event_variables: true} - = f.input :send_on_confirmed_without_registration, label: "Send an email when a user has a confirmed proposal, but isn't yet registered?", input_html: {"data-name"=>"email_settings_confirmed_without_registration_subject", "class"=>"send_on_radio"} + = f.input :send_on_confirmed_without_registration, label: "Send an email when a user has a confirmed proposal, but isn't yet registered?", input_html: {'data-name' => 'email_settings_confirmed_without_registration_subject', 'class' => 'send_on_radio'} = f.input :confirmed_without_registration_subject = f.input :confirmed_without_registration_body, input_html: { rows: 10, cols: 20 } %a.btn.btn-link.control_label.load_template{ 'data-subject-input-id' => 'email_settings_confirmed_without_registration_subject', 'data-subject-text' => 'Your proposal has been confirmed without registration', 'data-body-input-id' => 'email_settings_confirmed_without_registration_body', 'data-body-text' => "Dear {name},\n\nThank you for the confirmation of {eventtitle}. Unfortunately you are not registered for the conference {conference}. Please register as soon as possible:\n{registrationlink}\n\nFeel free to contact us with any questions or concerns.\n\nWe look forward to seeing you there.\n\nBest wishes\n\n{conference} Team" } Load Template - %a.btn.btn-link.control_label.template_help_link{"data-name"=>"confirmed_help"} Show Help + %a.btn.btn-link.control_label.template_help_link{ 'data-name' => 'confirmed_help' } Show Help = render partial: 'help', locals: {id: 'confirmed_help', show_event_variables: true} - #notifications.tab-pane{role: "tabpanel"} - = f.input :send_on_conference_dates_updated, label: "This is to notify all participants that the conference dates has been changed.", input_html: {"data-name"=>"email_settings_conference_dates_updated_subject", "class"=>"send_on_radio"} + #notifications.tab-pane{ role: 'tabpanel' } + = f.input :send_on_conference_dates_updated, label: 'This is to notify all participants that the conference dates has been changed.', input_html: { 'data-name' => 'email_settings_conference_dates_updated_subject', 'class' => 'send_on_radio' } = f.input :conference_dates_updated_subject = f.input :conference_dates_updated_body, input_html: { rows: 10, cols: 20 } - %a.btn.btn-link.control_label.load_template{'data-subject-input-id' => 'email_settings_conference_dates_updated_subject', + %a.btn.btn-link.control_label.load_template{ 'data-subject-input-id' => 'email_settings_conference_dates_updated_subject', 'data-subject-text' => 'The dates of the conference have changed', - 'data-body-input-id'=>'email_settings_conference_dates_updated_body', - 'data-body-text'=>"Dear {name},\n\nThe date of {conference} has changed.\n New Dates : {conference_start_date} - {conference_end_date}.\n\nFeel free to contact us with any questions or concerns.\n\nWe look forward to seeing you there.\n\nBest wishes\n\n{conference} Team"} Load Template - %a.btn.btn-link.control_label.template_help_link{"data-name"=>"updated_dates_help"} Show Help + 'data-body-input-id' => 'email_settings_conference_dates_updated_body', + 'data-body-text' => "Dear {name},\n\nThe date of {conference} has changed.\n New Dates : {conference_start_date} - {conference_end_date}.\n\nFeel free to contact us with any questions or concerns.\n\nWe look forward to seeing you there.\n\nBest wishes\n\n{conference} Team" } Load Template + %a.btn.btn-link.control_label.template_help_link{ 'data-name' => 'updated_dates_help' } Show Help = render partial: 'help', locals: {id: 'updated_dates_help', show_event_variables: false} - = f.input :send_on_conference_registration_dates_updated, label: "This is to notify all participants that the conference registration dates has been changed.", input_html: {"data-name"=>"email_settings_conference_registration_dates_updated_subject", "class"=>"send_on_radio"} + = f.input :send_on_conference_registration_dates_updated, label: 'This is to notify all participants that the conference registration dates has been changed.', input_html: {'data-name' => 'email_settings_conference_registration_dates_updated_subject', 'class' => 'send_on_radio'} = f.input :conference_registration_dates_updated_subject = f.input :conference_registration_dates_updated_body, input_html: { rows: 10, cols: 20 } - %a.btn.btn-link.control_label.load_template{'data-subject-input-id' => 'email_settings_conference_registration_dates_updated_subject', + %a.btn.btn-link.control_label.load_template{ 'data-subject-input-id' => 'email_settings_conference_registration_dates_updated_subject', 'data-subject-text' => 'The registration dates have changed', - 'data-body-input-id'=>'email_settings_conference_registration_dates_updated_body', - 'data-body-text'=>"Dear {name},\n\nThe registration date of {conference} has changed.\n New Dates : {registration_start_date} - {registration_end_date}.\n\nFeel free to contact us with any questions or concerns.\n\nWe look forward to seeing you there.\n\nBest wishes\n\n{conference} Team"} Load Template - %a.btn.btn-link.control_label.template_help_link{"data-name"=>"updated_registrations_dates_help"} Show Help + 'data-body-input-id' => 'email_settings_conference_registration_dates_updated_body', + 'data-body-text' => "Dear {name},\n\nThe registration date of {conference} has changed.\n New Dates : {registration_start_date} - {registration_end_date}.\n\nFeel free to contact us with any questions or concerns.\n\nWe look forward to seeing you there.\n\nBest wishes\n\n{conference} Team" } Load Template + %a.btn.btn-link.control_label.template_help_link{ 'data-name' => 'updated_registrations_dates_help' } Show Help = render partial: 'help', locals: {id: 'updated_registrations_dates_help', show_event_variables: false} - = f.input :send_on_venue_updated, label: 'Send an email on updating the Venue.', input_html: {"data-name"=>"email_settings_venue_updated_subject", "class"=>"send_on_radio"} + = f.input :send_on_venue_updated, label: 'Send an email on updating the Venue.', input_html: { 'data-name' => 'email_settings_venue_updated_subject', 'class' => 'send_on_radio' } = f.input :venue_updated_subject = f.input :venue_updated_body, input_html: { rows: 10, cols: 20 } - %a.btn.btn-link.control_label.load_template{'data-subject-input-id' => 'email_settings_venue_updated_subject', + %a.btn.btn-link.control_label.load_template{ 'data-subject-input-id' => 'email_settings_venue_updated_subject', 'data-subject-text' => 'The venue has changed', - 'data-body-input-id'=>'email_settings_venue_updated_body', - 'data-body-text'=>"Dear {name},\n\nThe Conference venue of {conference} has changed. New location is: {venue}.\n Address: {venue_address}.\n\nFeel free to contact us with any questions or concerns.\n\nWe look forward to seeing you there.\n\nBest wishes\n\n{conference} Team"} Load Template - %a.btn.btn-link.control_label.template_help_link{"data-name"=>"updated_venue_help"} Show Help + 'data-body-input-id' => 'email_settings_venue_updated_body', + 'data-body-text' => "Dear {name},\n\nThe Conference venue of {conference} has changed. New location is: {venue}.\n Address: {venue_address}.\n\nFeel free to contact us with any questions or concerns.\n\nWe look forward to seeing you there.\n\nBest wishes\n\n{conference} Team" } Load Template + %a.btn.btn-link.control_label.template_help_link{ 'data-name' => 'updated_venue_help' } Show Help = render partial: 'help', locals: {id: 'updated_venue_help', show_event_variables: false} - #cfp.tab-pane{role: "tabpanel"} - = f.input :send_on_program_schedule_public, hint: "This will notify all participants when the dates are updated or when the schedule is made public" - = f.input :program_schedule_public_subject, hint: "This subject will used whenever dates are updated or when the schedule is made public" + #cfp.tab-pane{ role: 'tabpanel' } + = f.input :send_on_program_schedule_public, hint: 'This will notify all participants when the dates are updated or when the schedule is made public' + = f.input :program_schedule_public_subject, hint: 'This subject will used whenever dates are updated or when the schedule is made public' = f.input :program_schedule_public_body, input_html: { rows: 10, cols: 20 } %a.btn.btn-link.control_label.load_template{ 'data-subject-input-id' => 'email_settings_program_schedule_public_subject', 'data-subject-text' => 'The schedule has been released', 'data-body-input-id' => 'email_settings_program_schedule_public_body', 'data-body-text' => "Dear {name},\n\nThe schedule for {conference} has been announced.\nLink to Schedule {schedule_link}\n\nBest wishes\n{conference} Team" } Load Template - %a.btn.btn-link.control_label.template_help_link{"data-name"=>"updated_cfp_help"} Show Help + %a.btn.btn-link.control_label.template_help_link{ 'data-name' => 'updated_cfp_help' } Show Help = render partial: 'help', locals: {id: 'updated_cfp_help', show_event_variables: false} - = f.input :send_on_cfp_dates_updated, hint: "This will notify all participants when the dates are updated or when the schedule is made public" - = f.input :cfp_dates_updated_subject, hint: "This subject will used whenever dates are updated or when the schedule is made public" + = f.input :send_on_cfp_dates_updated, hint: 'This will notify all participants when the dates are updated or when the schedule is made public' + = f.input :cfp_dates_updated_subject, hint: 'This subject will used whenever dates are updated or when the schedule is made public' = f.input :cfp_dates_updated_body, input_html: { rows: 10, cols: 20 } - %a.btn.btn-link.control_label.load_template{'data-subject-input-id' => 'email_settings_cfp_dates_updated_subject', + %a.btn.btn-link.control_label.load_template{ 'data-subject-input-id' => 'email_settings_cfp_dates_updated_subject', 'data-subject-text' => 'The Call for Papers dates have changed', - 'data-body-input-id'=>'email_settings_cfp_dates_updated_body', - 'data-body-text'=>"Dear {name},\n\nThe Conference Call for Papers Details of {conference} has changed.\nNew Dates : {cfp_start_date} - {cfp_end_date}.\n Link to Schedule {schedule_link} \n\nBest wishes\n\n{conference} Team"} Load Template - %a.btn.btn-link.control_label.template_help_link{"data-name"=>"updated_cfp_help"} Show Help + 'data-body-input-id' => 'email_settings_cfp_dates_updated_body', + 'data-body-text' => "Dear {name},\n\nThe Conference Call for Papers Details of {conference} has changed.\nNew Dates : {cfp_start_date} - {cfp_end_date}.\n Link to Schedule {schedule_link} \n\nBest wishes\n\n{conference} Team" } Load Template + %a.btn.btn-link.control_label.template_help_link{ 'data-name' => 'updated_cfp_help' } Show Help = render partial: 'help', locals: {id: 'updated_cfp_help', show_event_variables: false} .row .col-md-12 - = f.action :submit, as: :button, button_html: {class: "btn btn-primary"} + = f.action :submit, as: :button, button_html: { class: 'btn btn-primary' } diff --git a/app/views/admin/event_types/_form.html.haml b/app/views/admin/event_types/_form.html.haml index 74d68151..3f3702b4 100644 --- a/app/views/admin/event_types/_form.html.haml +++ b/app/views/admin/event_types/_form.html.haml @@ -8,12 +8,12 @@ = @event_type.title .row .col-md-12 - = semantic_form_for(@event_type, :url => (@event_type.new_record? ? admin_conference_program_event_types_path : admin_conference_program_event_type_path(@conference.short_title, @event_type))) do |f| + = semantic_form_for(@event_type, url: (@event_type.new_record? ? admin_conference_program_event_types_path : admin_conference_program_event_type_path(@conference.short_title, @event_type))) do |f| = f.input :title - = f.input :length, :input_html => {size: 3, type: 'number', step: EventType::LENGTH_STEP, min: EventType::LENGTH_STEP} + = f.input :length, input_html: {size: 3, type: 'number', step: EventType::LENGTH_STEP, min: EventType::LENGTH_STEP} = f.input :description - = f.input :minimum_abstract_length, :input_html => {:size => 3} - = f.input :maximum_abstract_length, :input_html => {:size => 3} - = f.input :color, :input_html => { :size => 6, :type => 'color' } + = f.input :minimum_abstract_length, input_html: {size: 3} + = f.input :maximum_abstract_length, input_html: {size: 3} + = f.input :color, input_html: { size: 6, type: 'color' } %p.text-right = f.action :submit, as: :button, button_html: { class: 'btn btn-primary' } diff --git a/app/views/admin/event_types/index.html.haml b/app/views/admin/event_types/index.html.haml index 5fb82b3c..4d3c27b8 100644 --- a/app/views/admin/event_types/index.html.haml +++ b/app/views/admin/event_types/index.html.haml @@ -28,10 +28,10 @@ = "#{event_type.minimum_abstract_length} - #{event_type.maximum_abstract_length}" Words %td - %span.label{style: "background-color: #{event_type.color}; color: #{ contrast_color(event_type.color) };"} + %span.label{ style: "background-color: #{event_type.color}; color: #{ contrast_color(event_type.color) };" } = event_type.color %td - .btn-group{role: "group"} + .btn-group{ role: 'group' } = link_to 'Edit', edit_admin_conference_program_event_type_path(@conference.short_title, event_type.id), method: :get, class: 'btn btn-primary' = link_to 'Delete', admin_conference_program_event_type_path(@conference.short_title, event_type.id), diff --git a/app/views/admin/events/_all_events.csv.haml b/app/views/admin/events/_all_events.csv.haml index b61859da..9423c4ee 100644 --- a/app/views/admin/events/_all_events.csv.haml +++ b/app/views/admin/events/_all_events.csv.haml @@ -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")} " : ''), diff --git a/app/views/admin/events/_nested_comments.html.haml b/app/views/admin/events/_nested_comments.html.haml index 0c97a3f0..8ab3cabb 100644 --- a/app/views/admin/events/_nested_comments.html.haml +++ b/app/views/admin/events/_nested_comments.html.haml @@ -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 diff --git a/app/views/admin/events/_proposal.html.haml b/app/views/admin/events/_proposal.html.haml index 5fb80a7c..26f2f686 100644 --- a/app/views/admin/events/_proposal.html.haml +++ b/app/views/admin/events/_proposal.html.haml @@ -99,7 +99,7 @@ - if @event.require_registration = registered_text(@event) - -if @program.languages.present? + - if @program.languages.present? %tr %td %b Language diff --git a/app/views/admin/events/_user_fields.html.haml b/app/views/admin/events/_user_fields.html.haml index 7b555c9f..e39ecf26 100644 --- a/app/views/admin/events/_user_fields.html.haml +++ b/app/views/admin/events/_user_fields.html.haml @@ -3,4 +3,3 @@ = f.input :email = f.input :name = remove_association_link :user, f - diff --git a/app/views/admin/events/_voting.html.haml b/app/views/admin/events/_voting.html.haml index bae1516e..b7ae8ee2 100644 --- a/app/views/admin/events/_voting.html.haml +++ b/app/views/admin/events/_voting.html.haml @@ -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'); diff --git a/app/views/admin/events/_voting_index.html.haml b/app/views/admin/events/_voting_index.html.haml index 96e46fb6..18a9e73b 100644 --- a/app/views/admin/events/_voting_index.html.haml +++ b/app/views/admin/events/_voting_index.html.haml @@ -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 diff --git a/app/views/admin/events/edit.html.haml b/app/views/admin/events/edit.html.haml index 0933948d..4c45a5a4 100644 --- a/app/views/admin/events/edit.html.haml +++ b/app/views/admin/events/edit.html.haml @@ -1 +1 @@ -= render 'proposals/form' \ No newline at end of file += render 'proposals/form' diff --git a/app/views/admin/events/index.html.haml b/app/views/admin/events/index.html.haml index 16110268..0e265aba 100644 --- a/app/views/admin/events/index.html.haml +++ b/app/views/admin/events/index.html.haml @@ -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' diff --git a/app/views/admin/events/registrations.html.haml b/app/views/admin/events/registrations.html.haml index b3632d0c..84f8e31a 100644 --- a/app/views/admin/events/registrations.html.haml +++ b/app/views/admin/events/registrations.html.haml @@ -40,5 +40,5 @@ %td - if event_registration.registration.attended %i.fa.fa-check.text-success - -else + - else %i.fa.fa-close.text-danger diff --git a/app/views/admin/events/reports.html.haml b/app/views/admin/events/reports.html.haml index 228c4d0b..f300d10c 100644 --- a/app/views/admin/events/reports.html.haml +++ b/app/views/admin/events/reports.html.haml @@ -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 diff --git a/app/views/admin/events/show.html.haml b/app/views/admin/events/show.html.haml index c03cde7f..9969bbaf 100644 --- a/app/views/admin/events/show.html.haml +++ b/app/views/admin/events/show.html.haml @@ -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 } diff --git a/app/views/admin/lodgings/_form.html.haml b/app/views/admin/lodgings/_form.html.haml index d5ab72e5..fa91bd24 100644 --- a/app/views/admin/lodgings/_form.html.haml +++ b/app/views/admin/lodgings/_form.html.haml @@ -8,7 +8,7 @@ = @lodging.name .row .col-md-8 - = semantic_form_for(@lodging, :url => (@lodging.new_record? ? admin_conference_lodgings_path : admin_conference_lodging_path(@conference.short_title, @lodging))) do |f| + = semantic_form_for(@lodging, url: (@lodging.new_record? ? admin_conference_lodgings_path : admin_conference_lodging_path(@conference.short_title, @lodging))) do |f| = f.input :name = f.input :website_link = f.input :description, input_html: { rows: 5, cols: 20, data: { provide: 'markdown-editable' } }, hint: markdown_hint diff --git a/app/views/admin/lodgings/index.html.haml b/app/views/admin/lodgings/index.html.haml index 1d81c2d1..c2e011f9 100644 --- a/app/views/admin/lodgings/index.html.haml +++ b/app/views/admin/lodgings/index.html.haml @@ -14,7 +14,7 @@ %p.text-center %i.fa.fa-home.fa-5x - else - -if lodging.website_link.present? + - if lodging.website_link.present? = link_to(lodging.website_link, class: 'thumbnail') do = image_tag lodging.picture.thumb, class: 'img-responsive img-lodging' - else @@ -22,7 +22,7 @@ .caption %h3.text-center = lodging.name - -if lodging.description.present? + - if lodging.description.present? = markdown(lodging.description) .actions.text-right = link_to 'Edit', edit_admin_conference_lodging_path(@conference.short_title, lodging), class: 'btn btn-primary' diff --git a/app/views/admin/programs/_form.html.haml b/app/views/admin/programs/_form.html.haml index ccf9638f..8eb5ea47 100644 --- a/app/views/admin/programs/_form.html.haml +++ b/app/views/admin/programs/_form.html.haml @@ -5,8 +5,8 @@ .row .col-md-8 = semantic_form_for(@program, url: admin_conference_program_path(@conference.short_title), html: {multipart: true}) do |f| - = f.input :schedule_public, label: "Show Schedule on the home and splash page" - = f.input :schedule_fluid, label: "Allow submitters to change their event after it is scheduled" + = f.input :schedule_public, label: 'Show Schedule on the home and splash page' + = f.input :schedule_fluid, label: 'Allow submitters to change their event after it is scheduled' = f.input :rating, hint: 'Enter the number of different rating levels you want to have for voting on proposals. Enter 0 if you do not want to vote on proposals.' = f.input :languages, hint: "Enter the languages allowed for events as values of #{link_to('ISO 639-1', 'http://www.loc.gov/standards/iso639-2/php/code_list.php', target: "_blank")} language codes separated with commas. The first language would be the default language. Leave it blank if you do not want to specify languages.".html_safe = f.input :blind_voting, hint: 'Enable this feature if you do not want to show voting results and voters prior to user submitting a vote. For the feature to work you need to set the voting dates below as well' diff --git a/app/views/admin/rooms/_form.html.haml b/app/views/admin/rooms/_form.html.haml index 47cd9a77..8e515290 100644 --- a/app/views/admin/rooms/_form.html.haml +++ b/app/views/admin/rooms/_form.html.haml @@ -8,8 +8,8 @@ = @room.name .row .col-md-8 - = semantic_form_for(@room, :url => (@room.new_record? ? admin_conference_venue_rooms_path : admin_conference_venue_room_path(@conference.short_title, @room))) do |f| + = semantic_form_for(@room, url: (@room.new_record? ? admin_conference_venue_rooms_path : admin_conference_venue_room_path(@conference.short_title, @room))) do |f| = f.input :name, input_html: { autofocus: true} - = f.input :size, :input_html => {:size => 5} + = f.input :size, input_html: {size: 5} %p.text-right = f.action :submit, as: :button, button_html: { class: 'btn btn-primary' } diff --git a/app/views/admin/sponsors/_form.html.haml b/app/views/admin/sponsors/_form.html.haml index ca78d8a5..ba24f9f3 100644 --- a/app/views/admin/sponsors/_form.html.haml +++ b/app/views/admin/sponsors/_form.html.haml @@ -8,7 +8,7 @@ = @sponsor.name .row .col-md-8 - = semantic_form_for(@sponsor, :url => (@sponsor.new_record? ? admin_conference_sponsors_path : admin_conference_sponsor_path(@conference.short_title, @sponsor))) do |f| + = semantic_form_for(@sponsor, url: (@sponsor.new_record? ? admin_conference_sponsors_path : admin_conference_sponsor_path(@conference.short_title, @sponsor))) do |f| = f.input :name = f.input :description = image_tag f.object.picture.thumb.url if f.object.picture? diff --git a/app/views/admin/sponsorship_levels/_form.html.haml b/app/views/admin/sponsorship_levels/_form.html.haml index 666e8753..60848928 100644 --- a/app/views/admin/sponsorship_levels/_form.html.haml +++ b/app/views/admin/sponsorship_levels/_form.html.haml @@ -8,7 +8,7 @@ = @sponsorship_level.title .row .col-md-8 - = semantic_form_for(@sponsorship_level, :url => (@sponsorship_level.new_record? ? admin_conference_sponsorship_levels_path : admin_conference_sponsorship_level_path(@conference.short_title, @sponsorship_level))) do |f| + = semantic_form_for(@sponsorship_level, url: (@sponsorship_level.new_record? ? admin_conference_sponsorship_levels_path : admin_conference_sponsorship_level_path(@conference.short_title, @sponsorship_level))) do |f| = f.input :title %p.text-right - = f.action :submit, as: :button, button_html: { class: 'btn btn-primary' } \ No newline at end of file + = f.action :submit, as: :button, button_html: { class: 'btn btn-primary' } diff --git a/app/views/admin/targets/_form.html.haml b/app/views/admin/targets/_form.html.haml index 53c74c84..b0462249 100644 --- a/app/views/admin/targets/_form.html.haml +++ b/app/views/admin/targets/_form.html.haml @@ -7,7 +7,7 @@ Target .row .col-md-8 - = semantic_form_for(@target, :url => (@target.new_record? ? admin_conference_targets_path : admin_conference_target_path(@conference.short_title, @target))) do |f| + = semantic_form_for(@target, url: (@target.new_record? ? admin_conference_targets_path : admin_conference_target_path(@conference.short_title, @target))) do |f| = f.input :due_date, as: :string, input_html: { class: 'target-due-date-datepicker'}, label: 'Until when do you want to have ' = f.input :target_count, label: 'this amount of ' = f.input :unit, as: :select, label: 'Unit', class: 'form-control', collection: Target.units.values, include_blank: false, label: 'units ' diff --git a/app/views/admin/tickets/_form.html.haml b/app/views/admin/tickets/_form.html.haml index 7ff0821c..94a54692 100644 --- a/app/views/admin/tickets/_form.html.haml +++ b/app/views/admin/tickets/_form.html.haml @@ -8,7 +8,7 @@ Ticket .row .col-md-8 - = semantic_form_for(@ticket, :url => (@ticket.new_record? ? admin_conference_tickets_path : admin_conference_ticket_path(@conference.short_title, @ticket))) do |f| + = semantic_form_for(@ticket, url: (@ticket.new_record? ? admin_conference_tickets_path : admin_conference_ticket_path(@conference.short_title, @ticket))) do |f| = f.input :title = f.input :description, input_html: { rows: 5, data: { provide: "markdown-editable" } } = f.input :price diff --git a/app/views/admin/tickets/show.html.haml b/app/views/admin/tickets/show.html.haml index 11882144..01e882b5 100644 --- a/app/views/admin/tickets/show.html.haml +++ b/app/views/admin/tickets/show.html.haml @@ -2,7 +2,7 @@ .col-md-12 .page-header %h1 - %div{"data-placement" => "left", "data-toggle" => "tooltip", :title => @ticket.description} + %div{"data-placement" => "left", "data-toggle" => "tooltip", title: @ticket.description} = @ticket.title Ticket %small diff --git a/app/views/admin/tracks/_form.html.haml b/app/views/admin/tracks/_form.html.haml index d637af26..579d263d 100644 --- a/app/views/admin/tracks/_form.html.haml +++ b/app/views/admin/tracks/_form.html.haml @@ -8,8 +8,8 @@ Track .row .col-md-12 - = semantic_form_for(@track, :url => (@track.new_record? ? admin_conference_program_tracks_path : admin_conference_program_track_path(@conference.short_title, @track))) do |f| + = semantic_form_for(@track, url: (@track.new_record? ? admin_conference_program_tracks_path : admin_conference_program_track_path(@conference.short_title, @track))) do |f| = f.input :name - = f.input :color, :input_html => {:size => 6, :type => "color"}, :required=> true - = f.input :description, :input_html => {:rows => 2, data: { provide: "markdown-editable" } }, hint: markdown_hint - = f.action :submit, as: :button, button_html: { class: 'btn btn-primary' } \ No newline at end of file + = f.input :color, input_html: {size: 6, type: 'color'}, required: true + = f.input :description, input_html: {rows: 2, data: { provide: 'markdown-editable' } }, hint: markdown_hint + = f.action :submit, as: :button, button_html: { class: 'btn btn-primary' } diff --git a/app/views/admin/users/_form.html.haml b/app/views/admin/users/_form.html.haml index b0074a71..888260de 100644 --- a/app/views/admin/users/_form.html.haml +++ b/app/views/admin/users/_form.html.haml @@ -18,10 +18,10 @@ readonly: true, data: { size: 'small', on_color: 'success', off_color: 'warning', on_text: 'Yes', off_text: 'No' } = f.input :is_admin, hint: 'An admin can create a new conference, manage users and make other users admins.' - = f.input :name, :as => :string + = f.input :name, as: :string = f.input :email - = f.input :affiliation, :as => :string + = f.input :affiliation, as: :string = f.input :biography, input_html: { rows: 10, data: { provide: 'markdown-editable' } }, hint: markdown_hint = f.actions do - = f.action :submit, :button_html => {:class => "btn btn-primary"} + = f.action :submit, button_html: {class: 'btn btn-primary'} diff --git a/app/views/admin/volunteers/_vday_fields.html.erb b/app/views/admin/volunteers/_vday_fields.html.erb index 67b271ff..21c40b23 100644 --- a/app/views/admin/volunteers/_vday_fields.html.erb +++ b/app/views/admin/volunteers/_vday_fields.html.erb @@ -1,7 +1,7 @@
<%= f.inputs do %> <%= f.date_select :day %> - <%= f.input :description, :input_html => {:rows => "2", :class => "col-md-8"} %> + <%= f.input :description, input_html: {rows: '2', class: 'col-md-8'} %> <%= remove_association_link :vday, f %> <% end %> -
\ No newline at end of file + diff --git a/app/views/admin/volunteers/_volunteers_table.html.haml b/app/views/admin/volunteers/_volunteers_table.html.haml index d7ba8530..1f085d1a 100644 --- a/app/views/admin/volunteers/_volunteers_table.html.haml +++ b/app/views/admin/volunteers/_volunteers_table.html.haml @@ -24,4 +24,4 @@ $('#volunteerstable').dataTable({ "bPaginate": false }); - }); \ No newline at end of file + }); diff --git a/app/views/admin/volunteers/_vposition_fields.html.erb b/app/views/admin/volunteers/_vposition_fields.html.erb index dc83ac30..f464fdbf 100644 --- a/app/views/admin/volunteers/_vposition_fields.html.erb +++ b/app/views/admin/volunteers/_vposition_fields.html.erb @@ -1,8 +1,8 @@
<%= f.inputs do %> <%= f.input :title %> - <%= f.input :description, :input_html => {:rows => "2", :class => "col-md-8"}%> - <%= f.input :vdays, :collection => @conference.vdays.map {|x| [x.day, x.id]}, :label => "Position is required for the following days:"%> + <%= f.input :description, input_html: {rows: '2', class: 'col-md-8'}%> + <%= f.input :vdays, collection: @conference.vdays.map {|x| [x.day, x.id]}, label: 'Position is required for the following days:'%> <%= remove_association_link :vposition, f %> <% end %>
diff --git a/app/views/admin/volunteers/index.html.haml b/app/views/admin/volunteers/index.html.haml index 3f1e5864..fb4f274a 100644 --- a/app/views/admin/volunteers/index.html.haml +++ b/app/views/admin/volunteers/index.html.haml @@ -1,14 +1,14 @@ .row .col-md-8 - = semantic_form_for(@conference, :url => admin_conference_volunteers_update_path(@conference.short_title)) do |f| - = f.action :submit, :as => :button, :button_html => {:class => "btn btn-primary"} + = semantic_form_for(@conference, url: admin_conference_volunteers_update_path(@conference.short_title)) do |f| + = f.action :submit, as: :button, button_html: {class: 'btn btn-primary'} %br %br - = f.input :use_volunteers, :label => "Enable Volunteering" + = f.input :use_volunteers, label: 'Enable Volunteering' .row .col-md-6 - = f.input :use_vdays, :label => false + = f.input :use_vdays, label: false = dynamic_association :vdays, "Volunteer Days", f .col-md-6 - = f.input :use_vpositions, :label => false + = f.input :use_vpositions, label: false = dynamic_association :vpositions, "Volunteer positions", f diff --git a/app/views/admin/volunteers/show.html.haml b/app/views/admin/volunteers/show.html.haml index 4bb0a3a6..eef15826 100644 --- a/app/views/admin/volunteers/show.html.haml +++ b/app/views/admin/volunteers/show.html.haml @@ -1,6 +1,6 @@ - if @volunteers.count > 0 %h3= "Volunteers (#{@volunteers.count})" %br - = render :partial => "volunteers_table" + = render partial: 'volunteers_table' - else - %h3 There are no volunteers yet! \ No newline at end of file + %h3 There are no volunteers yet! diff --git a/app/views/application/edit.html.haml b/app/views/application/edit.html.haml index f3a2592b..72992799 100644 --- a/app/views/application/edit.html.haml +++ b/app/views/application/edit.html.haml @@ -1 +1 @@ -= render :partial => "form" += render partial: 'form' diff --git a/app/views/application/new.html.haml b/app/views/application/new.html.haml index f3a2592b..72992799 100644 --- a/app/views/application/new.html.haml +++ b/app/views/application/new.html.haml @@ -1 +1 @@ -= render :partial => "form" += render partial: 'form' diff --git a/app/views/conference_registrations/_questions.html.haml b/app/views/conference_registrations/_questions.html.haml index 935adc8c..ad91918d 100644 --- a/app/views/conference_registrations/_questions.html.haml +++ b/app/views/conference_registrations/_questions.html.haml @@ -2,7 +2,7 @@ = f.inputs 'Additional Info' do - @conference.questions.each do |question| - if question.question_type.title == 'Yes/No' || question.question_type.title == 'Single Choice' - = f.input :qanswers, :collection => question.qanswers.joins(:answer).pluck("answers.title, qanswers.id"), :as => :select, :input_html => { :multiple => false }, - label: question.title, :include_blank => "Please make your choice" + = f.input :qanswers, collection: question.qanswers.joins(:answer).pluck("answers.title, qanswers.id"), as: :select, input_html: { multiple: false }, + label: question.title, include_blank: 'Please make your choice' - if question.question_type.title == 'Multiple Choice' - = f.input :qanswers, :collection => question.qanswers.joins(:answer).pluck("answers.title, qanswers.id"), :as => :check_boxes, label: question.title + = f.input :qanswers, collection: question.qanswers.joins(:answer).pluck("answers.title, qanswers.id"), as: :check_boxes, label: question.title diff --git a/app/views/conference_registrations/_volunteer.html.haml b/app/views/conference_registrations/_volunteer.html.haml index e4971c1d..5221fbad 100644 --- a/app/views/conference_registrations/_volunteer.html.haml +++ b/app/views/conference_registrations/_volunteer.html.haml @@ -1,15 +1,15 @@ .row .col-md-12 - = f.input :volunteer, :label => "Click here if you want to become a volunteer at #{@conference.short_title}", :input_html => {:maxlength => 15, :size => 40} + = f.input :volunteer, label: "Click here if you want to become a volunteer at #{@conference.short_title}", input_html: {maxlength: 15, size: 40} = f.fields_for :user do |u| - = render :partial => 'devise/registrations/volunteeruser', :locals => {:u => u} + = render partial: 'devise/registrations/volunteeruser', locals: {u: u} %br - if @conference.vpositions.count > 0 %h4 %u Positions that require volunteers: - @conference.vpositions.each do |pos| - %p{:style => "font-weight:bold"} + %p{style: "font-weight:bold"} = pos.title = "(#{pos.description})" if pos.description - = f.input :vchoices, :collection => pos.vchoices.map {|x| [x.vday.day, x.id]}, :label => "Choose days to volunteer:" + = f.input :vchoices, collection: pos.vchoices.map {|x| [x.vday.day, x.id]}, label: "Choose days to volunteer:" diff --git a/app/views/conference_registrations/show.html.haml b/app/views/conference_registrations/show.html.haml index 5225deb1..53d55bd8 100644 --- a/app/views/conference_registrations/show.html.haml +++ b/app/views/conference_registrations/show.html.haml @@ -50,7 +50,7 @@ %strong = q.title - if @registration.qanswers.any? - - @registration.qanswers.where(:question_id => q.id).each do |qa| + - @registration.qanswers.where(question_id: q.id).each do |qa| = qa.answer.title - else You haven't answered diff --git a/app/views/conferences/_conference_details.html.haml b/app/views/conferences/_conference_details.html.haml index 3f60d997..6ee51573 100644 --- a/app/views/conferences/_conference_details.html.haml +++ b/app/views/conferences/_conference_details.html.haml @@ -20,20 +20,20 @@ .btn-group-vertical - if !@conference || @conference != conference - if conference.splashpage && conference.splashpage.public - = link_to "View Conference", conference_path(conference.short_title), :class =>"btn btn-default" + = link_to "View Conference", conference_path(conference.short_title), class: 'btn btn-default' - if conference.program and conference.program.schedule_public - = link_to "Schedule", conference_schedule_path(conference.short_title), :class =>"btn btn-default" + = link_to "Schedule", conference_schedule_path(conference.short_title), class: 'btn btn-default' - if conference.registration_open? - if conference.user_registered?(current_user) - = link_to "My Registration", conference_conference_registration_path(conference.short_title), :class =>"btn btn-default" + = link_to "My Registration", conference_conference_registration_path(conference.short_title), class: 'btn btn-default' - else = link_to "Register", new_conference_conference_registration_path(conference.short_title), class: "btn btn-default", disabled: conference.registration_limit_exceeded? - if conference.registration_limit_exceeded? Sorry, no places left - if !current_user.nil? && current_user.proposal_count(conference) > 0 - = link_to "My Proposals", conference_program_proposals_path(conference.short_title), :class =>"btn btn-default" + = link_to "My Proposals", conference_program_proposals_path(conference.short_title), class: 'btn btn-default' - elsif can? :new, conference.program.events.new - = link_to "Submit Proposal", new_conference_program_proposal_path(conference.short_title), :class =>"btn btn-default" + = link_to "Submit Proposal", new_conference_program_proposal_path(conference.short_title), class: 'btn btn-default' - if current_user.nil? || !current_user.subscribed?(conference) = link_to 'Subscribe', conference_subscriptions_path(conference.short_title), method: :post, class: 'btn btn-default' - else diff --git a/app/views/conferences/_gallery.html.haml b/app/views/conferences/_gallery.html.haml index 22bd3616..65babbe4 100644 --- a/app/views/conferences/_gallery.html.haml +++ b/app/views/conferences/_gallery.html.haml @@ -29,7 +29,3 @@ } }); }); - - - - diff --git a/app/views/devise/registrations/_volunteeruser.html.haml b/app/views/devise/registrations/_volunteeruser.html.haml index a120c233..0d62df4b 100644 --- a/app/views/devise/registrations/_volunteeruser.html.haml +++ b/app/views/devise/registrations/_volunteeruser.html.haml @@ -1,7 +1,7 @@ -= u.input :mobile, :label => "Mobile No (Include country code)", :input_html => {:placeholder => "Eg. +336812345679"}, :hint => "Only visible to org team & volunteer coordinator" += u.input :mobile, label: 'Mobile No (Include country code)', input_html: {placeholder: 'Eg. +336812345679'}, hint: 'Only visible to org team & volunteer coordinator' -= u.input :tshirt, :label => "Tshirt Size", :collection => [["Choose", nil],["XS","XS"],["S","S"],["M", "M"], ["L", "L"], ["XL", "XL"], ["XXL", "XXL"], ["XXXL", "XXXL"], ["Girl-S","Girl-s"], ["Girl-M","Girl-M"], ["Girl-L","Girl-L"], ["Girl-XL","Girl-XL"]] += u.input :tshirt, label: "Tshirt Size", collection: [["Choose", nil],["XS","XS"],["S","S"],["M", "M"], ["L", "L"], ["XL", "XL"], ["XXL", "XXL"], ["XXXL", "XXXL"], ["Girl-S","Girl-s"], ["Girl-M","Girl-M"], ["Girl-L","Girl-L"], ["Girl-XL","Girl-XL"]] -= u.input :languages, :label => "Which languages do you speak", :hint => "Start from the one you speak best and use 2 letter symbolization, eg. EN, GR, DE" += u.input :languages, label: "Which languages do you speak", hint: "Start from the one you speak best and use 2 letter symbolization, eg. EN, GR, DE" -= u.input :volunteer_experience, :label => "Do you have any past experience?", :input_html => {:rows => 3, :class => "span6"} \ No newline at end of file += u.input :volunteer_experience, label: "Do you have any past experience?", input_html: {rows: 3, class: 'span6'} diff --git a/app/views/devise/shared/_openid_links.html.haml b/app/views/devise/shared/_openid_links.html.haml index f588ed86..8bcc96da 100644 --- a/app/views/devise/shared/_openid_links.html.haml +++ b/app/views/devise/shared/_openid_links.html.haml @@ -4,4 +4,4 @@ = link_to "user_#{provider}_omniauth_authorize".to_sym, class: "btn btn-success btn-lg", id: "omniauth-#{provider}", title: "Your #{provider} login" do - %i{:class => "fa fa-#{provider}"} + %i{class: "fa fa-#{provider}"} diff --git a/app/views/layouts/_admin_sidebar.html.haml b/app/views/layouts/_admin_sidebar.html.haml index 9dbbe981..130670ed 100644 --- a/app/views/layouts/_admin_sidebar.html.haml +++ b/app/views/layouts/_admin_sidebar.html.haml @@ -1,6 +1,6 @@ %ul.nav.nav-stacked.nav-pills.mySidebar .btn-group - %button{type:'button', class:'btn btn-default btn-link dropdown-toggle', 'data-toggle'=>'dropdown'} + %button{type:'button', class: 'btn btn-default btn-link dropdown-toggle', 'data-toggle'=>'dropdown'} %span.fa.fa-cog = @conference.short_title %span.caret @@ -23,12 +23,12 @@ New Conference %hr - if can? :show, @conference - %li{:class=> "#{active_nav_li(admin_conference_path(@conference.short_title))} nav-header nav-header-bigger"} + %li{class: "#{active_nav_li(admin_conference_path(@conference.short_title))} nav-header nav-header-bigger"} = link_to(admin_conference_path(@conference.short_title)) do %span.fa.fa-tachometer Dashboard - if can? :show, @conference - %li{:class=> "#{active_nav_li(edit_admin_conference_path(@conference.short_title))}"} + %li{class: "#{active_nav_li(edit_admin_conference_path(@conference.short_title))}"} - if can? :edit, @conference = link_to(edit_admin_conference_path(@conference.short_title)) do %span.fa.fa-home @@ -39,66 +39,66 @@ Basics %ul - if can? :update, Contact.new(conference_id: @conference.id) - %li{:class=> "#{active_nav_li(edit_admin_conference_contact_path(@conference.short_title))}"} + %li{class: "#{active_nav_li(edit_admin_conference_contact_path(@conference.short_title))}"} = link_to 'Contact', edit_admin_conference_contact_path(@conference.short_title) - if can? :index, @conference.commercials.build - %li{:class=> "#{active_nav_li(admin_conference_commercials_path(@conference.short_title))}"} + %li{class: "#{active_nav_li(admin_conference_commercials_path(@conference.short_title))}"} = link_to 'Commercials', admin_conference_commercials_path(@conference.short_title) - if can? :update, @conference - %li{:class=> active_nav_li(edit_admin_conference_splashpage_path(@conference.short_title))} + %li{class: active_nav_li(edit_admin_conference_splashpage_path(@conference.short_title))} = link_to 'Splashpage', admin_conference_splashpage_path(@conference.short_title) - if can? :show, Venue.new(conference_id: @conference.id) - %li{:class=> "#{active_nav_li(admin_conference_venue_path(@conference.short_title))}"} + %li{class: "#{active_nav_li(admin_conference_venue_path(@conference.short_title))}"} = link_to(admin_conference_venue_path(@conference.short_title)) do %span.fa.fa-road Venue %ul - if @conference.venue && @conference.venue.persisted? && (can? :update, @conference.venue.rooms.build) - %li{:class=> active_nav_li(admin_conference_venue_rooms_path(@conference.short_title))} + %li{class: active_nav_li(admin_conference_venue_rooms_path(@conference.short_title))} = link_to 'Rooms', admin_conference_venue_rooms_path(@conference.short_title) - if can? :update, @conference.lodgings.build %li{ class: active_nav_li(admin_conference_lodgings_path(@conference.short_title)) } = link_to 'Lodgings', admin_conference_lodgings_path(@conference.short_title) - if can? :show, @conference.program - %li{:class=> "#{active_nav_li(admin_conference_program_path(@conference.short_title))}"} + %li{class: "#{active_nav_li(admin_conference_program_path(@conference.short_title))}"} = link_to admin_conference_program_path(@conference.short_title) do %span.fa.fa-calendar Program - if @conference.program %ul - if can? :update, Cfp.new(program_id: @conference.program.id) - %li{:class=> active_nav_li(admin_conference_program_cfp_path(@conference.short_title))} + %li{class: active_nav_li(admin_conference_program_cfp_path(@conference.short_title))} = link_to 'Call for Papers', admin_conference_program_cfp_path(@conference.short_title) - if can? :update, @conference.program.events.build - %li{:class=> active_nav_li(admin_conference_program_events_path(@conference.short_title))} + %li{class: active_nav_li(admin_conference_program_events_path(@conference.short_title))} = link_to 'Events', admin_conference_program_events_path(@conference.short_title) - if can? :update, @conference.program.tracks.build - %li{:class=> active_nav_li(admin_conference_program_tracks_path(@conference.short_title))} + %li{class: active_nav_li(admin_conference_program_tracks_path(@conference.short_title))} = link_to 'Tracks', admin_conference_program_tracks_path(@conference.short_title) - if can? :update, @conference.program.event_types.build - %li{:class=> active_nav_li(admin_conference_program_event_types_path(@conference.short_title))} + %li{class: active_nav_li(admin_conference_program_event_types_path(@conference.short_title))} = link_to 'Event Types', admin_conference_program_event_types_path(@conference.short_title) - if can? :update, @conference.program.difficulty_levels.build, conference_id: @conference.id - %li{:class=> active_nav_li(admin_conference_program_difficulty_levels_path(@conference.short_title))} + %li{class: active_nav_li(admin_conference_program_difficulty_levels_path(@conference.short_title))} = link_to 'Difficulty Levels', admin_conference_program_difficulty_levels_path(@conference.short_title) - if can? :update, @conference.program.schedules.build %li{class: active_nav_li(admin_conference_schedules_path(@conference.short_title))} = link_to 'Schedules', admin_conference_schedules_path(@conference.short_title) - if can? :update, @conference.program.events.build - %li{:class=> active_nav_li(reports_admin_conference_program_path(@conference.short_title))} + %li{class: active_nav_li(reports_admin_conference_program_path(@conference.short_title))} = link_to 'Reports', reports_admin_conference_program_path(@conference.short_title) - if can? :update, Registration.new(conference_id: @conference.id) - %li{:class=> active_nav_li(admin_conference_registrations_path(@conference.short_title))} + %li{class: active_nav_li(admin_conference_registrations_path(@conference.short_title))} = link_to(admin_conference_registrations_path(@conference.short_title)) do %span.fa.fa-user Registrations %ul - if can? :update, @conference - %li{:class=> active_nav_li(admin_conference_registration_period_path(@conference.short_title))} + %li{class: active_nav_li(admin_conference_registration_period_path(@conference.short_title))} = link_to 'Registration Period', admin_conference_registration_period_path(@conference.short_title) - if can? :update, Question.new(conference_id: @conference.id) - %li{:class=> active_nav_li(admin_conference_questions_path(@conference.short_title))} + %li{class: active_nav_li(admin_conference_questions_path(@conference.short_title))} = link_to 'Questions', admin_conference_questions_path(@conference.short_title) - if (can? :manage, @conference.sponsorship_levels.build) || (can? :manage, @conference.sponsors.build) || (can? :manage, @conference.tickets.build) @@ -108,13 +108,13 @@ Donations %ul - if can? :update, @conference.sponsorship_levels.build - %li{:class=> "#{active_nav_li(admin_conference_sponsorship_levels_path(@conference.short_title))}" } + %li{class: "#{active_nav_li(admin_conference_sponsorship_levels_path(@conference.short_title))}" } = link_to 'Sponsorship Levels', admin_conference_sponsorship_levels_path(@conference.short_title) - if !@conference.sponsorship_levels.empty? && @conference.sponsorship_levels.first.persisted? && (can? :update, @conference.sponsors.build) - %li{:class=> active_nav_li(admin_conference_sponsors_path(@conference.short_title))} + %li{class: active_nav_li(admin_conference_sponsors_path(@conference.short_title))} = link_to 'Sponsors', admin_conference_sponsors_path(@conference.short_title) - if can? :update, @conference.tickets.build - %li{ class: active_nav_li(admin_conference_tickets_path(@conference.short_title)) } + %li{class: active_nav_li(admin_conference_tickets_path(@conference.short_title)) } = link_to 'Tickets', admin_conference_tickets_path(@conference.short_title) - if (can? :manage, @conference.targets.build) || (can? :manage, @conference.campaigns.build) @@ -127,15 +127,15 @@ %li{class: active_nav_li(admin_conference_campaigns_path(@conference.short_title))} = link_to 'Campaigns', admin_conference_campaigns_path(@conference.short_title) - if can? :update, @conference.targets.build - %li{:class=> "#{active_nav_li(admin_conference_targets_path(@conference.short_title))}"} + %li{class: "#{active_nav_li(admin_conference_targets_path(@conference.short_title))}"} = link_to 'Goals', admin_conference_targets_path(@conference.short_title) - if can? :update, @conference.email_settings - %li{:class=> active_nav_li(admin_conference_emails_path(@conference.short_title))} + %li{class: active_nav_li(admin_conference_emails_path(@conference.short_title))} = link_to(admin_conference_emails_path(@conference.short_title)) do %span.fa.fa-envelope E-Mails - if can? :index, Role.new(resource: @conference) - %li{:class=> active_nav_li(admin_conference_roles_path(@conference.short_title))} + %li{class: active_nav_li(admin_conference_roles_path(@conference.short_title))} = link_to(admin_conference_roles_path(@conference.short_title)) do %span.fa.fa-group Roles diff --git a/app/views/layouts/_messages.html.haml b/app/views/layouts/_messages.html.haml index 406087d7..00ecde34 100644 --- a/app/views/layouts/_messages.html.haml +++ b/app/views/layouts/_messages.html.haml @@ -10,8 +10,8 @@ - flash.each do |type, message| .row .col-md-12 - %div{:class=>"alert alert-dismissable #{bootstrap_class_for(type)}", :id=>"flash"} + %div{class: "alert alert-dismissable #{bootstrap_class_for(type)}", id: "flash"} .button.close{"data-dismiss" => "alert", "aria-hidden"=>"true"} × %p - = message \ No newline at end of file + = message diff --git a/app/views/layouts/_navigation.html.haml b/app/views/layouts/_navigation.html.haml index 1f9336ca..844f74a9 100644 --- a/app/views/layouts/_navigation.html.haml +++ b/app/views/layouts/_navigation.html.haml @@ -1,7 +1,7 @@ -.navbar.navbar-default.navbar-fixed-top.nav-osem{:role=>"navigation"} +.navbar.navbar-default.navbar-fixed-top.nav-osem{role: 'navigation'} .container .navbar-header - %button{"data-target"=>".navbar-collapse", "data-toggle"=>"collapse", :class=>"navbar-toggle", :type=>"button"} + %button{"data-target"=>".navbar-collapse", "data-toggle"=>"collapse", class: 'navbar-toggle', type: 'button'} %span.sr-only Toggle navigation %span.icon-bar @@ -16,19 +16,19 @@ .btn-group.pull-right %ul.nav.navbar-nav.navbar-right %li.dropdown - %a.dropdown-toggle{"data-toggle" => "dropdown", :href => "#", id: "current-user-detail"} + %a.dropdown-toggle{"data-toggle" => "dropdown", href: '#', id: "current-user-detail"} - if not current_user.name.blank? #{current_user.name} -else #{current_user.email} - = image_tag(current_user.gravatar_url(size: '18'), title: "Yo #{current_user.name}!", :alt => '') + = image_tag(current_user.gravatar_url(size: '18'), title: "Yo #{current_user.name}!", alt: '') %b.caret %ul.dropdown-menu = render 'layouts/user_menu' - if can? :index, Comment %ul.nav.navbar-nav.navbar-right %li.dropdown - %a.dropdown-toggle{"data-toggle" => "dropdown", :href => "#"} + %a.dropdown-toggle{"data-toggle" => "dropdown", href: '#'} - if unread_notifications(current_user) Notifications (#{unread_notifications(current_user).length}) %span.fa.fa-comment @@ -44,17 +44,17 @@ - else %ul.nav.navbar-nav.navbar-right - if ENV['OSEM_ICHAIN_ENABLED'] == 'true' - %li{:class=> "#{active_nav_li(new_ichain_registration_path('user'))}"} + %li{class: "#{active_nav_li(new_ichain_registration_path('user'))}"} = link_to(new_ichain_registration_path('user')) do %span.fa.fa-heart Sign Up - else - %li{:class=> "#{active_nav_li(new_registration_path('user'))}"} + %li{class: "#{active_nav_li(new_registration_path('user'))}"} = link_to(new_registration_path('user')) do %span.fa.fa-heart Sign Up %li.dropdown.visible-desktop - %a.dropdown-toggle{"data-toggle" => "dropdown", :href => "#"} + %a.dropdown-toggle{"data-toggle" => "dropdown", href: '#'} %span.fa.fa-user Sign In %span.caret diff --git a/app/views/layouts/_user_menu.html.haml b/app/views/layouts/_user_menu.html.haml index 95c7937e..3fb32273 100644 --- a/app/views/layouts/_user_menu.html.haml +++ b/app/views/layouts/_user_menu.html.haml @@ -14,11 +14,11 @@ My Submissions %li - if ENV['OSEM_ICHAIN_ENABLED'] == 'true' - = link_to(destroy_user_ichain_session_path, :method=>'delete') do + = link_to(destroy_user_ichain_session_path, method: 'delete') do %span.fa.fa-minus Sign out - else - = link_to(destroy_user_session_path, :method=>'delete') do + = link_to(destroy_user_session_path, method: 'delete') do %span.fa.fa-minus Sign out - if can? :access, Admin diff --git a/app/views/layouts/application.html.haml b/app/views/layouts/application.html.haml index 893198fa..09be2523 100644 --- a/app/views/layouts/application.html.haml +++ b/app/views/layouts/application.html.haml @@ -1,11 +1,11 @@ -%html{:xmlns => "http://www.w3.org/1999/html"} +%html{xmlns: 'http://www.w3.org/1999/html'} %head - %meta{:charset => "utf-8"} - %meta{:name => "viewport", :content => "width=device-width, initial-scale=1, maximum-scale=1"} + %meta{charset: 'utf-8'} + %meta{name: 'viewport', content: 'width=device-width, initial-scale=1, maximum-scale=1'} %title= content_for?(:title) ? yield(:title) : (ENV['OSEM_NAME'] || 'OSEM') - %meta{:content => "", :name => "description"} - %meta{:content => "", :name => "author"} - = stylesheet_link_tag "application", :media => "all" + %meta{content: '', name: 'description'} + %meta{content: '', name: 'author'} + = stylesheet_link_tag "application", media: 'all' = javascript_include_tag "application" = csrf_meta_tags diff --git a/app/views/proposals/index.html.haml b/app/views/proposals/index.html.haml index a24ed427..06154d47 100644 --- a/app/views/proposals/index.html.haml +++ b/app/views/proposals/index.html.haml @@ -101,4 +101,4 @@ .row .col-md-12 - if can? :create, @event - = link_to "New Proposal", new_conference_program_proposal_path(@conference.short_title), :class => "btn btn-success pull-right" + = link_to "New Proposal", new_conference_program_proposal_path(@conference.short_title), class: 'btn btn-success pull-right' diff --git a/app/views/proposals/show.html.haml b/app/views/proposals/show.html.haml index a9dca4dc..76fa6a85 100644 --- a/app/views/proposals/show.html.haml +++ b/app/views/proposals/show.html.haml @@ -19,15 +19,15 @@ - if can? :update, @event = link_to 'Registrations', registrations_conference_program_proposal_path(@conference.short_title, @event), class: 'btn btn-mini btn-success' - if can? :edit, @event - = link_to "Edit", edit_conference_program_proposal_path(@conference.short_title, @event), :class => "btn btn-mini btn-primary" + = link_to "Edit", edit_conference_program_proposal_path(@conference.short_title, @event), class: 'btn btn-mini btn-primary' - if can? :schedule, @conference - = link_to "Schedule", conference_schedule_path(@conference.short_title), :class =>"btn btn-success" + = link_to "Schedule", conference_schedule_path(@conference.short_title), class: 'btn btn-success' .row .col-md-3 .speakerinfo .col-md-12 - = image_tag @speaker.gravatar_url(:size => 200), :class => "img-responsive img-rounded" + = image_tag @speaker.gravatar_url(size: 200), class: 'img-responsive img-rounded' .col-md-12 %h3 by @@ -83,13 +83,13 @@ %dt Track: %dd - if @event.track - %span.label{:style =>"background-color: #{@event.track.color}; color: #{ contrast_color(@event.track.color) }"} + %span.label{style: "background-color: #{@event.track.color}; color: #{ contrast_color(@event.track.color) }"} = @event.track.name .col-md-12 %dt Difficulty: %dd - if @event.difficulty_level - %span.label{:style =>"background-color: #{@event.difficulty_level.color}; color: #{ contrast_color(@event.difficulty_level.color) };"} + %span.label{style: "background-color: #{@event.difficulty_level.color}; color: #{ contrast_color(@event.difficulty_level.color) };"} = @event.difficulty_level.title - if @event.require_registration diff --git a/app/views/schedules/_event.html.haml b/app/views/schedules/_event.html.haml index 49116e42..ec846c8a 100644 --- a/app/views/schedules/_event.html.haml +++ b/app/views/schedules/_event.html.haml @@ -1,9 +1,9 @@ .panel.panel-default.event-panel{ onClick: 'eventClicked(event, this);', "data-url" => "#{url_for(conference_program_proposal_path(@conference.short_title, event.id))}" } .panel-body - if speaker = event.speakers.first - = image_tag speaker.gravatar_url, :class => "img-circle pull-right all-speaker-pic", | - :alt => speaker.name, | - :title => speaker.name | + = image_tag speaker.gravatar_url, class: "img-circle pull-right all-speaker-pic", | + alt: speaker.name, | + title: speaker.name | %p = canceled_replacement_event_label(event, event_schedule) @@ -17,8 +17,8 @@ %h4 presented by #{event.speaker_names} %p - = markdown(truncate(event.abstract, :length => 400)) - = link_to 'more', conference_program_proposal_path(@conference.short_title, event.id) if event.abstract.length > 400 + = markdown(truncate(event.abstract, length: 400)) + = link_to 'more', conference_program_proposal_path(@conference.short_title, event.id) if event.abstract.length > 400=> - if event_schedule.present? %span.track %span.fa.fa-clock-o diff --git a/app/views/schedules/_schedule_item.html.haml b/app/views/schedules/_schedule_item.html.haml index ffed1716..2a8a636e 100644 --- a/app/views/schedules/_schedule_item.html.haml +++ b/app/views/schedules/_schedule_item.html.haml @@ -10,7 +10,7 @@ = event.title - if speaker = event.speakers.first - = image_tag speaker.gravatar_url, :class => "img-circle pull-right speaker-pic", | - :alt => speaker.name, | - :title => speaker.name, | - :style => "height: #{ speaker_height(@rooms) }px; width: #{ speaker_width(@rooms) }px;" + = image_tag speaker.gravatar_url, class: "img-circle pull-right speaker-pic", | + alt: speaker.name, | + title: speaker.name, | + style: "height: #{ speaker_height(@rooms) }px; width: #{ speaker_width(@rooms) }px;" diff --git a/app/views/shared/_dynamic_association.html.haml b/app/views/shared/_dynamic_association.html.haml index 1484100a..9a29119d 100644 --- a/app/views/shared/_dynamic_association.html.haml +++ b/app/views/shared/_dynamic_association.html.haml @@ -1,9 +1,9 @@ = f.inputs title do - if hint %p.inline-hint= hint - %div{:class => association_name.to_s} + %div{class: association_name.to_s} = f.semantic_fields_for association_name do |association_form| - = render association_name.to_s.singularize + "_fields", :f => association_form + = render association_name.to_s.singularize + "_fields", f: association_form .links = add_association_link association_name, f, association_name %br diff --git a/app/views/shared/_media_item.html.haml b/app/views/shared/_media_item.html.haml index 82cbf461..26f193db 100644 --- a/app/views/shared/_media_item.html.haml +++ b/app/views/shared/_media_item.html.haml @@ -2,14 +2,14 @@ = Commercial.render_from_url(commercial.url)[:html] - else - if commercial.commercial_type == 'SlideShare' - %iframe{:width=>"560", :height=>"315", :frameborder=>"0", :allowfullscreen=>"true", :src=> "https://www.slideshare.net/slideshow/embed_code/#{commercial.commercial_id}"} + %iframe{width: '560', height: '315', frameborder: '0', allowfullscreen: 'true', src: "https://www.slideshare.net/slideshow/embed_code/#{commercial.commercial_id}"} - elsif commercial.commercial_type == 'Flickr' - %iframe{:width=>"560", :height=>"315", :frameborder=>"0", :allowfullscreen=>"true", :src=> "https://flic.kr/p/#{commercial.commercial_id}/player/268a054da2"} + %iframe{width: '560', height: '315', frameborder: '0', allowfullscreen: 'true', src: "https://flic.kr/p/#{commercial.commercial_id}/player/268a054da2"} - elsif commercial.commercial_type == 'Vimeo' - %iframe{:width=>"560", :height=>"315", :frameborder=>"0", :allowfullscreen=>"true", :src=> "//player.vimeo.com/video/#{commercial.commercial_id}"} + %iframe{width: '560', height: '315', frameborder: '0', allowfullscreen: 'true', src: "//player.vimeo.com/video/#{commercial.commercial_id}"} - elsif commercial.commercial_type == 'Speakerdeck' - %iframe{:width=>"560", :height=>"315", :frameborder=>"0", :allowfullscreen=>"true", :src=> "//speakerdeck.com/player/#{commercial.commercial_id}?"} + %iframe{width: '560', height: '315', frameborder: '0', allowfullscreen: 'true', src: "//speakerdeck.com/player/#{commercial.commercial_id}?"} - elsif commercial.commercial_type == 'Instagram' - %iframe{:width=>"560", :height=>"315", :frameborder=>"0", :allowfullscreen=>"true", :scrolling =>"no", :allowtransparency=>"true", :src=> "//instagram.com/p/#{commercial.commercial_id}/embed/"} + %iframe{width: '560', height: '315', frameborder: '0', allowfullscreen: 'true', scrolling: 'no', allowtransparency: 'true', src: "//instagram.com/p/#{commercial.commercial_id}/embed/"} - else - %iframe{:width=>"560", :height=>"315", :frameborder=>"0", :allowfullscreen=>"true", :src=> "https://www.youtube.com/embed/#{commercial.commercial_id}?rel=0"} \ No newline at end of file + %iframe{width: '560', height: '315', frameborder: '0', allowfullscreen: 'true', src: "https://www.youtube.com/embed/#{commercial.commercial_id}?rel=0"} diff --git a/app/views/users/edit.html.haml b/app/views/users/edit.html.haml index f4569255..f199347f 100644 --- a/app/views/users/edit.html.haml +++ b/app/views/users/edit.html.haml @@ -10,7 +10,7 @@ = f.input :nickname, as: :string .control-label = "Avatar" - = image_tag(@user.gravatar_url(size: '48'), title: "Yo #{@user.name}!", :alt => '') + = image_tag(@user.gravatar_url(size: '48'), title: "Yo #{@user.name}!", alt: '') = link_to 'Change your avatar here', 'https://gravatar.com' = f.input :affiliation, as: :string, hint: 'This could be a company, a user group, or nothing at all.' diff --git a/app/views/users/show.html.haml b/app/views/users/show.html.haml index 355cda88..7e246062 100644 --- a/app/views/users/show.html.haml +++ b/app/views/users/show.html.haml @@ -3,7 +3,7 @@ .col-md-12 .page-header %h1 - = image_tag(@user.gravatar_url(size: '48'), title: "Yo #{@user.name}!", :alt => '') + = image_tag(@user.gravatar_url(size: '48'), title: "Yo #{@user.name}!", alt: '') = @user.name %small = @user.nickname