Files
fvtt-celestopol/templates/character-factions.hbs
LeRatierBretonnier ea3064d7a2 fix: tests complets - onglets, message de tchat, scores bonus/malus
- Onglets item (Anomalie/Aspect/Attribut): correction tabGroups + data-group sur chaque <a> et <section>
- Onglets acteur (PJ/PNJ): tab.cssClass dans les templates pour l'état actif initial
- Message de tchat: alignement des noms de variables _getChatCardData <-> chat-message.hbs
  - actorName, actorImg, success/failure, diceResults, statLabel/skillLabel localisés
  - difficultyLabel et moonPhaseLabel localisés depuis SYSTEM
- Dialogue de jet (roll-dialog.hbs): correction noms variables + min/max modificateur
- lang/fr.json: ajout Roll.title, Roll.roll, clés Moon (minuscules), Difficulty (unknown/ardu)
- character.mjs: passage statLabel à CelestopolRoll.prompt()
- global.less: padding + overflow-y sur .tab pour contenu visible
- item-scores.hbs: passage system=system au partial + suppression garde isEditable
- Templates anomaly/aspect/attribute: passage system=system au partial item-scores
- chat-message.mjs: getHTML() → renderHTML() (dépréciation FVTT v13)

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-03-28 11:09:17 +01:00

64 lines
2.3 KiB
Handlebars

<div class="tab factions {{tab.cssClass}}" data-group="sheet" data-tab="factions">
<table class="factions-table">
<thead>
<tr>
<th>{{localize "CELESTOPOL.Faction.label"}}</th>
<th>{{localize "CELESTOPOL.Faction.score"}}</th>
</tr>
</thead>
<tbody>
{{#each factions as |faction factionId|}}
<tr class="faction-row">
<td class="faction-name">{{localize faction.label}}</td>
<td class="faction-value">
{{#if ../isEditMode}}
<input type="number" name="system.factions.{{factionId}}.value"
value="{{lookup ../system.factions factionId 'value'}}" min="0">
{{else}}
<span>{{lookup ../system.factions factionId 'value'}}</span>
{{/if}}
</td>
</tr>
{{/each}}
{{!-- Factions personnalisées --}}
<tr class="faction-row custom">
<td>
{{#if isEditMode}}
<input type="text" name="system.factions.perso1.label"
value="{{system.factions.perso1.label}}"
placeholder="{{localize 'CELESTOPOL.Faction.custom'}}">
{{else}}
<span>{{#if system.factions.perso1.label}}{{system.factions.perso1.label}}{{else}}{{/if}}</span>
{{/if}}
</td>
<td>
{{#if isEditMode}}
<input type="number" name="system.factions.perso1.value" value="{{system.factions.perso1.value}}" min="0">
{{else}}
<span>{{system.factions.perso1.value}}</span>
{{/if}}
</td>
</tr>
<tr class="faction-row custom">
<td>
{{#if isEditMode}}
<input type="text" name="system.factions.perso2.label"
value="{{system.factions.perso2.label}}"
placeholder="{{localize 'CELESTOPOL.Faction.custom'}}">
{{else}}
<span>{{#if system.factions.perso2.label}}{{system.factions.perso2.label}}{{else}}{{/if}}</span>
{{/if}}
</td>
<td>
{{#if isEditMode}}
<input type="number" name="system.factions.perso2.value" value="{{system.factions.perso2.value}}" min="0">
{{else}}
<span>{{system.factions.perso2.value}}</span>
{{/if}}
</td>
</tr>
</tbody>
</table>
</div>