forked from fixin.me/fixin.me
28 lines
894 B
Plaintext
28 lines
894 B
Plaintext
<%= tag.tr do %>
|
|
<td class="<%= class_names({grayed: unit.default?}) %>"
|
|
style="--depth:<%= unit.base_id? ? 1 : 0 %>">
|
|
<%= unit %>
|
|
</td>
|
|
|
|
<% if current_user.at_least(:active) %>
|
|
<td class="actions">
|
|
<% unless unit.portable.nil? %>
|
|
<% if unit.default? %>
|
|
<%= image_button_to_if unit.portable?, t('.import'), 'download-outline',
|
|
import_default_unit_path(unit) %>
|
|
<% end %>
|
|
|
|
<% if current_user.at_least(:admin) %>
|
|
<% if unit.default? %>
|
|
<%= image_button_to_if unit.movable?, t('.delete'), 'delete-outline',
|
|
default_unit_path(unit), method: :delete %>
|
|
<% else %>
|
|
<%= image_button_to_if unit.portable?, t('.export'), 'upload-outline',
|
|
export_default_unit_path(unit) %>
|
|
<% end %>
|
|
<% end %>
|
|
<% end %>
|
|
</td>
|
|
<% end %>
|
|
<% end %>
|