Files
fvtt-celestopol/templates/character-competences.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

103 lines
4.5 KiB
Handlebars
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
<div class="tab competences {{tab.cssClass}}" data-group="sheet" data-tab="competences">
{{!-- Grille des 4 stats × 4 compétences --}}
<div class="stats-grid">
{{#each stats as |stat statId|}}
<div class="stat-block">
<div class="stat-header">
<span class="stat-name">{{localize stat.label}}</span>
<div class="stat-res">
<label>{{localize "CELESTOPOL.Stat.res"}}</label>
{{#if ../isEditMode}}
<input type="number" name="system.stats.{{statId}}.res" value="{{lookup ../system.stats statId 'res'}}" min="0" max="8" class="stat-res-input">
{{else}}
<span class="stat-res-value">{{lookup ../system.stats statId 'res'}}</span>
{{/if}}
</div>
</div>
<div class="skills-list">
{{#each (lookup ../skills statId) as |skill skillId|}}
<div class="skill-row {{#unless ../isEditMode}}rollable{{/unless}}"
data-stat-id="{{statId}}" data-skill-id="{{skillId}}"
title="{{#unless ../isEditMode}}{{localize 'CELESTOPOL.Roll.clickToRoll'}}{{/unless}}">
<span class="skill-name">{{localize skill.label}}</span>
{{#if ../isEditMode}}
<input type="number" name="system.stats.{{statId}}.{{skillId}}.value"
value="{{lookup (lookup ../system.stats statId) skillId 'value'}}"
min="0" max="8" class="skill-value-input">
{{else}}
<span class="skill-value">{{lookup (lookup ../system.stats statId) skillId 'value'}}</span>
{{/if}}
</div>
{{/each}}
</div>
</div>
{{/each}}
</div>
{{!-- Items : Anomalies, Aspects, Attributs --}}
<div class="items-section">
{{!-- Anomalies --}}
<div class="items-group">
<div class="items-header">
<span>{{localize "CELESTOPOL.Item.anomalies"}}</span>
{{#if isEditMode}}
<a data-action="createAnomaly" title="{{localize 'CELESTOPOL.Item.newAnomaly'}}"><i class="fas fa-plus"></i></a>
{{/if}}
</div>
{{#each anomalies as |item|}}
<div class="item-row" data-item-id="{{item.id}}" data-item-uuid="{{item.uuid}}" data-drag="true">
<img src="{{item.img}}" class="item-icon" alt="{{item.name}}">
<span class="item-name">{{item.name}}</span>
<span class="item-value">{{item.system.value}}</span>
<div class="item-controls">
<a data-action="edit" data-item-uuid="{{item.uuid}}"><i class="fas fa-edit"></i></a>
{{#if ../isEditMode}}<a data-action="delete" data-item-uuid="{{item.uuid}}"><i class="fas fa-trash"></i></a>{{/if}}
</div>
</div>
{{/each}}
</div>
{{!-- Aspects --}}
<div class="items-group">
<div class="items-header">
<span>{{localize "CELESTOPOL.Item.aspects"}}</span>
{{#if isEditMode}}
<a data-action="createAspect" title="{{localize 'CELESTOPOL.Item.newAspect'}}"><i class="fas fa-plus"></i></a>
{{/if}}
</div>
{{#each aspects as |item|}}
<div class="item-row" data-item-id="{{item.id}}" data-item-uuid="{{item.uuid}}" data-drag="true">
<img src="{{item.img}}" class="item-icon" alt="{{item.name}}">
<span class="item-name">{{item.name}}</span>
<span class="item-value">{{item.system.value}}</span>
<div class="item-controls">
<a data-action="edit" data-item-uuid="{{item.uuid}}"><i class="fas fa-edit"></i></a>
{{#if ../isEditMode}}<a data-action="delete" data-item-uuid="{{item.uuid}}"><i class="fas fa-trash"></i></a>{{/if}}
</div>
</div>
{{/each}}
</div>
{{!-- Attributs --}}
<div class="items-group">
<div class="items-header">
<span>{{localize "CELESTOPOL.Item.attributes"}}</span>
{{#if isEditMode}}
<a data-action="createAttribute" title="{{localize 'CELESTOPOL.Item.newAttribute'}}"><i class="fas fa-plus"></i></a>
{{/if}}
</div>
{{#each attributes as |item|}}
<div class="item-row" data-item-id="{{item.id}}" data-item-uuid="{{item.uuid}}" data-drag="true">
<img src="{{item.img}}" class="item-icon" alt="{{item.name}}">
<span class="item-name">{{item.name}}</span>
<span class="item-value">{{item.system.value}}</span>
<div class="item-controls">
<a data-action="edit" data-item-uuid="{{item.uuid}}"><i class="fas fa-edit"></i></a>
{{#if ../isEditMode}}<a data-action="delete" data-item-uuid="{{item.uuid}}"><i class="fas fa-trash"></i></a>{{/if}}
</div>
</div>
{{/each}}
</div>
</div>
</div>