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
+30
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;
});
});
})();
+24
View File
@@ -1546,6 +1546,30 @@ table.schedule {
width: 100%;
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 {
position: relative;
text-align: center;
@@ -1120,6 +1120,8 @@ class ConferencesController < ApplicationController
event.save
return redirect_to administration_step_path(@this_conference.slug, :events)
when 'cancel'
return redirect_to administration_step_path(@this_conference.slug, :events)
end
when 'workshop_times'
@@ -1,10 +1,7 @@
= row do
= columns(medium: 12) do
%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 do
.email-field.input-field
= email_field_tag :email, nil, required: true
= label_tag :email
= form_tag :do_confirm, :authenticity_token => false, class: 'flex-form' do
= emailfield :email, nil, required: true, big: true
= hidden_field_tag :token, @confirmation.token
= button_tag :login
@@ -1,4 +1,4 @@
= row 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
@@ -12,7 +12,7 @@
= richtext @body, 4
.actions.right
= 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
- else
= selectfield :send_to, nil, broadcast_options, full: true
@@ -1 +1 @@
Sent.
%p= _'articles.conference_registration.paragraphs.admin.broadcast.sent'
@@ -11,7 +11,7 @@
#schedule-preview
- @schedule.each do | day, data |
%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?
%thead
%tr
@@ -81,15 +81,15 @@
.title= time_data[:item]['title']
.location= location.title
- 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
%h1.title=time_data[:item].title
%h1.title=time_data[:item][:title]
%p.address
= 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}" }
= time_data[:item].event_location.address
= richtext time_data[:item].info, 1
.title= time_data[:item].title
= richtext time_data[:item][:info], 1
.title= time_data[:item][:title]
.location= time_data[:item].event_location.title
%td.status{rowspan: rowspan}
- if @entire_page