portal_my.xml 3.66 KB
Newer Older
1 2 3 4
<?xml version="1.0" encoding="utf-8"?>
<odoo>
    <template id="portal_home_maintenance" name="Portal My Home : IT" inherit_id="portal.portal_my_home" priority="101">        
        <xpath expr="//div[hasclass('o_portal_docs')]" position="inside">
5 6 7 8 9 10
            <t t-if="request.env.user.is_maintenance">
                <t t-call="portal.portal_docs_entry">
                <t t-set="title">Mantenimiento</t>
                    <t t-set="url" t-value="'/my/mantenimiento'" />
                    <t t-set="background" t-value="'/helpdesk_maintenance/static/src/img/mantenimiento.svg'"/>
                </t>
11 12 13 14 15 16
            </t>
        </xpath>
    </template>

    <template id="portal_my_home_menu_ticket" name="Portal layout : ticket menu entries" inherit_id="portal.portal_breadcrumbs" priority="60">
        <xpath expr="//ol[hasclass('o_portal_submenu')]" position="inside">
17

18
            <li t-if="page_name == 'maintenance' or maintenance" t-attf-class="breadcrumb-item #{'active ' if not soporte else ''}">
19
                <a t-if="maintenance" t-attf-href="/my/mantenimientos?{{ keep_query() }}">Mantenimiento</a>
20 21 22
                <t t-else="">Mantenimiento</t>
            </li>
            <li t-if="maintenance" class="breadcrumb-item active">
23
                <t t-esc="maintenance.name" t-if="maintenance" />
24 25
                <t t-else=""><em>Mantenimiento</em></t>
            </li>
26

27
            <li t-if="page_name == 'm_emergency' or m_emergency" t-attf-class="breadcrumb-item #{'active ' if not soporte else ''}">
28
                <a t-if="m_emergency" t-attf-href="/my/mantenimientos?{{ keep_query() }}">Emergencia</a>
29 30 31
                <t t-else="">Emergencia</t>
            </li>
            <li t-if="m_emergency" class="breadcrumb-item active">
32
                <t t-esc="m_emergency.name" t-if="m_emergency.name" />
33 34
                <t t-else=""><em>Mantenimiento</em></t>
            </li>
35

36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55
        </xpath>
    </template>

    <template id="portal_my_maintenance" name="Mantenimiento">
        <t t-call="portal.portal_layout">
            <t t-set="my_details" t-value="True"/>
            <div class="o_portal_my_home">
                <div class="oe_structure" id="oe_structure_portal_my_ti_1"/>
                <h3>Solicitud de Mantenimiento</h3>
                <div id="portal_cards" class="o_portal_docs row">
                    <t t-call="portal.portal_docs_entry">
                        <t t-set="title">Mantenimiento</t>
                        <t t-set="url" t-value="'/my/mantenimientos'" />
                        <t t-set="count" t-value="maintenance_count" />
                        <t t-set="desc" t-value="'Levanta tu nuevo ticket de mantenimiento'"/>
                        <t t-set="avatar" t-value="'/helpdesk_maintenance/static/src/img/matenimiento_icon.svg'"/>
                        <t t-set="background" t-value="'/helpdesk_maintenance/static/src/img/mantenimineto_back.svg'"/>
                    </t>
                    <t t-call="portal.portal_docs_entry">
                        <t t-set="title">Emergencias</t>
56 57 58 59 60
                        <t t-set="url" t-value="'/my/mantenimientos/emergencias'" />
                        <t t-set="count" t-value="maintenance_count" />
                        <t t-set="desc" t-value="'Seguridad física o Patrimonial Comprometida'"/>
                        <t t-set="avatar" t-value="'/helpdesk_maintenance/static/src/img/emergency_icon.svg'"/>
                        <t t-set="background" t-value="'/helpdesk_maintenance/static/src/img/emergency_back.svg'"/>
61 62 63 64 65 66 67 68 69
                    </t>
                    

                </div>
            </div>
            <div class="oe_structure" id="oe_structure_portal_my_ti_2"/>
        </t>
    </template>
</odoo>