Browse Source

Front page schedule

development
Godwin 9 years ago
parent
commit
ad6fbd5586
  1. 30
      app/assets/javascripts/schedule.js
  2. 24
      app/assets/stylesheets/_application.scss
  3. 2
      app/controllers/conferences_controller.rb
  4. 7
      app/views/application/_login_confirm.html.haml
  5. 2
      app/views/application/_login_confirmation_sent.html.haml
  6. 2
      app/views/conferences/admin/_broadcast.html.haml
  7. 2
      app/views/conferences/admin/_broadcast_sent.html.haml
  8. 10
      app/views/conferences/admin/_schedule.html.haml
  9. 2
      config/locales/en.yml
  10. 1
      config/locales/es.yml

30
app/assets/javascripts/schedule.js

@ -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
app/assets/stylesheets/_application.scss

@ -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;

2
app/controllers/conferences_controller.rb

@ -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'

7
app/views/application/_login_confirm.html.haml

@ -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

2
app/views/application/_login_confirmation_sent.html.haml

@ -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

2
app/views/conferences/admin/_broadcast.html.haml

@ -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

2
app/views/conferences/admin/_broadcast_sent.html.haml

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

10
app/views/conferences/admin/_schedule.html.haml

@ -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

2
config/locales/en.yml

@ -5488,6 +5488,7 @@ en:
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.
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?
arrival_and_departure: If you don't need housing, just tell us how long you plan to hang out with Bike!Bike!
host:
@ -5570,6 +5571,7 @@ en:
What_is_BikeBike: What is Bike!Bike!?
permission_denied:
headings:
confirmation_sent: Confirmation Sent
confirm_email: Please confirm your email address
login_required: Login Required
paragraphs:

1
config/locales/es.yml

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

Loading…
Cancel
Save