0byt3m1n1
Path:
/
home
/
mgatv524
/
www
/
midiatech
/
cache
/
55
/
[
Home
]
File: 55f2c148ffc860fcb4b68a56551397247e720754f6b2a36ad68278e72073ee40.php
<?php use Twig\Environment; use Twig\Error\LoaderError; use Twig\Error\RuntimeError; use Twig\Markup; use Twig\Sandbox\SecurityError; use Twig\Sandbox\SecurityNotAllowedTagError; use Twig\Sandbox\SecurityNotAllowedFilterError; use Twig\Sandbox\SecurityNotAllowedFunctionError; use Twig\Source; use Twig\Template; /* proofofplay-report-form.twig */ class __TwigTemplate_1c3da66d0b4026866191c411e913beddb994893764271d4c5ef87a7ea9033ba9 extends \Twig\Template { public function __construct(Environment $env) { parent::__construct($env); $this->blocks = [ 'actionMenu' => [$this, 'block_actionMenu'], 'pageContent' => [$this, 'block_pageContent'], 'javaScript' => [$this, 'block_javaScript'], ]; } protected function doGetParent(array $context) { // line 24 return "authed.twig"; } protected function doDisplay(array $context, array $blocks = []) { // line 25 $context["inline"] = $this->loadTemplate("inline.twig", "proofofplay-report-form.twig", 25)->unwrap(); // line 24 $this->parent = $this->loadTemplate("authed.twig", "proofofplay-report-form.twig", 24); $this->parent->display($context, array_merge($this->blocks, $blocks)); } // line 27 public function block_actionMenu($context, array $blocks = []) { // line 28 echo " <ul class=\"nav nav-pills pull-right\"> <li class=\"btn btn-success btn-xs\"><a class=\"XiboFormButton btns\" title=\""; // line 29 echo __("Select a type and an item (i.e., layout/media/tag)"); echo "\" id=\"reportAddBtn\"><i class=\"fa fa-plus-circle\" aria-hidden=\"true\"></i> "; echo __("Schedule"); echo "</a></li> <li class=\"btn btn-info btn-xs\"><a class=\"btns\" href=\""; // line 30 echo twig_escape_filter($this->env, $this->env->getExtension('Slim\Views\TwigExtension')->urlFor("savedreport.view"), "html", null, true); echo "?reportName=proofofplayReport\"><i class=\"fa fa-eye\" aria-hidden=\"true\"></i> "; echo __("Saved Reports"); echo "</a></li> <li class=\"btn btn-primary btn-xs\"><a class=\"btns\" href=\""; // line 31 echo twig_escape_filter($this->env, $this->env->getExtension('Slim\Views\TwigExtension')->urlFor("reportschedule.view"), "html", null, true); echo "?reportName=proofofplayReport\"><i class=\"fa fa-th-list\" aria-hidden=\"true\"></i> "; echo __("Report Schedules"); echo "</a></li> </ul> <div class=\"proof-of-play-report-div pull-right btn-group\"> <button class=\"proof-of-play-report-btn btn btn-primary dropdown-toggle\" data-toggle=\"dropdown\" aria-expanded=\"false\"> <span class=\"fa fa-caret-down\"></span> "; // line 36 echo __("Reports"); // line 37 echo " </button> <ul class=\"dropdown-menu\"> "; // line 39 $context['_parent'] = $context; $context['_seq'] = twig_ensure_traversable($this->getAttribute(($context["defaults"] ?? null), "availableReports", [])); foreach ($context['_seq'] as $context["_key"] => $context["report"]) { // line 40 echo " "; if (($this->getAttribute($context["report"], "hidden", []) == 0)) { // line 41 echo " <li> <a href=\""; // line 42 echo twig_escape_filter($this->env, $this->env->getExtension('Slim\Views\TwigExtension')->urlFor("report.form", ["name" => $this->getAttribute($context["report"], "name", [])]), "html", null, true); echo "\">"; echo twig_escape_filter($this->env, $this->getAttribute($context["report"], "description", []), "html", null, true); echo "</a> </li> "; } // line 45 echo " "; } $_parent = $context['_parent']; unset($context['_seq'], $context['_iterated'], $context['_key'], $context['report'], $context['_parent'], $context['loop']); $context = array_intersect_key($context, $_parent) + $_parent; // line 46 echo " </ul> </div> "; } // line 50 public function block_pageContent($context, array $blocks = []) { // line 51 echo " <div class=\"widget\"> <div class=\"widget-title\">"; // line 53 echo __("Proof of Play"); echo "</div> <div class=\"widget-body\"> <div class=\"XiboGrid\" id=\""; // line 55 echo twig_escape_filter($this->env, twig_random($this->env), "html", null, true); echo "\" data-grid-name=\"statsView\"> <div class=\"XiboFilterCustom well\"> <div class=\"FilterDiv\" id=\"proofofplayReport\"> <form class=\"form-inline\"> "; // line 59 ob_start(); echo __("Range"); $context["title"] = ('' === $tmp = ob_get_clean()) ? '' : new Markup($tmp, $this->env->getCharset()); // line 60 echo " "; ob_start(); echo __("Select a range"); $context["range"] = ('' === $tmp = ob_get_clean()) ? '' : new Markup($tmp, $this->env->getCharset()); // line 61 echo " "; ob_start(); echo __("Today"); $context["today"] = ('' === $tmp = ob_get_clean()) ? '' : new Markup($tmp, $this->env->getCharset()); // line 62 echo " "; ob_start(); echo __("Yesterday"); $context["yesterday"] = ('' === $tmp = ob_get_clean()) ? '' : new Markup($tmp, $this->env->getCharset()); // line 63 echo " "; ob_start(); echo __("This Week"); $context["thisweek"] = ('' === $tmp = ob_get_clean()) ? '' : new Markup($tmp, $this->env->getCharset()); // line 64 echo " "; ob_start(); echo __("This Month"); $context["thismonth"] = ('' === $tmp = ob_get_clean()) ? '' : new Markup($tmp, $this->env->getCharset()); // line 65 echo " "; ob_start(); echo __("This Year"); $context["thisyear"] = ('' === $tmp = ob_get_clean()) ? '' : new Markup($tmp, $this->env->getCharset()); // line 66 echo " "; ob_start(); echo __("Last Week"); $context["lastweek"] = ('' === $tmp = ob_get_clean()) ? '' : new Markup($tmp, $this->env->getCharset()); // line 67 echo " "; ob_start(); echo __("Last Month"); $context["lastmonth"] = ('' === $tmp = ob_get_clean()) ? '' : new Markup($tmp, $this->env->getCharset()); // line 68 echo " "; ob_start(); echo __("Last Year"); $context["lastyear"] = ('' === $tmp = ob_get_clean()) ? '' : new Markup($tmp, $this->env->getCharset()); // line 69 echo " "; $context["options"] = [0 => ["filterName" => "", "reportFilter" => // line 70 ($context["range"] ?? null)], 1 => ["filterName" => "today", "reportFilter" => // line 71 ($context["today"] ?? null)], 2 => ["filterName" => "yesterday", "reportFilter" => // line 72 ($context["yesterday"] ?? null)], 3 => ["filterName" => "thisweek", "reportFilter" => // line 73 ($context["thisweek"] ?? null)], 4 => ["filterName" => "thismonth", "reportFilter" => // line 74 ($context["thismonth"] ?? null)], 5 => ["filterName" => "thisyear", "reportFilter" => // line 75 ($context["thisyear"] ?? null)], 6 => ["filterName" => "lastweek", "reportFilter" => // line 76 ($context["lastweek"] ?? null)], 7 => ["filterName" => "lastmonth", "reportFilter" => // line 77 ($context["lastmonth"] ?? null)], 8 => ["filterName" => "lastyear", "reportFilter" => // line 78 ($context["lastyear"] ?? null)]]; // line 80 echo " "; echo $context["inline"]->getdropdown("reportFilter", "single", ($context["title"] ?? null), "today", ($context["options"] ?? null), "filterName", "reportFilter"); echo " "; // line 82 ob_start(); echo __("From Date"); $context["title"] = ('' === $tmp = ob_get_clean()) ? '' : new Markup($tmp, $this->env->getCharset()); // line 83 echo " "; echo $context["inline"]->getdate("statsFromDt", ($context["title"] ?? null), $this->getAttribute(($context["defaults"] ?? null), "fromDateOneDay", []), "", "stats-from-dt", "", ""); echo " "; // line 85 ob_start(); echo __("Time"); $context["title"] = ('' === $tmp = ob_get_clean()) ? '' : new Markup($tmp, $this->env->getCharset()); // line 86 echo " "; echo $context["inline"]->gettime("statsFromDtTime", ($context["title"] ?? null), "00:00", "", "stats-from-dt-time"); echo " "; // line 88 ob_start(); echo __("To Date"); $context["title"] = ('' === $tmp = ob_get_clean()) ? '' : new Markup($tmp, $this->env->getCharset()); // line 89 echo " "; echo $context["inline"]->getdate("statsToDt", ($context["title"] ?? null), $this->getAttribute(($context["defaults"] ?? null), "toDate", []), "", "stats-to-dt", "", ""); echo " "; // line 91 ob_start(); echo __("Time"); $context["title"] = ('' === $tmp = ob_get_clean()) ? '' : new Markup($tmp, $this->env->getCharset()); // line 92 echo " "; echo $context["inline"]->gettime("statsToDtTime", ($context["title"] ?? null), "00:00", "", "stats-to-dt-time"); echo " "; // line 94 ob_start(); echo __("Display"); $context["title"] = ('' === $tmp = ob_get_clean()) ? '' : new Markup($tmp, $this->env->getCharset()); // line 95 echo " "; $context["attributes"] = [0 => ["name" => "data-width", "value" => "200px"], 1 => ["name" => "data-allow-clear", "value" => "true"], 2 => ["name" => "data-placeholder--id", "value" => null], 3 => ["name" => "data-placeholder--value", "value" => ""], 4 => ["name" => "data-search-url", "value" => $this->env->getExtension('Slim\Views\TwigExtension')->urlFor("display.search")], 5 => ["name" => "data-search-term", "value" => "display"], 6 => ["name" => "data-search-term-tags", "value" => "tags"], 7 => ["name" => "data-id-property", "value" => "displayId"], 8 => ["name" => "data-text-property", "value" => "display"]]; // line 106 echo " "; echo $context["inline"]->getdropdown("displayId", "single", ($context["title"] ?? null), "", null, "displayId", "display", "", "pagedSelect", "", "d", "", ($context["attributes"] ?? null)); echo " "; // line 108 $context["attributes"] = [0 => ["name" => "data-width", "value" => "200px"], 1 => ["name" => "data-allow-clear", "value" => "true"], 2 => ["name" => "data-placeholder--id", "value" => null], 3 => ["name" => "data-placeholder--value", "value" => ""], 4 => ["name" => "data-search-url", "value" => $this->env->getExtension('Slim\Views\TwigExtension')->urlFor("layout.search")], 5 => ["name" => "data-search-term", "value" => "layout"], 6 => ["name" => "data-search-term-tags", "value" => "tags"], 7 => ["name" => "data-id-property", "value" => "layoutId"], 8 => ["name" => "data-text-property", "value" => "layout"]]; // line 119 echo " "; // line 120 ob_start(); echo __("Layout"); $context["title"] = ('' === $tmp = ob_get_clean()) ? '' : new Markup($tmp, $this->env->getCharset()); // line 121 echo " "; echo $context["inline"]->getdropdown("layoutId[]", "dropdownmulti", ($context["title"] ?? null), "", null, "layoutId", "layout", "", "pagedSelect", "", "l", "", ($context["attributes"] ?? null)); echo " "; // line 123 $context["attributes"] = [0 => ["name" => "data-width", "value" => "200px"], 1 => ["name" => "data-allow-clear", "value" => "true"], 2 => ["name" => "data-placeholder--id", "value" => null], 3 => ["name" => "data-placeholder--value", "value" => ""], 4 => ["name" => "data-search-url", "value" => $this->env->getExtension('Slim\Views\TwigExtension')->urlFor("library.search")], 5 => ["name" => "data-search-term", "value" => "media"], 6 => ["name" => "data-search-term-tags", "value" => "tags"], 7 => ["name" => "data-id-property", "value" => "mediaId"], 8 => ["name" => "data-text-property", "value" => "name"]]; // line 134 echo " "; ob_start(); echo __("Media"); $context["title"] = ('' === $tmp = ob_get_clean()) ? '' : new Markup($tmp, $this->env->getCharset()); // line 135 echo " "; echo $context["inline"]->getdropdown("mediaId[]", "dropdownmulti", ($context["title"] ?? null), "", null, "mediaId", "name", "", "pagedSelect", "", "m", "", ($context["attributes"] ?? null)); echo " "; // line 137 ob_start(); echo __("Type"); $context["title"] = ('' === $tmp = ob_get_clean()) ? '' : new Markup($tmp, $this->env->getCharset()); // line 138 echo " "; ob_start(); echo __("Layout"); $context["layout"] = ('' === $tmp = ob_get_clean()) ? '' : new Markup($tmp, $this->env->getCharset()); // line 139 echo " "; ob_start(); echo __("Media"); $context["media"] = ('' === $tmp = ob_get_clean()) ? '' : new Markup($tmp, $this->env->getCharset()); // line 140 echo " "; ob_start(); echo __("Widget"); $context["widget"] = ('' === $tmp = ob_get_clean()) ? '' : new Markup($tmp, $this->env->getCharset()); // line 141 echo " "; ob_start(); echo __("Event"); $context["event"] = ('' === $tmp = ob_get_clean()) ? '' : new Markup($tmp, $this->env->getCharset()); // line 142 echo " "; $context["options"] = [0 => ["typeid" => "", "type" => null], 1 => ["typeid" => "layout", "type" => // line 144 ($context["layout"] ?? null)], 2 => ["typeid" => "media", "type" => // line 145 ($context["media"] ?? null)], 3 => ["typeid" => "widget", "type" => // line 146 ($context["widget"] ?? null)], 4 => ["typeid" => "event", "type" => // line 147 ($context["event"] ?? null)]]; // line 149 echo " "; echo $context["inline"]->getdropdown("type", "single", ($context["title"] ?? null), "", ($context["options"] ?? null), "typeid", "type"); echo " "; // line 151 ob_start(); echo __("Tags from"); $context["title"] = ('' === $tmp = ob_get_clean()) ? '' : new Markup($tmp, $this->env->getCharset()); // line 152 echo " "; ob_start(); echo __("Display Group"); $context["dg"] = ('' === $tmp = ob_get_clean()) ? '' : new Markup($tmp, $this->env->getCharset()); // line 153 echo " "; ob_start(); echo __("Layout"); $context["layout"] = ('' === $tmp = ob_get_clean()) ? '' : new Markup($tmp, $this->env->getCharset()); // line 154 echo " "; ob_start(); echo __("Media"); $context["media"] = ('' === $tmp = ob_get_clean()) ? '' : new Markup($tmp, $this->env->getCharset()); // line 155 echo " "; $context["options"] = [0 => ["tagsTypeid" => "dg", "tagsType" => // line 156 ($context["dg"] ?? null)], 1 => ["tagsTypeid" => "layout", "tagsType" => // line 157 ($context["layout"] ?? null)], 2 => ["tagsTypeid" => "media", "tagsType" => // line 158 ($context["media"] ?? null)]]; // line 160 echo " "; echo $context["inline"]->getdropdown("tagsType", "single", ($context["title"] ?? null), "dg", ($context["options"] ?? null), "tagsTypeid", "tagsType"); echo " "; // line 162 ob_start(); echo __("Tags"); $context["title"] = ('' === $tmp = ob_get_clean()) ? '' : new Markup($tmp, $this->env->getCharset()); // line 163 echo " "; ob_start(); echo __("Should Tags filter by exact match?"); $context["exactMatchTitle"] = ('' === $tmp = ob_get_clean()) ? '' : new Markup($tmp, $this->env->getCharset()); // line 164 echo " "; ob_start(); echo __("A comma separated list of tags to filter by. Enter --no-tag to see items without tags."); $context["helpText"] = ('' === $tmp = ob_get_clean()) ? '' : new Markup($tmp, $this->env->getCharset()); // line 165 echo " "; echo $context["inline"]->getinputWithTags("tags", ($context["title"] ?? null), null, ($context["helpText"] ?? null), null, null, null, "exactTags", ($context["exactMatchTitle"] ?? null)); echo " <p></p> <div class=\"row\"> <a id=\"applyBtn\" class=\"btn btn-success\"> <span>"; // line 170 echo __("Apply"); echo "</span> </a> <span id=\"applyWarning\" class=\"text-warning\" style=\"display:none; padding-left: 10px\">"; // line 172 echo __("Warning: This may return a lot of data and may take several minutes to process."); echo "</span> </div> </form> </div> </div> <div class=\"XiboData\"> <table id=\"stats\" class=\"table table-striped\"> <thead> <tr> <th>"; // line 181 echo __("Type"); echo "</th> <th>"; // line 182 echo __("Display ID"); echo "</th> <th>"; // line 183 echo __("Display"); echo "</th> <th>"; // line 184 echo __("Layout ID"); echo "</th> <th>"; // line 185 echo __("Layout"); echo "</th> <th>"; // line 186 echo __("Widget ID"); echo "</th> <th>"; // line 187 echo __("Media"); echo "</th> <th>"; // line 188 echo __("Tag"); echo "</th> <th>"; // line 189 echo __("Number of Plays"); echo "</th> <th>"; // line 190 echo __("Total Duration"); echo "</th> <th>"; // line 191 echo __("Total Duration (s)"); echo "</th> <th>"; // line 192 echo __("First Period Shown"); echo "</th> <th>"; // line 193 echo __("Last Period Shown"); echo "</th> </tr> </thead> <tbody> </tbody> </table> </div> </div> </div> </div> "; } // line 206 public function block_javaScript($context, array $blocks = []) { // line 207 echo " <script type=\"text/javascript\"> \$(document).ready(function() { var warning = \$(\"#applyWarning\"); // Grid var table = \$(\"#stats\").DataTable({ \"language\": dataTablesLanguage, serverSide: true, stateSave: true, deferLoading: 0, stateDuration: 0, stateLoadCallback: function (settings, callback) { var data = {}; \$.ajax({ type: \"GET\", async: false, url: \""; // line 223 echo twig_escape_filter($this->env, $this->env->getExtension('Slim\Views\TwigExtension')->urlFor("user.pref"), "html", null, true); echo "?preference=proofOfPlayGrid\", dataType: 'json', success: function (json) { try { if (json.success) { data = JSON.parse(json.data.value); } } catch (e) { // Do nothing } } }); return data; }, stateSaveCallback: function (settings, data) { \$.ajax({ type: \"POST\", url: \""; // line 240 echo twig_escape_filter($this->env, $this->env->getExtension('Slim\Views\TwigExtension')->urlFor("user.pref"), "html", null, true); echo "\", data: { preference: [{ option: \"proofOfPlayGrid\", value: JSON.stringify(data) }] } }); }, drawCallback: function( settings ) { setTimeout(function() { \$(\"#applyBtn\").removeClass('disabled'); }, 300); }, filter: false, searchDelay: 3000, \"order\": [[1, \"asc\"]], ajax: { \"url\": \""; // line 258 echo twig_escape_filter($this->env, $this->env->getExtension('Slim\Views\TwigExtension')->urlFor("report.data", ["name" => ($context["reportName"] ?? null)]), "html", null, true); echo "\", \"data\": function (d) { \$.extend(d, \$(\"#stats\").closest(\".XiboGrid\").find(\".FilterDiv form\").serializeObject()); } }, \"columns\": [ {\"data\": \"type\"}, {\"data\": \"displayId\"}, {\"data\": \"display\"}, {\"data\": \"layoutId\"}, {\"data\": \"layout\"}, {\"data\": \"widgetId\"}, {\"data\": \"media\"}, {\"data\": \"tag\"}, {\"data\": \"numberPlays\"}, { \"data\": \"duration\", \"render\": function (data, type, row, meta) { if (type != \"display\") return \"\"; let durationData = moment.duration(data, \"seconds\"); let dataM = ''; let months = durationData.months(); if (months > 0) { durationData.subtract(moment.duration(months,'months')); dataM += months + '"; // line 285 echo __("month"); echo " '; } let days = durationData.days(); durationData.subtract(moment.duration(days,'days')); dataM += days + '"; // line 290 echo __("day"); echo " '; let hours = durationData.hours(); durationData.subtract(moment.duration(hours,'hours')); dataM += hours + '"; // line 294 echo __("hr"); echo " '; let minutes = durationData.minutes(); durationData.subtract(moment.duration(minutes,'minutes')); dataM += minutes + '"; // line 298 echo __("min"); echo " '; let seconds = durationData.seconds(); dataM += seconds + '"; // line 301 echo __("sec"); echo " '; return dataM; } }, {\"data\": \"duration\"}, {\"data\": \"minStart\"}, {\"data\": \"maxEnd\"} ] }); table.on('draw', dataTableDraw); table.on('processing.dt', dataTableProcessing); dataTableAddButtons(table, \$('#stats_wrapper').find('.col-sm-6').eq(1)); // Apply \$(\"#applyBtn\").click(function () { \$(this).addClass('disabled'); table.search(\$(\"#stats\").closest(\".XiboGrid\").find(\".FilterDiv form\")).draw(); }); // Report Filter var reportFilter = \$(\"#reportFilter\"); // Hide / Show FromDt and ToDt function checkReportFilter(reportFilter) { if (reportFilter.val() === '' || reportFilter.val() === undefined) { \$(\".stats-from-dt\").show(); \$(\".stats-to-dt\").show(); \$(\".stats-from-dt-time\").show(); \$(\".stats-to-dt-time\").show(); } else { \$(\".stats-from-dt\").hide(); \$(\".stats-to-dt\").hide(); \$(\".stats-from-dt-time\").hide(); \$(\".stats-to-dt-time\").hide(); } } // Calculate the difference of number of days of a selected range const calculateDaysShowHideWarn = function() { let fromDt = moment(\$(\"#statsFromDt\").val()); let toDt = moment(\$(\"#statsToDt\").val()); let days = toDt.diff(fromDt, 'days'); warning.hide(); if ( days >= 30) { warning.show(); } return true; }; \$(\"#statsFromDtLink\").change( function() { calculateDaysShowHideWarn(); }); \$(\"#statsToDtLink\").change( function() { calculateDaysShowHideWarn(); }); const checkFilterAndApply = function() { reportFilter.off('change').change( function() { var value = reportFilter.val(); // Hide / Show FromDt and ToDt checkReportFilter(reportFilter); // Hide / Show Warning warning.hide(); if ( value === '') { calculateDaysShowHideWarn(); } else if ( value === 'thismonth' || value === 'lastmonth' || value === 'thisyear' || value === 'lastyear') { warning.show(); } }); var anchorReportAddBtn = \$(\"a#reportAddBtn\"); var type = \$(\"#type\").val(); var tagsType = \$(\"#tagsType\").val(); var tags = \$(\"#tags\").val(); var exactTags = \$('#exactTags').is(\":checked\"); anchorReportAddBtn.attr(\"href\", \""; // line 387 echo twig_escape_filter($this->env, $this->env->getExtension('Slim\Views\TwigExtension')->urlFor("reportschedule.add.form"), "html", null, true); echo "?type=\" + type + \"&tagsType=\" + tagsType + \"&tags=\" + tags + \"&exactTags=\" + exactTags + \"&reportName=proofofplayReport\" ); }; checkReportFilter(reportFilter); checkFilterAndApply(); }); function proofOfPlayScheduleCallback() { const \$displayId = \$('#proofofplayReport #displayId'); const \$layoutId = \$('#proofofplayReport [id=\"layoutId[]\"]'); const \$mediaId = \$('#proofofplayReport [id=\"mediaId[]\"]'); const \$newDisplayId = \$('#proofofplayScheduleAddForm #displayId'); const \$newLayoutId = \$('#proofofplayScheduleAddForm [id=\"layoutId[]\"]'); const \$newMediaId = \$('#proofofplayScheduleAddForm [id=\"mediaId[]\"]'); appendOptions(\$newDisplayId, \$displayId.find('option:selected').clone()); appendOptions(\$newLayoutId, \$layoutId.find('option:selected').clone()); appendOptions(\$newMediaId, \$mediaId.find('option:selected').clone()); } function appendOptions(element, options) { for (var i = 0; i < options.length; i++) { let option = options[i]; element.append(option).trigger('change'); \$(option).prop('selected', true); element.trigger({ type: 'select2:select', params: { data: option } }); } } </script> "; } public function getTemplateName() { return "proofofplay-report-form.twig"; } public function isTraitable() { return false; } public function getDebugInfo() { return array ( 656 => 387, 567 => 301, 561 => 298, 554 => 294, 547 => 290, 539 => 285, 509 => 258, 488 => 240, 468 => 223, 450 => 207, 447 => 206, 431 => 193, 427 => 192, 423 => 191, 419 => 190, 415 => 189, 411 => 188, 407 => 187, 403 => 186, 399 => 185, 395 => 184, 391 => 183, 387 => 182, 383 => 181, 371 => 172, 366 => 170, 357 => 165, 352 => 164, 347 => 163, 343 => 162, 337 => 160, 335 => 158, 334 => 157, 333 => 156, 331 => 155, 326 => 154, 321 => 153, 316 => 152, 312 => 151, 306 => 149, 304 => 147, 303 => 146, 302 => 145, 301 => 144, 299 => 142, 294 => 141, 289 => 140, 284 => 139, 279 => 138, 275 => 137, 269 => 135, 264 => 134, 262 => 123, 256 => 121, 252 => 120, 249 => 119, 247 => 108, 241 => 106, 238 => 95, 234 => 94, 228 => 92, 224 => 91, 218 => 89, 214 => 88, 208 => 86, 204 => 85, 198 => 83, 194 => 82, 188 => 80, 186 => 78, 185 => 77, 184 => 76, 183 => 75, 182 => 74, 181 => 73, 180 => 72, 179 => 71, 178 => 70, 176 => 69, 171 => 68, 166 => 67, 161 => 66, 156 => 65, 151 => 64, 146 => 63, 141 => 62, 136 => 61, 131 => 60, 127 => 59, 120 => 55, 115 => 53, 111 => 51, 108 => 50, 102 => 46, 96 => 45, 88 => 42, 85 => 41, 82 => 40, 78 => 39, 74 => 37, 72 => 36, 62 => 31, 56 => 30, 50 => 29, 47 => 28, 44 => 27, 39 => 24, 37 => 25, 31 => 24,); } /** @deprecated since 1.27 (to be removed in 2.0). Use getSourceContext() instead */ public function getSource() { @trigger_error('The '.__METHOD__.' method is deprecated since version 1.27 and will be removed in 2.0. Use getSourceContext() instead.', E_USER_DEPRECATED); return $this->getSourceContext()->getCode(); } public function getSourceContext() { return new Source("{# /* * Xibo - Digital Signage - http://www.xibo.org.uk * Copyright (C) 2019 Xibo Signage Ltd * * This file is part of Xibo. * * Xibo is free software: you can redistribute it and/or modify * it under the terms of the GNU Affero General Public License as published by * the Free Software Foundation, either version 3 of the License, or * any later version. * * Xibo is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU Affero General Public License for more details. * * You should have received a copy of the GNU Affero General Public License * along with Xibo. If not, see <http://www.gnu.org/licenses/>. * */ #} {% extends \"authed.twig\" %} {% import \"inline.twig\" as inline %} {% block actionMenu %} <ul class=\"nav nav-pills pull-right\"> <li class=\"btn btn-success btn-xs\"><a class=\"XiboFormButton btns\" title=\"{% trans \"Select a type and an item (i.e., layout/media/tag)\" %}\" id=\"reportAddBtn\"><i class=\"fa fa-plus-circle\" aria-hidden=\"true\"></i> {% trans \"Schedule\" %}</a></li> <li class=\"btn btn-info btn-xs\"><a class=\"btns\" href=\"{{ urlFor(\"savedreport.view\") }}?reportName=proofofplayReport\"><i class=\"fa fa-eye\" aria-hidden=\"true\"></i> {% trans \"Saved Reports\" %}</a></li> <li class=\"btn btn-primary btn-xs\"><a class=\"btns\" href=\"{{ urlFor(\"reportschedule.view\") }}?reportName=proofofplayReport\"><i class=\"fa fa-th-list\" aria-hidden=\"true\"></i> {% trans \"Report Schedules\" %}</a></li> </ul> <div class=\"proof-of-play-report-div pull-right btn-group\"> <button class=\"proof-of-play-report-btn btn btn-primary dropdown-toggle\" data-toggle=\"dropdown\" aria-expanded=\"false\"> <span class=\"fa fa-caret-down\"></span> {% trans \"Reports\" %} </button> <ul class=\"dropdown-menu\"> {% for report in defaults.availableReports %} {% if report.hidden == 0 %} <li> <a href=\"{{ urlFor(\"report.form\", {name: report.name}) }}\">{{ report.description }}</a> </li> {% endif %} {% endfor %} </ul> </div> {% endblock %} {% block pageContent %} <div class=\"widget\"> <div class=\"widget-title\">{% trans \"Proof of Play\" %}</div> <div class=\"widget-body\"> <div class=\"XiboGrid\" id=\"{{ random() }}\" data-grid-name=\"statsView\"> <div class=\"XiboFilterCustom well\"> <div class=\"FilterDiv\" id=\"proofofplayReport\"> <form class=\"form-inline\"> {% set title %}{% trans \"Range\" %}{% endset %} {% set range %}{% trans \"Select a range\" %}{% endset %} {% set today %}{% trans \"Today\" %}{% endset %} {% set yesterday %}{% trans \"Yesterday\" %}{% endset %} {% set thisweek %}{% trans \"This Week\" %}{% endset %} {% set thismonth %}{% trans \"This Month\" %}{% endset %} {% set thisyear %}{% trans \"This Year\" %}{% endset %} {% set lastweek %}{% trans \"Last Week\" %}{% endset %} {% set lastmonth %}{% trans \"Last Month\" %}{% endset %} {% set lastyear %}{% trans \"Last Year\" %}{% endset %} {% set options = [ { filterName: \"\", reportFilter: range }, { filterName: \"today\", reportFilter: today }, { filterName: \"yesterday\", reportFilter: yesterday }, { filterName: \"thisweek\", reportFilter: thisweek }, { filterName: \"thismonth\", reportFilter: thismonth }, { filterName: \"thisyear\", reportFilter: thisyear }, { filterName: \"lastweek\", reportFilter: lastweek }, { filterName: \"lastmonth\", reportFilter: lastmonth }, { filterName: \"lastyear\", reportFilter: lastyear }, ] %} {{ inline.dropdown(\"reportFilter\", \"single\", title, \"today\", options, \"filterName\", \"reportFilter\") }} {% set title %}{% trans \"From Date\" %}{% endset %} {{ inline.date(\"statsFromDt\", title, defaults.fromDateOneDay, \"\", \"stats-from-dt\", \"\", \"\") }} {% set title %}{% trans \"Time\" %}{% endset %} {{ inline.time(\"statsFromDtTime\", title, \"00:00\", \"\", \"stats-from-dt-time\") }} {% set title %}{% trans \"To Date\" %}{% endset %} {{ inline.date(\"statsToDt\", title, defaults.toDate, \"\", \"stats-to-dt\", \"\", \"\") }} {% set title %}{% trans \"Time\" %}{% endset %} {{ inline.time(\"statsToDtTime\", title, \"00:00\", \"\", \"stats-to-dt-time\") }} {% set title %}{% trans \"Display\" %}{% endset %} {% set attributes = [ { name: \"data-width\", value: \"200px\" }, { name: \"data-allow-clear\", value: \"true\" }, { name: \"data-placeholder--id\", value: null }, { name: \"data-placeholder--value\", value: \"\" }, { name: \"data-search-url\", value: urlFor(\"display.search\") }, { name: \"data-search-term\", value: \"display\" }, { name: \"data-search-term-tags\", value: \"tags\" }, { name: \"data-id-property\", value: \"displayId\" }, { name: \"data-text-property\", value: \"display\" } ] %} {{ inline.dropdown(\"displayId\", \"single\", title, \"\", null, \"displayId\", \"display\", \"\", \"pagedSelect\", \"\", \"d\", \"\", attributes) }} {% set attributes = [ { name: \"data-width\", value: \"200px\" }, { name: \"data-allow-clear\", value: \"true\" }, { name: \"data-placeholder--id\", value: null }, { name: \"data-placeholder--value\", value: \"\" }, { name: \"data-search-url\", value: urlFor(\"layout.search\") }, { name: \"data-search-term\", value: \"layout\" }, { name: \"data-search-term-tags\", value: \"tags\" }, { name: \"data-id-property\", value: \"layoutId\" }, { name: \"data-text-property\", value: \"layout\" } ] %} {% set title %}{% trans \"Layout\" %}{% endset %} {{ inline.dropdown(\"layoutId[]\", \"dropdownmulti\", title, \"\", null, \"layoutId\", \"layout\", \"\", \"pagedSelect\", \"\", \"l\", \"\", attributes) }} {% set attributes = [ { name: \"data-width\", value: \"200px\" }, { name: \"data-allow-clear\", value: \"true\" }, { name: \"data-placeholder--id\", value: null }, { name: \"data-placeholder--value\", value: \"\" }, { name: \"data-search-url\", value: urlFor(\"library.search\") }, { name: \"data-search-term\", value: \"media\" }, { name: \"data-search-term-tags\", value: \"tags\" }, { name: \"data-id-property\", value: \"mediaId\" }, { name: \"data-text-property\", value: \"name\" } ] %} {% set title %}{% trans \"Media\" %}{% endset %} {{ inline.dropdown(\"mediaId[]\", \"dropdownmulti\", title, \"\", null, \"mediaId\", \"name\", \"\", \"pagedSelect\", \"\", \"m\", \"\", attributes) }} {% set title %}{% trans \"Type\" %}{% endset %} {% set layout %}{% trans \"Layout\" %}{% endset %} {% set media %}{% trans \"Media\" %}{% endset %} {% set widget %}{% trans \"Widget\" %}{% endset %} {% set event %}{% trans \"Event\" %}{% endset %} {% set options = [ { typeid: \"\", type: null }, { typeid: \"layout\", type: layout }, { typeid: \"media\", type: media }, { typeid: \"widget\", type: widget }, { typeid: \"event\", type: event } ] %} {{ inline.dropdown(\"type\", \"single\", title, \"\", options, \"typeid\", \"type\") }} {% set title %}{% trans \"Tags from\" %}{% endset %} {% set dg %}{% trans \"Display Group\" %}{% endset %} {% set layout %}{% trans \"Layout\" %}{% endset %} {% set media %}{% trans \"Media\" %}{% endset %} {% set options = [ { tagsTypeid: \"dg\", tagsType: dg }, { tagsTypeid: \"layout\", tagsType: layout }, { tagsTypeid: \"media\", tagsType: media } ] %} {{ inline.dropdown(\"tagsType\", \"single\", title, \"dg\", options, \"tagsTypeid\", \"tagsType\") }} {% set title %}{% trans \"Tags\" %}{% endset %} {% set exactMatchTitle %}{% trans \"Should Tags filter by exact match?\" %}{% endset %} {% set helpText %}{% trans \"A comma separated list of tags to filter by. Enter --no-tag to see items without tags.\" %}{% endset %} {{ inline.inputWithTags(\"tags\", title, null, helpText, null, null, null, \"exactTags\", exactMatchTitle) }} <p></p> <div class=\"row\"> <a id=\"applyBtn\" class=\"btn btn-success\"> <span>{% trans \"Apply\" %}</span> </a> <span id=\"applyWarning\" class=\"text-warning\" style=\"display:none; padding-left: 10px\">{% trans \"Warning: This may return a lot of data and may take several minutes to process.\" %}</span> </div> </form> </div> </div> <div class=\"XiboData\"> <table id=\"stats\" class=\"table table-striped\"> <thead> <tr> <th>{% trans \"Type\" %}</th> <th>{% trans \"Display ID\" %}</th> <th>{% trans \"Display\" %}</th> <th>{% trans \"Layout ID\" %}</th> <th>{% trans \"Layout\" %}</th> <th>{% trans \"Widget ID\" %}</th> <th>{% trans \"Media\" %}</th> <th>{% trans \"Tag\" %}</th> <th>{% trans \"Number of Plays\" %}</th> <th>{% trans \"Total Duration\" %}</th> <th>{% trans \"Total Duration (s)\" %}</th> <th>{% trans \"First Period Shown\" %}</th> <th>{% trans \"Last Period Shown\" %}</th> </tr> </thead> <tbody> </tbody> </table> </div> </div> </div> </div> {% endblock %} {% block javaScript %} <script type=\"text/javascript\"> \$(document).ready(function() { var warning = \$(\"#applyWarning\"); // Grid var table = \$(\"#stats\").DataTable({ \"language\": dataTablesLanguage, serverSide: true, stateSave: true, deferLoading: 0, stateDuration: 0, stateLoadCallback: function (settings, callback) { var data = {}; \$.ajax({ type: \"GET\", async: false, url: \"{{ urlFor(\"user.pref\") }}?preference=proofOfPlayGrid\", dataType: 'json', success: function (json) { try { if (json.success) { data = JSON.parse(json.data.value); } } catch (e) { // Do nothing } } }); return data; }, stateSaveCallback: function (settings, data) { \$.ajax({ type: \"POST\", url: \"{{ urlFor(\"user.pref\") }}\", data: { preference: [{ option: \"proofOfPlayGrid\", value: JSON.stringify(data) }] } }); }, drawCallback: function( settings ) { setTimeout(function() { \$(\"#applyBtn\").removeClass('disabled'); }, 300); }, filter: false, searchDelay: 3000, \"order\": [[1, \"asc\"]], ajax: { \"url\": \"{{ urlFor(\"report.data\", {name: reportName}) }}\", \"data\": function (d) { \$.extend(d, \$(\"#stats\").closest(\".XiboGrid\").find(\".FilterDiv form\").serializeObject()); } }, \"columns\": [ {\"data\": \"type\"}, {\"data\": \"displayId\"}, {\"data\": \"display\"}, {\"data\": \"layoutId\"}, {\"data\": \"layout\"}, {\"data\": \"widgetId\"}, {\"data\": \"media\"}, {\"data\": \"tag\"}, {\"data\": \"numberPlays\"}, { \"data\": \"duration\", \"render\": function (data, type, row, meta) { if (type != \"display\") return \"\"; let durationData = moment.duration(data, \"seconds\"); let dataM = ''; let months = durationData.months(); if (months > 0) { durationData.subtract(moment.duration(months,'months')); dataM += months + '{% trans \"month\" %} '; } let days = durationData.days(); durationData.subtract(moment.duration(days,'days')); dataM += days + '{% trans \"day\" %} '; let hours = durationData.hours(); durationData.subtract(moment.duration(hours,'hours')); dataM += hours + '{% trans \"hr\" %} '; let minutes = durationData.minutes(); durationData.subtract(moment.duration(minutes,'minutes')); dataM += minutes + '{% trans \"min\" %} '; let seconds = durationData.seconds(); dataM += seconds + '{% trans \"sec\" %} '; return dataM; } }, {\"data\": \"duration\"}, {\"data\": \"minStart\"}, {\"data\": \"maxEnd\"} ] }); table.on('draw', dataTableDraw); table.on('processing.dt', dataTableProcessing); dataTableAddButtons(table, \$('#stats_wrapper').find('.col-sm-6').eq(1)); // Apply \$(\"#applyBtn\").click(function () { \$(this).addClass('disabled'); table.search(\$(\"#stats\").closest(\".XiboGrid\").find(\".FilterDiv form\")).draw(); }); // Report Filter var reportFilter = \$(\"#reportFilter\"); // Hide / Show FromDt and ToDt function checkReportFilter(reportFilter) { if (reportFilter.val() === '' || reportFilter.val() === undefined) { \$(\".stats-from-dt\").show(); \$(\".stats-to-dt\").show(); \$(\".stats-from-dt-time\").show(); \$(\".stats-to-dt-time\").show(); } else { \$(\".stats-from-dt\").hide(); \$(\".stats-to-dt\").hide(); \$(\".stats-from-dt-time\").hide(); \$(\".stats-to-dt-time\").hide(); } } // Calculate the difference of number of days of a selected range const calculateDaysShowHideWarn = function() { let fromDt = moment(\$(\"#statsFromDt\").val()); let toDt = moment(\$(\"#statsToDt\").val()); let days = toDt.diff(fromDt, 'days'); warning.hide(); if ( days >= 30) { warning.show(); } return true; }; \$(\"#statsFromDtLink\").change( function() { calculateDaysShowHideWarn(); }); \$(\"#statsToDtLink\").change( function() { calculateDaysShowHideWarn(); }); const checkFilterAndApply = function() { reportFilter.off('change').change( function() { var value = reportFilter.val(); // Hide / Show FromDt and ToDt checkReportFilter(reportFilter); // Hide / Show Warning warning.hide(); if ( value === '') { calculateDaysShowHideWarn(); } else if ( value === 'thismonth' || value === 'lastmonth' || value === 'thisyear' || value === 'lastyear') { warning.show(); } }); var anchorReportAddBtn = \$(\"a#reportAddBtn\"); var type = \$(\"#type\").val(); var tagsType = \$(\"#tagsType\").val(); var tags = \$(\"#tags\").val(); var exactTags = \$('#exactTags').is(\":checked\"); anchorReportAddBtn.attr(\"href\", \"{{ urlFor(\"reportschedule.add.form\") }}?type=\" + type + \"&tagsType=\" + tagsType + \"&tags=\" + tags + \"&exactTags=\" + exactTags + \"&reportName=proofofplayReport\" ); }; checkReportFilter(reportFilter); checkFilterAndApply(); }); function proofOfPlayScheduleCallback() { const \$displayId = \$('#proofofplayReport #displayId'); const \$layoutId = \$('#proofofplayReport [id=\"layoutId[]\"]'); const \$mediaId = \$('#proofofplayReport [id=\"mediaId[]\"]'); const \$newDisplayId = \$('#proofofplayScheduleAddForm #displayId'); const \$newLayoutId = \$('#proofofplayScheduleAddForm [id=\"layoutId[]\"]'); const \$newMediaId = \$('#proofofplayScheduleAddForm [id=\"mediaId[]\"]'); appendOptions(\$newDisplayId, \$displayId.find('option:selected').clone()); appendOptions(\$newLayoutId, \$layoutId.find('option:selected').clone()); appendOptions(\$newMediaId, \$mediaId.find('option:selected').clone()); } function appendOptions(element, options) { for (var i = 0; i < options.length; i++) { let option = options[i]; element.append(option).trigger('change'); \$(option).prop('selected', true); element.trigger({ type: 'select2:select', params: { data: option } }); } } </script> {% endblock %}", "proofofplay-report-form.twig", "/home/mgatv524/public_html/midiatech/reports/proofofplay-report-form.twig"); } }