Aggiunge annunci in-app/sito, contatti e migliora UI copertina sul portale.
Include admin/API/banner nativi, form contatti e reset copertina standard con layout edit più ampio. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -0,0 +1,56 @@
|
||||
<% content_for :body_class, "admin-body" %>
|
||||
|
||||
<div class="admin-page-head">
|
||||
<h2 class="admin-page-title"><%= t("admin.announcements.index.title") %></h2>
|
||||
<p class="muted admin-page-sub"><%= t("admin.announcements.index.lead") %></p>
|
||||
</div>
|
||||
|
||||
<div class="panel" style="margin-bottom:1.5rem">
|
||||
<div class="admin-toolbar">
|
||||
<%= link_to t("admin.announcements.index.new"), new_admin_announcement_path, class: "admin-btn admin-btn--primary" %>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="panel">
|
||||
<h2><%= t("admin.announcements.index.table_title") %></h2>
|
||||
<% if @announcements.any? %>
|
||||
<div class="admin-table-wrap">
|
||||
<table class="admin-table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th><%= t("admin.announcements.table.status") %></th>
|
||||
<th><%= t("admin.announcements.table.kind") %></th>
|
||||
<th><%= t("admin.announcements.table.title") %></th>
|
||||
<th><%= t("admin.announcements.table.channels") %></th>
|
||||
<th><%= t("admin.announcements.table.window") %></th>
|
||||
<th></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<% @announcements.each do |item| %>
|
||||
<tr>
|
||||
<td>
|
||||
<span class="badge badge--<%= announcement_status_badge(item) %>"><%= t("admin.announcements.status.#{item.status}") %></span>
|
||||
</td>
|
||||
<td class="muted"><%= t("admin.announcements.kind.#{item.kind}") %></td>
|
||||
<td>
|
||||
<strong><%= item.title %></strong>
|
||||
<div class="muted" style="font-size:0.85rem;margin-top:0.25rem"><%= truncate(item.body, length: 90) %></div>
|
||||
</td>
|
||||
<td class="muted"><%= announcement_channels_label(item) %></td>
|
||||
<td class="muted"><%= announcement_window_label(item) %></td>
|
||||
<td class="admin-actions">
|
||||
<%= link_to t("admin.announcements.actions.edit"), edit_admin_announcement_path(item), class: "admin-btn admin-btn--sm" %>
|
||||
<%= button_to t("admin.announcements.actions.delete"), admin_announcement_path(item), method: :delete,
|
||||
class: "admin-btn admin-btn--sm admin-btn--danger",
|
||||
form: { data: { confirm: t("admin.announcements.actions.delete_confirm") } } %>
|
||||
</td>
|
||||
</tr>
|
||||
<% end %>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<% else %>
|
||||
<p class="empty"><%= t("admin.announcements.index.none") %></p>
|
||||
<% end %>
|
||||
</div>
|
||||
Reference in New Issue
Block a user