mirror of
https://github.com/scinote-eln/scinote-web.git
synced 2024-11-17 14:46:00 +08:00
71 lines
3.4 KiB
Text
71 lines
3.4 KiB
Text
<% if can_manage_repository_rows?(@repository) %>
|
|
<span id="editDeleteCopy" data-toggle="buttons" style="display:none">
|
|
<% if can_manage_repository_rows?(@repository) %>
|
|
<button type="button" title="<%= t('repositories.show.button_tooltip.edit') %>"
|
|
class="btn btn-light editAdd auto-shrink-button"
|
|
id="editRepositoryRecord" disabled data-view-mode="active">
|
|
<span class="fas fa-pencil-alt"></span>
|
|
<span class="button-text"><%= t("repositories.edit_record") %></span>
|
|
</button>
|
|
<% end %>
|
|
|
|
|
|
<% if can_create_repository_rows?(@repository) %>
|
|
<button type="button"
|
|
data-toggle="tooltip"
|
|
data-placement="bottom"
|
|
title="<%= t('repositories.show.button_tooltip.duplicate') %>"
|
|
class="btn btn-light copyRow auto-shrink-button"
|
|
id="copyRepositoryRecords" disabled data-view-mode="active">
|
|
<span class="fas fa-copy"></span>
|
|
<span class="button-text"><%= t("repositories.copy_record") %></span>
|
|
</button>
|
|
<% end %>
|
|
<button class="btn btn-light auto-shrink-button"
|
|
data-toggle="tooltip"
|
|
data-placement="bottom"
|
|
title="<%= t('repositories.show.button_tooltip.export') %>"
|
|
id="exportRepositoriesButton">
|
|
<span class="fas fa-download"></span>
|
|
<span class="button-text"><%= t("repositories.index.options_dropdown.export_items") %></span>
|
|
</button>
|
|
<%= render partial: 'repositories/toolbar/print_label_button' %>
|
|
<% if can_delete_repository_rows?(@repository) %>
|
|
<button type="button"
|
|
data-toggle="tooltip"
|
|
data-placement="bottom"
|
|
title="<%= t('repositories.show.button_tooltip.archive') %>"
|
|
class="btn btn-light auto-shrink-button"
|
|
id="archiveRepositoryRecordsButton" disabled data-view-mode="active">
|
|
<span class="fas fa-archive"></span>
|
|
<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">
|
|
<span class="fas fa-undo"></span>
|
|
<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">
|
|
<span class="fas fa-trash"></span>
|
|
<span class="button-text"><%= t("repositories.delete_record") %></span>
|
|
</button>
|
|
<% end %>
|
|
</span>
|
|
|
|
<span id="saveCancel" data-toggle="buttons" style="display:none">
|
|
<button type="button" class="btn btn-success prevent-shrink" id="saveRecord" data-view-mode="active">
|
|
<span class="fas fa-save"></span>
|
|
<%= t("repositories.save_record") %>
|
|
</button>
|
|
<button type="button" class="btn btn-light prevent-shrink" id="cancelSave" data-view-mode="active">
|
|
<span class="fas fa-times-circle"></span>
|
|
<%= t("repositories.cancel_save") %>
|
|
</button>
|
|
</span>
|
|
<% elsif @repository.shared_with_read?(current_team) %>
|
|
<%= render partial: 'repositories/toolbar/print_label_button' %>
|
|
<p class="view-only-label"><%= t('repositories.index.view_only_permission_label') %></p>
|
|
<% elsif can_read_repository?(@repository) %>
|
|
<%= render partial: 'repositories/toolbar/print_label_button' %>
|
|
<% end %>
|