Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

#1523 [IHM] add: use picto in tabmenu on phone #1528

Merged
merged 1 commit into from
Sep 13, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 7 additions & 7 deletions lib/digiquali.lib.php
Original file line number Diff line number Diff line change
Expand Up @@ -39,37 +39,37 @@ function digiquali_admin_prepare_head(): array
$head = [];

$head[$h][0] = dol_buildpath('/digiquali/admin/question.php', 1);
$head[$h][1] = '<i class="fas fa-question pictofixedwidth"></i>' . $langs->trans('Question');
$head[$h][1] = $conf->browser->layout != 'phone' ? '<i class="fas fa-question pictofixedwidth"></i>' . $langs->trans('Question') : '<i class="fas fa-question"></i>';
$head[$h][2] = 'question';
$h++;

$head[$h][0] = dol_buildpath('/saturne/admin/object.php', 1) . '?module_name=DigiQuali&object_type=answer';
$head[$h][1] = '<i class="fas fa-arrow-right pictofixedwidth"></i>' . $langs->trans('Answer');
$head[$h][1] = $conf->browser->layout != 'phone' ? '<i class="fas fa-arrow-right pictofixedwidth"></i>' . $langs->trans('Answer') : '<i class="fas fa-arrow-right"></i>';
$head[$h][2] = 'answer';
$h++;

$head[$h][0] = dol_buildpath('/digiquali/admin/sheet.php', 1);
$head[$h][1] = '<i class="fas fa-list pictofixedwidth"></i>' . $langs->trans('Sheet');
$head[$h][1] = $conf->browser->layout != 'phone' ? '<i class="fas fa-list pictofixedwidth"></i>' . $langs->trans('Sheet') : '<i class="fas fa-list"></i>';
$head[$h][2] = 'sheet';
$h++;

$head[$h][0] = dol_buildpath('/digiquali/admin/control.php', 1);
$head[$h][1] = '<i class="fas fa-tasks pictofixedwidth"></i>' . $langs->trans('Control');
$head[$h][1] = $conf->browser->layout != 'phone' ? '<i class="fas fa-tasks pictofixedwidth"></i>' . $langs->trans('Control') : '<i class="fas fa-tasks"></i>';
$head[$h][2] = 'control';
$h++;

$head[$h][0] = dol_buildpath('/saturne/admin/documents.php?module_name=DigiQuali', 1);
$head[$h][1] = '<i class="fas fa-file-alt"></i> ' . $langs->trans('YourDocuments');
$head[$h][1] = $conf->browser->layout != 'phone' ? '<i class="fas fa-file-alt pictofixedwidth"></i>' . $langs->trans('YourDocuments') : '<i class="fas fa-file-alt"></i>';
$head[$h][2] = 'documents';
$h++;

$head[$h][0] = dol_buildpath('/digiquali/admin/setup.php', 1);
$head[$h][1] = '<i class="fas fa-cog pictofixedwidth"></i>' . $langs->trans('ModuleSettings');
$head[$h][1] = $conf->browser->layout != 'phone' ? '<i class="fas fa-cog pictofixedwidth"></i>' . $langs->trans('ModuleSettings') : '<i class="fas fa-cog"></i>';
$head[$h][2] = 'settings';
$h++;

$head[$h][0] = dol_buildpath('/saturne/admin/about.php?module_name=DigiQuali', 1);
$head[$h][1] = '<i class="fab fa-readme pictofixedwidth"></i>' . $langs->trans('About');
$head[$h][1] = $conf->browser->layout != 'phone' ? '<i class="fab fa-readme pictofixedwidth"></i>' . $langs->trans('About') : '<i class="fab fa-readme"></i>';
$head[$h][2] = 'about';
$h++;

Expand Down
11 changes: 6 additions & 5 deletions lib/digiquali_control.lib.php
Original file line number Diff line number Diff line change
Expand Up @@ -34,10 +34,10 @@
function control_prepare_head(Control $object): array
{
// Global variables definitions.
global $db, $langs;
global $conf, $db, $langs;

$head[1][0] = dol_buildpath('/digiquali/view/control/control_medias.php', 1) . '?id=' . $object->id;
$head[1][1] = '<i class="fas fa-file-image pictofixedwidth"></i>' . $langs->trans('Medias');
$head[1][1] = $conf->browser->layout != 'phone' ? '<i class="fas fa-file-image pictofixedwidth"></i>' . $langs->trans('Medias') : '<i class="fas fa-file-image"></i>';
$head[1][2] = 'medias';

// Initialize technical objects
Expand All @@ -50,9 +50,10 @@ function control_prepare_head(Control $object): array
$nbEquipment = 0;
}

$head[2][0] = dol_buildpath('/digiquali/view/control/control_equipment.php', 1) . '?id=' . $object->id;
$head[2][1] = '<i class="fas fa-toolbox pictofixedwidth"></i>' . $langs->trans('ControlEquipment') . '<span class="badge marginleftonlyshort">' . $nbEquipment . '</span>';
$head[2][2] = 'equipment';
$head[2][0] = dol_buildpath('/digiquali/view/control/control_equipment.php', 1) . '?id=' . $object->id;
$head[2][1] = $conf->browser->layout != 'phone' ? '<i class="fas fa-toolbox pictofixedwidth"></i>' . $langs->trans('ControlEquipment') : '<i class="fas fa-toolbox"></i>';
$head[2][1] .= '<span class="badge marginleftonlyshort">' . $nbEquipment . '</span>';
$head[2][2] = 'equipment';

$moreparam['documentType'] = 'ControlDocument';
$moreparam['attendantTableMode'] = 'simple';
Expand Down
9 changes: 5 additions & 4 deletions lib/digiquali_sheet.lib.php
Original file line number Diff line number Diff line change
Expand Up @@ -33,11 +33,12 @@
*/
function sheet_prepare_head(Sheet $object): array
{
global $langs;
// Global variables definitions
global $conf, $langs;

$head[100][0] = dol_buildpath('/digiquali/view/sheet/sheet_export.php', 1) . '?id=' . $object->id;
$head[100][1] = '<i class="fas fa-file-export pictofixedwidth"></i>' . $langs->trans('Export');
$head[100][2] = 'export';
$head[2][0] = dol_buildpath('/digiquali/view/sheet/sheet_export.php', 1) . '?id=' . $object->id;
$head[2][1] = $conf->browser->layout != 'phone' ? '<i class="fas fa-file-export pictofixedwidth"></i>' . $langs->trans('Export') : '<i class="fas fa-file-export"></i>';
$head[2][2] = 'export';

return saturne_object_prepare_head($object, $head);
}
Expand Down