Skip to content

Commit 7d59faf

Browse files
committed
Merge tag '2.1.2'
Hotfix version 2.1.2 - Update translations - Hotfix clear language keys - Hotfix adapt templates
2 parents 3112369 + c5d462f commit 7d59faf

11 files changed

+94
-132
lines changed
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,9 @@
11
<?php
22
/**
3-
* Translations are managed using Transifex. To create a new translation
4-
* or to help to maintain an existing one, please register at transifex.com.
5-
*
6-
* @link https://www.transifex.com/signup/
7-
* @link https://www.transifex.com/projects/p/metamodels/language/de/
8-
*
9-
* @license http://www.gnu.org/licenses/lgpl-3.0.html LGPL
10-
*
11-
* last-updated: 2017-02-07T04:12:08+01:00
3+
124
*/
135

146

157
$GLOBALS['TL_LANG']['tl_metamodel_rendersetting']['tablemulti_hide_tablehead']['0'] = 'Tabellenkopf verbergen';
16-
$GLOBALS['TL_LANG']['tl_metamodel_rendersetting']['tablemulti_hide_tablehead']['1'] = 'Auswählen um den Tabellenkopf zu verbergen';
8+
$GLOBALS['TL_LANG']['tl_metamodel_rendersetting']['tablemulti_hide_tablehead']['1'] = 'Auswählen, um den Tabellenkopf zu verbergen.';
179

src/Resources/contao/languages/en/tl_metamodel_attribute.php

+3-5
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
/**
44
* This file is part of MetaModels/attribute_tablemulti.
55
*
6-
* (c) 2012-2016 The MetaModels team.
6+
* (c) 2012-2019 The MetaModels team.
77
*
88
* For the full copyright and license information, please view the LICENSE
99
* file that was distributed with this source code.
@@ -14,7 +14,8 @@
1414
* @subpackage AttributeTableMulti
1515
* @author David Maack <[email protected]>
1616
* @author Andreas Dziemba <[email protected]>
17-
* @copyright 2012-2018 The MetaModels team.
17+
* @author Ingolf Steinhardt <[email protected]>
18+
* @copyright 2012-2019 The MetaModels team.
1819
* @license https://github.com/MetaModels/attribute_tablemulti/blob/master/LICENSE LGPL-3.0-or-later
1920
* @filesource
2021
*/
@@ -23,6 +24,3 @@
2324
* Fields
2425
*/
2526
$GLOBALS['TL_LANG']['tl_metamodel_attribute']['typeOptions']['tablemulti'] = 'Multi table';
26-
$GLOBALS['TL_LANG']['tl_metamodel_attribute']['tablemulti_cols'] = array('Column config', '');
27-
$GLOBALS['TL_LANG']['tl_metamodel_attribute']['tablemulti_rowLabel'] = array('Label', 'Please enter ther labels for the columns');
28-
$GLOBALS['TL_LANG']['tl_metamodel_attribute']['tablemulti_rowStyle'] = array('Width', 'Please enter the width of the columns (e.g. 200px)');
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,10 @@
11
<?php
22
/**
3-
* Translations are managed using Transifex. To create a new translation
4-
* or to help to maintain an existing one, please register at transifex.com.
5-
*
6-
* @license http://www.gnu.org/licenses/lgpl-3.0.html LGPL
7-
*
8-
* @link https://www.transifex.com/signup/
9-
* @link https://www.transifex.com/projects/p/$$project$$/language/$$lang$$/
10-
*
11-
* last-updated: 2017-08-24T14:39:27+02:00
3+
124
*/
135

146

15-
$GLOBALS['TL_LANG']['tl_metamodel_attribute']['tablemulti_cols']['0'] = 'Veergude seadistamine';
16-
$GLOBALS['TL_LANG']['tl_metamodel_attribute']['tablemulti_rowLabel']['0'] = 'Silt';
17-
$GLOBALS['TL_LANG']['tl_metamodel_attribute']['tablemulti_rowStyle']['0'] = 'Laius';
18-
$GLOBALS['TL_LANG']['tl_metamodel_attribute']['typeOptions']['tablemulti'] = 'Multi tabel';
7+
$GLOBALS['TL_LANG']['tl_metamodel_attribute']['tablemulti_cols']['0'] = 'Veergude seadistamine';
8+
$GLOBALS['TL_LANG']['tl_metamodel_attribute']['tablemulti_rowLabel']['0'] = 'Silt';
9+
$GLOBALS['TL_LANG']['tl_metamodel_attribute']['tablemulti_rowStyle']['0'] = 'Laius';
1910

Original file line numberDiff line numberDiff line change
@@ -1,19 +1,12 @@
11
<?php
22
/**
3-
* Translations are managed using Transifex. To create a new translation
4-
* or to help to maintain an existing one, please register at transifex.com.
5-
*
6-
* @link http://help.transifex.com/intro/translating.html
7-
* @link https://www.transifex.com/projects/p/metamodels/language/fr/
8-
*
9-
* @license http://www.gnu.org/licenses/lgpl-3.0.html LGPL
10-
*
11-
* last-updated: 2013-06-24T12:11:54+02:00
3+
124
*/
135

14-
$GLOBALS['TL_LANG']['tl_metamodel_attribute']['tablemulti_cols']['0'] = 'Configuration des colonnes';
15-
$GLOBALS['TL_LANG']['tl_metamodel_attribute']['tablemulti_rowLabel']['0'] = 'Libellé';
16-
$GLOBALS['TL_LANG']['tl_metamodel_attribute']['tablemulti_rowLabel']['1'] = 'Saisir les libellés des colonnes';
17-
$GLOBALS['TL_LANG']['tl_metamodel_attribute']['tablemulti_rowStyle']['0'] = 'Largeur';
18-
$GLOBALS['TL_LANG']['tl_metamodel_attribute']['tablemulti_rowStyle']['1'] = 'Saisir les largeurs des colonnes (ex : 200px)';
19-
$GLOBALS['TL_LANG']['tl_metamodel_attribute']['typeOptions']['tablemulti'] = 'Table multi';
6+
7+
$GLOBALS['TL_LANG']['tl_metamodel_attribute']['tablemulti_cols']['0'] = 'Configuration des colonnes';
8+
$GLOBALS['TL_LANG']['tl_metamodel_attribute']['tablemulti_rowLabel']['0'] = 'Libellé';
9+
$GLOBALS['TL_LANG']['tl_metamodel_attribute']['tablemulti_rowLabel']['1'] = 'Saisir les libellés des colonnes';
10+
$GLOBALS['TL_LANG']['tl_metamodel_attribute']['tablemulti_rowStyle']['0'] = 'Largeur';
11+
$GLOBALS['TL_LANG']['tl_metamodel_attribute']['tablemulti_rowStyle']['1'] = 'Saisir les largeurs des colonnes (ex : 200px)';
12+
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,12 @@
11
<?php
22
/**
3-
* Translations are managed using Transifex. To create a new translation
4-
* or to help to maintain an existing one, please register at transifex.com.
5-
*
6-
* @link http://help.transifex.com/intro/translating.html
7-
* @link https://www.transifex.com/projects/p/metamodels/language/it/
8-
*
9-
* @license http://www.gnu.org/licenses/lgpl-3.0.html LGPL
10-
*
11-
* last-updated: 2013-07-02T12:17:48+02:00
3+
124
*/
135

14-
$GLOBALS['TL_LANG']['tl_metamodel_attribute']['tablemulti_cols']['0'] = 'Colonna configurazione';
15-
$GLOBALS['TL_LANG']['tl_metamodel_attribute']['tablemulti_rowLabel']['0'] = 'Etichetta';
16-
$GLOBALS['TL_LANG']['tl_metamodel_attribute']['tablemulti_rowLabel']['1'] = 'Inserire le etichette per le colonne';
17-
$GLOBALS['TL_LANG']['tl_metamodel_attribute']['tablemulti_rowStyle']['0'] = 'Larghezza';
18-
$GLOBALS['TL_LANG']['tl_metamodel_attribute']['tablemulti_rowStyle']['1'] = 'Inserire la larghezza delle colonne (es. 200px)';
19-
$GLOBALS['TL_LANG']['tl_metamodel_attribute']['typeOptions']['tablemulti'] = 'Tabella multi';
6+
7+
$GLOBALS['TL_LANG']['tl_metamodel_attribute']['tablemulti_cols']['0'] = 'Colonna configurazione';
8+
$GLOBALS['TL_LANG']['tl_metamodel_attribute']['tablemulti_rowLabel']['0'] = 'Etichetta';
9+
$GLOBALS['TL_LANG']['tl_metamodel_attribute']['tablemulti_rowLabel']['1'] = 'Inserire le etichette per le colonne';
10+
$GLOBALS['TL_LANG']['tl_metamodel_attribute']['tablemulti_rowStyle']['0'] = 'Larghezza';
11+
$GLOBALS['TL_LANG']['tl_metamodel_attribute']['tablemulti_rowStyle']['1'] = 'Inserire la larghezza delle colonne (es. 200px)';
12+
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,12 @@
11
<?php
22
/**
3-
* Translations are managed using Transifex. To create a new translation
4-
* or to help to maintain an existing one, please register at transifex.com.
5-
*
6-
* @link http://help.transifex.com/intro/translating.html
7-
* @link https://www.transifex.com/projects/p/metamodels/language/rm/
8-
*
9-
* @license http://www.gnu.org/licenses/lgpl-3.0.html LGPL
10-
*
11-
* last-updated: 2013-06-24T12:11:54+02:00
3+
124
*/
135

14-
$GLOBALS['TL_LANG']['tl_metamodel_attribute']['tablemulti_cols']['0'] = 'Configuraziun da las colonnas';
15-
$GLOBALS['TL_LANG']['tl_metamodel_attribute']['tablemulti_rowLabel']['0'] = 'Label';
16-
$GLOBALS['TL_LANG']['tl_metamodel_attribute']['tablemulti_rowLabel']['1'] = 'Endatescha ils labels per las colonnas';
17-
$GLOBALS['TL_LANG']['tl_metamodel_attribute']['tablemulti_rowStyle']['0'] = 'Ladezza';
18-
$GLOBALS['TL_LANG']['tl_metamodel_attribute']['tablemulti_rowStyle']['1'] = 'Endatescha la ladezza da las colonnas (p.ex. 200px)';
19-
$GLOBALS['TL_LANG']['tl_metamodel_attribute']['typeOptions']['tablemulti'] = 'Tabella da multi';
6+
7+
$GLOBALS['TL_LANG']['tl_metamodel_attribute']['tablemulti_cols']['0'] = 'Configuraziun da las colonnas';
8+
$GLOBALS['TL_LANG']['tl_metamodel_attribute']['tablemulti_rowLabel']['0'] = 'Label';
9+
$GLOBALS['TL_LANG']['tl_metamodel_attribute']['tablemulti_rowLabel']['1'] = 'Endatescha ils labels per las colonnas';
10+
$GLOBALS['TL_LANG']['tl_metamodel_attribute']['tablemulti_rowStyle']['0'] = 'Ladezza';
11+
$GLOBALS['TL_LANG']['tl_metamodel_attribute']['tablemulti_rowStyle']['1'] = 'Endatescha la ladezza da las colonnas (p.ex. 200px)';
12+
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,12 @@
11
<?php
22
/**
3-
* Translations are managed using Transifex. To create a new translation
4-
* or to help to maintain an existing one, please register at transifex.com.
5-
*
6-
* @link http://help.transifex.com/intro/translating.html
7-
* @link https://www.transifex.com/projects/p/metamodels/language/ru/
8-
*
9-
* @license http://www.gnu.org/licenses/lgpl-3.0.html LGPL
10-
*
11-
* last-updated: 2015-07-11T08:03:18+02:00
3+
124
*/
135

14-
$GLOBALS['TL_LANG']['tl_metamodel_attribute']['tablemulti_cols']['0'] = 'Конфигурация колонки';
15-
$GLOBALS['TL_LANG']['tl_metamodel_attribute']['tablemulti_rowLabel']['0'] = 'Метка';
16-
$GLOBALS['TL_LANG']['tl_metamodel_attribute']['tablemulti_rowLabel']['1'] = 'Введите метки для колонок';
17-
$GLOBALS['TL_LANG']['tl_metamodel_attribute']['tablemulti_rowStyle']['0'] = 'Ширина';
18-
$GLOBALS['TL_LANG']['tl_metamodel_attribute']['tablemulti_rowStyle']['1'] = 'Введите ширину колонок (наприм., 200px)';
19-
$GLOBALS['TL_LANG']['tl_metamodel_attribute']['typeOptions']['tablemulti'] = 'Многостоловые';
6+
7+
$GLOBALS['TL_LANG']['tl_metamodel_attribute']['tablemulti_cols']['0'] = 'Конфигурация колонки';
8+
$GLOBALS['TL_LANG']['tl_metamodel_attribute']['tablemulti_rowLabel']['0'] = 'Метка';
9+
$GLOBALS['TL_LANG']['tl_metamodel_attribute']['tablemulti_rowLabel']['1'] = 'Введите метки для колонок';
10+
$GLOBALS['TL_LANG']['tl_metamodel_attribute']['tablemulti_rowStyle']['0'] = 'Ширина';
11+
$GLOBALS['TL_LANG']['tl_metamodel_attribute']['tablemulti_rowStyle']['1'] = 'Введите ширину колонок (наприм., 200px)';
2012

Original file line numberDiff line numberDiff line change
@@ -1,16 +1,9 @@
11
<?php
22
/**
3-
* Translations are managed using Transifex. To create a new translation
4-
* or to help to maintain an existing one, please register at transifex.com.
5-
*
6-
* @license http://www.gnu.org/licenses/lgpl-3.0.html LGPL
7-
*
8-
* @link https://www.transifex.com/signup/
9-
* @link https://www.transifex.com/projects/p/$$project$$/language/$$lang$$/
10-
*
11-
* last-updated: 2017-08-24T14:39:30+02:00
3+
124
*/
135

146

7+
$GLOBALS['TL_LANG']['tl_metamodel_rendersetting']['tablemulti_hide_tablehead']['0'] = 'Скрыть заголовок';
158
$GLOBALS['TL_LANG']['tl_metamodel_rendersetting']['tablemulti_hide_tablehead']['1'] = 'Выберите, чтобы скрыть заголовок таблицы.';
169

Original file line numberDiff line numberDiff line change
@@ -1,21 +1,27 @@
1-
1+
<?php
2+
$config = $GLOBALS['TL_CONFIG']['metamodelsattribute_multi'][$this->attribute->getMetaModel()->getTableName()][$this->attribute->getColName()] ?? [];
3+
if (!is_array($config['columnFields'])) {
4+
$config['columnFields'] = [];
5+
}
6+
$columnNames = array_keys($config['columnFields']);
7+
?>
28
<table class="tablemulti<?php echo $this->additional_class; ?>">
3-
<?php $countCol = count($this->attribute->get('tablemulti_cols')); if (!$this->settings->get('tablemulti_hide_tablehead')) : ?>
4-
<thead>
9+
<?php $countCol = count($config['columnFields']); if (!$this->settings->get('tablemulti_hide_tablehead')) : ?>
10+
<thead>
511
<tr>
6-
<?php foreach (is_array($this->attribute->get('tablemulti_cols')) ? $this->attribute->get('tablemulti_cols'): array() as $headCol) : ?>
7-
<th><?= $headCol['rowLabel'] ?></th>
12+
<?php foreach ($config['columnFields'] as $headCol): ?>
13+
<th><?= $headCol['label'] ?></th>
814
<?php endforeach; ?>
915
</tr>
10-
</thead>
11-
<?php endif; ?>
16+
</thead>
17+
<?php endif; ?>
1218
<tbody>
1319
<?php foreach ((array) $this->raw as $k => $row) : ?>
14-
<tr class="<?= ($k % 2 == 0 ? 'odd' : 'even'); ?>">
15-
<?php for ($kk = 0; $kk < $countCol; $kk++) : ?>
16-
<td><?php $i = array_search($kk, array_column($row, 'col')); echo ($i !== false) ? $row[$i]['value'] : ''; ?></td>
17-
<?php endfor; ?>
18-
</tr>
20+
<tr class="<?= ($k % 2 == 0 ? 'odd' : 'even'); ?>">
21+
<?php foreach ($columnNames as $columnName): ?>
22+
<td><?php echo $row[$columnName]['value']; ?></td>
23+
<?php endforeach; ?>
24+
</tr>
1925
<?php endforeach; ?>
2026
</tbody>
2127
</table>

src/Resources/contao/templates/mm_attr_tablemulti.text

+14-9
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,15 @@
1-
<?php
2-
foreach ((array) $this->raw as $k => $row)
3-
{
4-
foreach (is_array($row) ? $row : array() as $kk => $col)
5-
{
6-
echo (($kk !=0) ? ' ': '' ).$col['value'];
7-
}
8-
if ($k != (count($this->raw['value']) -1)) echo "\n";
1+
<?php
2+
$config = $GLOBALS['TL_CONFIG']['metamodelsattribute_multi'][$this->attribute->getMetaModel()->getTableName()][$this->attribute->getColName()] ?? [];
3+
if (!is_array($config['columnFields'])) {
4+
$config['columnFields'] = [];
5+
}
6+
$columnNames = array_keys($config['columnFields']);
7+
$lastRow = (count($this->raw) - 1);
8+
foreach ((array) $this->raw as $k => $row) {
9+
foreach ($columnNames as $kk => $columnName) {
10+
echo $row[$columnName]['value'];
11+
}
12+
if ($k < $lastRow) {
13+
echo "\n";
14+
}
915
}
10-
?>
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,27 @@
1-
1+
<?php
2+
$config = $GLOBALS['TL_CONFIG']['metamodelsattribute_multi'][$this->attribute->getMetaModel()->getTableName()][$this->attribute->getColName()] ?? [];
3+
if (!is_array($config['columnFields'])) {
4+
$config['columnFields'] = [];
5+
}
6+
$columnNames = array_keys($config['columnFields']);
7+
?>
28
<table class="tablemulti<?php echo $this->additional_class; ?>">
3-
<?php $countCol = count($this->attribute->get('tablemulti_cols')); if (!$this->settings->get('tablemulti_hide_tablehead')) : ?>
9+
<?php $countCol = count($config['columnFields']); if (!$this->settings->get('tablemulti_hide_tablehead')) : ?>
410
<thead>
5-
<tr>
6-
<?php foreach (is_array($this->attribute->get('tablemulti_cols')) ? $this->attribute->get('tablemulti_cols'): array() as $countCol => $headCol) : ?>
7-
<th><?php echo $headCol['rowLabel'] ?></th>
8-
<?php endforeach; ?>
9-
</tr>
11+
<tr>
12+
<?php foreach ($config['columnFields'] as $headCol): ?>
13+
<th><?= $headCol['label'] ?></th>
14+
<?php endforeach; ?>
15+
</tr>
1016
</thead>
11-
<?php endif; ?>
17+
<?php endif; ?>
1218
<tbody>
13-
<?php foreach ((array) $this->raw as $k => $row) : ?>
14-
<tr class="<?= ($k % 2 == 0 ? 'odd' : 'even'); ?>">
15-
<?php for ($kk = 0; $kk < $countCol; $kk++) : ?>
16-
<td><?php $i = array_search($kk, array_column($row, 'col')); echo ($i !== false) ? $row[$i]['value'] : ' '; ?></td>
17-
<?php endfor; ?>
18-
</tr>
19+
<?php foreach ((array) $this->raw as $k => $row) : ?>
20+
<tr class="<?= ($k % 2 == 0 ? 'odd' : 'even'); ?>">
21+
<?php foreach ($columnNames as $columnName): ?>
22+
<td><?php echo $row[$columnName]['value']; ?></td>
1923
<?php endforeach; ?>
24+
</tr>
25+
<?php endforeach; ?>
2026
</tbody>
2127
</table>

0 commit comments

Comments
 (0)