bus/app/views/admin/ruling_buses/_index.html.erb

32 lines
1.3 KiB
Plaintext
Raw Permalink Normal View History

2021-08-04 03:11:10 +00:00
<% locale = RulingBusInfo.get_locale %>
<table class="table main-list">
<thead>
<tr>
<th><%= t("ruling_bus.city") %></th>
<th><%= t("ruling_bus.monitor_point") %></th>
<th><%= t("ruling_bus.destination") %></th>
<th><%= t("ruling_bus.route_name") %></th>
<th><%= t(:action) %></th>
</tr>
</thead>
<tbody>
<% @ruling_buses.each do |ruling_bus| %>
<tr>
<td><%= ruling_bus.city_show %></td>
<td><%= ruling_bus.monitor_point_show(locale) %></td>
<td><%= ruling_bus.destination_show(locale) %></td>
<td><%= ruling_bus.route_names.join('<br>').html_safe %></td>
<td>
<%= link_to(t("restful_actions.edit_bus"), edit_bus_admin_ruling_bus_path(ruling_bus), :class=>"btn btn-primary")%>
<a data-method="delete" data-confirm="Are you sure?" href="<%= admin_ruling_bus_path(ruling_bus) %>" class="delete btn btn-danger"><%= t(:delete_) %></a>
</td>
</tr>
<% end %>
</tbody>
</table>
<%=
content_tag :div, class: "bottomnav clearfix" do
content_tag(:div, paginate(@ruling_buses), class: "pagination pagination-centered") +
content_tag(:div, link_to(t("restful_actions.new_bus"),new_bus_admin_ruling_buses_path, :class=>"btn btn-primary"), class: "pull-right")
end
%>