Debian Codegraph @

addons/hr_skills/static/src/fields/skills_one2many/skills_one2many.xml

raw
1 <?xml version="1.0" encoding="UTF-8"?>
2 <odoo>
3 <t t-name="hr_skills.SkillsListRenderer" t-inherit-mode="primary" t-inherit="web.ListRenderer">
4 <xpath expr="//table" position="attributes">
5 <attribute name="t-attf-class" add="mb-1 {{ !isEditable ? 'cursor-default' : '' }} {{ !showTable ? 'd-none' : ''}} o_skill_table overflow-hidden" separator=" "/>
6 </xpath>
7 <xpath expr="//table" position="before">
8 <div name="skills_header" class="skills_header text-uppercase small fw-bolder py-2 mt-4" t-att-class="{'o_horizontal_separator': !showTable }">
9 Skills &amp; Certifications
10 <a t-if="!isEmpty &amp;&amp; showTimeline" t-on-click="openSkillsReport" class="float-end cursor-pointer">
11 <span class="fa fa-line-chart me-1"/>
12 Timeline
13 </a>
14 </div>
15 </xpath>
16 <xpath expr="//table" position="after">
17 <t t-if="!showTable">
18 <t t-if="!anySkills">
19 <div name="no_skills" class="skills_helper">
20 <p class="mt-2">
21 There are no skills defined in the library.
22 </p>
23 <button t-on-click="skillTypesAction"
24 class="btn btn-secondary align-self-center"
25 role="button" t-if="isEditable">
26 Create Skills
27 </button>
28 </div>
29 </t>
30 <t t-else="">
31 <div name="skills_available" class="skills_helper text-muted fst-italic">
32 <p class="mt-2">You can add skills from our library to the employee profile.<br/>
33 If skills are missing, they can be created by an HR officer.
34 </p>
35 <button t-on-click="props.onAdd"
36 class="btn btn-secondary align-self-center"
37 role="button" t-if="isEditable">
38 Pick a skill from the list
39 </button>
40 </div>
41 </t>
42 </t>
43 </xpath>
44 </t>
45
46 <t t-name="hr_skills.SkillsListRenderer.Rows">
47 <t t-foreach="Object.entries(groupedList)" t-as="skill_group" t-key="skill_group[0]">
48 <tr class="o_group_has_content o_group_header">
49 <th tabindex="-1" class="o_group_name" t-att-colspan="colspan">
50 <div class="d-flex justify-content-between align-items-center">
51 <span t-esc="skill_group[1].name"/>
52 <button id="add_button" class="btn btn-secondary btn-sm"
53 t-if="isEditable"
54 t-on-click="() => props.onAdd({ context: { default_skill_type_id: skill_group[1].id }})"
55 role="button">ADD</button>
56 </div>
57 </th>
58 </tr>
59 <t t-foreach="skill_group[1].list.records" t-as="record" t-key="record.id">
60 <t t-set="group" t-value="skill_group[1]"/>
61 <t t-call="{{ constructor.recordRowTemplate }}"/>
62 </t>
63 </t>
64 </t>
65 </odoo>