routeSQL : Add support of url-defined var (like zone/XX/entry/YY)
git-svn-id: https://svn.fournier38.fr/svn/ProgSVN/trunk@2030 bf3deb0d-5f1a-0410-827f-c0cc1f45334c
This commit is contained in:
17
routeSQL.php
17
routeSQL.php
@@ -54,6 +54,11 @@ class routeSQL
|
||||
public $chained = null;
|
||||
/** Chain multiple routeSQL. Wait for the foreign key */
|
||||
public $chainedForeign = null;
|
||||
/** Allow one or multiple links by entry in the list
|
||||
The array must be of the form array ("linkname"=>,"icon"=>)
|
||||
icon is optional and the linkname is used if it is not provided */
|
||||
public $internalLinks = array ();
|
||||
|
||||
/** The model file containing the database description */
|
||||
private $model_file = "";
|
||||
/** The model class included in the model file */
|
||||
@@ -487,6 +492,18 @@ class routeSQL
|
||||
dgettext("domframework",
|
||||
"Are you sure to delete this entry?")."')\"";
|
||||
$content .= " class='delete'>".$this->textDelete."</a>";
|
||||
foreach ($this->internalLinks as $linkData)
|
||||
{
|
||||
if (! isset ($linkData["linkname"]))
|
||||
throw new Exception ("No linkname defined !", 500);
|
||||
$content .= " <a href='".$route->baseURL().$this->url_prefix."/".
|
||||
$line[$this->objectDB->primary]."/".
|
||||
$linkData["linkname"]."'>";
|
||||
if (isset ($linkData["icon"]))
|
||||
$content .= $linkData["icon"];
|
||||
else
|
||||
$content .= $linkData["linkname"];
|
||||
}
|
||||
$content .= "</td>";
|
||||
}
|
||||
if ($this->actionsAtEnd === false)
|
||||
|
||||
Reference in New Issue
Block a user