minor bugfixes

main
Philip Häusler 10 years ago
parent c5331c44fd
commit f30bc25246

@ -24,7 +24,7 @@ function header_toolbar() {
$toolbar_items[] = toolbar_item_link(page_link_to('register'), 'plus', register_title(), $p == 'register'); $toolbar_items[] = toolbar_item_link(page_link_to('register'), 'plus', register_title(), $p == 'register');
if (in_array('user_myshifts', $privileges)) if (in_array('user_myshifts', $privileges))
$toolbar_items[] = toolbar_item_link(page_link_to('users') . '&action=view', ' icon-icon_angel', $user['Nick'], $p == 'user_myshifts'); $toolbar_items[] = toolbar_item_link(page_link_to('users') . '&action=view', ' icon-icon_angel', $user['Nick'], $p == 'users');
if (in_array('user_settings', $privileges)) if (in_array('user_settings', $privileges))
$toolbar_items[] = toolbar_item_link(page_link_to('user_settings'), 'list-alt', settings_title(), $p == 'user_settings'); $toolbar_items[] = toolbar_item_link(page_link_to('user_settings'), 'list-alt', settings_title(), $p == 'user_settings');

@ -256,16 +256,16 @@ function table($columns, $rows_raw, $data = true) {
$html .= '<table class="table ' . ($data ? ' data' : '') . '">'; $html .= '<table class="table ' . ($data ? ' data' : '') . '">';
$html .= '<thead><tr>'; $html .= '<thead><tr>';
foreach ($columns as $key => $column) foreach ($columns as $key => $column)
$html .= '<th class="' . $key . '">' . $column . '</th>'; $html .= '<th class="column_' . $key . '">' . $column . '</th>';
$html .= '</tr></thead>'; $html .= '</tr></thead>';
$html .= '<tbody>'; $html .= '<tbody>';
foreach ($rows as $row) { foreach ($rows as $row) {
$html .= '<tr>'; $html .= '<tr>';
foreach ($columns as $key => $column) foreach ($columns as $key => $column)
if (isset($row[$key])) if (isset($row[$key]))
$html .= '<td class="' . $key . '">' . $row[$key] . '</td>'; $html .= '<td class="column_' . $key . '">' . $row[$key] . '</td>';
else else
$html .= '<td class="' . $key . '">&nbsp;</td>'; $html .= '<td class="column_' . $key . '">&nbsp;</td>';
$html .= '</tr>'; $html .= '</tr>';
} }
$html .= '</tbody>'; $html .= '</tbody>';

@ -18,7 +18,7 @@ function ShiftEntry_edit_view($angel, $date, $location, $title, $type, $comment,
form_textarea('freeload_comment', _("Freeload comment (Only for shift coordination):"), $freeload_comment) form_textarea('freeload_comment', _("Freeload comment (Only for shift coordination):"), $freeload_comment)
); );
} else { } else {
$freeload_form = ""; $freeload_form = array();
} }
return page_with_title(_("Edit shift entry"), array( return page_with_title(_("Edit shift entry"), array(
form(array( form(array(

@ -1,5 +1,24 @@
<?php <?php
/**
* Available T-Shirt sizes
*/
$tshirt_sizes = array(
'' => _("Please select..."),
'S' => "S",
'M' => "M",
'L' => "L",
'XL' => "XL",
'2XL' => "2XL",
'3XL' => "3XL",
'4XL' => "4XL",
'5XL' => "5XL",
'S-G' => "S Girl",
'M-G' => "M Girl",
'L-G' => "L Girl",
'XL-G' => "XL Girl"
);
function User_shift_mode_render($shift_mode) { function User_shift_mode_render($shift_mode) {
if ($shift_mode == 0) if ($shift_mode == 0)
return '<span class="text-success">' . _("Free") . '</span>'; return '<span class="text-success">' . _("Free") . '</span>';
@ -124,25 +143,6 @@ function User_view($user_source, $admin_user_privilege, $freeloader, $user_shift
)); ));
} }
/**
* Available T-Shirt sizes
*/
$tshirt_sizes = array(
'' => _("Please select..."),
'S' => "S",
'M' => "M",
'L' => "L",
'XL' => "XL",
'2XL' => "2XL",
'3XL' => "3XL",
'4XL' => "4XL",
'5XL' => "5XL",
'S-G' => "S Girl",
'M-G' => "M Girl",
'L-G' => "L Girl",
'XL-G' => "XL Girl"
);
/** /**
* View for password recovery step 1: E-Mail * View for password recovery step 1: E-Mail
*/ */

Loading…
Cancel
Save