summaryrefslogtreecommitdiff
path: root/includes/view
diff options
context:
space:
mode:
authorPhilip Häusler <msquare@notrademark.de>2014-12-22 17:55:20 +0100
committerPhilip Häusler <msquare@notrademark.de>2014-12-22 17:55:20 +0100
commit6a05c3d9deb306eb7f64b275f54ec9dffec31023 (patch)
treef56dadcadbd2588c41dfa6dd6ac5b783dec4b4a0 /includes/view
parent0dbd0ea599fc04ab4b204c01e00e1c74d90ce3a8 (diff)
rewrite create shifts for shifttypes
Diffstat (limited to 'includes/view')
-rw-r--r--includes/view/Rooms_view.php10
-rw-r--r--includes/view/ShiftTypes_view.php7
2 files changed, 17 insertions, 0 deletions
diff --git a/includes/view/Rooms_view.php b/includes/view/Rooms_view.php
new file mode 100644
index 00000000..bb41a4d3
--- /dev/null
+++ b/includes/view/Rooms_view.php
@@ -0,0 +1,10 @@
+<?php
+
+function Room_name_render($room) {
+ global $privileges;
+ if (in_array('admin_rooms', $privileges))
+ return '<a href="' . room_link($room) . '">' . glyph('map-marker') . $room['Name'] . '</a>';
+ return $room['Name'];
+}
+
+?> \ No newline at end of file
diff --git a/includes/view/ShiftTypes_view.php b/includes/view/ShiftTypes_view.php
index 3f538a51..10431440 100644
--- a/includes/view/ShiftTypes_view.php
+++ b/includes/view/ShiftTypes_view.php
@@ -1,5 +1,12 @@
<?php
+function ShiftType_name_render($shifttype) {
+ global $privileges;
+ if (in_array('shifttypes', $privileges))
+ return '<a href="' . shifttype_link($shifttype) . '">' . $shifttype['name'] . '</a>';
+ return $shifttype['name'];
+}
+
function ShiftType_delete_view($shifttype) {
return page_with_title(sprintf(_("Delete shifttype %s"), $shifttype['name']), array(
info(sprintf(_("Do you want to delete shifttype %s?"), $shifttype['name']), true),