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'
|
gem 'rubocop-rspec'
|
||||||
# to open mails
|
# to open mails
|
||||||
gem 'letter_opener'
|
gem 'letter_opener'
|
||||||
|
# view mail at /letter_opener/
|
||||||
|
gem 'letter_opener_web', '~> 1.0'
|
||||||
# as deployment system
|
# as deployment system
|
||||||
gem 'mina'
|
gem 'mina'
|
||||||
# as debugger on error pages
|
# as debugger on error pages
|
||||||
|
|
|
||||||
|
|
@ -260,6 +260,10 @@ GEM
|
||||||
rails (>= 4.2.0)
|
rails (>= 4.2.0)
|
||||||
letter_opener (1.7.0)
|
letter_opener (1.7.0)
|
||||||
launchy (~> 2.2)
|
launchy (~> 2.2)
|
||||||
|
letter_opener_web (1.4.0)
|
||||||
|
actionmailer (>= 3.2)
|
||||||
|
letter_opener (~> 1.0)
|
||||||
|
railties (>= 3.2)
|
||||||
listen (3.1.5)
|
listen (3.1.5)
|
||||||
rb-fsevent (~> 0.9, >= 0.9.4)
|
rb-fsevent (~> 0.9, >= 0.9.4)
|
||||||
rb-inotify (~> 0.9, >= 0.9.7)
|
rb-inotify (~> 0.9, >= 0.9.7)
|
||||||
|
|
@ -654,6 +658,7 @@ DEPENDENCIES
|
||||||
json-schema
|
json-schema
|
||||||
leaflet-rails
|
leaflet-rails
|
||||||
letter_opener
|
letter_opener
|
||||||
|
letter_opener_web (~> 1.0)
|
||||||
mina
|
mina
|
||||||
mini_magick
|
mini_magick
|
||||||
money-rails
|
money-rails
|
||||||
|
|
|
||||||
|
|
@ -9,6 +9,7 @@ class PhysicalTicketsController < ApplicationController
|
||||||
def index
|
def index
|
||||||
@physical_tickets = current_user.physical_tickets.by_conference(@conference)
|
@physical_tickets = current_user.physical_tickets.by_conference(@conference)
|
||||||
@unpaid_ticket_purchases = current_user.ticket_purchases.by_conference(@conference).unpaid
|
@unpaid_ticket_purchases = current_user.ticket_purchases.by_conference(@conference).unpaid
|
||||||
|
@user = current_user
|
||||||
end
|
end
|
||||||
|
|
||||||
def show
|
def show
|
||||||
|
|
|
||||||
|
|
@ -67,6 +67,11 @@ class Commercial < ApplicationRecord
|
||||||
OEmbed::Providers::Instagram,
|
OEmbed::Providers::Instagram,
|
||||||
speakerdeck
|
speakerdeck
|
||||||
)
|
)
|
||||||
|
|
||||||
|
OEmbed::Providers.register_fallback(
|
||||||
|
OEmbed::ProviderDiscovery,
|
||||||
|
OEmbed::Providers::Noembed
|
||||||
|
)
|
||||||
end
|
end
|
||||||
|
|
||||||
def conference_id
|
def conference_id
|
||||||
|
|
|
||||||
|
|
@ -106,7 +106,7 @@ end
|
||||||
|
|
||||||
def count_purchased_registration_tickets(conference, purchases)
|
def count_purchased_registration_tickets(conference, purchases)
|
||||||
# TODO: WHAT CAUSED THIS???
|
# TODO: WHAT CAUSED THIS???
|
||||||
return 0 unless purcahses
|
return 0 unless purchases
|
||||||
conference.tickets.for_registration.inject(0) do |sum, registration_ticket|
|
conference.tickets.for_registration.inject(0) do |sum, registration_ticket|
|
||||||
sum + purchases[registration_ticket.id.to_s].to_i
|
sum + purchases[registration_ticket.id.to_s].to_i
|
||||||
end
|
end
|
||||||
|
|
|
||||||
|
|
@ -29,6 +29,7 @@
|
||||||
- if @conference.user_registered?(current_user)
|
- if @conference.user_registered?(current_user)
|
||||||
= f.action :submit, button_html: { value: 'Update Registration', class: 'btn btn-primary' }
|
= f.action :submit, button_html: { value: 'Update Registration', class: 'btn btn-primary' }
|
||||||
- else
|
- 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'}
|
.tab-pane{role: 'tabpanel', id: 'signin'}
|
||||||
= render partial: 'devise/shared/sign_in_form_embedded'
|
= render partial: 'devise/shared/sign_in_form_embedded'
|
||||||
|
|
|
||||||
|
|
@ -20,7 +20,7 @@
|
||||||
%h3.text-center.word_break
|
%h3.text-center.word_break
|
||||||
= ticket.title
|
= ticket.title
|
||||||
.word_break
|
.word_break
|
||||||
= markdown(ticket.description)
|
= markdown(ticket.description.split("\n")&.first.strip)
|
||||||
%button.btn-block.btn.btn-lg.btn-success
|
%button.btn-block.btn.btn-lg.btn-success
|
||||||
%i.fa.fa-ticket.fa-fw{"aria-hidden": true}
|
%i.fa.fa-ticket.fa-fw{"aria-hidden": true}
|
||||||
= humanized_money_with_symbol(ticket.price)
|
= humanized_money_with_symbol(ticket.price)
|
||||||
|
|
|
||||||
|
|
@ -9,6 +9,15 @@
|
||||||
.text-muted
|
.text-muted
|
||||||
Your tickets for the conference
|
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
|
.col-md-12
|
||||||
- if @physical_tickets.present?
|
- if @physical_tickets.present?
|
||||||
%table.table.table-bordered.table-striped.table-hover#roles
|
%table.table.table-bordered.table-striped.table-hover#roles
|
||||||
|
|
|
||||||
|
|
@ -69,6 +69,6 @@
|
||||||
$(document).ready(function() {
|
$(document).ready(function() {
|
||||||
$('#event_speaker_ids').selectize({
|
$('#event_speaker_ids').selectize({
|
||||||
plugins: ['remove_button'],
|
plugins: ['remove_button'],
|
||||||
maxItems: 5
|
maxItems: 100
|
||||||
} )
|
} )
|
||||||
});
|
});
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,7 @@
|
||||||
Osem::Application.routes.draw do
|
Osem::Application.routes.draw do
|
||||||
|
|
||||||
|
mount LetterOpenerWeb::Engine, at: "/letter_opener" if Rails.env.development?
|
||||||
|
|
||||||
constraints DomainConstraint do
|
constraints DomainConstraint do
|
||||||
get '/', to: 'conferences#show'
|
get '/', to: 'conferences#show'
|
||||||
end
|
end
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue