2009-09-14 Miguel de Dios <miguel.dedios@artica.es>
* godmode/agentes/modificar_agente.php: fix the pagination when it has a search, and fix the pagination and delete element in the page. Fixes: 2857846 git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@1939 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
This commit is contained in:
parent
e5d41944d9
commit
9c009b6b94
|
@ -1,3 +1,9 @@
|
|||
2009-09-14 Miguel de Dios <miguel.dedios@artica.es>
|
||||
|
||||
* godmode/agentes/modificar_agente.php: fix the pagination when it has
|
||||
a search, and fix the pagination and delete element in the page.
|
||||
Fixes: 2857846
|
||||
|
||||
2009-09-14 Miguel de Dios <miguel.dedios@artica.es>
|
||||
|
||||
* operation/agentes/exportdata.php, godmode/agentes/agent_manager.php,
|
||||
|
|
|
@ -95,7 +95,7 @@ if (isset($_POST["ag_group"])){
|
|||
}
|
||||
|
||||
echo "<form method='post' action='index.php?sec=gagente&sec2=godmode/agentes/modificar_agente&refr=60$group_mod'>";
|
||||
echo "<input type=text name='search' size='15' >";
|
||||
echo "<input type=text name='search' size='15' value='$search' >";
|
||||
echo "</td><td valign='top'>";
|
||||
echo "<input name='srcbutton' type='submit' class='sub' value='".__('Search')."'>";
|
||||
echo "</form>";
|
||||
|
@ -149,7 +149,7 @@ if ($ag_group > 1) {
|
|||
$agents = get_db_all_rows_sql ($sql);
|
||||
|
||||
// Prepare pagination
|
||||
pagination ($total_agents, "index.php?sec=gagente&sec2=godmode/agentes/modificar_agente&group_id=$ag_group", $offset);
|
||||
pagination ($total_agents, "index.php?sec=gagente&sec2=godmode/agentes/modificar_agente&group_id=$ag_group&search=$search", $offset);
|
||||
echo "<div style='height: 20px'> </div>";
|
||||
|
||||
if ($agents !== false) {
|
||||
|
@ -237,8 +237,14 @@ if ($agents !== false) {
|
|||
// Description
|
||||
echo "<td class='".$tdcolor."f9'>".$agent["comentarios"]."</td>";
|
||||
// Action
|
||||
//When there is only one element in page it's necesary go back page.
|
||||
if ((count($agents) == 1) && ($offset >= $config["block_size"]))
|
||||
$offsetArg = $offset - $config["block_size"];
|
||||
else
|
||||
$offsetArg = $offset;
|
||||
|
||||
echo "<td class='$tdcolor' align='center'><a href='index.php?sec=gagente&sec2=godmode/agentes/modificar_agente&
|
||||
borrar_agente=".$agent["id_agente"]."'";
|
||||
borrar_agente=".$agent["id_agente"]."&search=$search&offset=$offsetArg'";
|
||||
echo ' onClick="if (!confirm(\' '.__('Are you sure?').'\')) return false;">';
|
||||
echo "<img border='0' src='images/cross.png'></a></td>";
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue