From 26808d7b49ea6b1571691b3f043d00afac56bc3f Mon Sep 17 00:00:00 2001 From: Vincent Vandemeulebrouck Date: Thu, 29 Dec 2022 02:24:18 +0100 Subject: [PATCH] Controle visibilite Ne pas afficher les boutons non accessibles --- templates/actor-sheet.html | 130 ++++++++++++------------ templates/actor/inventaire-item.html | 7 +- templates/actor/inventaire-monnaie.html | 10 +- 3 files changed, 81 insertions(+), 66 deletions(-) diff --git a/templates/actor-sheet.html b/templates/actor-sheet.html index 20782f13..fb4fd2c5 100644 --- a/templates/actor-sheet.html +++ b/templates/actor-sheet.html @@ -21,88 +21,89 @@ {{!-- Sheet Tab Navigation --}} + {{#if options.isObserver}} + Carac. + Compétences + Combat + Savoirs&Taches + Haut-Rêve + {{/if}} + Équipement + Description + - {{!-- Sheet Body --}} -
- - {{!-- Carac Tab --}} -
-
- {{>"systems/foundryvtt-reve-de-dragon/templates/actor/vue-detaillee.html"}} + {{!-- Sheet Body --}} +
+ {{#if options.isObserver}}{{!-- Carac Tab --}} +
+
+ {{>"systems/foundryvtt-reve-de-dragon/templates/actor/vue-detaillee.html"}} +
+
+
+ {{>"systems/foundryvtt-reve-de-dragon/templates/actor/carac-main.html"}} + {{>"systems/foundryvtt-reve-de-dragon/templates/actor/carac-total.html"}}
-
-
- {{>"systems/foundryvtt-reve-de-dragon/templates/actor/carac-main.html"}} - {{>"systems/foundryvtt-reve-de-dragon/templates/actor/carac-total.html"}} -
-
- {{>"systems/foundryvtt-reve-de-dragon/templates/actor/carac-derivee.html"}} -
+
+ {{>"systems/foundryvtt-reve-de-dragon/templates/actor/carac-derivee.html"}}
- - {{!-- Compétences Tab --}} -
-
- {{>"systems/foundryvtt-reve-de-dragon/templates/actor/vue-detaillee.html"}} - - {{#if options.showCompNiveauBase}} - Montrer tout - {{else}} - Filtrer - {{/if}} - - - - - - +
+ {{/if}} + {{#if options.isObserver}}{{!-- Compétences Tab --}} +
+
+ {{>"systems/foundryvtt-reve-de-dragon/templates/actor/vue-detaillee.html"}} + + {{#if options.showCompNiveauBase}} + Montrer tout + {{else}} + Filtrer + {{/if}} + + + + + + +
+
+
+ {{> "systems/foundryvtt-reve-de-dragon/templates/actor/competence-categorie.html" competences=(filtreTriCompetences byCateg.generale) categorie="Compétences générales"}} + {{> "systems/foundryvtt-reve-de-dragon/templates/actor/competence-categorie.html" competences=(filtreTriCompetences byCateg.particuliere) categorie="Compétences Particulières"}} + {{> "systems/foundryvtt-reve-de-dragon/templates/actor/competence-categorie.html" competences=(filtreTriCompetences byCateg.specialisee) categorie="Compétences Spécialisées"}}
-
-
- {{> "systems/foundryvtt-reve-de-dragon/templates/actor/competence-categorie.html" competences=(filtreTriCompetences byCateg.generale) categorie="Compétences générales"}} - {{> "systems/foundryvtt-reve-de-dragon/templates/actor/competence-categorie.html" competences=(filtreTriCompetences byCateg.particuliere) categorie="Compétences Particulières"}} - {{> "systems/foundryvtt-reve-de-dragon/templates/actor/competence-categorie.html" competences=(filtreTriCompetences byCateg.specialisee) categorie="Compétences Spécialisées"}} -
-
- {{> "systems/foundryvtt-reve-de-dragon/templates/actor/xp-competences.html"}} - {{> "systems/foundryvtt-reve-de-dragon/templates/actor/competence-categorie.html" competences=(filtreTriCompetences byCateg.melee) categorie="Compétences de Mêlée"}} - {{> "systems/foundryvtt-reve-de-dragon/templates/actor/competence-categorie.html" competences=(filtreTriCompetences byCateg.tir) categorie="Compétences de Tir"}} - {{> "systems/foundryvtt-reve-de-dragon/templates/actor/competence-categorie.html" competences=(filtreTriCompetences byCateg.lancer) categorie="Compétences de Lancer"}} - {{> "systems/foundryvtt-reve-de-dragon/templates/actor/competence-categorie.html" competences=(filtreTriCompetences byCateg.connaissance) categorie="Connaissances"}} - {{#if (or system.attributs.hautrevant.value options.vueDetaillee)}} - {{> "systems/foundryvtt-reve-de-dragon/templates/actor/competence-categorie.html" competences=(filtreTriCompetences byCateg.draconic) categorie="Draconic"}} - {{/if}} -
+
+ {{> "systems/foundryvtt-reve-de-dragon/templates/actor/xp-competences.html"}} + {{> "systems/foundryvtt-reve-de-dragon/templates/actor/competence-categorie.html" competences=(filtreTriCompetences byCateg.melee) categorie="Compétences de Mêlée"}} + {{> "systems/foundryvtt-reve-de-dragon/templates/actor/competence-categorie.html" competences=(filtreTriCompetences byCateg.tir) categorie="Compétences de Tir"}} + {{> "systems/foundryvtt-reve-de-dragon/templates/actor/competence-categorie.html" competences=(filtreTriCompetences byCateg.lancer) categorie="Compétences de Lancer"}} + {{> "systems/foundryvtt-reve-de-dragon/templates/actor/competence-categorie.html" competences=(filtreTriCompetences byCateg.connaissance) categorie="Connaissances"}} + {{#if (or system.attributs.hautrevant.value options.vueDetaillee)}} + {{> "systems/foundryvtt-reve-de-dragon/templates/actor/competence-categorie.html" competences=(filtreTriCompetences byCateg.draconic) categorie="Draconic"}} + {{/if}}
- - {{!-- Combat Tab --}} -
+
+ {{/if}} + {{#if options.isObserver}}{{!-- Combat Tab --}} +
{{> "systems/foundryvtt-reve-de-dragon/templates/actor/combat.html"}}
{{> "systems/foundryvtt-reve-de-dragon/templates/actor/blessures.html"}} {{> "systems/foundryvtt-reve-de-dragon/templates/actor/maladies-poisons.html"}} {{> "systems/foundryvtt-reve-de-dragon/templates/actor/possessions.html"}} -
- - {{!-- Connaissances Tab --}} + {{/if}} + + {{#if options.isObserver}}{{!-- Connaissances Tab --}}
{{> "systems/foundryvtt-reve-de-dragon/templates/actor/taches.html"}} {{> "systems/foundryvtt-reve-de-dragon/templates/actor/oeuvres.html"}} {{> "systems/foundryvtt-reve-de-dragon/templates/actor/jeux.html"}} {{> "systems/foundryvtt-reve-de-dragon/templates/actor/alchimie.html"}}
- - {{!-- hautreve Tab --}} + {{/if}} + {{#if options.isObserver}}{{!-- hautreve Tab --}}
{{#if system.attributs.hautrevant.value}} @@ -116,6 +117,7 @@

+ {{/if}} {{!-- Equipment Tab --}}
diff --git a/templates/actor/inventaire-item.html b/templates/actor/inventaire-item.html index 29511c41..a1f25f49 100644 --- a/templates/actor/inventaire-item.html +++ b/templates/actor/inventaire-item.html @@ -1,3 +1,4 @@ +{{#if (or @root.options.isObserver (ne item.type 'monnaie'))}}
  • {{#if (eq item.type 'conteneur')}} @@ -20,6 +21,7 @@ {{numberFormat item.system.encTotal decimals=2}} + {{#if @root.options.isOwner}} {{#unless item.estContenu}} {{#if (or (eq item.type 'arme') (eq item.type 'armure') )}} {{#if item.system.equipe}}{{else}}{{/if}} @@ -31,10 +33,13 @@ {{#if (ne item.system.quantite 0)}} {{/if}} + {{/if}} + {{#if @root.options.isOwner}} {{#if item.system.actionPrincipale}} {{item.system.actionPrincipale}} {{/if}} + {{/if}}
  • - +{{/if}} diff --git a/templates/actor/inventaire-monnaie.html b/templates/actor/inventaire-monnaie.html index 851d2188..ddb413ad 100644 --- a/templates/actor/inventaire-monnaie.html +++ b/templates/actor/inventaire-monnaie.html @@ -1,3 +1,4 @@ +{{#if @root.options.isObserver}}

    Argent et Monnaies (fortune: {{calc.fortune.sols}} sols {{calc.fortune.deniers}} deniers)

      {{#each monnaie as |piece id|}} @@ -7,19 +8,26 @@ ({{piece.system.cout}} Sols) + {{#if @root.options.isOwner}} + {{/if}} {{piece.system.quantite}} + {{#if @root.options.isOwner}} - + {{/if}} + + {{#if @root.options.isOwner}} + {{/if}} {{/each}}
    +{{/if}}