lcollong
FabriKant d'applications web
Hi there,
I use a lot a Fabrik's nice feature which is to replace a value by an icon on the list view. It allows compact size list by reducing colum witdh and make it easy to watch for some data. Specially for those columns such as "status" for example where it's easier to have a "green check" instead of "reservation accepted" or a red cross instead of "reservation refused".
However, using non english language in these labels makes me crazy to find the way Fabrik build the image's name for replacement file.
For example, I have a radio button set this way :
And this what Fabrik expects for the filename icons replacement values :
Almost impossible to find out. Specially for the seconde one !
So I made a quick'n dirty mod on the file components/com_fabrik/models/element.php in the replaceWithIcons() function around line 683 :
This simple line shows the different name Fabrik is looking for when you add the ?fabrikdebug=1 magic parameter at the end of the url (no matter wheter fabrik debug is allowed or not).
It will be better to dedicated a general parameter to this feature and to insert the files names in place of the actual values inside the list but as it is, it changed my life !
Possible enhancement ?
Regards,
Laurent
I use a lot a Fabrik's nice feature which is to replace a value by an icon on the list view. It allows compact size list by reducing colum witdh and make it easy to watch for some data. Specially for those columns such as "status" for example where it's easier to have a "green check" instead of "reservation accepted" or a red cross instead of "reservation refused".
However, using non english language in these labels makes me crazy to find the way Fabrik build the image's name for replacement file.
For example, I have a radio button set this way :
And this what Fabrik expects for the filename icons replacement values :
Code:
Array
(
[0] => fabrik/non__pkg_extrieur
[1] => presence_vehicule_non__pkg_extrieur
[2] => non__pkg_extrieur
)
Array
(
[0] => fabrik/oui___accs_foru
[1] => presence_vehicule_oui___accs_foru
[2] => oui___accs_foru
)
Almost impossible to find out. Specially for the seconde one !
So I made a quick'n dirty mod on the file components/com_fabrik/models/element.php in the replaceWithIcons() function around line 683 :
Code:
if ($iconSubDir != '')
{
$iconSubDir = rtrim($iconSubDir, '/') . '/';
$iconSubDir = ltrim($iconSubDir, '/');
array_unshift($cleanDatas, $iconSubDir . $cleanData); //search subdir first
}
// apchea
if (\FabrikHelperHTML::isDebug()) { echo "<pre>";print_r($cleanDatas);echo "</pre>";}
// /apchea
foreach ($cleanDatas as $cleanData)
{
This simple line shows the different name Fabrik is looking for when you add the ?fabrikdebug=1 magic parameter at the end of the url (no matter wheter fabrik debug is allowed or not).
It will be better to dedicated a general parameter to this feature and to insert the files names in place of the actual values inside the list but as it is, it changed my life !
Possible enhancement ?
Regards,
Laurent