Skip to content

Commit

Permalink
Put events in the sidebar and fix buttons for roles.
Browse files Browse the repository at this point in the history
  • Loading branch information
rhnonose committed Oct 26, 2017
1 parent 33b38ca commit bc65c61
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 3 deletions.
8 changes: 5 additions & 3 deletions lib/course_planner_web/templates/event/index.html.eex
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,11 @@
<div class="col-xs-6 col-sm-9 col-md-10 page-title">
Events
</div>
<div class="col-xs-6 col-sm-3 col-md-2">
<%= link "New event", to: event_path(@conn, :new), class: "mdl-button mdl-js-button mdl-button--raised" %>
</div>
<%= if @conn.assigns.current_user.role == "Coordinator" do %>
<div class="col-xs-6 col-sm-3 col-md-2">
<%= link "New event", to: event_path(@conn, :new), class: "mdl-button mdl-js-button mdl-button--raised" %>
</div>
<% end %>
</div>

<table class="mdl-data-table mdl-js-data-table mdl-shadow--2dp page">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
<%= CoursePlannerWeb.SharedView.navbar_item "Classes", @conn, class_path(@conn, :index) %>
<%= CoursePlannerWeb.SharedView.navbar_item "Attendances", @conn, attendance_path(@conn, :index) %>
<%= CoursePlannerWeb.SharedView.navbar_item "Tasks", @conn, task_path(@conn, :index) %>
<%= CoursePlannerWeb.SharedView.navbar_item "Events", @conn, event_path(@conn, :index) %>
<%= CoursePlannerWeb.SharedView.navbar_separator %>
<%= CoursePlannerWeb.SharedView.navbar_item "Settings", @conn, setting_path(@conn, :show) %>
<%= if show_program_about?(), do: CoursePlannerWeb.SharedView.navbar_item "About #{get_program_name()}", @conn, about_path(@conn, :show) %>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
<%= CoursePlannerWeb.SharedView.navbar_separator %>
<%= CoursePlannerWeb.SharedView.navbar_item "Courses", @conn, offered_course_path(@conn, :index) %>
<%= CoursePlannerWeb.SharedView.navbar_item "Attendances", @conn, attendance_path(@conn, :index) %>
<%= CoursePlannerWeb.SharedView.navbar_item "Events", @conn, event_path(@conn, :index) %>
<%= if show_program_about?() do %>
<%= CoursePlannerWeb.SharedView.navbar_separator %>
<%= CoursePlannerWeb.SharedView.navbar_item "About #{get_program_name()}", @conn, about_path(@conn, :show) %>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
<%= CoursePlannerWeb.SharedView.navbar_separator %>
<%= CoursePlannerWeb.SharedView.navbar_item "Courses", @conn, offered_course_path(@conn, :index) %>
<%= CoursePlannerWeb.SharedView.navbar_item "Attendances", @conn, attendance_path(@conn, :index) %>
<%= CoursePlannerWeb.SharedView.navbar_item "Events", @conn, event_path(@conn, :index) %>
<%= if show_program_about?() do %>
<%= CoursePlannerWeb.SharedView.navbar_separator %>
<%= CoursePlannerWeb.SharedView.navbar_item "About #{get_program_name()}", @conn, about_path(@conn, :show) %>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
<%= CoursePlannerWeb.SharedView.navbar_item "Calendar", @conn, schedule_path(@conn, :show) %>
<%= CoursePlannerWeb.SharedView.navbar_separator %>
<%= CoursePlannerWeb.SharedView.navbar_item "Tasks", @conn, task_path(@conn, :index) %>
<%= CoursePlannerWeb.SharedView.navbar_item "Events", @conn, event_path(@conn, :index) %>
<%= CoursePlannerWeb.SharedView.navbar_separator %>
<%= if show_program_about?() do %>
<%= CoursePlannerWeb.SharedView.navbar_separator %>
Expand Down

0 comments on commit bc65c61

Please sign in to comment.