Update copy, tests, and administration

This commit is contained in:
Godwin
2017-06-11 15:27:18 -07:00
parent d75e3d63e4
commit eb4b3c44d6
27 changed files with 220 additions and 193 deletions
@@ -16,23 +16,27 @@
%table.guests.admin-edit
%tr
%th.corner
%th=_'forms.labels.generic.organization'
%th=_'forms.labels.generic.city'
%th=_'forms.labels.generic.housing'
%th=_'articles.admin.housing.headings.arrival_departure'
%th=_'articles.conference_registration.headings.companion'
%th=_'forms.labels.generic.food'
%th=_'forms.labels.generic.allergies'
%th=_'forms.labels.generic.other'
- @guests.each do | id, registration |
%tr.selectable{class: get_housing_match(host, registration, space).to_s.gsub('_', '-'), data: {host: host.id, guest: id, space: space}}
%th=registration.user.name
%td
- if registration.user.organizations.present?
= registration.user.organizations.first.name
- else
%em None
%td=registration.city
%td=registration.housing.present? ? (_"articles.conference_registration.questions.housing.#{registration.housing}") : ''
%td=date_span(registration.arrival.to_date, registration.departure.to_date)
- companion = companion(registration)
%td=companion.present? ? (companion.is_a?(User) ? companion.named_email : (_"articles.conference_registration.terms.registration_status.#{companion}")) : ''
%td=registration.food.present? ? (_"articles.conference_registration.questions.food.#{registration.food}") : ''
%td=registration.allergies
%td
.p=registration.other
@@ -16,6 +16,11 @@
= (@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
= "$#{@donations || 0.00}"
.actions
= link_to (_'links.download.Excel'), administration_step_path(@this_conference.slug, :stats, :format => :xlsx), class: [:button, :download]
= link_to (_'links.download.Organizations_Excel'), administration_step_path(@this_conference.slug, :organizations, :format => :xlsx), class: [:button, :download, :subdued]
.actions.center
= link_to (_'links.download.Excel'), administration_step_path(@this_conference.slug, :stats, format: :xlsx), class: [:button, :download]
= link_to (_'links.download.Organizations_Excel'), administration_step_path(@this_conference.slug, :organizations, format: :xlsx), class: [:button, :download, :subdued]
= columns(medium: 12) do
%h3=_'articles.admin.stats.headings.past_stats'
%ul.actions.center
- @past_conferences.each do |conference|
= link_to conference.title, previous_stats_path(@this_conference.slug, conference.slug, format: :xlsx), class: [:button, :download]
-30
View File
@@ -1,30 +0,0 @@
= columns(medium: 12) do
- if @registration.registration_fees_paid.present?
%p
%strong=_'articles.conference_registration.paragraphs.Payment_Made', :p, vars: { fees_paid: (number_to_currency @registration.registration_fees_paid, unit: '$') }
= _'articles.conference_registration.paragraphs.Payment_Add'
= @this_conference.payment_message.html_safe if @this_conference.payment_message.present?
- elsif @this_conference.payment_message.present?
= @this_conference.payment_message.html_safe
- else
%p=@this_conference.payment_message || (_'articles.conference_registration.paragraphs.Payment', :p)
= columns(large: 9, push: 1) do
= show_errors :payment
= form_tag register_path(@this_conference.slug), class: :payment do
= hidden_field_tag :button, :payment
- payment_amounts = @this_conference.payment_amounts.present? ? @this_conference.payment_amounts : Conference.default_payment_amounts
.graded-options{class: "option-count-#{payment_amounts.size}"}
- payment_amounts.each_with_index do | amount, i |
= button :amount_25, name: :amount, value: amount.to_f.to_s, class: "option-#{i + 1}" do
=_! (number_to_currency amount, unit: '$')
= form_tag register_path(@this_conference.slug), class: ['custom-payment', :centered] do
%span.currency=_!'$' # TODO: this needs to be localized
= numberfield :amount, nil, required: true, step: 0.01, min: 0.00, label: false
= button :custom_amount, value: :payment
%p=_'articles.conference_registration.paragraphs.currency','(amounts are in $USD)'
= form_tag register_path(@this_conference.slug), class: :payment do
= hidden_field_tag :button, :payment
.actions.skip
= button :skip, name: :amount, value: '0.0'
= columns(large: 2)
@@ -1,14 +0,0 @@
= columns(medium: 12) do
%p=_'articles.conference_registration.paragraphs.Registration_Info', :p, vars: { city: @this_conference.city_name }
= form_tag register_path(@this_conference.slug), class: [:centered, :clearfix] do
= columns(medium: 12) do
= radiobuttons :housing, ConferenceRegistration.all_housing_options, @registration.housing, 'articles.conference_registration.questions.housing', heading: 'articles.conference_registration.headings.housing', vertical: true, big: true, inline: true
= fieldset :hosting_dates, heading: 'articles.conference_registration.headings.arrival_and_departure', vars: { city: @this_conference.city_name } do
= selectfield :arrival, @registration.arrival || @this_conference.start_date, conference_days_options_list(:before_plus_one)
= selectfield :departure, @registration.departure || @this_conference.start_date, conference_days_options_list(:after_minus_one)
= radiobuttons :bike, ConferenceRegistration.all_bike_options, @registration.bike, 'articles.conference_registration.questions.bike', heading: 'articles.conference_registration.headings.bike', inline: true, big: true
= radiobuttons :food, ConferenceRegistration.all_food_options, @registration.food, 'articles.conference_registration.questions.food', heading: 'articles.conference_registration.headings.food', inline: true, big: true
= emailfield :companion, (@registration.housing_data['companions'] || [nil]).first, heading: 'articles.conference_registration.headings.companion', help: 'articles.conference_registration.paragraphs.companion', big: true
= textfield :allergies, @registration.allergies, heading: 'articles.conference_registration.headings.allergies'
= textarea :other, @registration.other, plain: true, heading: 'articles.conference_registration.headings.other'
= button :register, value: :questions
@@ -11,14 +11,16 @@
%p.center=_"articles.conference_registration.paragraphs.currency_details", :p, vars: { currency: (_"currencies.#{(@currencies || [@currency]).first}.displayName-count-other") }
= save_registration_step do
.registration-step-options
- if @currencies.present? && @currencies.length > 1
= radiobuttons :currency, (@currencies.map { |c| [(_"currencies.#{c}.displayName-count-other"), c] }), @currency
.options.graded-options{class: "option-count-#{@amounts.size}"}
- @amounts.each_with_index do |option, i|
= button (number_to_currency option, unit: '$'), value: option, name: :value, class: [:unstyled, "option-#{i + 1}"]
= button "#{number_to_currency option, unit: '$'} #{_!@currency}".html_safe, value: option, name: :value, class: [:unstyled, "option-#{i + 1}"]
.option-space
.custom-option
-# if Rails.env.test?
=# text_field_tag :custom_value, nil
-# else
= number_field_tag :custom_value, 50.0, step: 0.05, min: 0.05
= button :custom_amount, name: :custom_amount, value: :custom, class: :unstyled
- if @currencies.present? && @currencies.length > 1
.option-space
.setting-option
%p Change currency to:
- (@currencies - [@currency]).each do |c|
= button (_"currencies.#{c}.displayName-count-other"), name: :currency, value: c, class: :unstyled
+16 -2
View File
@@ -41,8 +41,22 @@
= row do
= columns(medium: 12) do
%h3=_'articles.workshops.headings.Workshops', :t
%p=_'articles.conference_registration.paragraphs.workshops', :p
- if @this_conference.workshop_info.present?
= richtext @this_conference.workshop_info
- else
%p=_'articles.conference_registration.paragraphs.workshops', :p
.actions.centered
.buttons
= link_to (_'articles.conference_registration.actions.View_Workshops'), workshops_path(@this_conference), class: :button
= link_to (_'actions.workshops.create'), create_workshop_path(@this_conference), class: [:button, :modify]
= link_to (_'actions.workshops.create'), create_workshop_path(@this_conference), class: [:button, :modify]
- if @my_workshops.present?
= row do
= columns(medium: 12) do
%h3=_'articles.workshops.headings.Your_Workshops'
= render 'workshops/workshop_previews', workshops: @my_workshops
= row do
= columns(medium: 12) do
%h3=_'articles.workshops.headings.Workshops_that_you_would_like_to_attend'
%p=_'articles.workshops.paragraphs.Workshops_that_you_would_like_to_attend', :p
- if @interested_workshops.present?
= render 'workshops/workshop_previews', workshops: @interested_workshops
-13
View File
@@ -1,13 +0,0 @@
= form_for @workshop, url: conference_workshops_path(@conference, @workshop) do |f|
.columns
= f.text_field :title
= f.text_field :slug
.columns.medium-4
%h2=_'workshop.form.help.title', :t
=_'workshop.form.help', :p
.columns.medium-8
= f.text_area :info
= f.number_field :workshop_stream_id
= f.number_field :workshop_presentation_style
.columns
= f.actions :save
+1 -1
View File
@@ -11,7 +11,7 @@
%span.interest-text=interest_text(workshop)
= richtext workshop.info
- if preview.blank? && translations_available_for_editing
.actions
.actions.center
- translations_available_for_editing.each do |locale|
= link_to (_'actions.workshops.Translate', "Translate into #{language_name(locale)}", :vars => {:language => language_name(locale)}), translate_workshop_url(workshop.conference.slug, workshop.id, locale), :class => [:button, :translate]
= columns(medium: 6) do
@@ -1,8 +1,9 @@
- depth ||= 4
%ul.workshop-list
- workshops.sort_by{ |w| w.title.downcase }.each do |w|
- is_interested = w.interested?(current_user)
%li{class: [is_interested ? :interested : nil]}
%h4.title=_!(w.title)
= content_tag("h#{depth}", w.title, class: :title)
.workshop-interest
- if w.can_show_interest?(current_user)
= form_tag toggle_workshop_interest_path(w.conference.slug, w.id), class: 'js-xhr' do
@@ -10,6 +11,6 @@
%span.interest-button=interest_button(w)
- elsif w.interested_count > 0
%span.interest-text=interest_text(w)
.workshop-description=richtext w.info, 4
.workshop-description=richtext w.info, depth
.actions.right
= link_to (_'articles.workshops.info.read_more'), view_workshop_path(w.conference.slug, w.id), class: ['workshop-link', :button, :small]
+2 -2
View File
@@ -5,7 +5,7 @@
%h2=_'articles.workshops.headings.Delete_Workshop',"Are you sure you want to delete the workshop: <em>#{@workshop.title}</em>?", vars: {title: "<em>#{@workshop.title}</em>".html_safe}
%p=_'articles.workshops.paragraphs.Delete_Workshop'
= form_tag delete_workshop_path(@this_conference.slug, @workshop.id), class: 'composition' do
.actions
.actions.center
= button :confirm, value: :confirm, class: :delete
= button :cancel, value: :cancel
= button :cancel, value: :cancel, class: :back
+3 -8
View File
@@ -12,13 +12,8 @@
= row do
= columns(medium: 12) do
%p=_'articles.workshops.paragraphs.Workshops', :p
.actions.center
= link_to (_'actions.workshops.create','New Workshop'), create_workshop_path(@this_conference.slug), class: [:button, :modify] if @this_conference.registration_open
= row do
= columns(medium: 12) do
%h3=_'articles.workshops.headings.Your_Workshops'
= render 'workshops/workshop_previews', workshops: @my_workshops
= link_to (_'actions.workshops.create','New Workshop'), create_workshop_path(@this_conference.slug), class: [:button, :modify] if @conference.registration_open
= row do
= columns(medium: 12) do
%h3=_'articles.conference_registration.headings.All_Workshops'
-#%h3 All Workshops weather you like it or not
= render 'workshops/workshop_previews', workshops: @workshops
= render 'workshops/workshop_previews', workshops: @workshops, depth: 3
+1 -1
View File
@@ -33,7 +33,7 @@
= columns(medium: 12) do
= textarea :notes, @workshop.notes, warning: 'articles.workshops.paragraphs.notes'
= columns(medium: 12) do
.actions.next-prev
.actions.center
= button :save, value: :save
= button :cancel, value: :cancel, class: :subdued, formnovalidate: true
+1 -1
View File
@@ -10,6 +10,6 @@
= render 'workshops/show', workshop: @workshop, translations_available_for_editing: @translations_available_for_editing, preview: false
= row do
= columns(medium: 12) do
.actions.next-prev
.actions.center
= (link_to (_'actions.workshops.Edit'), edit_workshop_path(@this_conference.slug, @workshop.id), :class => [:button, :modify]) if @workshop.can_edit?(current_user)
= (link_to (_'actions.workshops.Delete'), delete_workshop_path(@this_conference.slug, @workshop.id), :class => 'button delete') if @workshop.can_delete?(current_user)