scinote-web/app/views/repositories/toolbar/_bmt.html.erb
aignatov-bio fecaafecf9
Refactor repository toolbar [SCI-6545] (#3943)
Co-authored-by: Anton <anton@scinote.net>
2022-03-18 14:10:34 +01:00

39 lines
1.3 KiB
Text

<div class="dropdown" id="bmtFiltersDropdownButton">
<button id="bmtFiltersDropdown"
class="btn btn-secondary bmt-filters-button"
type="button"
data-toggle="dropdown"
aria-haspopup="true"
>
<span class="fas fa-microscope"></span>
<%= t('repositories.show.bmt_search.bmt_filter') %>
</button>
<div
class="dropdown-menu bmt-filters-container"
id="bmtFilterContainer"
data-datatable-id="#repository-table-<%= @repository.id %>"
data-saved-filters-url="<%= bmt_filters_url %>"
data-can-manage-filters="<%= can_manage_bmt_filters?(current_team) %>"
data-bmt-api-base-url="<%= bmt_request_url(path: 'api') %>"
>
<filter-container
@filters:update="updateFilters"
@filters:clear="clearFilters"
@cids:update="updateExternalIds"
@cids:error="handleSearchError"
:can-manage-filters="canManageFilters"
:bmt-api-base-url="bmtApiBaseUrl"
:saved-filters.sync="savedFilters"
:filters.sync="filters" />
</div>
</div>
<% if can_manage_bmt_filters?(current_team) %>
<button
class="btn btn-light open-save-bmt-modal hidden"
type="button"
aria-haspopup="true"
>
<span class="fas fa-save"></span>
<%= t('repositories.show.bmt_search.save_filters') %>
</button>
<% end %>