move shift edit buttons

This commit is contained in:
Philip Häusler 2014-12-28 01:30:29 +01:00
parent 0b70fc2a7f
commit cb46534569
1 changed files with 8 additions and 8 deletions

View File

@ -576,8 +576,13 @@ function view_user_shifts() {
// qqqqqq // qqqqqq
$is_free = false; $is_free = false;
$shifts_row = '';
$shifts_row = Room_name_render([ if (in_array('admin_shifts', $privileges))
$shifts_row .= '<div class="pull-right">' . table_buttons(array(
button(page_link_to('user_shifts') . '&edit_shift=' . $shift['SID'], glyph('edit'), 'btn-xs'),
button(page_link_to('user_shifts') . '&delete_shift=' . $shift['SID'], glyph('trash'), 'btn-xs')
)) . '</div>';
$shifts_row .= Room_name_render([
'RID' => $room['id'], 'RID' => $room['id'],
'Name' => $room['name'] 'Name' => $room['name']
]) . '<br />'; ]) . '<br />';
@ -592,11 +597,6 @@ function view_user_shifts() {
$shifts_row .= "<br />"; $shifts_row .= "<br />";
} }
$shifts_row .= '</a>'; $shifts_row .= '</a>';
if (in_array('admin_shifts', $privileges))
$shifts_row .= ' ' . table_buttons(array(
button(page_link_to('user_shifts') . '&edit_shift=' . $shift['SID'], glyph('edit'), 'btn-xs'),
button(page_link_to('user_shifts') . '&delete_shift=' . $shift['SID'], glyph('trash'), 'btn-xs')
));
$shifts_row .= '<br />'; $shifts_row .= '<br />';
$query = "SELECT `NeededAngelTypes`.`count`, `AngelTypes`.`id`, `AngelTypes`.`restricted`, `UserAngelTypes`.`confirm_user_id`, `AngelTypes`.`name`, `UserAngelTypes`.`user_id` $query = "SELECT `NeededAngelTypes`.`count`, `AngelTypes`.`id`, `AngelTypes`.`restricted`, `UserAngelTypes`.`confirm_user_id`, `AngelTypes`.`name`, `UserAngelTypes`.`user_id`
FROM `NeededAngelTypes` FROM `NeededAngelTypes`
@ -671,7 +671,7 @@ function view_user_shifts() {
$is_free = true; $is_free = true;
} }
$shifts_row .= '<strong>'.AngelType_name_render($angeltype) . ':</strong> '; $shifts_row .= '<strong>' . AngelType_name_render($angeltype) . ':</strong> ';
$shifts_row .= join(", ", $entry_list); $shifts_row .= join(", ", $entry_list);
$shifts_row .= '<br />'; $shifts_row .= '<br />';
} }