Front page schedule

This commit is contained in:
Godwin 2016-07-19 17:28:23 -07:00
parent 72488d34ef
commit ad6fbd5586
10 changed files with 69 additions and 13 deletions

View File

@ -0,0 +1,30 @@
(function() {
var body = document.querySelector('body');
var primaryContent = document.getElementById('primary-content');
var eventDlg = document.getElementById('event-dlg');
forEachElement('.event-detail-link', function(link) {
var eventDetails = link.parentElement.querySelector('.event-details');
var moreDetails = eventDlg.querySelector('.more-details');
link.addEventListener('click', function(event) {
event.preventDefault();
eventDlg.querySelector('.event-details').innerHTML = eventDetails.innerHTML;
var href = eventDetails.getAttribute('data-href');
if (href) {
moreDetails.setAttribute('href', href);
moreDetails.classList.remove('hidden');
} else {
moreDetails.classList.add('hidden');
}
window.openOverlay(eventDlg, primaryContent, body);
var closeDlg = function(event) {
event.preventDefault();
window.closeOverlay(eventDlg, primaryContent, body);
};
eventDlg.querySelector('.close-btn').onclick = closeDlg;
document.getElementById('overlay').onclick = closeDlg;
});
});
})();

View File

@ -1546,6 +1546,30 @@ table.schedule {
width: 100%; width: 100%;
margin: 0 0 1em; margin: 0 0 1em;
&.locations-1 td.workshop {
width: 100%;
}
&.locations-2 td.workshop {
width: 50%;
}
&.locations-3 td.workshop {
width: 33.333%;
}
&.locations-4 td.workshop {
width: 25%;
}
&.locations-5 td.workshop {
width: 20%;
}
&.locations-6 td.workshop {
width: 16.66667%;
}
td { td {
position: relative; position: relative;
text-align: center; text-align: center;

View File

@ -1120,6 +1120,8 @@ class ConferencesController < ApplicationController
event.save event.save
return redirect_to administration_step_path(@this_conference.slug, :events)
when 'cancel'
return redirect_to administration_step_path(@this_conference.slug, :events) return redirect_to administration_step_path(@this_conference.slug, :events)
end end
when 'workshop_times' when 'workshop_times'

View File

@ -1,10 +1,7 @@
= row do = row do
= columns(medium: 12) do = columns(medium: 12) do
%h2=_'articles.permission_denied.headings.confirm_email','Please confirm your email address' %h2=_'articles.permission_denied.headings.confirm_email','Please confirm your email address'
= columns(medium: 6, large: 5) do = form_tag :do_confirm, :authenticity_token => false, class: 'flex-form' do
= form_tag :do_confirm, :authenticity_token => false do = emailfield :email, nil, required: true, big: true
.email-field.input-field
= email_field_tag :email, nil, required: true
= label_tag :email
= hidden_field_tag :token, @confirmation.token = hidden_field_tag :token, @confirmation.token
= button_tag :login = button_tag :login

View File

@ -1,4 +1,4 @@
= row do = row do
= columns(medium: 12) do = columns(medium: 12) do
%h2=_'articles.permission_denied.headings.confirmation_sent','Confirmation Sent' %h2=_'articles.permission_denied.headings.confirmation_sent'
%p=_'articles.conference_registration.paragraphs.email_confirm', :p %p=_'articles.conference_registration.paragraphs.email_confirm', :p

View File

@ -12,7 +12,7 @@
= richtext @body, 4 = richtext @body, 4
.actions.right .actions.right
= button_tag :test, value: :test, class: :secondary if @broadcast_step == :preview = button_tag :test, value: :test, class: :secondary if @broadcast_step == :preview
= button_with_confirmation :send, (_'modals.admin.broadcast.confirm', vars: { number: @subscriber_count || 0 }), value: :send, class: :delete if @broadcast_step == :test = button_with_confirmation :send, (_'modals.admin.broadcast.confirm', vars: { number: "<strong>#{(@send_to_count || 0)}</strong>".html_safe }), value: :send, class: :delete if @broadcast_step == :test
= button_tag :edit, value: :edit = button_tag :edit, value: :edit
- else - else
= selectfield :send_to, nil, broadcast_options, full: true = selectfield :send_to, nil, broadcast_options, full: true

View File

@ -1 +1 @@
Sent. %p= _'articles.conference_registration.paragraphs.admin.broadcast.sent'

View File

@ -11,7 +11,7 @@
#schedule-preview #schedule-preview
- @schedule.each do | day, data | - @schedule.each do | day, data |
%h4=date(day, :weekday) %h4=date(day, :weekday)
%table.schedule{class: data[:locations].present? ? 'has-locations' : 'no-locations'} %table.schedule{class: [data[:locations].present? ? 'has-locations' : 'no-locations', "locations-#{data[:locations].size}"]}
- if data[:locations].present? - if data[:locations].present?
%thead %thead
%tr %tr
@ -81,15 +81,15 @@
.title= time_data[:item]['title'] .title= time_data[:item]['title']
.location= location.title .location= location.title
- when :event - when :event
%a.event-detail-link=off_screen(time_data[:item].title) %a.event-detail-link=off_screen(time_data[:item][:title])
%template.event-details %template.event-details
%h1.title=time_data[:item].title %h1.title=time_data[:item][:title]
%p.address %p.address
= time_data[:item].event_location.title + _!(': ') = time_data[:item].event_location.title + _!(': ')
%a{ href: "http://www.google.com/maps/place/#{time_data[:item].event_location.latitude},#{time_data[:item].event_location.longitude}" } %a{ href: "http://www.google.com/maps/place/#{time_data[:item].event_location.latitude},#{time_data[:item].event_location.longitude}" }
= time_data[:item].event_location.address = time_data[:item].event_location.address
= richtext time_data[:item].info, 1 = richtext time_data[:item][:info], 1
.title= time_data[:item].title .title= time_data[:item][:title]
.location= time_data[:item].event_location.title .location= time_data[:item].event_location.title
%td.status{rowspan: rowspan} %td.status{rowspan: rowspan}
- if @entire_page - if @entire_page

View File

@ -5488,6 +5488,7 @@ en:
broadcast: broadcast:
test: Please take a look at this preview to ensure that you want to send this email. Clicking Test will send the email only to you. Only after that then the email will be set to %{send_to_count} people. test: Please take a look at this preview to ensure that you want to send this email. Clicking Test will send the email only to you. Only after that then the email will be set to %{send_to_count} people.
preview: Clicking Send will send this message to %{send_to_count} people. Please confirm that you have verified that the test email sent to you is what you want to be sent. preview: Clicking Send will send this message to %{send_to_count} people. Please confirm that you have verified that the test email sent to you is what you want to be sent.
sent: Your message has been sent.
companion: Is there someone who you would like us to ensure that you are housed with? companion: Is there someone who you would like us to ensure that you are housed with?
arrival_and_departure: If you don't need housing, just tell us how long you plan to hang out with Bike!Bike! arrival_and_departure: If you don't need housing, just tell us how long you plan to hang out with Bike!Bike!
host: host:
@ -5570,6 +5571,7 @@ en:
What_is_BikeBike: What is Bike!Bike!? What_is_BikeBike: What is Bike!Bike!?
permission_denied: permission_denied:
headings: headings:
confirmation_sent: Confirmation Sent
confirm_email: Please confirm your email address confirm_email: Please confirm your email address
login_required: Login Required login_required: Login Required
paragraphs: paragraphs:

View File

@ -35,6 +35,7 @@ es:
default: '%d/%m/%Y' default: '%d/%m/%Y'
long: '%d de %B de %Y' long: '%d de %B de %Y'
short: '%d de %b' short: '%d de %b'
weekday: "%A"
span_same_month_date_2: '%e, %Y' span_same_month_date_2: '%e, %Y'
span_same_month_date_1: '%B %e' span_same_month_date_1: '%B %e'
span_same_year_date_1: "%B %e" span_same_year_date_1: "%B %e"