mirror of
https://github.com/scinote-eln/scinote-web.git
synced 2025-01-05 07:03:51 +08:00
55 lines
2.4 KiB
Text
55 lines
2.4 KiB
Text
<div id="toolbarButtonsDatatable">
|
|
<% if @repository.repository_snapshots.provisioning.any? %>
|
|
<div class='repository-provisioning-notice'>
|
|
<i class="fas fa-info-circle"></i>
|
|
<%= t('repositories.index.snapshot_provisioning_in_progress') %>
|
|
</div>
|
|
<% end %>
|
|
|
|
<% if can_create_repository_rows?(@repository) %>
|
|
<button type="button" class="btn btn-primary editAdd" id="addRepositoryRecord" onclick="onClickAddRecord()">
|
|
<span class="fas fa-plus"></span>
|
|
<span class="hidden-xs"><%= t("repositories.add_new_record") %></span>
|
|
</button>
|
|
<% end %>
|
|
|
|
<% if can_manage_repository_rows?(@repository) %>
|
|
<span id="editDeleteCopy" data-toggle="buttons" style="display:none">
|
|
<%if can_update_repository_rows?(@repository) %>
|
|
<button type="button" class="btn btn-light editAdd" id="editRepositoryRecord" onclick="onClickEdit()" disabled>
|
|
<span class="fas fa-pencil-alt"></span>
|
|
<span class="hidden-xs-custom"><%= t("repositories.edit_record") %></span>
|
|
</button>
|
|
<% end %>
|
|
|
|
<% if can_delete_repository_rows?(@repository) %>
|
|
<button type="button" class="btn btn-light"
|
|
id="deleteRepositoryRecordsButton" onclick="onClickDelete()" disabled>
|
|
<span class="fas fa-trash"></span>
|
|
<span class="hidden-xs-custom"><%= t'repositories.delete_record' %></span>
|
|
<%= submit_tag I18n.t('repositories.delete_record'), :class => "hidden delete_repository_records_submit" %>
|
|
</button>
|
|
<% end %>
|
|
|
|
<% if can_create_repository_rows?(@repository) %>
|
|
<button type="button" class="btn btn-light copyRow" id="copyRepositoryRecords" onclick="onClickCopyRepositoryRecords()" disabled>
|
|
<span class="fas fa-copy"></span>
|
|
<span class="hidden-xs-custom"><%= t("repositories.copy_record") %></span>
|
|
</button>
|
|
<%end%>
|
|
</span>
|
|
|
|
<span id="saveCancel" data-toggle="buttons" style="display:none">
|
|
<button type="button" class="btn btn-success" id="saveRecord">
|
|
<span class="fas fa-save"></span>
|
|
<%= t("repositories.save_record") %>
|
|
</button>
|
|
<button type="button" class="btn btn-light" id="cancelSave">
|
|
<span class="fas fa-times-circle"></span>
|
|
<%= t("repositories.cancel_save") %>
|
|
</button>
|
|
</span>
|
|
<% elsif @repository.shared_with?(current_team) %>
|
|
<p class="view-only-label"><%= t('repositories.index.view_only_permission_label') %></p>
|
|
<% end %>
|
|
</div>
|