mirror of
https://github.com/openSUSE/osem.git
synced 2025-12-23 22:28:15 -05:00
Merge branch 'master' into chennesFixAreaTypo
This commit is contained in:
2
Gemfile
2
Gemfile
@@ -193,7 +193,7 @@ gem 'icalendar'
|
||||
gem 'lograge'
|
||||
|
||||
group :development do
|
||||
# for static code analisys
|
||||
# for static code analysis
|
||||
gem 'rubocop', require: false
|
||||
gem 'rubocop-rspec', require: false
|
||||
gem 'rubocop-rails', require: false
|
||||
|
||||
@@ -423,7 +423,7 @@ GEM
|
||||
puma (6.6.1)
|
||||
nio4r (~> 2.0)
|
||||
racc (1.8.1)
|
||||
rack (3.1.17)
|
||||
rack (3.1.18)
|
||||
rack-openid (1.4.2)
|
||||
rack (>= 1.1.0)
|
||||
ruby-openid (>= 2.1.8)
|
||||
|
||||
@@ -94,7 +94,7 @@ module Admin
|
||||
elsif user.add_role @role.name, role_resource
|
||||
flash[:notice] = "Successfully added role #{@role.name} to user #{user.email}"
|
||||
else
|
||||
flash[:error] = "Coud not add role #{@role.name} to #{user.email}"
|
||||
flash[:error] = "Could not add role #{@role.name} to #{user.email}"
|
||||
end
|
||||
|
||||
respond_to do |format|
|
||||
|
||||
@@ -59,7 +59,7 @@ module Admin
|
||||
return unless @conference.sponsorship_levels.empty?
|
||||
|
||||
redirect_to admin_conference_sponsorship_levels_path(conference_id: @conference.short_title),
|
||||
alert: 'You need to create atleast one sponsorship level to add a sponsor'
|
||||
alert: 'You need to create at least one sponsorship level to add a sponsor'
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
@@ -45,7 +45,7 @@ module Admin
|
||||
end
|
||||
|
||||
elsif @version.event == 'create' && @version.item
|
||||
# if @version represets a create event and is not currently deleted
|
||||
# if @version represents a create event and is not currently deleted
|
||||
@version.item.destroy
|
||||
flash[:notice] = 'The selected change was successfully reverted'
|
||||
|
||||
|
||||
@@ -39,7 +39,7 @@ class SchedulesController < ApplicationController
|
||||
@current_day = @conference.current_conference_day
|
||||
@day = @current_day.present? ? @current_day : @dates.first
|
||||
if @current_day
|
||||
# the schedule takes you to the current time if it is beetween the start and the end time.
|
||||
# the schedule takes you to the current time if it is between the start and the end time.
|
||||
@hour_column = @conference.hours_from_start_time(@conf_start, @conference.end_hour)
|
||||
end
|
||||
# Ids of the @event_schedules of confrmed self_organized tracks along with the selected_schedule_id
|
||||
|
||||
@@ -17,7 +17,7 @@ module DateTimeHelper
|
||||
##
|
||||
# Gets a datetime object
|
||||
# ====Returns
|
||||
# * +String+ -> formated datetime object
|
||||
# * +String+ -> formatted datetime object
|
||||
def format_datetime(obj)
|
||||
return unless obj
|
||||
|
||||
|
||||
@@ -422,7 +422,7 @@ class Conference < ApplicationRecord
|
||||
|
||||
##
|
||||
# Returns a hash with affiliation =>
|
||||
# {value: count of registration whose user has that affilation, color: color}
|
||||
# {value: count of registration whose user has that affiliation, color: color}
|
||||
# In case that the affiliation is blank, it groups them in None and
|
||||
# if the number of persons that have an affiliation are less than the 2% of
|
||||
# the total number of registered people, they are grouped in others.
|
||||
@@ -696,7 +696,7 @@ class Conference < ApplicationRecord
|
||||
end
|
||||
|
||||
# Returns the number of hours since the conference start hour (9) to the
|
||||
# current hour, in case that the current hour is beetween the start and the
|
||||
# current hour, in case that the current hour is between the start and the
|
||||
# end hour (20). Otherwise, returns 0
|
||||
def hours_from_start_time(start_hour, end_hour)
|
||||
current_time = Time.find_zone(timezone).now
|
||||
@@ -744,7 +744,7 @@ class Conference < ApplicationRecord
|
||||
'#' + next_color_component(:r, i) + next_color_component(:g, i) + next_color_component(:b, i)
|
||||
end
|
||||
|
||||
# Auxiliar function which is used in next_color and returns each component of
|
||||
# Auxiliary function which is used in next_color and returns each component of
|
||||
# the color. We make use of big prime numbers to avoid repetition and to make
|
||||
# consecutive colors clearly different.
|
||||
def next_color_component(component, i)
|
||||
@@ -787,7 +787,7 @@ class Conference < ApplicationRecord
|
||||
|
||||
##
|
||||
# Checks if start hour of the conference is greater or equal than the end hour
|
||||
# and that both hours are beetween 0 and 24
|
||||
# and that both hours are between 0 and 24
|
||||
#
|
||||
# Reports an error when such a condition is found
|
||||
def valid_times_range?
|
||||
@@ -922,7 +922,7 @@ class Conference < ApplicationRecord
|
||||
#
|
||||
# ====Returns
|
||||
# * +True+ -> One difficulty level or more
|
||||
# * +False+ -> No diffculty level
|
||||
# * +False+ -> No difficulty level
|
||||
def difficulty_levels_set?
|
||||
program.difficulty_levels.any?
|
||||
end
|
||||
@@ -932,7 +932,7 @@ class Conference < ApplicationRecord
|
||||
#
|
||||
# ====Returns
|
||||
# * +True+ -> One difficulty level or more
|
||||
# * +False+ -> No diffculty level
|
||||
# * +False+ -> No difficulty level
|
||||
def event_types_set?
|
||||
program.event_types.any?
|
||||
end
|
||||
|
||||
@@ -94,7 +94,7 @@ class Event < ApplicationRecord
|
||||
}.freeze
|
||||
|
||||
##
|
||||
# Checkes if the event has a start_time and a room for the selected schedule if there is any
|
||||
# Checks if the event has a start_time and a room for the selected schedule if there is any
|
||||
# ====Returns
|
||||
# * +true+ or +false+
|
||||
def scheduled?
|
||||
|
||||
@@ -133,7 +133,7 @@ class Program < ApplicationRecord
|
||||
end
|
||||
|
||||
##
|
||||
# Checcks if the program has rating enabled
|
||||
# Checks if the program has rating enabled
|
||||
#
|
||||
# ====Returns
|
||||
# * +false+ -> If rating is not enabled
|
||||
|
||||
@@ -13,7 +13,7 @@ class Ticket < ApplicationRecord
|
||||
scope :for_registration, -> { where(registration_ticket: true) }
|
||||
|
||||
# This validation is for the sake of simplicity.
|
||||
# If we would allow different currencies per conference we also have to handle convertions between currencies!
|
||||
# If we would allow different currencies per conference we also have to handle conversions between currencies!
|
||||
validate :tickets_of_conference_have_same_currency
|
||||
|
||||
validates :price_cents, :price_currency, :title, presence: true
|
||||
|
||||
@@ -111,7 +111,7 @@ class User < ApplicationRecord
|
||||
}.freeze
|
||||
|
||||
##
|
||||
# Checkes if the user attended the event
|
||||
# Checks if the user attended the event
|
||||
# This is used for events that require registration
|
||||
# The user must have registered to attend the event
|
||||
# Gets an event
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
%p
|
||||
Setup the time frame in which people can registrer to your conference
|
||||
Setup the time frame in which people can register to your conference
|
||||
= form_for(@registration_period, url: admin_conference_registration_period_path(@conference.short_title)) do |f|
|
||||
.form-group
|
||||
= f.label :start_date
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
.col-md-12
|
||||
.page-header
|
||||
%h1
|
||||
Edit Tack
|
||||
Edit Track
|
||||
= @track.name
|
||||
.row
|
||||
.col-md-12
|
||||
|
||||
@@ -18,7 +18,7 @@
|
||||
%abbr{title: 'This field is required'} *
|
||||
= f.text_field :submitter_relationship, rows: 5, required: true, class: 'form-control'
|
||||
%span.help-block
|
||||
e.g. employee, comunity manager, etc
|
||||
e.g. employee, community manager, etc
|
||||
.form-group
|
||||
= f.label :website_url, 'Website URL'
|
||||
%abbr{title: 'This field is required'} *
|
||||
|
||||
@@ -42,7 +42,7 @@
|
||||
}
|
||||
});
|
||||
|
||||
// hide the right and left controls when neccesary after moving the carousel
|
||||
// hide the right and left controls when necessary after moving the carousel
|
||||
$('.carousel').on('slid.bs.carousel', '',
|
||||
function(){
|
||||
$(this).children('.left.carousel-control').show();
|
||||
|
||||
@@ -43,7 +43,7 @@
|
||||
});
|
||||
});
|
||||
|
||||
// hide the right and left controls when neccesary after moving the carousel
|
||||
// hide the right and left controls when necessary after moving the carousel
|
||||
$('.carousel').on('slid.bs.carousel', '',
|
||||
function(){
|
||||
$(this).children('.left.carousel-control').show();
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
%th Updated Attribute
|
||||
|
||||
%th{ class: "#{'hidden' if version.event == 'create'}" }
|
||||
Prevous Value
|
||||
Previous Value
|
||||
|
||||
%th{ class: "#{'hidden' if version.event == 'destroy'}" }
|
||||
New Value
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
# The name of the host the database runs on
|
||||
# OSEM_DB_HOST=database
|
||||
|
||||
# The port the databse runs on
|
||||
# The port the database runs on
|
||||
# OSEM_DB_PORT=3306
|
||||
|
||||
# The user to access the database with
|
||||
|
||||
@@ -7,7 +7,7 @@ namespace :data do
|
||||
task surveys: :environment do
|
||||
conference = create(:full_conference, start_date: Date.current, end_date: Date.current + 1.day)
|
||||
survey_after_conference_active = create(:survey, surveyable: conference, target: :after_conference, title: 'Survey about the conference', start_date: conference.start_date - 1.day, end_date: conference.end_date + 5.days, description: 'Survey about the conference. You can already see it.')
|
||||
# survey_after_conference_inactive = create(:survey, surveyable: conference, target: :after_conference, title: 'Survey about the conference', start_date: conference.start_date + 1.day, end_date: conference.end_date + 5.days, description: 'Survey abou the conference. Not available yet!')
|
||||
# survey_after_conference_inactive = create(:survey, surveyable: conference, target: :after_conference, title: 'Survey about the conference', start_date: conference.start_date + 1.day, end_date: conference.end_date + 5.days, description: 'Survey about the conference. Not available yet!')
|
||||
# survey_on_registration = create(:survey, surveyable: conference, target: :during_registration, title: 'Survey during registation', start_date: conference.registration_period.start_date, end_date: conference.registration_period.end_date, description: 'Survey during registration.')
|
||||
|
||||
create(:boolean_non_mandatory, survey: survey_after_conference_active)
|
||||
|
||||
@@ -16,7 +16,7 @@ namespace :user do
|
||||
end
|
||||
end
|
||||
|
||||
desc "Set email_public attrubute true for all users"
|
||||
desc "Set email_public attribute true for all users"
|
||||
task :set_email_public => :environment do
|
||||
User.update_all email_public: true
|
||||
end
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
|
||||
FactoryBot.define do
|
||||
factory :comment do
|
||||
body { 'Most interresting comment ever, created by a girl.' }
|
||||
body { 'Most interesting comment ever, created by a girl.' }
|
||||
user
|
||||
association :commentable, factory: :event
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user