31 lines
1.3 KiB
Plaintext
31 lines
1.3 KiB
Plaintext
<% if @articles.blank? %>
|
|
<div class="callout callout-warning">
|
|
<h4>Brak wpisów</h4>
|
|
<p>Dla kategorii Artykuły.</p>
|
|
</div>
|
|
<% else %>
|
|
<table class="table table-bordered">
|
|
<tbody>
|
|
<tr>
|
|
<th>Nazwa</th>
|
|
<th>Ilość wpisów</th>
|
|
<th>Ilość wpisów publicznych</th>
|
|
<th>Data utworzenia</th>
|
|
<th style="width: 180px">Akcje</th>
|
|
</tr>
|
|
<% for ap in @articles %>
|
|
<tr>
|
|
<td><%= link_to ap.name, {controller: '/ps_admin/article', action: 'show', id: ap.id} %></td>
|
|
<td><%= raw('<span class="badge bg-yellow">' + ap.all_page_articles.count.to_s + '</span>') %></td>
|
|
<td><%= raw('<span class="badge bg-green">' + ap.published_page_articles.count.to_s + '</span>') %></td>
|
|
<td><%= ap.updated_at %></td>
|
|
<td>
|
|
<%= link_to raw('<i class="fa fa-edit"></i> Edycja'), {controller: '/ps_admin/article', action: 'edit', id: ap.id}, class: 'btn btn-xs btn-info', remote: true %>
|
|
<%= link_to raw('<i class="fa fa-trash"></i> Usuń'), {controller: '/ps_admin/article', action: 'destroy', id: ap.id}, class: "btn btn-danger btn-xs", method: :delete, data: { confirm: 'Czy na pewno usunąć?' } %>
|
|
</td>
|
|
</tr>
|
|
<% end %>
|
|
</tbody>
|
|
</table>
|
|
<% end %>
|