mirror of
https://github.com/Dolibarr/dolibarr.git
synced 2025-12-23 09:51:33 +01:00
Add class reposition on button that switch the view mode
This commit is contained in:
@@ -8239,7 +8239,7 @@ function dolGetButtonAction($label, $html = '', $actionType = 'default', $url =
|
|||||||
*
|
*
|
||||||
* @param string $label label of button
|
* @param string $label label of button
|
||||||
* @param string $helpText optional : content for help tooltip
|
* @param string $helpText optional : content for help tooltip
|
||||||
* @param string $iconClass class for icon element
|
* @param string $iconClass class for icon element (Example: 'fa fa-file')
|
||||||
* @param string $url the url for link
|
* @param string $url the url for link
|
||||||
* @param string $id attribute id of button
|
* @param string $id attribute id of button
|
||||||
* @param int $status 0 no user rights, 1 active, -1 Feature Disabled, -2 disable Other reason use helpText as tooltip
|
* @param int $status 0 no user rights, 1 active, -1 Feature Disabled, -2 disable Other reason use helpText as tooltip
|
||||||
@@ -8255,12 +8255,12 @@ function dolGetButtonTitle($label, $helpText = '', $iconClass = 'fa fa-file', $u
|
|||||||
return '';
|
return '';
|
||||||
}
|
}
|
||||||
|
|
||||||
$class = 'btnTitle' ;
|
$class = 'btnTitle';
|
||||||
|
|
||||||
// hidden conf keep during button transition TODO: remove this block
|
// hidden conf keep during button transition TODO: remove this block
|
||||||
if(empty($conf->global->MAIN_USE_NEW_TITLE_BUTTON)){
|
if (empty($conf->global->MAIN_USE_NEW_TITLE_BUTTON)) {
|
||||||
$class = 'butActionNew';
|
$class = 'butActionNew';
|
||||||
}
|
}
|
||||||
|
if (! empty($params['morecss'])) $class.=' '.$params['morecss'];
|
||||||
|
|
||||||
$attr=array(
|
$attr=array(
|
||||||
'class' => $class
|
'class' => $class
|
||||||
@@ -8326,9 +8326,9 @@ function dolGetButtonTitle($label, $helpText = '', $iconClass = 'fa fa-file', $u
|
|||||||
$TCompiledAttr[] = $key.'="'.$value.'"';
|
$TCompiledAttr[] = $key.'="'.$value.'"';
|
||||||
}
|
}
|
||||||
|
|
||||||
$compiledAttributes = !empty($TCompiledAttr)?implode(' ', $TCompiledAttr):'';
|
$compiledAttributes = (empty($TCompiledAttr) ? '' : implode(' ', $TCompiledAttr));
|
||||||
|
|
||||||
$tag = !empty($attr['href'])?'a':'span';
|
$tag = (empty($attr['href']) ? 'span' : 'a');
|
||||||
|
|
||||||
|
|
||||||
$button ='<'.$tag.' '.$compiledAttributes.' >';
|
$button ='<'.$tag.' '.$compiledAttributes.' >';
|
||||||
|
|||||||
@@ -205,7 +205,7 @@ function print_eldy_menu($db, $atarget, $type_user, &$tabMenu, &$menu, $noout =
|
|||||||
'link' => '/projet/index.php?mainmenu=project&leftmenu=',
|
'link' => '/projet/index.php?mainmenu=project&leftmenu=',
|
||||||
'title' => (empty($conf->global->PROJECT_USE_OPPORTUNITIES) || $conf->global->PROJECT_USE_OPPORTUNITIES == 2 )
|
'title' => (empty($conf->global->PROJECT_USE_OPPORTUNITIES) || $conf->global->PROJECT_USE_OPPORTUNITIES == 2 )
|
||||||
? (($conf->global->PROJECT_USE_OPPORTUNITIES == 2)?"Leads":"Projects")
|
? (($conf->global->PROJECT_USE_OPPORTUNITIES == 2)?"Leads":"Projects")
|
||||||
: "LeadsOrProjects",
|
: "Projects",
|
||||||
'level' => 0,
|
'level' => 0,
|
||||||
'enabled' => $showmode = isVisibleToUserType($type_user, $tmpentry, $listofmodulesforexternal),
|
'enabled' => $showmode = isVisibleToUserType($type_user, $tmpentry, $listofmodulesforexternal),
|
||||||
'target' => $atarget,
|
'target' => $atarget,
|
||||||
|
|||||||
@@ -201,6 +201,14 @@ if (($id > 0 && is_numeric($id)) || ! empty($ref))
|
|||||||
print nl2br($object->description);
|
print nl2br($object->description);
|
||||||
print '</td></tr>';
|
print '</td></tr>';
|
||||||
|
|
||||||
|
// Bill time
|
||||||
|
if (empty($conf->global->PROJECT_HIDE_TASKS) && ! empty($conf->global->PROJECT_BILL_TIME_SPENT))
|
||||||
|
{
|
||||||
|
print '<tr><td>'.$langs->trans("BillTime").'</td><td>';
|
||||||
|
print yn($object->usage_bill_time);
|
||||||
|
print '</td></tr>';
|
||||||
|
}
|
||||||
|
|
||||||
// Categories
|
// Categories
|
||||||
if($conf->categorie->enabled) {
|
if($conf->categorie->enabled) {
|
||||||
print '<tr><td class="valignmiddle">'.$langs->trans("Categories").'</td><td>';
|
print '<tr><td class="valignmiddle">'.$langs->trans("Categories").'</td><td>';
|
||||||
@@ -234,7 +242,7 @@ if ($user->rights->projet->all->creer || $user->rights->projet->creer) {
|
|||||||
|
|
||||||
$linktocreatetask = dolGetButtonTitle($langs->trans('AddTask'), '', 'fa fa-plus-circle paddingleft', DOL_URL_ROOT.'/projet/tasks.php?id='.$object->id.'&action=create'.$param.'&backtopage='.urlencode($_SERVER['PHP_SELF'].'?id='.$object->id), '', $linktocreatetaskUserRight, $linktocreatetaskParam);
|
$linktocreatetask = dolGetButtonTitle($langs->trans('AddTask'), '', 'fa fa-plus-circle paddingleft', DOL_URL_ROOT.'/projet/tasks.php?id='.$object->id.'&action=create'.$param.'&backtopage='.urlencode($_SERVER['PHP_SELF'].'?id='.$object->id), '', $linktocreatetaskUserRight, $linktocreatetaskParam);
|
||||||
|
|
||||||
$linktolist = dolGetButtonTitle($langs->trans('GoToListOfTasks'), '', 'fa fa-list-alt paddingleft imgforviewmode', DOL_URL_ROOT.'/projet/tasks.php?id='.$object->id);
|
$linktolist = dolGetButtonTitle($langs->trans('GoToListOfTasks'), '', 'fa fa-list-alt paddingleft imgforviewmode', DOL_URL_ROOT.'/projet/tasks.php?id='.$object->id, '', 1, array('morecss'=>'reposition'));
|
||||||
|
|
||||||
//print_barre_liste($title, 0, $_SERVER["PHP_SELF"], '', $sortfield, $sortorder, $linktotasks, $num, $totalnboflines, 'generic', 0, '', '', 0, 1);
|
//print_barre_liste($title, 0, $_SERVER["PHP_SELF"], '', $sortfield, $sortorder, $linktotasks, $num, $totalnboflines, 'generic', 0, '', '', 0, 1);
|
||||||
print load_fiche_titre($title, $linktolist.' '.$linktocreatetask, 'generic');
|
print load_fiche_titre($title, $linktolist.' '.$linktocreatetask, 'generic');
|
||||||
|
|||||||
@@ -669,7 +669,7 @@ elseif ($id > 0 || ! empty($ref))
|
|||||||
print '<input type="hidden" name="contextpage" value="'.$contextpage.'">';
|
print '<input type="hidden" name="contextpage" value="'.$contextpage.'">';
|
||||||
|
|
||||||
$title=$langs->trans("ListOfTasks");
|
$title=$langs->trans("ListOfTasks");
|
||||||
$linktotasks = dolGetButtonTitle($langs->trans('GoToGanttView'), '', 'fa fa-stream paddingleft imgforviewmode', DOL_URL_ROOT.'/projet/ganttview.php?id='.$object->id.'&withproject=1');
|
$linktotasks = dolGetButtonTitle($langs->trans('GoToGanttView'), '', 'fa fa-stream paddingleft imgforviewmode', DOL_URL_ROOT.'/projet/ganttview.php?id='.$object->id.'&withproject=1', '', 1, array('morecss'=>'reposition'));
|
||||||
|
|
||||||
//print_barre_liste($title, 0, $_SERVER["PHP_SELF"], '', $sortfield, $sortorder, $linktotasks, $num, $totalnboflines, 'generic', 0, '', '', 0, 1);
|
//print_barre_liste($title, 0, $_SERVER["PHP_SELF"], '', $sortfield, $sortorder, $linktotasks, $num, $totalnboflines, 'generic', 0, '', '', 0, 1);
|
||||||
print load_fiche_titre($title, $linktotasks.' '.$linktocreatetask, 'generic');
|
print load_fiche_titre($title, $linktotasks.' '.$linktocreatetask, 'generic');
|
||||||
|
|||||||
Reference in New Issue
Block a user