forked from fixin.me/fixin.me
Import portability checks complete
This commit is contained in:
@@ -1,16 +1,17 @@
|
||||
<%= tag.tr do %>
|
||||
<td class="<%= class_names({subunit: unit.base}) %>">
|
||||
<td class="<%= class_names({subunit: unit.base, grayed: unit.default?}) %>">
|
||||
<%= unit.symbol %>
|
||||
</td>
|
||||
|
||||
<td class="actions">
|
||||
<% if current_user.at_least(:active) && unit.default? %>
|
||||
<%= image_button_to t('.import'), 'download-outline', import_default_unit_path(unit),
|
||||
disabled: !unit.portable? %>
|
||||
!unit.portable? ? {disabled: true, aria: {disabled: true}, tabindex: -1} : {} %>
|
||||
<% end %>
|
||||
<% if current_user.at_least(:admin) %>
|
||||
<% if !unit.default? %>
|
||||
<%= image_button_to t('.export'), 'upload-outline', export_default_unit_path(unit) %>
|
||||
<%= image_button_to t('.export'), 'upload-outline', export_default_unit_path(unit),
|
||||
!unit.portable? ? {disabled: true, aria: {disabled: true}, tabindex: -1} : {} %>
|
||||
<% else %>
|
||||
<%= image_button_to t('.delete'), 'delete-outline', unit_path(unit),
|
||||
method: :delete %>
|
||||
|
||||
Reference in New Issue
Block a user