default.php
8.09 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
<?php
/**
* @package Joomla.Administrator
* @subpackage com_privacy
*
* @copyright Copyright (C) 2005 - 2019 Open Source Matters, Inc. All rights reserved.
* @license GNU General Public License version 2 or later; see LICENSE.txt
*/
defined('_JEXEC') or die;
use Joomla\CMS\Language\Text;
use Joomla\CMS\Router\Route;
/** @var PrivacyViewDashboard $this */
// Include the component HTML helpers.
JHtml::addIncludePath(JPATH_ADMINISTRATOR . '/components/com_privacy/helpers/html');
JHtml::_('bootstrap.tooltip');
$totalRequests = 0;
$activeRequests = 0;
?>
<?php if (!empty($this->sidebar)) : ?>
<div id="j-sidebar-container" class="span2">
<?php echo $this->sidebar; ?>
</div>
<div id="j-main-container" class="span10">
<?php else : ?>
<div id="j-main-container">
<?php endif; ?>
<div class="row-fluid">
<div class="span6">
<div class="well well-small">
<h3 class="module-title nav-header"><?php echo Text::_('COM_PRIVACY_DASHBOARD_HEADING_TOTAL_REQUEST_COUNT'); ?></h3>
<div class="row-striped">
<?php if (count($this->requestCounts)) : ?>
<div class="row-fluid">
<div class="span5"><strong><?php echo Text::_('COM_PRIVACY_DASHBOARD_HEADING_REQUEST_TYPE'); ?></strong></div>
<div class="span5"><strong><?php echo Text::_('COM_PRIVACY_DASHBOARD_HEADING_REQUEST_STATUS'); ?></strong></div>
<div class="span2"><strong><?php echo Text::_('COM_PRIVACY_DASHBOARD_HEADING_REQUEST_COUNT'); ?></strong></div>
</div>
<?php foreach ($this->requestCounts as $row) : ?>
<div class="row-fluid">
<div class="span5">
<a class="hasTooltip" href="<?php echo JRoute::_('index.php?option=com_privacy&view=requests&filter[request_type]=' . $row->request_type . '&filter[status]=' . $row->status); ?>" data-original-title="<?php echo JText::_('COM_PRIVACY_DASHBOARD_VIEW_REQUESTS'); ?>">
<strong><?php echo Text::_('COM_PRIVACY_HEADING_REQUEST_TYPE_TYPE_' . $row->request_type); ?></strong>
</a>
</div>
<div class="span5"><?php echo JHtml::_('PrivacyHtml.helper.statusLabel', $row->status); ?></div>
<div class="span2"><span class="badge badge-info"><?php echo $row->count; ?></span></div>
</div>
<?php if (in_array($row->status, array(0, 1))) : ?>
<?php $activeRequests += $row->count; ?>
<?php endif; ?>
<?php $totalRequests += $row->count; ?>
<?php endforeach; ?>
<div class="row-fluid">
<div class="span5"><?php echo Text::plural('COM_PRIVACY_DASHBOARD_BADGE_TOTAL_REQUESTS', $totalRequests); ?></div>
<div class="span7"><?php echo Text::plural('COM_PRIVACY_DASHBOARD_BADGE_ACTIVE_REQUESTS', $activeRequests); ?></div>
</div>
<?php else : ?>
<div class="row-fluid">
<div class="span12">
<div class="alert"><?php echo Text::_('COM_PRIVACY_DASHBOARD_NO_REQUESTS'); ?></div>
</div>
</div>
<?php endif; ?>
</div>
</div>
</div>
<div class="span6">
<div class="well well-small">
<h3 class="module-title nav-header"><?php echo Text::_('COM_PRIVACY_DASHBOARD_HEADING_STATUS_CHECK'); ?></h3>
<div class="row-striped">
<div class="row-fluid">
<div class="span3"><strong><?php echo Text::_('COM_PRIVACY_DASHBOARD_HEADING_STATUS'); ?></strong></div>
<div class="span9"><strong><?php echo Text::_('COM_PRIVACY_DASHBOARD_HEADING_CHECK'); ?></strong></div>
</div>
<div class="row-fluid">
<div class="span3">
<?php if ($this->privacyPolicyInfo['published'] && $this->privacyPolicyInfo['articlePublished']) : ?>
<span class="label label-success">
<span class="icon-checkbox" aria-hidden="true"></span>
<?php echo Text::_('JPUBLISHED'); ?>
</span>
<?php elseif ($this->privacyPolicyInfo['published'] && !$this->privacyPolicyInfo['articlePublished']) : ?>
<span class="label label-warning">
<span class="icon-warning" aria-hidden="true"></span>
<?php echo Text::_('JUNPUBLISHED'); ?>
</span>
<?php else : ?>
<span class="label label-warning">
<span class="icon-warning" aria-hidden="true"></span>
<?php echo Text::_('COM_PRIVACY_STATUS_CHECK_NOT_AVAILABLE'); ?>
</span>
<?php endif; ?>
</div>
<div class="span9">
<div><?php echo Text::_('COM_PRIVACY_STATUS_CHECK_PRIVACY_POLICY_PUBLISHED'); ?></div>
<?php if ($this->privacyPolicyInfo['editLink'] !== '') : ?>
<small><a href="<?php echo $this->privacyPolicyInfo['editLink']; ?>"><?php echo Text::_('COM_PRIVACY_EDIT_PRIVACY_POLICY'); ?></a></small>
<?php else : ?>
<?php $link = Route::_('index.php?option=com_plugins&task=plugin.edit&extension_id=' . $this->privacyConsentPluginId); ?>
<small><a href="<?php echo $link; ?>"><?php echo Text::_('COM_PRIVACY_EDIT_PRIVACY_CONSENT_PLUGIN'); ?></a></small>
<?php endif; ?>
</div>
</div>
<div class="row-fluid">
<div class="span3">
<?php if ($this->requestFormPublished['published'] && $this->requestFormPublished['exists']) : ?>
<span class="label label-success">
<span class="icon-checkbox" aria-hidden="true"></span>
<?php echo Text::_('JPUBLISHED'); ?>
</span>
<?php elseif (!$this->requestFormPublished['published'] && $this->requestFormPublished['exists']) : ?>
<span class="label label-warning">
<span class="icon-warning" aria-hidden="true"></span>
<?php echo Text::_('JUNPUBLISHED'); ?>
</span>
<?php else : ?>
<span class="label label-warning">
<span class="icon-warning" aria-hidden="true"></span>
<?php echo Text::_('COM_PRIVACY_STATUS_CHECK_NOT_AVAILABLE'); ?>
</span>
<?php endif; ?>
</div>
<div class="span9">
<div><?php echo Text::_('COM_PRIVACY_STATUS_CHECK_REQUEST_FORM_MENU_ITEM_PUBLISHED'); ?></div>
<?php if ($this->requestFormPublished['link'] !== '') : ?>
<small><a href="<?php echo $this->requestFormPublished['link']; ?>"><?php echo $this->requestFormPublished['link']; ?></a></small>
<?php endif; ?>
</div>
</div>
<div class="row-fluid">
<div class="span3">
<?php if ($this->numberOfUrgentRequests === 0) : ?>
<span class="label label-success">
<span class="icon-checkbox" aria-hidden="true"></span>
<?php echo Text::_('JNONE'); ?>
</span>
<?php else : ?>
<span class="label label-important">
<span class="icon-warning" aria-hidden="true"></span>
<?php echo Text::_('WARNING'); ?>
</span>
<?php endif; ?>
</div>
<div class="span9">
<div><?php echo Text::_('COM_PRIVACY_STATUS_CHECK_OUTSTANDING_URGENT_REQUESTS'); ?></div>
<small><?php echo Text::plural('COM_PRIVACY_STATUS_CHECK_OUTSTANDING_URGENT_REQUESTS_DESCRIPTION', $this->urgentRequestDays); ?></small>
<?php if ($this->numberOfUrgentRequests > 0) : ?>
<small><a href="<?php echo Route::_('index.php?option=com_privacy&view=requests&filter[status]=1&list[fullordering]=a.requested_at ASC'); ?>"><?php echo JText::_('COM_PRIVACY_SHOW_URGENT_REQUESTS'); ?></a></small>
<?php endif; ?>
</div>
</div>
<div class="row-fluid">
<div class="span3">
<?php if ($this->sendMailEnabled) : ?>
<span class="label label-success">
<span class="icon-checkbox" aria-hidden="true"></span>
<?php echo Text::_('JENABLED'); ?>
</span>
<?php else : ?>
<span class="label label-important">
<span class="icon-warning" aria-hidden="true"></span>
<?php echo Text::_('JDISABLED'); ?>
</span>
<?php endif; ?>
</div>
<div class="span9">
<?php if (!$this->sendMailEnabled) : ?>
<div><?php echo Text::_('COM_PRIVACY_STATUS_CHECK_SENDMAIL_DISABLED'); ?></div>
<small><?php echo Text::_('COM_PRIVACY_STATUS_CHECK_SENDMAIL_DISABLED_DESCRIPTION'); ?></small>
<?php else : ?>
<div><?php echo Text::_('COM_PRIVACY_STATUS_CHECK_SENDMAIL_ENABLED'); ?></div>
<?php endif; ?>
</div>
</div>
</div>
</div>
</div>
</div>
</div>