@ -1,4 +1,5 @@
<?php
<?php
function shifts_title() {
function shifts_title() {
return _("Shifts");
return _("Shifts");
}
}
@ -501,7 +502,10 @@ function view_user_shifts() {
$is_free = false;
$is_free = false;
$shifts_row = $shift['name'];
$shifts_row = $shift['name'];
if (in_array('admin_shifts', $privileges))
if (in_array('admin_shifts', $privileges))
$shifts_row .= ' ' . img_button('?p=user_shifts& edit_shift=' . $shift['SID'], 'pencil', _("edit")) . img_button('?p=user_shifts& delete_shift=' . $shift['SID'], 'bin', _("delete"));
$shifts_row .= ' ' . table_buttons(array(
button(page_link_to('user_shift') . '& edit_shift=' . $shift['SID'], glyph('edit'), 'btn-xs'),
button(page_link_to('user_shift') . '& 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`
@ -534,7 +538,9 @@ function view_user_shifts() {
$style .= " text-decoration: line-through;";
$style .= " text-decoration: line-through;";
}
}
if (in_array('user_shifts_admin', $privileges))
if (in_array('user_shifts_admin', $privileges))
$entry_list[] = "< span style = \"$style\" > " . User_Nick_render($entry) . ' ' . img_button(page_link_to('user_shifts') . '& entry_id=' . $entry['id'], 'bin', _("delete")) . '< / span > ';
$entry_list[] = "< span style = \"$style\" > " . User_Nick_render($entry) . ' ' . table_buttons(array(
button(page_link_to('user_shifts') . '& entry_id=' . $entry['id'], glyph('trash'), 'btn-xs')
)) . '< / span > ';
else
else
$entry_list[] = "< span style = \"$style\" > " . User_Nick_render($entry) . "< / span > ";
$entry_list[] = "< span style = \"$style\" > " . User_Nick_render($entry) . "< / span > ";
}
}
@ -632,7 +638,10 @@ function view_user_shifts() {
);
);
if (in_array('admin_shifts', $privileges))
if (in_array('admin_shifts', $privileges))
$shift_row['info'] .= ' ' . img_button('?p=user_shifts& edit_shift=' . $shift['SID'], 'pencil', 'edit') . img_button('?p=user_shifts& delete_shift=' . $shift['SID'], 'bin', _("delete"));
$shift_row['info'] .= ' ' . 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')
));
$shift_row['entries'] .= '< br / > ';
$shift_row['entries'] .= '< br / > ';
$is_free = false;
$is_free = false;
$shift_has_special_needs = 0 < sql_num_query ( " SELECT ` id ` FROM ` NeededAngelTypes ` WHERE ` shift_id ` = " . $ shift [ ' SID ' ] ) ;
$shift_has_special_needs = 0 < sql_num_query ( " SELECT ` id ` FROM ` NeededAngelTypes ` WHERE ` shift_id ` = " . $ shift [ ' SID ' ] ) ;
@ -659,7 +668,9 @@ function view_user_shifts() {
$freeloader = 0;
$freeloader = 0;
foreach ($entries as $entry) {
foreach ($entries as $entry) {
if (in_array('user_shifts_admin', $privileges))
if (in_array('user_shifts_admin', $privileges))
$member = User_Nick_render($entry) . ' ' . img_button(page_link_to('user_shifts') . '& entry_id=' . $entry['id'], 'bin', _("delete"));
$member = User_Nick_render($entry) . ' ' . table_buttons(array(
button(page_link_to('user_shifts') . '& entry_id=' . $entry['id'], glyph('trash'), 'btn-xs')
));
else
else
$member = User_Nick_render($entry);
$member = User_Nick_render($entry);
if ($entry['freeloaded']) {
if ($entry['freeloaded']) {