Skip to content

Commit

Permalink
Improve admin table
Browse files Browse the repository at this point in the history
  • Loading branch information
Splines committed Sep 13, 2023
1 parent 5bba776 commit 69f4159
Showing 1 changed file with 14 additions and 5 deletions.
19 changes: 14 additions & 5 deletions app/views/announcements/index.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,14 @@

<div class="row p-2">
<div class="col-12">
<table class="table table-striped bg-white border border-primary-subtle shadow">
<table class="table table-striped bg-white
border border-primary-subtle shadow-sm">
<thead>
<tr>
<th scope="col">Created at</th>
<th scope="col">Updated at</th>
<th scope="col">Name</th>
<th scope="col"></th>
<th scope="col">Active</th>
</tr>
</thead>
Expand All @@ -25,14 +27,21 @@
<tr>
<td><%= popup.created_at %></td>
<td><%= popup.updated_at %></td>
<td><%= link_to popup.name,
'/news_popups/' + popup.name + '.html',
target: :_blank %>
<td>
<input class="form-control" value="<%= popup.name %>">
</td>
<td>
<%= link_to 'Test',
'/news_popups/' + popup.name + '.html',
target: :_blank,
role: 'button',
class: 'btn btn-primary' %>
</td>
<td class="align-middle">
<div class="form-check form-switch">
<% is_checked = popup.active ? 'checked' : '' %>
<input class="form-check-input" type="checkbox" role="switch" <%= is_checked %>>
<input class="form-check-input" type="checkbox"
role="switch" <%= is_checked %>>
</div>
</td>
</tr>
Expand Down

0 comments on commit 69f4159

Please sign in to comment.