Merge master, resolve schema conflicts
This commit is contained in:
commit
04154020a5
42 changed files with 757 additions and 131 deletions
|
|
@ -149,15 +149,21 @@ function word_count(text, divId, maxcount) {
|
|||
|
||||
/* Wait for the DOM to be ready before attaching events to the elements */
|
||||
$( document ).ready(function() {
|
||||
/* Set the minimum and maximum proposal abstract word length */
|
||||
/* Set the minimum and maximum proposal abstract and submission text word length */
|
||||
$("#event_event_type_id").change(function () {
|
||||
var $selected = $("#event_event_type_id option:selected")
|
||||
var max = $selected.data("max-words");
|
||||
var min = $selected.data("min-words");
|
||||
|
||||
$("#abstract-maximum-word-count").text(max);
|
||||
$("#submission-maximum-word-count").text(max);
|
||||
$("#abstract-minimum-word-count").text(min);
|
||||
$("#submission-minimum-word-count").text(min);
|
||||
word_count($('#event_abstract').get(0), 'abstract-count', max);
|
||||
word_count($('#event_submission_text').get(0), 'submission-count', max);
|
||||
|
||||
// Set the placeholder text for the abstract
|
||||
$('#event_submission_text').attr("placeholder", $selected.data("help"));
|
||||
})
|
||||
.trigger('change');
|
||||
|
||||
|
|
@ -167,6 +173,13 @@ $( document ).ready(function() {
|
|||
var max = $selected.data("max-words");
|
||||
word_count(this, 'abstract-count', max);
|
||||
} );
|
||||
|
||||
/* Count the submission text length */
|
||||
$("#event_submission_text").bind('change keyup paste input', function() {
|
||||
var $selected = $("event_event_type_id option:selected")
|
||||
var max = $selected.data("max-words");
|
||||
word_count(this, 'submission-count', max);
|
||||
});
|
||||
});
|
||||
|
||||
/* Commodity function for modal windows */
|
||||
|
|
|
|||
|
|
@ -175,7 +175,7 @@ module Admin
|
|||
def event_params
|
||||
params.require(:event).permit(
|
||||
# Set also in proposals controller
|
||||
:title, :subtitle, :event_type_id, :abstract, :description, :require_registration, :difficulty_level_id,
|
||||
:title, :subtitle, :event_type_id, :abstract, :submission_text, :description, :require_registration, :difficulty_level_id,
|
||||
# Set only in admin/events controller
|
||||
:track_id, :state, :language, :is_highlight, :max_attendees,
|
||||
# Not used anymore?
|
||||
|
|
|
|||
|
|
@ -25,7 +25,7 @@ class ApplicationController < ActionController::Base
|
|||
!request.xhr?) # don't store ajax calls
|
||||
session[:return_to] = request.fullpath
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
def after_sign_in_path_for(_resource)
|
||||
if (can? :view, Conference) &&
|
||||
|
|
|
|||
|
|
@ -170,7 +170,7 @@ class ProposalsController < ApplicationController
|
|||
|
||||
def event_params
|
||||
params.require(:event).permit(:event_type_id, :track_id, :difficulty_level_id,
|
||||
:title, :subtitle, :abstract, :description,
|
||||
:title, :subtitle, :abstract, :submission_text, :description,
|
||||
:require_registration, :max_attendees, :language,
|
||||
speaker_ids: [], volunteer_ids: []
|
||||
)
|
||||
|
|
|
|||
|
|
@ -31,7 +31,9 @@ class UsersController < ApplicationController
|
|||
end
|
||||
|
||||
# Somewhat of a hack: users/current/edit
|
||||
# rubocop:disable Naming/MemoizedInstanceVariableName
|
||||
def load_user
|
||||
@user ||= (params[:id] && params[:id] != 'current' && User.find(params[:id]) || current_user)
|
||||
end
|
||||
# rubocop:enable Naming/MemoizedInstanceVariableName
|
||||
end
|
||||
|
|
|
|||
|
|
@ -112,7 +112,7 @@ module ApplicationHelper
|
|||
concurrent_events << other_event_schedule.event
|
||||
end
|
||||
end
|
||||
concurrent_events.sort_by { |event_schedule| event_schedule.room&.order }
|
||||
concurrent_events.sort_by { |schedule| schedule.room&.order }
|
||||
end
|
||||
|
||||
def speaker_links(event)
|
||||
|
|
|
|||
|
|
@ -1,5 +1,7 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
# TODO: Split this module into smaller modules
|
||||
# rubocop:disable Metrics/ModuleLength
|
||||
module EventsHelper
|
||||
##
|
||||
# Includes functions related to events
|
||||
|
|
@ -193,7 +195,7 @@ module EventsHelper
|
|||
end
|
||||
end
|
||||
|
||||
def calendar_timestamp(timestamp, timezone)
|
||||
def calendar_timestamp(timestamp, _timezone)
|
||||
timestamp = timestamp.in_time_zone('GMT')
|
||||
timestamp -= timestamp.utc_offset
|
||||
timestamp.strftime('%Y%m%dT%H%M%S')
|
||||
|
|
@ -256,3 +258,4 @@ module EventsHelper
|
|||
end
|
||||
end
|
||||
end
|
||||
# rubocop:enable Metrics/ModuleLength
|
||||
|
|
|
|||
|
|
@ -1,17 +1,19 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
SNAPCON_BCC_ADDRESS = 'messages@snap.berkeley.edu'
|
||||
EMAIL_TEMPLATE = 'email_template'
|
||||
YTLF_TICKET_ID = 50
|
||||
|
||||
class Mailbot < ActionMailer::Base
|
||||
def registration_mail(conference, user)
|
||||
mail(to: user.email,
|
||||
bcc: SNAPCON_BCC_ADDRESS,
|
||||
from: conference.contact.email,
|
||||
subject: conference.email_settings.registration_subject,
|
||||
body: conference.email_settings.generate_email_on_conf_updates(conference,
|
||||
user,
|
||||
conference.email_settings.registration_body))
|
||||
@email_body = conference.email_settings.generate_email_on_conf_updates(conference, user, conference.email_settings.registration_body)
|
||||
@logo = conference.picture.thumb.url
|
||||
|
||||
mail(to: user.email,
|
||||
bcc: SNAPCON_BCC_ADDRESS,
|
||||
from: conference.contact.email,
|
||||
subject: conference.email_settings.registration_subject,
|
||||
template_name: EMAIL_TEMPLATE)
|
||||
end
|
||||
|
||||
def ticket_confirmation_mail(ticket_purchase)
|
||||
|
|
@ -39,108 +41,128 @@ class Mailbot < ActionMailer::Base
|
|||
def acceptance_mail(event)
|
||||
conference = event.program.conference
|
||||
|
||||
mail(to: event.submitter.email,
|
||||
bcc: SNAPCON_BCC_ADDRESS,
|
||||
from: conference.contact.email,
|
||||
subject: conference.email_settings.accepted_subject,
|
||||
body: conference.email_settings.generate_event_mail(event, conference.email_settings.accepted_body))
|
||||
@logo = conference.picture.thumb.url
|
||||
@email_body = conference.email_settings.generate_event_mail(event, conference.email_settings.accepted_body)
|
||||
|
||||
mail(to: event.submitter.email,
|
||||
bcc: SNAPCON_BCC_ADDRESS,
|
||||
from: conference.contact.email,
|
||||
subject: conference.email_settings.accepted_subject,
|
||||
template_name: EMAIL_TEMPLATE)
|
||||
end
|
||||
|
||||
def submitted_proposal_mail(event)
|
||||
conference = event.program.conference
|
||||
|
||||
mail(to: event.submitter.email,
|
||||
bcc: SNAPCON_BCC_ADDRESS,
|
||||
from: conference.contact.email,
|
||||
subject: conference.email_settings.submitted_proposal_subject,
|
||||
body: conference.email_settings.generate_event_mail(event, conference.email_settings.submitted_proposal_body))
|
||||
@logo = conference.picture.thumb.url
|
||||
@email_body = conference.email_settings.generate_event_mail(event, conference.email_settings.submitted_proposal_body)
|
||||
|
||||
mail(to: event.submitter.email,
|
||||
bcc: SNAPCON_BCC_ADDRESS,
|
||||
from: conference.contact.email,
|
||||
subject: conference.email_settings.submitted_proposal_subject,
|
||||
template_name: EMAIL_TEMPLATE)
|
||||
end
|
||||
|
||||
def rejection_mail(event)
|
||||
conference = event.program.conference
|
||||
|
||||
mail(to: event.submitter.email,
|
||||
bcc: SNAPCON_BCC_ADDRESS,
|
||||
from: conference.contact.email,
|
||||
subject: conference.email_settings.rejected_subject,
|
||||
body: conference.email_settings.generate_event_mail(event, conference.email_settings.rejected_body))
|
||||
@logo = conference.picture.thumb.url
|
||||
@email_body = conference.email_settings.generate_event_mail(event, conference.email_settings.rejected_body)
|
||||
|
||||
mail(to: event.submitter.email,
|
||||
bcc: SNAPCON_BCC_ADDRESS,
|
||||
from: conference.contact.email,
|
||||
subject: conference.email_settings.rejected_subject,
|
||||
template_name: EMAIL_TEMPLATE)
|
||||
end
|
||||
|
||||
def confirm_reminder_mail(event)
|
||||
conference = event.program.conference
|
||||
|
||||
mail(to: event.submitter.email,
|
||||
bcc: SNAPCON_BCC_ADDRESS,
|
||||
from: conference.contact.email,
|
||||
subject: conference.email_settings.confirmed_without_registration_subject,
|
||||
body: conference.email_settings.generate_event_mail(event,
|
||||
conference.email_settings.confirmed_without_registration_body))
|
||||
@logo = conference.picture.thumb.url
|
||||
@email_body = conference.email_settings.generate_event_mail(event, conference.email_settings.confirmed_without_registration_body)
|
||||
|
||||
mail(to: event.submitter.email,
|
||||
bcc: SNAPCON_BCC_ADDRESS,
|
||||
from: conference.contact.email,
|
||||
subject: conference.email_settings.confirmed_without_registration_subject,
|
||||
template_name: EMAIL_TEMPLATE)
|
||||
end
|
||||
|
||||
def conference_date_update_mail(conference, user)
|
||||
mail(to: user.email,
|
||||
bcc: SNAPCON_BCC_ADDRESS,
|
||||
from: conference.contact.email,
|
||||
subject: conference.email_settings.conference_dates_updated_subject,
|
||||
body: conference.email_settings.generate_email_on_conf_updates(conference,
|
||||
user,
|
||||
conference.email_settings.conference_dates_updated_body))
|
||||
@logo = conference.picture.thumb.url
|
||||
@email_body = conference.email_settings.generate_email_on_conf_updates(conference, user, conference.email_settings.conference_dates_updated_body)
|
||||
|
||||
mail(to: user.email,
|
||||
bcc: SNAPCON_BCC_ADDRESS,
|
||||
from: conference.contact.email,
|
||||
subject: conference.email_settings.conference_dates_updated_subject,
|
||||
template_name: EMAIL_TEMPLATE)
|
||||
end
|
||||
|
||||
def conference_registration_date_update_mail(conference, user)
|
||||
mail(to: user.email,
|
||||
bcc: SNAPCON_BCC_ADDRESS,
|
||||
from: conference.contact.email,
|
||||
subject: conference.email_settings.conference_registration_dates_updated_subject,
|
||||
body: conference.email_settings.generate_email_on_conf_updates(conference,
|
||||
user,
|
||||
conference.email_settings.conference_registration_dates_updated_body))
|
||||
@logo = conference.picture.thumb.url
|
||||
@email_body = conference.email_settings.generate_email_on_conf_updates(conference, user, conference.email_settings.conference_registration_dates_updated_body)
|
||||
|
||||
mail(to: user.email,
|
||||
bcc: SNAPCON_BCC_ADDRESS,
|
||||
from: conference.contact.email,
|
||||
subject: conference.email_settings.conference_registration_dates_updated_subject,
|
||||
template_name: EMAIL_TEMPLATE)
|
||||
end
|
||||
|
||||
def conference_venue_update_mail(conference, user)
|
||||
mail(to: user.email,
|
||||
bcc: SNAPCON_BCC_ADDRESS,
|
||||
from: conference.contact.email,
|
||||
subject: conference.email_settings.venue_updated_subject,
|
||||
body: conference.email_settings.generate_email_on_conf_updates(conference,
|
||||
user,
|
||||
conference.email_settings.venue_updated_body))
|
||||
@logo = conference.picture.thumb.url
|
||||
@email_body = conference.email_settings.generate_email_on_conf_updates(conference, user, conference.email_settings.venue_updated_body)
|
||||
|
||||
mail(to: user.email,
|
||||
bcc: SNAPCON_BCC_ADDRESS,
|
||||
from: conference.contact.email,
|
||||
subject: conference.email_settings.venue_updated_subject,
|
||||
template_name: EMAIL_TEMPLATE)
|
||||
end
|
||||
|
||||
def conference_schedule_update_mail(conference, user)
|
||||
mail(to: user.email,
|
||||
from: conference.contact.email,
|
||||
subject: conference.email_settings.program_schedule_public_subject,
|
||||
body: conference.email_settings.generate_email_on_conf_updates(conference,
|
||||
user,
|
||||
conference.email_settings.program_schedule_public_body))
|
||||
@logo = conference.picture.thumb.url
|
||||
@email_body = conference.email_settings.generate_email_on_conf_updates(conference, user, conference.email_settings.program_schedule_public_body)
|
||||
|
||||
mail(to: user.email,
|
||||
from: conference.contact.email,
|
||||
subject: conference.email_settings.program_schedule_public_subject,
|
||||
template_name: EMAIL_TEMPLATE)
|
||||
end
|
||||
|
||||
def conference_cfp_update_mail(conference, user)
|
||||
mail(to: user.email,
|
||||
from: conference.contact.email,
|
||||
subject: conference.email_settings.cfp_dates_updated_subject,
|
||||
body: conference.email_settings.generate_email_on_conf_updates(conference,
|
||||
user,
|
||||
conference.email_settings.cfp_dates_updated_body))
|
||||
@logo = conference.picture.thumb.url
|
||||
@email_body = conference.email_settings.generate_email_on_conf_updates(conference, user, conference.email_settings.cfp_dates_updated_body)
|
||||
|
||||
mail(to: user.email,
|
||||
from: conference.contact.email,
|
||||
subject: conference.email_settings.cfp_dates_updated_subject,
|
||||
template_name: EMAIL_TEMPLATE)
|
||||
end
|
||||
|
||||
def conference_booths_acceptance_mail(booth)
|
||||
conference = booth.conference
|
||||
@logo = conference.picture.thumb.url
|
||||
@email_body = conference.email_settings.generate_booth_mail(booth, conference.email_settings.booths_acceptance_body)
|
||||
|
||||
mail(to: booth.submitter.email,
|
||||
from: conference.contact.email,
|
||||
subject: conference.email_settings.booths_acceptance_subject,
|
||||
body: conference.email_settings.generate_booth_mail(booth, conference.email_settings.booths_acceptance_body))
|
||||
mail(to: booth.submitter.email,
|
||||
from: conference.contact.email,
|
||||
subject: conference.email_settings.booths_acceptance_subject,
|
||||
template_name: EMAIL_TEMPLATE)
|
||||
end
|
||||
|
||||
def conference_booths_rejection_mail(booth)
|
||||
conference = booth.conference
|
||||
@logo = conference.picture.thumb.url
|
||||
@email_body = conference.email_settings.generate_booth_mail(booth, conference.email_settings.booths_rejection_body)
|
||||
|
||||
mail(to: booth.submitter.email,
|
||||
from: conference.contact.email,
|
||||
subject: conference.email_settings.booths_rejection_subject,
|
||||
body: conference.email_settings.generate_booth_mail(booth, conference.email_settings.booths_rejection_body))
|
||||
mail(to: booth.submitter.email,
|
||||
from: conference.contact.email,
|
||||
subject: conference.email_settings.booths_rejection_subject,
|
||||
template_name: EMAIL_TEMPLATE)
|
||||
end
|
||||
|
||||
def event_comment_mail(comment, user)
|
||||
|
|
|
|||
|
|
@ -68,6 +68,8 @@ class Ability
|
|||
end
|
||||
|
||||
# Abilities for signed in users
|
||||
# TODO: Refactor into multiple functions
|
||||
# rubocop:disable Metrics/AbcSize
|
||||
def signed_in(user)
|
||||
# Abilities from not_signed_in user are also inherited
|
||||
not_signed_in
|
||||
|
|
@ -140,6 +142,7 @@ class Ability
|
|||
user == track.submitter && !(track.accepted? || track.confirmed?)
|
||||
end
|
||||
end
|
||||
# rubocop:enable Metrics/AbcSize
|
||||
|
||||
# Abilities for users with roles wandering around in non-admin views.
|
||||
def common_abilities_for_admins(user)
|
||||
|
|
|
|||
|
|
@ -30,7 +30,7 @@ class Commercial < ApplicationRecord
|
|||
begin
|
||||
resource = OEmbed::Providers.get(url, maxwidth: 560, maxheight: 315)
|
||||
{ html: resource.html.html_safe }
|
||||
rescue StandardError => exception
|
||||
rescue StandardError
|
||||
{ html: iframe_fallback(url) }
|
||||
# { error: exception.message }
|
||||
end
|
||||
|
|
|
|||
|
|
@ -35,6 +35,7 @@
|
|||
#
|
||||
# index_conferences_on_organization_id (organization_id)
|
||||
#
|
||||
# rubocop:disable Metrics/ClassLength
|
||||
class Conference < ApplicationRecord
|
||||
include RevisionCount
|
||||
require 'uri'
|
||||
|
|
@ -1234,3 +1235,4 @@ class Conference < ApplicationRecord
|
|||
]
|
||||
end
|
||||
end
|
||||
# rubocop:enable Metrics/ClassLength
|
||||
|
|
|
|||
|
|
@ -19,6 +19,7 @@
|
|||
# require_registration :boolean
|
||||
# start_time :datetime
|
||||
# state :string default("new"), not null
|
||||
# submission_text :text
|
||||
# subtitle :string
|
||||
# title :string not null
|
||||
# week :integer
|
||||
|
|
@ -74,6 +75,7 @@ class Event < ApplicationRecord
|
|||
before_create :generate_guid
|
||||
|
||||
validate :abstract_limit
|
||||
validate :submission_limit
|
||||
validate :before_end_of_conference, on: :create
|
||||
validates :title, presence: true
|
||||
validates :abstract, presence: true
|
||||
|
|
@ -218,6 +220,10 @@ class Event < ApplicationRecord
|
|||
abstract.to_s.split.size
|
||||
end
|
||||
|
||||
def submission_word_count
|
||||
submission_text.to_s.split.size
|
||||
end
|
||||
|
||||
def self.get_state_color(state)
|
||||
COLORS[state.to_sym] || '#00FFFF' # azure
|
||||
end
|
||||
|
|
@ -342,16 +348,28 @@ class Event < ApplicationRecord
|
|||
errors.add(:max_attendees, "cannot be more than the room's capacity (#{room.size})") if max_attendees && (max_attendees > room.size)
|
||||
end
|
||||
|
||||
def abstract_limit
|
||||
# If we don't have an event type, there is no need to count anything
|
||||
return unless event_type && abstract
|
||||
def word_limit(field)
|
||||
# If we don't have an event type or the requested field, don't count
|
||||
return unless event_type && respond_to?(field) && self[field]
|
||||
|
||||
len = abstract.split.size
|
||||
len = self[field].split.size
|
||||
# TODO: Use different limits for different text fields
|
||||
# Uncomment the two lines below this when the separate word limits are implemented.
|
||||
# max_words = event_type["maximum_#{field}_length"]
|
||||
# min_words = event_type["minimum_#{field}_length"]
|
||||
max_words = event_type.maximum_abstract_length
|
||||
min_words = event_type.minimum_abstract_length
|
||||
|
||||
errors.add(:abstract, "cannot have less than #{min_words} words") if len < min_words
|
||||
errors.add(:abstract, "cannot have more than #{max_words} words") if len > max_words
|
||||
errors.add(field.to_sym, "cannot have less than #{min_words} words") if len < min_words
|
||||
errors.add(field.to_sym, "cannot have more than #{max_words} words") if len > max_words
|
||||
end
|
||||
|
||||
def abstract_limit
|
||||
word_limit(:abstract)
|
||||
end
|
||||
|
||||
def submission_limit
|
||||
word_limit(:submission_text)
|
||||
end
|
||||
|
||||
# TODO: create a module to be mixed into model to perform same operation
|
||||
|
|
|
|||
|
|
@ -305,7 +305,7 @@ class User < ApplicationRecord
|
|||
# TODO: Use a real authorization in the right place....
|
||||
def manages_volunteers?(conference)
|
||||
organizer_roles = get_roles['organizer']
|
||||
organizer_roles&.include?(conference.short_title) # TODO or Volunteer Coorinator.
|
||||
organizer_roles&.include?(conference.short_title) # TODO: or Volunteer Coorinator.
|
||||
end
|
||||
|
||||
def registered
|
||||
|
|
|
|||
|
|
@ -19,6 +19,7 @@
|
|||
# require_registration :boolean
|
||||
# start_time :datetime
|
||||
# state :string default("new"), not null
|
||||
# submission_text :text
|
||||
# subtitle :string
|
||||
# title :string not null
|
||||
# week :integer
|
||||
|
|
|
|||
|
|
@ -7,6 +7,8 @@
|
|||
%small
|
||||
= @event.subtitle
|
||||
.btn-group.pull-right
|
||||
- if @event.public
|
||||
= link_to 'Preview', conference_program_proposal_path(@conference.short_title, @event.id), class: 'btn btn-mini btn-primary'
|
||||
= link_to 'Registrations', registrations_admin_conference_program_event_path(@conference.short_title, @event), class: 'btn btn-success'
|
||||
= link_to 'Edit', edit_admin_conference_program_event_path(@conference.short_title, @event), class: 'btn btn-mini btn-primary'
|
||||
|
||||
|
|
@ -111,6 +113,10 @@
|
|||
%td
|
||||
%b Abstract
|
||||
%td= markdown(@event.abstract)
|
||||
%tr
|
||||
%td
|
||||
%b Submission Description
|
||||
%td= markdown(@event.submission_text)
|
||||
%tr
|
||||
%td
|
||||
%b Requirements
|
||||
|
|
|
|||
|
|
@ -1,10 +1,83 @@
|
|||
Dear <%= @user.name %>,
|
||||
<!doctype html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<!-- Required meta tags -->
|
||||
<meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
|
||||
<!-- CSS -->
|
||||
<link rel="stylesheet" href="main.css">
|
||||
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.0.0-beta2/dist/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-BmbxuPwQa2lc/FVzBcNJ7UAyJxM6wuqIj61tLrc4wSX0szH/Ev+nYRRuWlolflfl" crossorigin="anonymous">
|
||||
<link href="https://fonts.googleapis.com/css?family=Montserrat:100,200,300,400,500,600,700,800" rel="stylesheet">
|
||||
<style>
|
||||
html {
|
||||
scroll-behavior: smooth;
|
||||
}
|
||||
|
||||
User <%= @comment.user.name %> posted a new comment for event <%= @event.title %> of <%= @conference.short_title %> .
|
||||
body {
|
||||
background: #fff;
|
||||
box-shadow: 0 0 2px rgba(0, 0, 0, 0.06);
|
||||
color: #000;
|
||||
font-family: 'Montserrat', sans-serif;
|
||||
font-size: 16px;
|
||||
line-height: 1.5;
|
||||
margin: 0 auto;
|
||||
}
|
||||
|
||||
"<%= @comment.body %>"
|
||||
h1,
|
||||
h3,
|
||||
h4,
|
||||
h5,
|
||||
h6 {
|
||||
font-weight: 400;
|
||||
line-height: 1.3;
|
||||
}
|
||||
p {
|
||||
color: #0B3559;
|
||||
font-weight: 400;
|
||||
line-height: 2;
|
||||
}
|
||||
|
||||
To reply to this comment, please go to <%= h(admin_conference_program_event_url(@conference.short_title, @event, only_path: false)) %>
|
||||
#border {
|
||||
background-color: #0B3559;
|
||||
padding: 25px;
|
||||
color:#fff;
|
||||
}
|
||||
|
||||
Best wishes,
|
||||
<%= @conference.title %> Team
|
||||
#content {
|
||||
background-color: #fff;
|
||||
padding: 100px;
|
||||
color: #0B3559;
|
||||
}
|
||||
</style>
|
||||
|
||||
<!-- Page Title -->
|
||||
<title>Email</title>
|
||||
</head>
|
||||
<body>
|
||||
<div id="border">
|
||||
<div class="row">
|
||||
<!-- Uncomment below to get logo -->
|
||||
<div class="col-md-2">
|
||||
</div>
|
||||
<div class="col-md-10"><h1></h1></div>
|
||||
</div>
|
||||
</div>
|
||||
<div id="content">
|
||||
<span style="white-space: pre-line">
|
||||
Dear <%= @user.name %>,
|
||||
|
||||
User <%= @comment.user.name %> posted a new comment for event <%= @event.title %> of <%= @conference.short_title %> .
|
||||
|
||||
"<%= @comment.body %>"
|
||||
|
||||
To reply to this comment, please go to <%= h(admin_conference_program_event_url(@conference.short_title, @event, only_path: false)) %>
|
||||
|
||||
Best wishes,
|
||||
<%= @conference.title %> Team
|
||||
</span>
|
||||
</div>
|
||||
<div id="border">
|
||||
<h1></h1>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
|
|
|
|||
77
app/views/mailbot/email_template.erb
Normal file
77
app/views/mailbot/email_template.erb
Normal file
|
|
@ -0,0 +1,77 @@
|
|||
<!doctype html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<!-- Required meta tags -->
|
||||
<meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
|
||||
<!-- CSS -->
|
||||
<link rel="stylesheet" href="main.css">
|
||||
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.0.0-beta2/dist/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-BmbxuPwQa2lc/FVzBcNJ7UAyJxM6wuqIj61tLrc4wSX0szH/Ev+nYRRuWlolflfl" crossorigin="anonymous">
|
||||
<link href="https://fonts.googleapis.com/css?family=Montserrat:100,200,300,400,500,600,700,800" rel="stylesheet">
|
||||
<style>
|
||||
html {
|
||||
scroll-behavior: smooth;
|
||||
}
|
||||
|
||||
body {
|
||||
background: #fff;
|
||||
box-shadow: 0 0 2px rgba(0, 0, 0, 0.06);
|
||||
color: #000;
|
||||
font-family: 'Montserrat', sans-serif;
|
||||
font-size: 16px;
|
||||
line-height: 1.5;
|
||||
margin: 0 auto;
|
||||
}
|
||||
|
||||
h1,
|
||||
h3,
|
||||
h4,
|
||||
h5,
|
||||
h6 {
|
||||
font-weight: 400;
|
||||
line-height: 1.3;
|
||||
}
|
||||
p {
|
||||
color: #0B3559;
|
||||
font-weight: 400;
|
||||
line-height: 2;
|
||||
}
|
||||
|
||||
#border {
|
||||
background-color: #0B3559;
|
||||
padding: 25px;
|
||||
color:#fff;
|
||||
}
|
||||
|
||||
#content {
|
||||
background-color: #fff;
|
||||
padding: 100px;
|
||||
color: #0B3559;
|
||||
}
|
||||
</style>
|
||||
|
||||
<!-- Page Title -->
|
||||
<title>Email</title>
|
||||
</head>
|
||||
<body>
|
||||
<div id="border">
|
||||
<div class="row">
|
||||
<!-- Uncomment below to get logo -->
|
||||
<div class="col-md-2">
|
||||
<% if !@logo.nil? %>
|
||||
<%= image_tag(@logo, style: "display:block") %>
|
||||
<% end %>
|
||||
</div>
|
||||
<div class="col-md-10"><h1></h1></div>
|
||||
</div>
|
||||
</div>
|
||||
<div id="content">
|
||||
<span style="white-space: pre-line">
|
||||
<%= @email_body %>
|
||||
</span>
|
||||
</div>
|
||||
<div id="border">
|
||||
<h1></h1>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
|
|
@ -1,8 +1,81 @@
|
|||
Dear <%= @user.name %>,
|
||||
<!doctype html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<!-- Required meta tags -->
|
||||
<meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
|
||||
<!-- CSS -->
|
||||
<link rel="stylesheet" href="main.css">
|
||||
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.0.0-beta2/dist/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-BmbxuPwQa2lc/FVzBcNJ7UAyJxM6wuqIj61tLrc4wSX0szH/Ev+nYRRuWlolflfl" crossorigin="anonymous">
|
||||
<link href="https://fonts.googleapis.com/css?family=Montserrat:100,200,300,400,500,600,700,800" rel="stylesheet">
|
||||
<style>
|
||||
html {
|
||||
scroll-behavior: smooth;
|
||||
}
|
||||
|
||||
Thanks! You have successfully booked <%= @ticket_purchase.quantity %> <%= @ticket_purchase.ticket.title %> ticket(s) for the event <%= @conference.title %>. Your transaction id is <%= @ticket_purchase.id %>.
|
||||
body {
|
||||
background: #fff;
|
||||
box-shadow: 0 0 2px rgba(0, 0, 0, 0.06);
|
||||
color: #000;
|
||||
font-family: 'Montserrat', sans-serif;
|
||||
font-size: 16px;
|
||||
line-height: 1.5;
|
||||
margin: 0 auto;
|
||||
}
|
||||
|
||||
Please, find the ticket(s) pdf attached.
|
||||
h1,
|
||||
h3,
|
||||
h4,
|
||||
h5,
|
||||
h6 {
|
||||
font-weight: 400;
|
||||
line-height: 1.3;
|
||||
}
|
||||
p {
|
||||
color: #0B3559;
|
||||
font-weight: 400;
|
||||
line-height: 2;
|
||||
}
|
||||
|
||||
Best wishes,
|
||||
<%= @conference.title %> Team
|
||||
#border {
|
||||
background-color: #0B3559;
|
||||
padding: 25px;
|
||||
color:#fff;
|
||||
}
|
||||
|
||||
#content {
|
||||
background-color: #fff;
|
||||
padding: 100px;
|
||||
color: #0B3559;
|
||||
}
|
||||
</style>
|
||||
|
||||
<!-- Page Title -->
|
||||
<title>Email</title>
|
||||
</head>
|
||||
<body>
|
||||
<div id="border">
|
||||
<div class="row">
|
||||
<!-- Uncomment below to get logo -->
|
||||
<div class="col-md-2">
|
||||
</div>
|
||||
<div class="col-md-10"><h1></h1></div>
|
||||
</div>
|
||||
</div>
|
||||
<div id="content">
|
||||
<span style="white-space: pre-line">
|
||||
Dear <%= @user.name %>,
|
||||
|
||||
Thanks! You have successfully booked <%= @ticket_purchase.quantity %> <%= @ticket_purchase.ticket.title %> ticket(s) for the event <%= @conference.title %>. Your transaction id is <%= @ticket_purchase.id %>.
|
||||
|
||||
Please, find the ticket(s) pdf attached.
|
||||
|
||||
Best wishes,
|
||||
<%= @conference.title %> Team
|
||||
</span>
|
||||
</div>
|
||||
<div id="border">
|
||||
<h1></h1>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
|
|
|
|||
|
|
@ -1,10 +1,83 @@
|
|||
Dear <%= @user.name %>,
|
||||
<!doctype html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<!-- Required meta tags -->
|
||||
<meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
|
||||
<!-- CSS -->
|
||||
<link rel="stylesheet" href="main.css">
|
||||
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.0.0-beta2/dist/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-BmbxuPwQa2lc/FVzBcNJ7UAyJxM6wuqIj61tLrc4wSX0szH/Ev+nYRRuWlolflfl" crossorigin="anonymous">
|
||||
<link href="https://fonts.googleapis.com/css?family=Montserrat:100,200,300,400,500,600,700,800" rel="stylesheet">
|
||||
<style>
|
||||
html {
|
||||
scroll-behavior: smooth;
|
||||
}
|
||||
|
||||
Thanks! You have successfully booked <%= @ticket_purchase.quantity %> <%= @ticket_purchase.ticket.title %> ticket(s) for the event <%= @conference.title %>. Your transaction id is <%= @ticket_purchase.id %>.
|
||||
body {
|
||||
background: #fff;
|
||||
box-shadow: 0 0 2px rgba(0, 0, 0, 0.06);
|
||||
color: #000;
|
||||
font-family: 'Montserrat', sans-serif;
|
||||
font-size: 16px;
|
||||
line-height: 1.5;
|
||||
margin: 0 auto;
|
||||
}
|
||||
|
||||
Please, find the ticket(s) pdf attached.
|
||||
h1,
|
||||
h3,
|
||||
h4,
|
||||
h5,
|
||||
h6 {
|
||||
font-weight: 400;
|
||||
line-height: 1.3;
|
||||
}
|
||||
p {
|
||||
color: #0B3559;
|
||||
font-weight: 400;
|
||||
line-height: 2;
|
||||
}
|
||||
|
||||
The SAP Young Thinkers team will reach out to you with information on how to participate in the event soon. In the meantime, you can check the event page (https://events.sap.com/yt-learning-festival-at-snapcon-2020/en/home) or send an email with your questions to youngthinkers@sap.com.
|
||||
#border {
|
||||
background-color: #0B3559;
|
||||
padding: 25px;
|
||||
color:#fff;
|
||||
}
|
||||
|
||||
Best wishes,
|
||||
<%= @conference.title %> Team
|
||||
#content {
|
||||
background-color: #fff;
|
||||
padding: 100px;
|
||||
color: #0B3559;
|
||||
}
|
||||
</style>
|
||||
|
||||
<!-- Page Title -->
|
||||
<title>Email</title>
|
||||
</head>
|
||||
<body>
|
||||
<div id="border">
|
||||
<div class="row">
|
||||
<!-- Uncomment below to get logo -->
|
||||
<div class="col-md-2">
|
||||
</div>
|
||||
<div class="col-md-10"><h1></h1></div>
|
||||
</div>
|
||||
</div>
|
||||
<div id="content">
|
||||
<span style="white-space: pre-line">
|
||||
Dear <%= @user.name %>,
|
||||
|
||||
Thanks! You have successfully booked <%= @ticket_purchase.quantity %> <%= @ticket_purchase.ticket.title %> ticket(s) for the event <%= @conference.title %>. Your transaction id is <%= @ticket_purchase.id %>.
|
||||
|
||||
Please, find the ticket(s) pdf attached.
|
||||
|
||||
The SAP Young Thinkers team will reach out to you with information on how to participate in the event soon. In the meantime, you can check the event page (https://events.sap.com/yt-learning-festival-at-snapcon-2020/en/home) or send an email with your questions to youngthinkers@sap.com.
|
||||
|
||||
Best wishes,
|
||||
<%= @conference.title %> Team
|
||||
</span>
|
||||
</div>
|
||||
<div id="border">
|
||||
<h1></h1>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
|
|
|
|||
|
|
@ -13,7 +13,7 @@
|
|||
|
||||
= f.input :event_type_id, as: :select,
|
||||
collection: @conference.program.event_types.map {|type| ["#{type.title} - #{show_time(type.length)}", type.id,
|
||||
data: { min_words: type.minimum_abstract_length, max_words: type.maximum_abstract_length }]},
|
||||
data: { min_words: type.minimum_abstract_length, max_words: type.maximum_abstract_length, help: type.description }]},
|
||||
include_blank: false, label: 'Type', input_html: { class: 'select-help-toggle' }
|
||||
|
||||
- if @program.languages.present?
|
||||
|
|
@ -46,6 +46,22 @@
|
|||
250
|
||||
words.
|
||||
|
||||
%br
|
||||
|
||||
= f.input :submission_text, input_html: { rows: 5, data: { provide: 'markdown' }, placeholder: '' },
|
||||
hint: markdown_hint('Only conference organizers will read this.')
|
||||
|
||||
%p
|
||||
You have used
|
||||
%span#submission-count #{@event.submission_word_count}
|
||||
words. Submission descriptions must be between
|
||||
%span#submission-minimum-word-count
|
||||
0
|
||||
and
|
||||
%span#submission-maximum-word-count
|
||||
250
|
||||
words.
|
||||
|
||||
- if current_user.is_admin? or @program.cfp.enable_registrations?
|
||||
= f.inputs 'Enable pre-registration' do
|
||||
= f.input :require_registration, label: 'Require participants to register to your event'
|
||||
|
|
|
|||
|
|
@ -61,6 +61,22 @@
|
|||
250
|
||||
words.
|
||||
|
||||
= f.input :submission_text, input_html: { rows: 5, data: { provide: 'markdown' } },
|
||||
hint: markdown_hint
|
||||
|
||||
%p
|
||||
You have used
|
||||
%span#submission-count #{@event.submission_word_count}
|
||||
words. Submission descriptions must be between
|
||||
%span#submission-minimum-word-count
|
||||
0
|
||||
and
|
||||
%span#submission-maximum-word-count
|
||||
250
|
||||
words.
|
||||
|
||||
|
||||
|
||||
- if @program.cfp.enable_registrations?
|
||||
= f.input :require_registration, label: 'Require participants to register to your event'
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue