PluginProbe ʕ •ᴥ•ʔ
VikAppointments Services Booking Calendar / trunk
VikAppointments Services Booking Calendar vtrunk
1.2.21 1.2.20 trunk 1.2.17 1.2.18 1.2.19
vikappointments / admin / views / analytics / tmpl / default.php
vikappointments / admin / views / analytics / tmpl Last commit date
default.php 4 years ago default_customers_toolbar.php 2 years ago index.html 4 years ago
default.php
93 lines
1 <?php
2 /**
3 * @package VikAppointments
4 * @subpackage core
5 * @author E4J s.r.l.
6 * @copyright Copyright (C) 2021 E4J s.r.l. All Rights Reserved.
7 * @license http://www.gnu.org/licenses/gpl-2.0.html GNU/GPL
8 * @link https://vikwp.com
9 */
10
11 // No direct access
12 defined('ABSPATH') or die('No script kiddies please!');
13
14 JHtml::fetch('formbehavior.chosen');
15 JHtml::fetch('vaphtml.assets.chartjs');
16 JHtml::fetch('vaphtml.assets.fontawesome');
17
18 $vik = VAPApplication::getInstance();
19
20 ?>
21
22 <script>
23
24 /**
25 * A lookup of preflights to be used before refreshing
26 * the contents of the widgets.
27 *
28 * If needed, a widget can register its own callback
29 * to be executed before the AJAX request is started.
30 *
31 * The property name MUST BE equals to the ID of
32 * the widget that is registering its callback.
33 *
34 * @var object
35 */
36 var WIDGET_PREFLIGHTS = {};
37
38 /**
39 * A lookup of callbacks to be used when refreshing
40 * the contents of the widgets.
41 *
42 * If needed, a widget can register its own callback
43 * to be executed once the AJAX request is completed.
44 *
45 * The property name MUST BE equals to the ID of
46 * the widget that is registering its callback.
47 *
48 * @var object
49 */
50 var WIDGET_CALLBACKS = {};
51
52 </script>
53
54 <form action="index.php?option=com_vikappointments" method="post" name="adminForm" id="adminForm">
55
56 <?php
57 if ($this->location == 'customers')
58 {
59 // display toolbar used by customers location
60 echo $this->loadTemplate('customers_toolbar');
61 }
62
63 // Display widgets dashboard through the apposite layout, since the same contents
64 // are used also by the analytics page.
65 echo JLayoutHelper::render('analytics.dashboard', ['dashboard' => $this->dashboard]);
66 ?>
67
68 <input type="hidden" name="location" value="<?php echo $this->escape($this->location); ?>" />
69 <input type="hidden" name="view" value="analytics" />
70 <input type="hidden" name="task" value="" />
71 <input type="hidden" name="option" value="com_vikappointments" />
72 </form>
73
74 <?php
75 // render inspector to manage widgets configuration
76 echo JHtml::fetch(
77 'vaphtml.inspector.render',
78 'widget-config-inspector',
79 array(
80 'title' => JText::translate('VAPMENUCONFIG'),
81 'closeButton' => true,
82 'keyboard' => false,
83 'footer' => '<button type="button" class="btn btn-success" id="widget-save-config" data-role="save">' . JText::translate('JAPPLY') . '</button>',
84 'width' => 400,
85 ),
86 // render inspector model through the apposite layout
87 JLayoutHelper::render('analytics.config', ['dashboard' => $this->dashboard])
88 );
89
90 // Register scripts through the apposite layout, since the same functions
91 // are used also by the analytics page.
92 echo JLayoutHelper::render('analytics.script', ['dashboard' => $this->dashboard]);
93