3
* Xibo - Digital Signage - http://www.xibo.org.uk
4
* Copyright (C) 2006-2014 Daniel Garner
6
* This file is part of Xibo.
8
* Xibo is free software: you can redistribute it and/or modify
9
* it under the terms of the GNU Affero General Public License as published by
10
* the Free Software Foundation, either version 3 of the License, or
13
* Xibo is distributed in the hope that it will be useful,
14
* but WITHOUT ANY WARRANTY; without even the implied warranty of
15
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16
* GNU Affero General Public License for more details.
18
* You should have received a copy of the GNU Affero General Public License
19
* along with Xibo. If not, see <http://www.gnu.org/licenses/>.
22
* id = The GridID for rendering AJAX layout table return
23
* filter_id = The Filter Form ID
24
* form_meta = Extra form meta that needs to be sent to the CMS to return the list of layouts
25
* pager = A paging control for this Xibo Grid
27
use Xibo\Helper\Theme;
29
defined('XIBO') or die("Sorry, you are not allowed to directly access this page.<br /> Please press the back button in your browser.");
31
$displays = Theme::Get('display-widget-rows');
32
$displays = (is_array($displays)) ? $displays : array();
35
<div class="col-lg-3 col-md-6 col-xs-12">
37
<div class="widget-body">
38
<div class="widget-icon orange pull-left">
39
<i class="fa fa-desktop"></i>
41
<div class="widget-content pull-left">
42
<div class="title"><?php echo count($displays); ?></div>
43
<div class="comment"><?php echo ((count($displays) == 1) ? Theme::Translate('Display') : Theme::Translate('Displays')); ?></div>
45
<div class="clearfix"></div>
49
<div class="col-lg-3 col-md-6 col-xs-12">
51
<div class="widget-body">
52
<div class="widget-icon red pull-left">
53
<i class="fa fa-tasks"></i>
55
<div class="widget-content pull-left">
56
<div class="title"><?php echo Theme::Get('librarySize'); ?></div>
57
<div class="comment"><?php echo Theme::Translate('Library Size'); ?></div>
59
<div class="clearfix"></div>
63
<div class="col-lg-3 col-md-6 col-xs-12">
65
<div class="widget-body">
66
<div class="widget-icon green pull-left">
67
<i class="fa fa-users"></i>
69
<div class="widget-content pull-left">
70
<div class="title"><?php echo Theme::Get('countUsers'); ?></div>
71
<div class="comment"><?php echo ((Theme::Get('countUsers') == 1) ? Theme::Translate('User') : Theme::Translate('Users')); ?></div>
73
<div class="clearfix"></div>
77
<div class="col-lg-3 col-md-6 col-xs-12">
79
<div class="widget-body">
80
<div class="widget-icon blue pull-left">
81
<i class="fa fa-cogs"></i>
83
<div class="widget-content pull-left">
84
<?php if (Theme::Get('embedded-widget') != '') {
85
echo Theme::Get('embedded-widget');
88
<div class="title"><?php echo Theme::Get('nowShowing'); ?></div>
89
<div class="comment"><?php echo Theme::Translate('Now showing'); ?></div>
92
<div class="clearfix"></div>
98
<div class="col-lg-6">
100
<div class="widget-title">
101
<i class="fa fa-cloud-download"></i>
102
<?php if (Theme::Get('xmdsLimit') != '' ) {
103
echo Theme::Translate('Bandwidth Usage. Limit %s', Theme::Get('xmdsLimit'));
106
echo Theme::Translate('Bandwidth Usage (%s)', Theme::Get('bandwidthSuffix'));
108
<a class="pull-right" href="<?php echo Theme::urlFor('statsView'); ?>"><?php echo Theme::Translate('More Statistics'); ?></a>
109
<div class="clearfix"></div>
111
<div class="widget-body medium no-padding">
112
<div id="bandwidthChart" class="morrisChart" style="width:99%; height: 230px;"></div>
116
<div class="col-lg-6">
118
<div class="widget-title">
119
<i class="fa fa-tasks"></i>
120
<?php if (Theme::Get('libraryLimitSet') != '' ) {
121
echo Theme::Translate('Library Usage. Limit %s', Theme::Get('libraryLimit'));
124
echo Theme::Translate('Library Usage');
126
<div class="clearfix"></div>
128
<div class="widget-body medium no-padding">
129
<div id="libraryChart" class="morrisChart" style="width:99%; height: 230px;"></div>
135
<div class="col-lg-6">
137
<div class="widget-title">
138
<i class="fa fa-desktop"></i>
139
<?php echo Theme::Translate('Display Activity'); ?>
140
<div class="clearfix"></div>
142
<div class="widget-body medium no-padding">
143
<div class="table-responsive">
144
<table class="table">
147
<th><?php echo Theme::Translate('Display'); ?></th>
148
<th><?php echo Theme::Translate('Logged In'); ?></th>
149
<th><?php echo Theme::Translate('Licence'); ?></th>
153
<?php foreach($displays as $row) { ?>
154
<tr class="<?php echo $row['mediainventorystatus']; ?>">
155
<td><?php echo $row['display']; ?></td>
156
<td><span class="<?php echo ($row['loggedin'] == 1) ? 'glyphicon glyphicon-ok' : 'glyphicon glyphicon-remove'; ?>"></span></td>
157
<td><span class="<?php echo ($row['licensed'] == 1) ? 'glyphicon glyphicon-ok' : 'glyphicon glyphicon-remove'; ?>"></span></td>
166
<div class="col-lg-6">
167
<div class="widget news-widget">
168
<div class="widget-title">
169
<i class="fa fa-book"></i>
170
<?php echo Theme::Translate('Latest News'); ?>
171
<div class="clearfix"></div>
173
<div class="widget-body medium">
174
<?php foreach(Theme::Get('latestNews') as $news) { ?>
175
<div class="article">
176
<h4 class="article_title"><?php echo $news['title']; ?></h4>
177
<p><?php echo $news['description']; ?> <?php if ($news['link'] != '') { ?><a href="<?php echo $news['link']; ?>" title="Read" target="_blank"><?php echo Theme::Translate('Full Article'); ?></a>.<?php } ?></p>
184
<script type="text/javascript">
186
<?php if (Theme::Get('xmdsLimitSet') == '') { ?>
187
var yKeys = ['value'];
188
var labels = ['<?php echo Theme::Translate("Value"); ?>'];
190
var yKeys = ['value','limit'];
191
var labels = ['<?php echo Theme::Translate("Value"); ?>','<?php echo Theme::Translate("Remaining"); ?>'];
194
var bandwidthChart = {
197
element: 'bandwidthChart',
198
data: <?php echo Theme::Get('bandwidthWidget'); ?>,
202
stacked: <?php echo (Theme::Get('xmdsLimitSet') == '') ? 'false' : 'true'; ?>
209
element: 'libraryChart',
210
data: <?php echo Theme::Get('libraryWidget'); ?>,
211
formatter: function (y, data) { return y + "<?php echo Theme::Get('librarySuffix')?>"; }
b'\\ No newline at end of file'