2
0
forked from Wavyzz/dolibarr

Merge pull request #23473 from lamrani002/kanbanForTaskActivity

NEW KanbanView for list of task/Activity
This commit is contained in:
Laurent Destailleur
2023-01-11 20:57:42 +01:00
committed by GitHub
2 changed files with 47 additions and 1 deletions

View File

@@ -580,6 +580,9 @@ llxHeader('', $title, $help_url);
$arrayofselected = is_array($toselect) ? $toselect : array();
$param = '';
if (!empty($mode)) {
$param .= '&mode='.urlencode($mode);
}
if (!empty($contextpage) && $contextpage != $_SERVER["PHP_SELF"]) {
$param .= '&contextpage='.urlencode($contextpage);
}
@@ -697,7 +700,11 @@ if (GETPOST('nomassaction', 'int') || in_array($massaction, array('presend', 'pr
}
$massactionbutton = $form->selectMassAction('', $arrayofmassactions);
$newcardbutton = dolGetButtonTitle($langs->trans('NewTask'), '', 'fa fa-plus-circle', DOL_URL_ROOT.'/projet/tasks.php?action=create', '', $user->rights->projet->creer);
$newcardbutton = '';
$newcardbutton .= dolGetButtonTitle($langs->trans('ViewList'), '', 'fa fa-bars imgforviewmode', $_SERVER["PHP_SELF"].'?mode=common'.preg_replace('/(&|\?)*mode=[^&]+/', '', $param), '', ((empty($mode) || $mode == 'common') ? 2 : 1), array('morecss'=>'reposition'));
$newcardbutton .= dolGetButtonTitle($langs->trans('ViewKanban'), '', 'fa fa-th-list imgforviewmode', $_SERVER["PHP_SELF"].'?mode=kanban'.preg_replace('/(&|\?)*mode=[^&]+/', '', $param), '', ($mode == 'kanban' ? 2 : 1), array('morecss'=>'reposition'));
$newcardbutton .= dolGetButtonTitle($langs->trans('NewTask'), '', 'fa fa-plus-circle', DOL_URL_ROOT.'/projet/tasks.php?action=create', '', $user->rights->projet->creer);
print '<form method="POST" id="searchFormList" action="'.$_SERVER["PHP_SELF"].'">'."\n";
if ($optioncss != '') {
@@ -712,6 +719,8 @@ if (!empty($type)) {
print '<input type="hidden" name="type" value="'.$type.'">';
}
print '<input type="hidden" name="contextpage" value="'.$contextpage.'">';
print '<input type="hidden" name="mode" value="'.$mode.'">';
// Show description of content
$texthelp = '';
@@ -1121,6 +1130,8 @@ while ($i < $imaxinloop) {
print '<div class="box-flex-container">';
}
// Output Kanban
$object->fk_statut = $projectstatic->getLibStatut(1);
$object->fk_project = $projectstatic->getNomUrl(1, 'task');
print $object->getKanbanView('');
if ($i == ($imaxinloop - 1)) {
print '</div>';