From e665d1701ff588ad6d25ebad0876eca0ca72eafd Mon Sep 17 00:00:00 2001 From: Philip Häusler Date: Tue, 6 Sep 2011 20:45:06 +0200 Subject: create multiple shifts --- includes/pages/admin_shifts.php | 50 ++++++++++++++++++++++++ public/css/base.css | 32 +++++++++++++++ public/index.php | 4 ++ public/pic/engelsystem_logo.png | Bin 8736 -> 8177 bytes templates/admin_shifts.html | 67 ++++++++++++++++++++++++++++++++ templates/admin_shifts_angel_types.html | 14 +++++++ 6 files changed, 167 insertions(+) create mode 100644 includes/pages/admin_shifts.php create mode 100644 templates/admin_shifts.html create mode 100644 templates/admin_shifts_angel_types.html diff --git a/includes/pages/admin_shifts.php b/includes/pages/admin_shifts.php new file mode 100644 index 00000000..b6239f17 --- /dev/null +++ b/includes/pages/admin_shifts.php @@ -0,0 +1,50 @@ + 0) + $name = strip_request_item('name'); + else { + $ok = false; + $name = ""; + $msg .= error("Gib bitte einen Namen für die Schicht(en) an."); + } + + // Auswahl der sichtbaren Locations für die Schichten + $rooms = sql_select("SELECT * FROM `Room` WHERE `show`='Y' ORDER BY `Name`"); + $room_array = array (); + foreach ($rooms as $room) + $room_array[$room['RID']] = $room['Name']; + + if (isset ($_REQUEST['rid']) && preg_match("/^[0-9]+$/") && isset ($room_array[$_REQUEST['rid']])) + $rid = $_REQUEST['rid']; + else { + $ok = false; + $rid = 0; + $msg .= error("Wähle bitte einen Raum aus."); + } + + + + $room_select = html_select_key('rid', $room_array, ''); + + $types = sql_select("SELECT * FROM `AngelTypes` ORDER BY `Name`"); + $angel_types = ""; + foreach ($types as $type) { + $angel_types .= template_render('../templates/admin_shifts_angel_types.html', array ( + 'id' => $type['TID'], + 'type' => $type['Name'], + 'value' => "0" + )); + } + return template_render('../templates/admin_shifts.html', array ( + 'angel_types' => $angel_types, + 'room_select' => $room_select + )); +} +?> \ No newline at end of file diff --git a/public/css/base.css b/public/css/base.css index 2849f244..e93d2a9b 100644 --- a/public/css/base.css +++ b/public/css/base.css @@ -108,6 +108,15 @@ table { border-collapse: collapse; } +fieldset hr { + background-color: #f0f0f0; + border: none; + color: #f0f0f0; + height: 1px; + margin: 0; + padding: 0; +} + fieldset table { margin: 4px; } @@ -115,6 +124,7 @@ fieldset table { fieldset p { clear: both; margin: 4px; + min-height: 23px; } fieldset p label { @@ -123,6 +133,11 @@ fieldset p label { width: 200px; } +fieldset p label input { + float: right; + margin: 2px 10px 0 0; +} + th { background: #f0f0f0; } @@ -226,3 +241,20 @@ tr:hover .hidden { .done { text-decoration: line-through; } + +.spinner a { + background: #f0f0f0; + border: 1px solid #888; + padding: 1px 5px; + text-decoration: none; +} + +.spinner input { + border: 1px solid #888; + border-left: none; + border-right: none; + padding: 3px 3px 1px 3px; + margin: 0; + text-align: right; + width: 42px; +} diff --git a/public/index.php b/public/index.php index 7f24ee42..22a139ef 100644 --- a/public/index.php +++ b/public/index.php @@ -122,6 +122,10 @@ if (in_array($p, $privileges)) { require_once ('includes/pages/admin_import.php'); $content = admin_import(); } + elseif ($p == "admin_shifts") { + require_once ('includes/pages/admin_shifts.php'); + $content = admin_shifts(); + } elseif ($p == "admin_log") { require_once ('includes/pages/admin_log.php'); $content = admin_log(); diff --git a/public/pic/engelsystem_logo.png b/public/pic/engelsystem_logo.png index b017302e..6713dfcd 100644 Binary files a/public/pic/engelsystem_logo.png and b/public/pic/engelsystem_logo.png differ diff --git a/templates/admin_shifts.html b/templates/admin_shifts.html new file mode 100644 index 00000000..3c8da90c --- /dev/null +++ b/templates/admin_shifts.html @@ -0,0 +1,67 @@ +
+
+

+ + +

+

+ %room_select% +

+

+ + +

+

+ + +

Modus:

+

+ Eine Schicht erstellen. +

+

+ Mehrere Schichten erstellen: +

+

+ + +

+

+ Mehrere Schichten mit variabler Länge erstellen: +

+

+ + +

Benötigte Engel:

+

+ Benötigte Engel vom Ort übernehmen. +

+

+ Es werden folgende Engel benötigt: +

%angel_types% +

+ +

+
+
\ No newline at end of file diff --git a/templates/admin_shifts_angel_types.html b/templates/admin_shifts_angel_types.html new file mode 100644 index 00000000..49f60ce1 --- /dev/null +++ b/templates/admin_shifts_angel_types.html @@ -0,0 +1,14 @@ +

+ + -+ + +

-- cgit v1.2.3-54-g00ecf