Fix navigation on projects
This commit is contained in:
parent
8ec1784e41
commit
4047de82bd
@ -5658,10 +5658,15 @@ class Form
|
|||||||
//print "paramid=$paramid,morehtml=$morehtml,shownav=$shownav,$fieldid,$fieldref,$morehtmlref,$moreparam";
|
//print "paramid=$paramid,morehtml=$morehtml,shownav=$shownav,$fieldid,$fieldref,$morehtmlref,$moreparam";
|
||||||
$object->load_previous_next_ref((isset($object->next_prev_filter)?$object->next_prev_filter:''),$fieldid,$nodbprefix);
|
$object->load_previous_next_ref((isset($object->next_prev_filter)?$object->next_prev_filter:''),$fieldid,$nodbprefix);
|
||||||
|
|
||||||
//$previous_ref = $object->ref_previous?'<a data-role="button" data-icon="arrow-l" data-iconpos="left" href="'.$_SERVER["PHP_SELF"].'?'.$paramid.'='.urlencode($object->ref_previous).$moreparam.'">'.(empty($conf->dol_use_jmobile)?img_picto($langs->trans("Previous"),'previous.png'):' ').'</a>':'';
|
$navurl = $_SERVER["PHP_SELF"];
|
||||||
//$next_ref = $object->ref_next?'<a data-role="button" data-icon="arrow-r" data-iconpos="right" href="'.$_SERVER["PHP_SELF"].'?'.$paramid.'='.urlencode($object->ref_next).$moreparam.'">'.(empty($conf->dol_use_jmobile)?img_picto($langs->trans("Next"),'next.png'):' ').'</a>':'';
|
// Special case for project/task page
|
||||||
$previous_ref = $object->ref_previous?'<a data-role="button" data-icon="arrow-l" data-iconpos="left" href="'.$_SERVER["PHP_SELF"].'?'.$paramid.'='.urlencode($object->ref_previous).$moreparam.'">'.(($conf->dol_use_jmobile != 4)?'<':' ').'</a>':'<span class="inactive">'.(($conf->dol_use_jmobile != 4)?'<':' ').'</span>';
|
if ($paramid == 'project_ref')
|
||||||
$next_ref = $object->ref_next?'<a data-role="button" data-icon="arrow-r" data-iconpos="right" href="'.$_SERVER["PHP_SELF"].'?'.$paramid.'='.urlencode($object->ref_next).$moreparam.'">'.(($conf->dol_use_jmobile != 4)?'>':' ').'</a>':'<span class="inactive">'.(($conf->dol_use_jmobile != 4)?'>':' ').'</span>';
|
{
|
||||||
|
$navurl = preg_replace('/\/tasks\/(task|contact|time|note|document).php/','/tasks.php',$navurl);
|
||||||
|
$paramid='ref';
|
||||||
|
}
|
||||||
|
$previous_ref = $object->ref_previous?'<a data-role="button" data-icon="arrow-l" data-iconpos="left" href="'.$navurl.'?'.$paramid.'='.urlencode($object->ref_previous).$moreparam.'">'.(($conf->dol_use_jmobile != 4)?'<':' ').'</a>':'<span class="inactive">'.(($conf->dol_use_jmobile != 4)?'<':' ').'</span>';
|
||||||
|
$next_ref = $object->ref_next?'<a data-role="button" data-icon="arrow-r" data-iconpos="right" href="'.$navurl.'?'.$paramid.'='.urlencode($object->ref_next).$moreparam.'">'.(($conf->dol_use_jmobile != 4)?'>':' ').'</a>':'<span class="inactive">'.(($conf->dol_use_jmobile != 4)?'>':' ').'</span>';
|
||||||
|
|
||||||
//print "xx".$previous_ref."x".$next_ref;
|
//print "xx".$previous_ref."x".$next_ref;
|
||||||
$ret.='<!-- Start banner content --><div style="vertical-align: middle">';
|
$ret.='<!-- Start banner content --><div style="vertical-align: middle">';
|
||||||
|
|||||||
@ -1091,7 +1091,6 @@ function dol_add_file_process($upload_dir, $allowoverwrite=0, $donotupdatesessio
|
|||||||
|
|
||||||
}
|
}
|
||||||
} elseif ($link) {
|
} elseif ($link) {
|
||||||
if (dol_mkdir($upload_dir) >= 0) {
|
|
||||||
require_once DOL_DOCUMENT_ROOT . '/core/class/link.class.php';
|
require_once DOL_DOCUMENT_ROOT . '/core/class/link.class.php';
|
||||||
$linkObject = new Link($db);
|
$linkObject = new Link($db);
|
||||||
$linkObject->entity = $conf->entity;
|
$linkObject->entity = $conf->entity;
|
||||||
@ -1107,7 +1106,6 @@ function dol_add_file_process($upload_dir, $allowoverwrite=0, $donotupdatesessio
|
|||||||
setEventMessages($langs->trans("ErrorFileNotLinked"), null, 'errors');
|
setEventMessages($langs->trans("ErrorFileNotLinked"), null, 'errors');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
$langs->load("errors");
|
$langs->load("errors");
|
||||||
|
|||||||
@ -212,7 +212,7 @@ if ($id > 0 || ! empty($ref))
|
|||||||
$projectstatic->next_prev_filter=" rowid in (".(count($objectsListId)?join(',',array_keys($objectsListId)):'0').")";
|
$projectstatic->next_prev_filter=" rowid in (".(count($objectsListId)?join(',',array_keys($objectsListId)):'0').")";
|
||||||
}
|
}
|
||||||
|
|
||||||
dol_banner_tab($projectstatic, 'ref', $linkback, 1, 'ref', 'ref', $morehtmlref);
|
dol_banner_tab($projectstatic, 'project_ref', $linkback, 1, 'ref', 'ref', $morehtmlref);
|
||||||
|
|
||||||
print '<div class="fichecenter">';
|
print '<div class="fichecenter">';
|
||||||
print '<div class="fichehalfleft">';
|
print '<div class="fichehalfleft">';
|
||||||
|
|||||||
@ -155,7 +155,7 @@ if ($object->id > 0)
|
|||||||
$projectstatic->next_prev_filter=" rowid in (".(count($objectsListId)?join(',',array_keys($objectsListId)):'0').")";
|
$projectstatic->next_prev_filter=" rowid in (".(count($objectsListId)?join(',',array_keys($objectsListId)):'0').")";
|
||||||
}
|
}
|
||||||
|
|
||||||
dol_banner_tab($projectstatic, 'ref', $linkback, 1, 'ref', 'ref', $morehtmlref);
|
dol_banner_tab($projectstatic, 'project_ref', $linkback, 1, 'ref', 'ref', $morehtmlref);
|
||||||
|
|
||||||
print '<div class="fichecenter">';
|
print '<div class="fichecenter">';
|
||||||
print '<div class="fichehalfleft">';
|
print '<div class="fichehalfleft">';
|
||||||
|
|||||||
@ -134,7 +134,7 @@ if ($object->id > 0)
|
|||||||
$projectstatic->next_prev_filter=" rowid in (".(count($objectsListId)?join(',',array_keys($objectsListId)):'0').")";
|
$projectstatic->next_prev_filter=" rowid in (".(count($objectsListId)?join(',',array_keys($objectsListId)):'0').")";
|
||||||
}
|
}
|
||||||
|
|
||||||
dol_banner_tab($projectstatic, 'ref', $linkback, 1, 'ref', 'ref', $morehtmlref);
|
dol_banner_tab($projectstatic, 'project_ref', $linkback, 1, 'ref', 'ref', $morehtmlref);
|
||||||
|
|
||||||
print '<div class="fichecenter">';
|
print '<div class="fichecenter">';
|
||||||
print '<div class="fichehalfleft">';
|
print '<div class="fichehalfleft">';
|
||||||
|
|||||||
@ -37,8 +37,8 @@ $langs->load("projects");
|
|||||||
$langs->load("companies");
|
$langs->load("companies");
|
||||||
|
|
||||||
$id=GETPOST('id','int');
|
$id=GETPOST('id','int');
|
||||||
$ref=GETPOST("ref",'alpha',1);
|
$ref=GETPOST("ref",'alpha',1); // task ref
|
||||||
$taskref=GETPOST("taskref",'alpha');
|
$taskref=GETPOST("taskref",'alpha'); // task ref
|
||||||
$action=GETPOST('action','alpha');
|
$action=GETPOST('action','alpha');
|
||||||
$confirm=GETPOST('confirm','alpha');
|
$confirm=GETPOST('confirm','alpha');
|
||||||
$withproject=GETPOST('withproject','int');
|
$withproject=GETPOST('withproject','int');
|
||||||
@ -246,7 +246,7 @@ if ($id > 0 || ! empty($ref))
|
|||||||
$projectstatic->next_prev_filter=" rowid in (".(count($objectsListId)?join(',',array_keys($objectsListId)):'0').")";
|
$projectstatic->next_prev_filter=" rowid in (".(count($objectsListId)?join(',',array_keys($objectsListId)):'0').")";
|
||||||
}
|
}
|
||||||
|
|
||||||
dol_banner_tab($projectstatic, 'ref', $linkback, 1, 'ref', 'ref', $morehtmlref);
|
dol_banner_tab($projectstatic, 'project_ref', $linkback, 1, 'ref', 'ref', $morehtmlref);
|
||||||
|
|
||||||
print '<div class="fichecenter">';
|
print '<div class="fichecenter">';
|
||||||
print '<div class="fichehalfleft">';
|
print '<div class="fichehalfleft">';
|
||||||
|
|||||||
@ -324,7 +324,7 @@ if (($id > 0 || ! empty($ref)) || $projectidforalltimes > 0)
|
|||||||
$projectstatic->next_prev_filter=" rowid in (".(count($objectsListId)?join(',',array_keys($objectsListId)):'0').")";
|
$projectstatic->next_prev_filter=" rowid in (".(count($objectsListId)?join(',',array_keys($objectsListId)):'0').")";
|
||||||
}
|
}
|
||||||
|
|
||||||
dol_banner_tab($projectstatic, 'ref', $linkback, 1, 'ref', 'ref', $morehtmlref);
|
dol_banner_tab($projectstatic, 'project_ref', $linkback, 1, 'ref', 'ref', $morehtmlref);
|
||||||
|
|
||||||
print '<div class="fichecenter">';
|
print '<div class="fichecenter">';
|
||||||
print '<div class="fichehalfleft">';
|
print '<div class="fichehalfleft">';
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user