<odoo>
    <template id="portal_my_home_menu_support_tickets" name="Portal layout : my support tickets menu entries" inherit_id="portal.portal_breadcrumbs" priority="20">
        <xpath expr="//ol[hasclass('o_portal_submenu')]" position="inside">
            <li t-if="page_name == 'my_support_tickets'" t-attf-class="breadcrumb-item #{'active ' if not support_ticket else ''}">
                <a t-if="support_ticket" t-attf-href="/support/ticket/view?{{ keep_query() }}">Support Tickets</a>
            </li>
            <li t-if="support_ticket" class="breadcrumb-item active">
                <t t-esc="support_ticket.subject"/>
            </li>
        </xpath>
    </template>

    <template id="portal_my_home_tickets" name="Show My Tickets" inherit_id="portal.portal_my_home" customize_show="True" priority="27">
        <xpath expr="//div[hasclass('o_portal_docs')]" position="inside">
            <t t-call="portal.portal_docs_entry">
                <t t-set="title">My Tickets</t>
                <t t-set="url" t-value="'/support/ticket/view'"/>
                <t t-set="placeholder_count" t-value="'my_tickets_count'"/>
            </t>
        </xpath>
    </template>

    <template id="support_ticket_view_list" name="My Support Tickets">
        <t t-call="portal.portal_layout">
			<t t-set="breadcrumbs_searchbar" t-value="True"/>

			<t t-call="portal.portal_searchbar">
				<t t-set="title">Tickets</t>
			</t>
			<t t-if="not support_tickets">
				<p>There are currently no tickets.</p>
			</t>
			<t t-if="support_tickets" t-call="portal.portal_table">
				<thead>
					<tr class="active">
						<th>By #</th>
						<th>Subject</th>
						<th>Category</th>
						<th>State</th>
						<th>Create Date</th>
						<th>Close Date</th>
					</tr>
				</thead>
				<tbody>
					<t t-foreach="support_tickets" t-as="support_ticket">
						<tr>
							<td>
							  <t t-esc="support_ticket.partner_id.name"/>
							</td>
							<td><a t-attf-href="/support/ticket/view/#{support_ticket.id}/#{support_ticket.portal_access_key}"><t t-esc="support_ticket.subject"/></a></td>
							<td><t t-esc="support_ticket.category_id.name"/></td>
							<td><span t-field="support_ticket.state"/></td>
							<td><span t-field="support_ticket.with_context(tz=request.env.user.tz).create_date"/></td>
							<td><span t-field="support_ticket.with_context(tz=request.env.user.tz).close_time"/></td>
						</tr>
					</t>
				</tbody>
			</t>

			<div class="modal-footer border-0 justify-content-between">
					<a t-attf-href="/support/ticket/submit" class="btn btn-primary" style="color:#FFFFFF;">New Ticket</a>
			</div>

			<br/><br/>

        </t>
    </template>
	
</odoo>