diff --git a/.codeclimate.yml b/.codeclimate.yml index 581ab3566..c9e9a0539 100644 --- a/.codeclimate.yml +++ b/.codeclimate.yml @@ -1,4 +1,4 @@ plugins: rubocop: enabled: true - channel: rubocop-1-39-0 + channel: rubocop-1-56-3 diff --git a/README.md b/README.md index 6c32456ea..f8805568f 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,6 @@ +## Srping 2024 CS169L [![Specs](https://github.com/snap-cloud/snapcon/actions/workflows/spec.yml/badge.svg)](https://github.com/snap-cloud/snapcon/actions/workflows/spec.yml) +[![Pivotal Tracker](doc/pivotal_tracker_logo.png)](https://www.pivotaltracker.com/n/projects/2487653) [![Maintainability](https://api.codeclimate.com/v1/badges/b7b0d559a03bf218663a/maintainability)](https://codeclimate.com/github/snap-cloud/snapcon/maintainability) [![Test Coverage](https://api.codeclimate.com/v1/badges/b7b0d559a03bf218663a/test_coverage)](https://codeclimate.com/github/snap-cloud/snapcon/test_coverage) [![codecov](https://codecov.io/gh/snap-cloud/snapcon/branch/snapcon/graph/badge.svg?token=EViEwaSjH4)](https://codecov.io/gh/snap-cloud/snapcon) @@ -6,20 +8,6 @@ Deploy -## Spring 2022 CS169L: -[![Bluejay Dashboard](https://img.shields.io/badge/Bluejay-Dashboard_Snap!Con-blue.svg)](http://dashboard.bluejay.governify.io/dashboard/script/dashboardLoader.js?dashboardURL=https://reporter.bluejay.governify.io/api/v4/dashboards/tpa-CS169L-22-GH-yewchung_snapcon/main) -[![Pivotal Tracker](doc/pivotal_tracker_logo.png)](https://www.pivotaltracker.com/n/projects/2487653) -[![Ruby on Rails CI](https://github.com/cs169L-spring2022-snapcon/snapcon/actions/workflows/rubyonrails.yml/badge.svg)](https://github.com/cs169L-spring2022-snapcon/snapcon/actions/workflows/rubyonrails.yml) -[![Maintainability](https://api.codeclimate.com/v1/badges/6b5dc427c6d2ae2b810e/maintainability)](https://codeclimate.com/github/cs169L-spring2022-snapcon/snapcon/maintainability) -[![Test Coverage](https://api.codeclimate.com/v1/badges/6b5dc427c6d2ae2b810e/test_coverage)](https://codeclimate.com/github/cs169L-spring2022-snapcon/snapcon/test_coverage) - -## Spring 2023 CS169L: -[![Bluejay Dashboard](https://img.shields.io/badge/Bluejay-Dashboard_02-blue.svg)](http://dashboard.bluejay.governify.io/dashboard/script/dashboardLoader.js?dashboardURL=https://reporter.bluejay.governify.io/api/v4/dashboards/tpa-CS169L-23-GH-cs169_snapcon/main) -[![Pivotal Tracker](doc/pivotal_tracker_logo.png)](https://www.pivotaltracker.com/n/projects/2487653) -[![CodeQL](https://github.com/cs169/snapcon/actions/workflows/codeql-analysis.yml/badge.svg)](https://github.com/cs169/snapcon/actions/workflows/codeql-analysis.yml) -[![build](https://github.com/cs169/snapcon/actions/workflows/main.yml/badge.svg)](https://github.com/cs169/snapcon/actions/workflows/main.yml) -[![Specs](https://github.com/cs169/snapcon/actions/workflows/spec.yml/badge.svg)](https://github.com/cs169/snapcon/actions/workflows/spec.yml) - # [Snap!Con](https://snapcon.org) Forked From: ## Open Source Event Manager - [osem.io](https://osem.io) diff --git a/app/helpers/admin/tickets_helper.rb b/app/helpers/admin/tickets_helper.rb new file mode 100644 index 000000000..5db9f82de --- /dev/null +++ b/app/helpers/admin/tickets_helper.rb @@ -0,0 +1,14 @@ +module Admin + module TicketsHelper + def default_ticket_email_template + { + subject_input_id: 'ticket_email_subject', + subject_text: '{conference} | Ticket Confirmation and PDF!', + body_input_id: 'ticket_email_body', + body_text: "Dear {name},\n\nThanks! You have successfully booked {ticket_quantity} {ticket_title} +ticket(s) for the event {conference}. Your transaction id is {ticket_purchase_id}.\nPlease, +find the ticket(s) pdf attached.\n\nBest wishes,\n{conference} Team" + } + end + end +end diff --git a/app/models/ticket_purchase.rb b/app/models/ticket_purchase.rb index 79b5ea6d6..5a076ea9d 100644 --- a/app/models/ticket_purchase.rb +++ b/app/models/ticket_purchase.rb @@ -16,7 +16,6 @@ # user_id :integer # -# add a currency field class TicketPurchase < ApplicationRecord belongs_to :ticket belongs_to :user diff --git a/app/services/email_template_parser.rb b/app/services/email_template_parser.rb index fa2f5390f..9c74e2d78 100644 --- a/app/services/email_template_parser.rb +++ b/app/services/email_template_parser.rb @@ -13,14 +13,14 @@ def retrieve_values(event = nil, booth = nil, quantity = nil, ticket = nil) 'conference_start_date' => @conference.start_date, 'conference_end_date' => @conference.end_date, 'registrationlink' => Rails.application.routes.url_helpers.conference_conference_registration_url( - @conference.short_title, host: ENV.fetch('OSEM_HOSTNAME', 'localhost:3000') + @conference.short_title, host: Rails.application.routes.default_url_options[:host] ), 'conference_splash_link' => Rails.application.routes.url_helpers.conference_url( - @conference.short_title, host: ENV.fetch('OSEM_HOSTNAME', 'localhost:3000') + @conference.short_title, host: Rails.application.routes.default_url_options[:host] ), 'schedule_link' => Rails.application.routes.url_helpers.conference_schedule_url( - @conference.short_title, host: ENV.fetch('OSEM_HOSTNAME', 'localhost:3000') + @conference.short_title, host: Rails.application.routes.default_url_options[:host] ) } if @conference.program.cfp diff --git a/app/views/admin/currency_conversions/index.html.haml b/app/views/admin/currency_conversions/index.html.haml index e86817e8c..1d5ef815b 100644 --- a/app/views/admin/currency_conversions/index.html.haml +++ b/app/views/admin/currency_conversions/index.html.haml @@ -11,10 +11,11 @@ .col-md-12 %table.table.table-hover#currency-conversions %thead - %th From Curr - %th To Curr - %th Rate - %th Actions + %tr + %th From Curr + %th To Curr + %th Rate + %th Actions %tbody - @conference.currency_conversions.each do |currency_conversion| %tr diff --git a/app/views/admin/tickets/_form.html.haml b/app/views/admin/tickets/_form.html.haml index 74cea4f97..5ad23df1f 100644 --- a/app/views/admin/tickets/_form.html.haml +++ b/app/views/admin/tickets/_form.html.haml @@ -12,10 +12,12 @@ .form-group = f.label :email_body = f.text_area :email_body, rows: 10, cols: 20, class: 'form-control' - %a.btn.btn-link.control_label.load_template{ 'data-subject-input-id' => 'ticket_email_subject', - 'data-subject-text' => '{conference} | Ticket Confirmation and PDF!', - 'data-body-input-id' => 'ticket_email_body', - 'data-body-text' => "Dear {name},\n\nThanks! You have successfully booked {ticket_quantity} {ticket_title} ticket(s) for the event {conference}. Your transaction id is {ticket_purchase_id}.\nPlease, find the ticket(s) pdf attached.\n\nBest wishes,\n{conference} Team"} Load Default Email + - email_template = default_ticket_email_template + %a.btn.btn-link.control_label.load_template{'data-subject-input-id' => email_template[:subject_input_id], + 'data-subject-text' => email_template[:subject_text], + 'data-body-input-id' => email_template[:body_input_id], + 'data-body-text' => email_template[:body_text] + } Load Default Email %a.btn.btn-link.control_label.template_help_link{ 'data-name' => 'accepted_help' } Show Help = render partial: 'shared/help', locals: { id: 'accepted_help', show_event_variables: true, show_ticket_variables: true} .form-group diff --git a/app/views/shared/_help.html.haml b/app/views/shared/_help.html.haml index a41276da0..8bf1ffc33 100644 --- a/app/views/shared/_help.html.haml +++ b/app/views/shared/_help.html.haml @@ -10,7 +10,7 @@ %tr %td {conference} %td The full conference title - - if (show_event_variables.present?) + - if show_event_variables.present? %tr %td {proposalslink} %td A link to the user's proposal page diff --git a/readme b/readme deleted file mode 100644 index e69de29bb..000000000