forked from Wavyzz/dolibarr
Fix the new navigation style.
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
<?php
|
||||
/* Copyright (C) 2001-2004 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
||||
* Copyright (C) 2003 Eric Seigne <erics@rycks.com>
|
||||
* Copyright (C) 2004-2014 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
* Copyright (C) 2004-2015 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
* Copyright (C) 2005-2012 Regis Houssin <regis.houssin@capnetworks.com>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
@@ -133,7 +133,7 @@ $form=new Form($db);
|
||||
$userstatic=new User($db);
|
||||
|
||||
$nav='';
|
||||
$nav.=' <form name="dateselect" action="'.$_SERVER["PHP_SELF"].'?action=show_peruser'.$param.'">';
|
||||
$nav.='<form name="dateselect" action="'.$_SERVER["PHP_SELF"].'?action=show_peruser'.$param.'">';
|
||||
if ($actioncode || isset($_GET['actioncode']) || isset($_POST['actioncode'])) $nav.='<input type="hidden" name="actioncode" value="'.$actioncode.'">';
|
||||
if ($status || isset($_GET['status']) || isset($_POST['status'])) $nav.='<input type="hidden" name="status" value="'.$status.'">';
|
||||
if ($filter) $nav.='<input type="hidden" name="filter" value="'.$filter.'">';
|
||||
|
||||
@@ -323,7 +323,7 @@ if ($resql)
|
||||
$formother->select_year($year?$year:-1,'year',1, 20, 5);
|
||||
print '</td>';
|
||||
print '<td class="liste_titre" align="left"> </td>';
|
||||
print '<td class="liste_titre" align="left"><input class="flat" type="text" name="search_societe" value="'.$search_societe.'"></td>';
|
||||
print '<td class="liste_titre" align="left"><input class="flat" type="text" size="8" name="search_societe" value="'.$search_societe.'"></td>';
|
||||
print '<td class="liste_titre" align="right"><input class="flat" type="text" size="6" name="search_montant_ht" value="'.$search_montant_ht.'"></td>';
|
||||
print '<td class="liste_titre" align="right"> </td>';
|
||||
print '<td class="liste_titre" align="right"><input class="flat" type="text" size="6" name="search_montant_ttc" value="'.$search_montant_ttc.'"></td>';
|
||||
|
||||
@@ -2826,7 +2826,7 @@ function print_barre_liste($titre, $page, $file, $options='', $sortfield='', $so
|
||||
{
|
||||
if ($totalnboflines) // If we know total nb of lines
|
||||
{
|
||||
$maxnbofpage=10;
|
||||
$maxnbofpage=10; // nb before and after selected page
|
||||
|
||||
$nbpages=ceil($totalnboflines/$conf->liste_limit);
|
||||
$cpt=($page-$maxnbofpage);
|
||||
@@ -2834,36 +2834,34 @@ function print_barre_liste($titre, $page, $file, $options='', $sortfield='', $so
|
||||
|
||||
if ($cpt>=1)
|
||||
{
|
||||
$pagelist.= '<li><a href="'.$file.'?page=0'.$options.'&sortfield='.$sortfield.'&sortorder='.$sortorder.'">1</a></li>'."\n";
|
||||
if ($cpt >= 2) $pagelist.='<li><span>...</span></li>';
|
||||
$pagelist.= '<li><a href="'.$file.'?page=0'.$options.'&sortfield='.$sortfield.'&sortorder='.$sortorder.'">1</a></li>';
|
||||
if ($cpt >= 2) $pagelist.='<li><span class="inactive">...</span></li>';
|
||||
}
|
||||
do
|
||||
{
|
||||
if ($cpt==$page)
|
||||
{
|
||||
$pagelist.= '<li><span class="active">'.($page+1).'</span></li>'."\n";
|
||||
$pagelist.= '<li><span class="active">'.($page+1).'</span></li>';
|
||||
}
|
||||
else
|
||||
{
|
||||
$pagelist.= '<li><a href="'.$file.'?page='.$cpt.$options.'&sortfield='.$sortfield.'&sortorder='.$sortorder.'">'.($cpt+1).'</a></li>'."\n";
|
||||
$pagelist.= '<li><a href="'.$file.'?page='.$cpt.$options.'&sortfield='.$sortfield.'&sortorder='.$sortorder.'">'.($cpt+1).'</a></li>';
|
||||
}
|
||||
$cpt++;
|
||||
}
|
||||
while ($cpt < $nbpages && $cpt<=$page+$maxnbofpage);
|
||||
if ($cpt<$nbpages)
|
||||
{
|
||||
if ($cpt<$nbpages-1) $pagelist.= '<li><span>...</span></li>';
|
||||
$pagelist.= '<li><a href="'.$file.'?page='.($nbpages-1).$options.'&sortfield='.$sortfield.'&sortorder='.$sortorder.'">'.$nbpages.'</a></li>'."\n";
|
||||
if ($cpt<$nbpages-1) $pagelist.= '<li><span class="inactive">...</span></li>';
|
||||
$pagelist.= '<li><a href="'.$file.'?page='.($nbpages-1).$options.'&sortfield='.$sortfield.'&sortorder='.$sortorder.'">'.$nbpages.'</a></li>';
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
$pagelist.= '<li><span class="active">'.($page+1)."</li>\n";
|
||||
$pagelist.= '<li><span class="active">'.($page+1)."</li>";
|
||||
}
|
||||
}
|
||||
print "\n";
|
||||
print_fleche_navigation($page,$file,$options,$nextpage,$pagelist);
|
||||
if ($morehtml) print $morehtml;
|
||||
print_fleche_navigation($page,$file,$options,$nextpage,$pagelist,$morehtml);
|
||||
print '</td>';
|
||||
|
||||
print '</tr></table>'."\n";
|
||||
@@ -2874,28 +2872,35 @@ function print_barre_liste($titre, $page, $file, $options='', $sortfield='', $so
|
||||
* Function to show navigation arrows into lists
|
||||
*
|
||||
* @param int $page Number of page
|
||||
* @param string $file Page
|
||||
* @param string $file Page URL (in most cases provided with $_SERVER["PHP_SELF"])
|
||||
* @param string $options Other url paramaters to propagate ("" by default)
|
||||
* @param integer $nextpage Do we show a next page button
|
||||
* @param string $betweenarrows HTML Content to show between arrows
|
||||
* @param string $betweenarrows HTML content to show between arrows. Must contains '<li> </li>' tags.
|
||||
* @param string $afterarraws HTML content to show after arrows. Must NOT contains '<li> </li>' tags.
|
||||
* @return void
|
||||
*/
|
||||
function print_fleche_navigation($page,$file,$options='',$nextpage=0,$betweenarrows='')
|
||||
function print_fleche_navigation($page,$file,$options='',$nextpage=0,$betweenarrows='',$afterarrows='')
|
||||
{
|
||||
global $conf, $langs;
|
||||
|
||||
print '<div class="pagination"><ul>';
|
||||
if ($page > 0)
|
||||
{
|
||||
if (empty($conf->dol_use_jmobile)) print '<li><a class="paginationprevious" href="'.$file.'?page='.($page-1).$options.'"><</a></li>'."\n";
|
||||
else print '<li><a data-role="button" data-icon="arrow-l" data-iconpos="left" href="'.$file.'?page='.($page-1).$options.'">'.$langs->trans("Previous").'</a></li>'."\n";
|
||||
if (empty($conf->dol_use_jmobile)) print '<li><a class="paginationprevious" href="'.$file.'?page='.($page-1).$options.'"><</a></li>';
|
||||
else print '<li><a data-role="button" data-icon="arrow-l" data-iconpos="left" href="'.$file.'?page='.($page-1).$options.'">'.$langs->trans("Previous").'</a></li>';
|
||||
}
|
||||
//if ($betweenarrows) print ($page > 0?' ':'').$betweenarrows.($nextpage>0?' ':'');
|
||||
print $betweenarrows;
|
||||
if ($nextpage > 0)
|
||||
{
|
||||
if (empty($conf->dol_use_jmobile)) print '<li><a class="paginationnext" href="'.$file.'?page='.($page+1).$options.'">></a></li>'."\n";
|
||||
else print '<li><a data-role="button" data-icon="arrow-r" data-iconpos="right" href="'.$file.'?page='.($page+1).$options.'">'.$langs->trans("Next").'</a></li>'."\n";
|
||||
if (empty($conf->dol_use_jmobile)) print '<li><a class="paginationnext" href="'.$file.'?page='.($page+1).$options.'">></a></li>';
|
||||
else print '<li><a data-role="button" data-icon="arrow-r" data-iconpos="right" href="'.$file.'?page='.($page+1).$options.'">'.$langs->trans("Next").'</a></li>';
|
||||
}
|
||||
if ($afterarrows)
|
||||
{
|
||||
print '<li class="paginationafterarrows">';
|
||||
print $afterarrows;
|
||||
print '</li>';
|
||||
}
|
||||
print '</ul></div>'."\n";
|
||||
}
|
||||
|
||||
@@ -10,6 +10,10 @@ if ($dolibarr_main_prod) {
|
||||
|
||||
$usedolheader=1; // 1 = Test inside a dolibarr page, 0 = Use hard coded header
|
||||
|
||||
$form=new Form($db);
|
||||
|
||||
|
||||
|
||||
|
||||
// HEADER
|
||||
//--------
|
||||
@@ -125,6 +129,21 @@ $tasksarray=array(1,2,3); // To force having several lines
|
||||
$tagidfortablednd='tablelines3';
|
||||
if (! empty($conf->use_javascript_ajax)) include DOL_DOCUMENT_ROOT.'/core/tpl/ajaxrow.tpl.php';
|
||||
|
||||
$nav='';
|
||||
$nav.='<form name="dateselect" action="'.$_SERVER["PHP_SELF"].'?action=show_peruser'.$param.'">';
|
||||
if ($actioncode || isset($_GET['actioncode']) || isset($_POST['actioncode'])) $nav.='<input type="hidden" name="actioncode" value="'.$actioncode.'">';
|
||||
if ($status || isset($_GET['status']) || isset($_POST['status'])) $nav.='<input type="hidden" name="status" value="'.$status.'">';
|
||||
if ($filter) $nav.='<input type="hidden" name="filter" value="'.$filter.'">';
|
||||
if ($filtert) $nav.='<input type="hidden" name="filtert" value="'.$filtert.'">';
|
||||
if ($socid) $nav.='<input type="hidden" name="socid" value="'.$socid.'">';
|
||||
if ($showbirthday) $nav.='<input type="hidden" name="showbirthday" value="1">';
|
||||
if ($pid) $nav.='<input type="hidden" name="projectid" value="'.$pid.'">';
|
||||
if ($type) $nav.='<input type="hidden" name="type" value="'.$type.'">';
|
||||
if ($usergroup) $nav.='<input type="hidden" name="usergroup" value="'.$usergroup.'">';
|
||||
$nav.=$form->select_date($dateselect, 'dateselect', 0, 0, 1, '', 1, 0, 1);
|
||||
$nav.=' <input type="submit" name="submitdateselect" class="button" value="'.$langs->trans("Refresh").'">';
|
||||
$nav.='</form>';
|
||||
|
||||
print_barre_liste('Title of my list', 3, $_SERVER["PHP_SELF"], '', '', '', 'Text in middle', 20, 5000, '', 0, $nav);
|
||||
|
||||
?>
|
||||
|
||||
@@ -1837,19 +1837,26 @@ table.liste td {
|
||||
|
||||
|
||||
/* Pagination */
|
||||
|
||||
div.pagination {
|
||||
float: right;
|
||||
}
|
||||
div.pagination a {
|
||||
font-weight: normal;
|
||||
}
|
||||
div.pagination ul, div.pagination li
|
||||
div.pagination ul
|
||||
{
|
||||
list-style: none;
|
||||
display: inline-block;
|
||||
padding-left: 0px;
|
||||
padding-right: 0px;
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
div.pagination li {
|
||||
display: inline;
|
||||
display: inline-block;
|
||||
padding-left: 0px;
|
||||
padding-right: 0px;
|
||||
padding-top: 6px;
|
||||
padding-bottom: 6px;
|
||||
}
|
||||
.pagination {
|
||||
display: inline-block;
|
||||
@@ -1859,8 +1866,8 @@ div.pagination li {
|
||||
|
||||
div.pagination li a,
|
||||
div.pagination li span {
|
||||
position: relative;
|
||||
float: left;
|
||||
/*position: relative;*/
|
||||
/*float: left;*/
|
||||
padding: 6px 12px;
|
||||
margin-left: -1px;
|
||||
line-height: 1.42857143;
|
||||
@@ -1914,6 +1921,9 @@ div.pagination .disabled a:focus {
|
||||
div.pagination li .active {
|
||||
text-decoration: underline;
|
||||
}
|
||||
div.pagination li.paginationafterarrows {
|
||||
margin-left: 10px;
|
||||
}
|
||||
|
||||
/* Prepare to remove class pair - impair
|
||||
.noborder > tbody > tr:nth-child(even) td {
|
||||
@@ -2305,7 +2315,6 @@ div.titre {
|
||||
color: rgb(<?php print $colortext; ?>);
|
||||
text-decoration: none;
|
||||
text-shadow: 1px 1px 2px #FFFFFF;
|
||||
<?php print (empty($conf->dol_optimize_smallscreen)?'':'margin-top: 4px;'); ?>
|
||||
}
|
||||
|
||||
#dolpaymenttable { width: 600px; font-size: 13px; }
|
||||
|
||||
Reference in New Issue
Block a user