Merge branch 'master' into fix-social-media-splashpage
This commit is contained in:
commit
b5bcc28fa2
5 changed files with 18 additions and 3 deletions
|
|
@ -115,3 +115,9 @@ p.comment-body {
|
|||
float: right;
|
||||
}
|
||||
}
|
||||
|
||||
/* omniauth btn grp */
|
||||
#openid-btn-grp{
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
}
|
||||
|
|
@ -20,6 +20,11 @@ class ConferencesController < ApplicationController
|
|||
authorize! :show, @conference # TODO: reduce the 10 queries performed here
|
||||
|
||||
splashpage = @conference.splashpage
|
||||
|
||||
unless splashpage.present?
|
||||
redirect_to admin_conference_splashpage_path(@conference.short_title) && return
|
||||
end
|
||||
|
||||
if splashpage.include_cfp
|
||||
cfps = @conference.program.cfps
|
||||
@call_for_events = cfps.find { |call| call.cfp_type == 'events' }
|
||||
|
|
|
|||
|
|
@ -62,7 +62,11 @@ class Ticket < ApplicationRecord
|
|||
|
||||
def tickets_turnover_total(id)
|
||||
tickets = TicketPurchase.where(ticket_id: id).paid
|
||||
tickets.inject(0){ |sum, ticket| sum + (ticket.amount_paid * ticket.quantity) }
|
||||
if tickets.blank?
|
||||
Money.new(0, Ticket.find(id).price_currency)
|
||||
else
|
||||
tickets.inject(Money.new(0, tickets.first.price_currency)){ |sum, ticket| sum + (ticket.amount_paid * ticket.quantity) }
|
||||
end
|
||||
end
|
||||
|
||||
def tickets_sold
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
.text-center
|
||||
.btn-group.btn-group-lg
|
||||
.btn-group.btn-group-lg#openid-btn-grp
|
||||
- omniauth_configured.each do |provider|
|
||||
= link_to "user_#{provider}_omniauth_authorize".to_sym, class: "btn btn-success btn-lg",
|
||||
id: "omniauth-#{provider}",
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue