mirror of
https://github.com/scinote-eln/scinote-web.git
synced 2024-11-15 13:45:25 +08:00
83 lines
3.6 KiB
Text
83 lines
3.6 KiB
Text
<div id="toolbarButtonsDatatable" class="sci-btn-group">
|
|
<% if @repository.active? %>
|
|
<% 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" data-view-mode="active">
|
|
<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" disabled data-view-mode="active">
|
|
<span class="fas fa-pencil-alt"></span>
|
|
<span class="hidden-xs-custom"><%= t("repositories.edit_record") %></span>
|
|
</button>
|
|
<% end %>
|
|
|
|
|
|
<% if can_create_repository_rows?(@repository) %>
|
|
<button type="button" class="btn btn-light copyRow" id="copyRepositoryRecords" disabled data-view-mode="active">
|
|
<span class="fas fa-copy"></span>
|
|
<span class="hidden-xs-custom"><%= t("repositories.copy_record") %></span>
|
|
</button>
|
|
<% end %>
|
|
|
|
<% if can_delete_repository_rows?(@repository) %>
|
|
<button type="button" class="btn btn-light"
|
|
id="archiveRepositoryRecordsButton" disabled data-view-mode="active">
|
|
<span class="fas fa-archive"></span>
|
|
<span class="hidden-xs-custom"><%= t'repositories.archive_record' %></span>
|
|
</button>
|
|
<% end %>
|
|
<button type="button" class="btn btn-light" id="restoreRepositoryRecords" disabled data-view-mode="archived">
|
|
<span class="fas fa-undo"></span>
|
|
<span class="hidden-xs"><%= t("repositories.restore_record") %></span>
|
|
</button>
|
|
<% if can_delete_repository_rows?(@repository) %>
|
|
<button type="button" class="btn btn-light" id="deleteRepositoryRecords" disabled data-view-mode="archived">
|
|
<span class="fas fa-trash"></span>
|
|
<span class="hidden-xs"><%= t("repositories.delete_record") %></span>
|
|
</button>
|
|
<% end %>
|
|
</span>
|
|
|
|
<span id="saveCancel" data-toggle="buttons" style="display:none">
|
|
<button type="button" class="btn btn-success" id="saveRecord" data-view-mode="active">
|
|
<span class="fas fa-save"></span>
|
|
<%= t("repositories.save_record") %>
|
|
</button>
|
|
<button type="button" class="btn btn-light" id="cancelSave" data-view-mode="active">
|
|
<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 %>
|
|
<% end %>
|
|
<div class="archived-label" data-view-mode="archived">
|
|
<% if @repository.active? %>
|
|
<%= t('repositories.show.archived_view_label.active', repository_name: @repository.name) %>
|
|
<% else %>
|
|
<table>
|
|
<tr>
|
|
<td><%= t('repositories.show.archived_view_label.archived_on') %></td>
|
|
<td><%= I18n.l(@repository.archived_on, format: :full) %></td>
|
|
</tr>
|
|
<tr>
|
|
<td><%= t('repositories.show.archived_view_label.archived_by') %></td>
|
|
<td><%= @repository.archived_by.full_name %></td>
|
|
</tr>
|
|
</table>
|
|
<% end %>
|
|
</div>
|
|
</div>
|