diff --git a/routeSQL.php b/routeSQL.php index f7115f8..cdffd5a 100644 --- a/routeSQL.php +++ b/routeSQL.php @@ -17,6 +17,8 @@ class routeSQL public $displayActions = true; /** Do a confirmation in javascript before deleting entry */ public $deleteConfirm = true; + /** Push the actions buttons at end of line */ + public $actionsAtEnd = false; /** The model file containing the database description */ private $model_file = ""; /** The model class included in the model file */ @@ -111,10 +113,12 @@ class routeSQL dgettext("domframework","Add new entry")."\n"; $content .= "\n"; $content .= " \n"; - if ($this->displayActions) + if ($this->displayActions && $this->actionsAtEnd === false) $content .= " \n"; foreach ($titles as $title) $content .= " \n"; + if ($this->displayActions && $this->actionsAtEnd !== false) + $content .= " \n"; $content .= " \n"; $content .= " \n"; if (count ($datas) === 0) @@ -128,7 +132,7 @@ class routeSQL foreach ($datas as $line) { $content .= " "; - if ($this->displayActions) + if ($this->displayActions && $this->actionsAtEnd === false) { $content .= ""; + } $content .= "\n"; } }
".dgettext("domframework","Actions")."".htmlentities ($title)."".dgettext("domframework","Actions")."
"; $content .= " baseURL().$this->url_prefix."/". + $line[$this->objectDB->primary]."'>". + dgettext("domframework","Edit").""; + $content .= " deleteConfirm) + $content .= " onclick=\"return confirm('". + dgettext("domframework", + "Are you sure to delete this entry?")."')\""; + $content .= ">". + dgettext("domframework","Delete").""; + $content .= "