Moved to GMail and fixed administration errors

This commit is contained in:
Godwin
2017-02-19 20:00:04 -08:00
parent 8b9a11575c
commit 888f186a34
18 changed files with 405 additions and 372 deletions
+2 -2
View File
@@ -1,5 +1,5 @@
- content_for :og_image do
= @conference.poster.full.url || image_path('default_poster.jpg')
- if @conferences
= (@conference.present? ? @conference.poster.full.url : nil) || image_path('default_poster.jpg')
- if @conferences.present?
- @conferences.each do | conference |
= render 'conferences/conference', conference: conference, links: [ :read_more, :register ]
@@ -1,23 +1,27 @@
= columns(medium: 12) do
= admin_update_form do
- if @broadcast_step == :preview || @broadcast_step == :test
= hidden_field_tag :subject, @subject
= hidden_field_tag :body, @body
= hidden_field_tag :send_to, @send_to
- if @broadcast_step == :preview
%p= _'articles.conference_registration.paragraphs.admin.broadcast.test', vars: { send_to_count: "<strong>#{(@send_to_count || 0)}</strong>".html_safe }
- if @warning_message
= columns(medium: 12) do
.warning-info=_"articles.admin.registrations.#{@warning_message}"
- else
= columns(medium: 12) do
= admin_update_form do
- if @broadcast_step == :preview || @broadcast_step == :test
= hidden_field_tag :subject, @subject
= hidden_field_tag :body, @body
= hidden_field_tag :send_to, @send_to
- if @broadcast_step == :preview
%p= _'articles.conference_registration.paragraphs.admin.broadcast.test', vars: { send_to_count: "<strong>#{(@send_to_count || 0)}</strong>".html_safe }
- else
.warning-info.make-room= _'articles.conference_registration.paragraphs.admin.broadcast.preview', vars: { send_to_count: "<strong>#{(@send_to_count || 0)}</strong>".html_safe }
.test-preview
%h3=@subject
= richtext @body, 4
.actions.right
= button_tag :test, value: :test, class: :secondary if @broadcast_step == :preview
= button_with_confirmation :send, (_'modals.admin.broadcast.confirm', vars: { number: "<strong>#{(@send_to_count || 0)}</strong>".html_safe }), value: :send, class: :delete if @broadcast_step == :test
= button_tag :edit, value: :edit
- else
.warning-info.make-room= _'articles.conference_registration.paragraphs.admin.broadcast.preview', vars: { send_to_count: "<strong>#{(@send_to_count || 0)}</strong>".html_safe }
.test-preview
%h3=@subject
= richtext @body, 4
.actions.right
= button_tag :test, value: :test, class: :secondary if @broadcast_step == :preview
= button_with_confirmation :send, (_'modals.admin.broadcast.confirm', vars: { number: "<strong>#{(@send_to_count || 0)}</strong>".html_safe }), value: :send, class: :delete if @broadcast_step == :test
= button_tag :edit, value: :edit
- else
= selectfield :send_to, nil, broadcast_options, full: true
= textfield :subject, @subject, required: true, big: true
= textarea :body, @body, lang: @this_conference.locale, edit_on: :focus
.actions.right
= button_tag :preview, value: :preview
= selectfield :send_to, nil, broadcast_options, full: true
= textfield :subject, @subject, required: true, big: true
= textarea :body, @body, lang: @this_conference.locale, edit_on: :focus
.actions.right
= button_tag :preview, value: :preview
@@ -1,5 +1,9 @@
= columns(medium: 12) do
= form_tag administration_update_path(@this_conference.slug, @admin_step) do
= selectfield :registration_status, @this_conference.registration_status || 'closed', registration_status_options_list, inline_label: true
.actions.left
= button_tag :save, value: :save
- if @warning_message
= columns(medium: 12) do
.warning-info=_"articles.admin.registrations.#{@warning_message}"
- else
= columns(medium: 12) do
= form_tag administration_update_path(@this_conference.slug, @admin_step) do
= selectfield :registration_status, @this_conference.registration_status || 'closed', registration_status_options_list, inline_label: true
.actions.left
= button_tag :save, value: :save
@@ -1,17 +1,21 @@
- add_inline_script :registrations
= columns(medium: 12) do
.goes-fullscreen#registrations-table
.flex-column
= searchfield :search, nil, big: true, stretch: true
%a.button{data: { expands: 'registrations-table' }}='expand'
%a.button.delete{data: { contracts: 'registrations-table' }}='close'
%a.button.modify{data: { 'opens-modal': 'new-registration' }}='+'
.table-scroller
= html_table @excel_data, registrations_table_options
= admin_update_form id: 'new-registration', class: 'modal-edit' do
.modal-edit-overlay{data: { 'closes-modal': 'new-registration' }}
.modal-edit-content
= html_edit_table @excel_data, registrations_edit_table_options
.actions.right
%a.button.subdued{data: { 'closes-modal': 'new-registration' }}='Cancel'
= button_tag :save, value: :save, class: :modify
- if @warning_message
= columns(medium: 12) do
.warning-info=_"articles.admin.registrations.#{@warning_message}"
- else
- add_inline_script :registrations
= columns(medium: 12) do
.goes-fullscreen#registrations-table
.flex-column
= searchfield :search, nil, big: true, stretch: true
%a.button{data: { expands: 'registrations-table' }}='expand'
%a.button.delete{data: { contracts: 'registrations-table' }}='close'
%a.button.modify{data: { 'opens-modal': 'new-registration' }}='+'
.table-scroller
= html_table @excel_data, registrations_table_options
= admin_update_form id: 'new-registration', class: 'modal-edit' do
.modal-edit-overlay{data: { 'closes-modal': 'new-registration' }}
.modal-edit-content
= html_edit_table @excel_data, registrations_edit_table_options
.actions.right
%a.button.subdued{data: { 'closes-modal': 'new-registration' }}='Cancel'
= button_tag :save, value: :save, class: :modify
@@ -1,21 +1,25 @@
= columns(medium: 12) do
.details
= 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
= 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"
= 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"
= 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"
= 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
= "$#{@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]
- if @warning_message
= columns(medium: 12) do
.warning-info=_"articles.admin.registrations.#{@warning_message}"
- else
= columns(medium: 12) do
.details
= 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
= 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"
= 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"
= 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"
= 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
= "$#{@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]
@@ -35,4 +35,4 @@
= columns(medium: 12) do
%p=((_"articles.admin.#{@admin_group}.descriptions.#{@admin_step}", :s)) unless @hide_description === true
= row do
= render @admin_step
= render @admin_step.to_s
@@ -1,63 +1,63 @@
= render 'page_header', :page_key => 'Registration_Stats'
%article
= row do
= columns(medium: 12) do
%h2=_'articles.conference_registration.headings.Stats'
%p=_'articles.conference_registration.paragraphs.Stats', :p
= link_to (_'links.download.Excel','Download Data in Excel Format'), stats_path(@this_conference.slug, :format => :xls), {:class => :button}
= columns(medium: 6) do
%ul.stats
%li
%h3=_'articles.conference_registration.terms.Total_Registrations'
.stat.important=_!@total_registrations
%li.money
%h3=_'articles.conference_registration.terms.Total_Donations'
.stat=money @total_donations
%li
%h3=_'articles.conference_registration.terms.Donation_Count'
.stat
= _!"#{@donation_count} / #{@total_registrations}"
%li
%h3=_'articles.conference_registration.terms.Housing'
.breakdown
- @housing.each do |h, v|
- unless h == :none
.stat-with-label
.label=_"articles.conference_registration.questions.housing.#{h}"
.stat=_!v
%li
%h3=_'articles.conference_registration.terms.Bikes'
.breakdown
.stat=_!"#{@bike_count} / #{@total_registrations}"
- @bikes.each do |h, v|
- unless h == :none
.stat-with-label
.label=_"articles.conference_registration.questions.bike.#{h}"
.stat.percent=_!percent(v.to_f / @bike_count)
%li
%h3=_'articles.conference_registration.terms.Food'
.breakdown
- @food.each do |h, v|
.stat-with-label
.label=_"articles.conference_registration.questions.food.#{h}"
.stat.percent=_!percent(v.to_f / @total_registrations)
%li
%h3=_'articles.conference_registration.terms.Languages'
.breakdown
- @languages.each do |h, v|
.stat-with-label
.label=_"languages.#{h}"
.stat.percent=_!percent(v.to_f / @total_registrations)
= columns(medium: 6) do
.allergies
%h3=_'articles.conference_registration.headings.Allergies'
%ul
- @allergies.each do |a|
%li
%p=_!a
.other
%h3=_'articles.conference_registration.headings.other'
%ul
- @other.each do |o|
%li
%p=_!o
= render 'page_header', :page_key => 'Registration_Stats'
%article
= row do
= columns(medium: 12) do
%h2=_'articles.conference_registration.headings.Stats'
%p=_'articles.conference_registration.paragraphs.Stats', :p
= link_to (_'links.download.Excel','Download Data in Excel Format'), stats_path(@this_conference.slug, :format => :xls), {:class => :button}
= columns(medium: 6) do
%ul.stats
%li
%h3=_'articles.conference_registration.terms.Total_Registrations'
.stat.important=_!@total_registrations
%li.money
%h3=_'articles.conference_registration.terms.Total_Donations'
.stat=money @total_donations
%li
%h3=_'articles.conference_registration.terms.Donation_Count'
.stat
= _!"#{@donation_count} / #{@total_registrations}"
%li
%h3=_'articles.conference_registration.terms.Housing'
.breakdown
- @housing.each do |h, v|
- unless h == :none
.stat-with-label
.label=_"articles.conference_registration.questions.housing.#{h}"
.stat=_!v
%li
%h3=_'articles.conference_registration.terms.Bikes'
.breakdown
.stat=_!"#{@bike_count} / #{@total_registrations}"
- @bikes.each do |h, v|
- unless h == :none
.stat-with-label
.label=_"articles.conference_registration.questions.bike.#{h}"
.stat.percent=_!percent(v.to_f / @bike_count)
%li
%h3=_'articles.conference_registration.terms.Food'
.breakdown
- @food.each do |h, v|
.stat-with-label
.label=_"articles.conference_registration.questions.food.#{h}"
.stat.percent=_!percent(v.to_f / @total_registrations)
%li
%h3=_'articles.conference_registration.terms.Languages'
.breakdown
- @languages.each do |h, v|
.stat-with-label
.label=_"languages.#{h}"
.stat.percent=_!percent(v.to_f / @total_registrations)
= columns(medium: 6) do
.allergies
%h3=_'articles.conference_registration.headings.Allergies'
%ul
- @allergies.each do |a|
%li
%p=_!a
.other
%h3=_'articles.conference_registration.headings.other'
%ul
- @other.each do |o|
%li
%p=_!o
@@ -1 +1 @@
= excel_table(@excel_data)
= excel_table(@excel_data)