You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
- Add functionallity to categorize a one or more services under one
service group. Partial fix for #7 and #90. (Frontend code to be done)
- Add description field to service to be displayed as a help text
on front page. Partial fix for #51 (Frontend code to be done)
<a href="<?phpechoWEB_URL;?>/admin/?do=new-service" class="btn btn-success pull-right"><?phpecho_("Add new service");?></a>
31
28
</div>
32
29
</form>
33
30
<?php }?>
34
31
<div class="table-responsive">
35
32
<table class="table">
36
-
33
+
37
34
<thead><tr>
38
-
<th scope="col"><?phpecho_("ID");?></th>
35
+
<!--<th scope="col"><?phpecho_("ID");?></th>-->
39
36
<th scope="col"><?phpecho_("Name");?></th>
37
+
<th scope="col"><?phpecho_("Description");?></th>
38
+
<th scope="col"><?phpecho_("Group");?></th>
40
39
<?phpif ($user->get_rank()<=1)
41
40
{?>
42
41
<th scope="col"><?phpecho_("Delete");?></th>
43
42
<?php } ?>
44
43
</tr>
45
44
</thead>
46
45
<tbody>
47
-
<?php
48
-
$query = $mysqli->query("SELECT * FROM services");
46
+
<?php
47
+
$query = $mysqli->query("SELECT services.*, services_groups.name AS group_name FROM `services` LEFT JOIN services_groups ON services.group_id = services_groups.id ORDER BY services.name ASC");
<a href="<?phpechoWEB_URL;?>/admin/?do=new-service-group" class="btn btn-success pull-right"><?phpecho_("Add new service group");?></a>
73
+
</div>
74
+
</form>
75
+
<?php }?>
76
+
<div class="table-responsive">
77
+
<table class="table">
78
+
79
+
<thead><tr>
80
+
<!--<th scope="col"><?phpecho_("ID");?></th>-->
81
+
<th scope="col"><?phpecho_("Group Name");?></th>
82
+
<th scope="col"><?phpecho_("In use by");?></th>
83
+
<th scope="col"><?phpecho_("Description");?></th>
84
+
<th scope="col"><?phpecho_("Visibility");?></th>
85
+
<?phpif ($user->get_rank()<=1)
86
+
{?>
87
+
<th scope="col"><?phpecho_("Delete");?></th>
88
+
<?php } ?>
89
+
</tr>
90
+
</thead>
91
+
<tbody>
92
+
<?php
93
+
$query = $mysqli->query("SELECT sg.* , (SELECT COUNT(*) FROM services WHERE services.group_id = sg.id) AS counter FROM services_groups AS sg ORDER BY sg.id ASC");
0 commit comments