summaryrefslogtreecommitdiff
path: root/includes/view
diff options
context:
space:
mode:
Diffstat (limited to 'includes/view')
-rw-r--r--includes/view/AngelTypes_view.php148
-rw-r--r--includes/view/EventConfig_view.php60
-rw-r--r--includes/view/Questions_view.php26
-rw-r--r--includes/view/ShiftCalendarRenderer.php9
-rw-r--r--includes/view/ShiftCalendarShiftRenderer.php20
-rw-r--r--includes/view/ShiftEntry_view.php22
-rw-r--r--includes/view/ShiftTypes_view.php10
-rw-r--r--includes/view/ShiftsFilterRenderer.php2
-rw-r--r--includes/view/Shifts_view.php8
-rw-r--r--includes/view/UserAngelTypes_view.php60
-rw-r--r--includes/view/UserDriverLicenses_view.php24
-rw-r--r--includes/view/User_view.php244
12 files changed, 317 insertions, 316 deletions
diff --git a/includes/view/AngelTypes_view.php b/includes/view/AngelTypes_view.php
index 0a97488d..be866c9b 100644
--- a/includes/view/AngelTypes_view.php
+++ b/includes/view/AngelTypes_view.php
@@ -26,15 +26,15 @@ function AngelType_render_membership($user_angeltype)
if ($user_angeltype['user_angeltype_id'] != null) {
if ($user_angeltype['restricted']) {
if ($user_angeltype['confirm_user_id'] == null) {
- return glyph('lock') . _("Unconfirmed");
+ return glyph('lock') . _('Unconfirmed');
} elseif ($user_angeltype['supporter']) {
- return glyph_bool(true) . _("supporter");
+ return glyph_bool(true) . _('supporter');
}
- return glyph_bool(true) . _("Member");
+ return glyph_bool(true) . _('Member');
} elseif ($user_angeltype['supporter']) {
- return glyph_bool(true) . _("supporter");
+ return glyph_bool(true) . _('supporter');
}
- return glyph_bool(true) . _("Member");
+ return glyph_bool(true) . _('Member');
}
return glyph_bool(false);
}
@@ -45,13 +45,13 @@ function AngelType_render_membership($user_angeltype)
*/
function AngelType_delete_view($angeltype)
{
- return page_with_title(sprintf(_("Delete angeltype %s"), $angeltype['name']), [
- info(sprintf(_("Do you want to delete angeltype %s?"), $angeltype['name']), true),
+ return page_with_title(sprintf(_('Delete angeltype %s'), $angeltype['name']), [
+ info(sprintf(_('Do you want to delete angeltype %s?'), $angeltype['name']), true),
buttons([
- button(page_link_to('angeltypes'), _("cancel"), 'cancel'),
+ button(page_link_to('angeltypes'), _('cancel'), 'cancel'),
button(
page_link_to('angeltypes') . '&action=delete&angeltype_id=' . $angeltype['id'] . '&confirmed',
- _("delete"),
+ _('delete'),
'ok'
)
])
@@ -68,38 +68,38 @@ function AngelType_delete_view($angeltype)
function AngelType_edit_view($angeltype, $supporter_mode)
{
$contact_info = AngelType_contact_info($angeltype);
- return page_with_title(sprintf(_("Edit %s"), $angeltype['name']), [
+ return page_with_title(sprintf(_('Edit %s'), $angeltype['name']), [
buttons([
- button(page_link_to('angeltypes'), _("Angeltypes"), 'back')
+ button(page_link_to('angeltypes'), _('Angeltypes'), 'back')
]),
msg(),
form([
$supporter_mode
- ? form_info(_("Name"), $angeltype['name'])
- : form_text('name', _("Name"), $angeltype['name']),
+ ? form_info(_('Name'), $angeltype['name'])
+ : form_text('name', _('Name'), $angeltype['name']),
$supporter_mode
- ? form_info(_("Restricted"), $angeltype['restricted'] ? _("Yes") : _("No"))
- : form_checkbox('restricted', _("Restricted"), $angeltype['restricted']),
+ ? form_info(_('Restricted'), $angeltype['restricted'] ? _('Yes') : _('No'))
+ : form_checkbox('restricted', _('Restricted'), $angeltype['restricted']),
$supporter_mode
- ? form_info(_("No Self Sign Up"), $angeltype['no_self_signup'] ? _("Yes") : _("No"))
- : form_checkbox('no_self_signup', _("No Self Sign Up"), $angeltype['no_self_signup']),
+ ? form_info(_('No Self Sign Up'), $angeltype['no_self_signup'] ? _('Yes') : _('No'))
+ : form_checkbox('no_self_signup', _('No Self Sign Up'), $angeltype['no_self_signup']),
$supporter_mode
- ? form_info(_("Requires driver license"), $angeltype['requires_driver_license'] ? _("Yes") : _("No"))
+ ? form_info(_('Requires driver license'), $angeltype['requires_driver_license'] ? _('Yes') : _('No'))
: form_checkbox(
'requires_driver_license',
- _("Requires driver license"),
+ _('Requires driver license'),
$angeltype['requires_driver_license']
),
- //form_text('contact_name', _("Name"), $angeltype['contact_name']),
- //form_text('contact_dect', _("DECT"), $angeltype['contact_dect']),
- //form_text('contact_email', _("E-Mail"), $angeltype['contact_email']),
+ //form_text('contact_name', _('Name'), $angeltype['contact_name']),
+ //form_text('contact_dect', _('DECT'), $angeltype['contact_dect']),
+ //form_text('contact_email', _('E-Mail'), $angeltype['contact_email']),
form_info(
- "",
- _("Restricted angel types can only be used by an angel if enabled by a supporter (double opt-in).")
+ '',
+ _('Restricted angel types can only be used by an angel if enabled by a supporter (double opt-in).')
),
- form_textarea('description', _("Description"), $angeltype['description']),
- form_info("", _("Please use markdown for the description.")),
- form_submit('submit', _("Save"))
+ form_textarea('description', _('Description'), $angeltype['description']),
+ form_info('', _('Please use markdown for the description.')),
+ form_submit('submit', _('Save'))
])
]);
}
@@ -118,45 +118,45 @@ function AngelType_edit_view($angeltype, $supporter_mode)
function AngelType_view_buttons($angeltype, $user_angeltype, $admin_angeltypes, $supporter, $user_driver_license, $user)
{
$buttons = [
- button(page_link_to('angeltypes'), _("Angeltypes"), 'back')
+ button(page_link_to('angeltypes'), _('Angeltypes'), 'back')
];
if ($angeltype['requires_driver_license']) {
- $buttons[] = button(user_driver_license_edit_link($user), glyph("road") . _("my driving license"));
+ $buttons[] = button(user_driver_license_edit_link($user), glyph('road') . _('my driving license'));
}
if ($user_angeltype == null) {
$buttons[] = button(
page_link_to('user_angeltypes') . '&action=add&angeltype_id=' . $angeltype['id'],
- _("join"),
+ _('join'),
'add'
);
} else {
if ($angeltype['requires_driver_license'] && $user_driver_license == null) {
- error(_("This angeltype requires a driver license. Please enter your driver license information!"));
+ error(_('This angeltype requires a driver license. Please enter your driver license information!'));
}
if ($angeltype['restricted'] && $user_angeltype['confirm_user_id'] == null) {
error(sprintf(
- _("You are unconfirmed for this angeltype. Please go to the introduction for %s to get confirmed."),
+ _('You are unconfirmed for this angeltype. Please go to the introduction for %s to get confirmed.'),
$angeltype['name']
));
}
$buttons[] = button(page_link_to('user_angeltypes') . '&action=delete&user_angeltype_id=' . $user_angeltype['id'],
- _("leave"), 'cancel');
+ _('leave'), 'cancel');
}
if ($admin_angeltypes || $supporter) {
$buttons[] = button(
page_link_to('angeltypes') . '&action=edit&angeltype_id=' . $angeltype['id'],
- _("edit"),
+ _('edit'),
'edit'
);
}
if ($admin_angeltypes) {
$buttons[] = button(
page_link_to('angeltypes') . '&action=delete&angeltype_id=' . $angeltype['id'],
- _("delete"),
+ _('delete'),
'delete'
);
}
@@ -195,12 +195,12 @@ function AngelType_view_members($angeltype, $members, $admin_user_angeltypes, $a
$member['actions'] = table_buttons([
button(
page_link_to('user_angeltypes') . '&action=confirm&user_angeltype_id=' . $member['user_angeltype_id'],
- _("confirm"),
+ _('confirm'),
'btn-xs'
),
button(
page_link_to('user_angeltypes') . '&action=delete&user_angeltype_id=' . $member['user_angeltype_id'],
- _("deny"),
+ _('deny'),
'btn-xs'
)
]);
@@ -210,7 +210,7 @@ function AngelType_view_members($angeltype, $members, $admin_user_angeltypes, $a
$member['actions'] = table_buttons([
button(
page_link_to('user_angeltypes') . '&action=update&user_angeltype_id=' . $member['user_angeltype_id'] . '&supporter=0',
- _("Remove supporter rights"),
+ _('Remove supporter rights'),
'btn-xs'
)
]);
@@ -223,11 +223,11 @@ function AngelType_view_members($angeltype, $members, $admin_user_angeltypes, $a
$member['actions'] = table_buttons([
$admin_angeltypes
? button(page_link_to('user_angeltypes') . '&action=update&user_angeltype_id=' . $member['user_angeltype_id'] . '&supporter=1',
- _("Add supporter rights"), 'btn-xs')
+ _('Add supporter rights'), 'btn-xs')
: '',
button(
page_link_to('user_angeltypes') . '&action=delete&user_angeltype_id=' . $member['user_angeltype_id'],
- _("remove"),
+ _('remove'),
'btn-xs'
)
]);
@@ -255,21 +255,21 @@ function AngelType_view_table_headers($angeltype, $supporter, $admin_angeltypes)
{
if ($angeltype['requires_driver_license'] && ($supporter || $admin_angeltypes)) {
return [
- 'Nick' => _("Nick"),
- 'DECT' => _("DECT"),
- 'wants_to_drive' => _("Driver"),
- 'has_car' => _("Has car"),
- 'has_license_car' => _("Car"),
- 'has_license_3_5t_transporter' => _("3,5t Transporter"),
- 'has_license_7_5t_truck' => _("7,5t Truck"),
- 'has_license_12_5t_truck' => _("12,5t Truck"),
- 'has_license_forklift' => _("Forklift"),
+ 'Nick' => _('Nick'),
+ 'DECT' => _('DECT'),
+ 'wants_to_drive' => _('Driver'),
+ 'has_car' => _('Has car'),
+ 'has_license_car' => _('Car'),
+ 'has_license_3_5t_transporter' => _('3,5t Transporter'),
+ 'has_license_7_5t_truck' => _('7,5t Truck'),
+ 'has_license_12_5t_truck' => _('12,5t Truck'),
+ 'has_license_forklift' => _('Forklift'),
'actions' => ''
];
}
return [
- 'Nick' => _("Nick"),
- 'DECT' => _("DECT"),
+ 'Nick' => _('Nick'),
+ 'DECT' => _('DECT'),
'actions' => ''
];
}
@@ -302,9 +302,9 @@ function AngelType_view(
msg()
];
- $page[] = '<h3>' . _("Description") . '</h3>';
+ $page[] = '<h3>' . _('Description') . '</h3>';
$parsedown = new Parsedown();
- if ($angeltype['description'] != "") {
+ if ($angeltype['description'] != '') {
$page[] = '<div class="well">' . $parsedown->parse($angeltype['description']) . '</div>';
}
@@ -317,7 +317,7 @@ function AngelType_view(
$table_headers = AngelType_view_table_headers($angeltype, $supporter, $admin_angeltypes);
if (count($supporters) > 0) {
- $page[] = '<h3>' . _("supporters") . '</h3>';
+ $page[] = '<h3>' . _('supporters') . '</h3>';
$page[] = table($table_headers, $supporters);
}
@@ -337,32 +337,32 @@ function AngelType_view(
];
}
- $page[] = '<h3>' . _("Members") . '</h3>';
+ $page[] = '<h3>' . _('Members') . '</h3>';
if ($admin_user_angeltypes) {
$page[] = buttons([
- button(page_link_to('user_angeltypes') . '&action=add&angeltype_id=' . $angeltype['id'], _("Add"), 'add')
+ button(page_link_to('user_angeltypes') . '&action=add&angeltype_id=' . $angeltype['id'], _('Add'), 'add')
]);
}
$page[] = table($table_headers, $members_confirmed);
if ($admin_user_angeltypes && $angeltype['restricted'] && count($members_unconfirmed) > 0) {
- $page[] = '<h3>' . _("Unconfirmed") . '</h3>';
+ $page[] = '<h3>' . _('Unconfirmed') . '</h3>';
$page[] = buttons([
button(
page_link_to('user_angeltypes') . '&action=confirm_all&angeltype_id=' . $angeltype['id'],
- _("confirm all"),
+ _('confirm all'),
'ok'
),
button(
page_link_to('user_angeltypes') . '&action=delete_all&angeltype_id=' . $angeltype['id'],
- _("deny all"),
+ _('deny all'),
'cancel'
)
]);
$page[] = table($table_headers, $members_unconfirmed);
}
- return page_with_title(sprintf(_("Team %s"), $angeltype['name']), $page);
+ return page_with_title(sprintf(_('Team %s'), $angeltype['name']), $page);
}
/**
@@ -377,15 +377,15 @@ function AngelTypes_list_view($angeltypes, $admin_angeltypes)
return page_with_title(angeltypes_title(), [
msg(),
buttons([
- $admin_angeltypes ? button(page_link_to('angeltypes') . '&action=edit', _("New angeltype"), 'add') : '',
- button(page_link_to('angeltypes') . '&action=about', _("Teams/Job description"))
+ $admin_angeltypes ? button(page_link_to('angeltypes') . '&action=edit', _('New angeltype'), 'add') : '',
+ button(page_link_to('angeltypes') . '&action=about', _('Teams/Job description'))
]),
table([
- 'name' => _("Name"),
- 'restricted' => glyph('lock') . _("Restricted"),
- 'no_self_signup' => glyph('share') . _("Self Sign Up Allowed"),
- 'membership' => _("Membership"),
- 'actions' => ""
+ 'name' => _('Name'),
+ 'restricted' => glyph('lock') . _('Restricted'),
+ 'no_self_signup' => glyph('share') . _('Self Sign Up Allowed'),
+ 'membership' => _('Membership'),
+ 'actions' => ''
], $angeltypes)
]);
}
@@ -407,13 +407,13 @@ function AngelTypes_about_view_angeltype($angeltype)
if ($angeltype['user_angeltype_id'] != null) {
$buttons[] = button(
page_link_to('user_angeltypes') . '&action=delete&user_angeltype_id=' . $angeltype['user_angeltype_id'],
- _("leave"),
+ _('leave'),
'cancel'
);
} else {
$buttons[] = button(
page_link_to('user_angeltypes') . '&action=add&angeltype_id=' . $angeltype['id'],
- _("join"),
+ _('join'),
'add'
);
}
@@ -422,11 +422,11 @@ function AngelTypes_about_view_angeltype($angeltype)
if ($angeltype['restricted']) {
$html .= info(
- _("This angeltype is restricted by double-opt-in by a team supporter. Please show up at the according introduction meetings."),
+ _('This angeltype is restricted by double-opt-in by a team supporter. Please show up at the according introduction meetings.'),
true
);
}
- if ($angeltype['description'] != "") {
+ if ($angeltype['description'] != '') {
$html .= '<div class="well">' . $parsedown->parse($angeltype['description']) . '</div>';
}
$html .= '<hr />';
@@ -450,14 +450,14 @@ function AngelTypes_about_view($angeltypes, $user_logged_in)
!$user_logged_in ? button(page_link_to('register'), register_title()) : '',
!$user_logged_in ? button(page_link_to('login'), login_title()) : '',
$user_logged_in ? button(page_link_to('angeltypes'), angeltypes_title(), 'back') : '',
- button($faq_url, _("FAQ"), "btn-primary")
+ button($faq_url, _('FAQ'), 'btn-primary')
]),
- '<p>' . _("Here is the list of teams and their tasks. If you have questions, read the FAQ.") . '</p>',
+ '<p>' . _('Here is the list of teams and their tasks. If you have questions, read the FAQ.') . '</p>',
'<hr />'
];
foreach ($angeltypes as $angeltype) {
$content[] = AngelTypes_about_view_angeltype($angeltype);
}
- return page_with_title(_("Teams/Job description"), $content);
+ return page_with_title(_('Teams/Job description'), $content);
}
diff --git a/includes/view/EventConfig_view.php b/includes/view/EventConfig_view.php
index 3cb85e0b..2b092962 100644
--- a/includes/view/EventConfig_view.php
+++ b/includes/view/EventConfig_view.php
@@ -10,7 +10,7 @@ function EventConfig_countdown_page($event_config)
{
if ($event_config == null) {
return div('col-md-12 text-center', [
- heading(sprintf(_("Welcome to the %s!"), '<span class="icon-icon_angel"></span> ENGELSYSTEM'), 2)
+ heading(sprintf(_('Welcome to the %s!'), '<span class="icon-icon_angel"></span> ENGELSYSTEM'), 2)
]);
}
@@ -19,7 +19,7 @@ function EventConfig_countdown_page($event_config)
if ($event_config['event_name'] != null) {
$elements[] = div('col-sm-12 text-center', [
heading(sprintf(
- _("Welcome to the %s!"),
+ _('Welcome to the %s!'),
$event_config['event_name'] . ' <span class="icon-icon_angel"></span> ENGELSYSTEM'
), 2)
]);
@@ -27,37 +27,37 @@ function EventConfig_countdown_page($event_config)
if ($event_config['buildup_start_date'] != null && time() < $event_config['buildup_start_date']) {
$elements[] = div('col-sm-3 text-center hidden-xs', [
- heading(_("Buildup starts"), 4),
+ heading(_('Buildup starts'), 4),
'<span class="moment-countdown text-big" data-timestamp="' . $event_config['buildup_start_date'] . '">%c</span>',
- '<small>' . date(_("Y-m-d"), $event_config['buildup_start_date']) . '</small>'
+ '<small>' . date(_('Y-m-d'), $event_config['buildup_start_date']) . '</small>'
]);
}
if ($event_config['event_start_date'] != null && time() < $event_config['event_start_date']) {
$elements[] = div('col-sm-3 text-center hidden-xs', [
- heading(_("Event starts"), 4),
+ heading(_('Event starts'), 4),
'<span class="moment-countdown text-big" data-timestamp="' . $event_config['event_start_date'] . '">%c</span>',
- '<small>' . date(_("Y-m-d"), $event_config['event_start_date']) . '</small>'
+ '<small>' . date(_('Y-m-d'), $event_config['event_start_date']) . '</small>'
]);
}
if ($event_config['event_end_date'] != null && time() < $event_config['event_end_date']) {
$elements[] = div('col-sm-3 text-center hidden-xs', [
- heading(_("Event ends"), 4),
+ heading(_('Event ends'), 4),
'<span class="moment-countdown text-big" data-timestamp="' . $event_config['event_end_date'] . '">%c</span>',
- '<small>' . date(_("Y-m-d"), $event_config['event_end_date']) . '</small>'
+ '<small>' . date(_('Y-m-d'), $event_config['event_end_date']) . '</small>'
]);
}
if ($event_config['teardown_end_date'] != null && time() < $event_config['teardown_end_date']) {
$elements[] = div('col-sm-3 text-center hidden-xs', [
- heading(_("Teardown ends"), 4),
+ heading(_('Teardown ends'), 4),
'<span class="moment-countdown text-big" data-timestamp="' . $event_config['teardown_end_date'] . '">%c</span>',
- '<small>' . date(_("Y-m-d"), $event_config['teardown_end_date']) . '</small>'
+ '<small>' . date(_('Y-m-d'), $event_config['teardown_end_date']) . '</small>'
]);
}
- return join("", $elements);
+ return join('', $elements);
}
/**
@@ -69,33 +69,33 @@ function EventConfig_countdown_page($event_config)
function EventConfig_info($event_config)
{
if ($event_config == null) {
- return "";
+ return '';
}
// Event name, start+end date are set
if ($event_config['event_name'] != null && $event_config['event_start_date'] != null && $event_config['event_end_date'] != null) {
return sprintf(
- _("%s, from %s to %s"),
+ _('%s, from %s to %s'),
$event_config['event_name'],
- date(_("Y-m-d"), $event_config['event_start_date']),
- date(_("Y-m-d"), $event_config['event_end_date'])
+ date(_('Y-m-d'), $event_config['event_start_date']),
+ date(_('Y-m-d'), $event_config['event_end_date'])
);
}
// Event name, start date are set
if ($event_config['event_name'] != null && $event_config['event_start_date'] != null) {
return sprintf(
- _("%s, starting %s"), $event_config['event_name'],
- date(_("Y-m-d"), $event_config['event_start_date'])
+ _('%s, starting %s'), $event_config['event_name'],
+ date(_('Y-m-d'), $event_config['event_start_date'])
);
}
// Event start+end date are set
if ($event_config['event_start_date'] != null && $event_config['event_end_date'] != null) {
return sprintf(
- _("Event from %s to %s"),
- date(_("Y-m-d"), $event_config['event_start_date']),
- date(_("Y-m-d"), $event_config['event_end_date'])
+ _('Event from %s to %s'),
+ date(_('Y-m-d'), $event_config['event_start_date']),
+ date(_('Y-m-d'), $event_config['event_end_date'])
);
}
@@ -104,7 +104,7 @@ function EventConfig_info($event_config)
return sprintf($event_config['event_name']);
}
- return "";
+ return '';
}
/**
@@ -131,23 +131,23 @@ function EventConfig_edit_view(
form([
div('row', [
div('col-md-6', [
- form_text('event_name', _("Event Name"), $event_name),
- form_info('', _("Event Name is shown on the start page.")),
- form_textarea('event_welcome_msg', _("Event Welcome Message"), $event_welcome_msg),
- form_info('', _("Welcome message is shown after successful registration. You can use markdown."))
+ form_text('event_name', _('Event Name'), $event_name),
+ form_info('', _('Event Name is shown on the start page.')),
+ form_textarea('event_welcome_msg', _('Event Welcome Message'), $event_welcome_msg),
+ form_info('', _('Welcome message is shown after successful registration. You can use markdown.'))
]),
div('col-md-3 col-xs-6', [
- form_date('buildup_start_date', _("Buildup date"), $buildup_start_date),
- form_date('event_start_date', _("Event start date"), $event_start_date)
+ form_date('buildup_start_date', _('Buildup date'), $buildup_start_date),
+ form_date('event_start_date', _('Event start date'), $event_start_date)
]),
div('col-md-3 col-xs-6', [
- form_date('teardown_end_date', _("Teardown end date"), $teardown_end_date),
- form_date('event_end_date', _("Event end date"), $event_end_date)
+ form_date('teardown_end_date', _('Teardown end date'), $teardown_end_date),
+ form_date('event_end_date', _('Event end date'), $event_end_date)
])
]),
div('row', [
div('col-md-6', [
- form_submit('submit', _("Save"))
+ form_submit('submit', _('Save'))
])
])
])
diff --git a/includes/view/Questions_view.php b/includes/view/Questions_view.php
index 3276baf6..dee7585c 100644
--- a/includes/view/Questions_view.php
+++ b/includes/view/Questions_view.php
@@ -9,34 +9,34 @@
function Questions_view($open_questions, $answered_questions, $ask_action)
{
foreach ($open_questions as &$question) {
- $question['actions'] = '<a href="' . page_link_to("user_questions") . '&action=delete&id=' . $question['QID'] . '">' . _("delete") . '</a>';
+ $question['actions'] = '<a href="' . page_link_to('user_questions') . '&action=delete&id=' . $question['QID'] . '">' . _('delete') . '</a>';
$question['Question'] = str_replace("\n", '<br />', $question['Question']);
}
foreach ($answered_questions as &$question) {
$question['Question'] = str_replace("\n", '<br />', $question['Question']);
$question['Answer'] = str_replace("\n", '<br />', $question['Answer']);
- $question['actions'] = '<a href="' . page_link_to("user_questions") . '&action=delete&id=' . $question['QID'] . '">' . _("delete") . '</a>';
+ $question['actions'] = '<a href="' . page_link_to('user_questions') . '&action=delete&id=' . $question['QID'] . '">' . _('delete') . '</a>';
}
return page_with_title(questions_title(), [
msg(),
- heading(_("Open questions"), 2),
+ heading(_('Open questions'), 2),
table([
- 'Question' => _("Question"),
- 'actions' => ""
+ 'Question' => _('Question'),
+ 'actions' => ''
], $open_questions),
- heading(_("Answered questions"), 2),
+ heading(_('Answered questions'), 2),
table([
- 'Question' => _("Question"),
- 'answer_user' => _("Answered by"),
- 'Answer' => _("Answer"),
- 'actions' => ""
+ 'Question' => _('Question'),
+ 'answer_user' => _('Answered by'),
+ 'Answer' => _('Answer'),
+ 'actions' => ''
], $answered_questions),
- heading(_("Ask the Heaven"), 2),
+ heading(_('Ask the Heaven'), 2),
form([
- form_textarea('question', _("Your Question:"), ""),
- form_submit('submit', _("Save"))
+ form_textarea('question', _('Your Question:'), ''),
+ form_submit('submit', _('Save'))
], $ask_action)
]);
}
diff --git a/includes/view/ShiftCalendarRenderer.php b/includes/view/ShiftCalendarRenderer.php
index e2a574e6..aad0d643 100644
--- a/includes/view/ShiftCalendarRenderer.php
+++ b/includes/view/ShiftCalendarRenderer.php
@@ -4,7 +4,6 @@ namespace Engelsystem;
class ShiftCalendarRenderer
{
-
/**
* 15m * 60s/m = 900s
*/
@@ -102,7 +101,7 @@ class ShiftCalendarRenderer
if ($shift_added == false) {
$newLane = new ShiftCalendarLane($header, $this->getFirstBlockStartTime(), $this->getBlocksPerSlot());
if (!$newLane->addShift($shift)) {
- engelsystem_error("Unable to add shift to new lane.");
+ engelsystem_error('Unable to add shift to new lane.');
}
$lanes[$room_id][] = $newLane;
}
@@ -161,7 +160,7 @@ class ShiftCalendarRenderer
*/
private function renderShiftLanes()
{
- $html = "";
+ $html = '';
foreach ($this->lanes as $room_lanes) {
foreach ($room_lanes as $lane) {
$html .= $this->renderLane($lane);
@@ -182,7 +181,7 @@ class ShiftCalendarRenderer
global $user;
$shift_renderer = new ShiftCalendarShiftRenderer();
- $html = "";
+ $html = '';
$rendered_until = $this->getFirstBlockStartTime();
foreach ($lane->getShifts() as $shift) {
@@ -248,7 +247,7 @@ class ShiftCalendarRenderer
{
$time_slot = [
div('header', [
- _("Time")
+ _('Time')
])
];
for ($block = 0; $block < $this->getBlocksPerSlot(); $block++) {
diff --git a/includes/view/ShiftCalendarShiftRenderer.php b/includes/view/ShiftCalendarShiftRenderer.php
index 1f6ceef8..8560d47d 100644
--- a/includes/view/ShiftCalendarShiftRenderer.php
+++ b/includes/view/ShiftCalendarShiftRenderer.php
@@ -18,7 +18,7 @@ class ShiftCalendarShiftRenderer
*/
public function render($shift, $needed_angeltypes, $shift_entries, $user)
{
- $info_text = "";
+ $info_text = '';
if ($shift['title'] != '') {
$info_text = glyph('info-sign') . $shift['title'] . '<br>';
}
@@ -31,7 +31,7 @@ class ShiftCalendarShiftRenderer
$class = $this->classForSignupState($shift_signup_state);
- $blocks = ceil(($shift["end"] - $shift["start"]) / ShiftCalendarRenderer::SECONDS_PER_ROW);
+ $blocks = ceil(($shift['end'] - $shift['start']) / ShiftCalendarRenderer::SECONDS_PER_ROW);
$blocks = max(1, $blocks);
return [
$blocks,
@@ -100,7 +100,7 @@ class ShiftCalendarShiftRenderer
$shift_entries_filtered[$shift_entry['TID']][] = $shift_entry;
}
- $html = "";
+ $html = '';
/** @var ShiftSignupState $shift_signup_state */
$shift_signup_state = null;
foreach ($needed_angeltypes as $angeltype) {
@@ -126,7 +126,7 @@ class ShiftCalendarShiftRenderer
if (in_array('user_shifts_admin', $privileges)) {
$html .= '<li class="list-group-item">' . button(
page_link_to('user_shifts') . '&amp;shift_id=' . $shift['SID'],
- _("Add more angels"),
+ _('Add more angels'),
'btn-xs'
) . '</li>';
}
@@ -138,7 +138,7 @@ class ShiftCalendarShiftRenderer
}
return [
$shift_signup_state,
- ""
+ ''
];
}
@@ -156,12 +156,12 @@ class ShiftCalendarShiftRenderer
{
$entry_list = [];
foreach ($shift_entries as $entry) {
- $style = $entry['freeloaded'] ? " text-decoration: line-through;" : '';
- $entry_list[] = "<span style=\"$style\">" . User_Nick_render($entry) . "</span>";
+ $style = $entry['freeloaded'] ? ' text-decoration: line-through;' : '';
+ $entry_list[] = '<span style="' . $style . '">' . User_Nick_render($entry) . '</span>';
}
$shift_signup_state = Shift_signup_allowed($user, $shift, $angeltype, null, null, $angeltype, $shift_entries);
$inner_text = sprintf(
- ngettext("%d helper needed", "%d helpers needed", $shift_signup_state->getFreeEntries()),
+ ngettext('%d helper needed', '%d helpers needed', $shift_signup_state->getFreeEntries()),
$shift_signup_state->getFreeEntries()
);
@@ -211,7 +211,7 @@ class ShiftCalendarShiftRenderer
$shifts_row = '<li class="list-group-item">';
$shifts_row .= '<strong>' . AngelType_name_render($angeltype) . ':</strong> ';
- $shifts_row .= join(", ", $entry_list);
+ $shifts_row .= join(', ', $entry_list);
$shifts_row .= '</li>';
return [
$shift_signup_state,
@@ -229,7 +229,7 @@ class ShiftCalendarShiftRenderer
{
global $privileges;
- $header_buttons = "";
+ $header_buttons = '';
if (in_array('admin_shifts', $privileges)) {
$header_buttons = '<div class="pull-right">' . table_buttons([
button(page_link_to('user_shifts') . '&edit_shift=' . $shift['SID'], glyph('edit'), 'btn-xs'),
diff --git a/includes/view/ShiftEntry_view.php b/includes/view/ShiftEntry_view.php
index 92fb1528..2e638df6 100644
--- a/includes/view/ShiftEntry_view.php
+++ b/includes/view/ShiftEntry_view.php
@@ -28,21 +28,21 @@ function ShiftEntry_edit_view(
$freeload_form = [];
if ($user_admin_shifts) {
$freeload_form = [
- form_checkbox('freeloaded', _("Freeloaded"), $freeloaded),
- form_textarea('freeload_comment', _("Freeload comment (Only for shift coordination):"), $freeload_comment)
+ form_checkbox('freeloaded', _('Freeloaded'), $freeloaded),
+ form_textarea('freeload_comment', _('Freeload comment (Only for shift coordination):'), $freeload_comment)
];
}
- return page_with_title(_("Edit shift entry"), [
+ return page_with_title(_('Edit shift entry'), [
msg(),
form([
- form_info(_("Angel:"), $angel),
- form_info(_("Date, Duration:"), $date),
- form_info(_("Location:"), $location),
- form_info(_("Title:"), $title),
- form_info(_("Type:"), $type),
- form_textarea('comment', _("Comment (for your eyes only):"), $comment),
- join("", $freeload_form),
- form_submit('submit', _("Save"))
+ form_info(_('Angel:'), $angel),
+ form_info(_('Date, Duration:'), $date),
+ form_info(_('Location:'), $location),
+ form_info(_('Title:'), $title),
+ form_info(_('Type:'), $type),
+ form_textarea('comment', _('Comment (for your eyes only):'), $comment),
+ join('', $freeload_form),
+ form_submit('submit', _('Save'))
])
]);
}
diff --git a/includes/view/ShiftTypes_view.php b/includes/view/ShiftTypes_view.php
index e5064388..d8e21347 100644
--- a/includes/view/ShiftTypes_view.php
+++ b/includes/view/ShiftTypes_view.php
@@ -19,13 +19,13 @@ function ShiftType_name_render($shifttype)
*/
function ShiftType_delete_view($shifttype)
{
- return page_with_title(sprintf(_("Delete shifttype %s"), $shifttype['name']), [
- info(sprintf(_("Do you want to delete shifttype %s?"), $shifttype['name']), true),
+ return page_with_title(sprintf(_('Delete shifttype %s'), $shifttype['name']), [
+ info(sprintf(_('Do you want to delete shifttype %s?'), $shifttype['name']), true),
buttons([
- button(page_link_to('shifttypes'), _("cancel"), 'cancel'),
+ button(page_link_to('shifttypes'), _('cancel'), 'cancel'),
button(
page_link_to('shifttypes') . '&action=delete&shifttype_id=' . $shifttype['id'] . '&confirmed',
- _("delete"),
+ _('delete'),
'ok'
)
])
@@ -91,7 +91,7 @@ function ShiftType_view($shifttype, $angeltype)
'delete'
)
]),
- heading(_("Description"), 2),
+ heading(_('Description'), 2),
$parsedown->parse($shifttype['description'])
]);
}
diff --git a/includes/view/ShiftsFilterRenderer.php b/includes/view/ShiftsFilterRenderer.php
index 051843c2..43a23ef6 100644
--- a/includes/view/ShiftsFilterRenderer.php
+++ b/includes/view/ShiftsFilterRenderer.php
@@ -46,7 +46,7 @@ class ShiftsFilterRenderer
{
$toolbar = [];
if ($this->daySelectionEnabled && !empty($this->days)) {
- $selected_day = date("Y-m-d", $this->shiftsFilter->getStartTime());
+ $selected_day = date('Y-m-d', $this->shiftsFilter->getStartTime());
$day_dropdown_items = [];
foreach ($this->days as $day) {
$day_dropdown_items[] = toolbar_item_link($link_base . '&shifts_filter_day=' . $day, '', $day);
diff --git a/includes/view/Shifts_view.php b/includes/view/Shifts_view.php
index 41fde1e6..094af7ad 100644
--- a/includes/view/Shifts_view.php
+++ b/includes/view/Shifts_view.php
@@ -10,14 +10,14 @@ function Shift_editor_info_render($shift)
$info = [];
if ($shift['created_by_user_id'] != null) {
$info[] = sprintf(
- glyph('plus') . _("created at %s by %s"),
+ glyph('plus') . _('created at %s by %s'),
date('Y-m-d H:i', $shift['created_at_timestamp']),
User_Nick_render(User($shift['created_by_user_id']))
);
}
if ($shift['edited_by_user_id'] != null) {
$info[] = sprintf(
- glyph('pencil') . _("edited at %s by %s"),
+ glyph('pencil') . _('edited at %s by %s'),
date('Y-m-d H:i', $shift['edited_at_timestamp']),
User_Nick_render(User($shift['edited_by_user_id']))
);
@@ -226,7 +226,7 @@ function Shift_view_render_shift_entry($shift_entry, $user_shift_admin, $angelty
*/
function shift_length($shift)
{
- $length = floor(($shift['end'] - $shift['start']) / (60 * 60)) . ":";
- $length .= str_pad((($shift['end'] - $shift['start']) % (60 * 60)) / 60, 2, "0", STR_PAD_LEFT) . "h";
+ $length = floor(($shift['end'] - $shift['start']) / (60 * 60)) . ':';
+ $length .= str_pad((($shift['end'] - $shift['start']) % (60 * 60)) / 60, 2, '0', STR_PAD_LEFT) . 'h';
return $length;
}
diff --git a/includes/view/UserAngelTypes_view.php b/includes/view/UserAngelTypes_view.php
index 9f978bc7..15d99961 100644
--- a/includes/view/UserAngelTypes_view.php
+++ b/includes/view/UserAngelTypes_view.php
@@ -9,23 +9,23 @@
*/
function UserAngelType_update_view($user_angeltype, $user, $angeltype, $supporter)
{
- return page_with_title($supporter ? _("Add supporter rights") : _("Remove supporter rights"), [
+ return page_with_title($supporter ? _('Add supporter rights') : _('Remove supporter rights'), [
msg(),
info(sprintf(
$supporter
- ? _("Do you really want to add supporter rights for %s to %s?")
- : _("Do you really want to remove supporter rights for %s from %s?"),
+ ? _('Do you really want to add supporter rights for %s to %s?')
+ : _('Do you really want to remove supporter rights for %s from %s?'),
$angeltype['name'],
User_Nick_render($user)
), true),
buttons([
- button(page_link_to('angeltypes') . '&action=view&angeltype_id=' . $angeltype['id'], _("cancel"), 'cancel'),
+ button(page_link_to('angeltypes') . '&action=view&angeltype_id=' . $angeltype['id'], _('cancel'), 'cancel'),
button(
page_link_to('user_angeltypes')
. '&action=update&user_angeltype_id=' . $user_angeltype['id']
. '&supporter=' . ($supporter ? '1' : '0')
. '&confirmed',
- _("yes"),
+ _('yes'),
'ok'
)
])
@@ -38,14 +38,14 @@ function UserAngelType_update_view($user_angeltype, $user, $angeltype, $supporte
*/
function UserAngelTypes_delete_all_view($angeltype)
{
- return page_with_title(_("Deny all users"), [
+ return page_with_title(_('Deny all users'), [
msg(),
- info(sprintf(_("Do you really want to deny all users for %s?"), $angeltype['name']), true),
+ info(sprintf(_('Do you really want to deny all users for %s?'), $angeltype['name']), true),
buttons([
- button(page_link_to('angeltypes') . '&action=view&angeltype_id=' . $angeltype['id'], _("cancel"), 'cancel'),
+ button(page_link_to('angeltypes') . '&action=view&angeltype_id=' . $angeltype['id'], _('cancel'), 'cancel'),
button(
page_link_to('user_angeltypes') . '&action=delete_all&angeltype_id=' . $angeltype['id'] . '&confirmed',
- _("yes"),
+ _('yes'),
'ok'
)
])
@@ -58,14 +58,14 @@ function UserAngelTypes_delete_all_view($angeltype)
*/
function UserAngelTypes_confirm_all_view($angeltype)
{
- return page_with_title(_("Confirm all users"), [
+ return page_with_title(_('Confirm all users'), [
msg(),
- info(sprintf(_("Do you really want to confirm all users for %s?"), $angeltype['name']), true),
+ info(sprintf(_('Do you really want to confirm all users for %s?'), $angeltype['name']), true),
buttons([
- button(page_link_to('angeltypes') . '&action=view&angeltype_id=' . $angeltype['id'], _("cancel"), 'cancel'),
+ button(page_link_to('angeltypes') . '&action=view&angeltype_id=' . $angeltype['id'], _('cancel'), 'cancel'),
button(
page_link_to('user_angeltypes') . '&action=confirm_all&angeltype_id=' . $angeltype['id'] . '&confirmed',
- _("yes"),
+ _('yes'),
'ok'
)
])
@@ -80,14 +80,14 @@ function UserAngelTypes_confirm_all_view($angeltype)
*/
function UserAngelType_confirm_view($user_angeltype, $user, $angeltype)
{
- return page_with_title(_("Confirm angeltype for user"), [
+ return page_with_title(_('Confirm angeltype for user'), [
msg(),
- info(sprintf(_("Do you really want to confirm %s for %s?"), User_Nick_render($user), $angeltype['name']), true),
+ info(sprintf(_('Do you really want to confirm %s for %s?'), User_Nick_render($user), $angeltype['name']), true),
buttons([
- button(page_link_to('angeltypes') . '&action=view&angeltype_id=' . $angeltype['id'], _("cancel"), 'cancel'),
+ button(page_link_to('angeltypes') . '&action=view&angeltype_id=' . $angeltype['id'], _('cancel'), 'cancel'),
button(
page_link_to('user_angeltypes') . '&action=confirm&user_angeltype_id=' . $user_angeltype['id'] . '&confirmed',
- _("yes"),
+ _('yes'),
'ok'
)
])
@@ -102,14 +102,14 @@ function UserAngelType_confirm_view($user_angeltype, $user, $angeltype)
*/
function UserAngelType_delete_view($user_angeltype, $user, $angeltype)
{
- return page_with_title(_("Remove angeltype"), [
+ return page_with_title(_('Remove angeltype'), [
msg(),
- info(sprintf(_("Do you really want to delete %s from %s?"), User_Nick_render($user), $angeltype['name']), true),
+ info(sprintf(_('Do you really want to delete %s from %s?'), User_Nick_render($user), $angeltype['name']), true),
buttons([
- button(page_link_to('angeltypes') . '&action=view&angeltype_id=' . $angeltype['id'], _("cancel"), 'cancel'),
+ button(page_link_to('angeltypes') . '&action=view&angeltype_id=' . $angeltype['id'], _('cancel'), 'cancel'),
button(
page_link_to('user_angeltypes') . '&action=delete&user_angeltype_id=' . $user_angeltype['id'] . '&confirmed',
- _("yes"),
+ _('yes'),
'ok'
)
])
@@ -129,15 +129,15 @@ function UserAngelType_add_view($angeltype, $users_source, $user_id)
$users[$user_source['UID']] = User_Nick_render($user_source);
}
- return page_with_title(_("Add user to angeltype"), [
+ return page_with_title(_('Add user to angeltype'), [
msg(),
buttons([
- button(page_link_to('angeltypes') . '&action=view&angeltype_id=' . $angeltype['id'], _("back"), 'back')
+ button(page_link_to('angeltypes') . '&action=view&angeltype_id=' . $angeltype['id'], _('back'), 'back')
]),
form([
- form_info(_("Angeltype"), $angeltype['name']),
- form_select('user_id', _("User"), $users, $user_id),
- form_submit('submit', _("Add"))
+ form_info(_('Angeltype'), $angeltype['name']),
+ form_select('user_id', _('User'), $users, $user_id),
+ form_submit('submit', _('Add'))
])
]);
}
@@ -149,14 +149,14 @@ function UserAngelType_add_view($angeltype, $users_source, $user_id)
*/
function UserAngelType_join_view($user, $angeltype)
{
- return page_with_title(sprintf(_("Become a %s"), $angeltype['name']), [
+ return page_with_title(sprintf(_('Become a %s'), $angeltype['name']), [
msg(),
- info(sprintf(_("Do you really want to add %s to %s?"), User_Nick_render($user), $angeltype['name']), true),
+ info(sprintf(_('Do you really want to add %s to %s?'), User_Nick_render($user), $angeltype['name']), true),
buttons([
- button(page_link_to('angeltypes') . '&action=view&angeltype_id=' . $angeltype['id'], _("cancel"), 'cancel'),
+ button(page_link_to('angeltypes') . '&action=view&angeltype_id=' . $angeltype['id'], _('cancel'), 'cancel'),
button(
page_link_to('user_angeltypes') . '&action=add&angeltype_id=' . $angeltype['id'] . '&user_id=' . $user['UID'] . '&confirmed',
- _("save"),
+ _('save'),
'ok'
)
])
diff --git a/includes/view/UserDriverLicenses_view.php b/includes/view/UserDriverLicenses_view.php
index 3241ade5..320966ef 100644
--- a/includes/view/UserDriverLicenses_view.php
+++ b/includes/view/UserDriverLicenses_view.php
@@ -10,42 +10,42 @@
*/
function UserDriverLicense_edit_view($user_source, $wants_to_drive, $user_driver_license)
{
- return page_with_title(sprintf(_("Edit %s driving license information"), User_Nick_render($user_source)), [
+ return page_with_title(sprintf(_('Edit %s driving license information'), User_Nick_render($user_source)), [
buttons([
- button(user_link($user_source), _("Back to profile"), 'back')
+ button(user_link($user_source), _('Back to profile'), 'back')
]),
msg(),
form([
- form_info(_("Privacy"), _("Your driving license information is only visible for supporters and admins.")),
- form_checkbox('wants_to_drive', _("I am willing to operate cars for the PL"), $wants_to_drive),
+ form_info(_('Privacy'), _('Your driving license information is only visible for supporters and admins.')),
+ form_checkbox('wants_to_drive', _('I am willing to operate cars for the PL'), $wants_to_drive),
div('panel panel-default', [
div('panel-body', [
form_checkbox(
'has_car',
- _("I have my own car with me and am willing to use it for the PL (You'll get reimbursed for fuel)"),
+ _('I have my own car with me and am willing to use it for the PL (You\'ll get reimbursed for fuel)'),
$user_driver_license['has_car']
),
- heading(_("Driver license"), 3),
- form_checkbox('has_license_car', _("Car"), $user_driver_license['has_license_car']),
+ heading(_('Driver license'), 3),
+ form_checkbox('has_license_car', _('Car'), $user_driver_license['has_license_car']),
form_checkbox(
'has_license_3_5t_transporter',
- _("Transporter 3,5t"),
+ _('Transporter 3,5t'),
$user_driver_license['has_license_3_5t_transporter']
),
form_checkbox(
'has_license_7_5t_truck',
- _("Truck 7,5t"),
+ _('Truck 7,5t'),
$user_driver_license['has_license_7_5t_truck']
),
form_checkbox(
'has_license_12_5t_truck',
- _("Truck 12,5t"),
+ _('Truck 12,5t'),
$user_driver_license['has_license_12_5t_truck']
),
- form_checkbox('has_license_forklift', _("Forklift"), $user_driver_license['has_license_forklift'])
+ form_checkbox('has_license_forklift', _('Forklift'), $user_driver_license['has_license_forklift'])
])
], 'driving_license'),
- form_submit('submit', _("Save"))
+ form_submit('submit', _('Save'))
]),
'<script type="text/javascript">
$(function() {
diff --git a/includes/view/User_view.php b/includes/view/User_view.php
index 5457e573..ca32b80e 100644
--- a/includes/view/User_view.php
+++ b/includes/view/User_view.php
@@ -4,19 +4,19 @@
* Available T-Shirt sizes
*/
$tshirt_sizes = [
- '' => _("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"
+ '' => _('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'
];
/**
@@ -45,69 +45,69 @@ function User_settings_view(
div('row', [
div('col-md-6', [
form([
- form_info('', _("Here you can change your user details.")),
- form_info(entry_required() . ' = ' . _("Entry required!")),
- form_text('nick', _("Nick"), $user_source['Nick'], true),
- form_text('lastname', _("Last name"), $user_source['Name']),
- form_text('prename', _("First name"), $user_source['Vorname']),
+ form_info('', _('Here you can change your user details.')),
+ form_info(entry_required() . ' = ' . _('Entry required!')),
+ form_text('nick', _('Nick'), $user_source['Nick'], true),
+ form_text('lastname', _('Last name'), $user_source['Name']),
+ form_text('prename', _('First name'), $user_source['Vorname']),
form_date(
'planned_arrival_date',
- _("Planned date of arrival") . ' ' . entry_required(),
+ _('Planned date of arrival') . ' ' . entry_required(),
$user_source['planned_arrival_date'],
$buildup_start_date,
$teardown_end_date
),
form_date(
'planned_departure_date',
- _("Planned date of departure"),
+ _('Planned date of departure'),
$user_source['planned_departure_date'],
$buildup_start_date,
$teardown_end_date
),
- form_text('age', _("Age"), $user_source['Alter']),
- form_text('tel', _("Phone"), $user_source['Telefon']),
- form_text('dect', _("DECT"), $user_source['DECT']),
- form_text('mobile', _("Mobile"), $user_source['Handy']),
- form_text('mail', _("E-Mail") . ' ' . entry_required(), $user_source['email']),
+ form_text('age', _('Age'), $user_source['Alter']),
+ form_text('tel', _('Phone'), $user_source['Telefon']),
+ form_text('dect', _('DECT'), $user_source['DECT']),
+ form_text('mobile', _('Mobile'), $user_source['Handy']),
+ form_text('mail', _('E-Mail') . ' ' . entry_required(), $user_source['email']),
form_checkbox(
'email_shiftinfo',
- _("The engelsystem is allowed to send me an email (e.g. when my shifts change)"),
+ _('The engelsystem is allowed to send me an email (e.g. when my shifts change)'),
$user_source['email_shiftinfo']
),
form_checkbox(
'email_by_human_allowed',
- _("Humans are allowed to send me an email (e.g. for ticket vouchers)"),
+ _('Humans are allowed to send me an email (e.g. for ticket vouchers)'),
$user_source['email_by_human_allowed']
),
- form_text('jabber', _("Jabber"), $user_source['jabber']),
- form_text('hometown', _("Hometown"), $user_source['Hometown']),
+ form_text('jabber', _('Jabber'), $user_source['jabber']),
+ form_text('hometown', _('Hometown'), $user_source['Hometown']),
$enable_tshirt_size ? form_select(
'tshirt_size',
- _("Shirt size"),
+ _('Shirt size'),
$tshirt_sizes,
$user_source['Size']
) : '',
form_info('', _('Please visit the angeltypes page to manage your angeltypes.')),
- form_submit('submit', _("Save"))
+ form_submit('submit', _('Save'))
])
]),
div('col-md-6', [
form([
- form_info(_("Here you can change your password.")),
- form_password('password', _("Old password:")),
- form_password('new_password', _("New password:")),
- form_password('new_password2', _("Password confirmation:")),
- form_submit('submit_password', _("Save"))
+ form_info(_('Here you can change your password.')),
+ form_password('password', _('Old password:')),
+ form_password('new_password', _('New password:')),
+ form_password('new_password2', _('Password confirmation:')),
+ form_submit('submit_password', _('Save'))
]),
form([
- form_info(_("Here you can choose your color settings:")),
- form_select('theme', _("Color settings:"), $themes, $user_source['color']),
- form_submit('submit_theme', _("Save"))
+ form_info(_('Here you can choose your color settings:')),
+ form_select('theme', _('Color settings:'), $themes, $user_source['color']),
+ form_submit('submit_theme', _('Save'))
]),
form([
- form_info(_("Here you can choose your language:")),
- form_select('language', _("Language:"), $locales, $user_source['Sprache']),
- form_submit('submit_language', _("Save"))
+ form_info(_('Here you can choose your language:')),
+ form_select('language', _('Language:'), $locales, $user_source['Sprache']),
+ form_submit('submit_language', _('Save'))
])
])
])
@@ -124,29 +124,29 @@ function User_registration_success_view($event_welcome_message)
{
$parsedown = new Parsedown();
$event_welcome_message = $parsedown->text($event_welcome_message);
- return page_with_title(_("Registration successful"), [
+ return page_with_title(_('Registration successful'), [
msg(),
div('row', [
div('col-md-4', [
$event_welcome_message
]),
div('col-md-4', [
- '<h2>' . _("Login") . '</h2>',
+ '<h2>' . _('Login') . '</h2>',
form([
- form_text('nick', _("Nick"), ""),
- form_password('password', _("Password")),
- form_submit('submit', _("Login")),
+ form_text('nick', _('Nick'), ''),
+ form_password('password', _('Password')),
+ form_submit('submit', _('Login')),
buttons([
- button(page_link_to('user_password_recovery'), _("I forgot my password"))
+ button(page_link_to('user_password_recovery'), _('I forgot my password'))
]),
- info(_("Please note: You have to activate cookies!"), true)
+ info(_('Please note: You have to activate cookies!'), true)
], page_link_to('login'))
]),
div('col-md-4', [
- '<h2>' . _("What can I do?") . '</h2>',
- '<p>' . _("Please read about the jobs you can do to help us.") . '</p>',
+ '<h2>' . _('What can I do?') . '</h2>',
+ '<p>' . _('Please read about the jobs you can do to help us.') . '</p>',
buttons([
- button(page_link_to('angeltypes') . '&action=about', _("Teams/Job description") . ' &raquo;')
+ button(page_link_to('angeltypes') . '&action=about', _('Teams/Job description') . ' &raquo;')
])
])
])
@@ -161,18 +161,18 @@ function User_registration_success_view($event_welcome_message)
*/
function User_delete_view($user)
{
- return page_with_title(sprintf(_("Delete %s"), User_Nick_render($user)), [
+ return page_with_title(sprintf(_('Delete %s'), User_Nick_render($user)), [
msg(),
buttons([
- button(user_edit_link($user), glyph('chevron-left') . _("back"))
+ button(user_edit_link($user), glyph('chevron-left') . _('back'))
]),
error(
- _("Do you really want to delete the user including all his shifts and every other piece of his data?"),
+ _('Do you really want to delete the user including all his shifts and every other piece of his data?'),
true
),
form([
- form_password('password', _("Your password")),
- form_submit('submit', _("Delete"))
+ form_password('password', _('Your password')),
+ form_submit('submit', _('Delete'))
])
]);
}
@@ -185,15 +185,15 @@ function User_delete_view($user)
*/
function User_edit_vouchers_view($user)
{
- return page_with_title(sprintf(_("%s's vouchers"), User_Nick_render($user)), [
+ return page_with_title(sprintf(_('%s\'s vouchers'), User_Nick_render($user)), [
msg(),
buttons([
- button(user_link($user), glyph('chevron-left') . _("back"))
+ button(user_link($user), glyph('chevron-left') . _('back'))
]),
- info(sprintf(_("Angel should receive at least %d vouchers."), User_get_eligable_voucher_count($user)), true),
+ info(sprintf(_('Angel should receive at least %d vouchers.'), User_get_eligable_voucher_count($user)), true),
form([
- form_spinner('vouchers', _("Number of vouchers given out"), $user['got_voucher']),
- form_submit('submit', _("Save"))
+ form_spinner('vouchers', _('Number of vouchers given out'), $user['got_voucher']),
+ form_submit('submit', _('Save'))
], page_link_to('users') . '&action=edit_vouchers&user_id=' . $user['UID'])
]);
}
@@ -287,21 +287,21 @@ function User_shift_state_render($user)
}
if (count($upcoming_shifts) == 0) {
- return '<span class="text-success">' . _("Free") . '</span>';
+ return '<span class="text-success">' . _('Free') . '</span>';
}
if ($upcoming_shifts[0]['start'] > time()) {
if ($upcoming_shifts[0]['start'] - time() > 3600) {
- return '<span class="text-success moment-countdown" data-timestamp="' . $upcoming_shifts[0]['start'] . '">' . _("Next shift %c") . '</span>';
+ return '<span class="text-success moment-countdown" data-timestamp="' . $upcoming_shifts[0]['start'] . '">' . _('Next shift %c') . '</span>';
}
- return '<span class="text-warning moment-countdown" data-timestamp="' . $upcoming_shifts[0]['start'] . '">' . _("Next shift %c") . '</span>';
+ return '<span class="text-warning moment-countdown" data-timestamp="' . $upcoming_shifts[0]['start'] . '">' . _('Next shift %c') . '</span>';
}
$halfway = ($upcoming_shifts[0]['start'] + $upcoming_shifts[0]['end']) / 2;
if (time() < $halfway) {
- return '<span class="text-danger moment-countdown" data-timestamp="' . $upcoming_shifts[0]['start'] . '">' . _("Shift starts %c") . '</span>';
+ return '<span class="text-danger moment-countdown" data-timestamp="' . $upcoming_shifts[0]['start'] . '">' . _('Shift starts %c') . '</span>';
}
- return '<span class="text-danger moment-countdown" data-timestamp="' . $upcoming_shifts[0]['end'] . '">' . _("Shift ends %c") . '</span>';
+ return '<span class="text-danger moment-countdown" data-timestamp="' . $upcoming_shifts[0]['end'] . '">' . _('Shift ends %c') . '</span>';
}
/**
@@ -347,18 +347,18 @@ function User_view_myshift($shift, $user_source, $its_me)
}
$myshift = [
- 'date' => date("Y-m-d", $shift['start']),
- 'time' => date("H:i", $shift['start']) . ' - ' . date("H:i", $shift['end']),
+ 'date' => date('Y-m-d', $shift['start']),
+ 'time' => date('H:i', $shift['start']) . ' - ' . date('H:i', $shift['end']),
'room' => $shift['Name'],
'shift_info' => $shift_info,
'comment' => $shift['Comment']
];
if ($shift['freeloaded']) {
- if (in_array("user_shifts_admin", $privileges)) {
- $myshift['comment'] .= '<br /><p class="error">' . _("Freeloaded") . ': ' . $shift['freeload_comment'] . '</p>';
+ if (in_array('user_shifts_admin', $privileges)) {
+ $myshift['comment'] .= '<br /><p class="error">' . _('Freeloaded') . ': ' . $shift['freeload_comment'] . '</p>';
} else {
- $myshift['comment'] .= '<br /><p class="error">' . _("Freeloaded") . '</p>';
+ $myshift['comment'] .= '<br /><p class="error">' . _('Freeloaded') . '</p>';
}
}
@@ -408,12 +408,12 @@ function User_view_myshifts($shifts, $user_source, $its_me)
if (count($myshifts_table) > 0) {
$myshifts_table[] = [
- 'date' => '<b>' . _("Sum:") . '</b>',
- 'time' => "<b>" . round($timesum / 3600, 1) . " h</b>",
- 'room' => "",
- 'shift_info' => "",
- 'comment' => "",
- 'actions' => ""
+ 'date' => '<b>' . _('Sum:') . '</b>',
+ 'time' => '<b>' . round($timesum / 3600, 1) . ' h</b>',
+ 'room' => '',
+ 'shift_info' => '',
+ 'comment' => '',
+ 'actions' => ''
];
}
return $myshifts_table;
@@ -433,7 +433,7 @@ function User_view_myshifts($shifts, $user_source, $its_me)
*/
function User_view($user_source, $admin_user_privilege, $freeloader, $user_angeltypes, $user_groups, $shifts, $its_me)
{
- $user_name = htmlspecialchars($user_source['Vorname']) . " " . htmlspecialchars($user_source['Name']);
+ $user_name = htmlspecialchars($user_source['Vorname']) . ' ' . htmlspecialchars($user_source['Name']);
$myshifts_table = User_view_myshifts($shifts, $user_source, $its_me);
return page_with_title(
@@ -445,28 +445,28 @@ function User_view($user_source, $admin_user_privilege, $freeloader, $user_angel
buttons([
$admin_user_privilege ? button(
page_link_to('admin_user') . '&id=' . $user_source['UID'],
- glyph("edit") . _("edit")
+ glyph('edit') . _('edit')
) : '',
$admin_user_privilege ? button(
user_driver_license_edit_link($user_source),
- glyph("road") . _("driving license")
+ glyph('road') . _('driving license')
) : '',
($admin_user_privilege && !$user_source['Gekommen']) ? button(
page_link_to('admin_arrive') . '&arrived=' . $user_source['UID'],
- _("arrived")
+ _('arrived')
) : '',
$admin_user_privilege ? button(
page_link_to('users') . '&action=edit_vouchers&user_id=' . $user_source['UID'],
glyph('cutlery') . _('Edit vouchers')
) : '',
- $its_me ? button(page_link_to('user_settings'), glyph('list-alt') . _("Settings")) : '',
+ $its_me ? button(page_link_to('user_settings'), glyph('list-alt') . _('Settings')) : '',
$its_me ? button(
page_link_to('ical') . '&key=' . $user_source['api_key'],
- glyph('calendar') . _("iCal Export")
+ glyph('calendar') . _('iCal Export')
) : '',
$its_me ? button(
page_link_to('shifts_json_export') . '&key=' . $user_source['api_key'],
- glyph('export') . _("JSON Export")
+ glyph('export') . _('JSON Export')
) : '',
$its_me ? button(
page_link_to('user_myshifts') . '&reset',
@@ -483,9 +483,9 @@ function User_view($user_source, $admin_user_privilege, $freeloader, $user_angel
'</h1>'
]),
div('col-md-3', [
- '<h4>' . _("User state") . '</h4>',
+ '<h4>' . _('User state') . '</h4>',
($admin_user_privilege && $freeloader)
- ? '<span class="text-danger"><span class="glyphicon glyphicon-exclamation-sign"></span> ' . _("Freeloader") . '</span><br />'
+ ? '<span class="text-danger"><span class="glyphicon glyphicon-exclamation-sign"></span> ' . _('Freeloader') . '</span><br />'
: '',
$user_source['Gekommen']
? User_shift_state_render($user_source) . '<br />'
@@ -494,53 +494,53 @@ function User_view($user_source, $admin_user_privilege, $freeloader, $user_angel
? (
$user_source['Gekommen']
? '<span class="text-success"><span class="glyphicon glyphicon-home"></span> '
- . sprintf(_("Arrived at %s"), date('Y-m-d', $user_source['arrival_date']))
+ . sprintf(_('Arrived at %s'), date('Y-m-d', $user_source['arrival_date']))
. '</span>'
: '<span class="text-danger">'
- . sprintf(_("Not arrived (Planned: %s)"), date('Y-m-d', $user_source['planned_arrival_date']))
+ . sprintf(_('Not arrived (Planned: %s)'), date('Y-m-d', $user_source['planned_arrival_date']))
. '</span>'
)
: (
$user_source['Gekommen']
- ? '<span class="text-success"><span class="glyphicon glyphicon-home"></span> ' . _("Arrived") . '</span>'
- : '<span class="text-danger">' . _("Not arrived") . '</span>'),
+ ? '<span class="text-success"><span class="glyphicon glyphicon-home"></span> ' . _('Arrived') . '</span>'
+ : '<span class="text-danger">' . _('Not arrived') . '</span>'),
$admin_user_privilege
? (
$user_source['got_voucher'] > 0
? '<br /><span class="text-success">'
. glyph('cutlery')
. sprintf(
- ngettext("Got %s voucher", "Got %s vouchers", $user_source['got_voucher']),
+ ngettext('Got %s voucher', 'Got %s vouchers', $user_source['got_voucher']),
$user_source['got_voucher']
)
. '</span><br />'
- : '<br /><span class="text-danger">' . _("Got no vouchers") . '</span><br />')
+ : '<br /><span class="text-danger">' . _('Got no vouchers') . '</span><br />')
: '',
- ($user_source['Gekommen'] && $admin_user_privilege && $user_source['Aktiv']) ? ' <span class="text-success">' . _("Active") . '</span>' : '',
- ($user_source['Gekommen'] && $admin_user_privilege && $user_source['Tshirt']) ? ' <span class="text-success">' . _("T-Shirt") . '</span>' : ''
+ ($user_source['Gekommen'] && $admin_user_privilege && $user_source['Aktiv']) ? ' <span class="text-success">' . _('Active') . '</span>' : '',
+ ($user_source['Gekommen'] && $admin_user_privilege && $user_source['Tshirt']) ? ' <span class="text-success">' . _('T-Shirt') . '</span>' : ''
]),
div('col-md-3', [
- '<h4>' . _("Angeltypes") . '</h4>',
+ '<h4>' . _('Angeltypes') . '</h4>',
User_angeltypes_render($user_angeltypes)
]),
div('col-md-3', [
- '<h4>' . _("Rights") . '</h4>',
+ '<h4>' . _('Rights') . '</h4>',
User_groups_render($user_groups)
])
]),
- ($its_me || $admin_user_privilege) ? '<h2>' . _("Shifts") . '</h2>' : '',
+ ($its_me || $admin_user_privilege) ? '<h2>' . _('Shifts') . '</h2>' : '',
($its_me || $admin_user_privilege) ? table([
- 'date' => _("Day"),
- 'time' => _("Time"),
- 'room' => _("Location"),
- 'shift_info' => _("Name &amp; workmates"),
- 'comment' => _("Comment"),
- 'actions' => _("Action")
+ 'date' => _('Day'),
+ 'time' => _('Time'),
+ 'room' => _('Location'),
+ 'shift_info' => _('Name &amp; workmates'),
+ 'comment' => _('Comment'),
+ 'actions' => _('Action')
], $myshifts_table) : '',
- $its_me ? info(glyph('info-sign') . _("Your night shifts between 2 and 8 am count twice."), true) : '',
+ $its_me ? info(glyph('info-sign') . _('Your night shifts between 2 and 8 am count twice.'), true) : '',
$its_me && count($shifts) == 0
? error(sprintf(
- _("Go to the <a href=\"%s\">shifts table</a> to sign yourself up for some shifts."),
+ _('Go to the <a href="%s">shifts table</a> to sign yourself up for some shifts.'),
page_link_to('user_shifts')
), true)
: ''
@@ -557,10 +557,10 @@ function User_password_recovery_view()
{
return page_with_title(user_password_recovery_title(), [
msg(),
- _("We will send you an e-mail with a password recovery link. Please use the email address you used for registration."),
+ _('We will send you an e-mail with a password recovery link. Please use the email address you used for registration.'),
form([
- form_text('email', _("E-Mail"), ""),
- form_submit('submit', _("Recover"))
+ form_text('email', _('E-Mail'), ''),
+ form_submit('submit', _('Recover'))
])
]);
}
@@ -574,11 +574,11 @@ function User_password_set_view()
{
return page_with_title(user_password_recovery_title(), [
msg(),
- _("Please enter a new password."),
+ _('Please enter a new password.'),
form([
- form_password('password', _("Password")),
- form_password('password2', _("Confirm password")),
- form_submit('submit', _("Save"))
+ form_password('password', _('Password')),
+ form_password('password2', _('Confirm password')),
+ form_submit('submit', _('Save'))
])
]);
}
@@ -595,7 +595,9 @@ function User_angeltypes_render($user_angeltypes)
if ($angeltype['restricted'] == 1 && $angeltype['confirm_user_id'] == null) {
$class = 'text-warning';
}
- $output[] = '<a href="' . angeltype_link($angeltype['id']) . '" class="' . $class . '">' . ($angeltype['supporter'] ? glyph('education') : '') . $angeltype['name'] . '</a>';
+ $output[] = '<a href="' . angeltype_link($angeltype['id']) . '" class="' . $class . '">'
+ . ($angeltype['supporter'] ? glyph('education') : '') . $angeltype['name']
+ . '</a>';
}
return join('<br />', $output);
}
@@ -634,7 +636,7 @@ function render_user_departure_date_hint()
global $user;
if (!isset($user['planned_departure_date']) || $user['planned_departure_date'] == null) {
- return _("Please enter your planned date of departure on your settings page to give us a feeling for teardown capacities.");
+ return _('Please enter your planned date of departure on your settings page to give us a feeling for teardown capacities.');
}
return null;
@@ -649,7 +651,7 @@ function render_user_freeloader_hint()
if (User_is_freeloader($user)) {
return sprintf(
- _("You freeloaded at least %s shifts. Shift signup is locked. Please go to heavens desk to be unlocked again."),
+ _('You freeloaded at least %s shifts. Shift signup is locked. Please go to heavens desk to be unlocked again.'),
$max_freeloadable_shifts
);
}
@@ -667,7 +669,7 @@ function render_user_arrived_hint()
global $user;
if ($user['Gekommen'] == 0) {
- return _("You are not marked as arrived. Please go to heaven's desk, get your angel badge and/or tell them that you arrived already.");
+ return _('You are not marked as arrived. Please go to heaven\'s desk, get your angel badge and/or tell them that you arrived already.');
}
return null;
@@ -680,8 +682,8 @@ function render_user_tshirt_hint()
{
global $enable_tshirt_size, $user;
- if ($enable_tshirt_size && $user['Size'] == "") {
- return _("You need to specify a tshirt size in your settings!");
+ if ($enable_tshirt_size && $user['Size'] == '') {
+ return _('You need to specify a tshirt size in your settings!');
}
return null;
@@ -694,8 +696,8 @@ function render_user_dect_hint()
{
global $user;
- if ($user['DECT'] == "") {
- return _("You need to specify a DECT phone number in your settings! If you don't have a DECT phone, just enter \"-\".");
+ if ($user['DECT'] == '') {
+ return _('You need to specify a DECT phone number in your settings! If you don\'t have a DECT phone, just enter \'-\'.');
}
return null;