Godwin
8 years ago
54 changed files with 8 additions and 6870 deletions
@ -1,58 +0,0 @@ |
|||||
class ConferenceAdminsController < ApplicationController |
|
||||
before_action :set_conference_admin, only: [:show, :edit, :update, :destroy] |
|
||||
|
|
||||
# GET /conference_admins |
|
||||
def index |
|
||||
@conference_admins = ConferenceAdmin.all |
|
||||
end |
|
||||
|
|
||||
# GET /conference_admins/1 |
|
||||
def show |
|
||||
end |
|
||||
|
|
||||
# GET /conference_admins/new |
|
||||
def new |
|
||||
@conference_admin = ConferenceAdmin.new |
|
||||
end |
|
||||
|
|
||||
# GET /conference_admins/1/edit |
|
||||
def edit |
|
||||
end |
|
||||
|
|
||||
# POST /conference_admins |
|
||||
def create |
|
||||
@conference_admin = ConferenceAdmin.new(conference_admin_params) |
|
||||
|
|
||||
if @conference_admin.save |
|
||||
redirect_to @conference_admin, notice: 'Conference admin was successfully created.' |
|
||||
else |
|
||||
render action: 'new' |
|
||||
end |
|
||||
end |
|
||||
|
|
||||
# PATCH/PUT /conference_admins/1 |
|
||||
def update |
|
||||
if @conference_admin.update(conference_admin_params) |
|
||||
redirect_to @conference_admin, notice: 'Conference admin was successfully updated.' |
|
||||
else |
|
||||
render action: 'edit' |
|
||||
end |
|
||||
end |
|
||||
|
|
||||
# DELETE /conference_admins/1 |
|
||||
def destroy |
|
||||
@conference_admin.destroy |
|
||||
redirect_to conference_admins_url, notice: 'Conference admin was successfully destroyed.' |
|
||||
end |
|
||||
|
|
||||
private |
|
||||
# Use callbacks to share common setup or constraints between actions. |
|
||||
def set_conference_admin |
|
||||
@conference_admin = ConferenceAdmin.find(params[:id]) |
|
||||
end |
|
||||
|
|
||||
# Only allow a trusted parameter "white list" through. |
|
||||
def conference_admin_params |
|
||||
params.require(:conference_admin).permit(:conference_id, :user_id) |
|
||||
end |
|
||||
end |
|
@ -1,58 +0,0 @@ |
|||||
class ConferenceHostOrganizationsController < ApplicationController |
|
||||
before_action :set_conference_host_organization, only: [:show, :edit, :update, :destroy] |
|
||||
|
|
||||
# GET /conference_host_organizations |
|
||||
def index |
|
||||
@conference_host_organizations = ConferenceHostOrganization.all |
|
||||
end |
|
||||
|
|
||||
# GET /conference_host_organizations/1 |
|
||||
def show |
|
||||
end |
|
||||
|
|
||||
# GET /conference_host_organizations/new |
|
||||
def new |
|
||||
@conference_host_organization = ConferenceHostOrganization.new |
|
||||
end |
|
||||
|
|
||||
# GET /conference_host_organizations/1/edit |
|
||||
def edit |
|
||||
end |
|
||||
|
|
||||
# POST /conference_host_organizations |
|
||||
def create |
|
||||
@conference_host_organization = ConferenceHostOrganization.new(conference_host_organization_params) |
|
||||
|
|
||||
if @conference_host_organization.save |
|
||||
redirect_to @conference_host_organization, notice: 'Conference host organization was successfully created.' |
|
||||
else |
|
||||
render action: 'new' |
|
||||
end |
|
||||
end |
|
||||
|
|
||||
# PATCH/PUT /conference_host_organizations/1 |
|
||||
def update |
|
||||
if @conference_host_organization.update(conference_host_organization_params) |
|
||||
redirect_to @conference_host_organization, notice: 'Conference host organization was successfully updated.' |
|
||||
else |
|
||||
render action: 'edit' |
|
||||
end |
|
||||
end |
|
||||
|
|
||||
# DELETE /conference_host_organizations/1 |
|
||||
def destroy |
|
||||
@conference_host_organization.destroy |
|
||||
redirect_to conference_host_organizations_url, notice: 'Conference host organization was successfully destroyed.' |
|
||||
end |
|
||||
|
|
||||
private |
|
||||
# Use callbacks to share common setup or constraints between actions. |
|
||||
def set_conference_host_organization |
|
||||
@conference_host_organization = ConferenceHostOrganization.find(params[:id]) |
|
||||
end |
|
||||
|
|
||||
# Only allow a trusted parameter "white list" through. |
|
||||
def conference_host_organization_params |
|
||||
params.require(:conference_host_organization).permit(:conference_id, :organization_id, :order) |
|
||||
end |
|
||||
end |
|
@ -1,58 +0,0 @@ |
|||||
class ConferenceRegistrationResponsesController < ApplicationController |
|
||||
before_action :set_conference_registration_response, only: [:show, :edit, :update, :destroy] |
|
||||
|
|
||||
# GET /conference_registration_responses |
|
||||
def index |
|
||||
@conference_registration_responses = ConferenceRegistrationResponse.all |
|
||||
end |
|
||||
|
|
||||
# GET /conference_registration_responses/1 |
|
||||
def show |
|
||||
end |
|
||||
|
|
||||
# GET /conference_registration_responses/new |
|
||||
def new |
|
||||
@conference_registration_response = ConferenceRegistrationResponse.new |
|
||||
end |
|
||||
|
|
||||
# GET /conference_registration_responses/1/edit |
|
||||
def edit |
|
||||
end |
|
||||
|
|
||||
# POST /conference_registration_responses |
|
||||
def create |
|
||||
@conference_registration_response = ConferenceRegistrationResponse.new(conference_registration_response_params) |
|
||||
|
|
||||
if @conference_registration_response.save |
|
||||
redirect_to @conference_registration_response, notice: 'Conference registration response was successfully created.' |
|
||||
else |
|
||||
render action: 'new' |
|
||||
end |
|
||||
end |
|
||||
|
|
||||
# PATCH/PUT /conference_registration_responses/1 |
|
||||
def update |
|
||||
if @conference_registration_response.update(conference_registration_response_params) |
|
||||
redirect_to @conference_registration_response, notice: 'Conference registration response was successfully updated.' |
|
||||
else |
|
||||
render action: 'edit' |
|
||||
end |
|
||||
end |
|
||||
|
|
||||
# DELETE /conference_registration_responses/1 |
|
||||
def destroy |
|
||||
@conference_registration_response.destroy |
|
||||
redirect_to conference_registration_responses_url, notice: 'Conference registration response was successfully destroyed.' |
|
||||
end |
|
||||
|
|
||||
private |
|
||||
# Use callbacks to share common setup or constraints between actions. |
|
||||
def set_conference_registration_response |
|
||||
@conference_registration_response = ConferenceRegistrationResponse.find(params[:id]) |
|
||||
end |
|
||||
|
|
||||
# Only allow a trusted parameter "white list" through. |
|
||||
def conference_registration_response_params |
|
||||
params.require(:conference_registration_response).permit(:conference_registration_id, :registration_form_field_id, :data) |
|
||||
end |
|
||||
end |
|
@ -1,58 +0,0 @@ |
|||||
class ConferenceRegistrationsController < ApplicationController |
|
||||
before_action :set_conference_registration, only: [:show, :edit, :update, :destroy] |
|
||||
|
|
||||
# GET /conference_registrations |
|
||||
def index |
|
||||
@conference_registrations = ConferenceRegistration.all |
|
||||
end |
|
||||
|
|
||||
# GET /conference_registrations/1 |
|
||||
def show |
|
||||
end |
|
||||
|
|
||||
# GET /conference_registrations/new |
|
||||
def new |
|
||||
@conference_registration = ConferenceRegistration.new |
|
||||
end |
|
||||
|
|
||||
# GET /conference_registrations/1/edit |
|
||||
def edit |
|
||||
end |
|
||||
|
|
||||
# POST /conference_registrations |
|
||||
def create |
|
||||
@conference_registration = ConferenceRegistration.new(conference_registration_params) |
|
||||
|
|
||||
if @conference_registration.save |
|
||||
redirect_to @conference_registration, notice: 'Conference registration was successfully created.' |
|
||||
else |
|
||||
render action: 'new' |
|
||||
end |
|
||||
end |
|
||||
|
|
||||
# PATCH/PUT /conference_registrations/1 |
|
||||
def update |
|
||||
if @conference_registration.update(conference_registration_params) |
|
||||
redirect_to @conference_registration, notice: 'Conference registration was successfully updated.' |
|
||||
else |
|
||||
render action: 'edit' |
|
||||
end |
|
||||
end |
|
||||
|
|
||||
# DELETE /conference_registrations/1 |
|
||||
def destroy |
|
||||
@conference_registration.destroy |
|
||||
redirect_to conference_registrations_url, notice: 'Conference registration was successfully destroyed.' |
|
||||
end |
|
||||
|
|
||||
private |
|
||||
# Use callbacks to share common setup or constraints between actions. |
|
||||
def set_conference_registration |
|
||||
@conference_registration = ConferenceRegistration.find(params[:id]) |
|
||||
end |
|
||||
|
|
||||
# Only allow a trusted parameter "white list" through. |
|
||||
def conference_registration_params |
|
||||
params.require(:conference_registration).permit(:conference_id, :user_id, :is_attending) |
|
||||
end |
|
||||
end |
|
@ -1,58 +0,0 @@ |
|||||
class ConferenceRegistratonFormFieldsController < ApplicationController |
|
||||
before_action :set_conference_registraton_form_field, only: [:show, :edit, :update, :destroy] |
|
||||
|
|
||||
# GET /conference_registraton_form_fields |
|
||||
def index |
|
||||
@conference_registraton_form_fields = ConferenceRegistratonFormField.all |
|
||||
end |
|
||||
|
|
||||
# GET /conference_registraton_form_fields/1 |
|
||||
def show |
|
||||
end |
|
||||
|
|
||||
# GET /conference_registraton_form_fields/new |
|
||||
def new |
|
||||
@conference_registraton_form_field = ConferenceRegistratonFormField.new |
|
||||
end |
|
||||
|
|
||||
# GET /conference_registraton_form_fields/1/edit |
|
||||
def edit |
|
||||
end |
|
||||
|
|
||||
# POST /conference_registraton_form_fields |
|
||||
def create |
|
||||
@conference_registraton_form_field = ConferenceRegistratonFormField.new(conference_registraton_form_field_params) |
|
||||
|
|
||||
if @conference_registraton_form_field.save |
|
||||
redirect_to @conference_registraton_form_field, notice: 'Conference registraton form field was successfully created.' |
|
||||
else |
|
||||
render action: 'new' |
|
||||
end |
|
||||
end |
|
||||
|
|
||||
# PATCH/PUT /conference_registraton_form_fields/1 |
|
||||
def update |
|
||||
if @conference_registraton_form_field.update(conference_registraton_form_field_params) |
|
||||
redirect_to @conference_registraton_form_field, notice: 'Conference registraton form field was successfully updated.' |
|
||||
else |
|
||||
render action: 'edit' |
|
||||
end |
|
||||
end |
|
||||
|
|
||||
# DELETE /conference_registraton_form_fields/1 |
|
||||
def destroy |
|
||||
@conference_registraton_form_field.destroy |
|
||||
redirect_to conference_registraton_form_fields_url, notice: 'Conference registraton form field was successfully destroyed.' |
|
||||
end |
|
||||
|
|
||||
private |
|
||||
# Use callbacks to share common setup or constraints between actions. |
|
||||
def set_conference_registraton_form_field |
|
||||
@conference_registraton_form_field = ConferenceRegistratonFormField.find(params[:id]) |
|
||||
end |
|
||||
|
|
||||
# Only allow a trusted parameter "white list" through. |
|
||||
def conference_registraton_form_field_params |
|
||||
params.require(:conference_registraton_form_field).permit(:conference_id, :registration_form_field_id, :order) |
|
||||
end |
|
||||
end |
|
@ -1,58 +0,0 @@ |
|||||
class ConferenceTypesController < ApplicationController |
|
||||
before_action :set_conference_type, only: [:show, :edit, :update, :destroy] |
|
||||
|
|
||||
# GET /conference_types |
|
||||
def index |
|
||||
@conference_types = ConferenceType.all |
|
||||
end |
|
||||
|
|
||||
# GET /conference_types/1 |
|
||||
def show |
|
||||
end |
|
||||
|
|
||||
# GET /conference_types/new |
|
||||
def new |
|
||||
@conference_type = ConferenceType.new |
|
||||
end |
|
||||
|
|
||||
# GET /conference_types/1/edit |
|
||||
def edit |
|
||||
end |
|
||||
|
|
||||
# POST /conference_types |
|
||||
def create |
|
||||
@conference_type = ConferenceType.new(conference_type_params) |
|
||||
|
|
||||
if @conference_type.save |
|
||||
redirect_to @conference_type, notice: 'Conference type was successfully created.' |
|
||||
else |
|
||||
render action: 'new' |
|
||||
end |
|
||||
end |
|
||||
|
|
||||
# PATCH/PUT /conference_types/1 |
|
||||
def update |
|
||||
if @conference_type.update(conference_type_params) |
|
||||
redirect_to @conference_type, notice: 'Conference type was successfully updated.' |
|
||||
else |
|
||||
render action: 'edit' |
|
||||
end |
|
||||
end |
|
||||
|
|
||||
# DELETE /conference_types/1 |
|
||||
def destroy |
|
||||
@conference_type.destroy |
|
||||
redirect_to conference_types_url, notice: 'Conference type was successfully destroyed.' |
|
||||
end |
|
||||
|
|
||||
private |
|
||||
# Use callbacks to share common setup or constraints between actions. |
|
||||
def set_conference_type |
|
||||
@conference_type = ConferenceType.find(params[:id]) |
|
||||
end |
|
||||
|
|
||||
# Only allow a trusted parameter "white list" through. |
|
||||
def conference_type_params |
|
||||
params.require(:conference_type).permit(:title, :info) |
|
||||
end |
|
||||
end |
|
@ -1,58 +0,0 @@ |
|||||
class EventTypesController < ApplicationController |
|
||||
before_action :set_event_type, only: [:show, :edit, :update, :destroy] |
|
||||
|
|
||||
# GET /event_types |
|
||||
def index |
|
||||
@event_types = EventType.all |
|
||||
end |
|
||||
|
|
||||
# GET /event_types/1 |
|
||||
def show |
|
||||
end |
|
||||
|
|
||||
# GET /event_types/new |
|
||||
def new |
|
||||
@event_type = EventType.new |
|
||||
end |
|
||||
|
|
||||
# GET /event_types/1/edit |
|
||||
def edit |
|
||||
end |
|
||||
|
|
||||
# POST /event_types |
|
||||
def create |
|
||||
@event_type = EventType.new(event_type_params) |
|
||||
|
|
||||
if @event_type.save |
|
||||
redirect_to @event_type, notice: 'Event type was successfully created.' |
|
||||
else |
|
||||
render action: 'new' |
|
||||
end |
|
||||
end |
|
||||
|
|
||||
# PATCH/PUT /event_types/1 |
|
||||
def update |
|
||||
if @event_type.update(event_type_params) |
|
||||
redirect_to @event_type, notice: 'Event type was successfully updated.' |
|
||||
else |
|
||||
render action: 'edit' |
|
||||
end |
|
||||
end |
|
||||
|
|
||||
# DELETE /event_types/1 |
|
||||
def destroy |
|
||||
@event_type.destroy |
|
||||
redirect_to event_types_url, notice: 'Event type was successfully destroyed.' |
|
||||
end |
|
||||
|
|
||||
private |
|
||||
# Use callbacks to share common setup or constraints between actions. |
|
||||
def set_event_type |
|
||||
@event_type = EventType.find(params[:id]) |
|
||||
end |
|
||||
|
|
||||
# Only allow a trusted parameter "white list" through. |
|
||||
def event_type_params |
|
||||
params.require(:event_type).permit(:slug, :info) |
|
||||
end |
|
||||
end |
|
@ -1,58 +0,0 @@ |
|||||
class EventsController < ApplicationController |
|
||||
before_action :set_event, only: [:show, :edit, :update, :destroy] |
|
||||
|
|
||||
# GET /events |
|
||||
def index |
|
||||
@events = Event.all |
|
||||
end |
|
||||
|
|
||||
# GET /events/1 |
|
||||
def show |
|
||||
end |
|
||||
|
|
||||
# GET /events/new |
|
||||
def new |
|
||||
@event = Event.new |
|
||||
end |
|
||||
|
|
||||
# GET /events/1/edit |
|
||||
def edit |
|
||||
end |
|
||||
|
|
||||
# POST /events |
|
||||
def create |
|
||||
@event = Event.new(event_params) |
|
||||
|
|
||||
if @event.save |
|
||||
redirect_to @event, notice: 'Event was successfully created.' |
|
||||
else |
|
||||
render action: 'new' |
|
||||
end |
|
||||
end |
|
||||
|
|
||||
# PATCH/PUT /events/1 |
|
||||
def update |
|
||||
if @event.update(event_params) |
|
||||
redirect_to @event, notice: 'Event was successfully updated.' |
|
||||
else |
|
||||
render action: 'edit' |
|
||||
end |
|
||||
end |
|
||||
|
|
||||
# DELETE /events/1 |
|
||||
def destroy |
|
||||
@event.destroy |
|
||||
redirect_to events_url, notice: 'Event was successfully destroyed.' |
|
||||
end |
|
||||
|
|
||||
private |
|
||||
# Use callbacks to share common setup or constraints between actions. |
|
||||
def set_event |
|
||||
@event = Event.find(params[:id]) |
|
||||
end |
|
||||
|
|
||||
# Only allow a trusted parameter "white list" through. |
|
||||
def event_params |
|
||||
params.require(:event).permit(:title, :slug, :event_type_id, :conference, :info, :location, :start_time, :end_time) |
|
||||
end |
|
||||
end |
|
@ -1,58 +0,0 @@ |
|||||
class LocationsController < ApplicationController |
|
||||
before_action :set_location, only: [:show, :edit, :update, :destroy] |
|
||||
|
|
||||
# GET /locations |
|
||||
def index |
|
||||
@locations = Location.all |
|
||||
end |
|
||||
|
|
||||
# GET /locations/1 |
|
||||
def show |
|
||||
end |
|
||||
|
|
||||
# GET /locations/new |
|
||||
def new |
|
||||
@location = Location.new |
|
||||
end |
|
||||
|
|
||||
# GET /locations/1/edit |
|
||||
def edit |
|
||||
end |
|
||||
|
|
||||
# POST /locations |
|
||||
def create |
|
||||
@location = Location.new(location_params) |
|
||||
|
|
||||
if @location.save |
|
||||
redirect_to @location, notice: 'Location was successfully created.' |
|
||||
else |
|
||||
render action: 'new' |
|
||||
end |
|
||||
end |
|
||||
|
|
||||
# PATCH/PUT /locations/1 |
|
||||
def update |
|
||||
if @location.update(location_params) |
|
||||
redirect_to @location, notice: 'Location was successfully updated.' |
|
||||
else |
|
||||
render action: 'edit' |
|
||||
end |
|
||||
end |
|
||||
|
|
||||
# DELETE /locations/1 |
|
||||
def destroy |
|
||||
@location.destroy |
|
||||
redirect_to locations_url, notice: 'Location was successfully destroyed.' |
|
||||
end |
|
||||
|
|
||||
private |
|
||||
# Use callbacks to share common setup or constraints between actions. |
|
||||
def set_location |
|
||||
@location = Location.find(params[:id]) |
|
||||
end |
|
||||
|
|
||||
# Only allow a trusted parameter "white list" through. |
|
||||
def location_params |
|
||||
params.require(:location).permit(:title, :address, :latitude, :longitude) |
|
||||
end |
|
||||
end |
|
@ -1,58 +0,0 @@ |
|||||
class OrganizationStatusesController < ApplicationController |
|
||||
before_action :set_organization_status, only: [:show, :edit, :update, :destroy] |
|
||||
|
|
||||
# GET /organization_statuses |
|
||||
def index |
|
||||
@organization_statuses = OrganizationStatus.all |
|
||||
end |
|
||||
|
|
||||
# GET /organization_statuses/1 |
|
||||
def show |
|
||||
end |
|
||||
|
|
||||
# GET /organization_statuses/new |
|
||||
def new |
|
||||
@organization_status = OrganizationStatus.new |
|
||||
end |
|
||||
|
|
||||
# GET /organization_statuses/1/edit |
|
||||
def edit |
|
||||
end |
|
||||
|
|
||||
# POST /organization_statuses |
|
||||
def create |
|
||||
@organization_status = OrganizationStatus.new(organization_status_params) |
|
||||
|
|
||||
if @organization_status.save |
|
||||
redirect_to @organization_status, notice: 'Organization status was successfully created.' |
|
||||
else |
|
||||
render action: 'new' |
|
||||
end |
|
||||
end |
|
||||
|
|
||||
# PATCH/PUT /organization_statuses/1 |
|
||||
def update |
|
||||
if @organization_status.update(organization_status_params) |
|
||||
redirect_to @organization_status, notice: 'Organization status was successfully updated.' |
|
||||
else |
|
||||
render action: 'edit' |
|
||||
end |
|
||||
end |
|
||||
|
|
||||
# DELETE /organization_statuses/1 |
|
||||
def destroy |
|
||||
@organization_status.destroy |
|
||||
redirect_to organization_statuses_url, notice: 'Organization status was successfully destroyed.' |
|
||||
end |
|
||||
|
|
||||
private |
|
||||
# Use callbacks to share common setup or constraints between actions. |
|
||||
def set_organization_status |
|
||||
@organization_status = OrganizationStatus.find(params[:id]) |
|
||||
end |
|
||||
|
|
||||
# Only allow a trusted parameter "white list" through. |
|
||||
def organization_status_params |
|
||||
params.require(:organization_status).permit(:name, :slug, :info) |
|
||||
end |
|
||||
end |
|
@ -1,110 +0,0 @@ |
|||||
include ApplicationHelper |
|
||||
|
|
||||
class PagesController < ApplicationController |
|
||||
protect_from_forgery :except => :location_territories |
|
||||
#skip_before_filter :verify_authenticity_token, only: [:translate] |
|
||||
|
|
||||
def home |
|
||||
#@conferences = Conference.all |
|
||||
#@conference = Conference.order("start_date DESC").first |
|
||||
end |
|
||||
|
|
||||
# def resources |
|
||||
# end |
|
||||
|
|
||||
# def translate |
|
||||
# key = params[:translationkey] |
|
||||
# value = params[:translationvalue] |
|
||||
# if params[:auto_translate] |
|
||||
# if params[:translationlang] == 'en' |
|
||||
# value = I18n::MissingTranslationExceptionHandler.note(key) |
|
||||
# else |
|
||||
# value = I18n.backend.request_translation(key, {}, {fallback: true, locale: params[:translationlang]}) |
|
||||
# end |
|
||||
# elsif params[:translationhascount] == '1' |
|
||||
# ['zero', 'one', 'two', 'few', 'many'].each { |c| |
|
||||
# if params['translationpluralization_' + c] |
|
||||
# if !value.is_a?(Hash) |
|
||||
# value = Hash.new |
|
||||
# end |
|
||||
# value[c] = params['translationvalue_' + c] |
|
||||
# else |
|
||||
# Translation.destroy_all(:locale => params[:translationlang], :key => (key + '.' + c)) |
|
||||
# end |
|
||||
# } |
|
||||
# if value.is_a?(Hash) |
|
||||
# value['other'] = params[:translationvalue] |
|
||||
# Translation.destroy_all(:locale => params[:translationlang], :key => key) |
|
||||
# else |
|
||||
# Translation.destroy_all(:locale => params[:translationlang], :key => (key + '.other')) |
|
||||
# end |
|
||||
# end |
|
||||
# store_translations(params[:translationlang], {key => value}, :escape => false) |
|
||||
# begin |
|
||||
# render json: {success: true, key: key, jkey: key.gsub('.', '--'), translation: I18n.translate(key, {:raise => false, :locale => params[:translationlang].to_sym})} |
|
||||
# rescue |
|
||||
# render json: {error: 'Failed to load translation'} |
|
||||
# end |
|
||||
# end |
|
||||
|
|
||||
#def location_territories |
|
||||
#render json: (Carmen:::RegionCollection.new(Carmen::Country.coded(params[:country])) || []).to_json |
|
||||
# territories = {} |
|
||||
# country = Carmen::Country.coded(params[:country]) |
|
||||
# if country |
|
||||
# country.subregions.each { |t| territories[t.code] = t.name } |
|
||||
# end |
|
||||
# render json: territories.to_json |
|
||||
#end |
|
||||
|
|
||||
# def translations |
|
||||
# #if !current_user |
|
||||
# # raise ActiveRecord::PremissionDenied |
|
||||
# #end |
|
||||
# @lang = params[:lang] |
|
||||
# @translations = is_test? ? {} : I18n.backend.get_translation_info |
|
||||
# I18n.config.enforce_available_locales = false |
|
||||
# end |
|
||||
|
|
||||
# def translation_list |
|
||||
# if !current_user && is_production? |
|
||||
# raise ActiveRecord::PremissionDenied |
|
||||
# end |
|
||||
# total = 0 |
|
||||
# complete = 0 |
|
||||
# @completeness = Hash.new |
|
||||
# translation_info = I18n.backend.get_translation_info() |
|
||||
# translation_info.each { |k,v| |
|
||||
# #total += 1 |
|
||||
# #complete += v['languages'].include?(lang.to_s) ? 1 : 0 |
|
||||
# v['languages'].each { |l| |
|
||||
# @completeness[l] ||= 0 |
|
||||
# @completeness[l] += 1 |
|
||||
# } |
|
||||
# } |
|
||||
# #@test = total ? complete / total : 0 |
|
||||
# @total_translations = translation_info.size() |
|
||||
# @language_codes = I18n.backend.get_language_codes().select { |s| s }.sort{ | a1, a2 | |
|
||||
# c2 = @completeness.has_key?(a2.to_s) ? @completeness[a2.to_s] : 0 |
|
||||
# c1 = @completeness.has_key?(a1.to_s) ? @completeness[a1.to_s] : 0 |
|
||||
# c1 == c2 ? a1 <=> a2 : c2 <=> c1 |
|
||||
# } |
|
||||
# end |
|
||||
|
|
||||
def robots |
|
||||
robot = is_production? && !is_test_server? ? 'live' : 'dev' |
|
||||
render :text => File.read("config/robots-#{robot}.txt"), :content_type => 'text/plain' |
|
||||
end |
|
||||
|
|
||||
# private |
|
||||
# def store_translations(locale, data, options = {}) |
|
||||
# escape = options.fetch(:escape, true) |
|
||||
# I18n.backend.flatten_translations(locale, data, escape, false).each do |key, value| |
|
||||
# t = Translation.find_or_create_by!(locale: locale.to_s, key: key.to_s) |
|
||||
# t.value = value |
|
||||
# t.save |
|
||||
# end |
|
||||
# I18n.backend.reload! |
|
||||
# end |
|
||||
|
|
||||
end |
|
@ -1,67 +0,0 @@ |
|||||
class RegistrationFormFieldsController < ApplicationController |
|
||||
before_action :set_registration_form_field, only: [:show, :edit, :update, :destroy] |
|
||||
|
|
||||
# GET /registration_form_fields |
|
||||
def index |
|
||||
@registration_form_fields = RegistrationFormField.all |
|
||||
end |
|
||||
|
|
||||
# GET /registration_form_fields/1 |
|
||||
def show |
|
||||
end |
|
||||
|
|
||||
# GET /registration_form_fields/new |
|
||||
def new |
|
||||
@registration_form_field = RegistrationFormField.new |
|
||||
end |
|
||||
|
|
||||
# GET /registration_form_fields/1/edit |
|
||||
def edit |
|
||||
end |
|
||||
|
|
||||
# POST /registration_form_fields |
|
||||
def create |
|
||||
@registration_form_field = RegistrationFormField.new(registration_form_field_params) |
|
||||
ajax_return(@registration_form_field.save) |
|
||||
end |
|
||||
|
|
||||
# PATCH/PUT /registration_form_fields/1 |
|
||||
def update |
|
||||
ajax_return(@registration_form_field.update(registration_form_field_params)) |
|
||||
end |
|
||||
|
|
||||
# DELETE /registration_form_fields/1 |
|
||||
def destroy |
|
||||
@registration_form_field.destroy |
|
||||
redirect_to registration_form_fields_url, notice: 'Registration form field was successfully destroyed.' |
|
||||
end |
|
||||
|
|
||||
private |
|
||||
def ajax_return(success) |
|
||||
if params[:conference_id] |
|
||||
@conference = Conference.find(params[:conference_id]) |
|
||||
@registration_form_fields = RegistrationFormField.where(["id NOT IN (?)", @conference.registration_form_fields.map(&:id)]) |
|
||||
end |
|
||||
if success |
|
||||
@registration_form_field = RegistrationFormField.new |
|
||||
end |
|
||||
|
|
||||
form = render_to_string :partial => 'form' |
|
||||
list = render_to_string :partial => 'list' |
|
||||
render json: {form: form, list: list} |
|
||||
end |
|
||||
# Use callbacks to share common setup or constraints between actions. |
|
||||
def set_registration_form_field |
|
||||
@registration_form_field = RegistrationFormField.find(params[:id]) |
|
||||
end |
|
||||
|
|
||||
# Only allow a trusted parameter "white list" through. |
|
||||
def registration_form_field_params |
|
||||
rff_params = params.require(:registration_form_field) |
|
||||
allowed = RegistrationFormField::GetNonOptionKeys(rff_params[:field_type], rff_params) |
|
||||
p = rff_params.send('permit', *allowed)#permit(:title, :help, :required, :field_type, :options, :is_retired) |
|
||||
p[:options] = RegistrationFormField::GetOptions(rff_params[:field_type], rff_params).to_json.to_s |
|
||||
p[:field_type] = rff_params[:field_type] |
|
||||
p |
|
||||
end |
|
||||
end |
|
@ -1,58 +0,0 @@ |
|||||
class UserOrganizationRelationshipsController < ApplicationController |
|
||||
before_action :set_user_organization_relationship, only: [:show, :edit, :update, :destroy] |
|
||||
|
|
||||
# GET /user_organization_relationships |
|
||||
def index |
|
||||
@user_organization_relationships = UserOrganizationRelationship.all |
|
||||
end |
|
||||
|
|
||||
# GET /user_organization_relationships/1 |
|
||||
def show |
|
||||
end |
|
||||
|
|
||||
# GET /user_organization_relationships/new |
|
||||
def new |
|
||||
@user_organization_relationship = UserOrganizationRelationship.new |
|
||||
end |
|
||||
|
|
||||
# GET /user_organization_relationships/1/edit |
|
||||
def edit |
|
||||
end |
|
||||
|
|
||||
# POST /user_organization_relationships |
|
||||
def create |
|
||||
@user_organization_relationship = UserOrganizationRelationship.new(user_organization_relationship_params) |
|
||||
|
|
||||
if @user_organization_relationship.save |
|
||||
redirect_to @user_organization_relationship, notice: 'User organization relationship was successfully created.' |
|
||||
else |
|
||||
render action: 'new' |
|
||||
end |
|
||||
end |
|
||||
|
|
||||
# PATCH/PUT /user_organization_relationships/1 |
|
||||
def update |
|
||||
if @user_organization_relationship.update(user_organization_relationship_params) |
|
||||
redirect_to @user_organization_relationship, notice: 'User organization relationship was successfully updated.' |
|
||||
else |
|
||||
render action: 'edit' |
|
||||
end |
|
||||
end |
|
||||
|
|
||||
# DELETE /user_organization_relationships/1 |
|
||||
def destroy |
|
||||
@user_organization_relationship.destroy |
|
||||
redirect_to user_organization_relationships_url, notice: 'User organization relationship was successfully destroyed.' |
|
||||
end |
|
||||
|
|
||||
private |
|
||||
# Use callbacks to share common setup or constraints between actions. |
|
||||
def set_user_organization_relationship |
|
||||
@user_organization_relationship = UserOrganizationRelationship.find(params[:id]) |
|
||||
end |
|
||||
|
|
||||
# Only allow a trusted parameter "white list" through. |
|
||||
def user_organization_relationship_params |
|
||||
params.require(:user_organization_relationship).permit(:user_id, :organization_id, :relationship) |
|
||||
end |
|
||||
end |
|
@ -1,20 +0,0 @@ |
|||||
class UserSessionsController < ApplicationController |
|
||||
def new |
|
||||
session[:return_to] ||= request.referer |
|
||||
@user = User.new |
|
||||
end |
|
||||
|
|
||||
def create |
|
||||
if @user = login(params[:email], params[:password]) |
|
||||
redirect_to session.delete(:return_to) || 'pages#home' |
|
||||
else |
|
||||
flash.now[:alert] = "Login failed" |
|
||||
render action: "new" |
|
||||
end |
|
||||
end |
|
||||
|
|
||||
def destroy |
|
||||
logout |
|
||||
redirect_to(:users, notice: 'Logged out!') |
|
||||
end |
|
||||
end |
|
@ -1,68 +0,0 @@ |
|||||
include ApplicationHelper |
|
||||
|
|
||||
class UsersController < ApplicationController |
|
||||
before_action :set_user, only: [:show, :edit, :update, :destroy] |
|
||||
|
|
||||
# GET /users |
|
||||
def index |
|
||||
@users = User.all |
|
||||
end |
|
||||
|
|
||||
# GET /users/1 |
|
||||
def show |
|
||||
end |
|
||||
|
|
||||
# GET /users/new |
|
||||
def new |
|
||||
@user = User.new |
|
||||
end |
|
||||
|
|
||||
# GET /users/1/edit |
|
||||
def edit |
|
||||
end |
|
||||
|
|
||||
# POST /users |
|
||||
def create |
|
||||
@user = User.new(user_params) |
|
||||
|
|
||||
if @user.save |
|
||||
redirect_to @user, notice: 'User was successfully created.' |
|
||||
else |
|
||||
render action: 'new' |
|
||||
end |
|
||||
end |
|
||||
|
|
||||
# PATCH/PUT /users/1 |
|
||||
def update |
|
||||
#if !user_params[:password] || user_params[:password].length < 1 |
|
||||
# puts "\nNo Password! ( " + @user.to_json.to_s + " \n" |
|
||||
# user_params[:password] = user_params[:password_confirmation] = 'Oha1otbt!@#' |
|
||||
#end |
|
||||
if @user.update(user_params) |
|
||||
redirect_to @user, notice: 'User was successfully updated.' |
|
||||
else |
|
||||
render action: 'edit' |
|
||||
end |
|
||||
end |
|
||||
|
|
||||
# DELETE /users/1 |
|
||||
def destroy |
|
||||
@user.destroy |
|
||||
redirect_to users_url, notice: 'User was successfully destroyed.' |
|
||||
end |
|
||||
|
|
||||
private |
|
||||
# Use callbacks to share common setup or constraints between actions. |
|
||||
def set_user |
|
||||
@user = User.find(params[:id]) |
|
||||
end |
|
||||
|
|
||||
# Only allow a trusted parameter "white list" through. |
|
||||
def session_params |
|
||||
params.require(:user).permit(:username, :email, :password, :avatar, :avatar_cache) |
|
||||
end |
|
||||
|
|
||||
def user_params |
|
||||
params.require(:user).permit(:username, :email, :password, :password_confirmation, :avatar, :avatar_cache, :remove_avatar) |
|
||||
end |
|
||||
end |
|
@ -1,2 +0,0 @@ |
|||||
class VersionsController < ApplicationController |
|
||||
end |
|
@ -1,58 +0,0 @@ |
|||||
class WorkshopFacilitatorsController < ApplicationController |
|
||||
before_action :set_workshop_facilitator, only: [:show, :edit, :update, :destroy] |
|
||||
|
|
||||
# GET /workshop_facilitators |
|
||||
def index |
|
||||
@workshop_facilitators = WorkshopFacilitator.all |
|
||||
end |
|
||||
|
|
||||
# GET /workshop_facilitators/1 |
|
||||
def show |
|
||||
end |
|
||||
|
|
||||
# GET /workshop_facilitators/new |
|
||||
def new |
|
||||
@workshop_facilitator = WorkshopFacilitator.new |
|
||||
end |
|
||||
|
|
||||
# GET /workshop_facilitators/1/edit |
|
||||
def edit |
|
||||
end |
|
||||
|
|
||||
# POST /workshop_facilitators |
|
||||
def create |
|
||||
@workshop_facilitator = WorkshopFacilitator.new(workshop_facilitator_params) |
|
||||
|
|
||||
if @workshop_facilitator.save |
|
||||
redirect_to @workshop_facilitator, notice: 'Workshop facilitator was successfully created.' |
|
||||
else |
|
||||
render action: 'new' |
|
||||
end |
|
||||
end |
|
||||
|
|
||||
# PATCH/PUT /workshop_facilitators/1 |
|
||||
def update |
|
||||
if @workshop_facilitator.update(workshop_facilitator_params) |
|
||||
redirect_to @workshop_facilitator, notice: 'Workshop facilitator was successfully updated.' |
|
||||
else |
|
||||
render action: 'edit' |
|
||||
end |
|
||||
end |
|
||||
|
|
||||
# DELETE /workshop_facilitators/1 |
|
||||
def destroy |
|
||||
@workshop_facilitator.destroy |
|
||||
redirect_to workshop_facilitators_url, notice: 'Workshop facilitator was successfully destroyed.' |
|
||||
end |
|
||||
|
|
||||
private |
|
||||
# Use callbacks to share common setup or constraints between actions. |
|
||||
def set_workshop_facilitator |
|
||||
@workshop_facilitator = WorkshopFacilitator.find(params[:id]) |
|
||||
end |
|
||||
|
|
||||
# Only allow a trusted parameter "white list" through. |
|
||||
def workshop_facilitator_params |
|
||||
params.require(:workshop_facilitator).permit(:user_id, :workshop_id, :role) |
|
||||
end |
|
||||
end |
|
@ -1,58 +0,0 @@ |
|||||
class WorkshopPresentationStylesController < ApplicationController |
|
||||
before_action :set_workshop_presentation_style, only: [:show, :edit, :update, :destroy] |
|
||||
|
|
||||
# GET /workshop_presentation_styles |
|
||||
def index |
|
||||
@workshop_presentation_styles = WorkshopPresentationStyle.all |
|
||||
end |
|
||||
|
|
||||
# GET /workshop_presentation_styles/1 |
|
||||
def show |
|
||||
end |
|
||||
|
|
||||
# GET /workshop_presentation_styles/new |
|
||||
def new |
|
||||
@workshop_presentation_style = WorkshopPresentationStyle.new |
|
||||
end |
|
||||
|
|
||||
# GET /workshop_presentation_styles/1/edit |
|
||||
def edit |
|
||||
end |
|
||||
|
|
||||
# POST /workshop_presentation_styles |
|
||||
def create |
|
||||
@workshop_presentation_style = WorkshopPresentationStyle.new(workshop_presentation_style_params) |
|
||||
|
|
||||
if @workshop_presentation_style.save |
|
||||
redirect_to @workshop_presentation_style, notice: 'Workshop presentation style was successfully created.' |
|
||||
else |
|
||||
render action: 'new' |
|
||||
end |
|
||||
end |
|
||||
|
|
||||
# PATCH/PUT /workshop_presentation_styles/1 |
|
||||
def update |
|
||||
if @workshop_presentation_style.update(workshop_presentation_style_params) |
|
||||
redirect_to @workshop_presentation_style, notice: 'Workshop presentation style was successfully updated.' |
|
||||
else |
|
||||
render action: 'edit' |
|
||||
end |
|
||||
end |
|
||||
|
|
||||
# DELETE /workshop_presentation_styles/1 |
|
||||
def destroy |
|
||||
@workshop_presentation_style.destroy |
|
||||
redirect_to workshop_presentation_styles_url, notice: 'Workshop presentation style was successfully destroyed.' |
|
||||
end |
|
||||
|
|
||||
private |
|
||||
# Use callbacks to share common setup or constraints between actions. |
|
||||
def set_workshop_presentation_style |
|
||||
@workshop_presentation_style = WorkshopPresentationStyle.find(params[:id]) |
|
||||
end |
|
||||
|
|
||||
# Only allow a trusted parameter "white list" through. |
|
||||
def workshop_presentation_style_params |
|
||||
params.require(:workshop_presentation_style).permit(:name, :slug, :info) |
|
||||
end |
|
||||
end |
|
@ -1,58 +0,0 @@ |
|||||
class WorkshopRequestedResourcesController < ApplicationController |
|
||||
before_action :set_workshop_requested_resource, only: [:show, :edit, :update, :destroy] |
|
||||
|
|
||||
# GET /workshop_requested_resources |
|
||||
def index |
|
||||
@workshop_requested_resources = WorkshopRequestedResource.all |
|
||||
end |
|
||||
|
|
||||
# GET /workshop_requested_resources/1 |
|
||||
def show |
|
||||
end |
|
||||
|
|
||||
# GET /workshop_requested_resources/new |
|
||||
def new |
|
||||
@workshop_requested_resource = WorkshopRequestedResource.new |
|
||||
end |
|
||||
|
|
||||
# GET /workshop_requested_resources/1/edit |
|
||||
def edit |
|
||||
end |
|
||||
|
|
||||
# POST /workshop_requested_resources |
|
||||
def create |
|
||||
@workshop_requested_resource = WorkshopRequestedResource.new(workshop_requested_resource_params) |
|
||||
|
|
||||
if @workshop_requested_resource.save |
|
||||
redirect_to @workshop_requested_resource, notice: 'Workshop requested resource was successfully created.' |
|
||||
else |
|
||||
render action: 'new' |
|
||||
end |
|
||||
end |
|
||||
|
|
||||
# PATCH/PUT /workshop_requested_resources/1 |
|
||||
def update |
|
||||
if @workshop_requested_resource.update(workshop_requested_resource_params) |
|
||||
redirect_to @workshop_requested_resource, notice: 'Workshop requested resource was successfully updated.' |
|
||||
else |
|
||||
render action: 'edit' |
|
||||
end |
|
||||
end |
|
||||
|
|
||||
# DELETE /workshop_requested_resources/1 |
|
||||
def destroy |
|
||||
@workshop_requested_resource.destroy |
|
||||
redirect_to workshop_requested_resources_url, notice: 'Workshop requested resource was successfully destroyed.' |
|
||||
end |
|
||||
|
|
||||
private |
|
||||
# Use callbacks to share common setup or constraints between actions. |
|
||||
def set_workshop_requested_resource |
|
||||
@workshop_requested_resource = WorkshopRequestedResource.find(params[:id]) |
|
||||
end |
|
||||
|
|
||||
# Only allow a trusted parameter "white list" through. |
|
||||
def workshop_requested_resource_params |
|
||||
params.require(:workshop_requested_resource).permit(:workshop_id, :workshop_resource_id, :status) |
|
||||
end |
|
||||
end |
|
@ -1,58 +0,0 @@ |
|||||
class WorkshopResourcesController < ApplicationController |
|
||||
before_action :set_workshop_resource, only: [:show, :edit, :update, :destroy] |
|
||||
|
|
||||
# GET /workshop_resources |
|
||||
def index |
|
||||
@workshop_resources = WorkshopResource.all |
|
||||
end |
|
||||
|
|
||||
# GET /workshop_resources/1 |
|
||||
def show |
|
||||
end |
|
||||
|
|
||||
# GET /workshop_resources/new |
|
||||
def new |
|
||||
@workshop_resource = WorkshopResource.new |
|
||||
end |
|
||||
|
|
||||
# GET /workshop_resources/1/edit |
|
||||
def edit |
|
||||
end |
|
||||
|
|
||||
# POST /workshop_resources |
|
||||
def create |
|
||||
@workshop_resource = WorkshopResource.new(workshop_resource_params) |
|
||||
|
|
||||
if @workshop_resource.save |
|
||||
redirect_to @workshop_resource, notice: 'Workshop resource was successfully created.' |
|
||||
else |
|
||||
render action: 'new' |
|
||||
end |
|
||||
end |
|
||||
|
|
||||
# PATCH/PUT /workshop_resources/1 |
|
||||
def update |
|
||||
if @workshop_resource.update(workshop_resource_params) |
|
||||
redirect_to @workshop_resource, notice: 'Workshop resource was successfully updated.' |
|
||||
else |
|
||||
render action: 'edit' |
|
||||
end |
|
||||
end |
|
||||
|
|
||||
# DELETE /workshop_resources/1 |
|
||||
def destroy |
|
||||
@workshop_resource.destroy |
|
||||
redirect_to workshop_resources_url, notice: 'Workshop resource was successfully destroyed.' |
|
||||
end |
|
||||
|
|
||||
private |
|
||||
# Use callbacks to share common setup or constraints between actions. |
|
||||
def set_workshop_resource |
|
||||
@workshop_resource = WorkshopResource.find(params[:id]) |
|
||||
end |
|
||||
|
|
||||
# Only allow a trusted parameter "white list" through. |
|
||||
def workshop_resource_params |
|
||||
params.require(:workshop_resource).permit(:name, :slug, :info) |
|
||||
end |
|
||||
end |
|
@ -1,58 +0,0 @@ |
|||||
class WorkshopStreamsController < ApplicationController |
|
||||
before_action :set_workshop_stream, only: [:show, :edit, :update, :destroy] |
|
||||
|
|
||||
# GET /workshop_streams |
|
||||
def index |
|
||||
@workshop_streams = WorkshopStream.all |
|
||||
end |
|
||||
|
|
||||
# GET /workshop_streams/1 |
|
||||
def show |
|
||||
end |
|
||||
|
|
||||
# GET /workshop_streams/new |
|
||||
def new |
|
||||
@workshop_stream = WorkshopStream.new |
|
||||
end |
|
||||
|
|
||||
# GET /workshop_streams/1/edit |
|
||||
def edit |
|
||||
end |
|
||||
|
|
||||
# POST /workshop_streams |
|
||||
def create |
|
||||
@workshop_stream = WorkshopStream.new(workshop_stream_params) |
|
||||
|
|
||||
if @workshop_stream.save |
|
||||
redirect_to @workshop_stream, notice: 'Workshop stream was successfully created.' |
|
||||
else |
|
||||
render action: 'new' |
|
||||
end |
|
||||
end |
|
||||
|
|
||||
# PATCH/PUT /workshop_streams/1 |
|
||||
def update |
|
||||
if @workshop_stream.update(workshop_stream_params) |
|
||||
redirect_to @workshop_stream, notice: 'Workshop stream was successfully updated.' |
|
||||
else |
|
||||
render action: 'edit' |
|
||||
end |
|
||||
end |
|
||||
|
|
||||
# DELETE /workshop_streams/1 |
|
||||
def destroy |
|
||||
@workshop_stream.destroy |
|
||||
redirect_to workshop_streams_url, notice: 'Workshop stream was successfully destroyed.' |
|
||||
end |
|
||||
|
|
||||
private |
|
||||
# Use callbacks to share common setup or constraints between actions. |
|
||||
def set_workshop_stream |
|
||||
@workshop_stream = WorkshopStream.find(params[:id]) |
|
||||
end |
|
||||
|
|
||||
# Only allow a trusted parameter "white list" through. |
|
||||
def workshop_stream_params |
|
||||
params.require(:workshop_stream).permit(:name, :slug, :info) |
|
||||
end |
|
||||
end |
|
@ -1,69 +0,0 @@ |
|||||
class WorkshopsController < ApplicationController |
|
||||
before_action :set_workshop, only: [:show, :edit, :update, :destroy] |
|
||||
|
|
||||
# GET /workshops |
|
||||
def index |
|
||||
set_conference |
|
||||
@workshops = Workshop.where(['conference_id = ?', @conference.id]) |
|
||||
end |
|
||||
|
|
||||
# GET /workshops/1 |
|
||||
def show |
|
||||
set_workshop |
|
||||
set_conference |
|
||||
end |
|
||||
|
|
||||
# GET /workshops/new |
|
||||
def new |
|
||||
set_conference |
|
||||
@workshop = Workshop.new |
|
||||
end |
|
||||
|
|
||||
# GET /workshops/1/edit |
|
||||
def edit |
|
||||
set_conference |
|
||||
end |
|
||||
|
|
||||
# POST /workshops |
|
||||
def create |
|
||||
set_conference |
|
||||
@workshop = Workshop.new(workshop_params) |
|
||||
|
|
||||
if @workshop.save |
|
||||
redirect_to conference_workshop_path(@conference, @workshop), notice: 'Workshop was successfully created.' |
|
||||
else |
|
||||
render action: 'new' |
|
||||
end |
|
||||
end |
|
||||
|
|
||||
# PATCH/PUT /workshops/1 |
|
||||
def update |
|
||||
set_conference |
|
||||
if @workshop.update(workshop_params) |
|
||||
redirect_to conference_workshop_path(@conference, @workshop), notice: 'Workshop was successfully updated.' |
|
||||
else |
|
||||
render action: 'edit' |
|
||||
end |
|
||||
end |
|
||||
|
|
||||
# DELETE /workshops/1 |
|
||||
def destroy |
|
||||
@workshop.destroy |
|
||||
redirect_to workshops_url, notice: 'Workshop was successfully destroyed.' |
|
||||
end |
|
||||
|
|
||||
private |
|
||||
# Use callbacks to share common setup or constraints between actions. |
|
||||
def set_workshop |
|
||||
@workshop = Workshop.find_by(slug: params[:workshop_slug] || params[:slug]) |
|
||||
end |
|
||||
|
|
||||
def set_conference |
|
||||
@conference = Conference.find_by(slug: params[:conference_slug] || params[:slug]) |
|
||||
end |
|
||||
|
|
||||
# Only allow a trusted parameter "white list" through. |
|
||||
def workshop_params |
|
||||
params.require(:workshop).permit(:title, :slug, :info, :conference_id, :workshop_stream_id, :workshop_presentation_style, :min_facilitators, :location_id, :start_time, :end_time) |
|
||||
end |
|
||||
end |
|
@ -1,34 +0,0 @@ |
|||||
= form_for @event do |f| |
|
||||
- if @event.errors.any? |
|
||||
#error_explanation |
|
||||
%h2= "#{pluralize(@event.errors.count, "error")} prohibited this event from being saved:" |
|
||||
%ul |
|
||||
- @event.errors.full_messages.each do |msg| |
|
||||
%li= msg |
|
||||
|
|
||||
.field |
|
||||
= f.label :title |
|
||||
= f.text_field :title |
|
||||
.field |
|
||||
= f.label :slug |
|
||||
= f.text_field :slug |
|
||||
.field |
|
||||
= f.label :event_type_id |
|
||||
= f.number_field :event_type_id |
|
||||
.field |
|
||||
= f.label :conference |
|
||||
= f.text_field :conference |
|
||||
.field |
|
||||
= f.label :info |
|
||||
= f.text_area :info |
|
||||
.field |
|
||||
= f.label :location |
|
||||
= f.text_field :location |
|
||||
.field |
|
||||
= f.label :start_time |
|
||||
= f.datetime_select :start_time |
|
||||
.field |
|
||||
= f.label :end_time |
|
||||
= f.datetime_select :end_time |
|
||||
.actions |
|
||||
= f.submit 'Save' |
|
@ -1,22 +0,0 @@ |
|||||
= render 'conferences/page_header', :page_key => (@event ? 'Edit_Event' : 'New_Event') |
|
||||
%article |
|
||||
= form_tag save_event_path(@this_conference.slug), class: 'composition' do |
|
||||
= row do |
|
||||
= columns(medium: 9) do |
|
||||
= (hidden_field_tag :event_id, @event.id) if @event |
|
||||
.text-field.input-field.big |
|
||||
= label_tag :title |
|
||||
= text_field_tag :title, @event ? @event.title : nil, :required => true |
|
||||
= columns(medium: 3) do |
|
||||
.select-field.input-field |
|
||||
= label_tag :event_type do |
|
||||
= select_tag :event_type, options_for_select([:event, :meal], @event ? @event.event_type : nil), :include_blank => true |
|
||||
=_'forms.labels.generic.event_type' |
|
||||
= row do |
|
||||
= columns(medium: 12) do |
|
||||
.text-area-field.input-field |
|
||||
= label_tag :info |
|
||||
= text_area_tag :info, @event ? @event.info : nil, :required => true |
|
||||
= columns(medium: 12) do |
|
||||
.actions.right |
|
||||
= button_tag :save, :value => :save |
|
@ -1,33 +0,0 @@ |
|||||
%h1 Listing events |
|
||||
|
|
||||
%table |
|
||||
%tr |
|
||||
%th Title |
|
||||
%th Slug |
|
||||
%th Event type |
|
||||
%th Conference |
|
||||
%th Info |
|
||||
%th Location |
|
||||
%th Start time |
|
||||
%th End time |
|
||||
%th |
|
||||
%th |
|
||||
%th |
|
||||
|
|
||||
- @events.each do |event| |
|
||||
%tr |
|
||||
%td= event.title |
|
||||
%td= event.slug |
|
||||
%td= event.event_type_id |
|
||||
%td= event.conference |
|
||||
%td= event.info |
|
||||
%td= event.location |
|
||||
%td= event.start_time |
|
||||
%td= event.end_time |
|
||||
%td= link_to 'Show', event |
|
||||
%td= link_to 'Edit', edit_event_path(event) |
|
||||
%td= link_to 'Destroy', event, :method => :delete, :data => { :confirm => 'Are you sure?' } |
|
||||
|
|
||||
%br |
|
||||
|
|
||||
= link_to 'New Event', new_event_path |
|
@ -1,5 +0,0 @@ |
|||||
%h1 New event |
|
||||
|
|
||||
= render 'form' |
|
||||
|
|
||||
= link_to 'Back', events_path |
|
@ -1,30 +0,0 @@ |
|||||
%p#notice= notice |
|
||||
|
|
||||
%p |
|
||||
%b Title: |
|
||||
= @event.title |
|
||||
%p |
|
||||
%b Slug: |
|
||||
= @event.slug |
|
||||
%p |
|
||||
%b Event type: |
|
||||
= @event.event_type_id |
|
||||
%p |
|
||||
%b Conference: |
|
||||
= @event.conference |
|
||||
%p |
|
||||
%b Info: |
|
||||
= @event.info |
|
||||
%p |
|
||||
%b Location: |
|
||||
= @event.location |
|
||||
%p |
|
||||
%b Start time: |
|
||||
= @event.start_time |
|
||||
%p |
|
||||
%b End time: |
|
||||
= @event.end_time |
|
||||
|
|
||||
= link_to 'Edit', edit_event_path(@event) |
|
||||
\| |
|
||||
= link_to 'Back', events_path |
|
@ -1,22 +0,0 @@ |
|||||
= form_for @location do |f| |
|
||||
- if @location.errors.any? |
|
||||
#error_explanation |
|
||||
%h2= "#{pluralize(@location.errors.count, "error")} prohibited this location from being saved:" |
|
||||
%ul |
|
||||
- @location.errors.full_messages.each do |msg| |
|
||||
%li= msg |
|
||||
|
|
||||
.field |
|
||||
= f.label :title |
|
||||
= f.text_field :title |
|
||||
.field |
|
||||
= f.label :address |
|
||||
= f.text_field :address |
|
||||
.field |
|
||||
= f.label :latitude |
|
||||
= f.text_field :latitude |
|
||||
.field |
|
||||
= f.label :longitude |
|
||||
= f.text_field :longitude |
|
||||
.actions |
|
||||
= f.submit 'Save' |
|
@ -1,7 +0,0 @@ |
|||||
%h1 Editing location |
|
||||
|
|
||||
= render 'form' |
|
||||
|
|
||||
= link_to 'Show', @location |
|
||||
\| |
|
||||
= link_to 'Back', locations_path |
|
@ -1,25 +0,0 @@ |
|||||
%h1 Listing locations |
|
||||
|
|
||||
%table |
|
||||
%tr |
|
||||
%th Title |
|
||||
%th Address |
|
||||
%th Latitude |
|
||||
%th Longitude |
|
||||
%th |
|
||||
%th |
|
||||
%th |
|
||||
|
|
||||
- @locations.each do |location| |
|
||||
%tr |
|
||||
%td= location.title |
|
||||
%td= location.address |
|
||||
%td= location.latitude |
|
||||
%td= location.longitude |
|
||||
%td= link_to 'Show', location |
|
||||
%td= link_to 'Edit', edit_location_path(location) |
|
||||
%td= link_to 'Destroy', location, :method => :delete, :data => { :confirm => 'Are you sure?' } |
|
||||
|
|
||||
%br |
|
||||
|
|
||||
= link_to 'New Location', new_location_path |
|
@ -1,5 +0,0 @@ |
|||||
%h1 New location |
|
||||
|
|
||||
= render 'form' |
|
||||
|
|
||||
= link_to 'Back', locations_path |
|
@ -1,18 +0,0 @@ |
|||||
%p#notice= notice |
|
||||
|
|
||||
%p |
|
||||
%b Title: |
|
||||
= @location.title |
|
||||
%p |
|
||||
%b Address: |
|
||||
= @location.address |
|
||||
%p |
|
||||
%b Latitude: |
|
||||
= @location.latitude |
|
||||
%p |
|
||||
%b Longitude: |
|
||||
= @location.longitude |
|
||||
|
|
||||
= link_to 'Edit', edit_location_path(@location) |
|
||||
\| |
|
||||
= link_to 'Back', locations_path |
|
@ -1,20 +0,0 @@ |
|||||
= form_for @organization do |f| |
|
||||
.columns |
|
||||
= f.text_field :name |
|
||||
= f.text_field :slug |
|
||||
|
|
||||
.columns.medium-4.small-text-centered |
|
||||
= f.image_field :avatar, @organization.avatar_url |
|
||||
.columns.medium-8 |
|
||||
= f.email_field :email_address |
|
||||
= f.fields_for :locations do |b| |
|
||||
= field_set_tag 'Location' do |
|
||||
= b.country_select :country, {help: 'Select a Country'} |
|
||||
- cc = @organization.locations && @organization.locations[b.index].country ? @organization.locations[b.index].country : 'US' |
|
||||
= b.subregion_select :territory, cc, html: {class: @organization.locations[b.index].country ? 'can' : 'cant', data: {:country => cc}} |
|
||||
= b.text_field :city |
|
||||
= b.text_field :street |
|
||||
= b.text_field :postal_code |
|
||||
.columns |
|
||||
= f.text_area :info |
|
||||
= f.actions :save |
|
@ -1,6 +0,0 @@ |
|||||
= link_to organization do |
|
||||
%figure.org-mini-preview{:class => (organization.avatar.is_landscape? ? 'landscape' : 'portrait')} |
|
||||
= image_tag organization.avatar.preview.url |
|
||||
%figcaption |
|
||||
%h5= organization.name |
|
||||
%p= location(organization.locations[0]) |
|
@ -1,5 +0,0 @@ |
|||||
= link_to organization do |
|
||||
%h5 |
|
||||
= organization.name |
|
||||
%figure.org-preview.preview-tile{:style => (organization.cover? ? ('background-image: url(' + organization.cover.preview.url + ')') : nil)} |
|
||||
= image_tag organization.avatar.preview.url |
|
@ -1,5 +0,0 @@ |
|||||
- page_style :form |
|
||||
|
|
||||
= tabs! |
|
||||
.row |
|
||||
= render 'form' |
|
@ -1,13 +0,0 @@ |
|||||
|
|
||||
- page_style :form |
|
||||
|
|
||||
= tabs! |
|
||||
.row |
|
||||
= form_for @organization do |f| |
|
||||
.columns.medium-4 |
|
||||
%h2=_'organization.members.help.title', :t |
|
||||
%p=_'organization.members.help', :p |
|
||||
.columns.medium-8 |
|
||||
= f.image_field :cover, @organization.cover_url |
|
||||
= f.number_field :year_founded |
|
||||
= f.actions :save |
|
@ -1,21 +0,0 @@ |
|||||
- title _'page.Organizations' |
|
||||
- description 'Bike!Bike! list of DIY bicycle collectives, co-ops, coops, community bike projects, advocacy by country, state, provice, and city' |
|
||||
- banner_image '/assets/orgs.jpg' |
|
||||
- page_style :list |
|
||||
- content_for :banner do |
|
||||
.row |
|
||||
.columns |
|
||||
%h1=_'page.Organizations' |
|
||||
|
|
||||
- @organizations.sort_by{|k,v|k}.each do |country,territories| |
|
||||
%h2=country |
|
||||
- territories.sort_by{|k,v|k.to_s}.each do |territory,cities| |
|
||||
- if territory.is_a? String |
|
||||
%h3=territory |
|
||||
- cities.sort_by{|k,v|k}.each do |city,organizations| |
|
||||
%ul.small-block-grid-1.medium-block-grid-2.large-block-grid-3.org-list.preview-list |
|
||||
%li.city |
|
||||
%figure{:style => "background-image: url('" + static_map(CGI::escape(city+' '+country), 4, 600, 300) + "');"} |
|
||||
%h4=city |
|
||||
- organizations.each do |organization| |
|
||||
%li=render 'preview', :organization => organization |
|
@ -1,15 +0,0 @@ |
|||||
|
|
||||
- page_style :form |
|
||||
|
|
||||
= tabs! |
|
||||
.row |
|
||||
= form_for @organization do |f| |
|
||||
.columns.medium-4 |
|
||||
%h2=_'organization.members.help.title', :t |
|
||||
%p=_'organization.members.help', :p |
|
||||
.columns.medium-8 |
|
||||
.clearfix |
|
||||
= f.fields_for :user_organization_relationships, :include_id => true do |u| |
|
||||
= u.user_select_field :id, @organization.users[u.index], {:relationship => @organization.user_organization_relationships[u.index].relationship || true} |
|
||||
-#attrs: [@organization.user_organization_relationships[u.index]] |
|
||||
= f.actions :save |
|
@ -1,5 +0,0 @@ |
|||||
-# banner_title 'Register a New Organization' |
|
||||
- page_style :form |
|
||||
|
|
||||
.row |
|
||||
= render 'form' |
|
@ -1,25 +0,0 @@ |
|||||
- territory = Carmen::Country.coded(@organization.locations[0].country).subregions.coded(@organization.locations[0].territory) |
|
||||
- location_name = @organization.locations[0].city + (territory ? ' ' + territory.name : '') + ', ' + Carmen::Country.coded(@organization.locations[0].country).name |
|
||||
|
|
||||
- title @organization.name + ' (' + location_name + ')' |
|
||||
- description "#{@organization.name} is a bicycle collective, co-op, community bike project, or advocacy group in #{location_name}" |
|
||||
- banner_image @organization.cover_url, id: @organization.cover_attribution_id, name: @organization.cover_attribution_name, user_id: @organization.cover_attribution_user_id, src: @organization.cover_attribution_src |
|
||||
- page_style 'article' |
|
||||
- content_for :banner do |
|
||||
.row{:class => (@organization.avatar.is_landscape? ? 'landscape' : 'portrait')} |
|
||||
.columns{:class => (@organization.avatar.is_landscape? ? nil : ['medium-6', 'medium-push-6'])} |
|
||||
%figure |
|
||||
= image_tag(@organization.avatar.url) |
|
||||
.columns.info{:class => (@organization.avatar.is_landscape? ? nil : ['medium-6', 'medium-pull-6'])} |
|
||||
%h1=@organization.name |
|
||||
- territory = Carmen::Country.coded(@organization.locations[0].country).subregions.coded(@organization.locations[0].territory) |
|
||||
%h2=location_name |
|
||||
|
|
||||
%p#notice= notice |
|
||||
|
|
||||
= tabs! |
|
||||
|
|
||||
%article.row |
|
||||
.columns.large-10 |
|
||||
%h2=('About '+@organization.name) |
|
||||
=p @organization, :info |
|
@ -1,10 +0,0 @@ |
|||||
- content_for :banner do |
|
||||
- image = image_path('grafitti.jpg') |
|
||||
#header-title.short{style: capable_of(:svg) ? nil : "background-image: url(#{image})"} |
|
||||
- if capable_of(:svg) |
|
||||
= render 'application/banner_image.svg', {:image => image} |
|
||||
%h1=_'page_titles.Translations' |
|
||||
|
|
||||
%h1=_'translate.Translations' |
|
||||
%article=render 'translations/list' |
|
||||
|
|
@ -1,8 +0,0 @@ |
|||||
- content_for :banner do |
|
||||
- image = image_path('grafitti.jpg') |
|
||||
#header-title.short{style: capable_of(:svg) ? nil : "background-image: url(#{image})"} |
|
||||
- if capable_of(:svg) |
|
||||
= render 'application/banner_image.svg', {:image => image} |
|
||||
%h1=_'page_titles.Translations' |
|
||||
|
|
||||
%article=render 'translations/list' |
|
@ -1,6 +0,0 @@ |
|||||
- content_for :banner do |
|
||||
#header-title.no-image |
|
||||
%h1=_'translate.translation_pages.Locale_Translations', @locale[:name], :vars => {:language => @locale[:name]} |
|
||||
.lingua-franca-translations |
|
||||
=render 'translations/translation_control' |
|
||||
%article=render 'translations/key_wrapper' |
|
@ -1,12 +0,0 @@ |
|||||
= form_for @user, :html => (@user && @user.id ? {:multipart => true} : {}) do |f| |
|
||||
%div{:class => (@user.id ? 'columns medium-6' : '')} |
|
||||
= f.text_field :username |
|
||||
= f.email_field :email |
|
||||
- if !@user.id |
|
||||
= f.password_field :password |
|
||||
= f.password_field :password_confirmation |
|
||||
= f.actions :register |
|
||||
- if @user.id |
|
||||
.columns.medium-6 |
|
||||
= f.image_field :avatar, @user.avatar_url |
|
||||
= f.actions :save |
|
@ -1,8 +0,0 @@ |
|||||
- banner_title @user.username |
|
||||
|
|
||||
.row |
|
||||
= render 'form' |
|
||||
|
|
||||
= link_to 'Show', @user |
|
||||
\| |
|
||||
= link_to 'Back', users_path |
|
@ -1,22 +0,0 @@ |
|||||
- banner_title 'Listing users' |
|
||||
|
|
||||
.row |
|
||||
%table |
|
||||
%tr |
|
||||
%th Email |
|
||||
%th Crypted password |
|
||||
%th Salt |
|
||||
%th |
|
||||
%th |
|
||||
%th |
|
||||
|
|
||||
- @users.each do |user| |
|
||||
%tr |
|
||||
%td= user.email |
|
||||
%td= user.crypted_password |
|
||||
%td= user.salt |
|
||||
%td= link_to 'Show', user |
|
||||
%td= link_to 'Edit', edit_user_path(user) |
|
||||
%td= link_to 'Destroy', user, :method => :delete, :data => { :confirm => 'Are you sure?' } |
|
||||
|
|
||||
= link_to 'New User', new_user_path |
|
@ -1,6 +0,0 @@ |
|||||
- banner_title 'Create an Account' |
|
||||
|
|
||||
.row |
|
||||
= render 'form' |
|
||||
|
|
||||
= link_to 'Back', users_path |
|
@ -1,14 +0,0 @@ |
|||||
- banner_title @user.username |
|
||||
|
|
||||
%p#notice= notice |
|
||||
|
|
||||
.row |
|
||||
|
|
||||
%p |
|
||||
%b Email: |
|
||||
= @user.email |
|
||||
= image_tag(@user.avatar_url(:thumb)) if @user.avatar? |
|
||||
|
|
||||
= link_to 'Edit', edit_user_path(@user) |
|
||||
\| |
|
||||
= link_to 'Back', users_path |
|
File diff suppressed because it is too large
Loading…
Reference in new issue