| 1 |
<?xml version="1.0" encoding="utf-8"?> |
| 2 |
<odoo> |
| 3 |
<template id="portal_layout" name="Portal layout: project menu entry" inherit_id="portal.portal_breadcrumbs" priority="40"> |
| 4 |
<xpath expr="//ol[hasclass('o_portal_submenu')]" position="inside"> |
| 5 |
<li t-if="page_name == 'project' or project" class="col-lg-2" t-attf-class="breadcrumb-item #{'active ' if not project else ''}"> |
| 6 |
<a t-if="project" t-attf-href="/my/projects">Projects</a> |
| 7 |
<t t-else="">Projects</t> |
| 8 |
</li> |
| 9 |
<li t-if="page_name in ['project_task', 'project_subtasks', 'project_recurrent_tasks'] and project" class="breadcrumb-item active"> |
| 10 |
<a t-if="project" t-attf-href="/my/projects/{{ project.id }}?{{ keep_query() }}"><t t-esc="project.name"/></a> |
| 11 |
</li> |
| 12 |
<li t-elif="project" t-attf-class="breadcrumb-item #{'active ' if not project else ''} text-truncate col-8 col-lg-10"> |
| 13 |
<t t-esc="project.name"/> |
| 14 |
</li> |
| 15 |
<li t-if="page_name == 'task' or (task and not project)" t-attf-class="breadcrumb-item #{'active ' if not task else ''}"> |
| 16 |
<a t-if="task" t-attf-href="/my/tasks?{{ keep_query() }}">Tasks</a> |
| 17 |
<t t-else="">Tasks</t> |
| 18 |
</li> |
| 19 |
<li t-if="page_name == 'project_subtasks' and task and project" class="breadcrumb-item active"> |
| 20 |
<a t-attf-href="/my/projects/{{ project.id }}/task/{{ task.id }}"><t t-esc="task.name"/></a> |
| 21 |
</li> |
| 22 |
<li t-elif="page_name == 'project_recurrent_tasks' and task and project" class="breadcrumb-item active text-truncate"> |
| 23 |
<a t-attf-href="/my/projects/{{ project.id }}/task/{{ task.id }}?{{ keep_query() }}"><t t-esc="task.name"/></a> |
| 24 |
</li> |
| 25 |
<li t-elif="task" class="breadcrumb-item active text-break"> |
| 26 |
<span t-field="task.name"/> |
| 27 |
</li> |
| 28 |
<li t-if="page_name == 'project_subtasks' or (task and subtask and project)" t-attf-class="breadcrumb-item text-truncate #{'active ' if not subtask else ''}"> |
| 29 |
<a t-if="subtask" t-attf-href="/my/tasks/{{ task.id }}/subtasks?{{ keep_query() }}">Sub-tasks</a> |
| 30 |
<t t-else="">Sub-tasks</t> |
| 31 |
</li> |
| 32 |
<li t-elif="page_name == 'project_recurrent_tasks' and task and project" t-attf-class="breadcrumb-item text-truncate"> |
| 33 |
Recurrent tasks |
| 34 |
</li> |
| 35 |
<li t-if="subtask" class="breadcrumb-item active text-break"> |
| 36 |
<span t-field="subtask.name"/> |
| 37 |
</li> |
| 38 |
</xpath> |
| 39 |
</template> |
| 40 |
|
| 41 |
<template id="portal_my_home" name="Projects / Tasks" customize_show="True" inherit_id="portal.portal_my_home" priority="40"> |
| 42 |
<xpath expr="//div[hasclass('o_portal_docs')]" position="before"> |
| 43 |
<t t-set="portal_service_category_enable" t-value="True"/> |
| 44 |
</xpath> |
| 45 |
<div id="portal_service_category" position="inside"> |
| 46 |
<t t-call="portal.portal_docs_entry"> |
| 47 |
<t t-set="icon" t-value="'/web/static/img/folder.svg'"/> |
| 48 |
<t t-set="title">Projects</t> |
| 49 |
<t t-set="url" t-value="'/my/projects'"/> |
| 50 |
<t t-set="text">Follow the evolution of your projects</t> |
| 51 |
<t t-set="placeholder_count" t-value="'project_count'"/> |
| 52 |
</t> |
| 53 |
<t t-call="portal.portal_docs_entry"> |
| 54 |
<t t-set="icon" t-value="'/project/static/src/img/tasks.svg'"/> |
| 55 |
<t t-set="title">Tasks</t> |
| 56 |
<t t-set="url" t-value="'/my/tasks'"/> |
| 57 |
<t t-set="text">Follow and comment on tasks in your projects</t> |
| 58 |
<t t-set="placeholder_count" t-value="'task_count'"/> |
| 59 |
</t> |
| 60 |
</div> |
| 61 |
</template> |
| 62 |
|
| 63 |
<template id="portal_my_projects" name="My Projects"> |
| 64 |
<t t-call="portal.portal_layout"> |
| 65 |
<t t-set="breadcrumbs_searchbar" t-value="True"/> |
| 66 |
|
| 67 |
<t t-call="portal.portal_searchbar"> |
| 68 |
<t t-set="title">Projects</t> |
| 69 |
</t> |
| 70 |
<t t-if="not projects"> |
| 71 |
<div class="alert alert-warning" role="alert"> |
| 72 |
There are no projects. |
| 73 |
</div> |
| 74 |
</t> |
| 75 |
<t t-if="projects" t-call="portal.portal_table"> |
| 76 |
<tbody> |
| 77 |
<tr t-foreach="projects" t-as="project"> |
| 78 |
<td> |
| 79 |
<a t-attf-href="/my/projects/#{project.id}"><span t-field="project.name"/></a> |
| 80 |
</td> |
| 81 |
<td class="text-end"> |
| 82 |
<t t-out="project.task_count" /> |
| 83 |
<t t-out="project.label_tasks" /> |
| 84 |
</td> |
| 85 |
</tr> |
| 86 |
</tbody> |
| 87 |
</t> |
| 88 |
</t> |
| 89 |
</template> |
| 90 |
|
| 91 |
<template id="portal_my_project" name="My Project"> |
| 92 |
<t t-call="portal.portal_layout"> |
| 93 |
<t t-set="title" t-value="project.name"/> |
| 94 |
<t t-set="o_portal_fullwidth_alert" groups="project.group_project_user"> |
| 95 |
<t t-call="portal.portal_back_in_edit_mode"> |
| 96 |
<t t-set="backend_url" t-value="'/odoo/project.project/%s' % (project.id)"/> |
| 97 |
</t> |
| 98 |
</t> |
| 99 |
|
| 100 |
<t t-call="portal.portal_searchbar"> |
| 101 |
<t t-set="title">Tasks</t> |
| 102 |
</t> |
| 103 |
<t t-if="not grouped_tasks"> |
| 104 |
<div class="alert alert-warning" role="alert"> |
| 105 |
There are no tasks. |
| 106 |
</div> |
| 107 |
</t> |
| 108 |
|
| 109 |
<t t-call="project.portal_tasks_list"/> |
| 110 |
</t> |
| 111 |
</template> |
| 112 |
</odoo> |