make shift calendar printable

main
msquare 5 years ago
parent 2ef5a7621a
commit 0c51d3c487

@ -252,7 +252,8 @@ function view_user_shifts()
[ [
button( button(
'javascript: checkOwnTypes(\'selection_types\', ' . json_encode($ownTypes) . ')', 'javascript: checkOwnTypes(\'selection_types\', ' . json_encode($ownTypes) . ')',
__('Own') __('Own'),
'hidden-print'
), ),
] ]
), ),
@ -324,8 +325,8 @@ function make_select($items, $selected, $name, $title = null, $additionalButtons
} }
$buttons = []; $buttons = [];
$buttons[] = button('javascript: checkAll(\'selection_' . $name . '\', true)', __('All')); $buttons[] = button('javascript: checkAll(\'selection_' . $name . '\', true)', __('All'), 'hidden-print');
$buttons[] = button('javascript: checkAll(\'selection_' . $name . '\', false)', __('None')); $buttons[] = button('javascript: checkAll(\'selection_' . $name . '\', false)', __('None'), 'hidden-print');
$buttons = array_merge($buttons, $additionalButtons); $buttons = array_merge($buttons, $additionalButtons);
$html .= buttons($buttons); $html .= buttons($buttons);

@ -190,7 +190,7 @@ class ShiftCalendarShiftRenderer
. '</a> ' . '</a> '
. button( . button(
shift_entry_create_link($shift, $angeltype), shift_entry_create_link($shift, $angeltype),
__('Sign up'), 'btn-xs btn-primary' __('Sign up'), 'btn-xs btn-primary hidden-print'
); );
break; break;
@ -258,7 +258,7 @@ class ShiftCalendarShiftRenderer
{ {
$header_buttons = ''; $header_buttons = '';
if (auth()->can('admin_shifts')) { if (auth()->can('admin_shifts')) {
$header_buttons = '<div class="pull-right">' . table_buttons([ $header_buttons = '<div class="pull-right hidden-print">' . table_buttons([
button( button(
page_link_to('user_shifts', ['edit_shift' => $shift['SID']]), page_link_to('user_shifts', ['edit_shift' => $shift['SID']]),
glyph('edit'), glyph('edit'),

@ -296,3 +296,9 @@ table a > .icon-icon_angel {
padding-left: 15px; padding-left: 15px;
} }
} }
@media print {
a[href]:after {
content: "";
}
}

@ -28,7 +28,7 @@
</div> </div>
</div> </div>
</div> </div>
<div class="form-group" style="margin-top: .5em"> <div class="form-group hidden-print" style="margin-top: .5em">
<div class="btn-group"> <div class="btn-group">
<a href="javascript:setDay(-1)" class="btn btn-default ">%set_yesterday%</a> <a href="javascript:setDay(-1)" class="btn btn-default ">%set_yesterday%</a>
<a href="javascript:setDay()" class="btn btn-default ">%set_today%</a> <a href="javascript:setDay()" class="btn btn-default ">%set_today%</a>
@ -41,19 +41,19 @@
<a href="javascript:setHours(8)" class="btn btn-default ">%set_next_8h%</a> <a href="javascript:setHours(8)" class="btn btn-default ">%set_next_8h%</a>
</div> </div>
</div> </div>
<div class="form-group" style="margin-top: .5em"> <div class="form-group hidden-print" style="margin-top: .5em">
<div class="btn-group"> <div class="btn-group">
%buttons% %buttons%
</div> </div>
</div> </div>
<div class="row"> <div class="row hidden-print">
<div class="col-md-12"> <div class="col-md-12">
<input class="btn btn-primary" type="submit" style="width:100%; margin: 1em 0" value="%filter%"> <input class="btn btn-primary" type="submit" style="width:100%; margin: 1em 0" value="%filter%">
</div> </div>
</div> </div>
</div> </div>
<div class="col-md-6"> <div class="col-md-6">
<button class="btn btn-info btn-sm" style="margin-top: 20px; margin-bottom:10px" type="button" <button class="btn btn-info btn-sm hidden-print" style="margin-top: 20px; margin-bottom:10px" type="button"
data-toggle="collapse" data-toggle="collapse"
data-target="#collapseRoomSelect" aria-expanded="false" data-target="#collapseRoomSelect" aria-expanded="false"
aria-controls="collapseRoomSelect" aria-controls="collapseRoomSelect"
@ -66,7 +66,7 @@
<div class="col-xs-4 col-xxs-12">%type_select%</div> <div class="col-xs-4 col-xxs-12">%type_select%</div>
<div class="col-xs-4 col-xxs-12">%filled_select%</div> <div class="col-xs-4 col-xxs-12">%filled_select%</div>
</div> </div>
<div class="row"> <div class="row hidden-print">
<div class="col-md-12" style="margin: 1em 0"> <div class="col-md-12" style="margin: 1em 0">
<p>%task_notice%</p> <p>%task_notice%</p>
</div> </div>
@ -78,4 +78,6 @@
%shifts_table% %shifts_table%
<div class="hidden-print">
%ical_text% %ical_text%
</div>
Loading…
Cancel
Save