From a74ab041f9e71552f19c3ca48664b5c3189da681 Mon Sep 17 00:00:00 2001 From: Vincent Vandemeulebrouck Date: Tue, 4 May 2021 11:38:23 +0200 Subject: [PATCH] Utilisation templates partial --- module/rdd-utility.js | 2 + ...r-sheet-categorie-competences-partial.html | 8 ++ templates/actor-sheet-oeuvre-partial.html | 11 ++ templates/actor-sheet.html | 116 +++--------------- 4 files changed, 35 insertions(+), 102 deletions(-) create mode 100644 templates/actor-sheet-categorie-competences-partial.html create mode 100644 templates/actor-sheet-oeuvre-partial.html diff --git a/module/rdd-utility.js b/module/rdd-utility.js index c6123b52..6ebb0d6f 100644 --- a/module/rdd-utility.js +++ b/module/rdd-utility.js @@ -108,6 +108,8 @@ export class RdDUtility { 'systems/foundryvtt-reve-de-dragon/templates/actor-entite-sheet.html', 'systems/foundryvtt-reve-de-dragon/templates/actor-vehicule-sheet.html', 'systems/foundryvtt-reve-de-dragon/templates/actor-sheet-competence-partial.html', + 'systems/foundryvtt-reve-de-dragon/templates/actor-sheet-categorie-competences-partial.html', + 'systems/foundryvtt-reve-de-dragon/templates/actor-sheet-oeuvre-partial.html', 'systems/foundryvtt-reve-de-dragon/templates/actor-liste-blessures-partial.html', 'systems/foundryvtt-reve-de-dragon/templates/actor-blessure-partial.html', //Items diff --git a/templates/actor-sheet-categorie-competences-partial.html b/templates/actor-sheet-categorie-competences-partial.html new file mode 100644 index 00000000..a3fa8da9 --- /dev/null +++ b/templates/actor-sheet-categorie-competences-partial.html @@ -0,0 +1,8 @@ +
+ {{categorie}} +
+ diff --git a/templates/actor-sheet-oeuvre-partial.html b/templates/actor-sheet-oeuvre-partial.html new file mode 100644 index 00000000..4492568d --- /dev/null +++ b/templates/actor-sheet-oeuvre-partial.html @@ -0,0 +1,11 @@ +
  • + {{upperFirst typeOeuvre}} + + {{oeuvre.name}} (niveau {{oeuvre.data.niveau}}) + +
    + + +
    +
  • + diff --git a/templates/actor-sheet.html b/templates/actor-sheet.html index b4270533..5b96d32f 100644 --- a/templates/actor-sheet.html +++ b/templates/actor-sheet.html @@ -233,81 +233,18 @@
    - -
    - Compétences générales -
    -
      - {{#each competenceByCategory.generale as |comp key|}} - {{> "systems/foundryvtt-reve-de-dragon/templates/actor-sheet-competence-partial.html" comp}} - {{/each}} -
    - -
    - Compétences Particulières -
    -
      - {{#each competenceByCategory.particuliere as |comp key|}} - {{> "systems/foundryvtt-reve-de-dragon/templates/actor-sheet-competence-partial.html" comp}} - {{/each}} -
    - -
    - Compétences Spécialisées -
    -
      - {{#each competenceByCategory.specialisee as |comp key|}} - {{> "systems/foundryvtt-reve-de-dragon/templates/actor-sheet-competence-partial.html" comp}} - {{/each}} -
    + {{> "systems/foundryvtt-reve-de-dragon/templates/actor-sheet-categorie-competences-partial.html" competences=competenceByCategory.generale categorie="Compétences générales"}} + {{> "systems/foundryvtt-reve-de-dragon/templates/actor-sheet-categorie-competences-partial.html" competences=competenceByCategory.particuliere categorie="Compétences Particulières"}} + {{> "systems/foundryvtt-reve-de-dragon/templates/actor-sheet-categorie-competences-partial.html" competences=competenceByCategory.specialisee categorie="Compétences Spécialisées"}}
    - +
    -
    - Compétences de Mêlée -
    -
      - {{#each competenceByCategory.melee as |comp key|}} - {{> "systems/foundryvtt-reve-de-dragon/templates/actor-sheet-competence-partial.html" comp}} - {{/each}} -
    - -
    - Compétences de Tir -
    -
      - {{#each competenceByCategory.tir as |comp key|}} - {{> "systems/foundryvtt-reve-de-dragon/templates/actor-sheet-competence-partial.html" comp}} - {{/each}} -
    - -
    - Compétences de Lancer -
    -
      - {{#each competenceByCategory.lancer as |comp key|}} - {{> "systems/foundryvtt-reve-de-dragon/templates/actor-sheet-competence-partial.html" comp}} - {{/each}} -
    - -
    - Connaissances -
    -
      - {{#each competenceByCategory.connaissance as |comp key|}} - {{> "systems/foundryvtt-reve-de-dragon/templates/actor-sheet-competence-partial.html" comp}} - {{/each}} -
    - + {{> "systems/foundryvtt-reve-de-dragon/templates/actor-sheet-categorie-competences-partial.html" competences=competenceByCategory.melee categorie="Compétences de Mêlée"}} + {{> "systems/foundryvtt-reve-de-dragon/templates/actor-sheet-categorie-competences-partial.html" competences=competenceByCategory.tir categorie="Compétences de Tir"}} + {{> "systems/foundryvtt-reve-de-dragon/templates/actor-sheet-categorie-competences-partial.html" competences=competenceByCategory.lancer categorie="Compétences de Lancer"}} + {{> "systems/foundryvtt-reve-de-dragon/templates/actor-sheet-categorie-competences-partial.html" competences=competenceByCategory.connaissance categorie="Connaissances"}} {{#if data.attributs.hautrevant.value}} -
    - Draconic -
    -
      - {{#each competenceByCategory.draconic as |comp key|}} - {{> "systems/foundryvtt-reve-de-dragon/templates/actor-sheet-competence-partial.html" comp}} - {{/each}} -
    + {{> "systems/foundryvtt-reve-de-dragon/templates/actor-sheet-categorie-competences-partial.html" competences=competenceByCategory.draconic categorie="Draconic"}} {{/if}}
    @@ -384,44 +321,19 @@

    Oeuvres diverses :

    Créer une oeuvre
      {{#each chants as |chant id|}} -
    • Chant{{chant.name}} (niveau {{chant.data.niveau}}) -
      - - -
      -
    • + {{> "systems/foundryvtt-reve-de-dragon/templates/actor-sheet-oeuvre-partial.html" oeuvre=chant typeOeuvre="Chant" classOeuvre="chant-label"}} {{/each}} {{#each musiques as |musique id|}} -
    • Musique{{musique.name}} (niveau {{musique.data.niveau}}) -
      - - -
      -
    • + {{> "systems/foundryvtt-reve-de-dragon/templates/actor-sheet-oeuvre-partial.html" oeuvre=musique typeOeuvre="Musique" classOeuvre="musique-label"}} {{/each}} {{#each danses as |danse id|}} -
    • Danse{{danse.name}} (niveau {{danse.data.niveau}}) -
      - - -
      -
    • + {{> "systems/foundryvtt-reve-de-dragon/templates/actor-sheet-oeuvre-partial.html" oeuvre=danse typeOeuvre="Danse" classOeuvre="danse-label"}} {{/each}} {{#each oeuvres as |oeuvre id|}} -
    • {{upperFirst oeuvre.data.competence}}{{oeuvre.name}} (niveau {{oeuvre.data.niveau}}) -
      - - -
      -
    • + {{> "systems/foundryvtt-reve-de-dragon/templates/actor-sheet-oeuvre-partial.html" oeuvre=oeuvre typeOeuvre=oeuvre.data.competence classOeuvre="oeuvre-label"}} {{/each}} {{#each recettescuisine as |recette id|}} -
    • Recette de cuisine{{recette.name}} (niveau {{recette.data.niveau}}) -
      - - -
      -
    • + {{> "systems/foundryvtt-reve-de-dragon/templates/actor-sheet-oeuvre-partial.html" oeuvre=recette typeOeuvre="Recette de cuisine" classOeuvre="recettecuisine-label"}} {{/each}}

    Jeux :