44 lines
3.1 KiB
XML
44 lines
3.1 KiB
XML
<templates>
|
|
<t t-name="restore_buttons.Breadcrumbs" t-inherit="web.Breadcrumbs" t-inherit-mode="extension" owl="1">
|
|
<xpath expr="//div[(hasclass('flex-md-column'))]" position="replace">
|
|
<div t-if="collapsedBreadcrumbs.length || visiblePathBreadcrumbs.length" class="o_breadcrumb d-flex flex-row align-items-center align-self-stretch justify-content-between min-w-0">
|
|
<t t-if="env.isSmall">
|
|
<t t-set="previousBreadcrumb" t-value="visiblePathBreadcrumbs.at(-1)"/>
|
|
<button class="o_back_button btn btn-link d-print-none px-1 py-0" t-on-click.prevent="previousBreadcrumb.onSelected">
|
|
<i class="oi oi-fw oi-arrow-left"/>
|
|
</button>
|
|
</t>
|
|
<t t-else="">
|
|
<ol class="breadcrumb flex-nowrap text-nowrap" style="font-size: 0.875rem; line-height: 1.5; padding-left: 4px; padding-right: 4px;">
|
|
<li t-if="collapsedBreadcrumbs.length" class="breadcrumb-item d-inline-flex min-w-0">
|
|
<Dropdown>
|
|
<button class="btn btn-light btn-sm px-1 p-0">
|
|
<i class="fa fa-ellipsis-h"/>
|
|
</button>
|
|
<t t-set-slot="content">
|
|
<t t-foreach="collapsedBreadcrumbs" t-as="breadcrumb" t-key="breadcrumb.jsId">
|
|
<DropdownItem onSelected="breadcrumb.onSelected"
|
|
attrs="{ href: breadcrumb.url, 'data-tooltip': 'Back to "' + breadcrumb.name + '"' + (breadcrumb.isFormView ? ' form' : '')}">
|
|
<t t-call="web.Breadcrumb.Name"/>
|
|
</DropdownItem>
|
|
</t>
|
|
</t>
|
|
</Dropdown>
|
|
</li>
|
|
<t t-foreach="visiblePathBreadcrumbs" t-as="breadcrumb" t-key="breadcrumb.jsId">
|
|
<li class="breadcrumb-item d-inline-flex min-w-0" t-att-class="{ o_back_button: breadcrumb_last }" t-att-data-hotkey="breadcrumb_last and 'b'" t-on-click.prevent="breadcrumb.onSelected">
|
|
<a t-att-href="breadcrumb.url" class="fw-bold text-truncate" t-att-data-tooltip="'Back to "' + breadcrumb.name + '"' + (breadcrumb.isFormView ? ' form' : '')"><t t-call="web.Breadcrumb.Name"/></a>
|
|
</li>
|
|
</t>
|
|
</ol>
|
|
</t>
|
|
<div class="d-flex gap-1 text-truncate" style="font-size: 0.875rem; line-height: 1.5;">
|
|
<div class="o_last_breadcrumb_item active d-flex gap-2 align-items-center min-w-0 lh-sm">
|
|
<span class="min-w-0 text-truncate" t-call="web.Breadcrumb.Name"/>
|
|
</div>
|
|
<t t-call="web.Breadcrumb.Actions"/>
|
|
</div>
|
|
</div>
|
|
</xpath>
|
|
</t>
|
|
</templates> |