routeSQL : Prepare the CSS management of the routeSQL module
git-svn-id: https://svn.fournier38.fr/svn/ProgSVN/trunk@2004 bf3deb0d-5f1a-0410-827f-c0cc1f45334c
This commit is contained in:
11
routeSQL.php
11
routeSQL.php
@@ -106,7 +106,7 @@ class routeSQL
|
|||||||
$maxClickPaginator = 10;
|
$maxClickPaginator = 10;
|
||||||
$prePage = false;
|
$prePage = false;
|
||||||
$postPage = false;
|
$postPage = false;
|
||||||
$content = "<div>";
|
$content = "<div class='paginator'>";
|
||||||
$displayedNumbers = 0;
|
$displayedNumbers = 0;
|
||||||
for ($i = 1 ; $i < ($nbentries/$num) ; $i++)
|
for ($i = 1 ; $i < ($nbentries/$num) ; $i++)
|
||||||
{
|
{
|
||||||
@@ -175,7 +175,8 @@ class routeSQL
|
|||||||
$route->redirect ("/".$this->url_prefix."?page=$maxPage&num=$num", "");
|
$route->redirect ("/".$this->url_prefix."?page=$maxPage&num=$num", "");
|
||||||
}
|
}
|
||||||
|
|
||||||
$content = $this->showflash ();
|
$content = "<div class='routeSQL'>\n";
|
||||||
|
$content .= $this->showflash ();
|
||||||
if ($this->displayActions)
|
if ($this->displayActions)
|
||||||
$content .= "<a href='".$route->baseURL().$this->url_prefix."/add'>".
|
$content .= "<a href='".$route->baseURL().$this->url_prefix."/add'>".
|
||||||
dgettext("domframework","Add new entry")."</a>\n";
|
dgettext("domframework","Add new entry")."</a>\n";
|
||||||
@@ -199,6 +200,7 @@ class routeSQL
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
$i = 1;
|
$i = 1;
|
||||||
|
$odd = "odd";
|
||||||
foreach ($datas as $line)
|
foreach ($datas as $line)
|
||||||
{
|
{
|
||||||
if ($i <= (($page-1)*$num) || $i > (($page-1)*$num + $num))
|
if ($i <= (($page-1)*$num) || $i > (($page-1)*$num + $num))
|
||||||
@@ -206,7 +208,9 @@ class routeSQL
|
|||||||
$i++;
|
$i++;
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
$content .= " <tr>";
|
$content .= " <tr class='$odd'>";
|
||||||
|
if ($odd === "odd") $odd = "even";
|
||||||
|
else $odd = "odd";
|
||||||
if ($this->displayActions && $this->actionsAtEnd === false)
|
if ($this->displayActions && $this->actionsAtEnd === false)
|
||||||
{
|
{
|
||||||
$content .= "<td>";
|
$content .= "<td>";
|
||||||
@@ -245,6 +249,7 @@ class routeSQL
|
|||||||
}
|
}
|
||||||
$content .= " </tbody>\n";
|
$content .= " </tbody>\n";
|
||||||
$content .= "</table>\n";
|
$content .= "</table>\n";
|
||||||
|
$content .= "</div>\n";
|
||||||
echo $content;
|
echo $content;
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user