From a5c10dc16179d3edc3239763d6c4404b1325bb91 Mon Sep 17 00:00:00 2001 From: Michael Ball Date: Mon, 15 Jun 2020 10:55:26 -0700 Subject: [PATCH 01/11] ugh typo --- app/models/ticket_purchase.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/models/ticket_purchase.rb b/app/models/ticket_purchase.rb index 4e554055..1eaa9cf5 100644 --- a/app/models/ticket_purchase.rb +++ b/app/models/ticket_purchase.rb @@ -106,7 +106,7 @@ end def count_purchased_registration_tickets(conference, purchases) # TODO: WHAT CAUSED THIS??? - return 0 unless purcahses + return 0 unless purchases conference.tickets.for_registration.inject(0) do |sum, registration_ticket| sum + purchases[registration_ticket.id.to_s].to_i end From 545b4b8852aeb1057c4d9fbda44cf99af2098685 Mon Sep 17 00:00:00 2001 From: Michael Ball Date: Thu, 18 Jun 2020 04:14:38 -0700 Subject: [PATCH 02/11] Fix letter opener; tweak ticket display --- Gemfile | 2 ++ Gemfile.lock | 5 +++++ app/views/conferences/_tickets.haml | 2 +- config/routes.rb | 2 ++ 4 files changed, 10 insertions(+), 1 deletion(-) diff --git a/Gemfile b/Gemfile index ad32fc93..067631c7 100644 --- a/Gemfile +++ b/Gemfile @@ -231,6 +231,8 @@ group :development do gem 'rubocop-rspec' # to open mails gem 'letter_opener' + # view mail at /letter_opener/ + gem 'letter_opener_web', '~> 1.0' # as deployment system gem 'mina' # as debugger on error pages diff --git a/Gemfile.lock b/Gemfile.lock index 4eb23f40..f56e0758 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -260,6 +260,10 @@ GEM rails (>= 4.2.0) letter_opener (1.7.0) launchy (~> 2.2) + letter_opener_web (1.4.0) + actionmailer (>= 3.2) + letter_opener (~> 1.0) + railties (>= 3.2) listen (3.1.5) rb-fsevent (~> 0.9, >= 0.9.4) rb-inotify (~> 0.9, >= 0.9.7) @@ -654,6 +658,7 @@ DEPENDENCIES json-schema leaflet-rails letter_opener + letter_opener_web (~> 1.0) mina mini_magick money-rails diff --git a/app/views/conferences/_tickets.haml b/app/views/conferences/_tickets.haml index 8b37582a..1463f20c 100644 --- a/app/views/conferences/_tickets.haml +++ b/app/views/conferences/_tickets.haml @@ -20,7 +20,7 @@ %h3.text-center.word_break = ticket.title .word_break - = markdown(ticket.description) + = markdown(ticket.description.split('\n').first) %button.btn-block.btn.btn-lg.btn-success %i.fa.fa-ticket.fa-fw{"aria-hidden": true} = humanized_money_with_symbol(ticket.price) diff --git a/config/routes.rb b/config/routes.rb index 8849e0b2..478e7294 100644 --- a/config/routes.rb +++ b/config/routes.rb @@ -1,5 +1,7 @@ Osem::Application.routes.draw do + mount LetterOpenerWeb::Engine, at: "/letter_opener" if Rails.env.development? + constraints DomainConstraint do get '/', to: 'conferences#show' end From 26692027a567ea4b9b042015d0895734af2cd005 Mon Sep 17 00:00:00 2001 From: Michael Ball Date: Thu, 18 Jun 2020 04:29:57 -0700 Subject: [PATCH 03/11] Restore registration flow --- app/views/conference_registrations/_form.html.haml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/app/views/conference_registrations/_form.html.haml b/app/views/conference_registrations/_form.html.haml index 1283d274..611929c8 100644 --- a/app/views/conference_registrations/_form.html.haml +++ b/app/views/conference_registrations/_form.html.haml @@ -29,6 +29,7 @@ - if @conference.user_registered?(current_user) = f.action :submit, button_html: { value: 'Update Registration', class: 'btn btn-primary' } - else - = link_to('Get Tickets', conference_tickets_path(@conference), class: 'btn btn-primary') + = f.action :submit, button_html: { value: 'Register', class: 'btn btn-primary', id: 'register' } + .tab-pane{role: 'tabpanel', id: 'signin'} = render partial: 'devise/shared/sign_in_form_embedded' From f9a3bd73a2006d488d8c402c404f1c782136de4d Mon Sep 17 00:00:00 2001 From: Michael Ball Date: Thu, 18 Jun 2020 11:01:39 -0700 Subject: [PATCH 04/11] Add fallback oembeds --- app/models/commercial.rb | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/app/models/commercial.rb b/app/models/commercial.rb index 4d28330c..5acda134 100644 --- a/app/models/commercial.rb +++ b/app/models/commercial.rb @@ -67,6 +67,11 @@ class Commercial < ApplicationRecord OEmbed::Providers::Instagram, speakerdeck ) + + OEmbed::Providers.register_fallback( + OEmbed::ProviderDiscovery, + OEmbed::Providers::Noembed + ) end def conference_id From 1d478ba5b949e53f76cafd4a29753df3a1144d1f Mon Sep 17 00:00:00 2001 From: Michael Ball Date: Thu, 18 Jun 2020 11:03:20 -0700 Subject: [PATCH 05/11] Fix split by newlines --- app/views/conferences/_tickets.haml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/views/conferences/_tickets.haml b/app/views/conferences/_tickets.haml index 1463f20c..a028e8a0 100644 --- a/app/views/conferences/_tickets.haml +++ b/app/views/conferences/_tickets.haml @@ -20,7 +20,7 @@ %h3.text-center.word_break = ticket.title .word_break - = markdown(ticket.description.split('\n').first) + = markdown(ticket.description.split("\n").first) %button.btn-block.btn.btn-lg.btn-success %i.fa.fa-ticket.fa-fw{"aria-hidden": true} = humanized_money_with_symbol(ticket.price) From 38e3cc12fd83031a99014f7478a9b39d0f1d228a Mon Sep 17 00:00:00 2001 From: Michael Ball Date: Thu, 18 Jun 2020 11:04:11 -0700 Subject: [PATCH 06/11] strip text on homepage tickets --- app/views/conferences/_tickets.haml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/views/conferences/_tickets.haml b/app/views/conferences/_tickets.haml index a028e8a0..8e29558d 100644 --- a/app/views/conferences/_tickets.haml +++ b/app/views/conferences/_tickets.haml @@ -20,7 +20,7 @@ %h3.text-center.word_break = ticket.title .word_break - = markdown(ticket.description.split("\n").first) + = markdown(ticket.description.split("\n")&.first.strip) %button.btn-block.btn.btn-lg.btn-success %i.fa.fa-ticket.fa-fw{"aria-hidden": true} = humanized_money_with_symbol(ticket.price) From 68e574dd9e6005e2ca58494d671a61edd3282c5d Mon Sep 17 00:00:00 2001 From: Michael Ball Date: Thu, 18 Jun 2020 11:37:26 -0700 Subject: [PATCH 07/11] Add in registration warning --- app/views/physical_tickets/index.html.haml | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/app/views/physical_tickets/index.html.haml b/app/views/physical_tickets/index.html.haml index e8adbc80..2d664a0b 100644 --- a/app/views/physical_tickets/index.html.haml +++ b/app/views/physical_tickets/index.html.haml @@ -9,6 +9,13 @@ .text-muted Your tickets for the conference + - if !@confernce.user_registered?(@user) + %strong + You are not yet registered for the conference. + = link_to 'Complete Registration', + conference_conference_registration_path(@conference), + class: 'btn btn-success pull-right' + .col-md-12 - if @physical_tickets.present? %table.table.table-bordered.table-striped.table-hover#roles From 3432b9fd9ee72074b3e3f83868d59e0801395bed Mon Sep 17 00:00:00 2001 From: Michael Ball Date: Thu, 18 Jun 2020 11:50:34 -0700 Subject: [PATCH 08/11] ugh, typo --- app/views/physical_tickets/index.html.haml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/views/physical_tickets/index.html.haml b/app/views/physical_tickets/index.html.haml index 2d664a0b..fa543735 100644 --- a/app/views/physical_tickets/index.html.haml +++ b/app/views/physical_tickets/index.html.haml @@ -9,7 +9,7 @@ .text-muted Your tickets for the conference - - if !@confernce.user_registered?(@user) + - if !@conference.user_registered?(@user) %strong You are not yet registered for the conference. = link_to 'Complete Registration', From 05fa9e8d3d95905aaf6f3a36735297c83ae2b508 Mon Sep 17 00:00:00 2001 From: Michael Ball Date: Thu, 18 Jun 2020 12:02:59 -0700 Subject: [PATCH 09/11] set @user correctly --- app/controllers/physical_tickets_controller.rb | 1 + app/views/physical_tickets/index.html.haml | 4 +++- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/app/controllers/physical_tickets_controller.rb b/app/controllers/physical_tickets_controller.rb index bc917b6e..b4404aa7 100644 --- a/app/controllers/physical_tickets_controller.rb +++ b/app/controllers/physical_tickets_controller.rb @@ -9,6 +9,7 @@ class PhysicalTicketsController < ApplicationController def index @physical_tickets = current_user.physical_tickets.by_conference(@conference) @unpaid_ticket_purchases = current_user.ticket_purchases.by_conference(@conference).unpaid + @user = current_user end def show diff --git a/app/views/physical_tickets/index.html.haml b/app/views/physical_tickets/index.html.haml index fa543735..bf71cecc 100644 --- a/app/views/physical_tickets/index.html.haml +++ b/app/views/physical_tickets/index.html.haml @@ -9,7 +9,9 @@ .text-muted Your tickets for the conference - - if !@conference.user_registered?(@user) + - if !@conference.user_registered?(@user) + .row + .col-md-12 %strong You are not yet registered for the conference. = link_to 'Complete Registration', From dbfebdcd01f5b4efcca20ba72c6ec6e521f5d402 Mon Sep 17 00:00:00 2001 From: Michael Ball Date: Thu, 18 Jun 2020 12:08:15 -0700 Subject: [PATCH 10/11] Ooops. Fix indentation --- app/views/physical_tickets/index.html.haml | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/app/views/physical_tickets/index.html.haml b/app/views/physical_tickets/index.html.haml index bf71cecc..cc7dbae2 100644 --- a/app/views/physical_tickets/index.html.haml +++ b/app/views/physical_tickets/index.html.haml @@ -9,14 +9,14 @@ .text-muted Your tickets for the conference - - if !@conference.user_registered?(@user) - .row - .col-md-12 - %strong - You are not yet registered for the conference. - = link_to 'Complete Registration', - conference_conference_registration_path(@conference), - class: 'btn btn-success pull-right' + - if !@conference.user_registered?(@user) + .row + .col-md-12 + %strong + You are not yet registered for the conference. + = link_to 'Complete Registration', + conference_conference_registration_path(@conference), + class: 'btn btn-success pull-right' .col-md-12 - if @physical_tickets.present? From 46955e4ed922c5b14c4dde1c35acdbedb2de1c7f Mon Sep 17 00:00:00 2001 From: Michael Ball Date: Wed, 24 Jun 2020 02:55:20 -0700 Subject: [PATCH 11/11] Up max speakers to 100 --- app/views/proposals/_proposal_form.html.haml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/views/proposals/_proposal_form.html.haml b/app/views/proposals/_proposal_form.html.haml index e4d72ae3..5131790e 100644 --- a/app/views/proposals/_proposal_form.html.haml +++ b/app/views/proposals/_proposal_form.html.haml @@ -69,6 +69,6 @@ $(document).ready(function() { $('#event_speaker_ids').selectize({ plugins: ['remove_button'], - maxItems: 5 + maxItems: 100 } ) });