1
0
Fork 0
MSU-Course-Alerter/app/views/alerts/index.html.erb

47 lines
1.9 KiB
Text
Raw Normal View History

2013-04-02 02:43:01 -04:00
<%- 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><%= model_class.human_attribute_name(:id) %></th>
<th><%= model_class.human_attribute_name(:user_id) %></th>
<th><%= model_class.human_attribute_name(:department) %></th>
<th><%= model_class.human_attribute_name(:course) %></th>
2013-04-12 13:14:52 -04:00
<th><%= model_class.human_attribute_name(:sections) %></th>
2013-04-03 19:44:01 -04:00
<th><%= model_class.human_attribute_name(:semester) %></th>
2013-04-02 02:43:01 -04:00
<th><%= model_class.human_attribute_name(:alerted) %></th>
<th><%= model_class.human_attribute_name(:created_at) %></th>
<th><%=t '.actions', :default => t("helpers.actions") %></th>
</tr>
</thead>
<tbody>
<% @alerts.each do |alert| %>
<tr>
<td><%= link_to alert.id, alert_path(alert) %></td>
<td><%= alert.user_id %></td>
<td><%= alert.department %></td>
<td><%= alert.course %></td>
2013-04-12 13:14:52 -04:00
<td><%= alert.sections.join(', ') %></td>
2013-04-03 19:44:01 -04:00
<td><%= alert.semester %></td>
2013-04-02 02:43:01 -04:00
<td><%= alert.alerted %></td>
<td><%=l alert.created_at %></td>
<td>
<%= 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' %>