portal_layout.xml 11.1 KB
Newer Older
1 2
<?xml version="1.0" encoding="utf-8"?>
<odoo>
3 4

    
5
    <template id="portal_layout_inherit" name="portal inherit" inherit_id="portal.portal_layout">
6 7 8 9
        <xpath expr="//div[@id='o_my_sidebar']" position="replace"></xpath>

        <xpath expr="//div[@t-attf-class='col-12 col-md col-lg-6']" position="after">
            <div class="col-sm-12 col-md-12 col-lg-1"/>
10
        </xpath>
11 12 13 14
        <xpath expr="//div[@t-attf-class='col-12 col-md col-lg-6']" position="before">
            <div class="col-sm-12 col-md-12 col-lg-1"/>
        </xpath>

15
        <xpath expr="//div[@t-attf-class='col-12 col-md col-lg-6']" position="attributes">
16
            <attribute name="t-attf-class">col-lg-10 col-md-12 col-sm-12</attribute>
17
        </xpath>
18 19 20
        <xpath expr="//div[@class='row align-items-center bg-white no-gutters border rounded']" position="attributes">
            <attribute name="class">row align-items-center bg-white no-gutters border navbar-rounded</attribute>
        </xpath>
21 22 23 24 25 26 27 28 29 30
    </template>


    <template id="frontend_layout_inherit" name="Main Frontend Layout Inherit" inherit_id="portal.frontend_layout">
        <xpath expr="//main" position="attributes">
            <attribute name="class">o_background_helpdesk</attribute>
        </xpath>
    </template>


31 32 33 34
    <template id="portal_edit" name="portal_home_helpdesk" inherit_id="portal.portal_my_home">
        <xpath expr="//h3" position="replace">
            <h2>BIENVENIDO</h2>
        </xpath>
35

36 37
        <xpath expr="//div[@class='o_portal_docs list-group']" position="attributes">
            <attribute name="class">o_portal_docs row</attribute>
38
            <attribute name="id">portal_cards</attribute>
39
        </xpath>
40

41 42 43
    </template>

    <template id="remove_invoices" name="remove invoices" inherit_id="account.portal_my_home_invoice">
44 45 46

        <xpath expr="//t[@t-call='portal.portal_docs_entry']" position="replace"></xpath>

47 48 49
    </template>
    
    <template id="remove_sale_orders" name="remove sale orders" inherit_id="sale.portal_my_home_sale">
50 51 52

        <xpath expr="//t[@t-call='portal.portal_docs_entry']" position="replace"></xpath>
        <xpath expr="//t[@t-call='portal.portal_docs_entry']" position="replace"></xpath>
53 54 55
    </template>

    <template id="remove_purchase_orders" name="remove purchase orders" inherit_id="purchase.portal_my_home_purchase">
56 57
        <xpath expr="//t[@t-call='portal.portal_docs_entry']" position="replace"></xpath>
        <xpath expr="//t[@t-call='portal.portal_docs_entry']" position="replace"></xpath>
58 59 60
    </template>

    <template id="remove_proyects" name="remove proyects" inherit_id="project.portal_my_home">
61 62
        <xpath expr="//t[@t-call='portal.portal_docs_entry']" position="replace"></xpath>
        <xpath expr="//t[@t-call='portal.portal_docs_entry']" position="replace"></xpath>
63 64 65
    </template>

    <template id="template_id" name="template_name" inherit_id="sh_all_in_one_helpdesk.portal_my_home_ticket">
66
        <xpath expr="//t[@t-call='portal.portal_docs_entry']" position="replace"></xpath>
67 68 69
    </template>

    <template id="remove_timesheet" name="remove timesheet" inherit_id="hr_timesheet.portal_my_home_timesheet">
70
        <xpath expr="//t[@t-call='portal.portal_docs_entry']" position="replace"></xpath>
71 72
    </template>

73 74 75
    <template id="change_portal_layout" name="portal update docs" inherit_id="portal.portal_docs_entry">
        <xpath expr="//a" position="replace">
            <div class="col-sm-12 col-md-6 col-lg-4 mb-5">
76 77 78
                <div class="card">
                    <div t-if="url" class="card-body card-body-custom" style="background-color:white !important;">
                        <header class="card__primary-title">
79 80 81 82 83 84 85 86 87 88 89 90 91 92
                        <div class="row">
                            <div class="col-sm-6 col-md-6 col-lg-3">
                                <t t-if="avatar">
                                    <figure class="image image--avatar">
                                        
                                        <img t-att-src="avatar"/>
                                    </figure>
                                </t>
                            </div>
                            <div class="col-sm-6 col-md-6 col-lg-9">
                                <div class="item item--two-lines"> 
                                    <h5 t-att-title="title"><t t-esc="title"/></h5>
                                </div>
                            </div>
93 94 95 96 97 98 99 100 101 102 103 104
                        </div>
                        </header>
                        <t t-if="background">
                            <figure class="image">
                                <img t-att-src="background"/>
                                
                            </figure>
                        </t>
                        <t t-if="desc">
                            <span class="card__supporting-text"><t t-esc="desc"/></span>
                        </t>
                        <footer class="card__actions">
105
                            <a class="btn btn-primary" t-att-href="url">Acceder</a>
106
                        </footer>
107
                    </div>
108 109 110 111 112
                </div>
            </div>
        </xpath>
    </template>

113 114 115 116 117 118 119 120 121 122 123

    <template id="portal_searchbar_2" name="portal_improvee_searchbar" inherit_id="portal.portal_searchbar">
        <xpath expr="//nav" position="replace">
            <nav t-attf-class="navbar navbar-rounded border navbar-expand-lg navbar-light {{classes if classes else ''}} {{'mt-3 rounded' if breadcrumbs_searchbar else 'border-top-0' }}">
                <button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarSupportedContent" aria-controls="navbarSupportedContent" aria-expanded="false" aria-label="Toggle navigation">
                    <span class="navbar-toggler-icon"></span>
                </button>

                <div class="collapse navbar-collapse" id="navbarSupportedContent">
                    <ul class="navbar-nav mr-auto">
                    
124
                        <li class="nav-item nav-mr active">
125 126 127 128
                            <t t-if="breadcrumbs_searchbar" t-call="portal.portal_breadcrumbs"/>
                            <span t-else="" class="navbar-brand mb-0 h1 mr-auto" t-esc="title or 'No title'"/>
                        </li>

129
                        <li class="nav-item nav-mr dropdown">
130 131 132 133 134 135 136 137 138 139 140 141 142
                            <a class="nav-link dropdown-toggle" href="#" id="sort_by" role="button" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
                            Ordenar por:
                            </a>
                            <div class="dropdown-menu" aria-labelledby="sort_by">
                                <t t-foreach="searchbar_sortings" t-as="option">
                                    <a t-att-href="request.httprequest.path + '?' + keep_query('*', sortby=option)"
                                        t-attf-class="dropdown-item#{sortby == option and ' active' or ''}">
                                        <span t-esc="searchbar_sortings[option].get('label')"/>
                                    </a>
                                </t>
                            </div>                            
                        </li>

143
                        <li class="nav-item nav-mr dropdown">
144 145 146 147 148 149 150 151 152 153 154 155 156
                            <a class="nav-link dropdown-toggle" href="#" id="filter_by" role="button" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
                            Filtrar por:
                            </a>
                            <div class="dropdown-menu" aria-labelledby="filter_by">
                                <t t-foreach="searchbar_filters" t-as="option">
                                    <a t-att-href="default_url + '?' + keep_query('*', filterby=option)"
                                       t-attf-class="dropdown-item#{filterby == option and ' active' or ''}">
                                        <span t-esc="searchbar_filters[option].get('label')"/>
                                    </a>
                                </t>
                            </div>                            
                        </li>

157
                        <li class="nav-item nav-mr dropdown">
158 159 160 161 162 163 164 165 166 167 168 169 170 171
                            <a class="nav-link dropdown-toggle" href="#" id="group_by" role="button" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
                            Agrupar por:
                            </a>
                            <div class="dropdown-menu" aria-labelledby="group_by">
                               <t t-foreach="searchbar_groupby" t-as="option">
                                    <a t-att-href="default_url + '?' + keep_query('*', groupby=option)"
                                       t-attf-class="dropdown-item#{groupby == option and ' active' or ''}">
                                        <span t-esc="searchbar_groupby[option].get('label')"/>
                                    </a>
                                </t>
                            </div>                            
                        </li>
                        <li class="nav-item">
                            <a id="new_request"  
172
                            class="btn btn-primary btn-sm nav-button" 
173 174 175 176
                            name="new_request" 
                            title="Create Support Request" 
                            aria-label="Create Support Request" 
                            role="button">
177 178
                                <i class="fa fa-plus "/>
                                 Crear Ticket
179 180 181 182 183 184 185 186
                            </a> 
                        </li>

                    </ul>
                    <form t-if="searchbar_inputs" class="form-inline o_portal_search_panel ml-lg-4 col-xl-4 col-md-5">
                        <div class="input-group input-group-sm w-100">
                            
                            <span class="input-group-append">
187
                                <button class="btn btn-primary o_wait_lazy_js rounded-left" type="submit">
188 189 190 191 192
                                    <span class="fa fa-search"/>
                                </button>
                            </span>
                            <input type="text" class="form-control form-control-sm" placeholder="Search" t-att-value='search' name="search"/>
                            <div class="input-group-prepend">
193
                                <button type="button" class="btn btn-primary dropdown-toggle rounded-right" data-toggle="dropdown"/>
194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209
                                <div class="dropdown-menu" role="menu">
                                    <t t-foreach='searchbar_inputs' t-as='input'>
                                        <a t-att-href="'#' + input_value['input']"
                                            t-attf-class="dropdown-item#{search_in == input_value['input'] and ' active' or ''}">
                                            <span t-out="input_value['label']"/>
                                        </a>
                                    </t>
                                </div>
                            </div>
                        </div>
                    </form>
                </div>
            </nav>
        </xpath>
    </template>

210
</odoo>