diff options
| author | Elisabeth Dickinson <edi@odoo.com> | 2019-05-21 12:53:39 +0000 |
|---|---|---|
| committer | qsm-odoo <qsm@odoo.com> | 2019-06-04 22:26:50 +0000 |
| commit | b68311454ddcbef94a9e24948dceb8a597c504b0 (patch) | |
| tree | 062751f7f4f29988ce3431459a20d2e57e036d58 /addons/website_forum/views/website_forum.xml | |
| parent | bae24d7bdda9f6e03bb0c5266a3ae5223850f6ed (diff) | |
[IMP] website_forum: review design of forum index
- Allow to set an image on each forum
- Review the form view
- Redesign the forum index with cards and header
task-1984582
closes odoo/odoo#33530
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
Co-authored-by: qsm-odoo <qsm@odoo.com>
Diffstat (limited to 'addons/website_forum/views/website_forum.xml')
| -rw-r--r-- | addons/website_forum/views/website_forum.xml | 58 |
1 files changed, 48 insertions, 10 deletions
diff --git a/addons/website_forum/views/website_forum.xml b/addons/website_forum/views/website_forum.xml index f3d9351c17e..269e766e912 100644 --- a/addons/website_forum/views/website_forum.xml +++ b/addons/website_forum/views/website_forum.xml @@ -379,23 +379,61 @@ </template> <!-- All Forums Layout --> -<template id="forum_all" name="Our Forums"> +<template id="forum_all" name="Forum Navigation"> <t t-call="website.layout"> - <div class="container"> - <h1 class="mb32">Our forums</h1> - <div class='row'> - <div t-if="not forums" class="alert alert-info">No forum post yet.</div> - <div t-foreach="forums" t-as="forum" class="col-md-3 text-center mb32"> - <a t-attf-href="/forum/#{ slug(forum) }"> - <div class="fa fa-5x fa-comment mb16" role="img" aria-label="Forum" title="Forum"/> - <div t-field="forum.name"/> - </a> + <t t-set="pageName" t-value="'website_forum'"/> + <div id="wrap"> + <div class="oe_structure oe_empty" id="oe_structure_forum_all_top"/> + <div class="container pt-4"> + <div t-if="forums" class="row"> + <div t-foreach="forums.with_context(bin_size=True)" t-as="forum" + class="col-sm-6 col-md-3 mb-4"> + <a t-attf-href="/forum/#{slug(forum)}" class="d-block"> + <div class="card border-0 shadow-sm"> + <h1 class="card-header h6 font-weight-bold bg-white" + t-field="forum.name"/> + <div class="card-img-bottom embed-responsive embed-responsive-16by9 o_wforum_forum_card_bg"> + <div t-if="forum.image" + class="oe_img_bg embed-responsive-item" + t-attf-style="background-image: url(/web/image/forum.forum/#{forum.id}/image_large); background-position: center;"/> + </div> + </div> + </a> + </div> </div> + <t t-else=""> + <div class="alert alert-info">No forum is available yet.</div> + </t> </div> + <div class="oe_structure oe_empty" id="oe_structure_forum_all_bottom"/> </div> </t> </template> +<!-- Default content for the "All Forums Layout" header above --> +<!-- (simulate an oe_structure edition) --> +<template id="forum_all_oe_structure_forum_all_top" inherit_id="website_forum.forum_all" name="Forum Navigation (oe_structure_forum_all_top)"> + <xpath expr="//*[hasclass('oe_structure')][@id='oe_structure_forum_all_top']" position="replace"> + <div class="oe_structure oe_empty" id="oe_structure_forum_all_top"> + <section class="s_cover parallax s_parallax_is_fixed bg-black-50 pt64 pb64" data-scroll-background-ratio="1"> + <span class="s_parallax_bg oe_img_bg oe_custom_bg" style="background-image: url('/web/image/website.s_cover_default_image'); background-position: 50% 0;"/> + <div class="container"> + <div class="row s_nb_column_fixed"> + <div class="col-lg-12 s_title" data-name="Title"> + <h1 class="s_title_thin o_default_snippet_text text-center">Our forums</h1> + </div> + <div class="col-lg-12 s_text pt16 pb16" data-name="Text"> + <p class="lead o_default_snippet_text" style="text-align: center;"> + This community is for professional and enthusiast users, partners and programmers. + </p> + </div> + </div> + </div> + </section> + </div> + </xpath> +</template> + <!-- Specific Forum Layout --> <template id="forum_index" name="Forum"> <t t-call="website_forum.header"> |
