~xibo-maintainers/xibo/tempel

« back to all changes in this revision

Viewing changes to theme/default/html/status_dashboard.php

  • Committer: Dan Garner
  • Date: 2015-03-26 14:08:33 UTC
  • Revision ID: git-v1:70d14044444f8dc5d602b99890d59dea46d9470c
Moved web servable files to web folder

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
<?php
2
 
/*
3
 
 * Xibo - Digital Signage - http://www.xibo.org.uk
4
 
 * Copyright (C) 2006-2014 Daniel Garner
5
 
 *
6
 
 * This file is part of Xibo.
7
 
 *
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
11
 
 * any later version. 
12
 
 *
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.
17
 
 *
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/>.
20
 
 *
21
 
 * Theme variables:
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
26
 
 */
27
 
use Xibo\Helper\Theme;
28
 
 
29
 
defined('XIBO') or die("Sorry, you are not allowed to directly access this page.<br /> Please press the back button in your browser.");
30
 
 
31
 
$displays = Theme::Get('display-widget-rows');
32
 
$displays = (is_array($displays)) ? $displays : array();
33
 
?>
34
 
<div class="row">
35
 
    <div class="col-lg-3 col-md-6 col-xs-12">
36
 
        <div class="widget">
37
 
            <div class="widget-body">
38
 
                <div class="widget-icon orange pull-left">
39
 
                    <i class="fa fa-desktop"></i>
40
 
                </div>
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>
44
 
                </div>
45
 
                <div class="clearfix"></div>
46
 
            </div>
47
 
        </div>
48
 
    </div>
49
 
    <div class="col-lg-3 col-md-6 col-xs-12">
50
 
        <div class="widget">
51
 
            <div class="widget-body">
52
 
                <div class="widget-icon red pull-left">
53
 
                    <i class="fa fa-tasks"></i>
54
 
                </div>
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>
58
 
                </div>
59
 
                <div class="clearfix"></div>
60
 
            </div>
61
 
        </div>
62
 
    </div>
63
 
    <div class="col-lg-3 col-md-6 col-xs-12">
64
 
        <div class="widget">
65
 
            <div class="widget-body">
66
 
                <div class="widget-icon green pull-left">
67
 
                    <i class="fa fa-users"></i>
68
 
                </div>
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>
72
 
                </div>
73
 
                <div class="clearfix"></div>
74
 
            </div>
75
 
        </div>
76
 
    </div>
77
 
    <div class="col-lg-3 col-md-6 col-xs-12">
78
 
        <div class="widget">
79
 
            <div class="widget-body">
80
 
                <div class="widget-icon blue pull-left">
81
 
                    <i class="fa fa-cogs"></i>
82
 
                </div>
83
 
                <div class="widget-content pull-left">
84
 
                    <?php if (Theme::Get('embedded-widget') != '') {
85
 
                        echo Theme::Get('embedded-widget'); 
86
 
                    } else {
87
 
                    ?>
88
 
                    <div class="title"><?php echo Theme::Get('nowShowing'); ?></div>
89
 
                    <div class="comment"><?php echo Theme::Translate('Now showing'); ?></div>
90
 
                    <?php } ?>
91
 
                </div>
92
 
                <div class="clearfix"></div>
93
 
            </div>
94
 
        </div>
95
 
    </div>
96
 
</div>
97
 
<div class="row">
98
 
    <div class="col-lg-6">
99
 
        <div class="widget">
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'));
104
 
                }
105
 
                else {
106
 
                    echo Theme::Translate('Bandwidth Usage (%s)', Theme::Get('bandwidthSuffix'));
107
 
                } ?>
108
 
                <a class="pull-right" href="<?php echo Theme::urlFor('statsView'); ?>"><?php echo Theme::Translate('More Statistics'); ?></a>
109
 
                <div class="clearfix"></div>
110
 
            </div>
111
 
            <div class="widget-body medium no-padding">
112
 
                <div id="bandwidthChart" class="morrisChart" style="width:99%; height: 230px;"></div>   
113
 
            </div>
114
 
        </div>
115
 
    </div>
116
 
    <div class="col-lg-6">
117
 
        <div class="widget">
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'));
122
 
                }
123
 
                else {
124
 
                    echo Theme::Translate('Library Usage');
125
 
                } ?>
126
 
                <div class="clearfix"></div>
127
 
            </div>
128
 
            <div class="widget-body medium no-padding">
129
 
                <div id="libraryChart" class="morrisChart" style="width:99%; height: 230px;"></div>
130
 
            </div>
131
 
        </div>
132
 
    </div>
133
 
</div>
134
 
<div class="row">
135
 
    <div class="col-lg-6">
136
 
        <div class="widget">
137
 
            <div class="widget-title">
138
 
                <i class="fa fa-desktop"></i>
139
 
                <?php echo Theme::Translate('Display Activity'); ?>
140
 
                <div class="clearfix"></div>
141
 
            </div>
142
 
            <div class="widget-body medium no-padding">
143
 
                <div class="table-responsive">
144
 
                    <table class="table">
145
 
                        <thead>
146
 
                            <tr>
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>
150
 
                            </tr>
151
 
                        </thead>
152
 
                        <tbody>
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>
158
 
                            </tr>
159
 
                            <?php } ?>
160
 
                        </tbody>
161
 
                    </table>
162
 
                </div>
163
 
            </div>
164
 
        </div>
165
 
    </div>
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>
172
 
            </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>
178
 
                </div>
179
 
                <?php } ?>
180
 
            </div>
181
 
        </div>
182
 
    </div>
183
 
</div>
184
 
<script type="text/javascript">
185
 
 
186
 
    <?php if (Theme::Get('xmdsLimitSet') == '') { ?>
187
 
        var yKeys = ['value'];
188
 
        var labels = ['<?php echo Theme::Translate("Value"); ?>'];
189
 
    <?php } else { ?>
190
 
        var yKeys = ['value','limit'];
191
 
        var labels = ['<?php echo Theme::Translate("Value"); ?>','<?php echo Theme::Translate("Remaining"); ?>'];
192
 
    <?php } ?>
193
 
 
194
 
    var bandwidthChart = {
195
 
        type: 'bar',
196
 
        data: {
197
 
            element: 'bandwidthChart',
198
 
            data: <?php echo Theme::Get('bandwidthWidget'); ?>,
199
 
            xkey: 'label',
200
 
            ykeys: yKeys,
201
 
            labels: labels,
202
 
            stacked: <?php echo (Theme::Get('xmdsLimitSet') == '') ? 'false' : 'true'; ?>
203
 
        }
204
 
    };
205
 
 
206
 
    var libraryChart = {
207
 
        type: 'donut',
208
 
        data: {
209
 
            element: 'libraryChart',
210
 
            data: <?php echo Theme::Get('libraryWidget'); ?>,
211
 
            formatter: function (y, data) { return y + "<?php echo Theme::Get('librarySuffix')?>"; }
212
 
        }
213
 
    };
214
 
</script>
 
 
b'\\ No newline at end of file'