27 lines
1.1 KiB
Plaintext
27 lines
1.1 KiB
Plaintext
<% if @weeks.blank? %>
|
|
<%= render partial: '/admin/shared/norecords' %>
|
|
<% else %>
|
|
<table class="table table-bordered">
|
|
<thead class="thead-dark">
|
|
<tr>
|
|
<th><%= t('week.table.name') %></th>
|
|
<th><%= t('week.table.description') %></th>
|
|
<th class="fit"><%= t('actions') %></th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
<% @weeks.each do |week| %>
|
|
<tr>
|
|
<td><%= link_to week.name, [:admin, week] %></td>
|
|
<td><%= week.description %></td>
|
|
<td class="fit">
|
|
<%= link_to raw('<i class="fa fa-pencil-alt"></i>'), edit_admin_week_path(week), { remote: true, class: 'btn btn-sm btn-info', title: t('edit') } %>
|
|
<%= link_to raw('<i class="fa fa-times"></i>'), [:admin, week], { remote: true, class: 'btn btn-sm btn-danger', method: :delete, data:{ confirm: t('confirm_delete') }, title: t('delete')} %>
|
|
</td>
|
|
</tr>
|
|
<% end %>
|
|
</tbody>
|
|
</table>
|
|
<%= paginate @weeks, params: { controller: 'admin/weeks', action: :index , course_id: @course.id}, remote: true, theme: 'twitter-bootstrap-4', pagination_class: 'justify-content-center' %>
|
|
<% end %>
|