Check in and some other improvements

This commit is contained in:
Godwin
2017-07-12 21:54:47 -07:00
parent 5a2dee502b
commit 0c4cde0669
22 changed files with 695 additions and 419 deletions
+2 -1
View File
@@ -28,7 +28,8 @@ module AdminHelper
:registration_status,
:stats,
:registrations,
:broadcast
:broadcast,
:check_in
],
housing: [
:providers,
+7 -3
View File
@@ -228,7 +228,11 @@ module FormHelper
so = select_options
select_options = []
so.each do |opt|
select_options << [ I18n.t("forms.options.#{name.to_s}.#{opt.to_s}"), opt]
if opt.is_a?(Array)
select_options << opt
else
select_options << [ I18n.t("forms.options.#{name.to_s}.#{opt.to_s}"), opt]
end
end
end
textfield(name, value, options.merge({type: :select, options: select_options}))
@@ -470,11 +474,11 @@ module FormHelper
if labels.present?
label = labels[i]
elsif is_single
label = _(label_key.to_s)
label = options[:translate] == false ? label_key.to_s : _(label_key.to_s)
elsif box.is_a?(Integer)
label = I18n.t(label_key.to_s)[box]
else
label = _("#{label_key.to_s}.#{box}")
label = options[:translate] == false ? box : _("#{label_key.to_s}.#{box}")
end
boxes_html += label_tag(id, label)
+2
View File
@@ -367,6 +367,7 @@ module TableHelper
class: ['registrations', 'admin-edit'],
primary_key: :id,
column_names: [
:pronoun,
:registration_fees_paid,
:payment_currency,
:payment_method,
@@ -377,6 +378,7 @@ module TableHelper
:arrival,
:departure,
:group_ride,
:org_non_member_interest,
:housing,
:bike,
:food,
+10 -1
View File
@@ -133,8 +133,17 @@ module WidgetsHelper
status_html = content_tag(:ul, status_html.html_safe)
end
name_html = guest[:guest].user.name
other = (guest[:guest].housing_data || {})['other']
other.strip! if other.present?
if other.present?
name_html += content_tag :div, (content_tag :div, paragraph(other), class: 'notes').html_safe, class: 'guest-notes'
end
guest_rows += content_tag :tr, id: "hosted-guest-#{guest_id}" do
(content_tag :td, guest[:guest].user.name) +
(content_tag :td, name_html.html_safe) +
(content_tag :td do
(guest[:guest].from +
(content_tag :a, (_'actions.workshops.Remove'), href: '#', class: 'remove-guest', data: { guest: guest_id })).html_safe