diff --git a/includes/view/ShiftCalendarRenderer.php b/includes/view/ShiftCalendarRenderer.php
index ab13a5f3..2ba9b9e6 100644
--- a/includes/view/ShiftCalendarRenderer.php
+++ b/includes/view/ShiftCalendarRenderer.php
@@ -108,13 +108,7 @@ class ShiftCalendarRenderer {
$freeloader ++;
$style = " text-decoration: line-through;";
}
- if (in_array('user_shifts_admin', $privileges)) {
- $entry_list[] = "" . User_Nick_render(User($entry['UID'])) . ' ' . table_buttons([
- button(page_link_to('user_shifts') . '&entry_id=' . $entry['id'], glyph('trash'), 'btn-xs')
- ]) . '';
- } else {
- $entry_list[] = "" . User_Nick_render(User($entry['UID'])) . "";
- }
+ $entry_list[] = "" . User_Nick_render(User($entry['UID'])) . "";
}
if ($angeltype['count'] - count($angeltype['shift_entries']) - $freeloader > 0) {
$inner_text = sprintf(ngettext("%d helper needed", "%d helpers needed", $angeltype['count'] - count($angeltype['shift_entries'])), $angeltype['count'] - count($angeltype['shift_entries']));
@@ -138,7 +132,7 @@ class ShiftCalendarRenderer {
// User shift admins may join anybody in every shift
$user_may_join_shift |= in_array('user_shifts_admin', $privileges);
if ($user_may_join_shift) {
- $entry_list[] = '' . $inner_text . ' ' . button(page_link_to('user_shifts') . '&shift_id=' . $shift['SID'] . '&type_id=' . $angeltype['id'], _('Sign up'), 'btn-xs');
+ $entry_list[] = '' . $inner_text . ' ' . button(page_link_to('user_shifts') . '&shift_id=' . $shift['SID'] . '&type_id=' . $angeltype['id'], _('Sign up'), 'btn-xs btn-primary');
} else {
if (time() > $shift['start']) {
$entry_list[] = $inner_text . ' (' . _('ended') . ')';
@@ -182,15 +176,13 @@ class ShiftCalendarRenderer {
if ($blocks < 1) {
$blocks = 1;
}
+ $shift_length = ($shift["end"] - $shift["start"]) / (60 * 60);
+ $shift_heading = date('H:i', $shift['start']) . ' ‐ ' . date('H:i', $shift['end']) . ' — ' . ShiftType($shift['shifttype_id'])['name'];
return [
$blocks,
- '
' . div('panel panel-' . $class, [
+ ' | ' . div('panel panel-' . $class . '" style="min-height: ' . ($shift_length * 100) . 'px"', [
div('panel-heading', [
- date('H:i', $shift['start']),
- '‐',
- date('H:i', $shift['end']),
- '—',
- ShiftType($shift['shifttype_id'])['name'],
+ '' . $shift_heading . '',
$header_buttons
]),
div('panel-body', [
@@ -200,7 +192,8 @@ class ShiftCalendarRenderer {
'Name' => $shift['room_name']
])
]),
- $shifts_row
+ $shifts_row,
+ div('shift-spacer')
]) . ' | '
];
}
diff --git a/public/css/theme0.css b/public/css/theme0.css
index cb46b82c..0784042a 100644
--- a/public/css/theme0.css
+++ b/public/css/theme0.css
@@ -6739,10 +6739,10 @@ body {
}
#shifts.table td.shift {
height: 1px;
- padding: 0px 5px 5px 0px;
+ padding: 0;
}
#shifts.table td.shift .panel {
- margin-bottom: 0px;
+ margin: 0px 0px 0px 5px;
}
.row-day {
border-top: 2px solid #777777;
diff --git a/public/css/theme1.css b/public/css/theme1.css
index 916d303a..795439df 100644
--- a/public/css/theme1.css
+++ b/public/css/theme1.css
@@ -6762,10 +6762,10 @@ body {
}
#shifts.table td.shift {
height: 1px;
- padding: 0px 5px 5px 0px;
+ padding: 0;
}
#shifts.table td.shift .panel {
- margin-bottom: 0px;
+ margin: 0px 0px 0px 5px;
}
.row-day {
border-top: 2px solid #888888;
diff --git a/public/css/theme2.css b/public/css/theme2.css
index 5bc90f5f..0112dc93 100644
--- a/public/css/theme2.css
+++ b/public/css/theme2.css
@@ -6739,10 +6739,10 @@ body {
}
#shifts.table td.shift {
height: 1px;
- padding: 0px 5px 5px 0px;
+ padding: 0;
}
#shifts.table td.shift .panel {
- margin-bottom: 0px;
+ margin: 0px 0px 0px 5px;
}
.row-day {
border-top: 2px solid #777777;
diff --git a/public/css/theme3.css b/public/css/theme3.css
index 15c2c68d..4be828ef 100644
--- a/public/css/theme3.css
+++ b/public/css/theme3.css
@@ -6748,10 +6748,10 @@ body {
}
#shifts.table td.shift {
height: 1px;
- padding: 0px 5px 5px 0px;
+ padding: 0;
}
#shifts.table td.shift .panel {
- margin-bottom: 0px;
+ margin: 0px 0px 0px 5px;
}
.row-day {
border-top: 2px solid #777777;
diff --git a/shift_markup.html b/shift_markup.html
new file mode 100644
index 00000000..8d8fa63b
--- /dev/null
+++ b/shift_markup.html
@@ -0,0 +1,121 @@
+
+
+
+
+
+
+
+
+
+
+
10:00
+
+
+
+
11:00
+
+
+
+
12:00
+
+
+
+
13:00
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/themes/base.less b/themes/base.less
index 0a6d0d34..c5ff50b2 100644
--- a/themes/base.less
+++ b/themes/base.less
@@ -21,10 +21,11 @@ body {
td.shift {
height: 1px;
- padding: 0px 5px 5px 0px;
+ padding: 0;
.panel {
- margin-bottom: 0px;
+ margin: 0px 0px 0px 5px;
+ overflow: hidden;
}
}
}