commit
744fe48121
10 changed files with 29 additions and 4 deletions
2
Gemfile
2
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
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -67,6 +67,11 @@ class Commercial < ApplicationRecord
|
|||
OEmbed::Providers::Instagram,
|
||||
speakerdeck
|
||||
)
|
||||
|
||||
OEmbed::Providers.register_fallback(
|
||||
OEmbed::ProviderDiscovery,
|
||||
OEmbed::Providers::Noembed
|
||||
)
|
||||
end
|
||||
|
||||
def conference_id
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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'
|
||||
|
|
|
|||
|
|
@ -20,7 +20,7 @@
|
|||
%h3.text-center.word_break
|
||||
= ticket.title
|
||||
.word_break
|
||||
= markdown(ticket.description)
|
||||
= 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)
|
||||
|
|
|
|||
|
|
@ -9,6 +9,15 @@
|
|||
.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'
|
||||
|
||||
.col-md-12
|
||||
- if @physical_tickets.present?
|
||||
%table.table.table-bordered.table-striped.table-hover#roles
|
||||
|
|
|
|||
|
|
@ -69,6 +69,6 @@
|
|||
$(document).ready(function() {
|
||||
$('#event_speaker_ids').selectize({
|
||||
plugins: ['remove_button'],
|
||||
maxItems: 5
|
||||
maxItems: 100
|
||||
} )
|
||||
});
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue