diff --git a/app/assets/stylesheets/_base.css.scss b/app/assets/stylesheets/_base.css.scss index 33a00ca32..9b354abab 100644 --- a/app/assets/stylesheets/_base.css.scss +++ b/app/assets/stylesheets/_base.css.scss @@ -85,7 +85,7 @@ table tr td .btn { } .bridgetroll-content { - width: 1000px; + width: 900px; margin-left: auto; margin-right: auto; background-color: $content-background-color; @@ -117,8 +117,13 @@ table tr td .btn { margin: 20px 0 0 0; list-style-type: none; + &.mission-control-actions { + margin: 0 0 20px 0; + } + li { display: inline-block; + margin: 10px 10px 0 0; } } @@ -181,7 +186,6 @@ table tr td .btn { border-radius: 10px; } - // BOOTSTRAP OVERRIDES, Yo. Frowny buckets. .container::before, diff --git a/app/controllers/events_controller.rb b/app/controllers/events_controller.rb index ace95ae49..f3285c3de 100644 --- a/app/controllers/events_controller.rb +++ b/app/controllers/events_controller.rb @@ -1,7 +1,7 @@ class EventsController < ApplicationController - before_filter :authenticate_user!, only: [:new, :edit, :create, :update, :destroy] - before_filter :find_event, only: [:show, :edit, :update, :destroy, :volunteer_emails] - before_filter :require_organizer, only: [:edit, :update, :destroy, :volunteer_emails] + before_filter :authenticate_user!, except: [:index, :show] + before_filter :find_event, only: [:show, :edit, :update, :destroy, :volunteer_emails, :organize] + before_filter :require_organizer, only: [:edit, :update, :destroy, :volunteer_emails, :organize] before_filter :assign_organizer, only: [:show, :edit, :update, :destroy] before_filter :set_time_zone, only: [:create, :update] @@ -49,6 +49,9 @@ def volunteer_emails @volunteers = @event.volunteers end + def organize + end + protected def set_time_zone diff --git a/app/views/checkins/index.html.erb b/app/views/checkins/index.html.erb index 9e16a9742..7b71640aa 100644 --- a/app/views/checkins/index.html.erb +++ b/app/views/checkins/index.html.erb @@ -1,4 +1,6 @@ -

Check in volunteers to <%= @session.name %>

+<%= render 'events/header' %> + +

Check in volunteers to <%= @session.name %>

@@ -23,5 +25,5 @@
<%= render 'shared/actions', links: [ - ['Back', event_path(@event)], + ['Back', organize_event_path(@event)], ] %> diff --git a/app/views/events/_header.html.erb b/app/views/events/_header.html.erb new file mode 100644 index 000000000..1f761f7ef --- /dev/null +++ b/app/views/events/_header.html.erb @@ -0,0 +1,5 @@ +
+
+

<%= @event.title %>

+
+
\ No newline at end of file diff --git a/app/views/events/edit.html.erb b/app/views/events/edit.html.erb index 940ce23b4..bb57e67f9 100644 --- a/app/views/events/edit.html.erb +++ b/app/views/events/edit.html.erb @@ -1,12 +1,11 @@ +<%= render 'events/header' %> +

Editing event

<%= render 'form' %> <%= render 'shared/actions', links: [ - ['Show', @event], - ['Back', events_path], + ['Back', @event], ['Manage Locations', locations_path], - ['Manage Organizers', event_organizers_path(@event)], - ['Manage Volunteers', event_volunteers_path(@event)] ] %> diff --git a/app/views/events/index.html.erb b/app/views/events/index.html.erb index 37b69c850..fe7b8e83f 100644 --- a/app/views/events/index.html.erb +++ b/app/views/events/index.html.erb @@ -22,7 +22,7 @@ <% if user_signed_in? %> <% if event.organizer?(current_user) %> - You are the Organizer for this event! + <%= link_to 'Organizer Console', organize_event_path(event), :class => 'btn' %> <% elsif event.volunteer?(current_user) %> diff --git a/app/views/events/new.html.erb b/app/views/events/new.html.erb index 7368b8b12..09a9c5654 100644 --- a/app/views/events/new.html.erb +++ b/app/views/events/new.html.erb @@ -1,5 +1,8 @@ -

New event

- +
+
+

Organize an Event

+
+
<%= render 'form' %> <%= render 'shared/actions', links: [ diff --git a/app/views/events/organize.html.erb b/app/views/events/organize.html.erb new file mode 100644 index 000000000..60061162f --- /dev/null +++ b/app/views/events/organize.html.erb @@ -0,0 +1,64 @@ +<%= render 'header' %> + +

Super Secret Organizer Mission Control Console

+ +<% checkin_links = [] %> + +<% @event.event_sessions.each do |session| %> + <% checkin_links << ["Check in for #{session.name}", event_event_session_checkins_path(@event, session)] %> +<% end %> +<%= render 'shared/actions', links: checkin_links, additional_class: 'mission-control-actions' %> + +<%= render 'shared/actions', additional_class: 'mission-control-actions', links: [ + ['Manage Organizers', event_organizers_path(@event)], + ['Manage Volunteers', event_volunteers_path(@event)], + ['Email Volunteers', volunteer_emails_event_path(@event)] +] %> + +<%= render 'shared/actions', additional_class: 'mission-control-actions', links: [ + ['Edit Event', edit_event_path(@event)], + ['View Event', event_path(@event)], +] %> + +

Volunteer Teaching Preference Totals

+

You can assign people's roles on the Manage Volunteers page.

+ + + + + + + + + + + + + + + + + + + +
Wants to teachWants to TANo preferenceNon-teaching volunteerTotal volunteers
<%= teachers_count(@event.volunteer_rsvps) %><%= tas_count(@event.volunteer_rsvps) %><%= teach_or_ta_count(@event.volunteer_rsvps) %><%= not_teach_or_ta_count(@event.volunteer_rsvps) %><%= @event.volunteer_rsvps.length %>
+ +
+

Willing to Teach: <%= teachers_count(@event.volunteer_rsvps) %>

+ <%= partitioned_volunteer_list(@event.volunteer_rsvps, :teachers) %> + +

Willing to TA: <%= tas_count(@event.volunteer_rsvps) %>

+ <%= partitioned_volunteer_list(@event.volunteer_rsvps, :tas) %> + +

Willing to Teach or TA: <%= teach_or_ta_count(@event.volunteer_rsvps) %>

+ <%= partitioned_volunteer_list(@event.volunteer_rsvps, :teach_or_tas) %> + +

Not Interested in Teaching: <%= not_teach_or_ta_count(@event.volunteer_rsvps) %>

+ <%= partitioned_volunteer_list(@event.volunteer_rsvps, :not_teach_or_tas) %> + +

All Volunteers: <%= @event.volunteer_rsvps.length %>

+
+ +<%= render 'shared/actions', links: [ + ['Back', events_path], +] %> diff --git a/app/views/events/show.html.erb b/app/views/events/show.html.erb index 579ac730d..e7dab01b7 100644 --- a/app/views/events/show.html.erb +++ b/app/views/events/show.html.erb @@ -18,7 +18,7 @@
<% @event.event_sessions.each do |event_session| %>
-
<%= event_session.name %>
+

<%= event_session.name %>

<%= formatted_session_date(event_session) %>
Start time: <%= formatted_session_time(event_session, :starts_at) %>
End time: <%= formatted_session_time(event_session, :ends_at) %>
@@ -27,74 +27,18 @@
- Details: -
<%= simple_format_with_html(@event.details) %>
-

Volunteers:

- <% if @event.volunteer_rsvps.none? %> - No volunteers are currently signed up for this event. - <% else %> - <% if @organizer %> -

Willing to Teach: <%= teachers_count(@event.volunteer_rsvps) %>

- <%= partitioned_volunteer_list(@event.volunteer_rsvps, :teachers) %> - -

Willing to TA: <%= tas_count(@event.volunteer_rsvps) %>

- <%= partitioned_volunteer_list(@event.volunteer_rsvps, :tas) %> - -

Willing to Teach or TA: <%= teach_or_ta_count(@event.volunteer_rsvps) %>

- <%= partitioned_volunteer_list(@event.volunteer_rsvps, :teach_or_tas) %> - -

Not Interested in Teaching: <%= not_teach_or_ta_count(@event.volunteer_rsvps) %>

- <%= partitioned_volunteer_list(@event.volunteer_rsvps, :not_teach_or_tas) %> - -

All Volunteers: <%= @event.volunteer_rsvps.length %>

- <% end %> - - - - - - <% if @organizer %> - - <% end %> - - - - - <% @event.volunteer_rsvps.each do |rsvp| %> - - - <% if @organizer %> - - <% end %> - - - <% end %> - -
NameEmailSkills
<%= link_to rsvp.user.full_name, rsvp.user.profile_path %><%= rsvp.user.email %><%= get_volunteer_skills(rsvp) %>
- - <% end %> - <% links = [] %> <% if @organizer %> - <% @event.event_sessions.each do |session| %> - <% links << ["Check in for #{session.name}", event_event_session_checkins_path(@event, session)] %> - <% end %> - <% links << ['Edit', edit_event_path(@event)] %> + <% links << ['Organizer Console', organize_event_path(@event)] %> <% end %> <% links << ['Back', events_path] %> - <% if @organizer %> - <% links << ['Manage Organizers', event_organizers_path(@event)] %> - <% links << ['Manage Volunteers', event_volunteers_path(@event)] %> - <% links << ['Email Volunteers', volunteer_emails_event_path(@event)] %> - <% end %> - <%= render 'shared/actions', links: links %>
@@ -107,7 +51,7 @@
-

<%= organizer_title %>

+

Organized By:

- +

Who's volunteering?

+ <% if @event.volunteer_rsvps.none? %> + No volunteers are currently signed up for this event. + <% else %> + + + + + + + + + <% @event.volunteer_rsvps.each do |rsvp| %> + + + + + <% end %> + +
NameSkills
<%= link_to rsvp.user.full_name, rsvp.user.profile_path %><%= get_volunteer_skills(rsvp) %>
+ <% end %> diff --git a/app/views/events/volunteer_emails.erb b/app/views/events/volunteer_emails.erb index c6b04f9df..b479db4c1 100644 --- a/app/views/events/volunteer_emails.erb +++ b/app/views/events/volunteer_emails.erb @@ -1,7 +1,11 @@ -

Volunteer Emails for <%= @event.title %>

+<%= render 'events/header' %> + +

Volunteer Emails

Copy these addresses into your email to contact the volunteers.

+

It's probably a good practice to BCC everyone for privacy's sake (and avoiding terrible reply-all fests).

+ <% @volunteers.each do |volunteer| %> @@ -10,3 +14,7 @@ <% end %>
+ +<%= render 'shared/actions', links: [ + ['Back', organize_event_path(@event)] +] %> diff --git a/app/views/organizers/index.html.erb b/app/views/organizers/index.html.erb index 945fa40fb..4bbb59e9e 100644 --- a/app/views/organizers/index.html.erb +++ b/app/views/organizers/index.html.erb @@ -1,3 +1,5 @@ +<%= render 'events/header' %> +

Organizer Assignments


Event: <%= link_to " #{@event.title}", event_path(@event)%>

@@ -41,5 +43,5 @@ <%= render 'shared/actions', links: [ - ['Back', event_path(@event)] + ['Back', organize_event_path(@event)] ] %> diff --git a/app/views/shared/_actions.html.erb b/app/views/shared/_actions.html.erb index 7adf9e64e..3b42b11bb 100644 --- a/app/views/shared/_actions.html.erb +++ b/app/views/shared/_actions.html.erb @@ -1,4 +1,4 @@ -