Files
odoo_source/addons/website_project_issue/views/project_issue_templates.xml
T
Thibault Delavallée 3afb78371f [IMP] portal: use a less "big underlined headers everywhere" display
Main page of the customer portal now contains simply a list of document
models the user can access, under a 'Your Documents' section. It is
a bit easier to read and a bit less ugly than a list of underlined
headers.
2017-07-11 11:28:18 +02:00

156 lines
7.3 KiB
XML

<?xml version="1.0" encoding="utf-8"?>
<odoo>
<template id="portal_layout" name="Portal layout: Issues menu entry" inherit_id="website_portal.portal_layout" priority="45">
<xpath expr="//ol[contains(@class,'o_portal_submenu')]" position="inside">
<li t-if="page_name == 'issue' or issue">
<a t-if="issue" t-attf-href="/my/issues?{{ keep_query() }}">Issues</a>
<t t-else="">Issues</t>
</li>
<li t-if="issue">
Issue <span t-esc="issue.id"/>
</li>
</xpath>
</template>
<template id="portal_my_home" name="Portal My Home: Issue entries" inherit_id="website_portal.portal_my_home" priority="45">
<xpath expr="//ul[contains(@class,'o_portal_docs')]" position="inside">
<li t-if="issue_count" class="list-group-item">
<span class="badge" t-esc="issue_count"/>
<a href="/my/issues">Issues</a>
</li>
</xpath>
</template>
<template id="my_issues" name="My Issues">
<t t-call="website_portal.portal_layout">
<h3>Issues
<t t-call="website_portal.portal_searchbar"/>
</h3>
<t t-if="not issues">
<div class="alert alert-warning mt8" role="alert">
There are no issues.
</div>
</t>
<div t-if="issues" class="panel panel-default">
<div class="table-responsive"><table class="table table-hover o_my_status_table">
<thead>
<tr class="active">
<th>Issue</th>
<th class="col-md-8">Title</th>
<th>Stage</th>
</tr>
</thead>
<t t-foreach="issues" t-as="issue">
<tr>
<td>
<a t-attf-href="/my/issues/#{issue.id}?{{ keep_query() }}">Issue <t t-esc="issue.id" /></a>
</td>
<td><span t-field="issue.name"/></td>
<td>
<span class="label label-info" title="Current stage of the issue" t-esc="issue.stage_id.name" />
</td>
</tr>
</t>
</table></div>
</div>
<div t-if="pager" class="o_portal_pager text-center">
<t t-call="website.pager"/>
</div>
</t>
</template>
<template id="my_issues_issue" name="My Issue">
<t t-call="website_portal.portal_layout">
<div class="panel panel-default">
<div class="panel-heading">
<div class="row">
<div class="col-md-12">
<h4>
<t t-call='website_portal.record_pager'/>
Issue <span t-esc="issue.id"/> - <span t-field="issue.name"/>
<a class="btn btn-info" t-att-href="'/web#return_label=Website&amp;model=project.issue&amp;id=%s&amp;view_type=form' % (issue.id)" groups="project.group_project_user">Edit Issue</a>
<span t-field="issue.stage_id.name" class="pull-right label label-info" title="Current stage of this issue"/>
</h4>
</div>
</div>
</div>
<div class="panel-body">
<div class="mb8">
<strong>Date:</strong> <span t-field="issue.create_date" t-options='{"widget": "date"}'/>
</div>
<div class='row'>
<div class="col-md-6" t-if="issue.user_id">
<strong>Assigned to</strong>
<div>
<address t-field="issue.user_id" t-options='{"widget": "contact", "fields": ["name", "email", "phone"], "no_marker": True}'/>
</div>
</div>
<div class="col-md-6">
<strong>Reported by</strong>
<div t-if="issue.partner_id">
<address t-field="issue.partner_id" t-options='{"widget": "contact", "fields": ["name", "email"], "no_marker": True}'/>
</div>
</div>
<t t-if="issue.description">
<div class="col-md-12">
<strong>Description</strong>
<div t-field="issue.description"/>
</div>
</t>
</div>
</div>
<div t-if="issue.attachment_ids" class='panel-footer'>
<strong>
<t t-if='len(issue.attachment_ids)&gt;1'>Attachments</t>
<t t-else="">Attachment</t>
</strong>
<div class='row'>
<div class="col-md-2 col-sm-3 text-center oe_attachments" t-foreach='issue.attachment_ids' t-as='attachment'>
<a t-attf-href="/web/content/#{attachment.id}?download=true" target="_blank">
<div class='oe_attachment_embedded o_image o_image_small' t-att-title="attachment.name" t-att-data-mimetype="attachment.mimetype" t-attf-data-src="/web/image/#{attachment.id}/50x40"/>
<div class='oe_attachment_name'><t t-esc='attachment.name' /></div>
</a>
</div>
</div>
</div>
</div>
<div class="row mt32">
<div class="col-md-12">
<h4><strong>Message and communication history</strong></h4>
</div>
<div class="col-md-10 col-md-offset-1 mt16">
<t t-call="website_mail.message_thread">
<t t-set="object" t-value="issue"/>
</t>
</div>
</div>
</t>
</template>
<template id="my_projects" inherit_id="website_project.my_projects">
<xpath expr="//table/thead/tr/th[last()]" position="after">
<th>Issues</th>
</xpath>
<xpath expr="//table/tbody/tr/td[last()]" position="after">
<td>
<a t-if="project.use_issues" t-attf-href="/my/issues?filterby=#{project.id}">
<t t-esc="project.issue_count" />
<t t-esc="project.label_issues" />
</a>
</td>
</xpath>
</template>
<template id="my_project" inherit_id="website_project.my_project">
<xpath expr="//div[@class='panel-body']/div[@class='row']/div[@class='col-md-6'][last()]/div[@class='pull-right']" position="before">
<a t-attf-href="/my/issues?filterby=#{project.id}" class="btn btn-default btn-lg pull-right ml8">
<span class="fa fa-bug" />
<span t-esc="project.issue_count" />
<span t-field="project.label_issues" />
</a>
</xpath>
</template>
</odoo>