Skip to content

Commit

Permalink
Clean up legacy code from SP23 Main
Browse files Browse the repository at this point in the history
  • Loading branch information
warrenlet committed Feb 18, 2024
1 parent cc2eaba commit cf5fcb1
Show file tree
Hide file tree
Showing 9 changed files with 32 additions and 28 deletions.
2 changes: 1 addition & 1 deletion .codeclimate.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
plugins:
rubocop:
enabled: true
channel: rubocop-1-39-0
channel: rubocop-1-56-3
16 changes: 2 additions & 14 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,25 +1,13 @@
## 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)
<a href="https://heroku.com/deploy?template=https://github.com/snap-cloud/snapcon/tree/v1.0">
<img src="https://www.herokucdn.com/deploy/button.svg" height="20px" alt="Deploy">
</a>

## 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)
Expand Down
14 changes: 14 additions & 0 deletions app/helpers/admin/tickets_helper.rb
Original file line number Diff line number Diff line change
@@ -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
1 change: 0 additions & 1 deletion app/models/ticket_purchase.rb
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@
# user_id :integer
#

# add a currency field
class TicketPurchase < ApplicationRecord
belongs_to :ticket
belongs_to :user
Expand Down
6 changes: 3 additions & 3 deletions app/services/email_template_parser.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
9 changes: 5 additions & 4 deletions app/views/admin/currency_conversions/index.html.haml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
10 changes: 6 additions & 4 deletions app/views/admin/tickets/_form.html.haml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion app/views/shared/_help.html.haml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Empty file removed readme
Empty file.

0 comments on commit cf5fcb1

Please sign in to comment.