2021-02-28 10:55:53 +01:00
|
|
|
<div id="<%= dom_id filter %>" class="filter-<%= filter.enabled? ? 'enabled' : 'disabled' %> flex flex-row bg-green-500">
|
2021-02-01 14:02:54 +01:00
|
|
|
|
2021-02-28 10:55:53 +01:00
|
|
|
<div class="flex flex-grow bg-yellow-500">
|
|
|
|
<strong class="pr-1">Description:</strong>
|
2021-02-07 16:47:06 +01:00
|
|
|
<%= filter.description || "<i>No description</i>" %>
|
|
|
|
</div>
|
2021-02-01 14:02:54 +01:00
|
|
|
|
2021-02-28 10:55:53 +01:00
|
|
|
<div class="flex flex-grow bg-yellow-500">
|
|
|
|
<strong class="pr-1">Operator:</strong>
|
2021-02-01 14:02:54 +01:00
|
|
|
<%= filter.operator %>
|
2021-02-07 16:47:06 +01:00
|
|
|
</div>
|
2021-02-01 14:02:54 +01:00
|
|
|
|
2021-02-28 10:55:53 +01:00
|
|
|
<div class="flex flex-grow bg-yellow-500">
|
|
|
|
<strong class="pr-1">Inverted:</strong>
|
2021-02-07 16:47:06 +01:00
|
|
|
<%= filter.inverted? ? 'Yes' : 'No' %>
|
|
|
|
</div>
|
|
|
|
|
2021-02-28 10:55:53 +01:00
|
|
|
<div class="flex flex-grow-0 flex-col bg-gray-500">
|
|
|
|
<%= link_to 'Edit', edit_filter_path(@filter), class: "flex items-center" %>
|
|
|
|
<%= button_to 'Delete', @filter, method: :delete, data: { confirm: 'Are you sure?' }, class: "flex items-center" %>
|
2021-02-07 16:47:06 +01:00
|
|
|
<% if filter.enabled? %>
|
2021-02-28 10:55:53 +01:00
|
|
|
<%= button_to 'Disable', filter_disable_path(@filter), data: { method: :patch }, class: "flex items-center" %>
|
2021-02-07 16:47:06 +01:00
|
|
|
<% else %>
|
2021-02-28 10:55:53 +01:00
|
|
|
<%= button_to 'Enable', filter_enable_path(@filter), data: { method: :patch }, class: "flex items-center" %>
|
2021-02-07 16:47:06 +01:00
|
|
|
<% end %>
|
|
|
|
</div>
|
2021-02-01 14:02:54 +01:00
|
|
|
</div>
|