diff --git a/.gitignore b/.gitignore
index 8331c5c8..c65dc0b1 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,6 +1,27 @@
+# Global, for Macs
+*~
+
+# Compiled Python files
+*.pyc
+
+# Folder view configuration files
+.DS_Store
+Desktop.ini
+
+# Thumbnail cache files
+._*
+Thumbs.db
+
+# Files that might appear on external disks
+.Spotlight-V100
+.Trashes
+
+
+# Legacy from before Feb 2021
/db/test.sqlite3-journal
config/application.rb
config/config.yml
+config/local_env.yml
config/secrets.yml
/vendor/cache
/vendor/cache-old
@@ -40,3 +61,63 @@ docker-compose.override.yml
.buildconfig
osem_development
osem_test
+config/local_env.yml
+
+# From GitHub, for Ruby
+# https://github.com/github/gitignore/blob/master/Ruby.gitignore
+*.gem
+*.rbc
+/.config
+/coverage/
+/InstalledFiles
+/pkg/
+/spec/reports/
+/spec/examples.txt
+/test/tmp/
+/test/version_tmp/
+/tmp/
+
+# Used by dotenv library to load environment variables.
+# .env
+
+# Ignore Byebug command history file.
+.byebug_history
+
+## Specific to RubyMotion:
+.dat*
+.repl_history
+build/
+*.bridgesupport
+build-iPhoneOS/
+build-iPhoneSimulator/
+
+## Specific to RubyMotion (use of CocoaPods):
+#
+# We recommend against adding the Pods directory to your .gitignore. However
+# you should judge for yourself, the pros and cons are mentioned at:
+# https://guides.cocoapods.org/using/using-cocoapods.html#should-i-check-the-pods-directory-into-source-control
+#
+# vendor/Pods/
+
+## Documentation cache and generated files:
+/.yardoc/
+/_yardoc/
+/doc/
+/rdoc/
+
+## Environment normalization:
+/.bundle/
+/vendor/bundle
+/lib/bundler/man/
+
+# for a library or gem, you might want to ignore these files since the code is
+# intended to run in multiple environments; otherwise, check them in:
+# Gemfile.lock
+# .ruby-version
+# .ruby-gemset
+
+# unless supporting rvm < 1.11.0 or doing something fancy, ignore this:
+.rvmrc
+
+# Used by RuboCop. Remote config files pulled in from inherit_from directive.
+.rubocop-https?--*
diff --git a/Gemfile.lock b/Gemfile.lock
index 21de475f..b07d289e 100644
--- a/Gemfile.lock
+++ b/Gemfile.lock
@@ -104,10 +104,13 @@ GEM
rack-test (>= 0.6.3)
regexp_parser (~> 1.5)
xpath (~> 3.2)
- carrierwave (1.3.2)
- activemodel (>= 4.0.0)
- activesupport (>= 4.0.0)
- mime-types (>= 1.16)
+ carrierwave (2.2.0)
+ activemodel (>= 5.0.0)
+ activesupport (>= 5.0.0)
+ addressable (~> 2.6)
+ image_processing (~> 1.1)
+ mimemagic (>= 0.3.0)
+ mini_mime (>= 0.1.3)
ssrf_filter (~> 1.0)
carrierwave-bombshelter (0.2.2)
activesupport (>= 3.2.0)
@@ -115,7 +118,7 @@ GEM
fastimage
case_transform (0.2)
activesupport
- chartkick (3.4.0)
+ chartkick (3.4.2)
childprocess (3.0.0)
chronic (0.10.2)
chunky_png (1.3.11)
@@ -251,6 +254,9 @@ GEM
i18n (1.8.9)
concurrent-ruby (~> 1.0)
i18n_data (0.8.0)
+ image_processing (1.12.1)
+ mini_magick (>= 4.9.5, < 5)
+ ruby-vips (>= 2.0.17, < 3)
inversion (1.1.1)
loggability (~> 0.12)
io-like (0.3.0)
@@ -294,7 +300,7 @@ GEM
method_source (0.8.2)
mime-types (3.3.1)
mime-types-data (~> 3.2015)
- mime-types-data (3.2020.1104)
+ mime-types-data (3.2021.0212)
mimemagic (0.3.5)
mina (1.2.3)
open4 (~> 1.3.4)
@@ -302,7 +308,7 @@ GEM
mini_magick (4.9.5)
mini_mime (1.0.2)
mini_portile2 (2.5.0)
- minitest (5.14.3)
+ minitest (5.14.4)
momentjs-rails (2.20.1)
railties (>= 3.1)
monetize (1.9.2)
@@ -540,6 +546,8 @@ GEM
ruby-openid (2.9.2)
ruby-progressbar (1.10.1)
ruby-rc4 (0.1.5)
+ ruby-vips (2.0.17)
+ ffi (~> 1.9)
ruby2_keywords (0.0.4)
ruby_dep (1.5.0)
ruby_parser (3.11.0)
diff --git a/README.md b/README.md
index 489b10b9..71f3ac37 100644
--- a/README.md
+++ b/README.md
@@ -1,3 +1,21 @@
+### Spring 2021 Student Project
+[](https://travis-ci.com/CactusPuppy/snapcon)
+[](https://codeclimate.com/github/CactusPuppy/snapcon/maintainability)
+[](https://codecov.io/gh/CactusPuppy/snapcon)
+[](https://hakiri.io/github/CactusPuppy/snapcon/master)
+[](https://depfu.com/github/CactusPuppy/snapcon?project_id=22682)
+[](http://dashboard.bluejay.governify.io/dashboard/script/dashboardLoader.js?dashboardURL=https://reporter.bluejay.governify.io/api/v4/dashboards/tpa-CS169L-GH-CactusPuppy_snapcon/main)
+
+
+
+
+
+
+
+
+
+---
+
[](https://travis-ci.com/snap-cloud/snapcon)
[](https://codeclimate.com/github/snap-cloud/snapcon/maintainability)
[](https://codeclimate.com/github/snap-cloud/snapcon/test_coverage)
@@ -11,15 +29,19 @@
# [Snap!Con](https://snapcon.org)
forked from:
## Open Source Event Manager - [osem.io](https://osem.io)
+

An event management tool tailored to Free and Open Source Software conferences.
## Installation
+
Please refer to our [installation guide](INSTALL.md).
## How to contribute to OSEM
+
Please refer to our [contributing guide](CONTRIBUTING.md).
## Contact
+
GitHub issues are the primary way for communicating about specific proposed changes to this project. If you have other questions feel free to subscribe to the [opensuse-web@opensuse.org](http://lists.opensuse.org/opensuse-web/) mailinglist, all OSEM contributors are on that list! Additionally you can use #osem channel on freenode IRC.
diff --git a/app/assets/javascripts/osem.js b/app/assets/javascripts/osem.js
index dcab692c..0839f13b 100644
--- a/app/assets/javascripts/osem.js
+++ b/app/assets/javascripts/osem.js
@@ -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 */
diff --git a/app/controllers/admin/events_controller.rb b/app/controllers/admin/events_controller.rb
index b24882f3..f5e68165 100644
--- a/app/controllers/admin/events_controller.rb
+++ b/app/controllers/admin/events_controller.rb
@@ -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?
diff --git a/app/controllers/application_controller.rb b/app/controllers/application_controller.rb
index 0a4eca46..c9f93a30 100644
--- a/app/controllers/application_controller.rb
+++ b/app/controllers/application_controller.rb
@@ -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) &&
diff --git a/app/controllers/proposals_controller.rb b/app/controllers/proposals_controller.rb
index adfdbea0..bf1b3adc 100644
--- a/app/controllers/proposals_controller.rb
+++ b/app/controllers/proposals_controller.rb
@@ -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: []
)
diff --git a/app/controllers/users_controller.rb b/app/controllers/users_controller.rb
index 0bf44f49..55af84df 100644
--- a/app/controllers/users_controller.rb
+++ b/app/controllers/users_controller.rb
@@ -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
diff --git a/app/helpers/application_helper.rb b/app/helpers/application_helper.rb
index 90b3fa2b..1c7f5da6 100644
--- a/app/helpers/application_helper.rb
+++ b/app/helpers/application_helper.rb
@@ -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)
diff --git a/app/helpers/events_helper.rb b/app/helpers/events_helper.rb
index 95b2d106..eebaa4fe 100644
--- a/app/helpers/events_helper.rb
+++ b/app/helpers/events_helper.rb
@@ -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
diff --git a/app/mailers/mailbot.rb b/app/mailers/mailbot.rb
index 15c5846f..c055ec84 100644
--- a/app/mailers/mailbot.rb
+++ b/app/mailers/mailbot.rb
@@ -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)
diff --git a/app/models/ability.rb b/app/models/ability.rb
index 9db7bacf..ec17e14c 100644
--- a/app/models/ability.rb
+++ b/app/models/ability.rb
@@ -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)
diff --git a/app/models/commercial.rb b/app/models/commercial.rb
index 1d39f9c5..64631052 100644
--- a/app/models/commercial.rb
+++ b/app/models/commercial.rb
@@ -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
diff --git a/app/models/conference.rb b/app/models/conference.rb
index 3e197280..44224ab7 100644
--- a/app/models/conference.rb
+++ b/app/models/conference.rb
@@ -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
diff --git a/app/models/event.rb b/app/models/event.rb
index a2000fc9..d10ae1a1 100644
--- a/app/models/event.rb
+++ b/app/models/event.rb
@@ -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
diff --git a/app/models/user.rb b/app/models/user.rb
index 147c2fe6..9bd1bf80 100644
--- a/app/models/user.rb
+++ b/app/models/user.rb
@@ -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
diff --git a/app/serializers/event_serializer.rb b/app/serializers/event_serializer.rb
index 56d18dba..9bf196f2 100644
--- a/app/serializers/event_serializer.rb
+++ b/app/serializers/event_serializer.rb
@@ -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
diff --git a/app/views/admin/events/_proposal.html.haml b/app/views/admin/events/_proposal.html.haml
index 722387ac..05d48bb7 100644
--- a/app/views/admin/events/_proposal.html.haml
+++ b/app/views/admin/events/_proposal.html.haml
@@ -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
diff --git a/app/views/mailbot/comment_template.text.erb b/app/views/mailbot/comment_template.text.erb
index 0e7a8c35..d162d710 100644
--- a/app/views/mailbot/comment_template.text.erb
+++ b/app/views/mailbot/comment_template.text.erb
@@ -1,10 +1,83 @@
-Dear <%= @user.name %>,
+
+
+