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

43 lines
1.5 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>
2013-04-12 19:04:30 -04:00
<th>Class</th>
<th>Sections</th>
<th>Semester</th>
<th>Alerted</th>
<th>Created</th>
2013-04-02 02:43:01 -04:00
<th><%=t '.actions', :default => t("helpers.actions") %></th>
</tr>
</thead>
<tbody>
<% @alerts.each do |alert| %>
<tr>
2013-04-12 19:04:30 -04:00
<td><%= alert.course_name %></td>
2013-04-12 18:31:23 -04:00
<td><%= alert.sections.reject { |v| v.blank? }.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>
2013-04-12 19:04:30 -04:00
<td><%= alert.created_at.to_datetime.strftime("%d %b %Y") %></td>
2013-04-02 02:43:01 -04:00
<td>
2013-04-12 19:04:30 -04:00
<!--<%= link_to t('.show', :default => t("helpers.links.show")),
alert_path(alert), :class => 'btn btn-mini' %>-->
2013-04-02 02:43:01 -04:00
<%= 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' %>