2022-03-18 21:10:34 +08:00
|
|
|
<template id="repositoryToolbar">
|
2022-07-19 20:22:40 +08:00
|
|
|
<div class="repository-edit-overlay repository-edit-overlay--toolbar">
|
|
|
|
<%= t('repositories.toolbar_edit_overlay_html') %>
|
|
|
|
</div>
|
2022-03-18 21:10:34 +08:00
|
|
|
<!-- LEFT TOOLBAR BLOCK -->
|
|
|
|
<div class="toolbar-left-block">
|
|
|
|
<% if @repository.active? %>
|
|
|
|
<% if @repository.repository_snapshots.provisioning.any? %>
|
|
|
|
<div class='repository-provisioning-notice auto-shrink-button'>
|
2023-06-15 21:12:51 +08:00
|
|
|
<i class="sn-icon sn-icon-info"></i>
|
2022-03-18 21:10:34 +08:00
|
|
|
<span class="button-text"><%= t('repositories.index.snapshot_provisioning_in_progress') %></span>
|
|
|
|
</div>
|
2020-05-15 23:46:59 +08:00
|
|
|
<% end %>
|
|
|
|
<% if can_create_repository_rows?(@repository) %>
|
2022-08-04 17:05:55 +08:00
|
|
|
<button type="button" data-toggle="tooltip" data-placement="bottom" title="<%= t('repositories.show.button_tooltip.new') %>"
|
2022-03-18 21:10:34 +08:00
|
|
|
class="btn btn-primary editAdd auto-shrink-button"
|
|
|
|
id="addRepositoryRecord" data-view-mode="active">
|
2023-06-08 14:33:37 +08:00
|
|
|
<span class="sn-icon sn-icon-new-task"></span>
|
2022-03-18 21:10:34 +08:00
|
|
|
<span class="button-text"><%= t("repositories.add_new_record") %></span>
|
2020-05-15 23:46:59 +08:00
|
|
|
</button>
|
2022-08-04 17:05:55 +08:00
|
|
|
<button type="button" data-toggle="tooltip" data-placement="bottom" title="<%= t('repositories.show.button_tooltip.import') %>"
|
2022-03-18 21:10:34 +08:00
|
|
|
class="btn btn-light editImport auto-shrink-button"
|
|
|
|
id="importRecordsButton" data-view-mode="active">
|
2023-06-08 14:33:37 +08:00
|
|
|
<span class="sn-icon sn-icon-import"></span>
|
2022-03-18 21:10:34 +08:00
|
|
|
<span class="button-text"><%= t('repositories.index.options_dropdown.import_items') %></span>
|
2020-06-10 04:16:55 +08:00
|
|
|
</button>
|
|
|
|
<% end %>
|
2023-05-17 17:27:55 +08:00
|
|
|
|
2023-06-20 21:53:33 +08:00
|
|
|
<span id="saveCancel" class="flex items-center gap-2" data-toggle="buttons" style="display:none">
|
2023-06-16 18:38:09 +08:00
|
|
|
<button type="button" class="btn btn-primary prevent-shrink" id="saveRecord" data-view-mode="active">
|
2023-05-17 17:27:55 +08:00
|
|
|
<span class="fas fa-save"></span>
|
|
|
|
<%= t("repositories.save_record") %>
|
2022-03-30 16:54:55 +08:00
|
|
|
</button>
|
2023-05-17 17:27:55 +08:00
|
|
|
<button type="button" class="btn btn-light prevent-shrink" id="cancelSave" data-view-mode="active">
|
2023-06-08 23:33:50 +08:00
|
|
|
<span class="sn-icon sn-icon-close"></span>
|
2023-05-17 17:27:55 +08:00
|
|
|
<%= t("repositories.cancel_save") %>
|
|
|
|
</button>
|
|
|
|
</span>
|
2020-06-17 20:05:23 +08:00
|
|
|
<% end %>
|
2023-06-19 18:46:05 +08:00
|
|
|
<% if @repository.repository_rows.with_active_reminders(current_user).any? %>
|
|
|
|
<button type="button" data-toggle="tooltip" data-placement="bottom" title="<%= t("repositories.hide_reminders") %>"
|
|
|
|
class="btn btn-light auto-shrink-button"
|
|
|
|
id="hideRepositoryReminders"
|
|
|
|
data-view-mode="active"
|
|
|
|
data-hide-reminders-url="<%= team_repository_hide_reminders_url(@current_team, @repository) %>">
|
|
|
|
<span class="fas fa-bell-slash"></span>
|
|
|
|
<span class="button-text"><%= t("repositories.hide_reminders") %></span>
|
|
|
|
</button>
|
|
|
|
<% end %>
|
|
|
|
<% if can_manage_repository_filters?(@repository) %>
|
|
|
|
<div class="toolbar-save-filters">
|
|
|
|
<%= render partial: 'repositories/toolbar/save_filters' %>
|
|
|
|
</div>
|
|
|
|
<% end %>
|
2023-05-04 03:25:13 +08:00
|
|
|
</div>
|
|
|
|
|
|
|
|
<div class="toolbar-middle-block">
|
2023-05-09 20:53:50 +08:00
|
|
|
<%= render partial: 'shared/state_view_switch', locals: {
|
|
|
|
disabled: @repository.archived?,
|
|
|
|
switchable: true,
|
2023-05-29 16:21:34 +08:00
|
|
|
archived: params[:archived] || @repository.archived?,
|
2023-05-09 20:53:50 +08:00
|
|
|
active_url: repository_path(@repository),
|
|
|
|
archived_url: repository_path(@repository, archived: true),
|
|
|
|
} %>
|
2022-03-18 21:10:34 +08:00
|
|
|
</div>
|
2022-02-21 17:09:59 +08:00
|
|
|
|
2022-03-18 21:10:34 +08:00
|
|
|
<!-- RIGHT TOOLBAR BLOCK -->
|
|
|
|
<div class="toolbar-right-block">
|
2023-05-04 03:25:13 +08:00
|
|
|
<div class="toolbar-search"></div>
|
2022-11-03 22:48:32 +08:00
|
|
|
<% if RepositoryBase.stock_management_enabled? %>
|
|
|
|
<div class="active-reminders-filter"
|
|
|
|
title="<%= t('repositories.index.active_reminders.description') %>"
|
|
|
|
data-checked-title="<%= t('repositories.index.active_reminders.checked_description') =%>"
|
|
|
|
data-unchecked-title="<%= t('repositories.index.active_reminders.description') =%>"
|
|
|
|
>
|
|
|
|
<div class="sci-checkbox-container">
|
|
|
|
<input id="only_reminders" type="checkbox" class="sci-checkbox" value="1">
|
|
|
|
<span class="sci-checkbox-label"></span>
|
|
|
|
</div>
|
|
|
|
<span data-click-target="#only_reminders">
|
|
|
|
<span class="active-reminders-label"><%= t('repositories.index.active_reminders.label') %></span>
|
|
|
|
<span class="active-reminders-short-label"><%= t('repositories.index.active_reminders.short_label') %></span>
|
|
|
|
</span>
|
2022-08-09 16:23:40 +08:00
|
|
|
</div>
|
2022-11-03 22:48:32 +08:00
|
|
|
<% end %>
|
2022-03-18 21:10:34 +08:00
|
|
|
<div class="toolbar-filters"></div>
|
2023-05-25 15:18:47 +08:00
|
|
|
<div class="repo-datatables-buttons">
|
2023-06-28 02:31:25 +08:00
|
|
|
<button class="btn btn-light btn-black icon-btn manage-repo-column-index" title="<%= t("libraries.manange_modal_column.button_tooltip") %>"
|
2023-05-25 15:18:47 +08:00
|
|
|
data-modal-url="<%= repository_repository_columns_path(@repository) %>"
|
|
|
|
data-action="new">
|
2023-06-08 14:33:37 +08:00
|
|
|
<span class="sn-icon sn-icon sn-icon-reports">
|
2023-05-25 15:18:47 +08:00
|
|
|
</button>
|
|
|
|
</div>
|
2022-03-18 21:10:34 +08:00
|
|
|
</div>
|
2022-03-30 16:54:55 +08:00
|
|
|
</template>
|