Skip to content
This repository was archived by the owner on Mar 30, 2024. It is now read-only.

Commit a3b5d9c

Browse files
committed
Design Updates
1 parent 219ad47 commit a3b5d9c

File tree

15 files changed

+122
-57
lines changed

15 files changed

+122
-57
lines changed

β€ŽVERSIONβ€Ž

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
latest
2-
0.2.2
2+
0.2.3
33
0.2
44
0

β€Žphp/core/Stats.phpβ€Ž

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,9 @@ public function __construct( Template $temp, Login $login ) {
3737
private function displayContent(array $data) : void {
3838
$this->temp->setContent('COMBIDATA', json_encode($data['combi']));
3939
$this->temp->setContent('PLAINDATA', json_encode(array_slice($data['plain'], 0, self::MAX_PLAIN_ELEMENTS)));
40+
if(count($data['combi']) > self::MAX_PLAIN_ELEMENTS){
41+
$this->temp->setContent('LESSDATADISABLE', '');
42+
}
4043
$this->temp->setContent('TABLEA', $this->arrayToTable($data['table']));
4144
if(isset($data['today'])){
4245
$this->temp->setContent('TABLEB', $this->arrayToTable($data['today']) );
@@ -45,26 +48,27 @@ private function displayContent(array $data) : void {
4548
}
4649

4750
private function arrayToTable(array $data) : string {
48-
$table = "<table class=\"accounttable\">";
51+
$table = "<table class=\"table table-striped table-responsive-sm\">";
4952
$head = false;
5053
$lastCat = '';
5154
foreach($data as $row){
5255
if(!$head){
53-
$table .= "<tr>";
56+
$table .= "<tr><thead class=\"thead-dark\">";
5457
foreach($row as $col => $val){
55-
$table .= "<th>". $col ."</th>";
58+
$table .= "<th scope=\"col\">". $col ."</th>";
5659
}
57-
$table .= "</tr>";
60+
$table .= "</thead></tr>";
5861
$head = true;
5962
}
60-
$table .= "<tr>";
63+
$table .= "<tr class=" . ( $row['Category'] !== $lastCat ? "\"table-active\"" : "" ) . ">";
6164
foreach($row as $key => $val){
6265
if($key === 'Category'){
6366
if( $val === $lastCat ){
6467
$table .= "<td></td>";
6568
}
6669
else{
67-
$table .= "<td>". $val ."</td>";
70+
$table .= "<th scope=\"row\">". $val ."</th>";
71+
6872
}
6973
$lastCat = $val;
7074
}

β€Žphp/core/templates/account_en.htmlβ€Ž

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -25,12 +25,14 @@ <h3>Administration</h3>
2525
</div>
2626
<div class="%%ISADMIN%%">
2727
<h4>Other accounts</h4>
28-
<table class="accounttable">
28+
<table class="accounttable table table-striped table-responsive-sm">
2929
<tr>
30-
<th>Account</th>
31-
<th>Admin</th>
32-
<th>Change password</th>
33-
<th>Delete</th>
30+
<thead class="thead-dark">
31+
<th>Account</th>
32+
<th>Admin</th>
33+
<th>Change password</th>
34+
<th>Delete</th>
35+
</thead>
3436
</tr>
3537
<!--MULTIPLE-Accounts-BEGIN-->
3638
<tr>
@@ -46,7 +48,7 @@ <h4>Other accounts</h4>
4648
<input type="submit" class="btn btn-secondary" value="Change password">
4749
</form>
4850
</td>
49-
<td><a href="%%SERVERURL%%/?task=account&delete=%%AID%%" onclick="return confirm('Delete Account \'%%ANAME%%\'?');"><button type="button" class="btn btn-danger">Delete</button></a></td>
51+
<td><a href="%%SERVERURL%%/?task=account&delete=%%AID%%" class="confirm confirmLink" title="Delete Account" content="Delete account with name '%%ANAME%%'?"><button type="button" class="btn btn-danger">Delete</button></a></td>
5052
</tr>
5153
<!--MULTIPLE-Accounts-END-->
5254
</table>

β€Žphp/core/templates/device_en.htmlβ€Ž

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3,17 +3,19 @@
33
</div>
44

55
<h3>Active devices</h3>
6-
<table class="accounttable">
6+
<table class="accounttable table table-striped table-responsive-sm">
77
<tr>
8-
<th>Device</th>
9-
<th>Regenerate token</th>
10-
<th>Delete</th>
8+
<thead class="thead-dark">
9+
<th>Device</th>
10+
<th>Regenerate token</th>
11+
<th>Delete</th>
12+
</thead>
1113
</tr>
1214
<!--MULTIPLE-Devices-BEGIN-->
1315
<tr>
1416
<td><code>%%NAME%%</code></td>
15-
<td><a href="%%SERVERURL%%/?task=devices&regenerate=%%DID%%" onclick="return confirm('Regenerate token for \'%%NAME%%\'?');"><button type="button" class="btn btn-warning">Regenerate</button></a></td>
16-
<td><a href="%%SERVERURL%%/?task=devices&delete=%%DID%%" onclick="return confirm('Delete device \'%%NAME%%\'?');"><button type="button" class="btn btn-danger">Delete</button></a></td>
17+
<td><a href="%%SERVERURL%%/?task=devices&regenerate=%%DID%%" class="confirm confirmLink" title="Regenerate Token" content="Regenerate token for device '%%NAME%%'?"><button type="button" class="btn btn-warning">Regenerate</button></a></td>
18+
<td><a href="%%SERVERURL%%/?task=devices&delete=%%DID%%" class="confirm confirmLink" title="Delete Device" content="Delete device with name '%%NAME%%'?"><button type="button" class="btn btn-danger">Delete</button></a></td>
1719
</tr>
1820
<!--MULTIPLE-Devices-END-->
1921
</table>

β€Žphp/core/templates/edit_en.htmlβ€Ž

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -116,21 +116,23 @@ <h3>Delete task</h3>
116116

117117
<div class="%%DAYDISABLED%%">
118118
<h4>Tasks <code>%%SELCTEDDAY%%</code></h4>
119-
<table class="accounttable">
119+
<table class="accounttable table table-striped table-responsive-sm">
120120
<tr>
121-
<th>Category</th>
122-
<th>Task</th>
123-
<th>Begin</th>
124-
<th>End</th>
125-
<th></th>
121+
<thead class="thead-dark">
122+
<th>Category</th>
123+
<th>Task</th>
124+
<th>Begin</th>
125+
<th>End</th>
126+
<th></th>
127+
</thead>
126128
</tr>
127129
<!--MULTIPLE-Day-BEGIN-->
128130
<tr>
129131
<td>%%CAT%%</td>
130132
<td>%%NAME%%</td>
131133
<td>%%BEGIN%%</td>
132134
<td>%%END%%</td>
133-
<td><a href="%%SERVERURL%%/?task=record&day=%%SELCTEDDAY%%&delete=%%ID%%" onclick="return confirm('Delete \'%%NAME%%\' starting \'%%BEGIN%%\'?');"><button type="button" class="btn btn-danger">Delete</button></a></td>
135+
<td><a href="%%SERVERURL%%/?task=record&day=%%SELCTEDDAY%%&delete=%%ID%%" class="confirm confirmLink" title="Delete Task" content="Delete the task '%%NAME%%' starting at '%%BEGIN%%'?"><button type="button" class="btn btn-danger">Delete</button></a></td>
134136
</tr>
135137
<!--MULTIPLE-Day-END-->
136138
</table>
Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
1-
<ul class="list-group">
2-
<!--MULTIPLE-Links-BEGIN-->
3-
<li class="list-group-item"><a href="%%SERVERURL%%/?task=%%PARAM%%">%%NAME%%</a></li>
4-
<!--MULTIPLE-Links-END-->
5-
</ul>
1+
<center>
2+
<ul class="list-group">
3+
<!--MULTIPLE-Links-BEGIN-->
4+
<li class="list-group-item"><a href="%%SERVERURL%%/?task=%%PARAM%%">%%NAME%%</a></li>
5+
<!--MULTIPLE-Links-END-->
6+
</ul>
7+
</center>

β€Žphp/core/templates/main_en.htmlβ€Ž

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,13 +30,14 @@
3030
<script src="%%SERVERURL%%/load/jquery.min.js?%%VERSIONSEED%%"></script>
3131
<script src="%%SERVERURL%%/load/jquery-ui.min.js?%%VERSIONSEED%%"></script>
3232
<script src="%%SERVERURL%%/load/chart.min.js?%%VERSIONSEED%%"></script>
33+
<script src="%%SERVERURL%%/load/main.js?%%VERSIONSEED%%"></script>
3334
%%MOREHEADER%%
3435
</head>
3536
<body>
3637
<div id="main">
3738
<h1>Task&shy;Time&shy;Terminate Server</h1>
3839
<div id="logoutbox" class="%%DISPLAYLOGOUTBOX%%">
39-
<p>Hi <span class="badge badge-success">%%GROUP%%</span>!</p>
40+
Hi <span class="badge badge-success">%%GROUP%%</span>! &mdash;
4041
<a href="%%SERVERURL%%/?logout" class="btn-sm btn-warning">Logout</a>
4142
</div>
4243
<p>%%HOMELINK%% <button type="button" class="btn btn-light" style="visibility: hidden;">&nbsp;</button></p>

β€Žphp/core/templates/stats.jsonβ€Ž

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
{
22
"%%NOTEDISABLE%%" : "disable",
33
"%%CMDDISABLE%%" : "disable",
4+
"%%LESSDATADISABLE%%" : "disable",
45
"%%NOTEMSG%%" : "",
56
"%%TODAY%%" : "",
67
"multiples" : {

β€Žphp/core/templates/stats_en.htmlβ€Ž

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -144,7 +144,9 @@ <h3>Graph</h3>
144144
</div> &nbsp;
145145
<button id="displaygraph" class="btn btn-secondary">Display Graph</button>
146146
</div>
147-
147+
<div class="alert alert-danger %%LESSDATADISABLE%% m-2" role="alert">
148+
The selected timespan contains a huge amount of data, some graphs may not display all data!
149+
</div>
148150

149151
<div style="width: 99%;">
150152
<canvas id="maingraph"></canvas>

β€Žphp/load/chart.min.jsβ€Ž

Lines changed: 3 additions & 9 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
Β (0)