Rename 'ConferenceController' to 'ConferencesController', and 'ProposalController' to 'ProposalsController'

This commit is contained in:
richiethomas 2016-09-14 22:42:04 -04:00
parent 0b6550d060
commit daf1f805bd
71 changed files with 225 additions and 191 deletions

View file

@ -0,0 +1,43 @@
= content_for :splash_nav do
%li
%a.smoothscroll{ href: '#callforpapers' } Call For Papers
.container
.row
.col-md-12.text-center
%h2
Call for Papers
%p.lead
We are ready to accept your proposals for sessions!
.row
.col-md-6.col-md-offset-3.col-sm-10.col-sm-offset-1
%p
- if @conference.program.event_types.any?
You can submit proposals for
%span.notranslate
= "#{event_types(@conference)}."
- if @conference.program.tracks.any?
Proposals should fit in one of the
%span.notranslate
= "#{pluralize(@conference.program.tracks.count, 'track')}:"
= "#{tracks(@conference)}."
The submission period has begun
%em.notranslate
= @conference.program.cfp.start_date.strftime('%A, %B %-d. %Y')
and closes
%em.notranslate
= @conference.program.cfp.end_date.strftime('%A, %B %-d. %Y.')
- if @conference.program.cfp_open?
That means you have only
%b.notranslate= pluralize(@conference.program.cfp.remaining_days, 'day')
left!
Remember
%span.notranslate
= @conference.short_title
will only be as good as the sessions you present. Submit early, submit often!
- else
The submission period is closed.
.row
.col-md-12.text-center
%p.cta-button
= link_to "Submit your paper now", conference_program_proposals_path(@conference.short_title), class: 'btn btn-success btn-lg text-center'

View file

@ -0,0 +1,40 @@
.row
.col-md-12
.well
.row
.col-md-4.text-center
= image_tag(conference.picture_url, class: 'img-responsive') if conference.picture?
.col-md-6
%h3
= conference.title
%small
%b
= date_string(conference.start_date, conference.end_date)
- if conference.venue
%p
= "#{conference.venue.city}/#{conference.venue.country_name}"
- unless conference.description.blank?
%p
= markdown(conference.description)
.col-md-2
.btn-group-vertical
- if !@conference || @conference != conference
- if conference.splashpage && conference.splashpage.public
= link_to "View Conference", conference_path(conference.short_title), :class =>"btn btn-default"
- if conference.program and conference.program.schedule_public
= link_to "Schedule", conference_schedule_path(conference.short_title), :class =>"btn btn-default"
- if conference.registration_open?
- if conference.user_registered?(current_user)
= link_to "My Registration", conference_conference_registration_path(conference.short_title), :class =>"btn btn-default"
- else
= link_to "Register", new_conference_conference_registration_path(conference.short_title), class: "btn btn-default", disabled: conference.registration_limit_exceeded?
- if conference.registration_limit_exceeded?
Sorry, no places left
- if !current_user.nil? && current_user.proposal_count(conference) > 0
= link_to "My Proposals", conference_program_proposals_path(conference.short_title), :class =>"btn btn-default"
- elsif can? :new, conference.program.events.new
= link_to "Submit Proposal", new_conference_program_proposal_path(conference.short_title), :class =>"btn btn-default"
- if current_user.nil? || !current_user.subscribed?(conference)
= link_to 'Subscribe', conference_subscriptions_path(conference.short_title), method: :post, class: 'btn btn-default'
- else
= link_to 'Unsubscribe', conference_subscriptions_path(conference.short_title), method: :delete, class: 'btn btn-default'

View file

@ -0,0 +1,14 @@
.scroll-top-wrapper
= link_to "#banner", class: "smoothscroll" do
%i.fa.fa-2x.fa-arrow-circle-up
:javascript
$(function(){
$(document).on( 'scroll', function(){
if ($(window).scrollTop() > 100) {
$('.scroll-top-wrapper').addClass('show');
} else {
$('.scroll-top-wrapper').removeClass('show');
}
});
});

View file

@ -0,0 +1,35 @@
<!-- Modal -->
%div{ class: "modal fade", id: "gallery", tabindex: "-1", role: "dialog", "aria-labelledby" => "myLargeModalLabel", "aria-hidden"=> "true" }
%div{ class: "modal-dialog modal-lg" }
%div{ class: "modal-content" }
%div{ class: "modal-body" }
%div{ id: "carousel-example-generic", class: "carousel slide", "data-ride" => "carousel" }
<!-- Wrapper for slides -->
%div{ class: "carousel-inner" }
<!-- Controls -->
%a{ class: "left carousel-control", href: "#carousel-example-generic", role: "button", "data-slide" => "prev" }
%span.fa.fa-chevron-left
%a{ class: "right carousel-control", href: "#carousel-example-generic", role: "button", "data-slide" => "next" }
%span.fa.fa-chevron-right
:javascript
$(document).ready(function(){
var count = 0;
$('#gallery-btn').click(function(){
if(count == 0){
$('#gallery').modal('show');
$('#gallery .modal-body').append('<i class="fa fa-spinner fa-spin fa-4x"></i>');
count +=1;
}
else{
$('#gallery').modal('show');
return false;
}
});
});

View file

@ -0,0 +1,29 @@
.container
.row
.col-md-12.text-center
%h2
Where to stay
- if @conference.venue
in
= @conference.venue.city
%p.lead
We recommend these affordable lodging accommodations for your visit.
- @conference.lodgings.each_slice(3) do |slice|
.row.row-centered
- slice.each do |lodging|
.col-md-4.col-sm-4.ticket.col-centered.col-top
.thumbnail
- unless lodging.picture?
%p.text-center
%i.fa.fa-home.fa-5x
- else
-if lodging.website_link.present?
= link_to(lodging.website_link, class: 'thumbnail') do
= image_tag lodging.picture.large.url, class: 'img-responsive img-lodging'
- else
= image_tag lodging.picture.large.url, class: 'img-responsive img-lodging'
.caption
%h3.text-center
= lodging.name
-if lodging.description.present?
= markdown(lodging.description)

View file

@ -0,0 +1,40 @@
= content_for :splash_nav do
%li
%a.smoothscroll{ href: '#callforpapers' } Call For Papers
.container
.row
.col-md-12.text-center
%h2
Call for Papers
%p.lead
We are ready to accept your proposals for sessions!
.row
.col-md-6.col-md-offset-3.col-sm-10.col-sm-offset-1
%p
- if @conference.program.event_types.any?
You can submit proposals for
= "#{event_types(@conference)}."
- if @conference.tracks.any?
Proposals should fit in one of the
= "#{pluralize(@conference.tracks.count, 'track')}:"
= "#{tracks(@conference)}."
The submission period has begun
%em
= @program.cfp.start_date.strftime('%A, %B %-d. %Y')
and closes
%em
= @program.cfp.end_date.strftime('%A, %B %-d. %Y.')
- if @conference.cfp_open?
That means you have only
%b= pluralize(@program.cfp.remaining_days, 'day')
left!
Remember
= @conference.short_title
will only be as good as the sessions you present. Submit early, submit often!
- else
The submission period is closed.
.row
.col-md-12.text-center
%p.cta-button
= link_to "Submit your paper now", conference_proposals_path(@conference.short_title), class: 'btn btn-success btn-lg text-center'

View file

@ -0,0 +1,30 @@
= content_for :splash_nav do
%li
%a.smoothscroll{ href: '#registration' } Registration
.container
.row
.col-md-12.text-center
%h1 Registration
- if @conference.registration_limit_exceeded?
%p
Sorry, the conference registration limit has exceeded
- else
- if @conference.tickets.empty?
%p.lead
Going to
= @conference.short_title
is free of charge.
%p
We only ask you to register yourself until
= @conference.registration_period.end_date.strftime('%A, %B %-d. %Y')
so we can plan for the right amount of people.
%p.cta-button
- else
%p
The registration period ends on
= @conference.registration_period.end_date.strftime('%A, %B %-d. %Y')
%p.cta-button
= link_to(new_conference_conference_registration_path(@conference.short_title), class: 'btn btn-lg btn-success') do
Register Now

View file

@ -0,0 +1,48 @@
.container
.row
.col-md-12
%h2.text-center
Program
%p.lead.text-center
%span.notranslate
= @conference.short_title
has the most awesome program ever!
- if @conference.splashpage and @conference.program.tracks.any? and @conference.splashpage.include_tracks
See rock-star speakers cover the topics of
- if @conference.splashpage and @conference.splashpage.include_tracks
- @conference.program.tracks.each_slice(3) do |slice|
.row.row-centered
- slice.each do |track|
.col-md-4.col-sm-4.col-centered.col-top.track
%h4.text-center
= track.name
= markdown(track.description)
- if @conference.program and @conference.program.schedule_public
.row
.col-md-12
%p.cta-button.text-center
= link_to(conference_schedule_path(@conference.short_title), class: 'btn btn-default btn-lg') do
Full Schedule
%h3.text-center
Don't miss out!
%br
- if @conference.program.events.highlights.any?
.row
.col-md-12
- @conference.program.events.highlights.each_slice(2) do |slice|
.row.row-centered
- slice.each do |event|
.col-md-6.col-centered.col-top.highlights
%p.text-center
%b= event.title
%h5.text-center
= markdown truncate(event.abstract, length: 500, separator: ' ')
= link_to "Read More", conference_program_proposal_path(@conference.short_title, event)
= content_for :splash_nav do
%li
=link_to('#program', class: 'smoothscroll') do
Program

View file

@ -0,0 +1,18 @@
.container
.row
.col-md-12.text-center
- unless @conference.contact.facebook.blank?
= link_to "#{ @conference.contact.facebook }" do
%i.fa.fa-facebook-square.fa-4x
- unless @conference.contact.twitter.blank?
= link_to "#{ @conference.contact.twitter }" do
%i.fa.fa-twitter.fa-4x
- unless @conference.contact.instagram.blank?
= link_to "#{ @conference.contact.instagram }" do
%i.fa.fa-instagram.fa-4x
- unless @conference.contact.googleplus.blank?
= link_to "#{ @conference.contact.googleplus }" do
%i.fa.fa-google-plus-square.fa-4x
- unless @conference.contact.email.blank?
= mail_to "#{ @conference.contact.email }" do
%i.fa.fa-envelope-o.fa-4x

View file

@ -0,0 +1,41 @@
= content_for :splash_nav do
%li
%a.smoothscroll{ href: '#sponsors' } Sponsors
.container
.row
.col-md-12.text-center
%h2 Sponsors
- @conference.sponsorship_levels.each do |sponsorship_level|
-if sponsorship_level.sponsors.any?
- sponsorship_level.sponsors.each_slice(3) do |slice|
.row.row-centered
- slice.each do |sponsor|
.col-md-4.col-sm-4.col-centered.col-top
%a{ href: '#', data: { toggle: 'modal', target: "#modal_#{sponsor.id}" } }
= image_tag get_logo(sponsor), class: "img-responsive img-sponsor img-sponsor-#{sponsorship_level.position}"
.modal.fade{ id: "modal_#{sponsor.id}" }
.modal-dialog
.modal-content
.modal-header
%button.close{ data: { dismiss: 'modal' } }
x
.modal-title
= sponsor.name
.modal-body.text-center
.logo
= link_to sponsor.website_url, target: '_blank' do
= image_tag get_logo(sponsor), class: "img-responsive img-sponsor img-sponsor-#{sponsorship_level.position}"
.description
= sponsor.description
.modal-footer
= link_to nil, "#{sponsor.website_url}", target: '_blank'
-if @conference.contact and !@conference.contact.sponsor_email.blank?
.row
.col-md-12
%p.text-muted.text-center
%small
Want to sponsor #{@conference.short_title}?
= link_to("mailto: #{@conference.contact.sponsor_email}?subject=#{@conference.short_title}%20Sponsorship") do
Please contact us!

View file

@ -0,0 +1,25 @@
.container
.row
.col-md-12.text-center
%h2
Support
=@conference.short_title
%p.lead
To support our event you can get these tickets
- @conference.tickets.each_slice(4) do |slice|
.row.row-centered
- slice.each do |ticket|
.col-md-3.col-centered.col-top.col-sm-3
.thumbnail
%p.text-center
%i.fa.fa-ticket.fa-5x
.caption
%h3.text-center
= ticket.title
-if ticket.description.present?
= markdown(ticket.description)
%p.text-center
= link_to(conference_tickets_path(@conference.short_title), class: 'btn btn-success') do
Get Ticket
= humanized_money_with_symbol ticket.price

View file

@ -0,0 +1,35 @@
= content_for :splash_nav do
%li
%a.smoothscroll{ href: '#venue' } Venue
-if @conference.venue.location?
= render '/conferences/venue_map'
-else
.container
.row
.col-md-6
.thumbnail#venue-pic
- if @conference.venue.commercial.present? and @conference.venue.commercial.persisted?
.flexvideo{ id: "resource-content-#{@conference.venue.commercial.id}"}
= render partial: 'shared/media_item', locals: { commercial: @conference.venue.commercial }
- elsif @conference.venue.picture?
= image_tag @conference.venue.picture.url, alt: @conference.venue.name, class:"img-responsive"
- else
%p.text-center
%span.fa.fa-university.fa-5x
.caption
%h3.text-center
= @conference.venue.name
- unless @conference.venue.description.blank?
= markdown(@conference.venue.description)
.col-md-6
%h2
= "#{@conference.venue.city} / #{@conference.venue.country_name}"
%address
= @conference.venue.street
%br
= "#{@conference.venue.postalcode}, #{@conference.venue.city}"
%br
= @conference.venue.country_name
- if @conference.venue.website
%br
=link_to @conference.venue.website, @conference.venue.website

View file

@ -0,0 +1,34 @@
#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);
// 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}")
.openPopup();
// Turn scrollwheel on when user clicks
map.on('focus', function(e) {
map.scrollWheelZoom.enable();
});
// Turn scrollwheel off once the map isn't in the viewport anymore
$('#map').waypoint({
handler: function(direction) {
map.scrollWheelZoom.disable();
//alert('map');
},
offset: '90%'
});
$('#map').waypoint({
handler: function(direction) {
map.scrollWheelZoom.disable();
//alert('map');
},
offset: '10%'
});

View file

@ -0,0 +1,31 @@
.container
.row
.col-md-12
.page-header
%h2 Upcoming Conferences
- @current.each do |conference|
= render partial: 'conference_details', locals: { conference: conference }
-if @antiquated and @antiquated.any?
.row
.col-md-12
%p.text-right
%button{ type: 'button', class: 'btn btn-link btn-sm', 'data-toggle' => 'collapse', 'data-target' => '#antiquated', 'aria-expanded' => 'true', 'aria-controls' => 'antiquated'}
Older conferences
%span.notranslate
= "(#{@antiquated.count})"
%i.fa.fa-chevron-right
%i.fa.fa-chevron-down{ style: 'display: none' }
#antiquated.collapse
- @antiquated.each do |conference|
= render partial: 'conference_details', locals: { conference: conference}
-content_for :script_body do
:javascript
$('#antiquated').on('hidden.bs.collapse', function () {
$( ".fa-chevron-down" ).hide();
$( ".fa-chevron-right" ).show();
})
$('#antiquated').on('shown.bs.collapse', function () {
$( ".fa-chevron-down" ).show();
$( ".fa-chevron-right" ).hide();
})

View file

@ -0,0 +1,81 @@
= content_for :title do
= @conference.title
#splash
- if @conference.splashpage
#banner
.container
.row
.col-md-8.col-md-offset-2#header
.row
.col-md-4
= image_tag(@conference.picture_url, class: 'img-responsive img-center', id: 'splash-logo') if @conference.picture?
.col-md-8
%h1
= @conference.title
%p.lead
- if @conference.venue
= "#{@conference.venue.city} / #{@conference.venue.country_name}"
- if @conference.start_date && @conference.end_date
%br
= date_string(@conference.start_date, @conference.end_date)
- unless @conference.description.blank?
%section#about
.container
.row
.col-md-8.col-md-offset-2
%h3.text-center
= markdown(@conference.description)
- if @conference.registration_open? and @conference.splashpage.include_registrations
%section#registration
= render 'registration'
- if @conference.splashpage.include_program
%section#program
= render 'schedule_splashpage'
- if @conference.program.cfp_open? and @conference.splashpage.include_cfp
%section#callforpapers
= render 'call_for_paper'
- if @conference.venue and @conference.splashpage.include_venue
%section#venue
= render 'venue'
- if @conference.lodgings.any? and @conference.splashpage.include_lodgings
%section#lodging
= render 'lodging'
- if @conference.tickets.any? and @conference.splashpage.include_tickets and @conference.pending?
%section#tickets
= render 'tickets'
- if @conference.sponsors.any? and @conference.splashpage.include_sponsors
%section#sponsors
= render 'sponsors'
- if @conference.contact.has_social_media? and @conference.splashpage.include_social_media
%section#social-media
= render 'social_media'
// grmbl
= render 'footer'
- content_for :script_head do
:javascript
var triangle_tcs = tinycolor("#{@conference.color}").monochromatic();
var triangle_colors = triangle_tcs.map(function(t) { return t.toHexString(); });
$(function () {
$(document).ready(function() {
var triangle_width = document.body.clientWidth;
var triangle_height = ($( "#banner" ).height() + 200 );
var pattern = Trianglify({ width: triangle_width,
height: triangle_height,
cell_size: 100,
x_colors: triangle_colors
});
$('#banner').css('background-image', 'url("' + pattern.png() + '")');
});
});