1
0
forked from Mapan/odoo17e
odoo17e-kedaikipas58/addons/website_helpdesk_forum/views/helpdesk_templates.xml
2024-12-10 09:04:09 +07:00

54 lines
2.9 KiB
XML

<?xml version="1.0" encoding="utf-8"?>
<odoo>
<template id="knowledge_base_forum_card" inherit_id="website_helpdesk.knowledge_base">
<xpath expr="//div[@id='o_knowledge_base_sections']" position="inside">
<t t-set="hide_community_button" t-value="True"/>
<div class="col" t-if="team.show_knowledge_base_forum">
<div class="card position-relative h-100 overflow-visible">
<div class="card-body d-flex align-items-start">
<img src="/website_helpdesk/static/src/img/speech.svg"
class="position-md-absolute top-0 end-0 translate-middle order-1 order-md-0 ms-3 ms-md-0"/>
<div class="d-flex flex-wrap">
<h5 class="h5-fs card-title">Community</h5>
<p class="mb-0">Ask questions and discuss tips with fellow members in a forum</p>
</div>
</div>
<div class="card-body h-100">
<t t-if="team.top_forum_posts" class="card-title">
<small class="text-muted text-uppercase">
<t t-if="len(team.top_forum_posts) &gt; 4">Most voted</t>
<t t-else="">Quick Links</t>
</small>
<ul class="nav flex-column gap-1 mt-2">
<t t-foreach="team.top_forum_posts" t-as="article">
<li class="nav-item">
<a class="nav-link rounded py-2 bg-100"
t-attf-href="/forum/{{ slug(article.forum_id) }}/{{ slug(article) }}"
target="_blank"
t-att-title="article.name"
>
<t t-esc="article.name"/>
</a>
</li>
</t>
</ul>
</t>
</div>
<div class="card-body d-flex justify-content-center">
<a class="btn btn-secondary flex-grow-1" t-attf-href="/forum/{{ slug(team) }}" target="_blank">
Ask the community
</a>
</div>
</div>
</div>
</xpath>
</template>
<template id="footer" inherit_id="website_helpdesk.footer">
<xpath expr="//p[@id='footer_buttons']" position="inside">
<a class="btn btn-secondary btn-lg" href="/forum" t-if="team.use_website_helpdesk_forum and not hide_community_button">Ask the Community</a>
</xpath>
</template>
</odoo>