Merge branch 'master' into submission-reviewer-comments

* master: (246 commits)
  merge master
  Skip datatable spec because github actions is weird.
  Add devise view files for email messages
  Make the _mailbot_* files not depend on @conference
  Tweak devise text for confirm emails
  Run database migrations on release
  [fix]Add mailbot.css to assets.rb
  [fix]Fix empty string check
  [fix]Fix program#any_event_for_this_date?
  Add newline at end of show.js.erb file
  [feat]Display happening now only if program is also displayed
  [feat]Add brief version of event partial; fix style
  [feat]Description / happening now takes the entire row if the other is empty
  [feat]Use Ajax for paginating happening_now
  [style]Fix style
  [refactor]Delete unused javascript; Move about-and-happening-now to partial
  [feat]Add bootstrap style to pagination navbar
  [fix]Fix style; Re-enable checking happening now
  items per page
  pagination
  ...
This commit is contained in:
Michael Ball 2021-04-15 22:22:52 -07:00
commit 6ce36c0fca
60 changed files with 878 additions and 152 deletions

View file

@ -20,7 +20,7 @@
combined_data: @registration_distribution
.row
.col-md-12
%div.margin-event-table
.margin-event-table
%table.datatable#registrations{ data: { source: admin_conference_registrations_path(conference_id: @conference, format: :json) } }
%thead
%tr

View file

@ -25,6 +25,8 @@
= f.input :include_tracks, label: 'Include confirmed tracks', input_html: { checked: params[:action] == 'new' || @splashpage.try(:include_tracks) }
%li
= f.input :include_booths, label: "Include confirmed #{(t'booth').pluralize}", input_html: { checked: params[:action] == 'new' || @splashpage.try(:include_booths) }
%li
= f.input :include_happening_now, label: 'Include events happening now', input_html: { checked: params[:action] == 'new' || @splashpage.try(:include_happening_now) }
%li
= f.input :include_registrations, label: 'Display the registration period', input_html: { checked: params[:action] == 'new' || @splashpage.try(:include_registrations) }

View file

@ -27,6 +27,9 @@
%li
%i{ class: "fa-li #{icon_for_todo @splashpage.include_booths?}" }
Include confirmed #{(t'booth').pluralize}
%li
%i{ class: "fa-li #{icon_for_todo @splashpage.include_happening_now?}" }
Include events happening now
%li
%i{ class: "fa-li #{icon_for_todo @splashpage.include_registrations?}" }
Display the registration period

View file

@ -0,0 +1,32 @@
= content_for :happening_now do
#happening-now
= render 'happening_now', conference: conference,
events_schedules: events_schedules, pagy: pagy,
events_schedules_length: events_schedules_length,
events_schedules_limit: events_schedules_limit
= content_for :about do
#about
.row
%h2.text-left{ style: 'margin-bottom:30px' } About the Conference
= markdown(conference.description, false)
%section#about-and-happening-now
.container
.row
-# happening now events are displayed second in md or lg view
- if conference.splashpage.include_happening_now && conference.splashpage.include_program
- if conference.description.present?
.col-md-6.col-md-push-6.col-lg-4.col-lg-push-8
= yield :happening_now
- else
.col-md-12
= yield :happening_now
- if conference.description.present?
- if conference.splashpage.include_happening_now && conference.splashpage.include_program
.col-md-6.col-md-pull-6.col-lg-8.col-lg-pull-4
= yield :about
- else
.col-md-12
= yield :about
.trapezoid

View file

@ -0,0 +1,12 @@
- if conference.splashpage.include_program && conference.splashpage.include_happening_now
- if events_schedules.any?
.row
%h2.text-center{ style: 'margin-bottom:30px' } Happening Now
- events_schedules.each do |event_schedule|
= render 'schedules/event', conference: conference, event_schedule: event_schedule, event: event_schedule.event, is_brief: true
- if events_schedules_length > events_schedules_limit
.container{ style: 'width:100%; text-align:center' }
!= pagy_bootstrap_nav_js(pagy)
- else
.row
%h3.text-center There are no events happening now.

View file

@ -26,11 +26,3 @@
- if venue.country != 'US'
•
= venue.country_name
- unless conference.description.blank?
%section#about
.container
.row
.col-md-8.col-md-offset-2
= markdown(conference.description, escape_html=false)
.trapezoid

View file

@ -41,9 +41,16 @@
- if @conference.code_of_conduct.present?
= render 'code_of_conduct', organization: @conference.organization
-# header/description
-# header
= render 'header', conference: @conference, venue: @conference.venue
-# description / happening now
- if @conference.splashpage.include_happening_now? || @conference.description.present?
= render 'about_and_happening_now', conference: @conference,
events_schedules: @events_schedules, pagy: @pagy,
events_schedules_length: @events_schedules_length,
events_schedules_limit: @events_schedules_limit
-# calls for content, or program
- if @conference.splashpage.include_cfp
= render 'call_for_content', conference: @conference,

View file

@ -0,0 +1,5 @@
$('#happening-now').html("<%= j(render 'happening_now', conference: @conference,
events_schedules: @events_schedules, pagy: @pagy,
events_schedules_length: @events_schedules_length,
events_schedules_limit: @events_schedules_limit)%>");
Pagy.init(document.getElementById('happening-now'));

View file

@ -4,7 +4,7 @@
.panel.panel-default
.panel-heading
%h3.panel-title
Resend confirmation instructions
Resend account confirmation instructions
.panel-body
= semantic_form_for(resource, as: resource_name, url: confirmation_path(resource_name), method: :post) do |f|
= f.input :email, input_html: { autofocus: true, required: true }

View file

@ -0,0 +1,9 @@
<%= render partial: "layouts/mailbot_header" %>
<div id="content">
<p>Welcome to Snap!Con <%= @email %>!</p>
<p>You can confirm your account email through the link below:</p>
<p><%= link_to 'Confirm my account', confirmation_url(@resource, confirmation_token: @token) %></p>
</div>
<%= render partial: "layouts/mailbot_footer" %>

View file

@ -0,0 +1,7 @@
<p>Hello <%= @email %>!</p>
<% if @resource.try(:unconfirmed_email?) %>
<p>We're contacting you to notify you that your email is being changed to <%= @resource.unconfirmed_email %>.</p>
<% else %>
<p>We're contacting you to notify you that your email has been changed to <%= @resource.email %>.</p>
<% end %>

View file

@ -0,0 +1,3 @@
<p>Hello <%= @resource.email %>!</p>
<p>We're contacting you to notify you that your password has been changed.</p>

View file

@ -0,0 +1,8 @@
<p>Hello <%= @resource.email %>!</p>
<p>Someone has requested a link to change your password. You can do this through the link below.</p>
<p><%= link_to 'Change my password', edit_password_url(@resource, reset_password_token: @token) %></p>
<p>If you didn't request this, please ignore this email.</p>
<p>Your password won't change until you access the link above and create a new one.</p>

View file

@ -0,0 +1,7 @@
<p>Hello <%= @resource.email %>!</p>
<p>Your account has been locked due to an excessive number of unsuccessful sign in attempts.</p>
<p>Click the link below to unlock your account:</p>
<p><%= link_to 'Unlock my account', unlock_url(@resource, unlock_token: @token) %></p>

View file

@ -1,12 +1,7 @@
<html lang="en">
<head>
<meta charset="utf-8"/>
<meta content="width=device-width, initial-scale=1" name="viewport"/>
<meta content="Snap!Con -- A conference all about Snap!, a programing language from UC Berkeley." name="description"/>
<meta content="Michael Ball, Brian Harvey, Jens Moenig, Bernat Romagosa, Dan Garcia, Lauren Mock" name="author"/>
<%= stylesheet_link_tag "mailbot" %>
</head>
<body>
<div id="border" style="background-color: <%= conference_color(@conference) %>"></div>
<% if @conference.present? %>
<div id="border" style="background-color: <%= conference_color(@conference) %>">
<% else %>
<div id="border" style="background-color: #003262">
<% end %>
</body>
</html>
</html>

View file

@ -9,17 +9,21 @@
<meta content="Michael Ball, Brian Harvey, Jens Moenig, Bernat Romagosa, Dan Garcia, Lauren Mock" name="author"/>
<%= stylesheet_link_tag "mailbot" %>
</head>
<body>
<div id="border" style="background-color: <%= conference_color(@conference) %>">
<body>
<% if @conference.present? %>
<div id="border" style="background-color: <%= conference_color(@conference) %>">
<% else %>
<div id="border" style="background-color: #003262">
<% end %>
<div class="row">
<div class="col-md-2">
<% if @conference.present? %>
<%= image_tag(conference_logo_url(@conference), style: "display:block;height:70px;width:auto;", alt: @conference.title + ' logo') %>
<% else %>
<%= image_tag(Organization.first.picture_url, style: "display:block;height:70px;width:auto;", alt: ENV['OSEM_NAME'] + ' logo') %>
<% end %>
</div>
</div>
</div>
</body>

View file

@ -2,12 +2,18 @@
.row
.col-xs-6.col-xs-offset-3
%h1
Payment Summary :
Payment Summary :
= humanized_money_with_symbol @total_amount_to_pay
.col-xs-8.col-xs-offset-2.well
= render partial: 'payment'
.row
.col-md-13
%p.text-center
%strong
If you do not have a credit card, please reach out to use at
= mail_to(@conference.contact.email)
%hr
%p.text-muted.text-center
%small
All payments are handled securely by our payment processor,

View file

@ -2,8 +2,9 @@
- header_color = event.event_type&.color || '#f5f5f5'
.trapezoid{ style: 'color: white; top: 12px; z-index: 100;' }
.panel-heading{ style: "background-color: #{header_color}; color: #{ contrast_color(header_color) }; border-radius: 4px" }
- event.speakers_ordered.each do |speaker|
= image_tag speaker.profile_picture, class: 'img-circle pull-right', alt: speaker.name, style: 'padding: 2px;'
- if !defined?(is_brief) || is_brief == false
- event.speakers_ordered.each do |speaker|
= image_tag speaker.profile_picture, class: 'img-circle pull-right', alt: speaker.name, style: 'padding: 2px;'
%p
= canceled_replacement_event_label(event, event_schedule)
@ -14,7 +15,8 @@
%br
%small{ style: "color: #{contrast_color(header_color)}" }
= event.subtitle
.trapezoid{ style: "color: #{header_color}; top: 12px;" }
.trapezoid{ style: "color: #{header_color}; border-top-color: #{header_color}; top: 12px;" }
.panel-body
%h4
@ -26,20 +28,21 @@
= markdown(truncate(event.abstract, length: 400))
-# TODO: More informative text or aria-label.
= link_to 'more', conference_program_proposal_path(@conference.short_title, event.id) if event.abstract.length > 400
- if event_schedule.present?
= inyourtz(event_schedule.start_time) do
- if !defined?(is_brief) || is_brief == false
- if event_schedule.present?
= inyourtz(event_schedule.start_time) do
%span.track
%span.fa.fa-clock-o
%span.label{ style: 'background-color: grey' }
= event_schedule.start_time.strftime('%l:%M %P')
\-
= event_schedule.end_time.strftime('%l:%M %P')
%span.track
%span.fa.fa-clock-o
%span.fa.fa-map-marker
%span.label{ style: 'background-color: grey' }
= event_schedule.start_time.strftime('%l:%M %P')
\-
= event_schedule.end_time.strftime('%l:%M %P')
%span.track
%span.fa.fa-map-marker
%span.label{ style: 'background-color: grey' }
= event_schedule.room.name
- if event.track
%span.track
%span.fa.fa-road
%span.label{ style: "background-color: #{event.track.color}; color: #{ contrast_color(event.track.color) }" }
= event.track.name
= event_schedule.room.name
- if event.track
%span.track
%span.fa.fa-road
%span.label{ style: "background-color: #{event.track.color}; color: #{ contrast_color(event.track.color) }" }
= event.track.name