2022-03-18 21:10:34 +08:00
|
|
|
<% if can_manage_repository_rows?(@repository) %>
|
|
|
|
<span id="editDeleteCopy" data-toggle="buttons" style="display:none">
|
2022-05-19 19:46:03 +08:00
|
|
|
<% if can_manage_repository_rows?(@repository) %>
|
2022-03-18 21:10:34 +08:00
|
|
|
<button type="button" title="<%= t('repositories.show.button_tooltip.edit') %>"
|
|
|
|
class="btn btn-light editAdd auto-shrink-button"
|
2022-07-18 18:31:04 +08:00
|
|
|
id="editRepositoryRecord" data-view-mode="active">
|
2023-06-08 14:33:37 +08:00
|
|
|
<span class="sn-icon sn-icon-edit"></span>
|
2022-03-18 21:10:34 +08:00
|
|
|
<span class="button-text"><%= t("repositories.edit_record") %></span>
|
|
|
|
</button>
|
|
|
|
<% end %>
|
|
|
|
|
|
|
|
|
|
|
|
<% if can_create_repository_rows?(@repository) %>
|
2022-08-04 17:05:55 +08:00
|
|
|
<button type="button"
|
|
|
|
data-toggle="tooltip"
|
|
|
|
data-placement="bottom"
|
|
|
|
title="<%= t('repositories.show.button_tooltip.duplicate') %>"
|
2022-03-18 21:10:34 +08:00
|
|
|
class="btn btn-light copyRow auto-shrink-button"
|
|
|
|
id="copyRepositoryRecords" disabled data-view-mode="active">
|
2023-06-08 14:33:37 +08:00
|
|
|
<span class="sn-icon sn-icon-duplicate"></span>
|
2022-03-18 21:10:34 +08:00
|
|
|
<span class="button-text"><%= t("repositories.copy_record") %></span>
|
|
|
|
</button>
|
|
|
|
<% end %>
|
|
|
|
<button class="btn btn-light auto-shrink-button"
|
2022-08-04 17:05:55 +08:00
|
|
|
data-toggle="tooltip"
|
|
|
|
data-placement="bottom"
|
2022-03-18 21:10:34 +08:00
|
|
|
title="<%= t('repositories.show.button_tooltip.export') %>"
|
|
|
|
id="exportRepositoriesButton">
|
2023-06-08 14:33:37 +08:00
|
|
|
<span class="sn-icon sn-icon-export"></span>
|
2022-03-18 21:10:34 +08:00
|
|
|
<span class="button-text"><%= t("repositories.index.options_dropdown.export_items") %></span>
|
|
|
|
</button>
|
2022-08-12 20:55:14 +08:00
|
|
|
<%= render partial: 'repositories/toolbar/print_label_button' %>
|
2022-03-18 21:10:34 +08:00
|
|
|
<% if can_delete_repository_rows?(@repository) %>
|
2022-08-04 17:05:55 +08:00
|
|
|
<button type="button"
|
|
|
|
data-toggle="tooltip"
|
|
|
|
data-placement="bottom"
|
|
|
|
title="<%= t('repositories.show.button_tooltip.archive') %>"
|
2022-03-18 21:10:34 +08:00
|
|
|
class="btn btn-light auto-shrink-button"
|
|
|
|
id="archiveRepositoryRecordsButton" disabled data-view-mode="active">
|
2023-06-08 14:33:37 +08:00
|
|
|
<span class="sn-icon sn-icon-archive"></span>
|
2022-03-18 21:10:34 +08:00
|
|
|
<span class="button-text"><%= t'repositories.archive_record' %></span>
|
|
|
|
</button>
|
|
|
|
<% end %>
|
|
|
|
<button type="button" class="btn btn-light auto-shrink-button" id="restoreRepositoryRecords" disabled data-view-mode="archived">
|
2023-06-08 14:33:37 +08:00
|
|
|
<span class="sn-icon sn-icon-restore"></span>
|
2022-03-18 21:10:34 +08:00
|
|
|
<span class="button-text"><%= t("repositories.restore_record") %></span>
|
|
|
|
</button>
|
|
|
|
<% if can_delete_repository_rows?(@repository) %>
|
|
|
|
<button type="button" class="btn btn-light auto-shrink-buttons" id="deleteRepositoryRecords" disabled data-view-mode="archived">
|
2023-06-08 14:33:37 +08:00
|
|
|
<span class="sn-icon sn-icon-delete"></span>
|
2022-03-18 21:10:34 +08:00
|
|
|
<span class="button-text"><%= t("repositories.delete_record") %></span>
|
|
|
|
</button>
|
|
|
|
<% end %>
|
|
|
|
</span>
|
|
|
|
|
|
|
|
<span id="saveCancel" data-toggle="buttons" style="display:none">
|
2022-04-28 20:32:34 +08:00
|
|
|
<button type="button" class="btn btn-success prevent-shrink" id="saveRecord" data-view-mode="active">
|
2022-03-18 21:10:34 +08:00
|
|
|
<span class="fas fa-save"></span>
|
|
|
|
<%= t("repositories.save_record") %>
|
|
|
|
</button>
|
2022-04-28 20:32:34 +08:00
|
|
|
<button type="button" class="btn btn-light prevent-shrink" id="cancelSave" data-view-mode="active">
|
2023-06-08 14:33:37 +08:00
|
|
|
<span class="sn-icon sn-icon-close-remove"></span>
|
2022-03-18 21:10:34 +08:00
|
|
|
<%= t("repositories.cancel_save") %>
|
|
|
|
</button>
|
|
|
|
</span>
|
|
|
|
<% elsif @repository.shared_with_read?(current_team) %>
|
|
|
|
<p class="view-only-label"><%= t('repositories.index.view_only_permission_label') %></p>
|
2022-10-19 20:10:04 +08:00
|
|
|
<%= render partial: 'repositories/toolbar/print_label_button' %>
|
2022-08-12 20:55:14 +08:00
|
|
|
<% elsif can_read_repository?(@repository) %>
|
|
|
|
<%= render partial: 'repositories/toolbar/print_label_button' %>
|
2022-03-18 21:10:34 +08:00
|
|
|
<% end %>
|