├── lib ├── tasks │ ├── .gitkeep │ ├── video_import.rake │ ├── static_program_export.rake │ ├── bulk_mailer.rake │ └── frab_import_export.rake ├── ri_cal_templates.rb ├── ri_cal_templates │ └── template_handler.rb ├── unique_token.rb ├── video_import.rb └── bulk_mailer.rb ├── public ├── favicon.ico ├── javascripts │ └── .gitkeep ├── stylesheets │ └── .gitkeep ├── system │ └── attachments │ │ └── .htaccess ├── robots.txt ├── 422.html ├── 404.html └── 500.html ├── app ├── helpers │ ├── home_helper.rb │ ├── users_helper.rb │ ├── people_helper.rb │ ├── cfp │ │ ├── users_helper.rb │ │ ├── events_helper.rb │ │ ├── sessions_helper.rb │ │ ├── welcome_helper.rb │ │ ├── passwords_helper.rb │ │ ├── confirmations_helper.rb │ │ ├── availabilities_helper.rb │ │ └── people_helper.rb │ ├── statistics_helper.rb │ ├── event_feedbacks_helper.rb │ ├── public │ │ ├── feedback_helper.rb │ │ └── schedule_helper.rb │ ├── event_ratings_helper.rb │ ├── call_for_papers_helper.rb │ ├── conferences_helper.rb │ ├── tickets_helper.rb │ ├── web_app_theme_helper.rb │ ├── recent_changes_helper.rb │ ├── events_helper.rb │ └── schedule_helper.rb ├── assets │ ├── stylesheets │ │ ├── admin.css │ │ ├── web-app-theme │ │ │ └── override.css │ │ ├── application.css │ │ ├── formtastic_changes.css │ │ └── bootstrap_and_overrides.css.less │ ├── images │ │ ├── event_large.png │ │ ├── event_small.png │ │ ├── event_tiny.png │ │ ├── person_tiny.png │ │ ├── person_large.png │ │ └── person_small.png │ └── javascripts │ │ ├── bootstrap.js.coffee │ │ ├── admin.js │ │ └── application.js ├── views │ ├── cfp │ │ ├── events │ │ │ ├── _link_fields.html.haml │ │ │ ├── _event_attachment_fields.html.haml │ │ │ ├── edit.html.haml │ │ │ ├── new.html.haml │ │ │ ├── confirm.html.haml │ │ │ └── _form.html.haml │ │ ├── people │ │ │ ├── _link_fields.html.haml │ │ │ ├── _language_fields.html.haml │ │ │ ├── edit.html.haml │ │ │ ├── _im_account_fields.html.haml │ │ │ ├── new.html.haml │ │ │ ├── _phone_number_fields.html.haml │ │ │ └── _form.html.haml │ │ ├── availabilities │ │ │ ├── edit.html.haml │ │ │ ├── new.html.haml │ │ │ └── _form.html.haml │ │ ├── passwords │ │ │ ├── new.html.haml │ │ │ └── edit.html.haml │ │ ├── users │ │ │ ├── new.html.haml │ │ │ └── edit.html.haml │ │ ├── confirmations │ │ │ └── new.html.haml │ │ └── welcome │ │ │ └── not_existing.html.haml │ ├── people │ │ ├── _language_fields.html.erb │ │ ├── new.html.haml │ │ ├── edit.html.haml │ │ ├── _link_fields.html.erb │ │ ├── _phone_number_fields.html.haml │ │ ├── _im_account_fields.html.erb │ │ ├── all.html.haml │ │ ├── speakers.html.haml │ │ ├── _table.html.haml │ │ ├── _feedback_table.html.haml │ │ └── index.html.haml │ ├── conferences │ │ ├── _language_fields.html.erb │ │ ├── show.html.erb │ │ ├── _form_days.html.haml │ │ ├── _form_rooms.html.haml │ │ ├── _form_tracks.html.haml │ │ ├── _track_fields.html.erb │ │ ├── _room_fields.html.erb │ │ ├── edit_ticket_server.html.haml │ │ ├── edit.html.haml │ │ ├── _day_fields.html.erb │ │ ├── index.html.haml │ │ ├── _form_ticket_server.html.haml │ │ ├── new.html.haml │ │ ├── edit_days.html.haml │ │ ├── edit_rooms.html.haml │ │ └── _table.html.haml │ ├── events │ │ ├── _event_attachment_fields.html.erb │ │ ├── new.html.haml │ │ ├── _link_fields.html.erb │ │ ├── edit.html.haml │ │ ├── edit_people.html.haml │ │ ├── _event_person_fields.html.erb │ │ ├── my.html.haml │ │ └── index.html.haml │ ├── reports │ │ ├── index.html.haml │ │ ├── _statistics_table.html.haml │ │ ├── show.html.haml │ │ ├── _events_table.html.haml │ │ └── _people_table.html.haml │ ├── call_for_papers │ │ ├── new.html.haml │ │ ├── edit.html.haml │ │ ├── edit_notifications.html.haml │ │ ├── _notification_fields.html.haml │ │ ├── show.html.haml │ │ ├── _form.html.haml │ │ └── _form_notifications.html.haml │ ├── shared │ │ ├── _link_fields.html.haml │ │ ├── _simple_search.html.erb │ │ ├── _flash.html.haml │ │ ├── _language_fields.html.erb │ │ ├── _search_and_table.html.haml │ │ ├── _dynamic_association.html.haml │ │ ├── _event_attachment_fields.html.erb │ │ ├── _availabilities_slider.html.haml │ │ └── _people_tabs.html.haml │ ├── users │ │ ├── edit.html.haml │ │ ├── new.html.haml │ │ ├── _form.html.haml │ │ └── show.html.haml │ ├── conflicts │ │ ├── _person_unavailable.html.haml │ │ ├── _person_has_no_availability.html.haml │ │ └── _events_overlap.html.haml │ ├── recent_changes │ │ ├── index.html.haml │ │ ├── _detailed_changes.html.haml │ │ └── _table.html.haml │ ├── availabilities │ │ ├── edit.html.haml │ │ ├── _form.html.haml │ │ └── new.html.haml │ ├── public │ │ ├── feedback │ │ │ ├── thank_you.html.haml │ │ │ └── new.html.haml │ │ └── schedule │ │ │ ├── speakers.html.haml │ │ │ ├── index.ics.ri_cal │ │ │ ├── events.html.haml │ │ │ ├── index.html.haml │ │ │ └── speaker.html.haml │ ├── schedule │ │ ├── update_event.js.erb │ │ ├── _unscheduled_events.html.haml │ │ ├── _event.html.haml │ │ └── new_pdf.html.haml │ ├── selection_notification │ │ ├── rejection_notification.text.erb │ │ └── acceptance_notification.text.erb │ ├── user_mailer │ │ ├── confirmation_instructions.en.text.erb │ │ ├── confirmation_instructions.de.text.erb │ │ ├── password_reset_instructions.de.text.erb │ │ └── password_reset_instructions.en.text.erb │ ├── sessions │ │ └── new.html.haml │ └── layouts │ │ ├── team_signup.html.haml │ │ ├── signup.html.haml │ │ └── cfp.html.haml ├── models │ ├── ticket.rb │ ├── video.rb │ ├── settings.rb │ ├── language.rb │ ├── ticket_server.rb │ ├── conflict.rb │ ├── track.rb │ ├── event_rating.rb │ ├── im_account.rb │ ├── phone_number.rb │ ├── link.rb │ ├── event_feedback.rb │ ├── event_attachment.rb │ ├── room.rb │ ├── call_for_papers.rb │ └── event_person.rb ├── inputs │ ├── date_input.rb │ ├── time_input.rb │ ├── rating_input.rb │ └── bootstrap_language_input.rb ├── controllers │ ├── cfp │ │ ├── sessions_controller.rb │ │ ├── welcome_controller.rb │ │ ├── availabilities_controller.rb │ │ ├── confirmations_controller.rb │ │ ├── users_controller.rb │ │ └── passwords_controller.rb │ ├── event_feedbacks_controller.rb │ ├── home_controller.rb │ ├── recent_changes_controller.rb │ ├── public │ │ └── feedback_controller.rb │ ├── availabilities_controller.rb │ ├── statistics_controller.rb │ └── event_ratings_controller.rb └── mailers │ └── user_mailer.rb ├── config ├── initializers │ ├── ri_cal_templates.rb │ ├── disable_xml_params.rb │ ├── mime_types.rb │ ├── frab.rb │ ├── backtrace_silencers.rb │ ├── secret_token.rb.example │ ├── inflections.rb │ ├── session_store.rb │ └── will_paginate.rb ├── environment.rb ├── boot.rb ├── cucumber.yml ├── database.yml.template ├── settings.yml.template └── environments │ └── development.rb ├── vendor ├── fonts │ ├── vera.ttf │ ├── verabd.ttf │ └── verait.ttf └── assets │ ├── images │ ├── icons │ │ ├── add.png │ │ ├── key.png │ │ ├── tick.png │ │ ├── cancel.png │ │ ├── clock.png │ │ ├── delete.png │ │ ├── email.png │ │ ├── printer.png │ │ ├── table.png │ │ ├── thumb_up.png │ │ ├── user_edit.png │ │ ├── thumb_down.png │ │ ├── resultset_next.png │ │ ├── application_edit.png │ │ ├── page_white_text.png │ │ └── page_white_acrobat.png │ ├── raty │ │ ├── coffee.png │ │ ├── face-a.png │ │ ├── face-b.png │ │ ├── face-c.png │ │ ├── face-d.png │ │ ├── face-off.png │ │ ├── medal-on.png │ │ ├── star-off.png │ │ ├── star-on.png │ │ ├── background.gif │ │ ├── cancel-off.png │ │ ├── cancel-on.png │ │ ├── medal-off.png │ │ ├── star-half.png │ │ ├── cancel-on-big.png │ │ ├── star-half-big.png │ │ ├── star-off-big.png │ │ ├── star-on-big.png │ │ └── cancel-off-big.png │ ├── colorpicker │ │ ├── Thumbs.db │ │ ├── blank.gif │ │ ├── select.png │ │ ├── slider.png │ │ ├── select2.png │ │ ├── custom_hex.png │ │ ├── custom_hsb_b.png │ │ ├── custom_hsb_h.png │ │ ├── custom_hsb_s.png │ │ ├── custom_indic.gif │ │ ├── custom_rgb_b.png │ │ ├── custom_rgb_g.png │ │ ├── custom_rgb_r.png │ │ ├── custom_submit.png │ │ ├── colorpicker_hex.png │ │ ├── colorpicker_hsb_b.png │ │ ├── colorpicker_hsb_h.png │ │ ├── colorpicker_hsb_s.png │ │ ├── colorpicker_indic.gif │ │ ├── colorpicker_rgb_b.png │ │ ├── colorpicker_rgb_g.png │ │ ├── colorpicker_rgb_r.png │ │ ├── colorpicker_select.gif │ │ ├── colorpicker_submit.png │ │ ├── custom_background.png │ │ ├── colorpicker_overlay.png │ │ └── colorpicker_background.png │ └── images │ │ ├── ui-icons_3383bb_256x240.png │ │ ├── ui-icons_454545_256x240.png │ │ ├── ui-icons_70b2e1_256x240.png │ │ ├── ui-icons_999999_256x240.png │ │ ├── ui-icons_fbc856_256x240.png │ │ ├── ui-bg_flat_0_aaaaaa_40x100.png │ │ ├── ui-bg_flat_0_eeeeee_40x100.png │ │ ├── ui-bg_flat_55_c0402a_40x100.png │ │ ├── ui-bg_flat_55_eeeeee_40x100.png │ │ ├── ui-bg_glass_100_f8f8f8_1x400.png │ │ ├── ui-bg_glass_35_dddddd_1x400.png │ │ ├── ui-bg_glass_60_eeeeee_1x400.png │ │ ├── ui-bg_inset-hard_75_999999_1x100.png │ │ └── ui-bg_inset-soft_50_c9c9c9_1x100.png │ └── stylesheets │ └── jquery-ui-timepicker-addon.css ├── test ├── unit │ ├── helpers │ │ ├── events_helper_test.rb │ │ ├── home_helper_test.rb │ │ ├── people_helper_test.rb │ │ ├── users_helper_test.rb │ │ ├── schedule_helper_test.rb │ │ ├── tickets_helper_test.rb │ │ ├── cfp │ │ │ ├── events_helper_test.rb │ │ │ ├── people_helper_test.rb │ │ │ ├── users_helper_test.rb │ │ │ ├── passwords_helper_test.rb │ │ │ ├── sessions_helper_test.rb │ │ │ ├── welcome_helper_test.rb │ │ │ ├── availabilities_helper_test.rb │ │ │ └── confirmations_helper_test.rb │ │ ├── conferences_helper_test.rb │ │ ├── statistics_helper_test.rb │ │ ├── event_ratings_helper_test.rb │ │ ├── recent_changes_helper_test.rb │ │ ├── call_for_papers_helper_test.rb │ │ ├── event_feedbacks_helper_test.rb │ │ └── public │ │ │ ├── feedback_helper_test.rb │ │ │ └── schedule_helper_test.rb │ ├── ticket_test.rb │ ├── event_rating_test.rb │ ├── notification_test.rb │ ├── day_test.rb │ ├── conference_test.rb │ ├── user_test.rb │ └── person_test.rb ├── performance │ └── browsing_test.rb ├── functional │ ├── cfp │ │ ├── availabilities_controller_test.rb │ │ ├── confirmations_controller_test.rb │ │ └── people_controller_test.rb │ ├── public │ │ ├── feedback_controller_test.rb │ │ └── schedule_controller_test.rb │ ├── tickets_controller_rt_test.rb │ ├── users_controller_test.rb │ └── tickets_controller_otrs_test.rb └── test_helper.rb ├── db ├── migrate │ ├── 20110920134342_drop_audits.rb │ ├── 20121027095651_add_color_to_conference.rb │ ├── 20110128112912_add_user_to_person.rb │ ├── 20110304160010_add_role_to_user.rb │ ├── 20110603145005_add_email_to_conference.rb │ ├── 20110615125223_add_color_to_track.rb │ ├── 20111222141647_ticket_server_queue.rb │ ├── 20130415214732_conference_ticket_type.rb │ ├── 20111217191457_create_tickets.rb │ ├── 20110325092540_add_call_for_papers_to_user.rb │ ├── 20110930110209_remove_devise_specific_columns_from_users.rb │ ├── 20110920134304_add_object_changes_column_to_versions.rb │ ├── 20120804004336_people_want_information.rb │ ├── 20120804002727_conference_schedule_public.rb │ ├── 20110603142013_add_confirmation_token_to_event_people.rb │ ├── 20120804201907_create_days.rb │ ├── 20130727143350_create_videos.rb │ ├── 20120420142658_add_schedule_version_to_conferences.rb │ ├── 20110128103551_create_tracks.rb │ ├── 20110706125013_add_program_export_base_url_to_conferences.rb │ ├── 20130525102656_add_sessions_table.rb │ ├── 20120503220948_fill_public_name.rb │ ├── 20110128103044_create_im_accounts.rb │ ├── 20110322145105_create_languages.rb │ ├── 20110408124552_create_event_feedbacks.rb │ ├── 20110128102959_create_phone_numbers.rb │ ├── 20111217191420_create_ticket_servers.rb │ ├── 20120523130743_add_average_feedback_to_event.rb │ ├── 20110310112726_add_pentabarf_credentials_to_user.rb │ ├── 20110321165509_add_url_and_email_to_cfp.rb │ ├── 20110510145153_create_event_ratings.rb │ ├── 20120117220807_notes_fields.rb │ ├── 20110128103441_create_rooms.rb │ ├── 20110128110128_create_links.rb │ ├── 20110511103813_add_average_rating_to_event.rb │ ├── 20110327150649_create_availabilities.rb │ ├── 20110611152237_create_conflicts.rb │ ├── 20110805144819_add_day_start_and_end_to_conference.rb │ ├── 20121118034920_private_attachments.rb │ ├── 20110302155320_create_call_for_papers.rb │ ├── 20130323201244_user_validate_presence_of_person.rb │ ├── 20110128110821_create_event_people.rb │ ├── 20120328113456_add_speaker_counter.rb │ ├── 20130615150810_use_boolean_columns.rb │ ├── 20110615122659_add_rank_to_rooms.rb │ ├── 20110526154037_add_event_ratings_count_to_events.rb │ ├── 20110128111944_create_event_attachments.rb │ ├── 20120523124125_add_event_feedbacks_count_to_events.rb │ ├── 20120722170102_public_name_is_mandatory.rb │ ├── 20130522224159_create_notifications.rb │ ├── 20110920134303_create_versions.rb │ ├── 20110128102448_create_people.rb │ ├── 20110125184213_create_conferences.rb │ ├── 20110128105450_create_events.rb │ ├── 20120425121612_change__conference_day_start_type.rb │ ├── 20110914152636_rename_association_to_associated.rb │ ├── 20120920213816_remove_products.rb │ ├── 20110513235042_create_products.rb │ ├── 20110315180937_install_acts_as_audited.rb │ ├── 20110513143301_convert_event_states.rb │ ├── 20110125170413_devise_create_users.rb │ └── 20120804220617_create_conference_date_conversions.rb └── seeds.rb ├── config.ru ├── doc └── README_FOR_APP ├── .travis.yml ├── Rakefile ├── script ├── rails └── cucumber ├── .gitignore ├── chef └── cookbooks │ └── frab │ └── recipes │ └── default.rb └── LICENSE /lib/tasks/.gitkeep: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /public/favicon.ico: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /public/javascripts/.gitkeep: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /public/stylesheets/.gitkeep: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /app/helpers/home_helper.rb: -------------------------------------------------------------------------------- 1 | module HomeHelper 2 | end 3 | -------------------------------------------------------------------------------- /app/helpers/users_helper.rb: -------------------------------------------------------------------------------- 1 | module UsersHelper 2 | end 3 | -------------------------------------------------------------------------------- /app/helpers/people_helper.rb: -------------------------------------------------------------------------------- 1 | module PeopleHelper 2 | end 3 | -------------------------------------------------------------------------------- /app/helpers/cfp/users_helper.rb: -------------------------------------------------------------------------------- 1 | module Cfp::UsersHelper 2 | end 3 | -------------------------------------------------------------------------------- /app/helpers/statistics_helper.rb: -------------------------------------------------------------------------------- 1 | module StatisticsHelper 2 | end 3 | -------------------------------------------------------------------------------- /app/helpers/cfp/events_helper.rb: -------------------------------------------------------------------------------- 1 | module Cfp::EventsHelper 2 | end 3 | -------------------------------------------------------------------------------- /app/helpers/cfp/sessions_helper.rb: -------------------------------------------------------------------------------- 1 | module Cfp::SessionsHelper 2 | end 3 | -------------------------------------------------------------------------------- /app/helpers/cfp/welcome_helper.rb: -------------------------------------------------------------------------------- 1 | module Cfp::WelcomeHelper 2 | end 3 | -------------------------------------------------------------------------------- /config/initializers/ri_cal_templates.rb: -------------------------------------------------------------------------------- 1 | require "ri_cal_templates" 2 | -------------------------------------------------------------------------------- /app/assets/stylesheets/admin.css: -------------------------------------------------------------------------------- 1 | /* 2 | *= require colorpicker 3 | */ 4 | -------------------------------------------------------------------------------- /app/helpers/cfp/passwords_helper.rb: -------------------------------------------------------------------------------- 1 | module Cfp::PasswordsHelper 2 | end 3 | -------------------------------------------------------------------------------- /app/helpers/event_feedbacks_helper.rb: -------------------------------------------------------------------------------- 1 | module EventFeedbacksHelper 2 | end 3 | -------------------------------------------------------------------------------- /app/helpers/cfp/confirmations_helper.rb: -------------------------------------------------------------------------------- 1 | module Cfp::ConfirmationsHelper 2 | end 3 | -------------------------------------------------------------------------------- /app/helpers/cfp/availabilities_helper.rb: -------------------------------------------------------------------------------- 1 | module Cfp::AvailabilitiesHelper 2 | end 3 | -------------------------------------------------------------------------------- /app/views/cfp/events/_link_fields.html.haml: -------------------------------------------------------------------------------- 1 | = render "shared/link_fields", :f => f 2 | -------------------------------------------------------------------------------- /app/views/cfp/people/_link_fields.html.haml: -------------------------------------------------------------------------------- 1 | = render "shared/link_fields", :f => f 2 | -------------------------------------------------------------------------------- /app/models/ticket.rb: -------------------------------------------------------------------------------- 1 | class Ticket < ActiveRecord::Base 2 | belongs_to :event 3 | end 4 | -------------------------------------------------------------------------------- /vendor/fonts/vera.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cccs/frab/master/vendor/fonts/vera.ttf -------------------------------------------------------------------------------- /vendor/fonts/verabd.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cccs/frab/master/vendor/fonts/verabd.ttf -------------------------------------------------------------------------------- /vendor/fonts/verait.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cccs/frab/master/vendor/fonts/verait.ttf -------------------------------------------------------------------------------- /app/views/cfp/people/_language_fields.html.haml: -------------------------------------------------------------------------------- 1 | = render "shared/language_fields", :f => f 2 | -------------------------------------------------------------------------------- /app/views/people/_language_fields.html.erb: -------------------------------------------------------------------------------- 1 | <%= render "shared/language_fields", :f => f %> 2 | -------------------------------------------------------------------------------- /app/assets/stylesheets/web-app-theme/override.css: -------------------------------------------------------------------------------- 1 | /* Override here any style defined by web-app-theme */ -------------------------------------------------------------------------------- /app/views/conferences/_language_fields.html.erb: -------------------------------------------------------------------------------- 1 | <%= render "shared/language_fields", :f => f %> 2 | -------------------------------------------------------------------------------- /app/assets/images/event_large.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cccs/frab/master/app/assets/images/event_large.png -------------------------------------------------------------------------------- /app/assets/images/event_small.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cccs/frab/master/app/assets/images/event_small.png -------------------------------------------------------------------------------- /app/assets/images/event_tiny.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cccs/frab/master/app/assets/images/event_tiny.png -------------------------------------------------------------------------------- /app/assets/images/person_tiny.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cccs/frab/master/app/assets/images/person_tiny.png -------------------------------------------------------------------------------- /app/views/cfp/events/_event_attachment_fields.html.haml: -------------------------------------------------------------------------------- 1 | = render "shared/event_attachment_fields", :f => f 2 | -------------------------------------------------------------------------------- /app/views/events/_event_attachment_fields.html.erb: -------------------------------------------------------------------------------- 1 | <%= render "shared/event_attachment_fields", :f => f %> 2 | -------------------------------------------------------------------------------- /app/assets/images/person_large.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cccs/frab/master/app/assets/images/person_large.png -------------------------------------------------------------------------------- /app/assets/images/person_small.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cccs/frab/master/app/assets/images/person_small.png -------------------------------------------------------------------------------- /vendor/assets/images/icons/add.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cccs/frab/master/vendor/assets/images/icons/add.png -------------------------------------------------------------------------------- /vendor/assets/images/icons/key.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cccs/frab/master/vendor/assets/images/icons/key.png -------------------------------------------------------------------------------- /vendor/assets/images/icons/tick.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cccs/frab/master/vendor/assets/images/icons/tick.png -------------------------------------------------------------------------------- /public/system/attachments/.htaccess: -------------------------------------------------------------------------------- 1 | ForceType application/octet-stream 2 | Header set Content-Disposition attachment 3 | -------------------------------------------------------------------------------- /vendor/assets/images/icons/cancel.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cccs/frab/master/vendor/assets/images/icons/cancel.png -------------------------------------------------------------------------------- /vendor/assets/images/icons/clock.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cccs/frab/master/vendor/assets/images/icons/clock.png -------------------------------------------------------------------------------- /vendor/assets/images/icons/delete.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cccs/frab/master/vendor/assets/images/icons/delete.png -------------------------------------------------------------------------------- /vendor/assets/images/icons/email.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cccs/frab/master/vendor/assets/images/icons/email.png -------------------------------------------------------------------------------- /vendor/assets/images/icons/printer.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cccs/frab/master/vendor/assets/images/icons/printer.png -------------------------------------------------------------------------------- /vendor/assets/images/icons/table.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cccs/frab/master/vendor/assets/images/icons/table.png -------------------------------------------------------------------------------- /vendor/assets/images/raty/coffee.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cccs/frab/master/vendor/assets/images/raty/coffee.png -------------------------------------------------------------------------------- /vendor/assets/images/raty/face-a.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cccs/frab/master/vendor/assets/images/raty/face-a.png -------------------------------------------------------------------------------- /vendor/assets/images/raty/face-b.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cccs/frab/master/vendor/assets/images/raty/face-b.png -------------------------------------------------------------------------------- /vendor/assets/images/raty/face-c.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cccs/frab/master/vendor/assets/images/raty/face-c.png -------------------------------------------------------------------------------- /vendor/assets/images/raty/face-d.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cccs/frab/master/vendor/assets/images/raty/face-d.png -------------------------------------------------------------------------------- /vendor/assets/images/raty/face-off.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cccs/frab/master/vendor/assets/images/raty/face-off.png -------------------------------------------------------------------------------- /vendor/assets/images/raty/medal-on.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cccs/frab/master/vendor/assets/images/raty/medal-on.png -------------------------------------------------------------------------------- /vendor/assets/images/raty/star-off.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cccs/frab/master/vendor/assets/images/raty/star-off.png -------------------------------------------------------------------------------- /vendor/assets/images/raty/star-on.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cccs/frab/master/vendor/assets/images/raty/star-on.png -------------------------------------------------------------------------------- /app/models/video.rb: -------------------------------------------------------------------------------- 1 | class Video < ActiveRecord::Base 2 | belongs_to :event 3 | attr_accessible :mimetype, :url 4 | end 5 | -------------------------------------------------------------------------------- /app/views/reports/index.html.haml: -------------------------------------------------------------------------------- 1 | %section 2 | .page-header 3 | %h1 Available Reports 4 | = render 'report_menu' 5 | -------------------------------------------------------------------------------- /test/unit/helpers/events_helper_test.rb: -------------------------------------------------------------------------------- 1 | require 'test_helper' 2 | 3 | class EventsHelperTest < ActionView::TestCase 4 | end 5 | -------------------------------------------------------------------------------- /test/unit/helpers/home_helper_test.rb: -------------------------------------------------------------------------------- 1 | require 'test_helper' 2 | 3 | class HomeHelperTest < ActionView::TestCase 4 | end 5 | -------------------------------------------------------------------------------- /test/unit/helpers/people_helper_test.rb: -------------------------------------------------------------------------------- 1 | require 'test_helper' 2 | 3 | class PeopleHelperTest < ActionView::TestCase 4 | end 5 | -------------------------------------------------------------------------------- /test/unit/helpers/users_helper_test.rb: -------------------------------------------------------------------------------- 1 | require 'test_helper' 2 | 3 | class UsersHelperTest < ActionView::TestCase 4 | end 5 | -------------------------------------------------------------------------------- /vendor/assets/images/icons/thumb_up.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cccs/frab/master/vendor/assets/images/icons/thumb_up.png -------------------------------------------------------------------------------- /vendor/assets/images/icons/user_edit.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cccs/frab/master/vendor/assets/images/icons/user_edit.png -------------------------------------------------------------------------------- /vendor/assets/images/raty/background.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cccs/frab/master/vendor/assets/images/raty/background.gif -------------------------------------------------------------------------------- /vendor/assets/images/raty/cancel-off.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cccs/frab/master/vendor/assets/images/raty/cancel-off.png -------------------------------------------------------------------------------- /vendor/assets/images/raty/cancel-on.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cccs/frab/master/vendor/assets/images/raty/cancel-on.png -------------------------------------------------------------------------------- /vendor/assets/images/raty/medal-off.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cccs/frab/master/vendor/assets/images/raty/medal-off.png -------------------------------------------------------------------------------- /vendor/assets/images/raty/star-half.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cccs/frab/master/vendor/assets/images/raty/star-half.png -------------------------------------------------------------------------------- /app/views/events/new.html.haml: -------------------------------------------------------------------------------- 1 | = block do 2 | = content do 3 | %h2 New event 4 | = inner do 5 | = render 'form' 6 | -------------------------------------------------------------------------------- /test/unit/helpers/schedule_helper_test.rb: -------------------------------------------------------------------------------- 1 | require 'test_helper' 2 | 3 | class ScheduleHelperTest < ActionView::TestCase 4 | end 5 | -------------------------------------------------------------------------------- /test/unit/helpers/tickets_helper_test.rb: -------------------------------------------------------------------------------- 1 | require 'test_helper' 2 | 3 | class TicketsHelperTest < ActionView::TestCase 4 | end 5 | -------------------------------------------------------------------------------- /vendor/assets/images/colorpicker/Thumbs.db: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cccs/frab/master/vendor/assets/images/colorpicker/Thumbs.db -------------------------------------------------------------------------------- /vendor/assets/images/colorpicker/blank.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cccs/frab/master/vendor/assets/images/colorpicker/blank.gif -------------------------------------------------------------------------------- /vendor/assets/images/colorpicker/select.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cccs/frab/master/vendor/assets/images/colorpicker/select.png -------------------------------------------------------------------------------- /vendor/assets/images/colorpicker/slider.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cccs/frab/master/vendor/assets/images/colorpicker/slider.png -------------------------------------------------------------------------------- /vendor/assets/images/icons/thumb_down.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cccs/frab/master/vendor/assets/images/icons/thumb_down.png -------------------------------------------------------------------------------- /vendor/assets/images/raty/cancel-on-big.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cccs/frab/master/vendor/assets/images/raty/cancel-on-big.png -------------------------------------------------------------------------------- /vendor/assets/images/raty/star-half-big.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cccs/frab/master/vendor/assets/images/raty/star-half-big.png -------------------------------------------------------------------------------- /vendor/assets/images/raty/star-off-big.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cccs/frab/master/vendor/assets/images/raty/star-off-big.png -------------------------------------------------------------------------------- /vendor/assets/images/raty/star-on-big.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cccs/frab/master/vendor/assets/images/raty/star-on-big.png -------------------------------------------------------------------------------- /app/views/people/new.html.haml: -------------------------------------------------------------------------------- 1 | %section 2 | .page-header 3 | %h1 New Person 4 | .row 5 | .span16 6 | = render 'form' 7 | -------------------------------------------------------------------------------- /test/unit/helpers/cfp/events_helper_test.rb: -------------------------------------------------------------------------------- 1 | require 'test_helper' 2 | 3 | class Cfp::EventsHelperTest < ActionView::TestCase 4 | end 5 | -------------------------------------------------------------------------------- /test/unit/helpers/cfp/people_helper_test.rb: -------------------------------------------------------------------------------- 1 | require 'test_helper' 2 | 3 | class Cfp::PeopleHelperTest < ActionView::TestCase 4 | end 5 | -------------------------------------------------------------------------------- /test/unit/helpers/cfp/users_helper_test.rb: -------------------------------------------------------------------------------- 1 | require 'test_helper' 2 | 3 | class Cfp::UsersHelperTest < ActionView::TestCase 4 | end 5 | -------------------------------------------------------------------------------- /test/unit/helpers/conferences_helper_test.rb: -------------------------------------------------------------------------------- 1 | require 'test_helper' 2 | 3 | class ConferencesHelperTest < ActionView::TestCase 4 | end 5 | -------------------------------------------------------------------------------- /test/unit/helpers/statistics_helper_test.rb: -------------------------------------------------------------------------------- 1 | require 'test_helper' 2 | 3 | class StatisticsHelperTest < ActionView::TestCase 4 | end 5 | -------------------------------------------------------------------------------- /vendor/assets/images/colorpicker/select2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cccs/frab/master/vendor/assets/images/colorpicker/select2.png -------------------------------------------------------------------------------- /vendor/assets/images/icons/resultset_next.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cccs/frab/master/vendor/assets/images/icons/resultset_next.png -------------------------------------------------------------------------------- /vendor/assets/images/raty/cancel-off-big.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cccs/frab/master/vendor/assets/images/raty/cancel-off-big.png -------------------------------------------------------------------------------- /test/unit/helpers/cfp/passwords_helper_test.rb: -------------------------------------------------------------------------------- 1 | require 'test_helper' 2 | 3 | class Cfp::PasswordsHelperTest < ActionView::TestCase 4 | end 5 | -------------------------------------------------------------------------------- /test/unit/helpers/cfp/sessions_helper_test.rb: -------------------------------------------------------------------------------- 1 | require 'test_helper' 2 | 3 | class Cfp::SessionsHelperTest < ActionView::TestCase 4 | end 5 | -------------------------------------------------------------------------------- /test/unit/helpers/cfp/welcome_helper_test.rb: -------------------------------------------------------------------------------- 1 | require 'test_helper' 2 | 3 | class Cfp::WelcomeHelperTest < ActionView::TestCase 4 | end 5 | -------------------------------------------------------------------------------- /test/unit/helpers/event_ratings_helper_test.rb: -------------------------------------------------------------------------------- 1 | require 'test_helper' 2 | 3 | class EventRatingsHelperTest < ActionView::TestCase 4 | end 5 | -------------------------------------------------------------------------------- /test/unit/helpers/recent_changes_helper_test.rb: -------------------------------------------------------------------------------- 1 | require 'test_helper' 2 | 3 | class RecentChangesHelperTest < ActionView::TestCase 4 | end 5 | -------------------------------------------------------------------------------- /vendor/assets/images/colorpicker/custom_hex.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cccs/frab/master/vendor/assets/images/colorpicker/custom_hex.png -------------------------------------------------------------------------------- /vendor/assets/images/icons/application_edit.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cccs/frab/master/vendor/assets/images/icons/application_edit.png -------------------------------------------------------------------------------- /vendor/assets/images/icons/page_white_text.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cccs/frab/master/vendor/assets/images/icons/page_white_text.png -------------------------------------------------------------------------------- /config/initializers/disable_xml_params.rb: -------------------------------------------------------------------------------- 1 | # disable xml parameter parsing 2 | ActionDispatch::ParamsParser::DEFAULT_PARSERS.delete(Mime::XML) 3 | -------------------------------------------------------------------------------- /test/unit/helpers/call_for_papers_helper_test.rb: -------------------------------------------------------------------------------- 1 | require 'test_helper' 2 | 3 | class CallForPapersHelperTest < ActionView::TestCase 4 | end 5 | -------------------------------------------------------------------------------- /test/unit/helpers/event_feedbacks_helper_test.rb: -------------------------------------------------------------------------------- 1 | require 'test_helper' 2 | 3 | class EventFeedbacksHelperTest < ActionView::TestCase 4 | end 5 | -------------------------------------------------------------------------------- /test/unit/helpers/public/feedback_helper_test.rb: -------------------------------------------------------------------------------- 1 | require 'test_helper' 2 | 3 | class Public::FeedbackHelperTest < ActionView::TestCase 4 | end 5 | -------------------------------------------------------------------------------- /test/unit/helpers/public/schedule_helper_test.rb: -------------------------------------------------------------------------------- 1 | require 'test_helper' 2 | 3 | class Public::ScheduleHelperTest < ActionView::TestCase 4 | end 5 | -------------------------------------------------------------------------------- /vendor/assets/images/colorpicker/custom_hsb_b.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cccs/frab/master/vendor/assets/images/colorpicker/custom_hsb_b.png -------------------------------------------------------------------------------- /vendor/assets/images/colorpicker/custom_hsb_h.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cccs/frab/master/vendor/assets/images/colorpicker/custom_hsb_h.png -------------------------------------------------------------------------------- /vendor/assets/images/colorpicker/custom_hsb_s.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cccs/frab/master/vendor/assets/images/colorpicker/custom_hsb_s.png -------------------------------------------------------------------------------- /vendor/assets/images/colorpicker/custom_indic.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cccs/frab/master/vendor/assets/images/colorpicker/custom_indic.gif -------------------------------------------------------------------------------- /vendor/assets/images/colorpicker/custom_rgb_b.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cccs/frab/master/vendor/assets/images/colorpicker/custom_rgb_b.png -------------------------------------------------------------------------------- /vendor/assets/images/colorpicker/custom_rgb_g.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cccs/frab/master/vendor/assets/images/colorpicker/custom_rgb_g.png -------------------------------------------------------------------------------- /vendor/assets/images/colorpicker/custom_rgb_r.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cccs/frab/master/vendor/assets/images/colorpicker/custom_rgb_r.png -------------------------------------------------------------------------------- /vendor/assets/images/colorpicker/custom_submit.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cccs/frab/master/vendor/assets/images/colorpicker/custom_submit.png -------------------------------------------------------------------------------- /vendor/assets/images/icons/page_white_acrobat.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cccs/frab/master/vendor/assets/images/icons/page_white_acrobat.png -------------------------------------------------------------------------------- /app/assets/javascripts/bootstrap.js.coffee: -------------------------------------------------------------------------------- 1 | jQuery -> 2 | $("a[rel=popover]").popover() 3 | $(".tooltip").tooltip() 4 | $("a[rel=tooltip]").tooltip() -------------------------------------------------------------------------------- /app/models/settings.rb: -------------------------------------------------------------------------------- 1 | class Settings < Settingslogic 2 | source "#{Rails.root}/config/settings.yml" 3 | namespace Rails.env 4 | load! 5 | end 6 | -------------------------------------------------------------------------------- /db/migrate/20110920134342_drop_audits.rb: -------------------------------------------------------------------------------- 1 | class DropAudits < ActiveRecord::Migration 2 | def change 3 | drop_table :audits 4 | end 5 | end 6 | -------------------------------------------------------------------------------- /test/unit/helpers/cfp/availabilities_helper_test.rb: -------------------------------------------------------------------------------- 1 | require 'test_helper' 2 | 3 | class Cfp::AvailabilitiesHelperTest < ActionView::TestCase 4 | end 5 | -------------------------------------------------------------------------------- /test/unit/helpers/cfp/confirmations_helper_test.rb: -------------------------------------------------------------------------------- 1 | require 'test_helper' 2 | 3 | class Cfp::ConfirmationsHelperTest < ActionView::TestCase 4 | end 5 | -------------------------------------------------------------------------------- /vendor/assets/images/colorpicker/colorpicker_hex.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cccs/frab/master/vendor/assets/images/colorpicker/colorpicker_hex.png -------------------------------------------------------------------------------- /vendor/assets/images/colorpicker/colorpicker_hsb_b.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cccs/frab/master/vendor/assets/images/colorpicker/colorpicker_hsb_b.png -------------------------------------------------------------------------------- /vendor/assets/images/colorpicker/colorpicker_hsb_h.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cccs/frab/master/vendor/assets/images/colorpicker/colorpicker_hsb_h.png -------------------------------------------------------------------------------- /vendor/assets/images/colorpicker/colorpicker_hsb_s.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cccs/frab/master/vendor/assets/images/colorpicker/colorpicker_hsb_s.png -------------------------------------------------------------------------------- /vendor/assets/images/colorpicker/colorpicker_indic.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cccs/frab/master/vendor/assets/images/colorpicker/colorpicker_indic.gif -------------------------------------------------------------------------------- /vendor/assets/images/colorpicker/colorpicker_rgb_b.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cccs/frab/master/vendor/assets/images/colorpicker/colorpicker_rgb_b.png -------------------------------------------------------------------------------- /vendor/assets/images/colorpicker/colorpicker_rgb_g.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cccs/frab/master/vendor/assets/images/colorpicker/colorpicker_rgb_g.png -------------------------------------------------------------------------------- /vendor/assets/images/colorpicker/colorpicker_rgb_r.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cccs/frab/master/vendor/assets/images/colorpicker/colorpicker_rgb_r.png -------------------------------------------------------------------------------- /vendor/assets/images/colorpicker/colorpicker_select.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cccs/frab/master/vendor/assets/images/colorpicker/colorpicker_select.gif -------------------------------------------------------------------------------- /vendor/assets/images/colorpicker/colorpicker_submit.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cccs/frab/master/vendor/assets/images/colorpicker/colorpicker_submit.png -------------------------------------------------------------------------------- /vendor/assets/images/colorpicker/custom_background.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cccs/frab/master/vendor/assets/images/colorpicker/custom_background.png -------------------------------------------------------------------------------- /vendor/assets/images/images/ui-icons_3383bb_256x240.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cccs/frab/master/vendor/assets/images/images/ui-icons_3383bb_256x240.png -------------------------------------------------------------------------------- /vendor/assets/images/images/ui-icons_454545_256x240.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cccs/frab/master/vendor/assets/images/images/ui-icons_454545_256x240.png -------------------------------------------------------------------------------- /vendor/assets/images/images/ui-icons_70b2e1_256x240.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cccs/frab/master/vendor/assets/images/images/ui-icons_70b2e1_256x240.png -------------------------------------------------------------------------------- /vendor/assets/images/images/ui-icons_999999_256x240.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cccs/frab/master/vendor/assets/images/images/ui-icons_999999_256x240.png -------------------------------------------------------------------------------- /vendor/assets/images/images/ui-icons_fbc856_256x240.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cccs/frab/master/vendor/assets/images/images/ui-icons_fbc856_256x240.png -------------------------------------------------------------------------------- /app/helpers/public/feedback_helper.rb: -------------------------------------------------------------------------------- 1 | module Public::FeedbackHelper 2 | 3 | def feedback_page? 4 | request.path =~ /feedback/ 5 | end 6 | 7 | end 8 | -------------------------------------------------------------------------------- /app/views/call_for_papers/new.html.haml: -------------------------------------------------------------------------------- 1 | %section 2 | .page-header 3 | %h1 Launch a Call for Papers 4 | .row 5 | .span16 6 | = render "form" 7 | -------------------------------------------------------------------------------- /app/views/cfp/events/edit.html.haml: -------------------------------------------------------------------------------- 1 | %section 2 | .page-header 3 | %h1=t("cfp.edit_event_headline") 4 | .row 5 | .span16 6 | = render 'form' 7 | -------------------------------------------------------------------------------- /app/views/cfp/events/new.html.haml: -------------------------------------------------------------------------------- 1 | %section 2 | .page-header 3 | %h1=t("cfp.create_event_headline") 4 | .row 5 | .span16 6 | = render 'form' 7 | -------------------------------------------------------------------------------- /vendor/assets/images/colorpicker/colorpicker_overlay.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cccs/frab/master/vendor/assets/images/colorpicker/colorpicker_overlay.png -------------------------------------------------------------------------------- /vendor/assets/images/images/ui-bg_flat_0_aaaaaa_40x100.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cccs/frab/master/vendor/assets/images/images/ui-bg_flat_0_aaaaaa_40x100.png -------------------------------------------------------------------------------- /vendor/assets/images/images/ui-bg_flat_0_eeeeee_40x100.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cccs/frab/master/vendor/assets/images/images/ui-bg_flat_0_eeeeee_40x100.png -------------------------------------------------------------------------------- /app/models/language.rb: -------------------------------------------------------------------------------- 1 | class Language < ActiveRecord::Base 2 | 3 | belongs_to :attachable, polymorphic: true 4 | 5 | validates_presence_of :code 6 | 7 | end 8 | -------------------------------------------------------------------------------- /lib/ri_cal_templates.rb: -------------------------------------------------------------------------------- 1 | require "ri_cal_templates/template_handler" 2 | 3 | ActionView::Template.register_template_handler :ri_cal, RiCalTemplates::TemplateHandler 4 | -------------------------------------------------------------------------------- /vendor/assets/images/colorpicker/colorpicker_background.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cccs/frab/master/vendor/assets/images/colorpicker/colorpicker_background.png -------------------------------------------------------------------------------- /vendor/assets/images/images/ui-bg_flat_55_c0402a_40x100.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cccs/frab/master/vendor/assets/images/images/ui-bg_flat_55_c0402a_40x100.png -------------------------------------------------------------------------------- /vendor/assets/images/images/ui-bg_flat_55_eeeeee_40x100.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cccs/frab/master/vendor/assets/images/images/ui-bg_flat_55_eeeeee_40x100.png -------------------------------------------------------------------------------- /vendor/assets/images/images/ui-bg_glass_100_f8f8f8_1x400.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cccs/frab/master/vendor/assets/images/images/ui-bg_glass_100_f8f8f8_1x400.png -------------------------------------------------------------------------------- /vendor/assets/images/images/ui-bg_glass_35_dddddd_1x400.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cccs/frab/master/vendor/assets/images/images/ui-bg_glass_35_dddddd_1x400.png -------------------------------------------------------------------------------- /vendor/assets/images/images/ui-bg_glass_60_eeeeee_1x400.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cccs/frab/master/vendor/assets/images/images/ui-bg_glass_60_eeeeee_1x400.png -------------------------------------------------------------------------------- /app/views/shared/_link_fields.html.haml: -------------------------------------------------------------------------------- 1 | .nested-fields 2 | = f.inputs do 3 | = f.input :title 4 | = f.input :url 5 | = remove_association_link :link, f 6 | -------------------------------------------------------------------------------- /app/views/cfp/availabilities/edit.html.haml: -------------------------------------------------------------------------------- 1 | %section 2 | .page-header 3 | %h1=t("cfp.edit_availability_headline") 4 | .row 5 | .span16 6 | = render 'form' 7 | -------------------------------------------------------------------------------- /vendor/assets/images/images/ui-bg_inset-hard_75_999999_1x100.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cccs/frab/master/vendor/assets/images/images/ui-bg_inset-hard_75_999999_1x100.png -------------------------------------------------------------------------------- /vendor/assets/images/images/ui-bg_inset-soft_50_c9c9c9_1x100.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cccs/frab/master/vendor/assets/images/images/ui-bg_inset-soft_50_c9c9c9_1x100.png -------------------------------------------------------------------------------- /app/helpers/event_ratings_helper.rb: -------------------------------------------------------------------------------- 1 | module EventRatingsHelper 2 | 3 | def raty_icon_path(icon) 4 | asset_path("raty/star-#{icon}.png").sub(/^\//, "") 5 | end 6 | 7 | end 8 | -------------------------------------------------------------------------------- /config.ru: -------------------------------------------------------------------------------- 1 | # This file is used by Rack-based servers to start the application. 2 | 3 | require ::File.expand_path('../config/environment', __FILE__) 4 | run Frab::Application 5 | -------------------------------------------------------------------------------- /app/assets/javascripts/admin.js: -------------------------------------------------------------------------------- 1 | //= require jquery.flot.min 2 | //= require jquery.flot.pie.min 3 | //= require jquery.raty 4 | //= require jquery.tools.min 5 | //= require colorpicker 6 | -------------------------------------------------------------------------------- /app/views/conferences/show.html.erb: -------------------------------------------------------------------------------- 1 |

<%= notice %>

2 | 3 | 4 | <%= link_to 'Edit', edit_conference_path(@conference) %> | 5 | <%= link_to 'Back', conferences_path %> 6 | -------------------------------------------------------------------------------- /config/environment.rb: -------------------------------------------------------------------------------- 1 | # Load the rails application 2 | require File.expand_path('../application', __FILE__) 3 | 4 | # Initialize the rails application 5 | Frab::Application.initialize! 6 | -------------------------------------------------------------------------------- /db/migrate/20121027095651_add_color_to_conference.rb: -------------------------------------------------------------------------------- 1 | class AddColorToConference < ActiveRecord::Migration 2 | def change 3 | add_column :conferences, :color, :string 4 | end 5 | end 6 | -------------------------------------------------------------------------------- /app/views/people/edit.html.haml: -------------------------------------------------------------------------------- 1 | %section 2 | .page-header 3 | %h1 Edit Person: #{@person.full_name} 4 | = render 'shared/people_tabs' 5 | .row 6 | .span16 7 | = render 'form' 8 | -------------------------------------------------------------------------------- /app/views/users/edit.html.haml: -------------------------------------------------------------------------------- 1 | %section 2 | .page-header 3 | %h1 Edit Account: #{@person.full_name} 4 | = render 'shared/people_tabs' 5 | .row 6 | .span16 7 | = render 'form' 8 | -------------------------------------------------------------------------------- /app/views/conflicts/_person_unavailable.html.haml: -------------------------------------------------------------------------------- 1 | %div{:class => ["message", conflict.severity]} 2 | = link_to conflict.person.full_name, conflict.person 3 | = t('conflict.person_unavailable') 4 | -------------------------------------------------------------------------------- /app/assets/stylesheets/application.css: -------------------------------------------------------------------------------- 1 | /* 2 | *= require formtastic-bootstrap 3 | *= require bootstrap 4 | *= require formtastic_changes 5 | *= require jquery-ui-bootstrap 6 | *= require frab 7 | */ 8 | -------------------------------------------------------------------------------- /app/views/shared/_simple_search.html.erb: -------------------------------------------------------------------------------- 1 | <%= form_tag path, :method => :get do %> 2 |

Search: 3 | <%= text_field_tag :term, params[:term] %> <%= link_to "clear", path %> 4 |

5 | <% end %> 6 | -------------------------------------------------------------------------------- /app/inputs/date_input.rb: -------------------------------------------------------------------------------- 1 | class DateInput < FormtasticBootstrap::Inputs::StringInput 2 | 3 | def input_html_options 4 | super.update(value: object.send(method).try(:to_s, :db)) 5 | end 6 | 7 | end 8 | -------------------------------------------------------------------------------- /app/models/ticket_server.rb: -------------------------------------------------------------------------------- 1 | class TicketServer < ActiveRecord::Base 2 | belongs_to :conference 3 | validates_presence_of :url, :queue, :user, :password 4 | validates_format_of :url, with: /\/$/ 5 | end 6 | -------------------------------------------------------------------------------- /app/views/conflicts/_person_has_no_availability.html.haml: -------------------------------------------------------------------------------- 1 | %div{:class => ["message", conflict.severity]} 2 | = link_to conflict.person.full_name, conflict.person 3 | = t('conflict.has_no_availability') 4 | -------------------------------------------------------------------------------- /app/views/recent_changes/index.html.haml: -------------------------------------------------------------------------------- 1 | = block do 2 | = content do 3 | %h2 Recent changes 4 | = inner do 5 | = render 'table' 6 | = actions_bar do 7 | = will_paginate @versions 8 | -------------------------------------------------------------------------------- /app/inputs/time_input.rb: -------------------------------------------------------------------------------- 1 | class TimeInput < FormtasticBootstrap::Inputs::StringInput 2 | 3 | def input_html_options 4 | super.update(value: object.send(method).try(:strftime, "%H:%M")) 5 | end 6 | 7 | end 8 | -------------------------------------------------------------------------------- /app/views/cfp/people/edit.html.haml: -------------------------------------------------------------------------------- 1 | %section 2 | .page-header 3 | %h1=t("cfp.personal_details_headline") 4 | .row 5 | .span16 6 | %p=t("cfp.personal_details_description") 7 | = render 'form' 8 | -------------------------------------------------------------------------------- /app/models/conflict.rb: -------------------------------------------------------------------------------- 1 | class Conflict < ActiveRecord::Base 2 | 3 | belongs_to :event 4 | belongs_to :person 5 | belongs_to :conflicting_event, class_name: "Event", foreign_key: "conflicting_event_id" 6 | 7 | end 8 | -------------------------------------------------------------------------------- /app/views/availabilities/edit.html.haml: -------------------------------------------------------------------------------- 1 | %section 2 | .page-header 3 | .pull-right 4 | %h1 Person: #{@person.full_name} 5 | = render 'shared/people_tabs' 6 | .row 7 | .span16 8 | = render 'form' 9 | -------------------------------------------------------------------------------- /app/views/cfp/availabilities/new.html.haml: -------------------------------------------------------------------------------- 1 | %section 2 | .page-header 3 | %h1=t("cfp.edit_availability_headline") 4 | .row 5 | .span16 6 | %p=t("cfp.edit_availability_description") 7 | = render 'form' 8 | -------------------------------------------------------------------------------- /app/views/cfp/people/_im_account_fields.html.haml: -------------------------------------------------------------------------------- 1 | .nested-fields 2 | = f.inputs do 3 | = f.input :im_type, :collection => ImAccount::TYPES 4 | = f.input :im_address 5 | = remove_association_link :im_account, f 6 | -------------------------------------------------------------------------------- /app/views/events/_link_fields.html.erb: -------------------------------------------------------------------------------- 1 |
2 | <%= f.inputs do %> 3 | <%= f.input :title %> 4 | <%= f.input :url %> 5 | <%= remove_association_link :link, f %> 6 | <% end %> 7 |
8 | -------------------------------------------------------------------------------- /app/views/people/_link_fields.html.erb: -------------------------------------------------------------------------------- 1 |
2 | <%= f.inputs do %> 3 | <%= f.input :title %> 4 | <%= f.input :url %> 5 | <%= remove_association_link :link, f %> 6 | <% end %> 7 |
8 | -------------------------------------------------------------------------------- /app/views/availabilities/_form.html.haml: -------------------------------------------------------------------------------- 1 | = render(:partial => 'shared/availabilities_form', :locals => { :person => @person, :conference => @conference, :availabilities => @availabilities, :url => person_availability_path }) 2 | 3 | -------------------------------------------------------------------------------- /doc/README_FOR_APP: -------------------------------------------------------------------------------- 1 | Use this README file to introduce your application and point to useful places in the API for learning more. 2 | Run "rake doc:app" to generate API documentation for your models, controllers, helpers, and libraries. 3 | -------------------------------------------------------------------------------- /public/robots.txt: -------------------------------------------------------------------------------- 1 | # See http://www.robotstxt.org/wc/norobots.html for documentation on how to use the robots.txt file 2 | # 3 | # To ban all spiders from the entire site uncomment the next two lines: 4 | # User-Agent: * 5 | # Disallow: / 6 | -------------------------------------------------------------------------------- /app/views/cfp/availabilities/_form.html.haml: -------------------------------------------------------------------------------- 1 | = render(:partial => 'shared/availabilities_form', :locals => { :person => current_user.person, :conference => @conference, :availabilities => @availabilities, :url => cfp_person_availability_path }) 2 | -------------------------------------------------------------------------------- /app/views/cfp/events/confirm.html.haml: -------------------------------------------------------------------------------- 1 | %section 2 | .page-header 3 | %h1=t("cfp.event_confirmed") 4 | .row 5 | .span16 6 | = render "shared/flash", :flash => flash 7 | %p 8 | = t("cfp.thanks_for_confirmation") 9 | -------------------------------------------------------------------------------- /app/views/conferences/_form_days.html.haml: -------------------------------------------------------------------------------- 1 | = semantic_form_for(@conference, :url => conference_path) do |f| 2 | = dynamic_association :days, t(:days), f 3 | = f.buttons do 4 | = f.commit_button :button_html => {:class => "btn primary"} 5 | -------------------------------------------------------------------------------- /app/views/public/feedback/thank_you.html.haml: -------------------------------------------------------------------------------- 1 | %h2.title= t '.thank_you' 2 | 3 | .column 4 | %p= t '.thank_you_for_helping_us' 5 | 6 | %p 7 | = link_to t('.return'), public_schedule_path(:day => @conference.day_at(@event.start_time)) 8 | -------------------------------------------------------------------------------- /app/views/conferences/_form_rooms.html.haml: -------------------------------------------------------------------------------- 1 | = semantic_form_for(@conference, :url => conference_path) do |f| 2 | = dynamic_association :rooms, t(:rooms), f 3 | = f.buttons do 4 | = f.commit_button :button_html => {:class => "btn primary"} 5 | -------------------------------------------------------------------------------- /app/views/conferences/_form_tracks.html.haml: -------------------------------------------------------------------------------- 1 | = semantic_form_for(@conference, :url => conference_path) do |f| 2 | = dynamic_association :tracks, t(:tracks), f 3 | = f.buttons do 4 | = f.commit_button :button_html => {:class => "btn primary"} 5 | -------------------------------------------------------------------------------- /app/views/conflicts/_events_overlap.html.haml: -------------------------------------------------------------------------------- 1 | %div{:class => ["message", conflict.severity]} 2 | = link_to "Event", conflict.event 3 | = t('conflict.events_overlap') 4 | = link_to conflict.conflicting_event.title, conflict.conflicting_event 5 | -------------------------------------------------------------------------------- /app/helpers/cfp/people_helper.rb: -------------------------------------------------------------------------------- 1 | module Cfp::PeopleHelper 2 | 3 | def cfp_hard_deadline_over? 4 | return false unless @conference.call_for_papers.hard_deadline 5 | Date.today > @conference.call_for_papers.hard_deadline 6 | end 7 | 8 | end 9 | -------------------------------------------------------------------------------- /app/views/shared/_flash.html.haml: -------------------------------------------------------------------------------- 1 | .flash 2 | - flash.each do |type, message| 3 | %div{:class => "alert-message #{type == :notice ? "success" : type.to_s} fade in", "data-alert" => "alert"} 4 | %a.close{:href => "#"} × 5 | %p= message 6 | -------------------------------------------------------------------------------- /app/views/people/_phone_number_fields.html.haml: -------------------------------------------------------------------------------- 1 | .nested-fields 2 | = f.inputs do 3 | = f.input :phone_type, :as => :select, :collection => PhoneNumber::TYPES 4 | = f.input :phone_number 5 | = remove_association_link :phone_number, f 6 | %hr/ 7 | -------------------------------------------------------------------------------- /app/views/cfp/people/new.html.haml: -------------------------------------------------------------------------------- 1 | %section 2 | .page-header 3 | %h1=t("cfp.personal_details_headline") 4 | .row 5 | .span16 6 | %p=t("cfp.personal_details_description") 7 | %p=t("cfp.personal_details_later") 8 | = render 'form' 9 | -------------------------------------------------------------------------------- /app/views/reports/_statistics_table.html.haml: -------------------------------------------------------------------------------- 1 | %table.zebra-stripe 2 | %thead 3 | %tr 4 | - @labels.each do |label| 5 | %th= label 6 | %tbody 7 | - @data.each do |row| 8 | %tr 9 | - row.each do |c| 10 | %td= c 11 | -------------------------------------------------------------------------------- /db/migrate/20110128112912_add_user_to_person.rb: -------------------------------------------------------------------------------- 1 | class AddUserToPerson < ActiveRecord::Migration 2 | def self.up 3 | add_column :people, :user_id, :integer 4 | end 5 | 6 | def self.down 7 | remove_column :people, :user_id 8 | end 9 | end 10 | -------------------------------------------------------------------------------- /app/inputs/rating_input.rb: -------------------------------------------------------------------------------- 1 | class RatingInput < FormtasticBootstrap::Inputs::HiddenInput 2 | def to_html 3 | generic_input_wrapping do 4 | builder.hidden_field(method, input_html_options) + "
".html_safe 5 | end 6 | end 7 | end 8 | -------------------------------------------------------------------------------- /app/views/cfp/people/_phone_number_fields.html.haml: -------------------------------------------------------------------------------- 1 | .nested-fields 2 | = f.inputs do 3 | = f.input :phone_type, :as => :select, :collection => translated_options(PhoneNumber::TYPES) 4 | = f.input :phone_number 5 | = remove_association_link :phone_number, f 6 | -------------------------------------------------------------------------------- /db/migrate/20110304160010_add_role_to_user.rb: -------------------------------------------------------------------------------- 1 | class AddRoleToUser < ActiveRecord::Migration 2 | def self.up 3 | add_column :users, :role, :string, default: "submitter" 4 | end 5 | 6 | def self.down 7 | remove_column :users, :role 8 | end 9 | end 10 | -------------------------------------------------------------------------------- /.travis.yml: -------------------------------------------------------------------------------- 1 | language: ruby 2 | before_install: 3 | - gem update --system 4 | - gem --version 5 | - cp config/database.yml.template config/database.yml 6 | - cp config/settings.yml.template config/settings.yml 7 | script: 8 | - rake db:setup 9 | - rake test 10 | -------------------------------------------------------------------------------- /app/views/people/_im_account_fields.html.erb: -------------------------------------------------------------------------------- 1 |
2 | <%= f.inputs do %> 3 | <%= f.input :im_type, :collection => ImAccount::TYPES %> 4 | <%= f.input :im_address %> 5 | <%= remove_association_link :im_account, f %> 6 | <% end %> 7 |
8 | -------------------------------------------------------------------------------- /app/views/schedule/update_event.js.erb: -------------------------------------------------------------------------------- 1 | <% @affected_events.each do |event| %> 2 | event_div = $("#event_<%= event.id -%>"); 3 | event_div.removeClass("warning"); 4 | event_div.removeClass("fatal"); 5 | event_div.addClass("<%= event.conflict_level -%>"); 6 | <% end %> 7 | -------------------------------------------------------------------------------- /db/migrate/20110603145005_add_email_to_conference.rb: -------------------------------------------------------------------------------- 1 | class AddEmailToConference < ActiveRecord::Migration 2 | def self.up 3 | add_column :conferences, :email, :string 4 | end 5 | 6 | def self.down 7 | remove_column :conferences, :email 8 | end 9 | end 10 | -------------------------------------------------------------------------------- /db/migrate/20110615125223_add_color_to_track.rb: -------------------------------------------------------------------------------- 1 | class AddColorToTrack < ActiveRecord::Migration 2 | def self.up 3 | add_column :tracks, :color, :string, default: "fefd7f" 4 | end 5 | 6 | def self.down 7 | remove_column :tracks, :color 8 | end 9 | end 10 | -------------------------------------------------------------------------------- /db/migrate/20111222141647_ticket_server_queue.rb: -------------------------------------------------------------------------------- 1 | class TicketServerQueue < ActiveRecord::Migration 2 | def up 3 | add_column :ticket_servers, :queue, :string 4 | end 5 | 6 | def down 7 | remove_column :ticket_servers, :queue, :string 8 | end 9 | end 10 | -------------------------------------------------------------------------------- /db/migrate/20130415214732_conference_ticket_type.rb: -------------------------------------------------------------------------------- 1 | class ConferenceTicketType < ActiveRecord::Migration 2 | def up 3 | add_column :conferences, :ticket_type, :string 4 | end 5 | 6 | def down 7 | remove_column :conferences, :ticket_type 8 | end 9 | end 10 | -------------------------------------------------------------------------------- /app/controllers/cfp/sessions_controller.rb: -------------------------------------------------------------------------------- 1 | class Cfp::SessionsController < SessionsController 2 | 3 | layout 'signup' 4 | 5 | before_filter :check_cfp_open 6 | 7 | protected 8 | 9 | def successful_sign_in_path 10 | cfp_person_path 11 | end 12 | 13 | end 14 | -------------------------------------------------------------------------------- /app/views/conferences/_track_fields.html.erb: -------------------------------------------------------------------------------- 1 |
2 | <%= f.inputs do %> 3 | <%= f.input :name %> 4 | <%= f.input :color, :input_html => {:size => 6, :class => "color"} %> 5 | <%= remove_association_link :track, f %> 6 | <% end %> 7 |
8 | -------------------------------------------------------------------------------- /db/migrate/20111217191457_create_tickets.rb: -------------------------------------------------------------------------------- 1 | class CreateTickets < ActiveRecord::Migration 2 | def change 3 | create_table :tickets do |t| 4 | t.integer :event_id, null: false 5 | t.string :remote_ticket_id 6 | 7 | t.timestamps 8 | end 9 | end 10 | end 11 | -------------------------------------------------------------------------------- /Rakefile: -------------------------------------------------------------------------------- 1 | # Add your own tasks in files placed in lib/tasks ending in .rake, 2 | # for example lib/tasks/capistrano.rake, and they will automatically be available to Rake. 3 | 4 | require File.expand_path('../config/application', __FILE__) 5 | require 'rake' 6 | 7 | Frab::Application.load_tasks 8 | -------------------------------------------------------------------------------- /db/migrate/20110325092540_add_call_for_papers_to_user.rb: -------------------------------------------------------------------------------- 1 | class AddCallForPapersToUser < ActiveRecord::Migration 2 | def self.up 3 | add_column :users, :call_for_papers_id, :integer 4 | end 5 | 6 | def self.down 7 | remove_column :users, :call_for_papers_id 8 | end 9 | end 10 | -------------------------------------------------------------------------------- /db/migrate/20110930110209_remove_devise_specific_columns_from_users.rb: -------------------------------------------------------------------------------- 1 | class RemoveDeviseSpecificColumnsFromUsers < ActiveRecord::Migration 2 | 3 | def change 4 | rename_column :users, :encrypted_password, :password_digest 5 | remove_column :users, :password_salt 6 | end 7 | 8 | end 9 | -------------------------------------------------------------------------------- /test/performance/browsing_test.rb: -------------------------------------------------------------------------------- 1 | require 'test_helper' 2 | require 'rails/performance_test_help' 3 | 4 | # Profiling results for each test method are written to tmp/performance. 5 | class BrowsingTest < ActionDispatch::PerformanceTest 6 | def test_homepage 7 | get '/' 8 | end 9 | end 10 | -------------------------------------------------------------------------------- /app/models/track.rb: -------------------------------------------------------------------------------- 1 | class Track < ActiveRecord::Base 2 | 3 | belongs_to :conference 4 | 5 | default_scope order(:name) 6 | 7 | has_paper_trail meta: {associated_id: :conference_id, associated_type: "Conference"} 8 | 9 | def to_s 10 | "Track: #{self.name}" 11 | end 12 | 13 | end 14 | -------------------------------------------------------------------------------- /lib/ri_cal_templates/template_handler.rb: -------------------------------------------------------------------------------- 1 | module RiCalTemplates 2 | 3 | class TemplateHandler 4 | 5 | def self.call(template) 6 | require "ri_cal" 7 | "::RiCal.Calendar do |cal|\n" + 8 | template.source + 9 | "\n end.to_s" 10 | end 11 | 12 | end 13 | 14 | end 15 | -------------------------------------------------------------------------------- /app/models/event_rating.rb: -------------------------------------------------------------------------------- 1 | class EventRating < ActiveRecord::Base 2 | 3 | belongs_to :event, counter_cache: true 4 | belongs_to :person 5 | 6 | after_save :update_average 7 | 8 | protected 9 | 10 | def update_average 11 | self.event.recalculate_average_rating! 12 | end 13 | 14 | end 15 | -------------------------------------------------------------------------------- /app/models/im_account.rb: -------------------------------------------------------------------------------- 1 | class ImAccount < ActiveRecord::Base 2 | 3 | TYPES = %w(aim icq jabber msn yahoo skype) 4 | 5 | belongs_to :person 6 | 7 | has_paper_trail meta: {associated_id: :person_id, associated_type: "Person"} 8 | 9 | def to_s 10 | "IM Account" 11 | end 12 | 13 | end 14 | -------------------------------------------------------------------------------- /config/initializers/mime_types.rb: -------------------------------------------------------------------------------- 1 | # Be sure to restart your server when you modify this file. 2 | 3 | # Add new mime types for use in respond_to blocks: 4 | # Mime::Type.register "text/richtext", :rtf 5 | # Mime::Type.register_alias "text/html", :iphone 6 | Mime::Type.register "application/calendar+xml", :xcal 7 | -------------------------------------------------------------------------------- /db/migrate/20110920134304_add_object_changes_column_to_versions.rb: -------------------------------------------------------------------------------- 1 | class AddObjectChangesColumnToVersions < ActiveRecord::Migration 2 | def self.up 3 | add_column :versions, :object_changes, :text 4 | end 5 | 6 | def self.down 7 | remove_column :versions, :object_changes 8 | end 9 | end 10 | -------------------------------------------------------------------------------- /app/views/selection_notification/rejection_notification.text.erb: -------------------------------------------------------------------------------- 1 | <%- I18n.locale = @locale %> 2 | <%= @notification.reject_body.gsub('%{conference}', @conference.title).gsub('%{event}', @event.title).gsub('%{surname}', @person.last_name).gsub('%{forename}', @person.first_name).gsub('%{public_name}', @person.public_name) %> -------------------------------------------------------------------------------- /db/migrate/20120804004336_people_want_information.rb: -------------------------------------------------------------------------------- 1 | class PeopleWantInformation < ActiveRecord::Migration 2 | def up 3 | add_column :people, :include_in_mailings, :boolean, null: false, default: false 4 | end 5 | 6 | def down 7 | remove_column :people, :include_in_mailings 8 | end 9 | end 10 | -------------------------------------------------------------------------------- /app/views/schedule/_unscheduled_events.html.haml: -------------------------------------------------------------------------------- 1 | - @unscheduled_events.each do |event| 2 | %li.unscheduled-event{ :id => "event_#{event.id}", 3 | :"data-update-url" => schedule_update_event_path(:id => event.id), 4 | :"data-height" => (event.time_slots * 20 - 7) } 5 | = link_to event.title, "#" 6 | -------------------------------------------------------------------------------- /config/initializers/frab.rb: -------------------------------------------------------------------------------- 1 | ActionMailer::Base.default_url_options = { host: Settings.host, protocol: Settings.protocol } 2 | if Settings['smtp_settings'] 3 | smtp_settings = Hash.new 4 | Settings.smtp_settings.each {|k, v| smtp_settings[k.to_sym] = v } 5 | ActionMailer::Base.smtp_settings = smtp_settings 6 | end 7 | -------------------------------------------------------------------------------- /app/views/user_mailer/confirmation_instructions.en.text.erb: -------------------------------------------------------------------------------- 1 | Welcome <%= @user.email %>! 2 | 3 | You can confirm your account through the link below: 4 | 5 | <%= cfp_user_confirmation_url(:locale => I18n.locale, :confirmation_token => @user.confirmation_token, :conference_acronym => @user.call_for_papers.conference.acronym) %> 6 | -------------------------------------------------------------------------------- /db/migrate/20120804002727_conference_schedule_public.rb: -------------------------------------------------------------------------------- 1 | class ConferenceSchedulePublic < ActiveRecord::Migration 2 | def up 3 | add_column :conferences, :schedule_public, :boolean, null: false, default: false 4 | end 5 | 6 | def down 7 | remove_column :conferences, :schedule_public 8 | end 9 | end 10 | -------------------------------------------------------------------------------- /script/rails: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env ruby 2 | # This command will automatically be run when you run "rails" with Rails 3 gems installed from the root of your application. 3 | 4 | APP_PATH = File.expand_path('../../config/application', __FILE__) 5 | require File.expand_path('../../config/boot', __FILE__) 6 | require 'rails/commands' 7 | -------------------------------------------------------------------------------- /app/models/phone_number.rb: -------------------------------------------------------------------------------- 1 | class PhoneNumber < ActiveRecord::Base 2 | 3 | TYPES = %w(fax mobile phone private secretary skype work) 4 | 5 | belongs_to :person 6 | 7 | has_paper_trail meta: {associated_id: :person_id, associated_type: "Person"} 8 | 9 | def to_s 10 | "Phone number" 11 | end 12 | 13 | end 14 | -------------------------------------------------------------------------------- /db/migrate/20110603142013_add_confirmation_token_to_event_people.rb: -------------------------------------------------------------------------------- 1 | class AddConfirmationTokenToEventPeople < ActiveRecord::Migration 2 | def self.up 3 | add_column :event_people, :confirmation_token, :string 4 | end 5 | 6 | def self.down 7 | remove_column :event_people, :confirmation_token 8 | end 9 | end 10 | -------------------------------------------------------------------------------- /db/migrate/20120804201907_create_days.rb: -------------------------------------------------------------------------------- 1 | class CreateDays < ActiveRecord::Migration 2 | def up 3 | create_table :days do |t| 4 | t.integer :conference_id 5 | t.datetime :start_date 6 | t.datetime :end_date 7 | end 8 | end 9 | def self.down 10 | drop_table :days 11 | end 12 | 13 | end 14 | -------------------------------------------------------------------------------- /db/migrate/20130727143350_create_videos.rb: -------------------------------------------------------------------------------- 1 | class CreateVideos < ActiveRecord::Migration 2 | def change 3 | create_table :videos do |t| 4 | t.references :event 5 | t.string :url 6 | t.string :mimetype 7 | 8 | t.timestamps 9 | end 10 | add_index :videos, :event_id 11 | end 12 | end 13 | -------------------------------------------------------------------------------- /app/views/shared/_language_fields.html.erb: -------------------------------------------------------------------------------- 1 |
2 | <%= f.inputs do %> 3 | <%= f.input :code, :as => :bootstrap_language, :label => t("activerecord.models.language"), :priority_languages => [:en, :es, :de], :include_blank => "" %> 4 | <%= remove_association_link :language, f %> 5 | <% end %> 6 |
7 | -------------------------------------------------------------------------------- /app/views/user_mailer/confirmation_instructions.de.text.erb: -------------------------------------------------------------------------------- 1 | Willkommen <%= @user.email %>! 2 | 3 | Sie können Ihren Account durch folgenden Link bestätigen: 4 | 5 | <%= cfp_user_confirmation_url(:locale => I18n.locale, :confirmation_token => @user.confirmation_token, :conference_acronym => @user.call_for_papers.conference.acronym) %> 6 | -------------------------------------------------------------------------------- /db/migrate/20120420142658_add_schedule_version_to_conferences.rb: -------------------------------------------------------------------------------- 1 | class AddScheduleVersionToConferences < ActiveRecord::Migration 2 | def self.up 3 | add_column :conferences, :schedule_version, :string, default: nil 4 | end 5 | 6 | def self.down 7 | remove_column :conferences, :schedule_version 8 | end 9 | end 10 | -------------------------------------------------------------------------------- /db/migrate/20110128103551_create_tracks.rb: -------------------------------------------------------------------------------- 1 | class CreateTracks < ActiveRecord::Migration 2 | def self.up 3 | create_table :tracks do |t| 4 | t.integer :conference_id 5 | t.string :name, null: false 6 | 7 | t.timestamps 8 | end 9 | end 10 | 11 | def self.down 12 | drop_table :tracks 13 | end 14 | end 15 | -------------------------------------------------------------------------------- /db/migrate/20110706125013_add_program_export_base_url_to_conferences.rb: -------------------------------------------------------------------------------- 1 | class AddProgramExportBaseUrlToConferences < ActiveRecord::Migration 2 | def self.up 3 | add_column :conferences, :program_export_base_url, :string 4 | end 5 | 6 | def self.down 7 | remove_column :conferences, :program_export_base_url 8 | end 9 | end 10 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | .bundle 2 | config/database.yml 3 | config/settings.yml 4 | config/initializers/secret_token.rb 5 | db/*.sqlite3 6 | log/*.log 7 | tmp/* 8 | tmp/**/* 9 | public/system 10 | index 11 | *.swp 12 | rerun.txt 13 | .sass-cache/ 14 | .idea/ 15 | .redcar/ 16 | bin/ 17 | bundler/ 18 | cache/ 19 | gems/ 20 | specifications/ 21 | *~ 22 | .vagrant 23 | -------------------------------------------------------------------------------- /app/models/link.rb: -------------------------------------------------------------------------------- 1 | class Link < ActiveRecord::Base 2 | 3 | belongs_to :linkable, polymorphic: true 4 | 5 | validates_presence_of :title, :url 6 | 7 | has_paper_trail meta: { 8 | associated_id: :linkable_id, 9 | associated_type: :linkable_type 10 | } 11 | 12 | def to_s 13 | "Link: #{self.title}" 14 | end 15 | 16 | end 17 | -------------------------------------------------------------------------------- /script/cucumber: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env ruby 2 | 3 | vendored_cucumber_bin = Dir["#{File.dirname(__FILE__)}/../vendor/{gems,plugins}/cucumber*/bin/cucumber"].first 4 | if vendored_cucumber_bin 5 | load File.expand_path(vendored_cucumber_bin) 6 | else 7 | require 'rubygems' unless ENV['NO_RUBYGEMS'] 8 | require 'cucumber' 9 | load Cucumber::BINARY 10 | end 11 | -------------------------------------------------------------------------------- /app/models/event_feedback.rb: -------------------------------------------------------------------------------- 1 | class EventFeedback < ActiveRecord::Base 2 | 3 | belongs_to :event, counter_cache: true 4 | 5 | after_save :update_average 6 | 7 | validates_presence_of :rating, message: "please select a value" 8 | 9 | protected 10 | 11 | def update_average 12 | self.event.recalculate_average_feedback! 13 | end 14 | 15 | end 16 | -------------------------------------------------------------------------------- /app/views/conferences/_room_fields.html.erb: -------------------------------------------------------------------------------- 1 |
2 | <%= f.inputs do %> 3 | <%= f.input :name %> 4 | <%= f.input :size, :input_html => {:size => 5} %> 5 | <%= f.input :rank, :input_html => {:size => 3} %> 6 | <%= f.input :public, :as => :boolean %> 7 | <%= remove_association_link :room, f %> 8 | <% end %> 9 |
10 | -------------------------------------------------------------------------------- /db/migrate/20130525102656_add_sessions_table.rb: -------------------------------------------------------------------------------- 1 | class AddSessionsTable < ActiveRecord::Migration 2 | def change 3 | create_table :sessions do |t| 4 | t.string :session_id, :null => false 5 | t.text :data 6 | t.timestamps 7 | end 8 | 9 | add_index :sessions, :session_id 10 | add_index :sessions, :updated_at 11 | end 12 | end 13 | -------------------------------------------------------------------------------- /app/models/event_attachment.rb: -------------------------------------------------------------------------------- 1 | class EventAttachment < ActiveRecord::Base 2 | 3 | belongs_to :event 4 | 5 | has_attached_file :attachment 6 | 7 | validates_attachment_size :attachment, :less_than => 23.megabytes 8 | 9 | has_paper_trail meta: {associated_id: :event_id, associated_type: "Event"} 10 | 11 | scope :public, where(public: true) 12 | 13 | end 14 | -------------------------------------------------------------------------------- /app/models/room.rb: -------------------------------------------------------------------------------- 1 | class Room < ActiveRecord::Base 2 | 3 | belongs_to :conference 4 | has_many :events 5 | 6 | has_paper_trail meta: {associated_id: :conference_id, associated_type: "Conference"} 7 | 8 | default_scope order(:rank) 9 | 10 | scope :public, where(public: true) 11 | 12 | def to_s 13 | "Room: #{self.name}" 14 | end 15 | 16 | end 17 | -------------------------------------------------------------------------------- /db/migrate/20120503220948_fill_public_name.rb: -------------------------------------------------------------------------------- 1 | class FillPublicName < ActiveRecord::Migration 2 | def up 3 | Person.reset_column_information 4 | Person.find(:all).each do |person| 5 | if person.public_name.blank? 6 | person.update_attribute :public_name, person.full_name 7 | end 8 | end 9 | end 10 | 11 | def down 12 | end 13 | end 14 | -------------------------------------------------------------------------------- /app/helpers/call_for_papers_helper.rb: -------------------------------------------------------------------------------- 1 | module CallForPapersHelper 2 | require 'securerandom' 3 | 4 | def available_locales(conference) 5 | codes = conference.language_codes 6 | codes | Person.involved_in(conference).map { |p| p.languages.all }.flatten.map{|l| l.code.downcase } 7 | end 8 | 9 | def get_uuid 10 | SecureRandom.hex(8) 11 | end 12 | 13 | end 14 | -------------------------------------------------------------------------------- /app/views/shared/_search_and_table.html.haml: -------------------------------------------------------------------------------- 1 | .row 2 | .span16 3 | = render 'shared/simple_search', :path => request.path 4 | .row 5 | .span16 6 | - if collection.empty? 7 | %p Sorry, but your search yielded no results. 8 | - else 9 | = render 'table', :collection => collection 10 | = actions_bar do 11 | = will_paginate collection 12 | -------------------------------------------------------------------------------- /db/migrate/20110128103044_create_im_accounts.rb: -------------------------------------------------------------------------------- 1 | class CreateImAccounts < ActiveRecord::Migration 2 | def self.up 3 | create_table :im_accounts do |t| 4 | t.integer :person_id 5 | t.string :im_type 6 | t.string :im_address 7 | 8 | t.timestamps 9 | end 10 | end 11 | 12 | def self.down 13 | drop_table :im_accounts 14 | end 15 | end 16 | -------------------------------------------------------------------------------- /db/migrate/20110322145105_create_languages.rb: -------------------------------------------------------------------------------- 1 | class CreateLanguages < ActiveRecord::Migration 2 | def self.up 3 | create_table :languages do |t| 4 | t.string :code 5 | t.integer :attachable_id 6 | t.string :attachable_type 7 | 8 | t.timestamps 9 | end 10 | end 11 | 12 | def self.down 13 | drop_table :languages 14 | end 15 | end 16 | -------------------------------------------------------------------------------- /app/views/call_for_papers/edit.html.haml: -------------------------------------------------------------------------------- 1 | %section 2 | .page-header 3 | %h1 Edit Call for Papers 4 | - if @conference.ticket_type == 'integrated' 5 | %ul.tabs 6 | %li.active= link_to "General", edit_call_for_papers_path 7 | %li= link_to "Notification text", edit_notifications_call_for_papers_path 8 | 9 | .row 10 | .span16 11 | = render "form" 12 | -------------------------------------------------------------------------------- /db/migrate/20110408124552_create_event_feedbacks.rb: -------------------------------------------------------------------------------- 1 | class CreateEventFeedbacks < ActiveRecord::Migration 2 | def self.up 3 | create_table :event_feedbacks do |t| 4 | t.integer :event_id 5 | t.float :rating 6 | t.text :comment 7 | 8 | t.timestamps 9 | end 10 | end 11 | 12 | def self.down 13 | drop_table :event_feedbacks 14 | end 15 | end 16 | -------------------------------------------------------------------------------- /db/migrate/20110128102959_create_phone_numbers.rb: -------------------------------------------------------------------------------- 1 | class CreatePhoneNumbers < ActiveRecord::Migration 2 | def self.up 3 | create_table :phone_numbers do |t| 4 | t.integer :person_id 5 | t.string :phone_type 6 | t.string :phone_number 7 | 8 | t.timestamps 9 | end 10 | end 11 | 12 | def self.down 13 | drop_table :phone_numbers 14 | end 15 | end 16 | -------------------------------------------------------------------------------- /db/migrate/20111217191420_create_ticket_servers.rb: -------------------------------------------------------------------------------- 1 | class CreateTicketServers < ActiveRecord::Migration 2 | def change 3 | create_table :ticket_servers do |t| 4 | t.integer :conference_id, null: false 5 | t.string :url 6 | t.string :user 7 | t.string :password 8 | #t.column :type, :string 9 | 10 | t.timestamps 11 | end 12 | end 13 | end 14 | -------------------------------------------------------------------------------- /app/controllers/event_feedbacks_controller.rb: -------------------------------------------------------------------------------- 1 | class EventFeedbacksController < ApplicationController 2 | 3 | before_filter :authenticate_user! 4 | before_filter :not_submitter! 5 | load_and_authorize_resource :event_feedback, parent: false 6 | 7 | def index 8 | @event = Event.find(params[:event_id]) 9 | @event_feedbacks = @event.event_feedbacks 10 | end 11 | 12 | end 13 | -------------------------------------------------------------------------------- /app/views/shared/_dynamic_association.html.haml: -------------------------------------------------------------------------------- 1 | = f.inputs title do 2 | - if hint 3 | %p.inline-hint= hint 4 | %div{:class => association_name.to_s} 5 | = f.semantic_fields_for association_name do |association_form| 6 | = render association_name.to_s.singularize + "_fields", :f => association_form 7 | .links 8 | = add_association_link association_name, f, association_name 9 | -------------------------------------------------------------------------------- /config/boot.rb: -------------------------------------------------------------------------------- 1 | require 'rubygems' 2 | 3 | # Set up gems listed in the Gemfile. 4 | gemfile = File.expand_path('../../Gemfile', __FILE__) 5 | begin 6 | ENV['BUNDLE_GEMFILE'] = gemfile 7 | require 'bundler' 8 | Bundler.setup 9 | rescue Bundler::GemNotFound => e 10 | STDERR.puts e.message 11 | STDERR.puts "Try running `bundle install`." 12 | exit! 13 | end if File.exist?(gemfile) 14 | -------------------------------------------------------------------------------- /db/migrate/20120523130743_add_average_feedback_to_event.rb: -------------------------------------------------------------------------------- 1 | class AddAverageFeedbackToEvent < ActiveRecord::Migration 2 | def self.up 3 | add_column :events, :average_feedback, :float 4 | Event.joins(:event_feedbacks).readonly(false).all.each {|e| e.recalculate_average_feedback!} 5 | end 6 | 7 | def self.down 8 | remove_column :events, :average_feedback 9 | end 10 | end 11 | -------------------------------------------------------------------------------- /app/views/events/edit.html.haml: -------------------------------------------------------------------------------- 1 | %section 2 | .page-header 3 | %h1 Edit Event 4 | %ul.tabs 5 | %li.active= link_to "Event Details", @event 6 | %li= link_to "People", people_event_path(@event) 7 | %li= link_to "Ratings", event_event_rating_path(@event) 8 | %li= link_to "Feedback", event_event_feedbacks_path(@event) 9 | .row 10 | .span16 11 | = render 'form' 12 | -------------------------------------------------------------------------------- /app/views/events/edit_people.html.haml: -------------------------------------------------------------------------------- 1 | %section 2 | .page-header 3 | %h1 Editing People for "#{@event.title}" 4 | .row 5 | .span16 6 | = semantic_form_for(@event) do |f| 7 | = dynamic_association :event_people, nil, f 8 | = f.buttons do 9 | = f.commit_button :button_html => {:class => "btn primary"} 10 | = link_to "Cancel", :back, :class => "btn" 11 | -------------------------------------------------------------------------------- /db/migrate/20110310112726_add_pentabarf_credentials_to_user.rb: -------------------------------------------------------------------------------- 1 | class AddPentabarfCredentialsToUser < ActiveRecord::Migration 2 | def self.up 3 | add_column :users, :pentabarf_salt, :string 4 | add_column :users, :pentabarf_password, :string 5 | end 6 | 7 | def self.down 8 | remove_column :users, :pentabarf_salt 9 | remove_column :users, :pentabarf_password 10 | end 11 | end 12 | -------------------------------------------------------------------------------- /db/migrate/20110321165509_add_url_and_email_to_cfp.rb: -------------------------------------------------------------------------------- 1 | class AddUrlAndEmailToCfp < ActiveRecord::Migration 2 | def self.up 3 | add_column :call_for_papers, :info_url, :string 4 | add_column :call_for_papers, :contact_email, :string 5 | end 6 | 7 | def self.down 8 | remove_column :call_for_papers, :info_url 9 | remove_column :call_for_papers, :contact_email 10 | end 11 | end 12 | -------------------------------------------------------------------------------- /db/migrate/20110510145153_create_event_ratings.rb: -------------------------------------------------------------------------------- 1 | class CreateEventRatings < ActiveRecord::Migration 2 | def self.up 3 | create_table :event_ratings do |t| 4 | t.integer :event_id 5 | t.integer :person_id 6 | t.float :rating 7 | t.text :comment 8 | 9 | t.timestamps 10 | end 11 | end 12 | 13 | def self.down 14 | drop_table :event_ratings 15 | end 16 | end 17 | -------------------------------------------------------------------------------- /app/views/availabilities/new.html.haml: -------------------------------------------------------------------------------- 1 | %section 2 | .page-header 3 | .pull-right 4 | %h1 Person: #{@person.full_name} 5 | = render 'shared/people_tabs' 6 | .row 7 | .span16 8 | = content do 9 | = inner do 10 | %p 11 | #{@person.full_name} does not currently have any availabilities. 12 | You need to submit this form. 13 | = render 'form' 14 | -------------------------------------------------------------------------------- /db/migrate/20120117220807_notes_fields.rb: -------------------------------------------------------------------------------- 1 | class NotesFields < ActiveRecord::Migration 2 | def up 3 | add_column :events, :note, :text 4 | add_column :events, :submission_note, :text 5 | add_column :people, :note, :text 6 | end 7 | 8 | def down 9 | remove_column :events, :note 10 | remove_column :events, :submission_note, :text 11 | remove_column :people, :note 12 | end 13 | end 14 | -------------------------------------------------------------------------------- /app/models/call_for_papers.rb: -------------------------------------------------------------------------------- 1 | class CallForPapers < ActiveRecord::Base 2 | 3 | belongs_to :conference 4 | has_many :notifications, dependent: :destroy 5 | 6 | accepts_nested_attributes_for :notifications, allow_destroy: true 7 | 8 | validates_presence_of :start_date, :end_date 9 | 10 | has_paper_trail 11 | 12 | def to_s 13 | "Call for Papers: #{self.conference.title}" 14 | end 15 | 16 | end 17 | -------------------------------------------------------------------------------- /db/migrate/20110128103441_create_rooms.rb: -------------------------------------------------------------------------------- 1 | class CreateRooms < ActiveRecord::Migration 2 | def self.up 3 | create_table :rooms do |t| 4 | t.integer :conference_id, null: false 5 | t.string :name, null: false 6 | t.integer :size 7 | t.boolean :public, default: true 8 | 9 | t.timestamps 10 | end 11 | end 12 | 13 | def self.down 14 | drop_table :rooms 15 | end 16 | end 17 | -------------------------------------------------------------------------------- /lib/unique_token.rb: -------------------------------------------------------------------------------- 1 | require "securerandom" 2 | 3 | module UniqueToken 4 | 5 | def generate_token_for(attribute) 6 | loop do 7 | token = SecureRandom.urlsafe_base64(15) 8 | token += 'b' 9 | if self.class.where(attribute => token).count > 0 10 | next 11 | else 12 | self.send(:"#{attribute}=", token) 13 | break token 14 | end 15 | end 16 | end 17 | 18 | end 19 | -------------------------------------------------------------------------------- /db/migrate/20110128110128_create_links.rb: -------------------------------------------------------------------------------- 1 | class CreateLinks < ActiveRecord::Migration 2 | def self.up 3 | create_table :links do |t| 4 | t.string :title, null: false 5 | t.string :url, null: false 6 | t.integer :linkable_id, null: false 7 | t.string :linkable_type, null: false 8 | 9 | t.timestamps 10 | end 11 | end 12 | 13 | def self.down 14 | drop_table :links 15 | end 16 | end 17 | -------------------------------------------------------------------------------- /db/migrate/20110511103813_add_average_rating_to_event.rb: -------------------------------------------------------------------------------- 1 | class AddAverageRatingToEvent < ActiveRecord::Migration 2 | def self.up 3 | add_column :events, :average_rating, :float 4 | # Undefined method? Event.disable_auditing 5 | Event.joins(:event_ratings).readonly(false).all.each {|e| e.recalculate_average_rating!} 6 | end 7 | 8 | def self.down 9 | remove_column :events, :average_rating 10 | end 11 | end 12 | -------------------------------------------------------------------------------- /vendor/assets/stylesheets/jquery-ui-timepicker-addon.css: -------------------------------------------------------------------------------- 1 | /* css for timepicker */ 2 | .ui-timepicker-div .ui-widget-header { margin-bottom: 8px; } 3 | .ui-timepicker-div dl { text-align: left; } 4 | .ui-timepicker-div dl dt { height: 25px; margin-bottom: -25px; } 5 | .ui-timepicker-div dl dd { margin: 0 10px 10px 65px; } 6 | .ui-timepicker-div td { font-size: 90%; } 7 | .ui-tpicker-grid-label { background: none; border: none; margin: 0; padding: 0; } 8 | -------------------------------------------------------------------------------- /app/views/selection_notification/acceptance_notification.text.erb: -------------------------------------------------------------------------------- 1 | <%- I18n.locale = @locale %> 2 | <%= @notification.accept_body.gsub('%{conference}', @conference.title).gsub('%{event}', @event.title).gsub('%{forename}', @person.first_name).gsub('%{surname}', @person.last_name).gsub('%{public_name}', @person.public_name).gsub('%{link}', cfp_event_confirm_by_token_url( conference_acronym: @conference.acronym, id: @event.id, token: @token, locale: @locale )) %> -------------------------------------------------------------------------------- /app/views/users/new.html.haml: -------------------------------------------------------------------------------- 1 | %section 2 | .page-header 3 | %h1 Create account for #{@person.full_name} 4 | = render 'shared/people_tabs' 5 | .row 6 | .span16 7 | = content do 8 | = inner do 9 | %p 10 | #{@person.full_name} does not currently have a user account and thus cannot login. 11 | You can create a user account right now by filling out this form. 12 | = render 'form' 13 | -------------------------------------------------------------------------------- /db/migrate/20110327150649_create_availabilities.rb: -------------------------------------------------------------------------------- 1 | class CreateAvailabilities < ActiveRecord::Migration 2 | def self.up 3 | create_table :availabilities do |t| 4 | t.integer :person_id 5 | t.integer :conference_id 6 | t.date :day 7 | t.time :start_time 8 | t.time :end_time 9 | 10 | t.timestamps 11 | end 12 | end 13 | 14 | def self.down 15 | drop_table :availabilities 16 | end 17 | end 18 | -------------------------------------------------------------------------------- /db/migrate/20110611152237_create_conflicts.rb: -------------------------------------------------------------------------------- 1 | class CreateConflicts < ActiveRecord::Migration 2 | def self.up 3 | create_table :conflicts do |t| 4 | t.integer :event_id 5 | t.integer :conflicting_event_id 6 | t.integer :person_id 7 | t.string :conflict_type 8 | t.string :severity 9 | 10 | t.timestamps 11 | end 12 | end 13 | 14 | def self.down 15 | drop_table :conflicts 16 | end 17 | end 18 | -------------------------------------------------------------------------------- /db/migrate/20110805144819_add_day_start_and_end_to_conference.rb: -------------------------------------------------------------------------------- 1 | class AddDayStartAndEndToConference < ActiveRecord::Migration 2 | def self.up 3 | add_column :conferences, :day_start, :time, null: false, default: "08:00" 4 | add_column :conferences, :day_end, :time, null: false, default: "20:00" 5 | end 6 | 7 | def self.down 8 | remove_column :conferences, :day_end 9 | remove_column :conferences, :day_start 10 | end 11 | end 12 | -------------------------------------------------------------------------------- /db/migrate/20121118034920_private_attachments.rb: -------------------------------------------------------------------------------- 1 | class PrivateAttachments < ActiveRecord::Migration 2 | def up 3 | add_column :event_attachments, :public, :boolean, default: true 4 | EventAttachment.reset_column_information 5 | EventAttachment.find(:all).each do |attachment| 6 | attachment.update_attribute :public, true 7 | end 8 | end 9 | 10 | def down 11 | remove_column :event_attachments, :public 12 | end 13 | end 14 | -------------------------------------------------------------------------------- /app/views/users/_form.html.haml: -------------------------------------------------------------------------------- 1 | = semantic_form_for(@user, :url => person_user_path(@person)) do |f| 2 | = f.inputs do 3 | = f.input :email 4 | = f.input :password 5 | = f.input :password_confirmation 6 | - if can? :assign_roles, User 7 | = f.input :role, :as => :radio, :collection => User::ROLES 8 | = f.buttons do 9 | = f.commit_button :button_html => {:class => "btn primary"} 10 | = link_to "Cancel", :back, :class => "btn" 11 | -------------------------------------------------------------------------------- /config/initializers/backtrace_silencers.rb: -------------------------------------------------------------------------------- 1 | # Be sure to restart your server when you modify this file. 2 | 3 | # You can add backtrace silencers for libraries that you're using but don't wish to see in your backtraces. 4 | # Rails.backtrace_cleaner.add_silencer { |line| line =~ /my_noisy_library/ } 5 | 6 | # You can also remove all the silencers if you're trying to debug a problem that might stem from framework code. 7 | # Rails.backtrace_cleaner.remove_silencers! 8 | -------------------------------------------------------------------------------- /app/mailers/user_mailer.rb: -------------------------------------------------------------------------------- 1 | class UserMailer < ActionMailer::Base 2 | 3 | default from: Settings['from_email'] 4 | 5 | def password_reset_instructions(user) 6 | @user = user 7 | mail to: @user.email, subject: I18n.t("mailers.user_mailer.password_reset_instructions") 8 | end 9 | 10 | def confirmation_instructions(user) 11 | @user = user 12 | mail to: @user.email, subject: I18n.t("mailers.user_mailer.confirmation_instructions") 13 | end 14 | 15 | end 16 | -------------------------------------------------------------------------------- /db/migrate/20110302155320_create_call_for_papers.rb: -------------------------------------------------------------------------------- 1 | class CreateCallForPapers < ActiveRecord::Migration 2 | def self.up 3 | create_table :call_for_papers do |t| 4 | t.date :start_date, null: false 5 | t.date :end_date, null: false 6 | t.date :hard_deadline 7 | t.text :welcome_text 8 | t.integer :conference_id 9 | 10 | t.timestamps 11 | end 12 | end 13 | 14 | def self.down 15 | drop_table :call_for_papers 16 | end 17 | end 18 | -------------------------------------------------------------------------------- /test/functional/cfp/availabilities_controller_test.rb: -------------------------------------------------------------------------------- 1 | require 'test_helper' 2 | 3 | class Cfp::AvailabilitiesControllerTest < ActionController::TestCase 4 | 5 | setup do 6 | @call_for_papers = FactoryGirl.create(:call_for_papers) 7 | @conference = @call_for_papers.conference 8 | login_as(:submitter) 9 | end 10 | 11 | test "should get new" do 12 | get :new, conference_acronym: @conference.acronym 13 | assert_response :success 14 | end 15 | 16 | end 17 | -------------------------------------------------------------------------------- /app/views/people/all.html.haml: -------------------------------------------------------------------------------- 1 | %section 2 | .page-header 3 | .pull-right 4 | - if can? :control, Person 5 | = action_button "primary", "Add person", new_person_path, :title => "Add a new person." 6 | %h1 List of people 7 | %ul.tabs 8 | %li= link_to "This conference", people_path 9 | %li= link_to "Speakers", speakers_people_path 10 | %li.active= link_to "All people", all_people_path 11 | = render 'shared/search_and_table', :collection => @people 12 | -------------------------------------------------------------------------------- /config/initializers/secret_token.rb.example: -------------------------------------------------------------------------------- 1 | # Be sure to restart your server when you modify this file. 2 | 3 | # Your secret key for verifying the integrity of signed cookies. 4 | # If you change this key, all old signed cookies will become invalid! 5 | # Make sure the secret is at least 30 characters and all random, 6 | # no regular words or you'll be exposed to dictionary attacks. 7 | 8 | # You can generate one with "rake secret" 9 | Frab::Application.config.secret_token = '' 10 | -------------------------------------------------------------------------------- /app/controllers/cfp/welcome_controller.rb: -------------------------------------------------------------------------------- 1 | class Cfp::WelcomeController < ApplicationController 2 | 3 | layout 'cfp' 4 | 5 | def not_existing 6 | @user = User.new 7 | unless @conference.call_for_papers.nil? 8 | redirect_to new_cfp_session_path 9 | end 10 | end 11 | 12 | def open_soon 13 | @user = User.new 14 | unless @conference.call_for_papers.start_date > Date.today 15 | redirect_to new_cfp_session_path 16 | end 17 | end 18 | 19 | end 20 | -------------------------------------------------------------------------------- /app/views/people/speakers.html.haml: -------------------------------------------------------------------------------- 1 | %section 2 | .page-header 3 | .pull-right 4 | - if can? :control, Person 5 | = action_button "primary", "Add person", new_person_path, :title => "Add a new person." 6 | %h1 List of people 7 | %ul.tabs 8 | %li= link_to "This conference", people_path 9 | %li.active= link_to "Speakers", speakers_people_path 10 | %li= link_to "All people", all_people_path 11 | = render 'shared/search_and_table', :collection => @people 12 | -------------------------------------------------------------------------------- /config/cucumber.yml: -------------------------------------------------------------------------------- 1 | <% 2 | rerun = File.file?('rerun.txt') ? IO.read('rerun.txt') : "" 3 | rerun_opts = rerun.to_s.strip.empty? ? "--format #{ENV['CUCUMBER_FORMAT'] || 'progress'} features" : "--format #{ENV['CUCUMBER_FORMAT'] || 'pretty'} #{rerun}" 4 | std_opts = "--format #{ENV['CUCUMBER_FORMAT'] || 'pretty'} --strict --tags ~@wip" 5 | %> 6 | default: <%= std_opts %> features 7 | wip: --tags @wip:3 --wip features 8 | rerun: <%= rerun_opts %> --format rerun --out rerun.txt --strict --tags ~@wip 9 | -------------------------------------------------------------------------------- /db/migrate/20130323201244_user_validate_presence_of_person.rb: -------------------------------------------------------------------------------- 1 | class UserValidatePresenceOfPerson < ActiveRecord::Migration 2 | def up 3 | users = User.all.select { |u| u.person.nil? } 4 | users.each { |user| 5 | User.transaction do 6 | person = Person.new(user_id: user.id, email: user.email, public_name: "empty") 7 | person.save! 8 | user.person = person 9 | user.save! 10 | end 11 | } 12 | end 13 | 14 | def down 15 | end 16 | end 17 | -------------------------------------------------------------------------------- /db/migrate/20110128110821_create_event_people.rb: -------------------------------------------------------------------------------- 1 | class CreateEventPeople < ActiveRecord::Migration 2 | def self.up 3 | create_table :event_people do |t| 4 | t.integer :event_id, null: false 5 | t.integer :person_id, null: false 6 | t.string :event_role, null: false, default: "submitter" 7 | t.string :role_state 8 | t.string :comment 9 | 10 | t.timestamps 11 | end 12 | end 13 | 14 | def self.down 15 | drop_table :event_people 16 | end 17 | end 18 | -------------------------------------------------------------------------------- /db/migrate/20120328113456_add_speaker_counter.rb: -------------------------------------------------------------------------------- 1 | class AddSpeakerCounter < ActiveRecord::Migration 2 | def up 3 | add_column :events, :speaker_count, :integer, default: 0 4 | 5 | Event.reset_column_information 6 | Event.find(:all).each do |event| 7 | c = EventPerson.where(event_id: event.id, event_role: :speaker).count 8 | event.update_attribute :speaker_count, c 9 | end 10 | end 11 | 12 | def down 13 | remove_column :events, :speaker_count 14 | end 15 | end 16 | -------------------------------------------------------------------------------- /app/controllers/home_controller.rb: -------------------------------------------------------------------------------- 1 | class HomeController < ApplicationController 2 | 3 | before_filter :authenticate_user! 4 | before_filter :not_submitter! 5 | 6 | def index 7 | if Conference.count == 0 8 | redirect_to new_conference_path and return 9 | end 10 | if cannot? :read, Conference 11 | redirect_to cfp_root_path and return 12 | end 13 | @versions = Version.where(conference_id: @conference.id).includes(:item).order("created_at DESC").limit(5) 14 | end 15 | end 16 | -------------------------------------------------------------------------------- /app/views/conferences/edit_ticket_server.html.haml: -------------------------------------------------------------------------------- 1 | %section 2 | .page-header 3 | %h1= t :edit_ticket_server 4 | %ul.tabs 5 | %li= link_to t(:settings), edit_conference_path 6 | %li= link_to t(:days), edit_days_conference_path 7 | %li= link_to t(:tracks), edit_tracks_conference_path 8 | %li= link_to t(:rooms), edit_rooms_conference_path 9 | %li.active= link_to t(:ticket_server), edit_ticket_server_conference_path 10 | .row 11 | .span16 12 | = render 'form_ticket_server' 13 | -------------------------------------------------------------------------------- /app/views/public/feedback/new.html.haml: -------------------------------------------------------------------------------- 1 | %h2.title= t '.feedback_for', :title => @event.title 2 | 3 | %p= t '.please_let_us_know' 4 | 5 | = semantic_form_for(@feedback, :url => public_event_feedback_path(:event_id => @event.id)) do |f| 6 | = f.inputs do 7 | = f.input :rating, :as => :radio, :collection => 1..5, :hint => t('.how_would_you_rate') 8 | = f.input :comment, :input_html => {:rows => 4}, :hint => t('.what_did_you_like') 9 | = f.buttons do 10 | = f.commit_button t('.submit_feedback') 11 | -------------------------------------------------------------------------------- /db/migrate/20130615150810_use_boolean_columns.rb: -------------------------------------------------------------------------------- 1 | class UseBooleanColumns < ActiveRecord::Migration 2 | def up 3 | change_column :events, :public, :boolean, default: false 4 | change_column :people, :email_public, :boolean, default: true 5 | change_column :rooms, :public, :boolean, default: true 6 | end 7 | 8 | def down 9 | change_column :events, :public, :integer 10 | change_column :people, :email_public, :integer 11 | change_column :rooms, :public, :integer 12 | end 13 | end 14 | -------------------------------------------------------------------------------- /app/inputs/bootstrap_language_input.rb: -------------------------------------------------------------------------------- 1 | class BootstrapLanguageInput < FormtasticBootstrap::Inputs::SelectInput 2 | 3 | def collection 4 | result = Array.new 5 | priority_languages = input_options.delete(:priority_languages) || nil 6 | if priority_languages 7 | result += LocalizedLanguageSelect::priority_languages_array(priority_languages) 8 | result << ["----------", ""] 9 | end 10 | result += LocalizedLanguageSelect::localized_languages_array(options) 11 | end 12 | 13 | end 14 | -------------------------------------------------------------------------------- /app/views/users/show.html.haml: -------------------------------------------------------------------------------- 1 | %section 2 | .page-header 3 | .pull-right 4 | = action_button "primary", "Edit user account", edit_person_user_path(@person), :title => "Edit this user account." 5 | %h1 Person: #{@person.full_name} 6 | = render 'shared/people_tabs' 7 | .row 8 | .span16 9 | %p 10 | %b Email for login: 11 | = @user.email 12 | %p 13 | %b Role: 14 | = @user.role 15 | %p 16 | %b Last login: 17 | = @user.last_sign_in_at 18 | -------------------------------------------------------------------------------- /db/migrate/20110615122659_add_rank_to_rooms.rb: -------------------------------------------------------------------------------- 1 | class AddRankToRooms < ActiveRecord::Migration 2 | def self.up 3 | add_column :rooms, :rank, :integer 4 | Room.reset_column_information 5 | # Undefined method? Room.disable_auditing 6 | Conference.all.each do |conference| 7 | i = 1 8 | conference.rooms.each do |room| 9 | room.update_attributes(rank: i) 10 | i += 1 11 | end 12 | end 13 | end 14 | 15 | def self.down 16 | remove_column :rooms, :rank 17 | end 18 | end 19 | -------------------------------------------------------------------------------- /app/views/conferences/edit.html.haml: -------------------------------------------------------------------------------- 1 | %section 2 | .page-header 3 | %h1= t :edit_conference 4 | %ul.tabs 5 | %li.active= link_to t(:settings), edit_conference_path 6 | %li= link_to t(:days), edit_days_conference_path 7 | %li= link_to t(:tracks), edit_tracks_conference_path 8 | %li= link_to t(:rooms), edit_rooms_conference_path 9 | - if @conference.is_ticket_server_enabled? 10 | %li= link_to t(:ticket_server), edit_ticket_server_conference_path 11 | .row 12 | .span16 13 | = render 'form' 14 | -------------------------------------------------------------------------------- /app/views/user_mailer/password_reset_instructions.de.text.erb: -------------------------------------------------------------------------------- 1 | Hallo <%= @user.email %>! 2 | 3 | Jemand hat einen Link angefordert, um Ihr Passwort zu ändern: 4 | 5 | <%= edit_cfp_user_password_url(:locale => I18n.locale, :reset_password_token => @user.reset_password_token, :conference_acronym => @user.call_for_papers.conference.acronym) %> 6 | 7 | Falls Sie das nicht angefordert haben, ignorieren sie diese 8 | Mail bitte einfach. 9 | Das Passwort wird nicht geändert bis Sie den o.g. Link 10 | benutzen, um ein neues zu setzen. 11 | -------------------------------------------------------------------------------- /app/views/user_mailer/password_reset_instructions.en.text.erb: -------------------------------------------------------------------------------- 1 | Hello <%= @user.email %>! 2 | 3 | Someone has requested a link to change your password, and you 4 | can do this through the link below. 5 | 6 | <%= edit_cfp_user_password_url(:locale => I18n.locale, :reset_password_token => @user.reset_password_token, :conference_acronym => @user.call_for_papers.conference.acronym) %> 7 | 8 | If you didn't request this, please ignore this email. 9 | Your password won't change until you access the link above 10 | and create a new one. 11 | -------------------------------------------------------------------------------- /app/views/conferences/_day_fields.html.erb: -------------------------------------------------------------------------------- 1 |
2 | <%= f.inputs do %> 3 | <%= f.input :start_date, :hint => "yyyy-mm-dd hh:mm", :as => :datetime %> 4 | <%= f.input :end_date, :hint => "yyyy-mm-dd hh:mm", :as => :datetime %> 5 | <%= remove_association_link :day, f %> 6 | <% end %> 7 |
8 | 9 | 10 | 18 | -------------------------------------------------------------------------------- /app/views/cfp/passwords/new.html.haml: -------------------------------------------------------------------------------- 1 | %section 2 | .page-header 3 | %h1=t("cfp.forgot_password_headline") 4 | .row 5 | .span16 6 | = render "shared/flash", :flash => flash 7 | = semantic_form_for(@user, :url => cfp_user_password_path, :html => { :method => :post }) do |f| 8 | = f.inputs do 9 | = f.input :email 10 | = f.buttons do 11 | = f.commit_button t("cfp.send_reset_instructions"), :button_html => {:class => "btn primary"} 12 | = link_to t("cfp.back"), :back, :class => "btn" 13 | -------------------------------------------------------------------------------- /app/views/recent_changes/_detailed_changes.html.haml: -------------------------------------------------------------------------------- 1 | %ul 2 | - YAML.load(version.object_changes).each do |attribute, change| 3 | %li 4 | %em= attribute 5 | - if change.is_a? Array 6 | changed from 7 | %em 8 | = sanitize(change[0].to_s, tags: []) 9 | to 10 | = succeed "." do 11 | %em 12 | = sanitize(change[1].to_s, tags: []) 13 | - else 14 | set to 15 | %em 16 | = sanitize(change.to_s, tags: []) 17 | - end if version.object_changes 18 | -------------------------------------------------------------------------------- /db/migrate/20110526154037_add_event_ratings_count_to_events.rb: -------------------------------------------------------------------------------- 1 | class AddEventRatingsCountToEvents < ActiveRecord::Migration 2 | def self.up 3 | add_column :events, :event_ratings_count, :integer, default: 0 4 | Event.reset_column_information 5 | Event.includes(:event_ratings).all.each do |event| 6 | Event.update_counters event.id, event_ratings_count: event.event_ratings.size unless event.event_ratings.empty? 7 | end 8 | end 9 | 10 | def self.down 11 | remove_column :events, :event_ratings_count 12 | end 13 | end 14 | -------------------------------------------------------------------------------- /app/views/cfp/users/new.html.haml: -------------------------------------------------------------------------------- 1 | %section 2 | .page-header 3 | %h1 4 | = @conference.title 5 | Sign up 6 | .row 7 | .span16 8 | = semantic_form_for(@user, :url => cfp_user_path) do |f| 9 | = f.inputs do 10 | = f.input :email 11 | = f.input :password 12 | = f.input :password_confirmation 13 | = f.buttons do 14 | = f.commit_button t("cfp.sign_up"), :button_html => {:class => "btn primary"} 15 | = link_to t("cfp.back"), new_cfp_session_path, :class => "btn" 16 | -------------------------------------------------------------------------------- /app/views/shared/_event_attachment_fields.html.erb: -------------------------------------------------------------------------------- 1 |
2 | <%= f.inputs do %> 3 | <% if f.object.new_record? %> 4 | <%= f.input :title %> 5 | <%= f.input :public, :as => :boolean, :hint => "Is this attachment visible to the public?" %> 6 | <%= f.input :attachment %> 7 | <% else %> 8 |
  • 9 | <%= link_to f.object.attachment_file_name, f.object.attachment.url %> 10 |
  • 11 | <% end %> 12 | <%= remove_association_link :event_attachment, f %> 13 | <% end %> 14 |
    15 | -------------------------------------------------------------------------------- /config/initializers/inflections.rb: -------------------------------------------------------------------------------- 1 | # Be sure to restart your server when you modify this file. 2 | 3 | # Add new inflection rules using the following format 4 | # (all these examples are active by default): 5 | # ActiveSupport::Inflector.inflections do |inflect| 6 | # inflect.plural /^(ox)$/i, '\1en' 7 | # inflect.singular /^(ox)en/i, '\1' 8 | # inflect.irregular 'person', 'people' 9 | # inflect.uncountable %w( fish sheep ) 10 | # end 11 | ActiveSupport::Inflector.inflections do |inflect| 12 | inflect.uncountable "call_for_papers" 13 | end 14 | -------------------------------------------------------------------------------- /db/migrate/20110128111944_create_event_attachments.rb: -------------------------------------------------------------------------------- 1 | class CreateEventAttachments < ActiveRecord::Migration 2 | def self.up 3 | create_table :event_attachments do |t| 4 | t.integer :event_id, null: false 5 | t.string :title, null: false 6 | t.string :attachment_file_name 7 | t.string :attachment_content_type 8 | t.integer :attachment_file_size 9 | t.datetime :attachment_updated_at 10 | 11 | t.timestamps 12 | end 13 | end 14 | 15 | def self.down 16 | drop_table :event_attachments 17 | end 18 | end 19 | -------------------------------------------------------------------------------- /db/migrate/20120523124125_add_event_feedbacks_count_to_events.rb: -------------------------------------------------------------------------------- 1 | class AddEventFeedbacksCountToEvents < ActiveRecord::Migration 2 | def self.up 3 | add_column :events, :event_feedbacks_count, :integer, default: 0 4 | Event.reset_column_information 5 | Event.includes(:event_feedbacks).all.each do |event| 6 | Event.update_counters event.id, event_feedbacks_count: event.event_feedbacks.size unless event.event_feedbacks.empty? 7 | end 8 | end 9 | 10 | def self.down 11 | remove_column :events, :event_feedbacks_count 12 | end 13 | end 14 | -------------------------------------------------------------------------------- /app/controllers/recent_changes_controller.rb: -------------------------------------------------------------------------------- 1 | class RecentChangesController < ApplicationController 2 | 3 | before_filter :authenticate_user! 4 | before_filter :not_submitter! 5 | load_and_authorize_resource :conference, parent: false 6 | 7 | def index 8 | @versions = Version.where(conference_id: @conference.id).order("created_at DESC").paginate( 9 | page: params[:page], 10 | per_page: 25 11 | ) 12 | end 13 | 14 | def show 15 | @version = Version.where(conference_id: @conference.id, id: params[:id]).first 16 | end 17 | 18 | end 19 | -------------------------------------------------------------------------------- /app/views/cfp/confirmations/new.html.haml: -------------------------------------------------------------------------------- 1 | %section 2 | .page-header 3 | %h1=t("cfp.resend_confirmation_headline") 4 | .row 5 | .span16 6 | = render "shared/flash", :flash => flash 7 | = semantic_form_for(@user, :url => cfp_user_confirmation_path, :html => { :method => :post }) do |f| 8 | = f.inputs do 9 | = f.input :email 10 | = f.buttons do 11 | = f.commit_button t("cfp.resend_confirmation_button"), :button_html => {:class => "btn primary"} 12 | = link_to t("cfp.back"), :back, :class => "btn" 13 | -------------------------------------------------------------------------------- /db/migrate/20120722170102_public_name_is_mandatory.rb: -------------------------------------------------------------------------------- 1 | class PublicNameIsMandatory < ActiveRecord::Migration 2 | def up 3 | change_column :people, :first_name, :string, default: "", null: true 4 | change_column :people, :last_name, :string, default: "", null: true 5 | change_column :people, :public_name, :string, null: false 6 | end 7 | 8 | def down 9 | change_column :people, :first_name, :string, null: false 10 | change_column :people, :last_name, :string, null: false 11 | change_column :people, :public_name, :string 12 | end 13 | end 14 | -------------------------------------------------------------------------------- /app/helpers/conferences_helper.rb: -------------------------------------------------------------------------------- 1 | module ConferencesHelper 2 | 3 | def timeslot_durations(conference) 4 | result = Array.new 5 | durations = [1,5,10,15,20,30,45,60,90,120] 6 | if conference.timeslot_duration and conference.events.count > 0 7 | durations.reject! do |duration| 8 | duration > conference.timeslot_duration or (conference.timeslot_duration % duration) != 0 9 | end 10 | end 11 | durations.each do |duration| 12 | result << [duration_to_time(duration), duration] 13 | end 14 | result 15 | end 16 | 17 | end 18 | -------------------------------------------------------------------------------- /app/views/cfp/users/edit.html.haml: -------------------------------------------------------------------------------- 1 | %section 2 | .page-header 3 | %h1=t("cfp.edit_account") 4 | .row 5 | .span16 6 | = semantic_form_for(@user, :url => cfp_user_path, :html => { :method => :put }) do |f| 7 | = f.inputs do 8 | = f.input :email 9 | = f.input :password, :hint => t("cfp.password_hint") 10 | = f.input :password_confirmation 11 | = f.buttons do 12 | = f.commit_button t("cfp.update"), :button_html => {:class => "btn primary"} 13 | = link_to t("cfp.back"), :back, :class => "btn" 14 | -------------------------------------------------------------------------------- /test/unit/ticket_test.rb: -------------------------------------------------------------------------------- 1 | require 'test_helper' 2 | 3 | class TicketTest < ActiveSupport::TestCase 4 | setup do 5 | @conference = FactoryGirl.create(:conference) 6 | @event = FactoryGirl.create(:event) 7 | end 8 | 9 | test "should create a ticket" do 10 | ticket = Ticket.new(event_id: 1, remote_ticket_id: '1') 11 | assert ticket.save 12 | end 13 | 14 | test "should associate a ticket with an event" do 15 | ticket = Ticket.new(event_id: 1, remote_ticket_id: '1') 16 | @event.ticket = ticket 17 | assert @event.save 18 | end 19 | end 20 | -------------------------------------------------------------------------------- /app/views/schedule/_event.html.haml: -------------------------------------------------------------------------------- 1 | .event{ :id => "event_#{event.id}", 2 | :style => "height: #{event.time_slots * 20 - 7}px;", 3 | :class => event.conflict_level, 4 | :"data-update-url" => schedule_update_event_path(:id => event.id), 5 | :"data-room" => event.room ? event.room.name.downcase : nil, 6 | :"data-time" => event.start_time ? event.start_time.to_s(:rfc822) : nil } 7 | = link_to event.title, event 8 | %p.small 9 | = by_speakers(event) 10 | ( 11 | = event.track.try(:name) 12 | \/ 13 | = event.event_type 14 | ) 15 | -------------------------------------------------------------------------------- /app/views/conferences/index.html.haml: -------------------------------------------------------------------------------- 1 | %section 2 | .page-header 3 | .pull-right 4 | = action_button "primary", "Add conference", new_conference_path, :hint => "Add a new conference" 5 | %h1 List of conferences 6 | - if params[:term].blank? and Conference.all.empty? 7 | .row 8 | .span16 9 | .blank-slate 10 | %p 11 | There is not a single conference yet. 12 | Start adding a conference by clicking on the 13 | button on the right. 14 | - else 15 | = render 'shared/search_and_table', :collection => @conferences 16 | -------------------------------------------------------------------------------- /app/controllers/public/feedback_controller.rb: -------------------------------------------------------------------------------- 1 | class Public::FeedbackController < ApplicationController 2 | 3 | layout "public_schedule" 4 | 5 | def new 6 | @event = @conference.events.find(params[:event_id]) 7 | @feedback = EventFeedback.new 8 | @feedback.rating = 3 9 | end 10 | 11 | def create 12 | @event = @conference.events.find(params[:event_id]) 13 | @feedback = @event.event_feedbacks.new(params[:event_feedback]) 14 | 15 | if @feedback.save 16 | render action: "thank_you" 17 | else 18 | render action: "new" 19 | end 20 | end 21 | 22 | end 23 | -------------------------------------------------------------------------------- /app/views/call_for_papers/edit_notifications.html.haml: -------------------------------------------------------------------------------- 1 | %section 2 | .page-header 3 | %h1 Edit Call for Papers 4 | 5 | - if @conference.ticket_type == 'integrated' 6 | %ul.tabs 7 | %li= link_to "General", edit_call_for_papers_path 8 | %li.active= link_to "Notification text", edit_notifications_call_for_papers_path 9 | 10 | .row 11 | .span6 12 | %h2 Possible variables 13 | %dl.dl-horizontal 14 | - Notification::VARIABLES.each do |key, desc| 15 | %dt= "#{desc}:" 16 | %dd= "%{#{key}}" 17 | 18 | .span16 19 | = render "form_notifications" 20 | -------------------------------------------------------------------------------- /app/helpers/tickets_helper.rb: -------------------------------------------------------------------------------- 1 | module TicketsHelper 2 | def get_ticket_view_url( remote_id='0' ) 3 | return if @conference.nil? 4 | if @conference.ticket_type == 'otrs' 5 | if (is_a_number(remote_id)) 6 | OtrsTickets::Helper.get_ticket_view_url(@conference, remote_id.to_i) 7 | end 8 | elsif @conference.ticket_type == 'rt' 9 | RTTickets::Helper.get_ticket_view_url(remote_id) 10 | end 11 | end 12 | 13 | private 14 | 15 | def is_a_number(test) 16 | begin 17 | Integer(test) 18 | true 19 | rescue 20 | false 21 | end 22 | end 23 | 24 | end 25 | -------------------------------------------------------------------------------- /config/initializers/session_store.rb: -------------------------------------------------------------------------------- 1 | # Be sure to restart your server when you modify this file. 2 | 3 | Frab::Application.config.session_store :active_record_store, key: '_frab_session' 4 | 5 | # Example for a cookie store, with secure flag set for SSL hosting in production mode 6 | # 7 | # Frab::Application.config.session_store :cookie_store, 8 | # key: '_frab_session', 9 | # secure: Rails.env == 'production', 10 | # httponly: true, 11 | # expire_after: 60.minutes 12 | -------------------------------------------------------------------------------- /app/assets/javascripts/application.js: -------------------------------------------------------------------------------- 1 | //= require jquery 2 | //= require jquery_ujs 3 | //= require jquery-ui 4 | //= require jquery-ui-timepicker-addon 5 | //= require jquery.dateFormat 6 | //= require bootstrap-alerts 7 | //= require bootstrap-dropdown 8 | //= require bootstrap-modal 9 | //= require bootstrap-twipsy 10 | //= require bootstrap-popover 11 | //= require bootstrap-scrollspy 12 | //= require bootstrap-tabs 13 | //= require bootstrap-buttons 14 | //= require cocoon 15 | 16 | $(function() { 17 | $('.topbar').dropdown(); 18 | $('.alert-message').alert(); 19 | $('a[data-original-title]').popover(); 20 | }); 21 | -------------------------------------------------------------------------------- /app/helpers/web_app_theme_helper.rb: -------------------------------------------------------------------------------- 1 | module WebAppThemeHelper 2 | 3 | def block(&block) 4 | content_tag(:div, {class: "block"}, &block) 5 | end 6 | 7 | def content(&block) 8 | content_tag(:div, {class: "content"}, &block) 9 | end 10 | 11 | def inner(&block) 12 | content_tag(:div, {class: "inner"}, &block) 13 | end 14 | 15 | def actions_bar(&block) 16 | content_tag(:div, {class: "actions-bar"}, &block) 17 | end 18 | 19 | def actions_block(&block) 20 | content_tag(:div, {id: "actions", class: "block"} ) do 21 | content_tag(:h3, "Actions") + content(&block) 22 | end 23 | end 24 | 25 | end 26 | -------------------------------------------------------------------------------- /app/views/cfp/passwords/edit.html.haml: -------------------------------------------------------------------------------- 1 | %section 2 | .page-header 3 | %h1=t("cfp.change_password_headline") 4 | .row 5 | .span16 6 | = render "shared/flash", :flash => flash 7 | = semantic_form_for(@user, :url => cfp_user_password_path, :html => { :method => :put }) do |f| 8 | = f.hidden_field :reset_password_token 9 | = f.inputs do 10 | = f.input :password 11 | = f.input :password_confirmation 12 | = f.buttons do 13 | = f.commit_button t("cfp.change_password_button"), :button_html => {:class => "btn primary"} 14 | = link_to t("cfp.back"), :back, :class => "btn" 15 | -------------------------------------------------------------------------------- /app/views/public/schedule/speakers.html.haml: -------------------------------------------------------------------------------- 1 | %h2.title= t '.speakers' 2 | 3 | %table.list 4 | %thead 5 | %tr 6 | %th   7 | %th= t '.name' 8 | %th= t '.events' 9 | %tbody 10 | - @speakers.each do |speaker| 11 | %tr 12 | %td= link_to image_box(speaker.avatar, :small), public_speaker_path(:id => speaker.id) 13 | %td= link_to speaker.full_public_name, public_speaker_path(:id => speaker.id) 14 | %td 15 | %ul 16 | - speaker.public_and_accepted_events_as_speaker_in(@conference).each do |event| 17 | %li= link_to event.title, public_event_path(:id => event.id) 18 | -------------------------------------------------------------------------------- /test/unit/event_rating_test.rb: -------------------------------------------------------------------------------- 1 | require 'test_helper' 2 | 3 | class EventRatingTest < ActiveSupport::TestCase 4 | 5 | test "creating ratings correctly updates average" do 6 | event = FactoryGirl.create(:event) 7 | FactoryGirl.create(:event_rating, event: event, rating: 4.0) 8 | event.reload 9 | assert_equal 4.0, event.average_rating 10 | FactoryGirl.create(:event_rating, event: event, rating: 4.0) 11 | event.reload 12 | assert_equal 4.0, event.average_rating 13 | FactoryGirl.create(:event_rating, event: event, rating: 1.0) 14 | event.reload 15 | assert_equal 3.0, event.average_rating 16 | end 17 | 18 | end 19 | -------------------------------------------------------------------------------- /app/views/public/schedule/index.ics.ri_cal: -------------------------------------------------------------------------------- 1 | @conference.events.public.accepted.order(:title).each do |event| 2 | next if event.start_time.nil? 3 | cal.event do |e| 4 | e.dtstamp = event.updated_at 5 | e.uid = "event-#{event.id}@#{Socket.gethostname}" 6 | e.dtstart = event.start_time 7 | e.dtend = event.end_time 8 | e.summary = event.title 9 | e.description = event.abstract if event.abstract 10 | e.location = event.room.name if event.room 11 | if @conference.program_export_base_url.blank? 12 | e.url = public_event_url(:id => event.id) 13 | else 14 | e.url = event.static_url 15 | end 16 | end 17 | end 18 | -------------------------------------------------------------------------------- /app/views/conferences/_form_ticket_server.html.haml: -------------------------------------------------------------------------------- 1 | = semantic_form_for(@conference, :url => conference_path) do |f| 2 | - @conference.build_ticket_server unless @conference.ticket_server 3 | = f.semantic_fields_for :ticket_server do |ts| 4 | = ts.input :url, :hint => "URL of your ticket system, for example https://localhost/otrs/" 5 | = ts.input :queue, :hint => "Name of this events queue" 6 | = ts.input :user, :hint => "Username used to create tickets" 7 | = ts.input :password, :hint => "Password used to log into ticket system" 8 | 9 | = f.buttons do 10 | = f.commit_button :button_html => {:class => "btn primary", :icon => "tick"} 11 | -------------------------------------------------------------------------------- /db/migrate/20130522224159_create_notifications.rb: -------------------------------------------------------------------------------- 1 | class CreateNotifications < ActiveRecord::Migration 2 | def up 3 | create_table :notifications do |t| 4 | t.integer :call_for_papers_id 5 | t.timestamps 6 | end 7 | 8 | Notification.create_translation_table! :accept_subject => :string, 9 | :reject_subject => :string, 10 | :accept_body => :text, 11 | :reject_body => :text 12 | end 13 | 14 | def down 15 | drop_table :notifications 16 | 17 | Notification.drop_translation_table! 18 | end 19 | end -------------------------------------------------------------------------------- /db/migrate/20110920134303_create_versions.rb: -------------------------------------------------------------------------------- 1 | class CreateVersions < ActiveRecord::Migration 2 | def up 3 | create_table :versions do |t| 4 | t.string :item_type, null: false 5 | t.integer :item_id, null: false 6 | t.string :event, null: false 7 | t.string :whodunnit 8 | t.text :object 9 | t.datetime :created_at 10 | t.integer :conference_id 11 | t.integer :associated_id 12 | t.string :associated_type 13 | end 14 | add_index :versions, [:item_type, :item_id] 15 | end 16 | 17 | def down 18 | remove_index :versions, [:item_type, :item_id] 19 | drop_table :versions 20 | end 21 | end 22 | -------------------------------------------------------------------------------- /app/views/call_for_papers/_notification_fields.html.haml: -------------------------------------------------------------------------------- 1 | - uuid = "nf#{get_uuid}" 2 | %div{ :id => uuid } 3 | = f.inputs do 4 | = link_to_function "use default text", "NotificationDefaults.fill({ id: '#{uuid}' });", style: 'float:right' 5 | = f.input :locale, as: :select, collection: available_locales(@conference), hint: "Available locales for this conference and its speakers" 6 | = f.input "accept_subject", label: 'Accept subject' 7 | = f.input "accept_body", label: 'Accept body', as: :text 8 | = f.input "reject_subject", label: 'Reject subject' 9 | = f.input "reject_body", label: 'Reject body', as: :text 10 | = remove_association_link :notification, f 11 | -------------------------------------------------------------------------------- /config/database.yml.template: -------------------------------------------------------------------------------- 1 | # SQLite version 3.x 2 | # gem install sqlite3-ruby (not necessary on OS X Leopard) 3 | development: 4 | adapter: sqlite3 5 | database: db/development.sqlite3 6 | pool: 5 7 | timeout: 5000 8 | 9 | # Warning: The database defined as "test" will be erased and 10 | # re-generated from your development database when you run "rake". 11 | # Do not set this db to the same as development or production. 12 | test: &test 13 | adapter: sqlite3 14 | database: db/test.sqlite3 15 | pool: 5 16 | timeout: 5000 17 | 18 | production: 19 | adapter: sqlite3 20 | database: db/production.sqlite3 21 | pool: 5 22 | timeout: 5000 23 | 24 | cucumber: 25 | <<: *test -------------------------------------------------------------------------------- /db/migrate/20110128102448_create_people.rb: -------------------------------------------------------------------------------- 1 | class CreatePeople < ActiveRecord::Migration 2 | def self.up 3 | create_table :people do |t| 4 | t.string :first_name, null: false 5 | t.string :last_name, null: false 6 | t.string :public_name 7 | t.string :email, null: false 8 | t.boolean :email_public 9 | t.string :gender 10 | t.string :avatar_file_name 11 | t.string :avatar_content_type 12 | t.integer :avatar_file_size 13 | t.datetime :avatar_updated_at 14 | t.text :abstract 15 | t.text :description 16 | 17 | t.timestamps 18 | end 19 | end 20 | 21 | def self.down 22 | drop_table :people 23 | end 24 | end 25 | -------------------------------------------------------------------------------- /app/views/events/_event_person_fields.html.erb: -------------------------------------------------------------------------------- 1 |
    2 | <%= f.inputs do %> 3 | <%= f.input :person, :collection => Person.order(:first_name, :last_name) %> 4 | <%= f.input :event_role, :as => :select, :collection => EventPerson::ROLES, :hint => " Coordinators are part of the conference team, they coordinate speaker attendance and events. Submitters answer the cfp to enter events into frab. Speakers take part in events, their availability matters. Moderators take part in panel discussions, their availability matters." %> 5 | <%= f.input :role_state, :as => :select, :collection => EventPerson::STATES %> 6 | <%= remove_association_link :event_person, f %> 7 | <% end %> 8 |
    9 | -------------------------------------------------------------------------------- /config/settings.yml.template: -------------------------------------------------------------------------------- 1 | development: 2 | # Host configuration used to generate links in emails 3 | host: localhost 4 | port: 3000 5 | protocol: http 6 | # Default 'From' address, used when sending emails 7 | from_email: frab@localhost 8 | 9 | test: 10 | host: frab.test 11 | protocol: http 12 | from_email: frab@frab.test 13 | 14 | production: 15 | # no need to specify port, when default (80) is used 16 | host: frab.example.com 17 | protocol: https 18 | from_email: noreply@frab.example.com 19 | # smtp server settings. see 20 | # http://api.rubyonrails.org/classes/ActionMailer/Base.html 21 | # for all available options 22 | smtp_settings: 23 | address: localhost 24 | 25 | -------------------------------------------------------------------------------- /app/helpers/recent_changes_helper.rb: -------------------------------------------------------------------------------- 1 | module RecentChangesHelper 2 | 3 | def associated_link_for(version) 4 | begin 5 | associated = version.associated_type.constantize.find(version.associated_id) 6 | if associated.is_a? Conference 7 | link_to associated.to_s, edit_conference_path 8 | else 9 | link_to associated.to_s, associated 10 | end 11 | rescue ActiveRecord::RecordNotFound 12 | "[deleted #{version.associated_type.constantize} with id=#{version.associated_id}]" 13 | end 14 | end 15 | 16 | def verb_for(event) 17 | case event 18 | when "destroy" 19 | "deleted" 20 | else 21 | "#{event}d" 22 | end 23 | end 24 | 25 | end 26 | -------------------------------------------------------------------------------- /lib/tasks/video_import.rake: -------------------------------------------------------------------------------- 1 | namespace :frab do 2 | 3 | task :default => :video_import 4 | 5 | desc "import video urls for a conference from an url" 6 | task :video_import => :environment do |t,args| 7 | unless ENV['url'] and ENV['acronym'] 8 | puts "Usage: rake frab:video_import acronym=frabcon11 url=\"http://example.org/podcast.xml\"" 9 | exit 10 | end 11 | 12 | conference = Conference.find_by_acronym(ENV['acronym']) 13 | if conference.nil? 14 | puts "Failed to find conference: #{ENV['acronym']}" 15 | exit 16 | end 17 | require "video_import.rb" 18 | importer = VideoImport.new(conference, ENV['url']) 19 | importer.import 20 | 21 | end 22 | 23 | end 24 | -------------------------------------------------------------------------------- /app/views/sessions/new.html.haml: -------------------------------------------------------------------------------- 1 | %section 2 | .page-header 3 | %h1 Sign in 4 | .row 5 | .span8 6 | = render "shared/flash", :flash => flash 7 | = semantic_form_for @user, :url => session_path do |f| 8 | = f.inputs do 9 | = f.input :email 10 | = f.input :password 11 | = f.input :remember_me, :as => :boolean 12 | = f.buttons do 13 | = f.commit_button "Sign in", :button_html => {:class => "btn primary"} 14 | - if @conference 15 | .span8 16 | %h2=t("cfp.forgot_password_headline") 17 | %p=t("cfp.forgot_password_description") 18 | = action_button "", t("cfp.forgot_password_button"), new_cfp_user_password_path 19 | 20 | -------------------------------------------------------------------------------- /lib/tasks/static_program_export.rake: -------------------------------------------------------------------------------- 1 | namespace :frab do 2 | 3 | desc "export program files to tmp/ directory. Optionally set CONFERENCE=acronym to specify which conference to export. Current conference will be exported, when parameter is not set." 4 | task :static_program_export => :environment do 5 | if ENV["CONFERENCE"] 6 | conference = Conference.find_by_acronym(ENV["CONFERENCE"]) 7 | else 8 | conference = Conference.current 9 | end 10 | if ENV["CONFERENCE_LOCALE"] 11 | locale = ENV["CONFERENCE_LOCALE"] 12 | else 13 | locale = nil 14 | end 15 | require "static_program_export" 16 | StaticProgramExport.new(conference, locale).run_export 17 | end 18 | 19 | end 20 | -------------------------------------------------------------------------------- /app/controllers/cfp/availabilities_controller.rb: -------------------------------------------------------------------------------- 1 | class Cfp::AvailabilitiesController < ApplicationController 2 | 3 | layout 'cfp' 4 | 5 | before_filter :authenticate_user! 6 | 7 | def new 8 | authorize! :create, current_user.person 9 | @availabilities = Availability.build_for(@conference) 10 | end 11 | 12 | def edit 13 | authorize! :edit, current_user.person 14 | @availabilities = current_user.person.availabilities_in(@conference) 15 | end 16 | 17 | def update 18 | authorize! :update, current_user.person 19 | current_user.person.update_attributes_from_slider_form(params[:person]) 20 | redirect_to cfp_root_path, notice: t("cfp.update_availability_notice") 21 | end 22 | 23 | end 24 | -------------------------------------------------------------------------------- /app/views/conferences/new.html.haml: -------------------------------------------------------------------------------- 1 | %section 2 | .page-header 3 | %h1= @first ? t(:create_your_first_conference) : t(:new_conference) 4 | - if @first 5 | .row 6 | .span16 7 | .blank-slate 8 | %p 9 | Welcome! It looks as if this is your first time here. 10 | To get started organizing a conference you need to first 11 | enter some data about it. You can change most of what 12 | you enter now later. But some things cannot be changed 13 | easily after you submit this form, so please read the 14 | hints for every form field carefully and double check 15 | what you enter. 16 | .row 17 | .span16 18 | = render "form" 19 | -------------------------------------------------------------------------------- /app/views/events/my.html.haml: -------------------------------------------------------------------------------- 1 | %section 2 | .page-header 3 | %h1 My events 4 | %ul.tabs 5 | %li= link_to "All Events", events_path 6 | %li.active= link_to "My Events", my_events_path 7 | %li= link_to "Event Ratings", ratings_events_path 8 | %li= link_to "Event Feedbacks", feedbacks_events_path 9 | - if params[:term].blank? and @events.all.empty? 10 | .row 11 | .span16 12 | .blank-slate 13 | %p 14 | You are not yet involved in any event in this 15 | conference. Add yourself to an event in whatever 16 | role you like and the event will appear in this 17 | list. 18 | - else 19 | = render 'shared/search_and_table', :collection => @events 20 | -------------------------------------------------------------------------------- /test/unit/notification_test.rb: -------------------------------------------------------------------------------- 1 | require 'test_helper' 2 | 3 | class NotificationTest < ActiveSupport::TestCase 4 | 5 | setup do 6 | @cfp = FactoryGirl.create(:call_for_papers) 7 | FactoryGirl.create(:notification, call_for_papers: @cfp, locale: "EN") 8 | FactoryGirl.create(:notification, call_for_papers: @cfp, locale: "DE") 9 | @cfp.reload 10 | end 11 | 12 | test "call for papers can have multiple notifications" do 13 | assert_equal @cfp.notifications.count, 2 14 | end 15 | 16 | test "cannot add same language twice" do 17 | notification = Notification.new(call_for_papers: @cfp, locale: "EN") 18 | notification.set_default_text "EN" 19 | assert !notification.valid? 20 | end 21 | 22 | end 23 | -------------------------------------------------------------------------------- /app/controllers/availabilities_controller.rb: -------------------------------------------------------------------------------- 1 | class AvailabilitiesController < ApplicationController 2 | 3 | before_filter :authenticate_user! 4 | before_filter :not_submitter! 5 | before_filter :find_person 6 | 7 | def new 8 | @availabilities = Availability.build_for(@conference) 9 | end 10 | 11 | def edit 12 | @availabilities = @person.availabilities_in(@conference) 13 | end 14 | 15 | def update 16 | @person.update_attributes_from_slider_form(params[:person]) 17 | redirect_to(person_url(@person), notice: 'Availibility was successfully updated.') 18 | end 19 | 20 | private 21 | 22 | def find_person 23 | @person = Person.find(params[:person_id]) 24 | authorize! :create, @person 25 | end 26 | 27 | end 28 | -------------------------------------------------------------------------------- /db/migrate/20110125184213_create_conferences.rb: -------------------------------------------------------------------------------- 1 | class CreateConferences < ActiveRecord::Migration 2 | def self.up 3 | create_table :conferences do |t| 4 | t.string :acronym, null: false 5 | t.string :title, null: false 6 | t.string :timezone, null: false, default: "Berlin" 7 | t.integer :timeslot_duration, null: false, default: 15 8 | t.integer :default_timeslots, null: false, default: 4 9 | t.integer :max_timeslots, null: false, default: 20 10 | t.date :first_day, null: false 11 | t.date :last_day, null: false 12 | t.boolean :feedback_enabled, null: false, default: false 13 | 14 | t.timestamps 15 | end 16 | end 17 | 18 | def self.down 19 | drop_table :conferences 20 | end 21 | end 22 | -------------------------------------------------------------------------------- /test/functional/public/feedback_controller_test.rb: -------------------------------------------------------------------------------- 1 | require 'test_helper' 2 | 3 | class Public::FeedbackControllerTest < ActionController::TestCase 4 | 5 | setup do 6 | @event = FactoryGirl.create(:event) 7 | @conference = @event.conference 8 | end 9 | 10 | test "feedback form gets displayed" do 11 | get :new, conference_acronym: @conference.acronym, event_id: @event.id, day: @conference.days.first 12 | assert_response :success 13 | assert_not_nil assigns(:event) 14 | assert_not_nil assigns(:feedback) 15 | end 16 | 17 | test "feedback gets created" do 18 | assert_difference 'EventFeedback.count' do 19 | post :create, conference_acronym: @conference.acronym, event_id: @event.id, event_feedback: {rating: 3} 20 | end 21 | end 22 | 23 | end 24 | -------------------------------------------------------------------------------- /app/views/layouts/team_signup.html.haml: -------------------------------------------------------------------------------- 1 | !!! 2 | %html 3 | %head 4 | %title 5 | frab - Conference Management 6 | = stylesheet_link_tag "application" 7 | = csrf_meta_tags 8 | %body 9 | .container 10 | .topbar 11 | .fill 12 | .container 13 | - if @conference 14 | = link_to @conference.title + " - Conference Management", new_cfp_session_path, :class => "brand" 15 | - else 16 | = link_to 'Conference Management', '#', :class => 'brand' 17 | %ul.nav.secondary-nav.pull-right 18 | - if current_user 19 | %li= link_to t("web-app-theme.logout", :default => "Logout"), cfp_session_path, :method => :delete 20 | .container 21 | .main-content 22 | = yield 23 | -------------------------------------------------------------------------------- /db/seeds.rb: -------------------------------------------------------------------------------- 1 | # This file should contain all the record creation needed to seed the database with its default values. 2 | # The data can then be loaded with the rake db:seed (or created alongside the db with db:setup). 3 | # 4 | # Examples: 5 | # 6 | # cities = City.create([{ name: 'Chicago' }, { name: 'Copenhagen' }]) 7 | # Mayor.create(name: 'Daley', city: cities.first) 8 | PaperTrail.enabled = false 9 | 10 | person = Person.create!( 11 | email: "admin@example.org", 12 | first_name: "admin", 13 | last_name: "admin", 14 | public_name: "admin_127" 15 | ) 16 | 17 | admin = User.new( 18 | email: person.email, 19 | password: "test123", 20 | password_confirmation: "test123" 21 | ) 22 | admin.person = person 23 | admin.role = "admin" 24 | admin.confirmed_at = Time.now 25 | admin.save! 26 | -------------------------------------------------------------------------------- /app/helpers/public/schedule_helper.rb: -------------------------------------------------------------------------------- 1 | module Public::ScheduleHelper 2 | 3 | require 'scanf' 4 | 5 | def each_timeslot(&block) 6 | each_minutes(@conference.timeslot_duration, &block) 7 | end 8 | 9 | def color_dark?(color) 10 | parts = color.scanf('%02x%02x%02x') 11 | logger.info(parts) 12 | return parts.sum < 384 if parts.length == 3 13 | 14 | parts = color.scanf('%01x%01x%01x') 15 | logger.info(parts) 16 | return parts.sum < 24 if parts.length == 3 17 | 18 | return false 19 | end 20 | 21 | def track_class(event) 22 | if event.track 23 | "track-#{event.track.name.parameterize}" 24 | else 25 | "track-default" 26 | end 27 | end 28 | 29 | def selected(regex) 30 | "selected" if request.path =~ regex 31 | end 32 | 33 | end 34 | -------------------------------------------------------------------------------- /app/views/layouts/signup.html.haml: -------------------------------------------------------------------------------- 1 | !!! 2 | %html 3 | %head 4 | %title 5 | = @conference.title 6 | \- Call for Papers 7 | = stylesheet_link_tag "application" 8 | = csrf_meta_tags 9 | %body 10 | .container 11 | .topbar 12 | .fill 13 | .container 14 | - if @conference 15 | = link_to @conference.title + " - Call for Papers", new_cfp_session_path, :class => "brand" 16 | - else 17 | = link_to 'Call for Papers', '#', :class => 'brand' 18 | %ul.nav.secondary-nav.pull-right 19 | - if current_user 20 | %li= link_to t("web-app-theme.logout", :default => "Logout"), cfp_session_path, :method => :delete 21 | .container 22 | .main-content 23 | = yield 24 | -------------------------------------------------------------------------------- /test/test_helper.rb: -------------------------------------------------------------------------------- 1 | ENV["RAILS_ENV"] = "test" 2 | require File.expand_path('../../config/environment', __FILE__) 3 | require 'rails/test_help' 4 | 5 | class ActiveSupport::TestCase 6 | include FactoryGirl::Syntax::Methods 7 | 8 | # Setup all fixtures in test/fixtures/*.(yml|csv) for all tests in alphabetical order. 9 | # 10 | # Note: You'll currently still have to declare fixtures explicitly in integration tests 11 | # -- they do not yet inherit this setting 12 | # fixtures :all 13 | 14 | # Add more helper methods to be used by all tests here... 15 | 16 | def login_as(role) 17 | user = FactoryGirl.create( 18 | :user, 19 | person: FactoryGirl.create(:person), 20 | role: role.to_s 21 | ) 22 | session[:user_id] = user.id 23 | user 24 | end 25 | 26 | end 27 | -------------------------------------------------------------------------------- /app/views/conferences/edit_days.html.haml: -------------------------------------------------------------------------------- 1 | %section 2 | .page-header 3 | %h1= t :edit_conference_days 4 | %ul.tabs 5 | %li= link_to t(:settings), edit_conference_path 6 | %li.active= link_to t(:days), edit_days_conference_path 7 | %li= link_to t(:tracks), edit_tracks_conference_path 8 | %li= link_to t(:rooms), edit_rooms_conference_path 9 | - if @conference.is_ticket_server_enabled? 10 | %li= link_to t(:ticket_server), edit_ticket_server_conference_path 11 | - if @conference.days.empty? 12 | .row 13 | .span16 14 | .blank-slate 15 | %p 16 | Here you can create and edit the conference days. 17 | Your 'days' can start an end anytime, but should not 18 | overlap. 19 | .row 20 | .span16 21 | = render 'form_days' 22 | -------------------------------------------------------------------------------- /public/422.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | The change you wanted was rejected (422) 5 | 17 | 18 | 19 | 20 | 21 |
    22 |

    The change you wanted was rejected.

    23 |

    Maybe you tried to change something you didn't have access to.

    24 |
    25 | 26 | 27 | -------------------------------------------------------------------------------- /lib/tasks/bulk_mailer.rake: -------------------------------------------------------------------------------- 1 | namespace :frab do 2 | 3 | task :default => :bulk_mailer 4 | 5 | desc "sends bulk mails. This action takes two arguments. A file name of a file containing one mail adresses per line and another file with mail content" 6 | task :bulk_mailer => :environment do |t,args| 7 | unless ENV['subject'] and ENV['from'] and ENV['emails'] and ENV['body'] 8 | puts "Usage: rake frab:bulk_mailer subject=\"subject\" from=mail@example.org emails=emails.lst body=body.text.erb" 9 | exit 10 | end 11 | 12 | if File.readable?(ENV['emails']) and File.readable?(ENV['body']) 13 | require "bulk_mailer.rb" 14 | BulkMailer.new(ENV['subject'], ENV['from'], ENV['emails'], ENV['body'], ENV['force']) 15 | else 16 | puts "Failed to open files." 17 | exit 18 | end 19 | 20 | end 21 | 22 | end 23 | -------------------------------------------------------------------------------- /public/404.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | The page you were looking for doesn't exist (404) 5 | 17 | 18 | 19 | 20 | 21 |
    22 |

    The page you were looking for doesn't exist.

    23 |

    You may have mistyped the address or the page may have moved.

    24 |
    25 | 26 | 27 | -------------------------------------------------------------------------------- /public/500.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | We're sorry, but something went wrong (500) 5 | 17 | 18 | 19 | 20 | 21 |
    22 |

    We're sorry, but something went wrong.

    23 |

    We've been notified about this issue and we'll take a look at it shortly.

    24 |
    25 | 26 | 27 | -------------------------------------------------------------------------------- /app/views/public/schedule/events.html.haml: -------------------------------------------------------------------------------- 1 | - no_tracks = @conference.tracks.empty? 2 | 3 | %h2.title= t '.events' 4 | 5 | %table.list 6 | %thead 7 | %tr 8 | %th   9 | %th= t '.title' 10 | - unless no_tracks 11 | %th= t '.track' 12 | %th= t '.speakers' 13 | %tbody 14 | - @events.each do |event| 15 | %tr 16 | %td= link_to image_box(event.logo, :small), public_event_path(:id => event.id) 17 | %td 18 | %b= link_to event.title, public_event_path(:id => event.id) 19 | %br/ 20 | = truncate(event.abstract, length: 80, separator: ' ') 21 | - unless no_tracks 22 | %td= event.track.try(:name) 23 | %td 24 | %ul 25 | - event.speakers.each do |speaker| 26 | %li= link_to speaker.full_public_name, public_speaker_path(:id => speaker.id) 27 | -------------------------------------------------------------------------------- /app/views/public/schedule/index.html.haml: -------------------------------------------------------------------------------- 1 | %h2= t '.schedule_index' 2 | 3 | %ul 4 | - @conference.days.each_with_index do |day, index| 5 | %li 6 | - if @conference.days.length > 1 7 | - label = t('.day', :index => index + 1, :label => l(day.date)) 8 | - else 9 | - label = t('.schedule', :label => l(day.date)) 10 | = link_to label, public_schedule_path(:day => index) 11 | (#{link_to "PDF", public_schedule_path(:day => index, :format => :pdf)}) 12 | %li= link_to t('.speakers'), public_speakers_path 13 | %li= link_to t('.events'), public_events_path 14 | %li= link_to "iCalendar", public_schedule_index_path(:format => :ics) 15 | %li= link_to "xCal", public_schedule_index_path(:format => :xcal) 16 | %li= link_to "XML", public_schedule_index_path(:format => :xml) 17 | %li= link_to "JSON", public_schedule_index_path(:format => :json) 18 | -------------------------------------------------------------------------------- /app/views/conferences/edit_rooms.html.haml: -------------------------------------------------------------------------------- 1 | %section 2 | .page-header 3 | %h1= t :edit_conference_rooms 4 | %ul.tabs 5 | %li= link_to t(:settings), edit_conference_path 6 | %li= link_to t(:days), edit_days_conference_path 7 | %li= link_to t(:tracks), edit_tracks_conference_path 8 | %li.active= link_to t(:rooms), edit_rooms_conference_path 9 | - if @conference.is_ticket_server_enabled? 10 | %li= link_to t(:ticket_server), edit_ticket_server_conference_path 11 | - if @conference.rooms.empty? 12 | .row 13 | .span16 14 | .blank-slate 15 | %p 16 | Here you can create and edit the rooms in which 17 | your events take place. Please enter at least one 18 | room. This is needed to determine the number of 19 | columns in your program schedule. 20 | .row 21 | .span16 22 | = render 'form_rooms' 23 | -------------------------------------------------------------------------------- /test/unit/day_test.rb: -------------------------------------------------------------------------------- 1 | require 'test_helper' 2 | 3 | class DayTest < ActiveSupport::TestCase 4 | test "day label matches format" do 5 | day = FactoryGirl.create(:day) 6 | 7 | assert_equal day.label, day.start_date.strftime("%Y-%m-%d") 8 | end 9 | 10 | test "end date not possible before start date" do 11 | day = FactoryGirl.create(:day) 12 | assert_equal true, day.valid? 13 | 14 | day.start_date = day.start_date.since(3.days) 15 | assert_equal false, day.valid? 16 | 17 | day = FactoryGirl.create(:day) 18 | day.end_date = day.end_date.ago(2.days) 19 | assert_equal false, day.valid? 20 | end 21 | 22 | test "day overlaps with other day" do 23 | conference = FactoryGirl.create(:three_day_conference) 24 | conference.days[1].start_date = conference.days[0].end_date.ago(2.hours) 25 | assert_equal false, conference.days[1].valid? 26 | end 27 | end 28 | -------------------------------------------------------------------------------- /config/initializers/will_paginate.rb: -------------------------------------------------------------------------------- 1 | module WillPaginate 2 | module ActionView 3 | def will_paginate(collection = nil, options = {}) 4 | options[:renderer] ||= BootstrapLinkRenderer 5 | super.try :html_safe 6 | end 7 | 8 | class BootstrapLinkRenderer < LinkRenderer 9 | protected 10 | 11 | def html_container(html) 12 | tag :div, tag(:ul, html), container_attributes 13 | end 14 | 15 | def page_number(page) 16 | tag :li, link(page, page, rel: rel_value(page)), class: ('active' if page == current_page) 17 | end 18 | 19 | def previous_or_next_page(page, text, classname) 20 | tag :li, link(text, page || '#'), class: [classname[0..3], classname, ('disabled' unless page)].join(' ') 21 | end 22 | 23 | def gap 24 | tag :li, link(super, '#'), class: 'disabled' 25 | end 26 | 27 | end 28 | end 29 | end 30 | -------------------------------------------------------------------------------- /app/assets/stylesheets/formtastic_changes.css: -------------------------------------------------------------------------------- 1 | /* ------------------------------------------------------------------------------------------------- 2 | 3 | Load this stylesheet after formtastic.css in your layouts to override the CSS to suit your needs. 4 | This will allow you to update formtastic.css with new releases without clobbering your own changes. 5 | 6 | For example, to make the inline hint paragraphs a little darker in color than the standard #666: 7 | 8 | form.formtastic fieldset > ol > li p.inline-hints { color:#333; } 9 | 10 | HINT: 11 | The following style may be *conditionally* included for improved support on older versions of IE(<8) 12 | form.formtastic fieldset ol li fieldset legend { margin-left: -6px;} 13 | 14 | --------------------------------------------------------------------------------------------------*/ 15 | 16 | form.formtastic div.nested-fields fieldset hr{ 17 | margin-left: 150px; 18 | } 19 | -------------------------------------------------------------------------------- /app/controllers/cfp/confirmations_controller.rb: -------------------------------------------------------------------------------- 1 | class Cfp::ConfirmationsController < ApplicationController 2 | 3 | layout "signup" 4 | 5 | def new 6 | @user = User.new 7 | end 8 | 9 | def create 10 | @user = User.find_by_email(params[:user][:email]) 11 | if @user and @user.send_confirmation_instructions 12 | redirect_to new_cfp_session_path, notice: t(:"cfp.confirmation_instructions_sent") 13 | else 14 | redirect_to new_cfp_user_confirmation_path, flash: {error: t(:"cfp.error_sending_confirmation_instructions")} 15 | end 16 | end 17 | 18 | def show 19 | @user = User.confirm_by_token(params[:confirmation_token]) 20 | 21 | if @user 22 | login_as @user 23 | redirect_to cfp_person_path, notice: t("cfp.successfully_confirmed") 24 | else 25 | redirect_to new_cfp_user_confirmation_path, error: t("cfp.error_confirming") 26 | end 27 | end 28 | 29 | end 30 | -------------------------------------------------------------------------------- /app/controllers/cfp/users_controller.rb: -------------------------------------------------------------------------------- 1 | class Cfp::UsersController < ApplicationController 2 | 3 | layout 'signup' 4 | 5 | before_filter :authenticate_user!, only: [:edit, :update] 6 | 7 | def new 8 | @user = User.new 9 | end 10 | 11 | def create 12 | @user = User.new(params[:user]) 13 | @user.call_for_papers = @conference.call_for_papers 14 | @user.person = Person.new(email: @user.email, public_name: @user.email) 15 | 16 | if @user.save 17 | redirect_to new_cfp_session_path, notice: t(:"cfp.signed_up") 18 | else 19 | render action: "new" 20 | end 21 | end 22 | 23 | def edit 24 | @user = current_user 25 | render layout: "cfp" 26 | end 27 | 28 | def update 29 | @user = current_user 30 | if @user.save 31 | redirect_to cfp_person_path, notice: t(:"cfp.updated") 32 | else 33 | render action: "new" 34 | end 35 | end 36 | 37 | end 38 | -------------------------------------------------------------------------------- /db/migrate/20110128105450_create_events.rb: -------------------------------------------------------------------------------- 1 | class CreateEvents < ActiveRecord::Migration 2 | def self.up 3 | create_table :events do |t| 4 | t.integer :conference_id, null: false 5 | t.string :title, null: false 6 | t.string :subtitle 7 | t.string :event_type, default: "talk" 8 | t.integer :time_slots 9 | t.string :state, null: false, default: "undecided" 10 | t.string :progress, null: false, default: "new" 11 | t.string :language 12 | t.datetime :start_time 13 | t.text :abstract 14 | t.text :description 15 | t.boolean :public, default: true 16 | t.string :logo_file_name 17 | t.string :logo_content_type 18 | t.integer :logo_file_size 19 | t.datetime :logo_updated_at 20 | t.integer :track_id 21 | t.integer :room_id 22 | 23 | t.timestamps 24 | end 25 | end 26 | 27 | def self.down 28 | drop_table :events 29 | end 30 | end 31 | -------------------------------------------------------------------------------- /db/migrate/20120425121612_change__conference_day_start_type.rb: -------------------------------------------------------------------------------- 1 | class ChangeConferenceDayStartType < ActiveRecord::Migration 2 | def up 3 | starts = Array.new 4 | ends = Array.new 5 | Conference.all.each do |conference| 6 | starts << Time.at(conference.day_start).hour 7 | ends << Time.at(conference.day_end).hour 8 | end 9 | change_column :conferences, :day_start, :integer, default: "8", null: false 10 | change_column :conferences, :day_end, :integer, default: "20", null: false 11 | # do conversion 12 | Conference.all.each_with_index do |conference,i| 13 | conference.update_attribute :day_start, starts[i] 14 | conference.update_attribute :day_end, ends[i] 15 | end 16 | end 17 | 18 | def down 19 | change_column :conferences, :day_start, :time, default: '2000-01-01 08:00:00', null: false 20 | change_column :conferences, :day_end, :time, default: '2000-01-01 20:00:00', null: false 21 | end 22 | end 23 | -------------------------------------------------------------------------------- /app/views/shared/_availabilities_slider.html.haml: -------------------------------------------------------------------------------- 1 | - day_id = "day_" + day.id.to_s 2 | %span{ :id => day_id } 3 | %h3 4 | from 5 | %span.start_date 6 | = l day.start_date, :format => :pretty_datetime 7 | to 8 | %span.end_date 9 | = l day.end_date, :format => :pretty_datetime 10 | 11 | = f.semantic_fields_for :availabilities, availability do |af| 12 | = af.input :start_date, :as => :hidden 13 | = af.input :end_date, :as => :hidden 14 | = af.input :conference_id, :as => :hidden 15 | = af.input :day_id, :as => :hidden 16 | %span 17 | .time_range_slider{"data-min" => day.start_date.to_i, 18 | "data-max" => day.end_date.to_i, 19 | "data-from" => availability.start_date.to_i, 20 | "data-to" => availability.end_date.to_i} 21 | %span 22 | = check_box_tag "available for day #{day.label}", '1', false, :class => 'cbx' 23 | available 24 | 25 | -------------------------------------------------------------------------------- /app/views/shared/_people_tabs.html.haml: -------------------------------------------------------------------------------- 1 | %ul.tabs 2 | %li{class: active_class?(person_path(@person), edit_person_path(@person))}= link_to "Profile", @person 3 | - if can? :manage, @person.user or can? :manage, User 4 | - if @person.user.nil? 5 | %li{class: active_class?(new_person_user_path(@person))}= link_to "User account", new_person_user_path(@person) 6 | - else 7 | %li{class: active_class?(person_user_path(@person), edit_person_user_path(@person))}= link_to "User account", person_user_path(@person) 8 | - if @person.availabilities_in(@conference).count == 0 9 | %li{class: active_class?(new_person_availability_path(@person))}= link_to "Availability", new_person_availability_path(@person) 10 | - else 11 | %li{class: active_class?(edit_person_availability_path(@person))}= link_to "Availability", edit_person_availability_path(@person) 12 | %li{class: active_class?(feedbacks_people_path)}= link_to "Feedback", feedbacks_people_path(:id => @person.id) 13 | -------------------------------------------------------------------------------- /db/migrate/20110914152636_rename_association_to_associated.rb: -------------------------------------------------------------------------------- 1 | class RenameAssociationToAssociated < ActiveRecord::Migration 2 | def self.up 3 | if index_exists? :audits, [:association_id, :association_type], name: 'association_index' 4 | remove_index :audits, name: 'association_index' 5 | end 6 | 7 | rename_column :audits, :association_id, :associated_id 8 | rename_column :audits, :association_type, :associated_type 9 | 10 | add_index :audits, [:associated_id, :associated_type], name: 'associated_index' 11 | end 12 | 13 | def self.down 14 | if index_exists? :audits, [:associated_id, :associated_type], name: 'associated_index' 15 | remove_index :audits, name: 'associated_index' 16 | end 17 | 18 | rename_column :audits, :associated_type, :association_type 19 | rename_column :audits, :associated_id, :association_id 20 | 21 | add_index :audits, [:association_id, :association_type], name: 'association_index' 22 | end 23 | end 24 | -------------------------------------------------------------------------------- /app/helpers/events_helper.rb: -------------------------------------------------------------------------------- 1 | module EventsHelper 2 | 3 | def fix_http_proto(url) 4 | if url.start_with?('https') or url.start_with?('http') or url.start_with?('ftp') 5 | url 6 | else 7 | "http://#{url}" 8 | end 9 | end 10 | 11 | def timeslots 12 | slots = Array.new 13 | (@conference.max_timeslots+1).times do |i| 14 | slots << [format_time_slots(i), i] 15 | end 16 | slots 17 | end 18 | 19 | def start_times 20 | times = Array.new 21 | @conference.days.each { |day| 22 | time = day.start_date 23 | while time <= day.end_date 24 | times << [time.strftime("%Y-%m-%d %H:%M"), time] 25 | time = time.since(@conference.timeslot_duration.minutes) 26 | end 27 | } 28 | times 29 | end 30 | 31 | def format_time_slots(number_of_time_slots) 32 | duration_in_minutes = number_of_time_slots * @conference.timeslot_duration 33 | duration_to_time(duration_in_minutes) 34 | end 35 | 36 | end 37 | -------------------------------------------------------------------------------- /app/views/layouts/cfp.html.haml: -------------------------------------------------------------------------------- 1 | !!! 2 | %html 3 | %head 4 | %title 5 | = @conference.title 6 | \- Call for Papers 7 | = stylesheet_link_tag "application" 8 | = javascript_include_tag "application", "admin" 9 | = csrf_meta_tags 10 | %body 11 | .container 12 | .topbar 13 | .fill 14 | .container 15 | - if @conference.call_for_papers.nil? 16 | = link_to @conference.title + " - Call for Papers", new_cfp_session_path, :class => "brand" 17 | - else 18 | = link_to @conference.title + " - Call for Papers", cfp_root_path, :class => "brand" 19 | %ul.nav.secondary-nav.pull-right 20 | - if current_user 21 | %li= link_to t("web-app-theme.logout", :default => "Logout"), cfp_session_path, :method => :delete 22 | .container 23 | .main-content 24 | = render 'shared/flash', :flash => flash 25 | = yield 26 | %footer 27 | .container/ 28 | -------------------------------------------------------------------------------- /test/unit/conference_test.rb: -------------------------------------------------------------------------------- 1 | require 'test_helper' 2 | 3 | class ConferenceTest < ActiveSupport::TestCase 4 | 5 | test "current returns the newest conference" do 6 | conferences = FactoryGirl.create_list(:conference, 3) 7 | assert_equal conferences.last.id, Conference.current.id 8 | end 9 | 10 | test "returns correct language codes" do 11 | conference = FactoryGirl.create(:conference) 12 | conference.languages << FactoryGirl.create(:english_language) 13 | conference.languages << FactoryGirl.create(:german_language) 14 | assert_equal 2, conference.language_codes.size 15 | assert conference.language_codes.include? "en" 16 | assert conference.language_codes.include? "de" 17 | end 18 | 19 | test "returns the correct days" do 20 | conference = FactoryGirl.create(:three_day_conference) 21 | assert_equal 3, conference.days.size 22 | assert_equal Date.today.since(3.days).since(10.hours), conference.days.last.start_date 23 | end 24 | 25 | end 26 | -------------------------------------------------------------------------------- /app/views/public/schedule/speaker.html.haml: -------------------------------------------------------------------------------- 1 | %h2.title #{t '.speaker'}: #{@speaker.full_public_name} 2 | 3 | .column.left#basic 4 | = image_box(@speaker.avatar, :large) 5 | = simple_format @speaker.abstract, :class => "abstract" 6 | = simple_format @speaker.description, :class => "description" 7 | 8 | .column.left#details 9 | - if @speaker.email_public? 10 | %h3= t '.contact' 11 | %p 12 | %b #{t '.email'}: 13 | = mail_to @speaker.email, nil, :replace_at => "(at)", :replace_dot => "(dot)", :encode => :javascript 14 | - if @speaker.links.any? 15 | %h3= t '.links' 16 | %ul 17 | - @speaker.links.each do |link| 18 | %li= link_to link.title, link.url 19 | 20 | .column.right#sidebar 21 | %h3= t '.events_in_this_conference' 22 | %table.list 23 | %tbody 24 | - @speaker.public_and_accepted_events_as_speaker_in(@conference).each do |event| 25 | %tr 26 | %td= image_box event.logo, :small 27 | %td= link_to event.title, public_event_path(:id => event.id) 28 | -------------------------------------------------------------------------------- /app/views/schedule/new_pdf.html.haml: -------------------------------------------------------------------------------- 1 | %section 2 | .page-header 3 | %h1 Create a custom PDF export 4 | .row 5 | .span16 6 | = form_tag schedule_custom_pdf_path do 7 | .clearfix 8 | = label_tag "page_size", "Select paper format:" 9 | .input 10 | = select_tag "page_size", options_for_select(Prawn::Document::PageGeometry::SIZES.keys.sort) 11 | .clearfix 12 | = label_tag "date_id", "Select day:" 13 | .input 14 | = select_tag "date_id", options_from_collection_for_select(@conference.days, "id", "label") 15 | .clearfix 16 | = label_tag "room_ids[]", "Select rooms:" 17 | .input 18 | %ul.inputs-list 19 | - @conference.rooms.each do |room| 20 | %li 21 | %label 22 | = check_box_tag "room_ids[]", room.id 23 | .span= room.name 24 | .actions 25 | = submit_tag "Create PDF", :class => "btn primary" 26 | .clear 27 | -------------------------------------------------------------------------------- /app/views/call_for_papers/show.html.haml: -------------------------------------------------------------------------------- 1 | %section 2 | .page-header 3 | .pull-right 4 | - if can? :manage, CallForPapers 5 | = action_button "primary", "Edit", edit_call_for_papers_path, :hint => "Edit this call for paper's data." 6 | %h1 Call for Papers 7 | .row 8 | .span16 9 | %p 10 | The interface for submitters is available at: 11 | = new_cfp_session_url 12 | .row 13 | .span16 14 | #submission_graph{:style => "width: 800px; height: 300px;"} 15 | 16 | .row 17 | .span16 18 | #submission_graph-sum_to_submission_time{:style => "width: 800px; height: 300px;"} 19 | 20 | :javascript 21 | var data = #{@conference.submission_data.inspect}; 22 | 23 | $.plot($("#submission_graph"), [data], { xaxis: { mode: "time" } }); 24 | $.plot($("#submission_graph-sum_to_submission_time"), [data.reduce(function (a,b) { 25 | 26 | return a.concat([[ 27 | b[0], 28 | b[1]+a[a.length-1][1] 29 | ]]) 30 | }, [[0,0]]).slice(1)], { xaxis: { mode: "time" } }); 31 | -------------------------------------------------------------------------------- /app/views/reports/show.html.haml: -------------------------------------------------------------------------------- 1 | %section 2 | .page-header 3 | %h1 Available Reports 4 | = render 'report_menu' 5 | %h2 Results 6 | = render 'shared/simple_search', :path => request.path 7 | Found 8 | = @search_count 9 | results. 10 | - if not @people.nil? and not @people.empty? 11 | .row 12 | .span16 13 | - if @people.all.empty? 14 | %p Sorry, but your search yielded no results. 15 | - else 16 | = render 'people_table', :people => @people 17 | = actions_bar do 18 | = will_paginate @people 19 | - if not @events.nil? and not @events.empty? 20 | .row 21 | .span16 22 | - if @events.all.empty? 23 | %p Sorry, but your search yielded no results. 24 | - else 25 | = render 'events_table', :events => @events 26 | = actions_bar do 27 | = will_paginate @events 28 | - if not @data.nil? and not @data.empty? 29 | .row 30 | .span16 31 | = render 'statistics_table', :data => @data 32 | -------------------------------------------------------------------------------- /app/views/call_for_papers/_form.html.haml: -------------------------------------------------------------------------------- 1 | = semantic_form_for @call_for_papers, :url => call_for_papers_path do |f| 2 | = f.inputs do 3 | = f.input :start_date, :hint => "Pick a date when your CfP should be open for the public." 4 | = f.input :end_date, :hint => "Pick a deadline for paper submission. This deadline will be displayed to the users but not otherwise enforced." 5 | = f.input :hard_deadline, :hint => "Pick a hard deadline. No paper submission will be possible after this date. Leave empty if you want to allow submissions indefinitely." 6 | = f.input :welcome_text, :hint => "Enter a welcome message or additional instructions you want to display to participants." 7 | = f.input :info_url, :hint => "A web page that contains additional information about the Call for Papers. Please enter a full URL including 'http://'" 8 | = f.input :contact_email, :hint => "An email address where participants can contact you in case they have any questions." 9 | = f.buttons do 10 | = f.commit_button :button_html => {:class => "btn primary"} 11 | -------------------------------------------------------------------------------- /app/controllers/statistics_controller.rb: -------------------------------------------------------------------------------- 1 | class StatisticsController < ApplicationController 2 | 3 | before_filter :authenticate_user! 4 | before_filter :not_submitter! 5 | 6 | def events_by_state 7 | authorize! :read, @conference 8 | case params[:type] 9 | when "lectures" 10 | result = @conference.events_by_state_and_type(:lecture) 11 | when "workshops" 12 | result = @conference.events_by_state_and_type(:workshop) 13 | when "others" 14 | remaining = Event::TYPES - [:workshop,:lecture] 15 | result = @conference.events_by_state_and_type(remaining) 16 | else 17 | result = @conference.events_by_state 18 | end 19 | 20 | respond_to do |format| 21 | format.json { render json: result.to_json } 22 | end 23 | end 24 | 25 | def language_breakdown 26 | authorize! :read, @conference 27 | result = @conference.language_breakdown(params[:accepted_only]) 28 | 29 | respond_to do |format| 30 | format.json { render json: result.to_json } 31 | end 32 | end 33 | 34 | end 35 | -------------------------------------------------------------------------------- /db/migrate/20120920213816_remove_products.rb: -------------------------------------------------------------------------------- 1 | class RemoveProducts < ActiveRecord::Migration 2 | def up 3 | drop_table :ordered_products 4 | drop_table :product_types 5 | end 6 | 7 | def down 8 | create_table "ordered_products", :force => true do |t| 9 | t.integer "attendee_id" 10 | t.integer "product_type_id" 11 | t.integer "amount" 12 | t.datetime "created_at" 13 | t.datetime "updated_at" 14 | end 15 | 16 | create_table "product_types", :force => true do |t| 17 | t.string "type" 18 | t.integer "attendee_registration_id" 19 | t.string "name" 20 | t.decimal "price", :precision => 7, :scale => 2 21 | t.decimal "vat", :precision => 4, :scale => 2 22 | t.integer "includes_vat" 23 | t.date "available_until" 24 | t.integer "amount_available" 25 | t.integer "needs_invoice_address" 26 | t.datetime "created_at" 27 | t.datetime "updated_at" 28 | t.string "currency" 29 | end 30 | end 31 | end 32 | -------------------------------------------------------------------------------- /db/migrate/20110513235042_create_products.rb: -------------------------------------------------------------------------------- 1 | class CreateProducts < ActiveRecord::Migration 2 | 3 | def up 4 | create_table "ordered_products", :force => true do |t| 5 | t.integer "attendee_id" 6 | t.integer "product_type_id" 7 | t.integer "amount" 8 | t.datetime "created_at" 9 | t.datetime "updated_at" 10 | end 11 | 12 | create_table "product_types", :force => true do |t| 13 | t.string "type" 14 | t.integer "attendee_registration_id" 15 | t.string "name" 16 | t.decimal "price", :precision => 7, :scale => 2 17 | t.decimal "vat", :precision => 4, :scale => 2 18 | t.integer "includes_vat" 19 | t.date "available_until" 20 | t.integer "amount_available" 21 | t.integer "needs_invoice_address" 22 | t.datetime "created_at" 23 | t.datetime "updated_at" 24 | t.string "currency" 25 | end 26 | end 27 | 28 | def down 29 | drop_table :ordered_products 30 | drop_table :product_types 31 | end 32 | 33 | end 34 | -------------------------------------------------------------------------------- /app/helpers/schedule_helper.rb: -------------------------------------------------------------------------------- 1 | module ScheduleHelper 2 | 3 | def day_active?(index) 4 | "active" if params[:day].to_i == index 5 | end 6 | 7 | def landscape? 8 | @rooms.size > 3 9 | end 10 | 11 | # for pdf 12 | def number_of_timeslots 13 | timeslots_between(@day.start_date, @day.end_date) 14 | end 15 | 16 | # for pdf: event boxes in public schedule 17 | def event_coordinates(room_index, event, column_width, row_height, offset = 0) 18 | x = 1.5.cm - 1 + room_index * column_width 19 | y = (timeslots_between(event.start_time, @day.end_date) - 1) * row_height 20 | y += offset 21 | [x, y] 22 | end 23 | 24 | def each_minutes(minutes, &block) 25 | time = @day.start_date 26 | while time < @day.end_date 27 | yield time 28 | time = time.since(minutes.minutes) 29 | end 30 | end 31 | 32 | def each_15_minutes(&block) 33 | each_minutes(15, &block) 34 | end 35 | 36 | def timeslots_between(start_date, end_date) 37 | ((end_date - start_date) / 60 / @conference.timeslot_duration).to_i + 1 38 | end 39 | 40 | end 41 | -------------------------------------------------------------------------------- /db/migrate/20110315180937_install_acts_as_audited.rb: -------------------------------------------------------------------------------- 1 | class InstallActsAsAudited < ActiveRecord::Migration 2 | def self.up 3 | create_table :audits, force: true do |t| 4 | t.column :auditable_id, :integer 5 | t.column :auditable_type, :string 6 | t.column :association_id, :integer 7 | t.column :association_type, :string 8 | t.column :user_id, :integer 9 | t.column :user_type, :string 10 | t.column :username, :string 11 | t.column :action, :string 12 | t.column :audited_changes, :text 13 | t.column :version, :integer, default: 0 14 | t.column :comment, :string 15 | t.column :remote_address, :string 16 | t.column :created_at, :datetime 17 | end 18 | 19 | add_index :audits, [:auditable_id, :auditable_type], name: 'auditable_index' 20 | add_index :audits, [:association_id, :association_type], name: 'association_index' 21 | add_index :audits, [:user_id, :user_type], name: 'user_index' 22 | add_index :audits, :created_at 23 | end 24 | 25 | def self.down 26 | drop_table :audits 27 | end 28 | end 29 | -------------------------------------------------------------------------------- /app/views/people/_table.html.haml: -------------------------------------------------------------------------------- 1 | %table.zebra-striped 2 | %thead 3 | %tr 4 | %th.first 5 | - if @search 6 | %th= sort_link @search, :first_name, :term => params[:term] 7 | %th= sort_link @search, :last_name, :term => params[:term] 8 | %th= sort_link @search, :public_name, :term => params[:term] 9 | %th= sort_link @search, :email, :term => params[:term] 10 | %th 11 | - else 12 | %th First name 13 | %th Last name 14 | %th Public name 15 | %th Email 16 | %th.last 17 | %tbody 18 | - collection.each do |person| 19 | %tr 20 | %td= image_box person.avatar, :small 21 | %td= person.first_name 22 | %td= person.last_name 23 | %td= person.public_name 24 | %td= person.email 25 | %td.buttons 26 | = action_button "small", 'Show', person 27 | - if can? :manage, person 28 | = action_button "small", 'Edit', edit_person_path(person) 29 | = action_button "small danger", 'Destroy', person, :confirm => 'Are you sure?', :method => :delete 30 | -------------------------------------------------------------------------------- /test/unit/user_test.rb: -------------------------------------------------------------------------------- 1 | require 'test_helper' 2 | 3 | class UserTest < ActiveSupport::TestCase 4 | 5 | test "logins can be recorded" do 6 | user = FactoryGirl.create(:user) 7 | assert_equal 0, user.sign_in_count 8 | assert_nil user.last_sign_in_at 9 | user.record_login! 10 | user.reload 11 | assert_equal 1, user.sign_in_count 12 | assert_not_nil user.last_sign_in_at 13 | end 14 | 15 | test "create admin user" do 16 | user = FactoryGirl.create(:admin_user) 17 | assert_equal "admin", user.role 18 | end 19 | 20 | test "create orga user" do 21 | user = FactoryGirl.create(:orga_user) 22 | assert_equal "orga", user.role 23 | end 24 | 25 | test "create coordinator user" do 26 | user = FactoryGirl.create(:coordinator_user) 27 | assert_equal "coordinator", user.role 28 | end 29 | 30 | test "create reviewer user" do 31 | user = FactoryGirl.create(:reviewer_user) 32 | assert_equal "reviewer", user.role 33 | end 34 | 35 | test "create submitter user" do 36 | user = FactoryGirl.create(:user) 37 | assert_equal "submitter", user.role 38 | end 39 | end 40 | -------------------------------------------------------------------------------- /app/views/cfp/events/_form.html.haml: -------------------------------------------------------------------------------- 1 | = semantic_form_for([:cfp, @event], :html => {:multipart => true}) do |f| 2 | = f.inputs :name => t("cfp.basic_information") do 3 | = f.input :title 4 | = f.input :subtitle 5 | = f.input :event_type, :collection => translated_options(Event::TYPES) 6 | = f.input :track, :collection => @conference.tracks 7 | = f.input :time_slots, :as => :select, :collection => timeslots, :hint => t("cfp.event_time_slots_hint") 8 | = f.input :language, :as => :language, :only => @conference.language_codes, :include_blank => "" 9 | = f.input :logo 10 | = f.inputs :name => t("cfp.detailed_description") do 11 | = f.input :abstract, :input_html => {:rows => 4}, :hint => t("cfp.event_abstract_hint") 12 | = f.input :description, :hint => t("cfp.event_description_hint") 13 | = f.input :submission_note, :hint => "visible for admins and users, contains additional information." 14 | = dynamic_association :links, t("cfp.links"), f 15 | = dynamic_association :event_attachments, t("cfp.uploaded_files"), f 16 | = f.buttons do 17 | = f.commit_button :button_html => {:class => "btn primary"} 18 | -------------------------------------------------------------------------------- /app/views/people/_feedback_table.html.haml: -------------------------------------------------------------------------------- 1 | %table.zebra-stripe 2 | %thead 3 | %tr 4 | %th.first 5 | %th Title 6 | %th Track 7 | %th Event type 8 | %th Created at 9 | %th.last Average Feedback 10 | %tbody 11 | - collection.each do |event| 12 | %tr 13 | %td= link_to (image_box event.logo, :small), event 14 | %td 15 | = link_to event.title, event 16 | %p.small 17 | = by_speakers(event) 18 | %td= event.track.try(:name) 19 | %td= event.event_type 20 | %td= l(event.created_at.to_date) 21 | %td 22 | = number_with_precision event.average_feedback, :precision => 2 23 | - if event.event_feedbacks_count 24 | %br 25 | sN-1 = #{event.feedback_standard_deviation} n = #{event.event_feedbacks_count} 26 | - event.event_feedbacks.each do |feedback| 27 | - next if feedback.comment.blank? 28 | %tr 29 | %td 30 | .rating{:id => "event_rating_#{feedback.id}", :"data-rating" => feedback.rating} 31 | %td{:colspan=>5}= feedback.comment 32 | 33 | -------------------------------------------------------------------------------- /chef/cookbooks/frab/recipes/default.rb: -------------------------------------------------------------------------------- 1 | case node[:platform] 2 | when "debian", "ubuntu" 3 | 4 | frab_folder = '/srv/frab' 5 | 6 | package "imagemagick" 7 | package "libsqlite3-dev" 8 | package "libmysqlclient-dev" 9 | package "libpq-dev" 10 | package "libxml2-dev" 11 | package "libxslt-dev" 12 | package "nodejs" 13 | package "git" 14 | package "ruby1.9.1-dev" 15 | 16 | execute "gem-bundler" do 17 | command "gem install bundler" 18 | action :run 19 | end 20 | 21 | execute "bundle-install" do 22 | command "bundle install" 23 | cwd frab_folder 24 | action :run 25 | end 26 | 27 | execute "db-config" do 28 | command "cp config/database.yml.template config/database.yml" 29 | cwd frab_folder 30 | creates 'config/database.yml' 31 | action :run 32 | end 33 | 34 | execute "frab-config" do 35 | command "cp config/settings.yml.template config/settings.yml" 36 | cwd frab_folder 37 | creates 'config/settings.yml' 38 | action :run 39 | end 40 | 41 | execute "db-setup" do 42 | command "rake db:setup" 43 | cwd frab_folder 44 | action :run 45 | end 46 | 47 | end 48 | -------------------------------------------------------------------------------- /app/views/cfp/welcome/not_existing.html.haml: -------------------------------------------------------------------------------- 1 | %section 2 | .page-header 3 | %h1 Welcome 4 | .row 5 | .span16 6 | .row 7 | .span16 8 | .flash 9 | %div{:class => "alert-message error fade in", "data-alert" => "alert"} 10 | %p 11 | Thank you for your interest in participating in #{@conference.title}. 12 | %p 13 | Unfortunately, the Call for Papers does not (yet?) exist. 14 | .row 15 | .span16 16 | = render "shared/flash", :flash => flash 17 | .row 18 | .span8 19 | .span8 20 | %h2=t("cfp.sign_up_headline") 21 | %p=t("cfp.sign_up_description", :title => @conference.title) 22 | %p= action_button "", t("cfp.sign_up"), new_cfp_user_path 23 | .row 24 | .span8 25 | %h2=t("cfp.forgot_password_headline") 26 | %p=t("cfp.forgot_password_description") 27 | = action_button "", t("cfp.forgot_password_button"), new_cfp_user_password_path 28 | .span8 29 | %h2=t("cfp.confirmation_headline") 30 | %p=t("cfp.confirmation_description") 31 | = action_button "", t("cfp.confirmation_button"), new_cfp_user_confirmation_path 32 | -------------------------------------------------------------------------------- /app/views/cfp/people/_form.html.haml: -------------------------------------------------------------------------------- 1 | = semantic_form_for(@person, :url => cfp_person_path, :html => {:multipart => true}) do |f| 2 | = f.inputs :name => "Basic" do 3 | = f.input :first_name 4 | = f.input :last_name 5 | = f.input :public_name, :hint => t("cfp.public_name_hint") 6 | = f.input :gender, :collection => translated_options(Person::GENDERS) 7 | = f.input :avatar, :hint => t("cfp.avatar_hint") 8 | = dynamic_association :languages, t("cfp.languages_spoken"), f 9 | = f.inputs :name => t("cfp.contact_data") do 10 | = f.input :email, :hint => t("cfp.email_hint") 11 | = f.input :email_public, :as => :boolean, :hint => t("cfp.email_public_hint") 12 | = dynamic_association :phone_numbers, t("cfp.phone_numbers"), f 13 | = dynamic_association :im_accounts, t("cfp.im_accounts"), f 14 | = f.inputs :name => t("cfp.bio") do 15 | = f.input :abstract, :input_html => {:rows => 4}, :hint => t("cfp.abstract_hint") 16 | = f.input :description, :hint => t("cfp.description_hint") 17 | = dynamic_association :links, t("cfp.links"), f 18 | = f.buttons do 19 | = f.commit_button :button_html => {:class => "btn primary"} 20 | -------------------------------------------------------------------------------- /test/functional/public/schedule_controller_test.rb: -------------------------------------------------------------------------------- 1 | require 'test_helper' 2 | 3 | class Public::ScheduleControllerTest < ActionController::TestCase 4 | 5 | setup do 6 | @conference = FactoryGirl.create(:three_day_conference) 7 | 10.times do 8 | FactoryGirl.create(:event, conference: @conference, state: "confirmed") 9 | end 10 | end 11 | 12 | test "displays schedule main page" do 13 | get :index, conference_acronym: @conference.acronym 14 | assert_response :success 15 | end 16 | 17 | test "displays xml schedule" do 18 | get :index, format: :xml, conference_acronym: @conference.acronym 19 | assert_response :success 20 | end 21 | 22 | test "displays json schedule" do 23 | get :index, format: :json, conference_acronym: @conference.acronym 24 | assert_response :success 25 | end 26 | 27 | test "displays ical schedule" do 28 | get :index, format: :ics, conference_acronym: @conference.acronym 29 | assert_response :success 30 | end 31 | 32 | test "displays xcal schedule" do 33 | get :index, format: :xcal, conference_acronym: @conference.acronym 34 | assert_response :success 35 | end 36 | 37 | end 38 | -------------------------------------------------------------------------------- /lib/tasks/frab_import_export.rake: -------------------------------------------------------------------------------- 1 | namespace :frab do 2 | 3 | task :default => :conference_export 4 | 5 | desc "export a frab conference. Optionally set CONFERENCE=acronym to specify which conference to export. Current conference will be exported, when paramter is not set. The conference data is written to tmp/frab_export" 6 | task :conference_export => :environment do 7 | if ENV["CONFERENCE"] 8 | conference = Conference.find_by_acronym(ENV["CONFERENCE"]) 9 | else 10 | conference = Conference.current 11 | end 12 | require "import_export_helper.rb" 13 | ImportExportHelper.new(conference).run_export 14 | end 15 | 16 | desc "import a frab conference. The import will merge the conference with existing data. If the conference already exists, the import won't run. Optionally set FRAB_EXPORT=directory to specify from where to load the exported files." 17 | task :conference_import => :environment do 18 | if ENV["FRAB_EXPORT"] 19 | export_path = ENV["FRAB_EXPORT"] 20 | else 21 | export_path = "tmp/frab_export" 22 | end 23 | require "import_export_helper.rb" 24 | ImportExportHelper.new.run_import(export_path) 25 | end 26 | 27 | end 28 | -------------------------------------------------------------------------------- /app/views/conferences/_table.html.haml: -------------------------------------------------------------------------------- 1 | %table.zebra-striped 2 | %thead 3 | %tr 4 | %th.first 5 | - if @search 6 | %th= sort_link @search, :acronym, :term => params[:term] 7 | %th= sort_link @search, :title, :term => params[:term] 8 | %th= sort_link @search, :created_at, :term => params[:term] 9 | %th= sort_link @search, :email, :term => params[:term] 10 | - else 11 | %th Acronym 12 | %th Title 13 | %th Date 14 | %th Email 15 | %th.last 16 | %tbody 17 | - collection.each do |conference| 18 | %tr 19 | %td 20 | %td= conference.acronym 21 | %td= conference.title 22 | %td= l(conference.created_at.to_date) 23 | %td= conference.email 24 | %td.buttons 25 | = action_button "small", 'Show', conference_home_path(:conference_acronym => conference.acronym) 26 | - if can? :manage, conference 27 | = action_button "small", 'Edit', edit_conference_path(:conference_acronym => conference.acronym) 28 | = action_button "small danger", 'Destroy', conference_path(:conference_acronym => conference.acronym), :confirm => 'Are you sure?', :method => :delete 29 | -------------------------------------------------------------------------------- /lib/video_import.rb: -------------------------------------------------------------------------------- 1 | class VideoImport 2 | require 'open-uri' 3 | require 'nokogiri' 4 | 5 | def initialize(conference, url) 6 | @conference = conference 7 | @url = url 8 | end 9 | 10 | def import 11 | @xml = fetch_remote 12 | @xml.remove_namespaces! 13 | 14 | ActiveRecord::Base.transaction do 15 | 16 | items = @xml.search('//item') 17 | items.each { |item| 18 | id = item.search('identifier').first 19 | event = find_event(id.text) 20 | 21 | enclosure = item.search('enclosure').first 22 | add_video(event, enclosure) 23 | 24 | link = item.search('link').first 25 | add_link(event, link.text) 26 | } 27 | 28 | end 29 | 30 | end 31 | 32 | protected 33 | 34 | def find_event(id) 35 | event = Event.find(id) 36 | if event and event.conference == @conference 37 | event 38 | end 39 | end 40 | 41 | def add_video(event, enclosure) 42 | event.videos << Video.new(url: enclosure['url'], mimetype: enclosure['type']) 43 | end 44 | 45 | def add_link(event, link) 46 | event.links << Link.new(title: "Video Recording", url: link) 47 | end 48 | 49 | def fetch_remote 50 | Nokogiri::XML(open(@url)) 51 | end 52 | 53 | end 54 | -------------------------------------------------------------------------------- /app/assets/stylesheets/bootstrap_and_overrides.css.less: -------------------------------------------------------------------------------- 1 | @import "twitter/bootstrap/bootstrap"; 2 | body { padding-top: 60px; } 3 | 4 | @import "twitter/bootstrap/responsive"; 5 | 6 | // Set the correct sprite paths 7 | @iconSpritePath: asset-path('twitter/bootstrap/glyphicons-halflings.png'); 8 | @iconWhiteSpritePath: asset-path('twitter/bootstrap/glyphicons-halflings-white.png'); 9 | 10 | // Set the Font Awesome (Font Awesome is default. You can disable by commenting below lines) 11 | @fontAwesomeEotPath: asset-path('fontawesome-webfont.eot'); 12 | @fontAwesomeWoffPath: asset-path('fontawesome-webfont.woff'); 13 | @fontAwesomeTtfPath: asset-path('fontawesome-webfont.ttf'); 14 | @fontAwesomeSvgzPath: asset-path('fontawesome-webfont.svgz'); 15 | @fontAwesomeSvgPath: asset-path('fontawesome-webfont.svg'); 16 | 17 | // Font Awesome 18 | @import "fontawesome"; 19 | 20 | // Your custom LESS stylesheets goes here 21 | // 22 | // Since bootstrap was imported above you have access to its mixins which 23 | // you may use and inherit here 24 | // 25 | // If you'd like to override bootstrap's own variables, you can do so here as well 26 | // See http://twitter.github.com/bootstrap/less.html for their names and documentation 27 | // 28 | // Example: 29 | // @linkColor: #ff0000; 30 | -------------------------------------------------------------------------------- /test/functional/cfp/confirmations_controller_test.rb: -------------------------------------------------------------------------------- 1 | require 'test_helper' 2 | 3 | class Cfp::ConfirmationsControllerTest < ActionController::TestCase 4 | 5 | setup do 6 | @call_for_papers = FactoryGirl.create(:call_for_papers) 7 | @conference = @call_for_papers.conference 8 | end 9 | 10 | test "displays resend confirmation instructions form" do 11 | get :new, conference_acronym: @conference.acronym 12 | assert_response :success 13 | end 14 | 15 | test "resends confirmation instructions" do 16 | user = FactoryGirl.create(:user, confirmed_at: nil, call_for_papers: @call_for_papers) 17 | assert_difference 'ActionMailer::Base.deliveries.size' do 18 | post :create, conference_acronym: @conference.acronym, user: {email: user.email} 19 | end 20 | assert_response :redirect 21 | end 22 | 23 | test "performs confirmation" do 24 | user = FactoryGirl.create(:user, confirmed_at: nil, call_for_papers: @call_for_papers) 25 | get :show, conference_acronym: @conference.acronym, confirmation_token: user.confirmation_token 26 | assert_response :redirect 27 | assert_not_nil assigns(:current_user) 28 | user.reload 29 | assert_not_nil user.confirmed_at 30 | assert_nil user.confirmation_token 31 | end 32 | 33 | end 34 | -------------------------------------------------------------------------------- /db/migrate/20110513143301_convert_event_states.rb: -------------------------------------------------------------------------------- 1 | class ConvertEventStates < ActiveRecord::Migration 2 | def self.up 3 | # Undefined method? Event.disable_auditing 4 | Event.all.each do |event| 5 | event.state = event.progress unless event.state == "rejected" 6 | event.state = "confirmed" if event.state == "reconfirmed" 7 | event.state = "review" if event.state == "rejection-candidate" 8 | event.save(validate: false) 9 | end 10 | remove_column :events, :progress 11 | change_column :events, :state, :string, default: "new", null: false 12 | end 13 | 14 | def self.down 15 | add_column :events, :progress, :string, default: "new", null: false 16 | Event.reset_column_information 17 | # Undefined method? Event.disable_auditing 18 | Event.all.each do |event| 19 | event.progress = event.state 20 | case event.progress 21 | when "new", "review", "withdrawn" 22 | event.state = "undecided" 23 | when "unconfirmed", "confirmed", "canceled" 24 | event.state = "accepted" 25 | when "rejected" 26 | event.progress = "done" 27 | end 28 | event.save(validate: false) 29 | end 30 | change_column :events, :state, :string, default: "undecided", null: false 31 | end 32 | end 33 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | Note that Kalua depends on and bundles software that might be 2 | licensed differently. The following refers to code that is original 3 | to Kalua. 4 | 5 | Copyright (c) 2011 David Roetzel 6 | 7 | Permission is hereby granted, free of charge, to any person obtaining 8 | a copy of this software and associated documentation files (the 9 | "Software"), to deal in the Software without restriction, including 10 | without limitation the rights to use, copy, modify, merge, publish, 11 | distribute, sublicense, and/or sell copies of the Software, and to 12 | permit persons to whom the Software is furnished to do so, subject to 13 | the following conditions: 14 | 15 | The above copyright notice and this permission notice shall be 16 | included in all copies or substantial portions of the Software. 17 | 18 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 19 | EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 20 | MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 21 | NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE 22 | LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION 23 | OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION 24 | WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 25 | -------------------------------------------------------------------------------- /app/views/recent_changes/_table.html.haml: -------------------------------------------------------------------------------- 1 | %table.zebra-striped 2 | %tbody 3 | - @versions.each do |version| 4 | - user = nil 5 | - if version.whodunnit 6 | - begin 7 | - user = User.find(version.whodunnit) 8 | - rescue 9 | %tr 10 | %td= version.created_at.to_s(:long) 11 | - if user and user.person 12 | %td= image_box user.person.avatar, :small 13 | %td= link_to user.person.full_name, user.person 14 | -else 15 | %td= image_box Person.new.avatar, :small 16 | %td deleted id 17 | %td= verb_for version.event 18 | %td 19 | - if version.item 20 | - if version.associated_id 21 | = version.item.to_s 22 | on 23 | \#{associated_link_for version} 24 | - else 25 | = link_to version.item.to_s, version.item 26 | - else 27 | = version.item_type 28 | %td 29 | - if version.event == "update" 30 | %a{:href => "#", :rel => "popover", :"data-placement" => "below", :"data-original-title" => "Detailed Changes", :"data-content" => render("recent_changes/detailed_changes", :version => version), :"data-html" => "true", :"data-trigger" => "manual"} Details 31 | -------------------------------------------------------------------------------- /test/functional/tickets_controller_rt_test.rb: -------------------------------------------------------------------------------- 1 | require 'test_helper' 2 | 3 | class TicketsControllerTest < ActionController::TestCase 4 | setup do 5 | @event = FactoryGirl.create(:event) 6 | @conference = @event.conference 7 | @person = FactoryGirl.create(:person) 8 | FactoryGirl.create(:event_person, event: @event, person: @person, 9 | event_role: "submitter") 10 | FactoryGirl.create(:event_person, event: @event, person: @person, 11 | event_role: "speaker") 12 | 13 | @url = 'https://localhost/RT/' 14 | @conference.ticket_server = TicketServer.new(conference: @conference, 15 | url: @url, 16 | queue: 'test', 17 | user: 'guest', 18 | password: 'guest') 19 | login_as(:admin) 20 | end 21 | 22 | test "create remote ticket with RT" do 23 | post :create, event_id: @event.id, 24 | conference_acronym: @conference.acronym, test_only: true 25 | # test fails because ?method=get is appended to url 26 | #assert_redirected_to event_path(assigns(:event)) 27 | assert_response :redirect 28 | end 29 | end 30 | -------------------------------------------------------------------------------- /test/functional/users_controller_test.rb: -------------------------------------------------------------------------------- 1 | require 'test_helper' 2 | 3 | class UsersControllerTest < ActionController::TestCase 4 | setup do 5 | @conference = FactoryGirl.create(:conference) 6 | @person = FactoryGirl.create(:person) 7 | @user = FactoryGirl.create(:user, person: FactoryGirl.create(:person)) 8 | login_as(:admin) 9 | end 10 | 11 | test "should get new" do 12 | get :new, person_id: @person.id, conference_acronym: @conference.acronym 13 | assert_response :success 14 | end 15 | 16 | test "should create user" do 17 | assert_difference('User.count') do 18 | post :create, user: FactoryGirl.build(:user).attributes.merge(password: "frab123", password_confirmation: "frab123"), person_id: @person.id, conference_acronym: @conference.acronym 19 | end 20 | 21 | assert_redirected_to person_user_path(@person) 22 | end 23 | 24 | test "should get edit" do 25 | get :edit, id: @user.to_param, person_id: @user.person.id, conference_acronym: @conference.acronym 26 | assert_response :success 27 | end 28 | 29 | test "should update user" do 30 | put :update, id: @user.to_param, user: @user.attributes, person_id: @user.person.id, conference_acronym: @conference.acronym 31 | assert_redirected_to person_user_path(@user.person) 32 | end 33 | 34 | end 35 | -------------------------------------------------------------------------------- /test/functional/tickets_controller_otrs_test.rb: -------------------------------------------------------------------------------- 1 | require 'test_helper' 2 | 3 | class TicketsControllerTest < ActionController::TestCase 4 | setup do 5 | @event = FactoryGirl.create(:event) 6 | @conference = @event.conference 7 | @person = FactoryGirl.create(:person) 8 | FactoryGirl.create(:event_person, event: @event, person: @person, 9 | event_role: "submitter") 10 | FactoryGirl.create(:event_person, event: @event, person: @person, 11 | event_role: "speaker") 12 | 13 | @conference.ticket_type = 'otrs' 14 | @url = 'https://localhost/otrs/' 15 | @conference.ticket_server = TicketServer.new(conference: @conference, 16 | url: @url, 17 | queue: 'test', 18 | user: 'guest', 19 | password: 'guest') 20 | login_as(:admin) 21 | end 22 | 23 | test "create remote ticket with OTRS" do 24 | post :create, event_id: @event.id, 25 | conference_acronym: @conference.acronym, test_only: true 26 | # test fails because ?method=get is appended to url 27 | #assert_redirected_to event_path(assigns('event')) 28 | assert_response :redirect 29 | end 30 | end 31 | -------------------------------------------------------------------------------- /app/views/reports/_events_table.html.haml: -------------------------------------------------------------------------------- 1 | %table.zebra-stripe 2 | %thead 3 | %tr 4 | %th.first 5 | - if @search 6 | %th= sort_link @search, :title, "Title", :term => params[:term] 7 | %th= sort_link @search, :track_name, "Track", :term => params[:term] 8 | %th= sort_link @search, :event_type, :term => params[:term] 9 | %th= sort_link @search, :state, "State", :term => params[:term] 10 | %th= sort_link @search, :created_at, :term => params[:term] 11 | - else 12 | %th Title 13 | %th Track 14 | %th Event type 15 | %th State 16 | %th Created at 17 | %th 18 | %tbody 19 | - events.each do |event| 20 | %tr 21 | %td= link_to (image_box event.logo, :small), event 22 | %td 23 | = link_to event.title, event 24 | %p.small 25 | = by_speakers(event) 26 | %td= event.track.try(:name) 27 | %td= event.event_type 28 | %td= event.state 29 | %td= l(event.created_at.to_date) 30 | %td.buttons 31 | = action_button "small", 'Show', event 32 | - if can? :manage, event 33 | = action_button "small", 'Edit', edit_event_path(event) 34 | = action_button "small danger", 'Destroy', event, :confirm => 'Are you sure?', :method => :delete 35 | -------------------------------------------------------------------------------- /app/views/people/index.html.haml: -------------------------------------------------------------------------------- 1 | %section 2 | .page-header 3 | .pull-right 4 | - if can? :control, Person 5 | = action_button "primary", "Add person", new_person_path, :title => "Add a new person." 6 | %h1 List of people 7 | %ul.tabs 8 | %li.active= link_to "This conference", people_path 9 | %li= link_to "Speakers", speakers_people_path 10 | %li= link_to "All people", all_people_path 11 | - if params[:term].blank? and @people.all.empty? 12 | .row 13 | .span16 14 | .blank-slate 15 | - if Person.count <= 1 16 | %p 17 | You do not have any data on people yet. 18 | Use the button on the right to start adding 19 | people. Please note that they will not appear 20 | here right away, unless they are involved 21 | in any of this conference's events. Use the 22 | All people tab above to see all 23 | people across all your conferences. 24 | - else 25 | %p 26 | There are no people associated with this 27 | conference yet. People will start appearing 28 | here, once they take on a role in any of 29 | this conference's events. 30 | - else 31 | = render 'shared/search_and_table', :collection => @people 32 | -------------------------------------------------------------------------------- /lib/bulk_mailer.rb: -------------------------------------------------------------------------------- 1 | class BulkMailer 2 | 3 | def initialize(subject, from, mail_file, body_file, force=false) 4 | @subject = subject 5 | @from_email = from 6 | @force = force 7 | @emails = File.readlines(mail_file).collect { |l| l.chomp } 8 | @body = File.read(body_file) 9 | 10 | @emails.each { |email| 11 | send_mail_to(email) 12 | } 13 | end 14 | 15 | private 16 | 17 | class BulkMail < ActionMailer::Base 18 | def notify(template, person, args) 19 | puts "send mail to: #{args[:to]}" 20 | @person = person 21 | mail( args ) do |format| 22 | format.text { render :inline => template } 23 | end 24 | end 25 | end 26 | 27 | def send_mail_to(email) 28 | p = Person.find_by_email(email) 29 | email_address_with_name = p.nil? ? email : "#{p.public_name} <#{email}>" 30 | 31 | if (p.nil?) 32 | email_address_with_name = email 33 | else 34 | email_address_with_name = "#{p.public_name} <#{email}>" 35 | end 36 | 37 | unless @force 38 | unless (p.include_in_mailings?) 39 | puts "skipped due to settings: #{email}" 40 | return 41 | end 42 | end 43 | 44 | args = {:subject => @subject, :to => email_address_with_name, :from => @from_email} 45 | 46 | BulkMail.notify(@body, p, args).deliver 47 | end 48 | 49 | end 50 | -------------------------------------------------------------------------------- /app/views/reports/_people_table.html.haml: -------------------------------------------------------------------------------- 1 | %table.zebra-stripe 2 | %thead 3 | %tr 4 | %th.first 5 | - if @search 6 | %th= sort_link @search, :full_name, :term => params[:term] 7 | %th= sort_link @search, :public_name, :term => params[:term] 8 | %th= sort_link @search, :email, :term => params[:term] 9 | %th Events in 10 | %th= sort_link @search, :created_at, :term => params[:term] 11 | - else 12 | %th Full name 13 | %th Public name 14 | %th Email 15 | %th Events in 16 | %th Created at 17 | %th.last 18 | %tbody 19 | - @people.each do |person| 20 | %tr 21 | %td= link_to (image_box person.avatar, :small), person 22 | %td= link_to person.full_name, person 23 | %td 24 | -unless person.public_name.nil? 25 | = link_to person.public_name, person 26 | %td= link_to person.email, person 27 | %td= person.events_in(@conference).map{|e| link_to e.title, e}.join(', ').html_safe 28 | %td= l(person.created_at.to_date) 29 | %td.buttons 30 | = action_button "small", 'Show', person 31 | - if can? :manage, person 32 | = action_button "small", 'Edit', edit_person_path(person) 33 | = action_button "small danger", 'Destroy', person, :confirm => 'Are you sure?', :method => :delete 34 | -------------------------------------------------------------------------------- /app/controllers/cfp/passwords_controller.rb: -------------------------------------------------------------------------------- 1 | class Cfp::PasswordsController < ApplicationController 2 | 3 | layout "signup" 4 | 5 | def new 6 | @user = User.new 7 | end 8 | 9 | def show 10 | redirect_to new_cfp_user_password_path 11 | end 12 | 13 | def create 14 | @user = User.find_by_email(params[:user][:email]) 15 | if @user and @user.send_password_reset_instructions(@conference.call_for_papers) 16 | redirect_to new_cfp_session_path, notice: t(:"cfp.sent_password_reset_instructions") 17 | else 18 | flash[:alert] = t(:"cfp.problem_sending_password_reset_instructions") 19 | redirect_to new_cfp_user_password_path 20 | end 21 | end 22 | 23 | def edit 24 | @user = User.new 25 | @user.reset_password_token = params[:reset_password_token] 26 | end 27 | 28 | def update 29 | @user = User.find_by_reset_password_token(params[:user][:reset_password_token]) 30 | unless @user 31 | flash[:alert] = t(:"cfp.problem_sending_password_reset_instructions") 32 | redirect_to new_cfp_user_password_path 33 | end 34 | 35 | if @user.reset_password(params[:user]) 36 | login_as @user 37 | redirect_to cfp_person_path, notice: t(:"cfp.password_updated") 38 | else 39 | @user.reset_password_token = params[:user][:reset_password_token] 40 | render action: "edit" 41 | end 42 | end 43 | 44 | end 45 | -------------------------------------------------------------------------------- /db/migrate/20110125170413_devise_create_users.rb: -------------------------------------------------------------------------------- 1 | class DeviseCreateUsers < ActiveRecord::Migration 2 | def self.up 3 | create_table(:users) do |t| 4 | ## Database authenticatable 5 | t.string :email, :null => false, :default => "" 6 | t.string :encrypted_password, :null => false, :default => "" 7 | 8 | ## Recoverable 9 | t.string :reset_password_token 10 | 11 | ## Rememberable 12 | t.datetime :remember_created_at 13 | t.string :remember_token 14 | 15 | ## Trackable 16 | t.integer :sign_in_count, :default => 0 17 | t.datetime :current_sign_in_at 18 | t.datetime :last_sign_in_at 19 | t.string :current_sign_in_ip 20 | t.string :last_sign_in_ip 21 | 22 | ## Confirmable 23 | t.string :confirmation_token 24 | t.datetime :confirmed_at 25 | t.datetime :confirmation_sent_at 26 | 27 | # t.lockable lock_strategy: :failed_attempts, unlock_strategy: :both 28 | # t.token_authenticatable 29 | 30 | 31 | t.timestamps 32 | end 33 | 34 | add_index :users, :email, unique: true 35 | add_index :users, :reset_password_token, unique: true 36 | add_index :users, :confirmation_token, unique: true 37 | # add_index :users, :unlock_token, unique: true 38 | end 39 | 40 | def self.down 41 | drop_table :users 42 | end 43 | end 44 | -------------------------------------------------------------------------------- /app/views/events/index.html.haml: -------------------------------------------------------------------------------- 1 | %section 2 | .page-header 3 | .pull-right 4 | = action_button "primary", "Add event", new_event_path, :hint => "Add a new event." 5 | = action_button "", "Print cards", cards_events_path(:format => :pdf), :hint => "Download a PDF with all events as cards (four cards per page). Print this out to take your planning offline." 6 | = action_button "", "Print cards (accepted only)", cards_events_path(:accepted => true, :format => :pdf), :hint => "Download a PDF with only the accepted events as cards (four cards per page). Especially useful to plan your program schedule offline." 7 | %h1 List of events 8 | %ul.tabs 9 | %li.active= link_to "All Events", events_path 10 | %li= link_to "My Events", my_events_path 11 | %li= link_to "Event Ratings", ratings_events_path 12 | - if @conference.feedback_enabled 13 | %li= link_to "Event Feedbacks", feedbacks_events_path 14 | - if params[:term].blank? and @events.all.empty? 15 | .row 16 | .span16 17 | .blank-slate 18 | %p 19 | This conference does not yet have any events. 20 | Start adding events by clicking on the 21 | button on the right. Or start a call for 22 | papers, to allow others to submit events for 23 | you to review. 24 | - else 25 | = render 'shared/search_and_table', :collection => @events 26 | -------------------------------------------------------------------------------- /test/functional/cfp/people_controller_test.rb: -------------------------------------------------------------------------------- 1 | require 'test_helper' 2 | 3 | class Cfp::PeopleControllerTest < ActionController::TestCase 4 | setup do 5 | @cfp_person = FactoryGirl.create(:person) 6 | @call_for_papers = FactoryGirl.create(:call_for_papers) 7 | @conference = @call_for_papers.conference 8 | login_as(:submitter) 9 | end 10 | 11 | test "should get new" do 12 | get :new, conference_acronym: @conference.acronym 13 | assert_response :success 14 | end 15 | 16 | test "should create cfp_person" do 17 | # can't have two persons on one user, so delete the one from login_as 18 | user = FactoryGirl.create( 19 | :user, 20 | role: 'submitter' 21 | ) 22 | user.person = nil 23 | session[:user_id] = user.id 24 | 25 | assert_difference 'Person.count' do 26 | post :create, person: {email: @cfp_person.email, 27 | public_name: @cfp_person.public_name}, 28 | conference_acronym: @conference.acronym 29 | end 30 | assert_response :redirect 31 | end 32 | 33 | test "should get edit" do 34 | get :edit, conference_acronym: @conference.acronym 35 | assert_response :success 36 | end 37 | 38 | test "should update cfp_person" do 39 | put :update, id: @cfp_person.id, person: @cfp_person.attributes, conference_acronym: @conference.acronym 40 | assert_response :redirect 41 | end 42 | 43 | end 44 | -------------------------------------------------------------------------------- /db/migrate/20120804220617_create_conference_date_conversions.rb: -------------------------------------------------------------------------------- 1 | class CreateConferenceDateConversions < ActiveRecord::Migration 2 | def up 3 | # convert conferences 4 | Conference.all.each do |conference| 5 | Time.zone = conference.timezone 6 | day = conference.attributes["first_day"] 7 | until (day > conference.attributes["last_day"]) 8 | start_date = day.to_datetime.change(hour: conference.attributes["day_start"]) 9 | end_date = day.to_datetime.change(hour: conference.attributes["day_end"]) 10 | tmp = Day.new(conference: conference, 11 | start_date: Time.zone.local_to_utc(start_date), 12 | end_date: Time.zone.local_to_utc(end_date)) 13 | tmp.save! 14 | day = day.since(1.days).to_date 15 | end 16 | end 17 | remove_column :conferences, :day_start 18 | remove_column :conferences, :day_end 19 | remove_column :conferences, :first_day 20 | remove_column :conferences, :last_day 21 | end 22 | 23 | def down 24 | # TODO: fill in supposed values? 25 | add_column :conferences, :day_start, :integer, default: 8, null: false 26 | add_column :conferences, :day_end, :integer, default: 20, null: false 27 | add_column :conferences, :first_day, :time, default: '2000-01-01 08:00:00', null: false 28 | add_column :conferences, :last_day, :time, default: '2000-01-01 20:00:00', null: false 29 | end 30 | end 31 | -------------------------------------------------------------------------------- /app/views/call_for_papers/_form_notifications.html.haml: -------------------------------------------------------------------------------- 1 | - call_for_papers = @conference.call_for_papers 2 | = semantic_form_for(call_for_papers, url: call_for_papers_path) do |f| 3 | = dynamic_association :notifications, t(:notifications), f 4 | = f.buttons do 5 | = f.commit_button :button_html => {:class => "btn primary"} 6 | 7 | :javascript 8 | $(function() { 9 | 10 | NotificationDefaults = { 11 | 12 | fill: function(options) { 13 | var id = options.id; 14 | var code = $('div#'+id+' select option:selected').text(); 15 | NotificationDefaults._fetch(id, code); 16 | }, 17 | 18 | _fetch: function(id, code) { 19 | $.ajax({ 20 | type: "GET", 21 | dataType: "json", 22 | url: '#{ call_for_papers_default_notifications_path(conference_acronym: @conference.acronym) }', 23 | data: {'code':code}, 24 | success: function(result){ 25 | var texts = result.notification; 26 | var topDiv = $('div#'+id); 27 | var inputs = topDiv.find('input[type=text]'); 28 | $(inputs.get(0)).val(texts.accept_subject); 29 | $(inputs.get(1)).val(texts.reject_subject); 30 | inputs = topDiv.find('textarea'); 31 | $(inputs.get(0)).val(texts.accept_body); 32 | $(inputs.get(1)).val(texts.reject_body); 33 | } 34 | }); 35 | }, 36 | 37 | }; 38 | }); 39 | 40 | -------------------------------------------------------------------------------- /app/models/event_person.rb: -------------------------------------------------------------------------------- 1 | class EventPerson < ActiveRecord::Base 2 | include UniqueToken 3 | 4 | ROLES = [:coordinator, :submitter, :speaker, :moderator] 5 | STATES = [:canceled, :confirmed, :declined, :idea, :offer, :unclear] 6 | 7 | belongs_to :event 8 | belongs_to :person 9 | after_save :update_speaker_count 10 | after_destroy :update_speaker_count 11 | 12 | has_paper_trail meta: {associated_id: :event_id, associated_type: "Event"} 13 | 14 | scope :presenter, where(event_role: ["speaker", "moderator"]) 15 | 16 | def update_speaker_count 17 | event = Event.find(self.event_id) 18 | event.speaker_count = EventPerson.where(event_id: event.id, event_role: [:moderator, :speaker]).count 19 | event.save 20 | end 21 | 22 | def confirm! 23 | self.role_state = "confirmed" 24 | self.confirmation_token = nil 25 | if self.event.transition_possible? :confirm 26 | self.event.confirm! 27 | end 28 | self.save! 29 | end 30 | 31 | def generate_token! 32 | generate_token_for(:confirmation_token) 33 | save 34 | end 35 | 36 | def available_between?(start_time, end_time) 37 | return unless start_time and end_time 38 | self.person.availabilities.any? { |a| a.within_range? (start_time) and 39 | a.within_range? (end_time) } 40 | end 41 | 42 | def to_s 43 | "Event person: #{self.person.full_name} (#{self.event_role})" 44 | end 45 | 46 | end 47 | -------------------------------------------------------------------------------- /test/unit/person_test.rb: -------------------------------------------------------------------------------- 1 | require 'test_helper' 2 | 3 | class PersonTest < ActiveSupport::TestCase 4 | 5 | test "full public name prioritizes public name" do 6 | person = FactoryGirl.create(:person, public_name: "public name test") 7 | assert_not_nil person.last_name 8 | assert_equal "public name test", person.full_public_name 9 | end 10 | 11 | test "feedback average gets calculated correctly" do 12 | conference = FactoryGirl.create(:conference) 13 | event1 = FactoryGirl.create(:event, conference: conference) 14 | event2 = FactoryGirl.create(:event, conference: conference) 15 | event3 = FactoryGirl.create(:event, conference: conference) 16 | person = FactoryGirl.create(:person) 17 | FactoryGirl.create(:event_person, event: event1, person: person, event_role: :speaker) 18 | FactoryGirl.create(:event_person, event: event2, person: person, event_role: :speaker) 19 | FactoryGirl.create(:event_person, event: event3, person: person, event_role: :speaker) 20 | 21 | FactoryGirl.create(:event_feedback, event: event1, rating: 3.0) 22 | FactoryGirl.create(:event_feedback, event: event2, rating: 4.0) 23 | assert_equal 3.5, person.average_feedback_as_speaker 24 | 25 | # FIXME doesn't register another feedback for event2, thus 26 | # using a new one 27 | FactoryGirl.create(:event_feedback, event: event3, rating: 5.0) 28 | assert_equal 4.0, person.average_feedback_as_speaker 29 | end 30 | 31 | end 32 | -------------------------------------------------------------------------------- /config/environments/development.rb: -------------------------------------------------------------------------------- 1 | Frab::Application.configure do 2 | # Settings specified here will take precedence over those in config/application.rb 3 | 4 | # In the development environment your application's code is reloaded on 5 | # every request. This slows down response time but is perfect for development 6 | # since you don't have to restart the webserver when you make code changes. 7 | config.cache_classes = false 8 | 9 | # Log error messages when you accidentally call methods on nil. 10 | config.whiny_nils = true 11 | 12 | # Show full error reports and disable caching 13 | config.consider_all_requests_local = true 14 | config.action_controller.perform_caching = false 15 | 16 | # Don't care if the mailer can't send 17 | config.action_mailer.raise_delivery_errors = false 18 | 19 | config.action_mailer.default_url_options = { host: 'localhost:3000' } 20 | 21 | # Print deprecation notices to the Rails logger 22 | config.active_support.deprecation = :log 23 | 24 | # Only use best-standards-support built into browsers 25 | config.action_dispatch.best_standards_support = :builtin 26 | 27 | # Do not compress assets 28 | config.assets.compress = false 29 | 30 | # Expands the lines which load the assets 31 | config.assets.debug = false 32 | 33 | # bullet 34 | config.after_initialize do 35 | Bullet.enable = true 36 | #Bullet.alert = true 37 | Bullet.rails_logger = true 38 | end 39 | end 40 | 41 | 42 | -------------------------------------------------------------------------------- /app/controllers/event_ratings_controller.rb: -------------------------------------------------------------------------------- 1 | class EventRatingsController < ApplicationController 2 | 3 | before_filter :authenticate_user! 4 | before_filter :not_submitter! 5 | before_filter :find_event 6 | 7 | def show 8 | authorize! :read, EventRating 9 | @rating = @event.event_ratings.find_by_person_id(current_user.person.id) || EventRating.new 10 | if session[:review_ids] and current_index = session[:review_ids].index(@event.id) and session[:review_ids].last != @event.id 11 | @next_event = Event.find(session[:review_ids][current_index + 1]) 12 | end 13 | end 14 | 15 | def create 16 | @rating = EventRating.new(params[:event_rating]) 17 | @rating.event = @event 18 | @rating.person = current_user.person 19 | authorize! :manage, @rating 20 | @rating.save 21 | redirect_to event_event_rating_path, notice: "Rating saved successfully." 22 | end 23 | 24 | def update 25 | @rating = @event.event_ratings.find_by_person_id(current_user.person.id) 26 | authorize! :manage, @rating 27 | @rating.update_attributes(params[:event_rating]) 28 | redirect_to event_event_rating_path, notice: "Rating saved successfully." 29 | end 30 | 31 | protected 32 | 33 | # filter according to users abilities 34 | def find_event 35 | @event = Event.find(params[:event_id]) 36 | if @event_ratings.nil? 37 | @event_ratings = @event.event_ratings.accessible_by(current_ability) 38 | end 39 | end 40 | 41 | end 42 | --------------------------------------------------------------------------------