ManageTable use icon
This commit is contained in:
parent
c334a73c64
commit
426d5b549f
3 changed files with 17 additions and 4 deletions
BIN
html/image/edit.png
Normal file
BIN
html/image/edit.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 745 B |
|
|
@ -467,6 +467,19 @@ class HtmlInput
|
|||
$r.='<input type="button" id="'.$id.'" class="'.$p_class.'" onclick="'.$javascript.'" value="'.h($action).'">';
|
||||
return $r;
|
||||
|
||||
}
|
||||
/**
|
||||
* Image to click ,
|
||||
* @param string $p_image filename of the image under image/
|
||||
* @param string $p_js javascript when the image is clicked
|
||||
* @param string $p_message Message
|
||||
*/
|
||||
static function image_click($p_image,$p_js,$p_message)
|
||||
{
|
||||
$ret=sprintf('<a class="nav" style="display:inline" href="#" title="%s"><img src="image/%s" onclick="%s"></a>',
|
||||
$p_message,$p_image,$p_js);
|
||||
return $ret;
|
||||
|
||||
}
|
||||
/**
|
||||
* button Html image
|
||||
|
|
|
|||
|
|
@ -490,19 +490,19 @@ class Manage_Table_SQL
|
|||
echo "<td>";
|
||||
if ($this->can_update_row())
|
||||
{
|
||||
$js=sprintf("onclick=\"%s.input('%s','%s');\"", $this->object_name,
|
||||
$js=sprintf("%s.input('%s','%s');", $this->object_name,
|
||||
$p_row[$this->table->primary_key], $this->object_name
|
||||
);
|
||||
echo HtmlInput::anchor(_("Modifier"), "", $js);
|
||||
echo HtmlInput::image_click("edit.png",$js,_("Modifier"));
|
||||
}
|
||||
echo "</td>";
|
||||
echo "<td>";
|
||||
if ($this->can_delete_row())
|
||||
{
|
||||
$js=sprintf("onclick=\"%s.delete('%s','%s');\"", $this->object_name,
|
||||
$js=sprintf("%s.delete('%s','%s');", $this->object_name,
|
||||
$p_row[$this->table->primary_key], $this->object_name
|
||||
);
|
||||
echo HtmlInput::anchor(_("Effacer"), "", $js);
|
||||
echo HtmlInput::image_click("delete.gif", $js,_("effacer"));
|
||||
}
|
||||
echo "</td>";
|
||||
echo '</tr>';
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue