2021-02-09 14:26:05 +01:00
|
|
|
<% content_for :main_header do %>
|
|
|
|
<h1>Filters</h1>
|
2021-02-07 16:47:06 +01:00
|
|
|
<% end %>
|
2021-02-01 14:02:54 +01:00
|
|
|
|
2021-02-07 16:47:06 +01:00
|
|
|
<p id="notice"><%= notice %></p>
|
2021-02-01 14:02:54 +01:00
|
|
|
|
2021-02-28 11:46:19 +01:00
|
|
|
<div class="shadow overflow-hidden border-b border-gray-200 rounded-lg">
|
|
|
|
<table class="min-w-full divide-y divide-gray-200">
|
|
|
|
<thead class="bg-gray-50">
|
2021-02-01 14:02:54 +01:00
|
|
|
<tr>
|
2021-02-28 11:46:19 +01:00
|
|
|
<th scope="col" class="px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">Description</th>
|
|
|
|
<th scope="col" class="px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">Enabled</th>
|
|
|
|
<th scope="col" class="px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">Operator</th>
|
|
|
|
<th scope="col" class="px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">Inverted</th>
|
|
|
|
<th scope="col" class="relative px-6 py-3"><span class="sr-only">Show, Edit, Destroy</span></th>
|
2021-02-01 14:02:54 +01:00
|
|
|
</tr>
|
2021-02-28 11:46:19 +01:00
|
|
|
</thead>
|
|
|
|
|
|
|
|
<tbody class="bg-white divide-y divide-gray-200">
|
|
|
|
<% @filters.each do |filter| %>
|
|
|
|
<tr class="<%= cycle('bg-white', 'bg-gray-50', :name => 'zebra') %>">
|
|
|
|
<td class="px-6 py-4 whitespace-nowrap">
|
|
|
|
<%= filter.description %>
|
|
|
|
</td>
|
|
|
|
<td class="px-6 py-4 whitespace-nowrap">
|
|
|
|
<% if filter.enabled? %>
|
|
|
|
<span class="px-2 inline-flex text-xs leading-5 font-semibold rounded-full bg-green-100 text-green-800">
|
|
|
|
<%= filter.enabled %>
|
|
|
|
</span>
|
|
|
|
<% else %>
|
|
|
|
<span class="px-2 inline-flex text-xs leading-5 font-semibold rounded-full bg-red-100 text-red-800">
|
|
|
|
<%= filter.enabled %>
|
|
|
|
</span>
|
|
|
|
<% end %>
|
|
|
|
</td>
|
|
|
|
<td class="px-6 py-4 whitespace-nowrap">
|
|
|
|
<%= filter.operator %>
|
|
|
|
</td>
|
|
|
|
<td class="px-6 py-4 whitespace-nowrap">
|
|
|
|
<%= filter.inverted %>
|
|
|
|
</td>
|
|
|
|
<td>
|
|
|
|
<%= link_to 'Show', filter %>
|
|
|
|
<%= link_to 'Edit', edit_filter_path(filter) %>
|
|
|
|
<%= link_to 'Destroy', filter, method: :delete, data: { confirm: 'Are you sure?' } %>
|
|
|
|
</td>
|
|
|
|
</tr>
|
|
|
|
<% end %>
|
|
|
|
</tbody>
|
|
|
|
</table>
|
|
|
|
</div>
|
2021-02-01 14:02:54 +01:00
|
|
|
|
|
|
|
<br>
|
|
|
|
|
|
|
|
<%= link_to 'New Filter', new_filter_path %>
|