From d01dc9550b91b5f3e5245e35887c8c2a2a0d0b82 Mon Sep 17 00:00:00 2001 From: Michael Ball Date: Wed, 28 Apr 2021 10:20:03 -0700 Subject: [PATCH 1/5] Show ticket IDs on the admin ticket page --- app/views/admin/tickets/show.html.haml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/views/admin/tickets/show.html.haml b/app/views/admin/tickets/show.html.haml index a6b31ea4..dba94810 100644 --- a/app/views/admin/tickets/show.html.haml +++ b/app/views/admin/tickets/show.html.haml @@ -20,7 +20,7 @@ .col-md-12 %table.datatable %thead - %th # + %th ID %th Name %th Quantity %th E-Mail @@ -32,7 +32,7 @@ - purchases = buyer.ticket_purchases.where(ticket_id: @ticket.id) %tr %td - = index + 1 + = purchases.length == 1 ? purchases.first.id : purchases.map(&:id) %td = buyer.name %td From 016a2c4ef3f166aa4d137283b2d77931ccfa377f Mon Sep 17 00:00:00 2001 From: Michael Ball Date: Thu, 29 Apr 2021 21:15:28 -0700 Subject: [PATCH 2/5] Improve the proposals task list slightly --- app/views/proposals/index.html.haml | 61 +++++++++++++++-------------- 1 file changed, 32 insertions(+), 29 deletions(-) diff --git a/app/views/proposals/index.html.haml b/app/views/proposals/index.html.haml index 2cc41860..34658400 100644 --- a/app/views/proposals/index.html.haml +++ b/app/views/proposals/index.html.haml @@ -33,35 +33,35 @@ .row .col-md-12 - %p.text-right - = link_to '#status-help', class: 'btn btn-default', "data-toggle"=>"collapse" do - Help? - .collapse#status-help - %p - %strong - What happens next with my proposal? - %p - If you submit a proposal, the conference organizers will review it and either accept or reject it. - %br - If your proposal is accepted, the conference organizers expect you to confirm that you will be able to hold it. - %br - If your proposal is rejected, you can either live with that or adapt it and resubmit it for review again. - %br - If something changes and you can't hold the presentation any more, you should withdraw it. + -# %p.text-right + -# = link_to '#status-help', class: 'btn btn-default', "data-toggle": "collapse" do + -# Help? + -# .collapse#status-help + -# %p + -# %strong + -# What happens next with my proposal? + -# %p + -# If you submit a proposal, the conference organizers will review it and either accept or reject it. + -# %br + -# If your proposal is accepted, the conference organizers expect you to confirm that you will be able to hold it. + -# %br + -# If your proposal is rejected, you can either live with that or adapt it and resubmit it for review again. + -# %br + -# If something changes and you can't hold the presentation any more, you should withdraw it. - %p - %strong - Why do I need to add more information? - %p - The more information you add to your proposal, the more likely it is that the conference organizers accept your proposal. - %br - It will also be more likely that visitors find your proposal interesting enough to attend. - - if can? :create, @conference.registrations.new - %p - %strong - Why do I need to register to the conference? - %p - Knowing the number of visitors for the conference helps the organizers plan better. + -# %p + -# %strong + -# Why do I need to add more information? + -# %p + -# The more information you add to your proposal, the more likely it is that the conference organizers accept your proposal. + -# %br + -# It will also be more likely that visitors find your proposal interesting enough to attend. + -# - if can? :create, @conference.registrations.new + -# %p + -# %strong + -# Why do I need to register to the conference? + -# %p + -# Knowing the number of visitors for the conference helps the organizers plan better. %table.table.table-striped#events - @events.each do |event| @@ -81,7 +81,10 @@ = link_to registered_text(event), registrations_conference_program_proposal_path(@conference.short_title, event), class: 'btn btn-xs btn-danger' %td.col-md-2{style: "padding:20px 8px 20px 8px;"} - = link_to 'Complete your proposal', 'javascript: void(0)', "type"=>"button", "data-trigger"=>"focus", "data-toggle"=>"popover", "title"=>"Your todo list", "data-content"=>"#{render partial: 'tooltip', locals: { event: event} }" + %a{href: '#', type: "button", "data-trigger": "click focus", "data-toggle": "popover", + title: "Your todo list", + "data-content": "#{render 'tooltip', event: event}" } + Complete your proposal - if can? :create, @conference.registrations.new - progress_percentage = event.calculate_progress .progress From 4cc2ead074f47f95bbef9f7bab62a742401f891c Mon Sep 17 00:00:00 2001 From: Michael Ball Date: Thu, 29 Apr 2021 21:17:05 -0700 Subject: [PATCH 3/5] Hide the proposal task list since it is confusing to people --- app/views/proposals/index.html.haml | 38 ++++++++++++++--------------- 1 file changed, 19 insertions(+), 19 deletions(-) diff --git a/app/views/proposals/index.html.haml b/app/views/proposals/index.html.haml index 34658400..0f8ae22b 100644 --- a/app/views/proposals/index.html.haml +++ b/app/views/proposals/index.html.haml @@ -80,25 +80,25 @@ %br = link_to registered_text(event), registrations_conference_program_proposal_path(@conference.short_title, event), class: 'btn btn-xs btn-danger' - %td.col-md-2{style: "padding:20px 8px 20px 8px;"} - %a{href: '#', type: "button", "data-trigger": "click focus", "data-toggle": "popover", - title: "Your todo list", - "data-content": "#{render 'tooltip', event: event}" } - Complete your proposal - - if can? :create, @conference.registrations.new - - progress_percentage = event.calculate_progress - .progress - %div{class: "progress-bar #{event_progress_color(progress_percentage)}", style: "width:#{progress_percentage}%;"} - = event.progress_status.reject{ |_key, value| value || value.nil? }.length - left - - else - :ruby - progress_list = event.progress_status - progress_percentage = (100 * progress_list.values.count(true) / (progress_list.values.compact.count-1)).to_s - .progress - %div{class: "progress-bar #{event_progress_color(progress_percentage)}", style: "width:#{progress_percentage}%;"} - = event.progress_status.reject{ |_key, value| value || value.nil? }.length-1 - left + -# %td.col-md-2{style: "padding:20px 8px 20px 8px;"} + -# %a{href: '#', type: "button", "data-trigger": "click focus", "data-toggle": "popover", + -# title: "Your todo list", + -# "data-content": "#{render 'tooltip', event: event}" } + -# Complete your proposal + -# - if can? :create, @conference.registrations.new + -# - progress_percentage = event.calculate_progress + -# .progress + -# %div{class: "progress-bar #{event_progress_color(progress_percentage)}", style: "width:#{progress_percentage}%;"} + -# = event.progress_status.reject{ |_key, value| value || value.nil? }.length + -# left + -# - else + -# :ruby + -# progress_list = event.progress_status + -# progress_percentage = (100 * progress_list.values.count(true) / (progress_list.values.compact.count-1)).to_s + -# .progress + -# %div{class: "progress-bar #{event_progress_color(progress_percentage)}", style: "width:#{progress_percentage}%;"} + -# = event.progress_status.reject{ |_key, value| value || value.nil? }.length-1 + -# left %td.col-md-3{style: "padding:20px 0px 20px 0px;"} .pull-right - if event.transition_possible? :confirm From df118b9ae821cc9debfae0daf559c210ad401b48 Mon Sep 17 00:00:00 2001 From: Michael Ball Date: Thu, 29 Apr 2021 22:35:43 -0700 Subject: [PATCH 4/5] Address comment lints --- app/views/proposals/index.html.haml | 88 ++++++++++++++--------------- 1 file changed, 44 insertions(+), 44 deletions(-) diff --git a/app/views/proposals/index.html.haml b/app/views/proposals/index.html.haml index 0f8ae22b..638c9cd6 100644 --- a/app/views/proposals/index.html.haml +++ b/app/views/proposals/index.html.haml @@ -34,34 +34,34 @@ .row .col-md-12 -# %p.text-right - -# = link_to '#status-help', class: 'btn btn-default', "data-toggle": "collapse" do - -# Help? + = link_to '#status-help', class: 'btn btn-default', "data-toggle": "collapse" do + Help? -# .collapse#status-help - -# %p - -# %strong - -# What happens next with my proposal? - -# %p - -# If you submit a proposal, the conference organizers will review it and either accept or reject it. - -# %br - -# If your proposal is accepted, the conference organizers expect you to confirm that you will be able to hold it. - -# %br - -# If your proposal is rejected, you can either live with that or adapt it and resubmit it for review again. - -# %br - -# If something changes and you can't hold the presentation any more, you should withdraw it. + %p + %strong + What happens next with my proposal? + %p + If you submit a proposal, the conference organizers will review it and either accept or reject it. + %br + If your proposal is accepted, the conference organizers expect you to confirm that you will be able to hold it. + %br + If your proposal is rejected, you can either live with that or adapt it and resubmit it for review again. + %br + If something changes and you can't hold the presentation any more, you should withdraw it. - -# %p - -# %strong - -# Why do I need to add more information? - -# %p - -# The more information you add to your proposal, the more likely it is that the conference organizers accept your proposal. - -# %br - -# It will also be more likely that visitors find your proposal interesting enough to attend. - -# - if can? :create, @conference.registrations.new - -# %p - -# %strong - -# Why do I need to register to the conference? - -# %p - -# Knowing the number of visitors for the conference helps the organizers plan better. + %p + %strong + Why do I need to add more information? + %p + The more information you add to your proposal, the more likely it is that the conference organizers accept your proposal. + %br + It will also be more likely that visitors find your proposal interesting enough to attend. + - if can? :create, @conference.registrations.new + %p + %strong + Why do I need to register to the conference? + %p + Knowing the number of visitors for the conference helps the organizers plan better. %table.table.table-striped#events - @events.each do |event| @@ -81,24 +81,24 @@ = link_to registered_text(event), registrations_conference_program_proposal_path(@conference.short_title, event), class: 'btn btn-xs btn-danger' -# %td.col-md-2{style: "padding:20px 8px 20px 8px;"} - -# %a{href: '#', type: "button", "data-trigger": "click focus", "data-toggle": "popover", - -# title: "Your todo list", - -# "data-content": "#{render 'tooltip', event: event}" } - -# Complete your proposal - -# - if can? :create, @conference.registrations.new - -# - progress_percentage = event.calculate_progress - -# .progress - -# %div{class: "progress-bar #{event_progress_color(progress_percentage)}", style: "width:#{progress_percentage}%;"} - -# = event.progress_status.reject{ |_key, value| value || value.nil? }.length - -# left - -# - else - -# :ruby - -# progress_list = event.progress_status - -# progress_percentage = (100 * progress_list.values.count(true) / (progress_list.values.compact.count-1)).to_s - -# .progress - -# %div{class: "progress-bar #{event_progress_color(progress_percentage)}", style: "width:#{progress_percentage}%;"} - -# = event.progress_status.reject{ |_key, value| value || value.nil? }.length-1 - -# left + %a{href: '#', type: "button", "data-trigger": "click focus", "data-toggle": "popover", + title: "Your todo list", + "data-content": "#{render 'tooltip', event: event}" } + Complete your proposal + - if can? :create, @conference.registrations.new + - progress_percentage = event.calculate_progress + .progress + %div{class: "progress-bar #{event_progress_color(progress_percentage)}", style: "width:#{progress_percentage}%;"} + = event.progress_status.reject{ |_key, value| value || value.nil? }.length + left + - else + :ruby + progress_list = event.progress_status + progress_percentage = (100 * progress_list.values.count(true) / (progress_list.values.compact.count-1)).to_s + .progress + %div{class: "progress-bar #{event_progress_color(progress_percentage)}", style: "width:#{progress_percentage}%;"} + = event.progress_status.reject{ |_key, value| value || value.nil? }.length-1 + left %td.col-md-3{style: "padding:20px 0px 20px 0px;"} .pull-right - if event.transition_possible? :confirm From c20e1f6f379e34d4f0742b98de9c7baf0315eade Mon Sep 17 00:00:00 2001 From: Michael Ball Date: Thu, 29 Apr 2021 23:00:33 -0700 Subject: [PATCH 5/5] boo, bad linters --- .haml-lint_todo.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.haml-lint_todo.yml b/.haml-lint_todo.yml index 02f1ac56..b861bbe2 100644 --- a/.haml-lint_todo.yml +++ b/.haml-lint_todo.yml @@ -250,8 +250,9 @@ linters: ConsecutiveComments: exclude: - # This one seems like a bug in haml-lint. + # These seems like a bug in haml-lint. - "app/views/admin/conferences/show.html.haml" + - "app/views/proposals/index.html.haml" # Offense count: 24 ConsecutiveSilentScripts: