2018-07-19 23:56:42 +08:00
|
|
|
<% content_for :head do %>
|
|
|
|
<meta name="turbolinks-cache-control" content="no-cache">
|
|
|
|
<% end %>
|
|
|
|
|
2018-03-20 21:45:57 +08:00
|
|
|
<% provide(:head_title, t("libraries.show.head_title", library: @repository.name)) %>
|
2018-03-21 16:22:55 +08:00
|
|
|
<%= stylesheet_link_tag 'datatables' %>
|
2018-05-08 22:33:42 +08:00
|
|
|
<% provide(:container_class, "no-second-nav-container") %>
|
2021-01-06 17:13:10 +08:00
|
|
|
<% provide(:sidebar_url, sidebar_repositories_path) %>
|
|
|
|
<% provide(:sidebar_title, t('sidebar.repositories.sidebar_title')) %>
|
|
|
|
<%= content_for :sidebar do %>
|
|
|
|
<%= render partial: "sidebar", locals: { repositories: @repositories, archived: @repository.archived? } %>
|
|
|
|
<% end %>
|
2017-06-06 23:35:29 +08:00
|
|
|
<div id="alert-container"></div>
|
|
|
|
|
2020-06-17 20:05:23 +08:00
|
|
|
<div class="content-pane repository-show <%= @repository.active? ? "active" : "archived" %>" data-table-url="<%= load_table_repository_path(@repository) %>">
|
2020-06-15 19:49:44 +08:00
|
|
|
<div id="repository-toolbar" class="content-header">
|
2021-01-25 22:36:23 +08:00
|
|
|
<div class="title-row">
|
|
|
|
<% if @repository.active? %>
|
|
|
|
<div class="repository-title-name" data-view-mode="active">
|
|
|
|
<h1 class="name-container">
|
|
|
|
<% if @inline_editable_title_config.present? %>
|
|
|
|
<%= render partial: "shared/inline_editing",
|
|
|
|
locals: {
|
|
|
|
initial_value: @repository.name,
|
|
|
|
config: @inline_editable_title_config
|
|
|
|
} %>
|
|
|
|
<% else %>
|
|
|
|
<div class="read-only-name">
|
|
|
|
<%= @repository.name %>
|
|
|
|
</div>
|
|
|
|
<span class="repository-share-icon">
|
|
|
|
<%= inventory_shared_status_icon(@repository, current_team) %>
|
|
|
|
</span>
|
|
|
|
<% end %>
|
|
|
|
</h1>
|
|
|
|
<% if @repository.shared_with_anybody? %>
|
|
|
|
<% team_name = @repository.team == current_team ? t('repositories.show.your_team') : @repository.team.name %>
|
|
|
|
<div class="repository-subtitle"><%= t('repositories.show.subtitle', team_name: team_name) %></div>
|
2020-06-17 20:05:23 +08:00
|
|
|
<% end %>
|
2021-01-25 22:36:23 +08:00
|
|
|
</div>
|
2020-07-08 19:42:27 +08:00
|
|
|
<% end %>
|
2021-01-25 22:36:23 +08:00
|
|
|
<div class="repository-archived-title-name" data-view-mode="archived">
|
|
|
|
<% if @repository.archived? %>
|
|
|
|
<i class="fas fa-archive"></i>
|
|
|
|
<%= t('repositories.show.archived_inventory', repository_name: @repository.name) %>
|
|
|
|
<% else %>
|
|
|
|
<%= t('repositories.show.archived_inventory_items', repository_name: @repository.name) %>
|
2019-07-29 22:39:23 +08:00
|
|
|
<% end %>
|
|
|
|
</div>
|
2021-01-25 22:36:23 +08:00
|
|
|
<div class="repo-datatables-buttons">
|
|
|
|
<div class="share-repository-button" data-view-mode="active">
|
2022-07-01 17:55:27 +08:00
|
|
|
<% if can_share_repository?(@repository) %>
|
2021-01-25 22:36:23 +08:00
|
|
|
<%= link_to team_repository_share_modal_path(current_team, repository_id: @repository),
|
2022-03-18 21:10:34 +08:00
|
|
|
class: 'btn btn-light share-repo-option', remote: true, id: 'shareRepoBtn' do %>
|
2021-01-25 22:36:23 +08:00
|
|
|
<span class="fas fa-user-plus"></span>
|
|
|
|
<span class="hidden-xs"><%= t('repositories.index.share_inventory') %></span>
|
|
|
|
<% end %>
|
|
|
|
<% end %>
|
|
|
|
</div>
|
2020-01-14 18:13:19 +08:00
|
|
|
|
2022-03-18 21:10:34 +08:00
|
|
|
<button class="btn btn-light manage-repo-column-index"
|
2021-01-25 22:36:23 +08:00
|
|
|
data-modal-url="<%= repository_repository_columns_path(@repository) %>"
|
|
|
|
data-action="new">
|
2022-03-18 21:10:34 +08:00
|
|
|
<span class="fas fa-cog"></span> <%= t('repositories.index.columns') %>
|
2018-06-15 17:37:01 +08:00
|
|
|
</button>
|
2021-08-24 21:55:13 +08:00
|
|
|
<% unless @repository.is_a?(BmtRepository) %>
|
2023-04-20 19:40:38 +08:00
|
|
|
<%= render layout: "shared/view_switch", locals: {disabled: @repository.archived?, name: params[:archived] ? t('toolbar.archived_state') : t('toolbar.active_state') } do %>
|
|
|
|
<li class="view-switch-active">
|
|
|
|
<%= t('toolbar.active_state') %>
|
2021-08-24 21:55:13 +08:00
|
|
|
</li>
|
2023-04-20 19:40:38 +08:00
|
|
|
<li class="view-switch-archived">
|
|
|
|
<%= t('toolbar.archived_state') %>
|
2021-08-24 21:55:13 +08:00
|
|
|
</li>
|
|
|
|
<% end %>
|
2021-01-25 22:36:23 +08:00
|
|
|
<% end %>
|
2020-01-29 21:15:47 +08:00
|
|
|
</div>
|
2021-01-25 22:36:23 +08:00
|
|
|
<div class="toolbar-delimiter"></div>
|
2017-06-16 17:52:26 +08:00
|
|
|
</div>
|
2017-06-06 23:35:29 +08:00
|
|
|
</div>
|
2019-08-26 14:56:46 +08:00
|
|
|
|
2018-05-08 22:33:42 +08:00
|
|
|
<!-- These buttons are appended to table in javascript, after table initialization -->
|
2020-01-28 21:11:11 +08:00
|
|
|
<div class="toolbar-filter-buttons" style="display:none">
|
|
|
|
</div>
|
|
|
|
|
2022-09-29 20:43:06 +08:00
|
|
|
<%= render partial: 'label_printers/label_printer_modal' %>
|
2022-09-22 17:07:08 +08:00
|
|
|
|
2021-02-22 17:34:06 +08:00
|
|
|
<%= render partial: "repositories/repository_table",
|
2018-05-08 22:33:42 +08:00
|
|
|
locals: {
|
|
|
|
repository: @repository,
|
|
|
|
repository_index_link: repository_table_index_path(@repository)
|
|
|
|
}
|
|
|
|
%>
|
2017-06-06 23:35:29 +08:00
|
|
|
</div>
|
|
|
|
|
2021-02-22 17:34:06 +08:00
|
|
|
<%= render partial: 'repositories/import_repository_records_modal',
|
2018-03-20 21:45:57 +08:00
|
|
|
locals: { repository: @repository } %>
|
|
|
|
|
2021-07-29 18:24:46 +08:00
|
|
|
|
2021-02-22 17:34:06 +08:00
|
|
|
<%= render partial: "repositories/delete_record_modal" %>
|
|
|
|
<%= render partial: 'repositories/export_repository_modal',
|
2018-03-21 16:22:55 +08:00
|
|
|
locals: { repository: @repository } %>
|
2018-03-20 21:45:57 +08:00
|
|
|
|
2021-02-22 17:34:06 +08:00
|
|
|
<%= render partial: 'repository_columns/manage_column_modal', locals: { my_module_page: false } %>
|
2022-01-20 19:44:57 +08:00
|
|
|
<%= render partial: "repository_stock_values/manage_modal" %>
|
2022-03-18 21:10:34 +08:00
|
|
|
<%= render partial: "toolbar_buttons" %>
|
2020-01-14 18:13:19 +08:00
|
|
|
|
2021-08-24 21:55:13 +08:00
|
|
|
<% if @repository.is_a?(BmtRepository) %>
|
2022-01-21 20:14:04 +08:00
|
|
|
<%= render partial: 'save_bmt_filter_modal' %>
|
2023-03-30 19:27:10 +08:00
|
|
|
<%= javascript_include_tag 'vue_bmt_filter' %>
|
2021-11-26 03:34:22 +08:00
|
|
|
<% else %>
|
2022-01-03 17:48:03 +08:00
|
|
|
<%= render partial: 'repository_filters' %>
|
2022-01-21 20:14:04 +08:00
|
|
|
<%= render partial: 'save_repository_filter_modal' %>
|
2021-08-24 21:55:13 +08:00
|
|
|
<% end %>
|
2022-01-21 20:14:04 +08:00
|
|
|
|
2018-07-19 23:56:42 +08:00
|
|
|
<%= javascript_include_tag 'repositories/edit' %>
|
2018-03-20 21:45:57 +08:00
|
|
|
<%= javascript_include_tag 'repositories/repository_datatable' %>
|
2018-07-19 23:56:42 +08:00
|
|
|
<%= javascript_include_tag "repositories/show" %>
|
2023-03-30 19:27:10 +08:00
|
|
|
<%= javascript_include_tag 'inputmask' %>
|
|
|
|
<%= javascript_include_tag 'emoji_button' %>
|
|
|
|
<%= javascript_include_tag 'pdf_js' %>
|
|
|
|
<%= stylesheet_link_tag 'pdf_js_styles' %>
|
2019-12-16 22:21:50 +08:00
|
|
|
|
2021-08-18 19:43:26 +08:00
|
|
|
|
|
|
|
|
2019-12-16 22:21:50 +08:00
|
|
|
<script type="text/javascript" charset="utf-8">
|
2020-03-28 00:35:24 +08:00
|
|
|
var formatJS = "<%= datetime_picker_format_date_only %>"
|
2019-12-16 22:21:50 +08:00
|
|
|
</script>
|