106 lines
No EOL
5.1 KiB
XML
106 lines
No EOL
5.1 KiB
XML
<?xml version="1.0" encoding="UTF-8" ?>
|
|
<odoo>
|
|
<data>
|
|
<template id="portal_my_home" inherit_id="portal.portal_my_home">
|
|
<xpath expr="//div[hasclass('o_portal_docs')]" position="inside">
|
|
<t t-call="portal.portal_docs_entry">
|
|
<t t-set="title">Documents</t>
|
|
<t t-set="url">/my/documents</t>
|
|
<t t-set="placeholder_count">documents_count</t>
|
|
</t>
|
|
</xpath>
|
|
</template>
|
|
<template id="portal_my_documents" name="My Documents">
|
|
<t t-call="portal.portal_layout">
|
|
<t t-call="portal.portal_table">
|
|
<thead>
|
|
<tr class="active">
|
|
<th>Name</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
<t t-foreach="documents" t-as="document">
|
|
<tr>
|
|
<td>
|
|
<a t-att-href="document.get_portal_url()">
|
|
<t t-esc="document.name"/>
|
|
</a>
|
|
</td>
|
|
</tr>
|
|
</t>
|
|
</tbody>
|
|
</t>
|
|
</t>
|
|
</template>
|
|
<template id="document_portal_template" name="Document Portal Template"
|
|
inherit_id="portal.portal_sidebar" primary="True">
|
|
<xpath expr="//div[hasclass('o_portal_sidebar')]" position="inside">
|
|
<t t-set="o_portal_fullwidth_alert"
|
|
groups="documents.group_documents_user">
|
|
<t t-call="portal.portal_back_in_edit_mode">
|
|
<t t-set="backend_url"
|
|
t-value="'/web#model=%s&id=%s&action=%s&view_type=form' % (document._name, document.id, action.id)"/>
|
|
</t>
|
|
</t>
|
|
<div class="row mt16">
|
|
<!-- Sidebar -->
|
|
<t t-call="portal.portal_record_sidebar">
|
|
<t t-set="classes">col-lg-auto d-print-none</t>
|
|
<t t-set="title">
|
|
<h2 class="mb-0">
|
|
<b>Document Info</b>
|
|
</h2>
|
|
</t>
|
|
<t t-set="entries">
|
|
<ul class="list-group list-group-flush flex-wrap flex-row flex-lg-column">
|
|
<li class="list-group-item flex-grow-1 b-0">
|
|
File name: <t t-esc="document.name"/>
|
|
|
|
</li>
|
|
<li class="list-group-item flex-grow-1 b-0">
|
|
<strong class="text-muted">File Type:
|
|
<t t-esc="document.mimetype"/>
|
|
</strong>
|
|
</li>
|
|
<li class="list-group-item flex-grow-1 b-0">
|
|
<strong class="text-muted">File Size:
|
|
<t t-call="documents.format_file_size"/>
|
|
</strong>
|
|
</li>
|
|
<li class="list-group-item flex-grow-1 b-0">
|
|
<a class="btn btn-secondary btn-block o_download_btn"
|
|
t-att-href="document.get_portal_url(download=True)">
|
|
Download</a>
|
|
</li>
|
|
</ul>
|
|
</t>
|
|
</t>
|
|
<!-- Main Document Contents -->
|
|
<div id="document_content" class="col-12 col-lg justify-content-end">
|
|
<div class="card">
|
|
<!-- Chatter -->
|
|
<div id="document_communication" class="card-body">
|
|
<h2>History</h2>
|
|
<t t-call="portal.message_thread">
|
|
<t t-set="object" t-value="document"/>
|
|
</t>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</xpath>
|
|
</template>
|
|
<template id="portal_breadcrumbs" inherit_id="portal.portal_breadcrumbs">
|
|
<xpath expr="//ol[hasclass('o_portal_submenu')]" position="inside">
|
|
<li t-if="page_name == 'my_documents'"
|
|
t-attf-class="breadcrumb-item #{'active ' if not document else ''}">
|
|
<a t-if="document"
|
|
t-attf-href="/my/documents?{{ keep_query() }}">Documents</a>
|
|
<t t-else="">Documents</t>
|
|
</li>
|
|
<li t-if="document" class="breadcrumb-item active" t-esc="document.name">
|
|
</li>
|
|
</xpath>
|
|
</template>
|
|
</data>
|
|
</odoo> |