42 lines
1.5 KiB
Text
42 lines
1.5 KiB
Text
<%- model_class = Alert -%>
|
|
<div class="page-header">
|
|
<h1><%=t '.title', :default => model_class.model_name.human.pluralize %></h1>
|
|
</div>
|
|
<table class="table table-striped">
|
|
<thead>
|
|
<tr>
|
|
<th>Class</th>
|
|
<th>Sections</th>
|
|
<th>Semester</th>
|
|
<th>Alerted</th>
|
|
<th>Created</th>
|
|
<th><%=t '.actions', :default => t("helpers.actions") %></th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
<% @alerts.each do |alert| %>
|
|
<tr>
|
|
<td><%= alert.course_name %></td>
|
|
<td><%= alert.sections.reject { |v| v.blank? }.join(', ') %></td>
|
|
<td><%= alert.semester %></td>
|
|
<td><%= alert.alerted %></td>
|
|
<td><%= alert.created_at.to_datetime.strftime("%d %b %Y") %></td>
|
|
<td>
|
|
<!--<%= link_to t('.show', :default => t("helpers.links.show")),
|
|
alert_path(alert), :class => 'btn btn-mini' %>-->
|
|
<%= link_to t('.edit', :default => t("helpers.links.edit")),
|
|
edit_alert_path(alert), :class => 'btn btn-mini' %>
|
|
<%= link_to t('.destroy', :default => t("helpers.links.destroy")),
|
|
alert_path(alert),
|
|
:method => :delete,
|
|
:data => { :confirm => t('.confirm', :default => t("helpers.links.confirm", :default => 'Are you sure?')) },
|
|
:class => 'btn btn-mini btn-danger' %>
|
|
</td>
|
|
</tr>
|
|
<% end %>
|
|
</tbody>
|
|
</table>
|
|
|
|
<%= link_to t('.new', :default => t("helpers.links.new")),
|
|
new_alert_path,
|
|
:class => 'btn btn-primary' %>
|