improved Plan / Allocation items

This commit is contained in:
Alexandre Gain committed 2026-11-07 22:08:06 +01:00
1 parent f6684f3b2e
commit 8c8d7a6f95
12 files changed
+49 -30

No files matched your search

+6 -1
View File
@@ -235,6 +235,7 @@
<table class="table table-hover plan-allocation-items-view">
<thead>
<tr>
<th class="text-center" style="width: 1%;">{{ 'mautic.plan.allocation_item.field.pictogram'|trans }}</th>
<th>{{ 'mautic.plan.allocation_item.field.type'|trans }}</th>
<th>{{ 'mautic.plan.allocation_item.field.name'|trans }}</th>
<th class="visible-md visible-lg">{{ 'mautic.plan.allocation_item.field.description'|trans }}</th>
@@ -246,7 +247,11 @@
{% for allocationItem in allocationItems %}
{% set typeName = plan_item_type_name('allocation', allocationItem.type) %}
{% set typeDescription = plan_item_type_description('allocation', allocationItem.type) %}
{% set typeIcon = plan_item_type_icon('allocation', allocationItem.type) %}
<tr>
<td class="text-center">
{% if typeIcon %}<i class="{{ typeIcon }} plan-item-type-icon" style="font-size: 24px;" aria-hidden="true"></i>{% endif %}
</td>
<td{% if typeDescription %} title="{{ typeDescription }}"{% endif %}>
{{ typeName ?? 'mautic.plan.description_item.type.unknown'|trans({'%key%': allocationItem.type}) }}
</td>
@@ -263,7 +268,7 @@
</tbody>
<tfoot>
<tr class="plan-allocation-total">
<th colspan="3">{{ 'mautic.plan.allocation.total'|trans }}</th>
<th colspan="4">{{ 'mautic.plan.allocation.total'|trans }}</th>
<th class="text-right text-nowrap">
{% if allocationTotals.planned is not null %}{{ plan_money(allocationTotals.planned) }} {{ plan_currency() }}{% endif %}
</th>
+13 -5
View File
@@ -67,12 +67,20 @@
{% macro allocation_item_row(item) %}
{{ _self.row_start('mautic.plan.allocation_item.drag') }}
<div class="row">
<div class="col-md-6">
{{ form_row(item.type) }}
{# Filled with the selected type's description by plan.js. #}
<p class="help-block plan-item-type-help">{{ plan_item_type_description('allocation', item.type.vars.value) }}</p>
{# The selected type's pictogram; updated by plan.js when the type changes. #}
<div class="col-xs-1 text-center pt-lg">
<i class="plan-item-type-icon {{ plan_item_type_icon('allocation', item.type.vars.value) }}" style="font-size: 28px;" aria-hidden="true"></i>
</div>
<div class="col-xs-11">
<div class="row">
<div class="col-md-6">
{{ form_row(item.type) }}
{# Filled with the selected type's description by plan.js. #}
<p class="help-block plan-item-type-help">{{ plan_item_type_description('allocation', item.type.vars.value) }}</p>
</div>
<div class="col-md-6">{{ form_row(item.name) }}</div>
</div>
</div>
<div class="col-md-6">{{ form_row(item.name) }}</div>
</div>
{{ form_row(item.description) }}
<div class="row">