9 require_once(
'HistogramBase.php');
11 define(
"TITLE_COPYRIGHTHISTOGRAM", _(
"Copyright Browser"));
21 $this->Name =
"copyright-hist";
22 $this->Title = TITLE_COPYRIGHTHISTOGRAM;
23 $this->viewName =
"copyright-view";
24 $this->agentName =
"copyright";
25 parent::__construct();
38 $typeDescriptionPairs = array(
39 'statement' => _(
"FOSSology Findings"),
40 'scancode_statement' => _(
"ScanCode Findings"),
41 'copyFindings' => _(
"User Findings")
45 foreach ($typeDescriptionPairs as $type=>$description) {
46 if ($type===
"scancode_statement") {
48 $this->agentName =
"scancode";
51 $upload_pk, $uploadtreeId, $filter, $agentId);
52 $tableVars[$type] = $vars;
56 $output[] = $tableVars;
65 protected function fillTables($upload_pk, $Uploadtree_pk, $filter, $agentId, $VF)
68 $upload_pk, $Uploadtree_pk, $filter, $agentId);
70 $out = $this->
renderString(
'copyrighthist_tables.html.twig',
72 'contCopyright' => $vCopyright,
73 'contScancodeCopyright' => $vScancode,
74 'contTextFindings' => $vTextFindings,
77 return array($out, $tableVars);
90 if (!empty($Item) && !empty($Upload)) {
95 $text = _(
"View copyright histogram");
109 var copyrightTabCookie = 'stickyCopyrightTab';
111 $(document).ready(function() {
112 tableCopyright = createTablestatement();
113 tableScancode = createTablescancode_statement();
114 tableFindings = createPlainTablecopyFindings();
115 $('#testReplacementstatement').click(function() {
116 testReplacement(tableCopyright, 'statement');
118 $('#copyrightFindingsTabs').tabs({
119 active: ($.cookie(copyrightTabCookie) || 0),
120 activate: function(e, ui){
121 // Get active tab index and update cookie
122 var idString = $(e.currentTarget).attr('id');
123 idString = parseInt(idString.slice(-1)) - 1;
124 $.cookie(copyrightTabCookie, idString);
Create histogram plugin for copyright.
__construct()
base constructor. Most plugins will just use this
RegisterMenus()
While menus can be added to any time at or after the PostInitialize phase, this is the standard locat...
createScriptBlock()
Create JavaScript block for histogram.
fillTables($upload_pk, $Uploadtree_pk, $filter, $agentId, $VF)
Get copyright statements and fill the main content table.
getTableContent($upload_pk, $uploadtreeId, $filter, $agentId)
Get contents for copyright table.
renderString($templateName, $vars=null)
Base class for histogram plugins.
getTableForSingleType($type, $description, $uploadId, $uploadTreeId, $filter, $agentId)
LatestAgentpk($upload_pk, $arsTableName, $arsSuccess=false)
Given an upload_pk, find the latest enabled agent_pk with results.
GetParm($parameterName, $parameterType)
This function will retrieve the variables and check data types.
Traceback_parm_keep($List)
Create a new URI, keeping only these items.
list_t type structure used to keep various lists. (e.g. there are multiple lists).