app/views/ets/index.html.erb
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="description" content="gbt filtered target results">
<title>Project Hermione: ETS</title>
<%= stylesheet_link_tag 'application' %>
<%= stylesheet_link_tag 'ets-bundle' %>
<%= javascript_include_tag 'application' %>
<%= javascript_include_tag 'ets-bundle' %>
</head>
<body>
<div id="wrapper">
<!-- Sidebar -->
<div id="sidebar-wrapper">
<ul class="sidebar-nav">
<li class="sidebar-brand">
<%= image_tag "ets/logo.png", width: "150px" %>
</li>
<li>
<a href="#" id="view-dashboard"><span class="fa fa-cubes"></span>Requests</a>
</li>
<li>
<a href="https://auth.berkeley.edu/cas/logout"><span class="fa fa-sign-out"></span> Sign Out</a>
</li>
<li>
<a href="#" id="view-tutorial"><span class="fa fa-question"></span>Help</a>
</li>
</ul>
<div id="schedule-info" class="padder-up">
<%= image_tag "ets/ucb.png", width: "100px" %><br><br>
<p>© 2016 ASUC Office Of The CTO</p>
</div>
<!-- <div id="schedule-info"></div>-->
</div>
<!-- #sidebar-wrapper -->
<!-- Page Content -->
<div id="page-content-wrapper">
<div class="menu-btn" id="dots-menu">
<a href="#menu-toggle" class="menu-btn" id="menu-toggle">
<span class="fa fa-th"></span>Menu
</a>
</div>
<div class="container-fluid">
<div class="row">
<div class="col-lg-12" id="all-requests">
<h1>Requests</h1><hr>
<div class="search-form-container">
<%= form_tag ets_path, method: :get, id: "search-form" do %>
<div class="col-sm-4">
<div class="group">
<span class="gap"><br></span>
<select id="location-select" class="used" name="search[location]"></select>
<label for="search[location]">Location</label>
</div>
</div>
<div class="col-sm-3">
<div class="group">
<input type="time" class="used" name="search[start_time]" value="00:00:00"><span class="highlight"></span><span class="bar"></span>
<label for="search[start_time]">Start Time</label>
</div>
</div>
<div class="col-sm-3">
<div class="group">
<input type="time" class="used" name="search[end_time]" value="00:00:00"><span class="highlight"></span><span class="bar"></span>
<label for="search[end_time]">End Time</label>
</div>
</div>
<div class="col-sm-2 text-center">
<button type="submit" class="button buttonBlue">Filter
<div class="ripples buttonRipples"><span class="ripplesCircle"></span></div>
</button>
</div><br><br><br>
<% end %>
</div>
<!-- Table of Requests -->
<div class="col-md-12">
<table class="table table-striped table-hover">
<thead>
<tr>
<th class="text-left" width="100px"><%=link_to 'Course', ets_path(sort: 'courses.abbreviation') %></th>
<th><%=link_to 'Location', ets_path(sort: 'courses.location') %></th>
<th><%=link_to 'Time', ets_path(sort: 'courses.start_time, courses.end_time') %></th>
<th><%=link_to 'Format', ets_path(sort: 'courses.format') %></th>
<th width="160px">Status</th>
</tr>
</thead>
<tbody>
<% @requests.each do |r| %>
<tr>
<td class="text-left"><%= r.course.abbreviation %></td>
<td><%= r.course.location %></td>
<td><%= Course.resolve_time(r.course.start_time) + ' - ' + Course.resolve_time(r.course.end_time) %></td>
<td><%= r.format %></td>
<td>
<% if r.status > 0 %>
<span class="approved-request status-message approved">Approved</span>
<% elsif r.status < 0 %>
<span class="declined-request status-message declined">Declined</span>
<% else %>
<div class="status-container">
<div class="option-buttons">
<span class="edit-button"><span class="fa fa-check"></span><span class="edit-button-text"><%=link_to 'Approve', ets_update_path(id: r.id, status: 1)%></span></span>
<span class="delete-button"><span class="fa fa-times"></span><span class="delete-button-text"><%=link_to 'Decline', ets_update_path(id: r.id, status: -1)%></span></span>
</div>
</div>
<% end %>
</td>
</tr>
<% end %>
</tbody>
</table>
</div>
</div>
<div class="col-lg-12" id="help-page">
<h1>Help</h1><hr>
<h4>Adding a Request for a Course</h4><br>
<ul>
<li>Navigate to the <%= image_tag 'ets/my-courses-tab.png', height: "20px", class: "rounded-img" %> page via the left sidebar.</li><br>
<li>Click the <%= image_tag 'ets/add-course-button.png', height: "30px" %> button to add a new course and request.</li><br>
<li>Fill in the required information and click <%= image_tag 'ets/submit-course-button.png', height: "28px" %>.</li><br>
</ul><br>
<h4>Updating Personal Information & Settings</h4><br>
<ul>
<li>Navigate to the <%= image_tag 'ets/my-profile-tab.png', height: "20px", class: "rounded-img" %> page via the left sidebar.</li><br>
<li>Change your name, department, email and subscription settings and click <%= image_tag 'ets/save-button.png', height: "28px" %>.</li><br>
</ul><br>
<h4>Tips & Hints</h4><br>
<ul>
<li>Click the <%= image_tag 'ets/sidebar-toggle-button.png', height: "28px" %> button to toggle the sidebar on the left.</li><br>
<li>Click the <%= image_tag 'ets/sign-out-tab.png', height: "20px", class: "rounded-img" %> button to log out of CalNet.</li><br>
</ul><br>
</div>
</div>
</div>
<div class="empty-container"><br></div>
</div>
<!-- /#page-content-wrapper -->
</div>
<!-- /#wrapper -->
</body>
</html>