Merge branch 'master' into currency_chf

This commit is contained in:
James Mason 2017-10-17 07:14:13 -07:00 committed by GitHub
commit caf2215f5b
41 changed files with 199 additions and 69 deletions

View file

@ -1,12 +1,16 @@
%dt
Start Date
Type:
%dd
= @cfp.cfp_type.capitalize
%dt
Start Date:
%dd
= @cfp.start_date.strftime('%A, %B %e. %Y')
%dt
End Date
End Date:
%dd
= @cfp.end_date.strftime('%A, %B %e. %Y')
%dt
Days Left
Days Left:
%dd
= pluralize(@cfp.remaining_days, 'day')

View file

@ -1,3 +1,7 @@
%dt
Type:
%dd
= @cfp.cfp_type.capitalize
%dt
Start Date:
%dd#start_date
@ -19,7 +23,7 @@
%dd
= tracks(@conference)
%dt
Public Schedule
Public Schedule:
%dd#schedule_public
- if @program.schedule_public
Yes
@ -33,6 +37,6 @@
- else
No
%dt
Rating Levels
Rating Levels:
%dd#rating
= @program.rating

View file

@ -1,3 +1,7 @@
%dt
Type:
%dd
= @cfp.cfp_type.capitalize
%dt
Start Date:
%dd#start_date

View file

@ -6,9 +6,9 @@
%div
%a.pull-right.comment-reply-link{ href: '#' } Reply
.comment-reply
= semantic_form_for :comment, url: '#{comment_admin_conference_program_event_path(@conference.short_title, comment.commentable_id)}', method: :post do |f|
= semantic_form_for :comment, url: comment_admin_conference_program_event_path(@conference.short_title, comment.commentable_id), method: :post do |f|
= f.input :body
%input{ name: 'parent', type: 'hidden', value: '#{comment.id}' }
%input{ name: 'parent', type: 'hidden', value: comment.id }
%input{ name: 'authenticity_token', type: 'hidden', value: '#{form_authenticity_token}' }
%button.btn.btn-primary.pull-right{ name: 'button', type: 'submit' } Add Reply
- comment.children.each do |child|

View file

@ -9,13 +9,14 @@
=link_to 'Add Event', new_admin_conference_program_event_path(@conference.short_title), class: 'button btn btn-default btn-info'
- if can? :read, Event
.btn-group
%button.btn.btn-default.dropdown-toggle{ 'data-toggle' => 'dropdown', type: 'button', class: 'btn btn-success' }
Export PDF
%span.caret
%ul.dropdown-menu{ role: 'menu' }
%li= link_to 'All Events', admin_conference_program_events_path(@conference.short_title, format: :pdf, event_export_option: 'all')
%li= link_to 'Confirmed Events', admin_conference_program_events_path(@conference.short_title, format: :pdf, event_export_option: 'confirmed')
%li= link_to 'All Events with Comments', admin_conference_program_events_path(@conference.short_title, format: :pdf, event_export_option: 'all_with_comments')
.btn-group
%button.btn.btn-default.dropdown-toggle{ 'data-toggle' => 'dropdown', type: 'button', class: 'btn btn-success' }
Export PDF
%span.caret
%ul.dropdown-menu{ role: 'menu' }
%li= link_to 'All Events', admin_conference_program_events_path(@conference.short_title, format: :pdf, event_export_option: 'all')
%li= link_to 'Confirmed Events', admin_conference_program_events_path(@conference.short_title, format: :pdf, event_export_option: 'confirmed')
%li= link_to 'All Events with Comments', admin_conference_program_events_path(@conference.short_title, format: :pdf, event_export_option: 'all_with_comments')
.btn-group
%button.btn.btn-default.dropdown-toggle{ 'data-toggle' => 'dropdown', type: 'button', class: 'btn btn-success' }
Export CSV

View file

@ -40,11 +40,23 @@
.tab-pane{ class: "#{ (@dates.first == date) ? 'active' : '' }", id: "#{date}" }
= render partial: 'day_tab', locals: { date: date }
- else
.h3
No Rooms!
%small
= link_to 'Create rooms', admin_conference_venue_rooms_path
before creating the schedule.
- if @venue.try(:rooms).present?
.text-right
- if can? :create, @program.schedules.new
= link_to 'Add Schedule', admin_conference_schedules_path(@conference.short_title),
method: :post, class: 'btn btn-primary'
- elsif @venue
.h3
No Rooms!
%small
= link_to 'Create rooms', admin_conference_venue_rooms_path
before creating the schedule.
- else
.h3
No Venue!
%small
= link_to 'Create a venue with rooms', new_admin_conference_venue_path
before creating the schedule.
:javascript
$(document).ready( function() {

View file

@ -40,4 +40,4 @@
.row
.col-md-12
= link_to 'Add Ticket', new_admin_conference_ticket_path, class: 'btn btn-success pull-right'
= link_to 'Tickets Sold', admin_conference_physical_ticket_index_path, class: 'button btn btn-default btn-info pull-right'
= link_to 'Tickets Sold', admin_conference_physical_tickets_path, class: 'button btn btn-default btn-info pull-right'

View file

@ -15,6 +15,12 @@
= semantic_form_for(@venue, url: admin_conference_venue_path(@conference.short_title)) do |f|
= f.inputs :name, :website
= f.input :description, input_html: { rows: 5, cols: 20, data: { provide: 'markdown-editable' } }, hint: markdown_hint
= f.label 'Venue Logo'
%br
- if @venue.picture?
= image_tag @venue.picture.thumb.url
= f.input :picture, label: false, hint: 'This will be displayed on the venue are of the splash page.'
= f.hidden_field :picture_cache
= f.inputs :street, :postalcode, :city, :country, :latitude, :longitude
= f.action :submit, as: :button, button_html: { class: 'btn btn-primary' }

View file

@ -19,7 +19,7 @@
- else
- conference = Conference.find_by(id: version.conference_id)
- conference_short_title = conference.try(:short_title) || current_or_last_object_state('Conference', version.conference_id).try(:short_title) || ' '
= link_if_alive version, role.try(:name), admin_conference_role_path(role.try(:name) || ' ', conference_short_title), conference
= link_if_alive version, role.try(:name), admin_conference_role_path(conference_short_title,role.try(:name) || ' '), conference
= version.event == 'create' ? 'to' : 'from'
user

View file

@ -47,4 +47,4 @@
- else
= link_to 'Unsubscribe', conference_subscriptions_path(conference.short_title), method: :delete, class: 'btn btn-default'
- if current_user && current_user.physical_tickets.by_conference(conference).any?
= link_to "My Tickets", conference_physical_ticket_index_path(conference.short_title), class: 'btn btn-default'
= link_to "My Tickets", conference_physical_tickets_path(conference.short_title), class: 'btn btn-default'

View file

@ -32,4 +32,4 @@
= @conference.venue.country_name
- if @conference.venue.website
%br
=link_to @conference.venue.website, @conference.venue.website
=link_to(h(@conference.venue.website), h(@conference.venue.website)).html_safe

View file

@ -1,17 +1,16 @@
#map{style: "height: 500px;" }
- popup = "<h3>#{@conference.venue.name}</h3><br>#{@conference.venue.street}<br>#{@conference.venue.city}<br>#{@conference.venue.country_name}"
- content_for(:script_body) do
:javascript
// create a map in the "map" div, set the view to a given place and zoom
var map = L.map('map', { scrollWheelZoom: false }).setView([#{@conference.venue.latitude}, #{@conference.venue.longitude}], 11);
var map = L.map('map', { scrollWheelZoom: false }).setView([#{h(@conference.venue.latitude)}, #{h(@conference.venue.longitude)}], 11);
// add an OpenStreetMap tile layer
L.tileLayer('//{s}.tile.openstreetmap.org/{z}/{x}/{y}.png', {
attribution: 'Map data &copy; <a href="http://openstreetmap.org">OpenStreetMap</a> contributors, <a href="http://creativecommons.org/licenses/by-sa/2.0/">CC-BY-SA</a>, Imagery © <a href="http://mapbox.com">Mapbox</a>',
maxZoom: 18
}).addTo(map);
// add a marker in the given location, attach some popup content to it and open the popup
L.marker([#{@conference.venue.latitude}, #{@conference.venue.longitude}]).addTo(map)
.bindPopup("#{popup}")
L.marker([#{h @conference.venue.latitude}, #{h @conference.venue.longitude}]).addTo(map)
.bindPopup("#{escape_javascript(render '/conferences/venue_map_marker', venue: @conference.venue)}")
.openPopup();
// Turn scrollwheel on when user clicks
map.on('focus', function(e) {

View file

@ -0,0 +1,13 @@
- if venue.picture?
= image_tag venue.picture.thumb.url,
alt: venue.name,
class: 'img-responsive pull-right'
%h3= venue.name
%p
= venue.street
%br
= venue.city
%br
= venue.country_name
- if venue.website
%p.text-center.clearfix= sanitize(link_to venue.website, venue.website)

View file

@ -82,7 +82,7 @@
- content_for :script_head do
:javascript
var triangle_tcs = tinycolor("#{@conference.color}").monochromatic();
var triangle_tcs = tinycolor("#{h(@conference.color)}").monochromatic();
var triangle_colors = triangle_tcs.map(function(t) { return t.toHexString(); });
$(function () {
$(document).ready(function() {

View file

@ -55,7 +55,7 @@
%p
Knowing the number of visitors for the conference helps the organizers plan better.
%table.table.table-striped
%table.table.table-striped#events
- @events.each do |event|
%tr
%td{style: "padding:20px 8px 20px 8px;"}