Skip to content

Commit

Permalink
#213 [Mod] add: rework menu for generic look
Browse files Browse the repository at this point in the history
  • Loading branch information
nicolas-eoxia committed Feb 21, 2023
1 parent a94bf64 commit 7c0fef6
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 52 deletions.
57 changes: 6 additions & 51 deletions core/modules/modDoliMeet.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -407,8 +407,8 @@ public function __construct($db)
$this->menu[$r++] = [
'fk_menu' => 'fk_mainmenu=dolimeet',
'type' => 'left',
'titre' => $langs->trans('MeetingList'),
'prefix' => '<i class="fas fa-list pictofixedwidth"></i>',
'titre' => $langs->trans('Meeting'),
'prefix' => '<i class="fas fa-comments pictofixedwidth"></i>',
'mainmenu' => 'dolimeet',
'leftmenu' => 'meeting_list',
'url' => '/dolimeet/view/session/session_list.php?object_type=meeting',
Expand All @@ -420,21 +420,6 @@ public function __construct($db)
'user' => 2,
];

$this->menu[$r++] = [
'fk_menu' => 'fk_mainmenu=dolimeet,fk_leftmenu=meeting_list',
'type' => 'left',
'titre' => '<i class="fas fa-comments pictofixedwidth" style="padding-right: 4px;"></i>' . $langs->trans('MeetingCreate'),
'mainmenu' => 'dolimeet',
'leftmenu' => 'meeting_card',
'url' => '/dolimeet/view/session/session_card.php?action=create&object_type=meeting',
'langs' => 'dolimeet@dolimeet',
'position' => 1000 + $r,
'enabled' => '$conf->dolimeet->enabled && $conf->global->DOLIMEET_MEETING_MENU_ENABLED',
'perms' => '$user->rights->dolimeet->meeting->write',
'target' => '',
'user' => 0,
];

$this->menu[$r++] = [
'fk_menu' => 'fk_mainmenu=dolimeet,fk_leftmenu=meeting_list',
'type' => 'left',
Expand All @@ -453,8 +438,8 @@ public function __construct($db)
$this->menu[$r++] = [
'fk_menu' => 'fk_mainmenu=dolimeet',
'type' => 'left',
'titre' => $langs->trans('TrainingSessionList'),
'prefix' => '<i class="fas fa-list pictofixedwidth"></i>',
'titre' => $langs->trans('TrainingSession'),
'prefix' => '<i class="fas fa-people-arrows pictofixedwidth"></i>',
'mainmenu' => 'dolimeet',
'leftmenu' => 'trainingsession_list',
'url' => '/dolimeet/view/session/session_list.php?object_type=trainingsession',
Expand All @@ -466,21 +451,6 @@ public function __construct($db)
'user' => 2,
];

$this->menu[$r++] = [
'fk_menu' => 'fk_mainmenu=dolimeet,fk_leftmenu=trainingsession_list',
'type' => 'left',
'titre' => '<i class="fas fa-people-arrows pictofixedwidth" style="padding-right: 4px;"></i>' . $langs->trans('TrainingSessionCreate'),
'mainmenu' => 'dolimeet',
'leftmenu' => 'trainingsession_card',
'url' => '/dolimeet/view/session/session_card.php?action=create&object_type=trainingsession',
'langs' => 'dolimeet@dolimeet',
'position' => 1000 + $r,
'enabled' => '$conf->dolimeet->enabled && $conf->global->DOLIMEET_TRAININGSESSION_MENU_ENABLED',
'perms' => '$user->rights->dolimeet->trainingsession->write',
'target' => '',
'user' => 0,
];

$this->menu[$r++] = [
'fk_menu' => 'fk_mainmenu=dolimeet,fk_leftmenu=trainingsession_list',
'type' => 'left',
Expand All @@ -499,8 +469,8 @@ public function __construct($db)
$this->menu[$r++] = [
'fk_menu' => 'fk_mainmenu=dolimeet',
'type' => 'left',
'titre' => $langs->trans('AuditList'),
'prefix' => '<i class="fas fa-list pictofixedwidth"></i>',
'titre' => $langs->trans('AuditReport'),
'prefix' => '<i class="fas fa-tasks pictofixedwidth"></i>',
'mainmenu' => 'dolimeet',
'leftmenu' => 'audit_list',
'url' => '/dolimeet/view/session/session_list.php?object_type=audit',
Expand All @@ -512,21 +482,6 @@ public function __construct($db)
'user' => 2,
];

$this->menu[$r++] = [
'fk_menu' => 'fk_mainmenu=dolimeet,fk_leftmenu=audit_list',
'type' => 'left',
'titre' => '<i class="fas fa-tasks pictofixedwidth" style="padding-right: 4px;"></i>' . $langs->trans('AuditCreate'),
'mainmenu' => 'dolimeet',
'leftmenu' => 'audit_card',
'url' => '/dolimeet/view/session/session_card.php?action=create&object_type=audit',
'langs' => 'dolimeet@dolimeet',
'position' => 1000 + $r,
'enabled' => '$conf->dolimeet->enabled && $conf->global->DOLIMEET_AUDIT_MENU_ENABLED',
'perms' => '$user->rights->dolimeet->audit->write',
'target' => '',
'user' => 0,
];

$this->menu[$r++] = [
'fk_menu' => 'fk_mainmenu=dolimeet,fk_leftmenu=audit_list',
'type' => 'left',
Expand Down
1 change: 1 addition & 0 deletions langs/en_US/dolimeet.lang
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,7 @@ completioncertificatedocument.odt = Certificate of completion

# Data
Audit = Audit
AuditReport = Audit
Audits = audits
TheAudit = the audit
AuditList = List of audits
Expand Down
1 change: 1 addition & 0 deletions langs/fr_FR/dolimeet.lang
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,7 @@ completioncertificatedocument.odt = Certificat de réalisation

# Data - Donnée
Audit = Audit
AuditReport = Audit
Audits = audits
TheAudit = l'audit
AuditList = Liste des audits
Expand Down
2 changes: 1 addition & 1 deletion view/session/session_list.php
Original file line number Diff line number Diff line change
Expand Up @@ -529,7 +529,7 @@
$newcardbutton .= dolGetButtonTitle($langs->trans('ViewKanban'), '', 'fa fa-th-list imgforviewmode', $_SERVER['PHP_SELF'] . '?mode=kanban' . preg_replace('/(&|\?)*mode=[^&]+/', '', $param), '', ($mode == 'kanban' ? 2 : 1), ['morecss'=>'reposition']);
$newcardbutton .= dolGetButtonTitleSeparator();
if ($objectType != 'session') {
$newcardbutton .= dolGetButtonTitle($langs->trans('New'), '', 'fa fa-plus-circle', dol_buildpath('/dolimeet/view/session/session_card.php', 1) . '?action=create' . $fromurl . '&object_type=' . $objectType . '&backtopage=' . urlencode($_SERVER['REQUEST_URI']), '', $permissiontoadd);
$newcardbutton .= dolGetButtonTitle($langs->trans('New'), '', 'fa fa-plus-circle', dol_buildpath('/dolimeet/view/session/session_card.php', 1) . '?action=create' . $fromurl . '&object_type=' . $objectType, '', $permissiontoadd);
}

print_barre_liste($title, $page, $_SERVER['PHP_SELF'], $param, $sortfield, $sortorder, $massactionbutton, $num, $nbtotalofrecords, 'object_' . $object->picto, 0, $newcardbutton, '', $limit, 0, 0, 1);
Expand Down

0 comments on commit 7c0fef6

Please sign in to comment.