* feat: make the sidebar more dynamic * refactor: use the action in the same controller instead of the whole path * feat: remove hardcoded routes * feat: move routes into file * feat: use rails 6 draw for the admin routes * add a helper method * oops: fix super * feat: add the hacky helper methods :( ) * WIP: created different path helpers for the new routes and point the old helpers to the new ones if the FF is toggled * feat: update the module * chore: add new paths * feat: change link_to's use paths instead * feat: feedback_messages to scoped admin route * chore: update the feature flag urls helpers * feat: feedback_messages issue * chore: remove all the workarounds * chore: rubucop * fix: oops remove helper * chore: comment out the tests that touch the tabbed navbar which is affected by the rails application needing to be reloaded * feat: ensure that we chcek if the db table exists
47 lines
1.4 KiB
Text
47 lines
1.4 KiB
Text
<header class="flex">
|
|
<h2 class="crayons-title mb-6"><%= @broadcast.title %></h2>
|
|
<div class="ml-auto">
|
|
<%= link_to "Destroy", admin_broadcast_path(@broadcast), class: "btn btn-danger", method: :delete, data: { confirm: "Are you sure?" } %>
|
|
<%= link_to "Edit", edit_admin_broadcast_path, class: "btn btn-primary" %>
|
|
</div>
|
|
</header>
|
|
|
|
<div class="crayons-card p-6 grid gap-4 mb-6">
|
|
<div>
|
|
<p class="fw-bold">Type</p>
|
|
<p><%= @broadcast.type_of %></p>
|
|
</div>
|
|
|
|
<div>
|
|
<p class="fw-bold">Content</p>
|
|
<p><%= @broadcast.processed_html %></p>
|
|
</div>
|
|
|
|
<div>
|
|
<p class="fw-bold">Last active</p>
|
|
<p><%= @broadcast.active_status_updated_at&.strftime("%b %d, %Y %H:%M UTC") %></p>
|
|
</div>
|
|
|
|
<div>
|
|
<p class="fw-bold">Status</p>
|
|
<p>
|
|
<span class="badge badge-<%= @broadcast.active? ? "success" : "warning" %>">
|
|
<%= @broadcast.active? ? "Active" : "Inactive" %>
|
|
</span>
|
|
</p>
|
|
</div>
|
|
</div>
|
|
|
|
<% if @broadcast.processed_html %>
|
|
<div class="crayons-card p-6">
|
|
<p><strong>Preview</strong></p>
|
|
<div class="broadcast-wrapper visible <%= banner_class(@broadcast) %>">
|
|
<div class="broadcast-data">
|
|
<%= sanitize @broadcast.processed_html, attributes: %w[href style src] %>
|
|
</div>
|
|
</div>
|
|
<p><em>Please note: announcement broadcasts will render directly below the nav bar once activated.</em></p>
|
|
<div>
|
|
<% end %>
|
|
|
|
<%= csrf_meta_tags %>
|