{* SPDX-FileCopyrightText: © 2021 Olivier Meunier SPDX-License-Identifier: AGPL-3.0-only *} {{ extends "./base" }} {{- import "/_libs/forms" -}} {{- import "./components/list_actions"}} {{- block title() -}} {{ .Item.Name }} - {{ gettext("Collections") }} {{- end -}} {{- block extraHead() }} {{ filterParams := `collection=` + .Item.ID }} {{- end -}} {{- block mainContent() -}} {{- if .Item.IsDeleted -}}

{{ gettext("Collection %s", .Item.Name) }}

{{- yield message(type="info") content -}} {{ gettext("Collection will be removed in a few seconds.") }}  {{- end -}}
{{- else -}}

{{ gettext("Collections") }} / {{ .Item.Name }}

{{- yield list_actions() content -}}
{{- if hasPermission("api:bookmarks", "export") -}} {{ sortParam := isset(.CurrentOrder) ? .CurrentOrder : "" }} {{- yield export_menu(params=`?collection=` + .Item.ID, sortParam=sortParam) -}} {{- end -}} {{- end -}}
{{ gettext("Edit") }}

{{ gettext("Filters") }} {{ yield icon(name="o-help") }} {{ gettext("Documentation") }}

{{ yield formErrors(form=.Form) }} {{ yield textField( field=.Form.Get("name"), label=gettext("Name"), ) }} {{ include("./components/filters") .Form }} {{- if isset(.CurrentOrder) -}} {{- end -}}
{{- include "./components/bookmark_list" -}} {{- end -}} {{- end -}}