34 lines
1.1 KiB
Plaintext
34 lines
1.1 KiB
Plaintext
<div id="<%= dom_id filter %>" class="<%= filter.enabled? ? 'filter--enabled' : 'filter--disabled' %> flex space-x-2">
|
|
|
|
<div class="flex-auto">
|
|
<strong class="pr-1">Description:</strong>
|
|
<%= filter.description || "<i>No description</i>" %>
|
|
</div>
|
|
|
|
<div class="flex-auto">
|
|
<strong class="pr-1">Operator:</strong>
|
|
<%= filter.operator %>
|
|
</div>
|
|
|
|
<div class="flex-auto">
|
|
<strong class="pr-1">Inverted:</strong>
|
|
<%= filter.inverted? ? 'Yes' : 'No' %>
|
|
</div>
|
|
|
|
<div class="flex-none text-center">
|
|
<div class="">
|
|
<%= link_to 'Edit', edit_filter_path(@filter) %>
|
|
</div>
|
|
<div class="">
|
|
<%= link_to 'Delete', @filter, method: :delete, data: { confirm: 'Are you sure you want to delete this filter?' } %>
|
|
</div>
|
|
<div class="">
|
|
<% if filter.enabled? %>
|
|
<%= link_to 'Disable', disable_filter_path(@filter), data: { method: :patch, confirm: 'Are you sure you want to disable this filter?' } %>
|
|
<% else %>
|
|
<%= link_to 'Enable', enable_filter_path(@filter), data: { method: :patch, confirm: 'Are you sure you want to enable this filter?' } %>
|
|
<% end %>
|
|
</div>
|
|
</div>
|
|
</div>
|