Merge branch 'master' of github.com:snap-cloud/snapcon into admin-ticketing
* 'master' of github.com:snap-cloud/snapcon: (22 commits) Cleanup some Auth specs and weird haml syntax add sentry puma hooks fix user model spec Tweak Tickets Text fix missing ] Fix specs for omniauth providers? Update stripe mock gem remove airbrake Add sentry logging Update stripe gem Cleanup stripe stuff Fix the docker init script Cleanup specs Cleanup config file, ensure providers are set if present Fix format spec with new markdown options Try to update spec file with image in navbar Delint Delint helpers Lint: Sort gems Update user model spec ...
This commit is contained in:
commit
be991c53d3
18 changed files with 113 additions and 96 deletions
|
|
@ -178,20 +178,22 @@ module ApplicationHelper
|
|||
'hidden' if Date.today > conference.end_date
|
||||
end
|
||||
|
||||
# TODO:Snap!Con: Replace this with a search for a conference logo.
|
||||
def nav_root_link_for(conference)
|
||||
link_text = (
|
||||
conference.try(:organization).try(:name) ||
|
||||
ENV['OSEM_NAME'] ||
|
||||
'OSEM'
|
||||
)
|
||||
link_to(
|
||||
image_tag('snapcon_logo.png'),
|
||||
root_path,
|
||||
class: 'navbar-brand',
|
||||
title: 'Open Source Event Manager'
|
||||
title: nav_link_text(conference)
|
||||
)
|
||||
end
|
||||
|
||||
def nav_link_text(conference)
|
||||
conference.try(:organization).try(:name) ||
|
||||
ENV['OSEM_NAME'] ||
|
||||
'OSEM'
|
||||
end
|
||||
|
||||
# returns the url to be used for logo on basis of sponsorship level position
|
||||
def get_logo(object)
|
||||
if object.try(:sponsorship_level)
|
||||
|
|
|
|||
|
|
@ -1,4 +1,5 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
require 'redcarpet/render_strip'
|
||||
|
||||
module FormatHelper
|
||||
|
|
@ -43,12 +44,11 @@ module FormatHelper
|
|||
|
||||
def target_progress_color(progress)
|
||||
progress = progress.to_i
|
||||
result =
|
||||
case
|
||||
when progress >= 90 then 'green'
|
||||
when progress < 90 && progress >= 80 then 'orange'
|
||||
else 'red'
|
||||
end
|
||||
result = case
|
||||
when progress >= 90 then 'green'
|
||||
when progress < 90 && progress >= 80 then 'orange'
|
||||
else 'red'
|
||||
end
|
||||
|
||||
result
|
||||
end
|
||||
|
|
@ -100,19 +100,11 @@ module FormatHelper
|
|||
end
|
||||
|
||||
def icon_for_todo(bool)
|
||||
if bool
|
||||
'fa fa-check'
|
||||
else
|
||||
'fa fa-times'
|
||||
end
|
||||
bool ? 'fa fa-check' : 'fa fa-times'
|
||||
end
|
||||
|
||||
def class_for_todo(bool)
|
||||
if bool
|
||||
'todolist-ok'
|
||||
else
|
||||
'todolist-missing'
|
||||
end
|
||||
bool ? 'todolist-ok' : 'todolist-missing'
|
||||
end
|
||||
|
||||
def word_pluralize(count, singular, plural = nil)
|
||||
|
|
|
|||
|
|
@ -50,7 +50,10 @@ class User < ApplicationRecord
|
|||
else
|
||||
[:database_authenticatable, :registerable,
|
||||
:recoverable, :rememberable, :trackable, :validatable, :confirmable,
|
||||
:omniauthable, omniauth_providers: [:google, :discourse]]
|
||||
:omniauthable,
|
||||
# omniauth_providers: [:suse, :google, :facebook, :github, :discourse]
|
||||
omniauth_providers: [:google, :discourse]
|
||||
]
|
||||
end
|
||||
|
||||
devise(*devise_modules)
|
||||
|
|
|
|||
|
|
@ -7,7 +7,7 @@
|
|||
.container
|
||||
.row
|
||||
.col-md-12.text-center
|
||||
%h2 Sign Up for Campus Housing
|
||||
%h2 Sign Up for Snap<em>!</em>Con
|
||||
%br
|
||||
-# %h2
|
||||
-# Support
|
||||
|
|
@ -15,8 +15,7 @@
|
|||
.row.row-centered
|
||||
- tickets.each do |ticket|
|
||||
.col-lg-4.col-md-3.col-sm-3.col-centered.col-top
|
||||
= link_to(conference_tickets_path(conference.short_title),
|
||||
class: 'thumbnail') do
|
||||
= link_to(conference_tickets_path(conference.short_title), class: 'thumbnail') do
|
||||
.caption
|
||||
%h3.text-center.word_break
|
||||
= ticket.title
|
||||
|
|
|
|||
|
|
@ -7,8 +7,10 @@
|
|||
title: "Your #{provider} login" do
|
||||
%i{class: "fa fa-#{provider}"}
|
||||
- else
|
||||
= link_to("Snap!",
|
||||
"user_#{provider}_omniauth_authorize".to_sym,
|
||||
= link_to("user_#{provider}_omniauth_authorize".to_sym,
|
||||
class: "btn btn-success btn-lg",
|
||||
id: "omniauth-#{provider}",
|
||||
title: "Your #{provider} login")
|
||||
title: "Your #{provider} login") do
|
||||
%span
|
||||
Snap
|
||||
%em> !
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
.div
|
||||
.col-md-12.table-responsive
|
||||
%table.table.table-hover
|
||||
%table.table.table-hover.table-striped
|
||||
%thead
|
||||
%tr
|
||||
%th Ticket
|
||||
|
|
@ -20,8 +20,13 @@
|
|||
= humanized_money_with_symbol ticket.quantity * ticket.price
|
||||
|
||||
= form_tag conference_payments_path do
|
||||
%script.stripe-button{ src: "https://checkout.stripe.com/checkout.js",
|
||||
data: { amount: @total_amount_to_pay.cents, label: "Pay #{humanized_money_with_symbol @total_amount_to_pay}",
|
||||
email: current_user.email, currency: @total_amount_to_pay.currency, name: ENV['OSEM_NAME'] || 'OSEM',
|
||||
description: "book your tickets", key: Rails.application.secrets.stripe_publishable_key, locale: "auto"}}
|
||||
= link_to 'Edit Purchase', conference_tickets_path(@conference.short_title), class: 'btn btn-default'
|
||||
%script.stripe-button{'src': "https://checkout.stripe.com/checkout.js",
|
||||
'data': {amount: @total_amount_to_pay.cents,
|
||||
label: "Pay #{humanized_money_with_symbol @total_amount_to_pay}",
|
||||
email: current_user.email,
|
||||
currency: @total_amount_to_pay.currency,
|
||||
name: ENV['OSEM_NAME'] || 'OSEM',
|
||||
description: "#{ENV['OSEM_NAME']} tickets",
|
||||
key: ENV['STRIPE_PUBLISHABLE_KEY'] || Rails.application.secrets.stripe_publishable_key, locale: "auto"}}
|
||||
= link_to('Edit Purchase', conference_tickets_path(@conference.short_title),
|
||||
class: 'btn btn-default')
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue