mirror of
https://github.com/scinote-eln/scinote-web.git
synced 2024-11-11 10:06:53 +08:00
64 lines
3.1 KiB
Text
64 lines
3.1 KiB
Text
<% content_for :head do %>
|
|
<meta name="turbolinks-cache-control" content="no-cache">
|
|
<% end %>
|
|
|
|
<% provide(:head_title, t("my_modules.repository.head_title",
|
|
project: h(@project.name),
|
|
module: h(@my_module.name),
|
|
repository: h(@repository.name)).html_safe) %>
|
|
<%= render partial: "shared/sidebar", locals: { current_task: @my_module, page: 'task' } %>
|
|
<%= render partial: "shared/secondary_navigation" %>
|
|
|
|
<div class="content-pane">
|
|
<h3 style="margin-top: 5px;"><%= @repository.name %></h3>
|
|
|
|
<div id="show-assigned-buttons" class="btn-group repository-assign-group" data-toggle="buttons">
|
|
<button type="button" class="active btn btn-toggle" id="assigned-repo-records"><%= t("repositories.view_assigned_records") %></button>
|
|
<button type="button" class="btn btn-toggle" id="all-repo-records"><%= t("repositories.view_all_records") %></button>
|
|
</div>
|
|
|
|
<div class="repo-datatables-buttons pull-right" style="display: inline;">
|
|
<button class="btn btn-secondary help_tooltips manage-repo-column-index"
|
|
data-modal-url="<%= repository_columns_index_html_path(@repository) %>"
|
|
data-action="new"
|
|
data-tooltiplink="<%= I18n.t('tooltips.link.inventory.manage_columns') %>"
|
|
data-tooltipcontent="<%= I18n.t('tooltips.text.inventory.manage_columns') %>">
|
|
<span class="fas fa-wrench"></span> <%= t('repositories.index.columns') %>
|
|
</button>
|
|
</div>
|
|
|
|
<div class="toolbarButtons" style="display:none">
|
|
<% if module_page? && can_assign_repository_rows_to_module?(@my_module) %>
|
|
<button type="button" class="btn btn-default"
|
|
data-assign-url-modal="<%= assign_repository_records_modal_my_module_path(@my_module, @repository) %>"
|
|
id="assignRepositoryRecords" onclick="openAssignRecordsModal()" disabled>
|
|
<span class="fas fa-check-circle"></span>
|
|
<span class="hidden-xs-custom"><%= t'repositories.assign_records_to_module' %></span>
|
|
</button>
|
|
<button type="button" class="btn btn-default"
|
|
data-unassign-url="<%= unassign_repository_records_modal_my_module_path(@my_module, @repository)%>"
|
|
id="unassignRepositoryRecords" onclick="openUnassignRecordsModal()" disabled>
|
|
<span class="fas fa-ban"></span>
|
|
<span class="hidden-xs-custom"><%= t'repositories.unassign_records_from_module' %></span>
|
|
</button>
|
|
<% end %>
|
|
</div>
|
|
|
|
<div id="content" class="my-module-inventories"
|
|
data-repo-id="#repository-table-<%= @repository.id %>">
|
|
<%= render partial: "repositories/repository_table",
|
|
locals: {
|
|
repository: @repository,
|
|
my_module: @my_module,
|
|
repository_index_link: repository_index_my_module_path(@my_module, @repository, format: :json)
|
|
}
|
|
%>
|
|
</div>
|
|
</div>
|
|
|
|
<%= render partial: 'repository_columns/manage_column_modal.html.erb', locals: { my_module_page: true } %>
|
|
|
|
<%= stylesheet_link_tag 'datatables' %>
|
|
<%= javascript_include_tag 'repositories/repository_datatable' %>
|
|
<%= javascript_include_tag 'repositories/my_module_repository' %>
|
|
<%= javascript_pack_tag 'emoji_button' %>
|