Skip to content

Commit

Permalink
Merge pull request rubycentral#23 from HaughtCodeworks/83-event-dashb…
Browse files Browse the repository at this point in the history
…oard

Created subnav for staff event management pages
  • Loading branch information
mbburch authored Jun 29, 2016
2 parents 9a9e2ec + 53ed8e8 commit 2036f73
Show file tree
Hide file tree
Showing 6 changed files with 35 additions and 25 deletions.
6 changes: 0 additions & 6 deletions app/assets/stylesheets/base/_base.scss
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,6 @@
margin-top: 20px;
}

.alert-viewer-mode {
padding: 10px 0;
margin-bottom: 20px;
background-color: lighten(#E69400, 25%);
text-align: center;
}
.share {
font-size: 12px;
}
Expand Down
2 changes: 1 addition & 1 deletion app/controllers/staff/application_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ def require_organizer
unless @event
session[:target] = request.path
flash[:danger] = "You must be signed in as an organizer to access this page."
redirect_to new_user_session_url
redirect_to root_path
end
end

Expand Down
4 changes: 0 additions & 4 deletions app/helpers/application_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -71,10 +71,6 @@ def copy_email_btn
id: 'copy-filtered-speaker-emails'
end

def on_organizer_page?
/\/organizer\// =~ request.path
end

def modal(identifier, title = '')
body = capture { yield }
render 'shared/modal', identifier: identifier, body: body, title: title
Expand Down
33 changes: 33 additions & 0 deletions app/views/layouts/_navbar.html.haml
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,10 @@
= link_to event_staff_sessions_path(event) do
%i.fa.fa-calendar
Schedule
%li{class: "#{request.path == event_staff_path(event) ? 'active' : ''}"}
= link_to event_staff_path(event) do
%i.fa.fa-dashboard
%span Event Dashboard
%li{class: "#{request.path == notifications_path ? 'active' : ''}"}
= link_to notifications_path do
Expand Down Expand Up @@ -81,3 +85,32 @@
%i.fa.fa-dashboard
%span Dashboard
- if params[:controller].include?("staff") && user_signed_in?
.subnavbar
.subnavbar-inner
.container-fluid
%ul.mainnav
%li
= link_to event_staff_path do
%i.fa.fa-dashboard
%span Dashboard
%li
= link_to event_staff_edit_path do
%i.fa.fa-info-circle
%span Info
%li
= link_to event_staff_event_teammate_invitations_path do
%i.fa.fa-users
%span Team
%li
= link_to event_staff_edit_path do
%i.fa.fa-wrench
%span Config
%li
= link_to event_staff_guidelines_notifications_path do
%i.fa.fa-list
%span Guidelines
%li
= link_to event_staff_speaker_email_notifications_path do
%i.fa.fa-envelope-o
%span Speaker Emails
6 changes: 0 additions & 6 deletions app/views/layouts/application.html.haml
Original file line number Diff line number Diff line change
Expand Up @@ -22,12 +22,6 @@
%body{id: body_id}
= render partial: "layouts/navbar"

- if on_organizer_page?
.alert-viewer-mode
.container-fluid
Viewing as:
%strong Organizer

#flash= show_flash

.main
Expand Down
9 changes: 1 addition & 8 deletions app/views/staff/events/show.html.haml
Original file line number Diff line number Diff line change
@@ -1,14 +1,7 @@
.event
.row
.col-md-12
.page-header.clearfix
.btn-nav.pull-right
= link_to "Session Types", event_staff_session_types_path(event), class: "btn btn-default"
= link_to "Tracks", event_staff_tracks_path(event), class: "btn btn-default"
= link_to "Proposals", event_staff_proposals_path(event), class: "btn btn-default"
= link_to "Program", event_staff_program_path(event), class: "btn btn-default"
= link_to "Schedule", event_staff_sessions_path(event), class: "btn btn-default"
= link_to "Edit Event", event_staff_edit_path(event), class: "btn btn-primary"
.page-header
%h1= event
.row
.col-sm-4
Expand Down

0 comments on commit 2036f73

Please sign in to comment.