Compare commits
10
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
7c75382811 | ||
|
|
ba237ce72f | ||
|
|
d2b7f29c55 | ||
|
|
3349d5d51a | ||
|
|
e3104a83b4 | ||
|
|
0aa67e6aae | ||
|
|
eb20538beb | ||
|
|
cee50472a3 | ||
|
|
a7fb14dffd | ||
|
|
8ab366b0fb |
@@ -342,19 +342,25 @@ class ConferenceAdministrationController < ApplicationController
|
||||
end
|
||||
|
||||
def administrate_stats
|
||||
if @this_conference.start_date.blank? || @this_conference.end_date.blank?
|
||||
@warning_message = :no_date_warning
|
||||
return
|
||||
end
|
||||
|
||||
get_stats(!request.format.xlsx?)
|
||||
|
||||
if request.format.xlsx?
|
||||
get_stats
|
||||
logger.info "Generating stats.xls"
|
||||
return respond_to do |format|
|
||||
format.xlsx { render xlsx: '../conferences/stats', filename: "stats-#{DateTime.now.strftime('%Y-%m-%d')}" }
|
||||
end
|
||||
else
|
||||
@past_conferences = []
|
||||
Conference.all.order("start_date DESC").each do |conference|
|
||||
@past_conferences << conference if conference.is_public && @this_conference.id != conference.id
|
||||
end
|
||||
|
||||
if @this_conference.start_date.blank? || @this_conference.end_date.blank?
|
||||
@warning_message = :no_date_warning
|
||||
return
|
||||
end
|
||||
|
||||
get_stats(true)
|
||||
|
||||
@registration_count = @registrations.size
|
||||
@completed_registrations = 0
|
||||
@bikes = 0
|
||||
@@ -378,11 +384,6 @@ class ConferenceAdministrationController < ApplicationController
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
@past_conferences = []
|
||||
Conference.all.order("start_date DESC").each do |conference|
|
||||
@past_conferences << conference if conference.is_public && @this_conference.id != conference.id
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
@@ -3,15 +3,15 @@
|
||||
= data_set(:h3, 'articles.admin.stats.headings.completed_registrations') do
|
||||
= (@completed_registrations || 0).to_s
|
||||
= data_set(:h3, 'articles.admin.stats.headings.incomplete_registrations') do
|
||||
= ((@registration_count - @completed_registrations) || 0).to_s
|
||||
= ((@registration_count || 0) - (@completed_registrations || 0)).to_s
|
||||
= data_set(:h3, 'articles.admin.stats.headings.bikes') do
|
||||
= (@completed_registrations || 0) > 0 ? "#{@bikes} (#{number_to_percentage(@bikes / @completed_registrations.to_f * 100.0)})" : "0"
|
||||
= data_set(:h3, 'articles.admin.stats.headings.food.meat') do
|
||||
= (@food[:all] || 0) > 0 ? "#{@food[:meat]} (#{number_to_percentage(@food[:meat] / @food[:all].to_f * 100.0)})" : "0"
|
||||
= @food && (@food[:all] || 0) > 0 ? "#{@food[:meat]} (#{number_to_percentage(@food[:meat] / @food[:all].to_f * 100.0)})" : "0"
|
||||
= data_set(:h3, 'articles.admin.stats.headings.food.vegetarian') do
|
||||
= (@food[:all] || 0) > 0 ? "#{@food[:vegetarian]} (#{number_to_percentage(@food[:vegetarian] / @food[:all].to_f * 100.0)})" : "0"
|
||||
= @food && (@food[:all] || 0) > 0 ? "#{@food[:vegetarian]} (#{number_to_percentage(@food[:vegetarian] / @food[:all].to_f * 100.0)})" : "0"
|
||||
= data_set(:h3, 'articles.admin.stats.headings.food.vegan') do
|
||||
= (@food[:all] || 0) > 0 ? "#{@food[:vegan]} (#{number_to_percentage(@food[:vegan] / @food[:all].to_f * 100.0)})" : "0"
|
||||
= @food && (@food[:all] || 0) > 0 ? "#{@food[:vegan]} (#{number_to_percentage(@food[:vegan] / @food[:all].to_f * 100.0)})" : "0"
|
||||
= data_set(:h3, 'articles.admin.stats.headings.donation_count') do
|
||||
= (@completed_registrations || 0) > 0 ? "#{@donation_count} (#{number_to_percentage(@donation_count / @completed_registrations.to_f * 100.0)})" : "0"
|
||||
= data_set(:h3, 'articles.admin.stats.headings.donation_total') do
|
||||
@@ -22,5 +22,5 @@
|
||||
= columns(medium: 12) do
|
||||
%h3=_'articles.admin.stats.headings.past_stats'
|
||||
%ul.actions.center
|
||||
- @past_conferences.each do |conference|
|
||||
- (@past_conferences || []).each do |conference|
|
||||
= link_to conference.title, previous_stats_path(@this_conference.slug, conference.slug, format: :xlsx), class: [:button, :download]
|
||||
|
||||
@@ -1375,7 +1375,7 @@ en:
|
||||
payment_message: Registration
|
||||
schedule_info: Schedule
|
||||
travel_info: Getting To %{city}
|
||||
city_info: Weather and Crime in %{city}
|
||||
city_info: A little about %{city}
|
||||
what_to_bring: What to Bring
|
||||
volunteering_info: Volunteering
|
||||
conferences: National and Regional Conferences
|
||||
@@ -1797,7 +1797,7 @@ en:
|
||||
payment_form: Registration Fee Amount
|
||||
org_select: Which organization are you a member of?
|
||||
payment_type: Registration Fee Method
|
||||
housing_other: Other considerations
|
||||
housing_other: Information for organizers
|
||||
housing_allergies: Do you have any allergies?
|
||||
housing_food: What are your eating habits?
|
||||
housing_bike: Would you like to borrow a bike?
|
||||
@@ -1952,10 +1952,10 @@ en:
|
||||
out of our own pockets. Otherwise, please pledge to pay on arrival. Your
|
||||
pledge will help us make a rough plan for what we can and cannot afford.
|
||||
Thank you.
|
||||
housing_other: Do you have any special needs or considerations that we should
|
||||
know about for your stay such as allergies, disabilities, or a need for
|
||||
child care? Letting us know in advance will help us determine the best place
|
||||
for you to stay and make any necessary preparations for the conference itself.
|
||||
housing_other: Please enter any information you would like organizers to consider
|
||||
when preparing for your visit. If you have restrictions in terms of mobility,
|
||||
diet or allergies, or preferences on the accommodations or guests that we will
|
||||
place you with, please list them here.
|
||||
housing_allergies: Let us know if you have any allergies that we should be
|
||||
made aware of.
|
||||
housing_food: Please let us know your eating habits by selecting the option
|
||||
@@ -2445,8 +2445,8 @@ en:
|
||||
food_vegetarian: I am vegetarian
|
||||
food_vegan: I am vegan
|
||||
housing_none: I don't need a place to stay
|
||||
housing_tent: I would like a place to tent
|
||||
housing_house: Yes, I would like to place to stay
|
||||
housing_tent: I would like a tent spot
|
||||
housing_house: Yes, I would like a place to stay
|
||||
'yes': 'Yes'
|
||||
'no': 'No'
|
||||
maybe: Maybe
|
||||
|
||||
@@ -1384,7 +1384,7 @@ es:
|
||||
housing_companion_email: Correo electrónico de tu acompañante
|
||||
housing_departure_date: Fecha de partida
|
||||
housing_food: Cuáles son tus hábitos alimenticios?
|
||||
housing_other: Otras consideraciones
|
||||
housing_other: Información para organizadores
|
||||
housing_type: Hospedaje
|
||||
org_create_address: Dirección de tu organización
|
||||
org_create_email: Correo electrónico de tu organización
|
||||
@@ -1567,12 +1567,10 @@ es:
|
||||
la opción que mejor describa el tipo de comida que comes. Usaremos esto
|
||||
para decidir el tipo de comidas que prepararemos y la cantidad de alimentos
|
||||
que necesitaremos.
|
||||
housing_other: Tienes algún requerimiento especial o consideraciones que creas
|
||||
que debamos tener respecto a tu estadía, tales como alergias, limitaciones
|
||||
de movilidad o discapacidades, o si necesitas guardería? Hacérnoslo saber
|
||||
por adelantado nos ayudará a determinar mejor el lugar en el que te hospedarás
|
||||
y si es necesario, preparar los mismos lugares en los que se realizará la
|
||||
conferencia para tu mejor accesibilidad a ellos.
|
||||
housing_other: Ingrese cualquier información que le gustaría que los organizadores
|
||||
consideren para su visita. Si tiene restricciones de movilidad, dieta o alergias,
|
||||
o preferencias de alojamiento (ej. preferencia de huéspedes para compartir
|
||||
alojamiento), indíquelos aquí por favor.
|
||||
housing_type: Necesitas un lugar para quedarte en %{city} ? Haremos lo posible
|
||||
por ubicarte con un(a) anfitrión(a) local y con lxs visitantes que mejor
|
||||
coincidan con tus necesidades.
|
||||
|
||||
@@ -1212,7 +1212,7 @@ fr:
|
||||
hosting_space_tent: Hébergement sous tente
|
||||
hosting_start_date: Date de début de l’hébergement
|
||||
housing_bike: Souhaitez-vous emprunter un vélo?
|
||||
housing_other: Autres précisions
|
||||
housing_other: Informations pour les organisateurs
|
||||
housing_type: Hébergement
|
||||
hosting_end_date: Date de fin de l’hébergement
|
||||
housing_companion_check: Hébergement pour deux personnes
|
||||
@@ -1386,10 +1386,11 @@ fr:
|
||||
housing_food: Veuillez nous renseigner sur vos habitudes alimentaires en choisissant
|
||||
l'option qui vous correspond le mieux. Cela nous aidera à préparer de meilleurs
|
||||
repas et à prévoir des quantités de nourriture adaptées.
|
||||
housing_other: Avez-vous des besoins spéciaux ou d'autres besoins à prendre
|
||||
en compte, tel que des allergies, des incapacités ou du gardiennage d'enfants?
|
||||
Veuillez le préciser ici afin de nous aider à vous trouver un hébergement
|
||||
adapté et à organiser le congrès.
|
||||
housing_other: "Merci d'indiquer toutes les informations que vous désirez porter à
|
||||
l'attention des organisateurs, afin qu'elles puissent être prises en compte dans
|
||||
l'organisation de votre séjour. Si vous avez des besoins en matière d'accessibilité,
|
||||
un régime particulier ou des allergies, ou si vous avez des préférences concernant
|
||||
votre hébergement et votre hôte : listez tout celà ici."
|
||||
housing_type: Avez-vous besoin d'un hébergement à %{city}? Nous ferons notre
|
||||
possible pour trouver des hébergements adaptés aux besoins de tous et de
|
||||
toutes.
|
||||
|
||||
Reference in New Issue
Block a user