diff --git a/src/copyright/ui/copyright-hist.php b/src/copyright/ui/copyright-hist.php index 1a4326ab..6214112d 100644 --- a/src/copyright/ui/copyright-hist.php +++ b/src/copyright/ui/copyright-hist.php @@ -1,117 +1,117 @@ Name = "copyright-hist"; $this->Title = TITLE_copyrightHistogram; $this->viewName = "copyright-view"; $this->agentName = "copyright"; parent::__construct(); } /** * @param $upload_pk * @param $uploadtreeId * @param $filter * @param $agentId * @return array */ protected function getTableContent($upload_pk, $uploadtreeId, $filter, $agentId) { $typeDescriptionPairs = array( 'statement' => _("Copyright"), 'email' => _("Email"), 'url' => _("URL"), 'author' => _("Author") ); $tableVars = array(); $output = array(); foreach($typeDescriptionPairs as $type=>$description) { list($out, $vars) = $this->getTableForSingleType($type, $description, $upload_pk, $uploadtreeId, $filter, $agentId); $tableVars[$type] = $vars; $output[] = $out; } $output[] = $tableVars; return $output; } /** * @param $upload_pk * @param $Uploadtree_pk * @param $filter * @param $agentId * @param $VF * @return string */ protected function fillTables($upload_pk, $Uploadtree_pk, $filter, $agentId, $VF) { list($VCopyright, $VEmail, $VUrl, $VAuthor, $tableVars) = $this->getTableContent($upload_pk, $Uploadtree_pk, $filter, $agentId); $out = $this->renderString('copyrighthist_tables.html.twig', array('contCopyright'=>$VCopyright, 'contEmail'=>$VEmail, 'contUrl'=>$VUrl, 'contAuthor'=>$VAuthor, 'fileList'=>$VF)); return array($out, $tableVars); } function RegisterMenus() { // For all other menus, permit coming back here. $URI = $this->Name . Traceback_parm_keep(array("show","format","page","upload","item")); $Item = GetParm("item",PARM_INTEGER); $Upload = GetParm("upload",PARM_INTEGER); if (!empty($Item) && !empty($Upload)) { if (GetParm("mod",PARM_STRING) == $this->Name) { - menu_insert("Browse::Copyright/Email/URL",1); + menu_insert("Browse::Copyright/Email/URL",10); menu_insert("Browse::[BREAK]",100); } else { $text = _("View copyright/email/url histogram"); menu_insert("Browse::Copyright/Email/URL",10,$URI,$text); } } } protected function createScriptBlock() { return " $(document).ready(function() { tableCopyright = createTablestatement(); tableEmail = createTableemail(); tableUrl = createTableurl(); tableAuthor = createTableauthor(); } ); "; } } $NewPlugin = new CopyrightHistogram; diff --git a/src/copyright/ui/ecc-hist.php b/src/copyright/ui/ecc-hist.php index f021b744..1d63fca2 100644 --- a/src/copyright/ui/ecc-hist.php +++ b/src/copyright/ui/ecc-hist.php @@ -1,107 +1,106 @@ Name = "ecc-hist"; $this->Title = TITLE_eccHistogram; $this->viewName = "ecc-view"; $this->agentName = "ecc"; parent::__construct(); } /** * @param $upload_pk * @param $Uploadtree_pk * @param $filter * @param $Agent_pk * @return array */ protected function getTableContent($upload_pk, $Uploadtree_pk, $filter, $Agent_pk) { $type = 'ecc'; $decription = _("Export restriction"); $tableVars=array(); list($VEcc, $eccVars) = $this->getTableForSingleType($type, $decription, $upload_pk, $Uploadtree_pk, $filter, $Agent_pk); $tableVars['ecc']=$eccVars; return array($VEcc,$tableVars); } /** * @param $upload_pk * @param $Uploadtree_pk * @param $filter * @param $agentId * @param $VF * @return string */ protected function fillTables($upload_pk, $Uploadtree_pk, $filter, $agentId, $VF) { list($VEcc, $tableVars) = $this->getTableContent($upload_pk, $Uploadtree_pk, $filter, $agentId); $V = "\n"; $V .= "\n"; $V .= "
$VEcc$VF
\n"; $V .= "
\n"; return array($V,$tableVars); } function RegisterMenus() { // For all other menus, permit coming back here. $URI = $this->Name . Traceback_parm_keep(array("show","format","page","upload","item")); $Item = GetParm("item",PARM_INTEGER); $Upload = GetParm("upload",PARM_INTEGER); if (!empty($Item) && !empty($Upload)) { if (GetParm("mod",PARM_STRING) == $this->Name) { - menu_insert("Browse::ECC",1); + menu_insert("Browse::ECC",10); menu_insert("Browse::[BREAK]",100); } else { $text = _("View ECC histogram"); menu_insert("Browse::ECC",10,$URI,$text); } } } // RegisterMenus() protected function createScriptBlock() { return " $(document).ready(function() { tableEcc = createTableecc(); } ); "; } } $NewPlugin = new EccHistogram; -//$NewPlugin->Initialize(); \ No newline at end of file