Core  3.2
PHP API documentation
 All Data Structures Namespaces Files Functions Variables Pages
popupdocmenu.php
Go to the documentation of this file.
1 <?php
2 /*
3  * @author Anakeen
4  * @package FDL
5 */
6 /**
7  * Specific menu for family
8  */
9 require_once "FDL/popupdoc.php";
10 /**
11  * define popupmenu for a document
12  *
13  * @param Action &$action current action
14  *
15  * @return void
16  */
18 {
19  // -----------------------------------
20  // define accessibility
21  $docid = $action->getArgument("id");
22  $abstract = ($action->getArgument("abstract", 'N') == "Y");
23  $zone = $action->getArgument("mzone"); // special zone
24  $js = ($action->getArgument("js", "true") == "true") ? true : false;
25  $css = ($action->getArgument("css", "true") == "true") ? true : false;
26 
27  $dbaccess = $action->dbaccess;
28  $doc = new_Doc($dbaccess, $docid); # _("States")
29  if ($zone == "") $specmenu = $doc->specialmenu;
30  else $specmenu = $zone;
31  if (is_string($specmenu) && preg_match("/(.*):(.*)/", $specmenu, $reg)) {
32  $menuapp = $reg[1];
33  $menuaction = $reg[2];
34  } else {
35  $menuapp = "FDL";
36  $menuaction = "POPUPDOCDETAIL";
37  }
38 
39  $action->lay->set("id", $doc->id);
40  $action->lay->set("menuapp", $menuapp);
41  $action->lay->set("menuaction", $menuaction);
42  if ($js) {
43  $action->parent->AddJsRef($action->GetParam("CORE_PUBURL") . "/FDL/Layout/popupdoc.js");
44  $action->parent->AddJsRef($action->GetParam("CORE_PUBURL") . "/FDL/Layout/popupdocmenu.js");
45  }
46  if ($css) {
47  $action->parent->AddCssRef("FDL:POPUP.CSS", true);
48  }
49 }
global $action
$docid
Definition: cleanFamily.php:13
popupdocmenu(Action &$action)
new_Doc($dbaccess, $id= '', $latest=false)
static getArgument($k, $def= '')
$dbaccess
Definition: checkVault.php:17
← centre documentaire © anakeen