Skip to content
Extraits de code Groupes Projets
Valider e7e64b2c rédigé par Benjamin - Le Filament's avatar Benjamin - Le Filament
Parcourir les fichiers

[CLEAN] exclude templates from pre-commit

parent ac34aa5a
Aucune branche associée trouvée
Aucune étiquette associée trouvée
Aucune requête de fusion associée trouvée
...@@ -57,6 +57,7 @@ repos: ...@@ -57,6 +57,7 @@ repos:
- id: prettier - id: prettier
name: prettier (with plugin-xml) name: prettier (with plugin-xml)
entry: prettier entry: prettier
exclude: ^(data/.*|templates/.*)$
args: args:
- --write - --write
- --list-different - --list-different
......
...@@ -5,25 +5,14 @@ ...@@ -5,25 +5,14 @@
<!-- Blog Home --> <!-- Blog Home -->
<template id="blog_home" name="CGScop Extranet Blog list"> <template id="blog_home" name="CGScop Extranet Blog list">
<t t-call="scopext_portal.extranet_layout"> <t t-call="scopext_portal.extranet_layout">
<section <section class="flex h-full p-10 even:bg-white w-svw shadow-background first:rounded-tl-[30px] odd:bg-surface">
class="flex h-full p-10 even:bg-white w-svw shadow-background first:rounded-tl-[30px] odd:bg-surface"
>
<div class="w-full"> <div class="w-full">
<div <div class="container relative gap-y-8 mx-auto mb-auto default-grid">
class="container relative gap-y-8 mx-auto mb-auto default-grid"
>
<div class="col-span-12"> <div class="col-span-12">
<div t-foreach="category_ids" t-as="category"> <div t-foreach="category_ids" t-as="category">
<h3 <h3 t-out="category.name" class="typo-caption" t-attf-style="color: {{category.color}};" />
t-out="category.name"
class="typo-caption"
t-attf-style="color: {{category.color}};"
/>
<ul> <ul>
<li <li t-foreach="category.page_ids.filtered(lambda p: p.is_published)" t-as="page">
t-foreach="category.page_ids.filtered(lambda p: p.is_published)"
t-as="page"
>
<a t-attf-href="/coop/ur/{{slug(page)}}"> <a t-attf-href="/coop/ur/{{slug(page)}}">
<t t-out="page.name" /> <t t-out="page.name" />
</a> </a>
...@@ -40,24 +29,16 @@ ...@@ -40,24 +29,16 @@
<!-- Blog Page --> <!-- Blog Page -->
<template id="blog_page" name="CGScop Extranet Blog Page"> <template id="blog_page" name="CGScop Extranet Blog Page">
<t t-call="scopext_portal.extranet_layout"> <t t-call="scopext_portal.extranet_layout">
<section <section class="flex h-full p-10 even:bg-white w-svw shadow-background first:rounded-tl-[30px] odd:bg-surface">
class="flex h-full p-10 even:bg-white w-svw shadow-background first:rounded-tl-[30px] odd:bg-surface"
>
<div class="w-full"> <div class="w-full">
<div <div class="container relative gap-y-8 mx-auto mb-auto default-grid">
class="container relative gap-y-8 mx-auto mb-auto default-grid"
>
<!-- Menu --> <!-- Menu -->
<div class="col-span-3"> <div class="col-span-3">
<t t-call="scopext_portal_blog.blog_menu" /> <t t-call="scopext_portal_blog.blog_menu" />
</div> </div>
<!-- Contenu --> <!-- Contenu -->
<div class="col-span-9"> <div class="col-span-9">
<h1 <h1 t-out="page_id.name" class="typo-h1" t-attf-style="color: {{page_id.category_id.color}};" />
t-out="page_id.name"
class="typo-h1"
t-attf-style="color: {{page_id.category_id.color}};"
/>
<div t-field="page_id.content" /> <div t-field="page_id.content" />
</div> </div>
</div> </div>
...@@ -69,16 +50,9 @@ ...@@ -69,16 +50,9 @@
<!-- Blog Menu --> <!-- Blog Menu -->
<template id="blog_menu" name="CGScop Extranet Blog Menu"> <template id="blog_menu" name="CGScop Extranet Blog Menu">
<div t-foreach="category_ids" t-as="category"> <div t-foreach="category_ids" t-as="category">
<h5 <h5 t-out="category.name" class="typo-caption" t-attf-style="color: {{category.color}};" />
t-out="category.name"
class="typo-caption"
t-attf-style="color: {{category.color}};"
/>
<ul> <ul>
<li <li t-foreach="category.page_ids.filtered(lambda p: p.is_published)" t-as="page">
t-foreach="category.page_ids.filtered(lambda p: p.is_published)"
t-as="page"
>
<a t-attf-href="/coop/ur/{{slug(page)}}"> <a t-attf-href="/coop/ur/{{slug(page)}}">
<t t-out="page.name" /> <t t-out="page.name" />
</a> </a>
......
...@@ -9,9 +9,7 @@ ...@@ -9,9 +9,7 @@
> >
<xpath expr="//nav" position="inside"> <xpath expr="//nav" position="inside">
<t t-set="ur_id" t-value="request.env.user.partner_id.ur_id" /> <t t-set="ur_id" t-value="request.env.user.partner_id.ur_id" />
<t <t t-if="ur_id and request.env['scop.portal.blog.category'].get_portal_blog_categories(ur_id)">
t-if="ur_id and request.env['scop.portal.blog.category'].get_portal_blog_categories(ur_id)"
>
<t t-call="scopext_portal.nav_lvl1_item"> <t t-call="scopext_portal.nav_lvl1_item">
<t t-set="link" t-value="'/coop/ur'" /> <t t-set="link" t-value="'/coop/ur'" />
<t t-set="name" t-value="'blog_ur'" /> <t t-set="name" t-value="'blog_ur'" />
......
0% Chargement en cours ou .
You are about to add 0 people to the discussion. Proceed with caution.
Veuillez vous inscrire ou vous pour commenter