2018-07-19 23:56:42 +08:00
|
|
|
<% content_for :head do %>
|
|
|
|
<meta name="turbolinks-cache-control" content="no-cache">
|
|
|
|
<% end %>
|
|
|
|
|
2017-05-18 20:21:00 +08:00
|
|
|
<% provide(:head_title, t("my_modules.repository.head_title",
|
|
|
|
project: h(@project.name),
|
|
|
|
module: h(@my_module.name),
|
|
|
|
repository: @repository.name).html_safe) %>
|
2018-11-29 18:28:36 +08:00
|
|
|
<%= render partial: "shared/sidebar", locals: { current_task: @my_module, page: 'task' } %>
|
2017-05-18 20:21:00 +08:00
|
|
|
<%= render partial: "shared/secondary_navigation" %>
|
|
|
|
|
2018-05-08 22:33:42 +08:00
|
|
|
<div class="content-pane">
|
|
|
|
<h3 style="margin-top: 5px;"><%= @repository.name %></h3>
|
2017-06-06 23:35:29 +08:00
|
|
|
|
2018-05-08 22:33:42 +08:00
|
|
|
<div id="show-assigned-buttons" class="btn-group repository-assign-group" data-toggle="buttons">
|
2018-05-23 17:20:42 +08:00
|
|
|
<button type="button" class="active btn btn-toggle" id="assigned-repo-records"><%= t("repositories.view_assigned_records") %></button>
|
2018-05-08 22:33:42 +08:00
|
|
|
<button type="button" class="btn btn-default" id="all-repo-records"><%= t("repositories.view_all_records") %></button>
|
|
|
|
</div>
|
2017-06-08 00:13:25 +08:00
|
|
|
|
2018-05-08 22:33:42 +08:00
|
|
|
<div id="datatables-buttons" class="pull-right" style="display: inline;">
|
|
|
|
<%= render partial: "repositories/columns_reorder_dropdown" %>
|
|
|
|
</div>
|
2018-03-21 23:56:36 +08:00
|
|
|
|
2018-05-08 22:33:42 +08:00
|
|
|
<div class="toolbarButtons" style="display:none">
|
|
|
|
<% if module_page? && can_assign_repository_rows_to_module?(@my_module) %>
|
|
|
|
<button type="button" class="btn btn-default"
|
2018-05-10 19:59:57 +08:00
|
|
|
data-assign-url-modal="<%= assign_repository_records_modal_my_module_path(@my_module, @repository) %>"
|
|
|
|
id="assignRepositoryRecords" onclick="openAssignRecordsModal()" disabled>
|
2018-07-09 19:13:44 +08:00
|
|
|
<span class="fas fa-check-circle"></span>
|
2018-05-08 22:33:42 +08:00
|
|
|
<span class="hidden-xs-custom"><%= t'repositories.assign_records_to_module' %></span>
|
|
|
|
</button>
|
|
|
|
<button type="button" class="btn btn-default"
|
2018-05-10 19:59:57 +08:00
|
|
|
data-unassign-url="<%= unassign_repository_records_modal_my_module_path(@my_module, @repository)%>"
|
|
|
|
id="unassignRepositoryRecords" onclick="openUnassignRecordsModal()" disabled>
|
2018-07-09 19:13:44 +08:00
|
|
|
<span class="fas fa-ban"></span>
|
2018-05-08 22:33:42 +08:00
|
|
|
<span class="hidden-xs-custom"><%= t'repositories.unassign_records_from_module' %></span>
|
|
|
|
</button>
|
|
|
|
<% end %>
|
|
|
|
</div>
|
2017-06-06 23:35:29 +08:00
|
|
|
|
2018-05-08 22:33:42 +08:00
|
|
|
<div id="content"
|
|
|
|
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>
|
2017-05-18 20:21:00 +08:00
|
|
|
</div>
|
2017-07-17 21:05:28 +08:00
|
|
|
|
|
|
|
<%= stylesheet_link_tag 'datatables' %>
|
|
|
|
<%= javascript_include_tag 'repositories/repository_datatable' %>
|
|
|
|
<%= javascript_include_tag 'repositories/my_module_repository' %>
|