56 lines
2.1 KiB
Handlebars
56 lines
2.1 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.relation"}}</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
{{!-- Factions standard --}}
|
|
{{#each factionRows as |faction|}}
|
|
<tr class="faction-row" data-faction="{{faction.id}}">
|
|
<td class="faction-name">{{localize faction.label}}</td>
|
|
<td class="faction-value">
|
|
<div class="faction-checkboxes-container">
|
|
<div class="faction-checkboxes">
|
|
{{#each faction.dots as |dot|}}
|
|
<span class="faction-dot {{dot.type}} {{#if dot.filled}}filled{{/if}}"
|
|
{{#if @root.isEditable}}data-action="factionLevel" data-faction="{{../id}}" data-index="{{dot.index}}"{{/if}}></span>
|
|
{{/each}}
|
|
</div>
|
|
<span class="faction-count">{{faction.valueStr}}</span>
|
|
</div>
|
|
</td>
|
|
</tr>
|
|
{{/each}}
|
|
|
|
{{!-- Factions personnalisées --}}
|
|
{{#each factionCustom as |faction|}}
|
|
<tr class="faction-row custom" data-faction="{{faction.id}}">
|
|
<td>
|
|
{{#if @root.isEditMode}}
|
|
<input type="text" name="system.factions.{{faction.id}}.label"
|
|
value="{{faction.label}}"
|
|
placeholder="{{localize 'CELESTOPOL.Faction.custom'}}">
|
|
{{else}}
|
|
<span>{{#if faction.label}}{{faction.label}}{{else}}—{{/if}}</span>
|
|
{{/if}}
|
|
</td>
|
|
<td>
|
|
<div class="faction-checkboxes-container">
|
|
<div class="faction-checkboxes">
|
|
{{#each faction.dots as |dot|}}
|
|
<span class="faction-dot {{dot.type}} {{#if dot.filled}}filled{{/if}}"
|
|
{{#if @root.isEditable}}data-action="factionLevel" data-faction="{{../id}}" data-index="{{dot.index}}"{{/if}}></span>
|
|
{{/each}}
|
|
</div>
|
|
<span class="faction-count">{{faction.valueStr}}</span>
|
|
</div>
|
|
</td>
|
|
</tr>
|
|
{{/each}}
|
|
</tbody>
|
|
</table>
|
|
</div>
|