Merge branch 'master' of github.com:planetcyborg/engelsystem
Conflicts: themes/theme1.scss
This commit is contained in:
commit
4faca9864f
|
@ -29,7 +29,7 @@ function admin_free() {
|
||||||
|
|
||||||
$users = sql_select("SELECT `User`.* FROM `User` ${angeltypesearch} LEFT JOIN `ShiftEntry` ON `User`.`UID` = `ShiftEntry`.`UID` LEFT JOIN `Shifts` ON (`ShiftEntry`.`SID` = `Shifts`.`SID` AND `Shifts`.`start` < " . sql_escape(time()) . " AND `Shifts`.`end` > " . sql_escape(time()) . ") WHERE `User`.`Gekommen` = 1 AND `Shifts`.`SID` IS NULL GROUP BY `User`.`UID` ORDER BY `Nick`");
|
$users = sql_select("SELECT `User`.* FROM `User` ${angeltypesearch} LEFT JOIN `ShiftEntry` ON `User`.`UID` = `ShiftEntry`.`UID` LEFT JOIN `Shifts` ON (`ShiftEntry`.`SID` = `Shifts`.`SID` AND `Shifts`.`start` < " . sql_escape(time()) . " AND `Shifts`.`end` > " . sql_escape(time()) . ") WHERE `User`.`Gekommen` = 1 AND `Shifts`.`SID` IS NULL GROUP BY `User`.`UID` ORDER BY `Nick`");
|
||||||
|
|
||||||
$table = "";
|
$free_users_table = array();
|
||||||
if ($search == "")
|
if ($search == "")
|
||||||
$tokens = array();
|
$tokens = array();
|
||||||
else
|
else
|
||||||
|
@ -46,24 +46,41 @@ function admin_free() {
|
||||||
if (! $match)
|
if (! $match)
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
$table .= '<tr>';
|
|
||||||
$table .= '<td>' . User_Nick_render($usr) . '</td>';
|
|
||||||
$table .= '<td>' . $usr['DECT'] . '</td>';
|
|
||||||
$table .= '<td>' . $usr['jabber'] . '</td>';
|
|
||||||
if (in_array('admin_user', $privileges))
|
|
||||||
$table .= '<td><a href="' . page_link_to('admin_user') . '&id=' . $usr['UID'] . '">edit</a></td>';
|
|
||||||
else
|
|
||||||
$table .= '<td>' . User_Nick_render($usr) . '</td>';
|
|
||||||
|
|
||||||
$table .= '</tr>';
|
$free_users_table[] = array(
|
||||||
|
'name' => User_Nick_render($usr),
|
||||||
|
'shift_state' => User_shift_mode_render(User_shift_state($usr)),
|
||||||
|
'dect' => $usr['DECT'],
|
||||||
|
'jabber' => $usr['jabber'],
|
||||||
|
'email' => $usr['email'],
|
||||||
|
'actions' => in_array('admin_user', $privileges) ? button(page_link_to('admin_user') . '&id=' . $usr['UID'], _("edit"), 'btn-xs') : ''
|
||||||
|
);
|
||||||
}
|
}
|
||||||
return template_render('../templates/admin_free.html', array(
|
return page_with_title(admin_free_title(), array(
|
||||||
'title' => admin_free_title(),
|
form(array(
|
||||||
'search' => $search,
|
div('row', array(
|
||||||
'angeltypes' => html_select_key('angeltype', 'angeltype', $angel_types, $_REQUEST['angeltype']),
|
div('col-md-4', array(
|
||||||
'confirmed_only' => isset($_REQUEST['confirmed_only']) ? 'checked' : '',
|
form_text('search', _("Search"), $search)
|
||||||
'table' => $table,
|
)),
|
||||||
'link' => page_link_to('admin_free')
|
div('col-md-4', array(
|
||||||
|
form_select('angeltype', _("Angeltype"), $angel_types, $_REQUEST['angeltype'])
|
||||||
|
)),
|
||||||
|
div('col-md-2', array(
|
||||||
|
form_checkbox('confirmed_only', _("Only confirmed"), isset($_REQUEST['confirmed_only']))
|
||||||
|
)),
|
||||||
|
div('col-md-2', array(
|
||||||
|
form_submit('submit', _("Search"))
|
||||||
|
))
|
||||||
|
))
|
||||||
|
)),
|
||||||
|
table(array(
|
||||||
|
'name' => _("Nick"),
|
||||||
|
'shift_state' => '',
|
||||||
|
'dect' => _("DECT"),
|
||||||
|
'jabber' => _("Jabber"),
|
||||||
|
'email' => _("E-Mail"),
|
||||||
|
'actions' => ''
|
||||||
|
), $free_users_table)
|
||||||
));
|
));
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
|
|
|
@ -5,87 +5,76 @@ function admin_groups_title() {
|
||||||
|
|
||||||
function admin_groups() {
|
function admin_groups() {
|
||||||
global $user;
|
global $user;
|
||||||
|
|
||||||
$html = "";
|
$html = "";
|
||||||
$groups = sql_select("SELECT * FROM `Groups` ORDER BY `Name`");
|
$groups = sql_select("SELECT * FROM `Groups` ORDER BY `Name`");
|
||||||
if (!isset ($_REQUEST["action"])) {
|
if (! isset($_REQUEST["action"])) {
|
||||||
$groups_html = "";
|
$groups_table = array();
|
||||||
foreach ($groups as $group) {
|
foreach ($groups as $group) {
|
||||||
$groups_html .= sprintf(
|
|
||||||
'<tr><td>%s</td>',
|
|
||||||
$group['Name']
|
|
||||||
);
|
|
||||||
$privileges = sql_select("SELECT * FROM `GroupPrivileges` JOIN `Privileges` ON (`GroupPrivileges`.`privilege_id` = `Privileges`.`id`) WHERE `group_id`=" . sql_escape($group['UID']));
|
$privileges = sql_select("SELECT * FROM `GroupPrivileges` JOIN `Privileges` ON (`GroupPrivileges`.`privilege_id` = `Privileges`.`id`) WHERE `group_id`=" . sql_escape($group['UID']));
|
||||||
$privileges_html = array ();
|
$privileges_html = array();
|
||||||
|
|
||||||
foreach ($privileges as $priv)
|
foreach ($privileges as $priv)
|
||||||
$privileges_html[] = $priv['name'];
|
$privileges_html[] = $priv['name'];
|
||||||
|
|
||||||
$groups_html .= sprintf(
|
$groups_table[] = array(
|
||||||
'<td>%s</td>'
|
'name' => $group['Name'],
|
||||||
. '<td><a href="%s&action=edit&id=%s">Ändern</a></td>',
|
'privileges' => join(', ', $privileges_html),
|
||||||
join(', ', $privileges_html),
|
'actions' => button(page_link_to('admin_groups') . '&action=edit&id=' . $group['UID'], _("edit"), 'btn-xs')
|
||||||
page_link_to("admin_groups"),
|
|
||||||
$group['UID']
|
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
return template_render('../templates/admin_groups.html', array (
|
return page_with_title(admin_groups_title(), array(
|
||||||
'nick' => User_Nick_render($user),
|
table(array(
|
||||||
'groups' => $groups_html
|
'name' => _("Name"),
|
||||||
|
'privileges' => _("Privileges"),
|
||||||
|
'actions' => ''
|
||||||
|
), $groups_table)
|
||||||
));
|
));
|
||||||
} else {
|
} else {
|
||||||
switch ($_REQUEST["action"]) {
|
switch ($_REQUEST["action"]) {
|
||||||
case 'edit' :
|
case 'edit':
|
||||||
if (isset ($_REQUEST['id']) && preg_match("/^-[0-9]{1,11}$/", $_REQUEST['id']))
|
if (isset($_REQUEST['id']) && preg_match("/^-[0-9]{1,11}$/", $_REQUEST['id']))
|
||||||
$id = $_REQUEST['id'];
|
$id = $_REQUEST['id'];
|
||||||
else
|
else
|
||||||
return error("Incomplete call, missing Groups ID.", true);
|
return error("Incomplete call, missing Groups ID.", true);
|
||||||
|
|
||||||
$room = sql_select("SELECT * FROM `Groups` WHERE `UID`=" . sql_escape($id) . " LIMIT 1");
|
$room = sql_select("SELECT * FROM `Groups` WHERE `UID`=" . sql_escape($id) . " LIMIT 1");
|
||||||
if (count($room) > 0) {
|
if (count($room) > 0) {
|
||||||
list ($room) = $room;
|
list($room) = $room;
|
||||||
$privileges = sql_select("SELECT `Privileges`.*, `GroupPrivileges`.`group_id` FROM `Privileges` LEFT OUTER JOIN `GroupPrivileges` ON (`Privileges`.`id` = `GroupPrivileges`.`privilege_id` AND `GroupPrivileges`.`group_id`=" . sql_escape($id) . ") ORDER BY `Privileges`.`name`");
|
$privileges = sql_select("SELECT `Privileges`.*, `GroupPrivileges`.`group_id` FROM `Privileges` LEFT OUTER JOIN `GroupPrivileges` ON (`Privileges`.`id` = `GroupPrivileges`.`privilege_id` AND `GroupPrivileges`.`group_id`=" . sql_escape($id) . ") ORDER BY `Privileges`.`name`");
|
||||||
$privileges_html = "";
|
$privileges_html = "";
|
||||||
foreach ($privileges as $priv)
|
$privileges_form = array();
|
||||||
$privileges_html .= sprintf(
|
foreach ($privileges as $priv) {
|
||||||
'<tr><td><input type="checkbox" '
|
$privileges_form[] = form_checkbox('privileges[]', $priv['desc'] . ' (' . $priv['name'] . ')', $priv['group_id'] != "", $priv['id']);
|
||||||
. 'name="privileges[]" value="%s" %s />'
|
$privileges_html .= sprintf('<tr><td><input type="checkbox" ' . 'name="privileges[]" value="%s" %s />' . '</td> <td>%s</td> <td>%s</td></tr>', $priv['id'], ($priv['group_id'] != "" ? 'checked="checked"' : ''), $priv['name'], $priv['desc']);
|
||||||
. '</td> <td>%s</td> <td>%s</td></tr>',
|
}
|
||||||
$priv['id'],
|
|
||||||
($priv['group_id'] != ""
|
$privileges_form[] = form_submit('submit', _("Save"));
|
||||||
? 'checked="checked"'
|
$html .= page_with_title(_("Edit group"), array(
|
||||||
: ''),
|
form($privileges_form, page_link_to('admin_groups') . '&action=save&id=' . $id)
|
||||||
$priv['name'],
|
|
||||||
$priv['desc']
|
|
||||||
);
|
|
||||||
|
|
||||||
$html .= template_render('../templates/admin_groups_edit_form.html', array (
|
|
||||||
'link' => page_link_to("admin_groups"),
|
|
||||||
'id' => $id,
|
|
||||||
'privileges' => $privileges_html
|
|
||||||
));
|
));
|
||||||
} else
|
} else
|
||||||
return error("No Group found.", true);
|
return error("No Group found.", true);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 'save' :
|
case 'save':
|
||||||
if (isset ($_REQUEST['id']) && preg_match("/^-[0-9]{1,11}$/", $_REQUEST['id']))
|
if (isset($_REQUEST['id']) && preg_match("/^-[0-9]{1,11}$/", $_REQUEST['id']))
|
||||||
$id = $_REQUEST['id'];
|
$id = $_REQUEST['id'];
|
||||||
else
|
else
|
||||||
return error("Incomplete call, missing Groups ID.", true);
|
return error("Incomplete call, missing Groups ID.", true);
|
||||||
|
|
||||||
$room = sql_select("SELECT * FROM `Groups` WHERE `UID`=" . sql_escape($id) . " LIMIT 1");
|
$room = sql_select("SELECT * FROM `Groups` WHERE `UID`=" . sql_escape($id) . " LIMIT 1");
|
||||||
if (!is_array($_REQUEST['privileges']))
|
if (! is_array($_REQUEST['privileges']))
|
||||||
$_REQUEST['privileges'] = array ();
|
$_REQUEST['privileges'] = array();
|
||||||
if (count($room) > 0) {
|
if (count($room) > 0) {
|
||||||
list ($room) = $room;
|
list($room) = $room;
|
||||||
sql_query("DELETE FROM `GroupPrivileges` WHERE `group_id`=" . sql_escape($id));
|
sql_query("DELETE FROM `GroupPrivileges` WHERE `group_id`=" . sql_escape($id));
|
||||||
$privilege_names = array();
|
$privilege_names = array();
|
||||||
foreach ($_REQUEST['privileges'] as $priv) {
|
foreach ($_REQUEST['privileges'] as $priv) {
|
||||||
if (preg_match("/^[0-9]{1,}$/", $priv)) {
|
if (preg_match("/^[0-9]{1,}$/", $priv)) {
|
||||||
$group_privileges_source = sql_select("SELECT * FROM `Privileges` WHERE `id`=" . sql_escape($priv) . " LIMIT 1");
|
$group_privileges_source = sql_select("SELECT * FROM `Privileges` WHERE `id`=" . sql_escape($priv) . " LIMIT 1");
|
||||||
if(count($group_privileges_source) > 0) {
|
if (count($group_privileges_source) > 0) {
|
||||||
sql_query("INSERT INTO `GroupPrivileges` SET `group_id`=" . sql_escape($id) . ", `privilege_id`=" . sql_escape($priv));
|
sql_query("INSERT INTO `GroupPrivileges` SET `group_id`=" . sql_escape($id) . ", `privilege_id`=" . sql_escape($priv));
|
||||||
$privilege_names[] = $group_privileges_source[0]['name'];
|
$privilege_names[] = $group_privileges_source[0]['name'];
|
||||||
}
|
}
|
||||||
|
|
|
@ -20,24 +20,26 @@ function admin_questions() {
|
||||||
global $user;
|
global $user;
|
||||||
|
|
||||||
if (! isset($_REQUEST['action'])) {
|
if (! isset($_REQUEST['action'])) {
|
||||||
$open_questions = "";
|
$unanswered_questions_table = array();
|
||||||
$questions = sql_select("SELECT * FROM `Questions` WHERE `AID` IS NULL");
|
$questions = sql_select("SELECT * FROM `Questions` WHERE `AID` IS NULL");
|
||||||
foreach ($questions as $question) {
|
foreach ($questions as $question) {
|
||||||
$user_source = User($question['UID']);
|
$user_source = User($question['UID']);
|
||||||
if ($user_source === false)
|
if ($user_source === false)
|
||||||
engelsystem_error("Unable to load user.");
|
engelsystem_error("Unable to load user.");
|
||||||
|
|
||||||
$open_questions .= template_render('../templates/admin_question_unanswered.html', array(
|
$unanswered_questions_table[] = array(
|
||||||
'question_nick' => User_Nick_render($user_source),
|
'from' => User_Nick_render($user_source),
|
||||||
'question_id' => $question['QID'],
|
'question' => str_replace("\n", "<br />", $question['Question']),
|
||||||
'link' => page_link_to("admin_questions"),
|
'answer' => form(array(
|
||||||
'question' => str_replace("\n", '<br />', $question['Question'])
|
form_textarea('answer', _("Answer"), ''),
|
||||||
));
|
form_submit('submit', _("Save"))
|
||||||
|
), page_link_to('admin_questions') . '&action=answer&id=' . $question['QID']),
|
||||||
|
'actions' => button(page_link_to("admin_questions") . '&action=delete&id=' . $question['QID'], _("delete"), 'btn-xs')
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
$answered_questions = "";
|
$answered_questions_table = array();
|
||||||
$questions = sql_select("SELECT * FROM `Questions` WHERE NOT `AID` IS NULL");
|
$questions = sql_select("SELECT * FROM `Questions` WHERE NOT `AID` IS NULL");
|
||||||
|
|
||||||
foreach ($questions as $question) {
|
foreach ($questions as $question) {
|
||||||
$user_source = User($question['UID']);
|
$user_source = User($question['UID']);
|
||||||
if ($user_source === false)
|
if ($user_source === false)
|
||||||
|
@ -46,21 +48,31 @@ function admin_questions() {
|
||||||
$answer_user_source = User($question['AID']);
|
$answer_user_source = User($question['AID']);
|
||||||
if ($answer_user_source === false)
|
if ($answer_user_source === false)
|
||||||
engelsystem_error("Unable to load user.");
|
engelsystem_error("Unable to load user.");
|
||||||
|
$answered_questions_table[] = array(
|
||||||
$answered_questions .= template_render('../templates/admin_question_answered.html', array(
|
'from' => User_Nick_render($user_source),
|
||||||
'question_id' => $question['QID'],
|
|
||||||
'question_nick' => User_Nick_render($user_source),
|
|
||||||
'question' => str_replace("\n", "<br />", $question['Question']),
|
'question' => str_replace("\n", "<br />", $question['Question']),
|
||||||
'answer_nick' => User_Nick_render($answer_user_source),
|
'answered_by' => User_Nick_render($answer_user_source),
|
||||||
'answer' => str_replace("\n", "<br />", $question['Answer']),
|
'answer' => str_replace("\n", "<br />", $question['Answer']),
|
||||||
'link' => page_link_to("admin_questions")
|
'actions' => button(page_link_to("admin_questions") . '&action=delete&id=' . $question['QID'], _("delete"), 'btn-xs')
|
||||||
));
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
return template_render('../templates/admin_questions.html', array(
|
return page_with_title(admin_questions_title(), array(
|
||||||
'link' => page_link_to("admin_questions"),
|
'<h2>' . _("Unanswered questions") . '</h2>',
|
||||||
'open_questions' => $open_questions,
|
table(array(
|
||||||
'answered_questions' => $answered_questions
|
'from' => _("From"),
|
||||||
|
'question' => _("Question"),
|
||||||
|
'answer' => _("Answer"),
|
||||||
|
'actions' => ''
|
||||||
|
), $unanswered_questions_table),
|
||||||
|
'<h2>' . _("Answered questions") . '</h2>',
|
||||||
|
table(array(
|
||||||
|
'from' => _("From"),
|
||||||
|
'question' => _("Question"),
|
||||||
|
'answered_by' => _("Answered by"),
|
||||||
|
'answer' => _("Answer"),
|
||||||
|
'actions' => ''
|
||||||
|
), $answered_questions_table)
|
||||||
));
|
));
|
||||||
} else {
|
} else {
|
||||||
switch ($_REQUEST['action']) {
|
switch ($_REQUEST['action']) {
|
||||||
|
|
|
@ -189,15 +189,17 @@ function admin_shifts() {
|
||||||
} while ($shift_end < $end);
|
} while ($shift_end < $end);
|
||||||
}
|
}
|
||||||
|
|
||||||
$shifts_table = "";
|
$shifts_table = array();
|
||||||
foreach ($shifts as $shift) {
|
foreach ($shifts as $shift) {
|
||||||
$shifts_table .= '<tr><td><span class="glyphicon glyphicon-time"></span> ' . date("Y-m-d H:i", $shift['start']) . ' - ' . date("H:i", $shift['end']) . '<br /><span class="glyphicon glyphicon-map-marker"></span> ' . $room_array[$shift['RID']] . '</td>';
|
$shifts_table_entry = array(
|
||||||
$shifts_table .= '<td>' . $shift['name'];
|
'timeslot' => '<span class="glyphicon glyphicon-time"></span> ' . date("Y-m-d H:i", $shift['start']) . ' - ' . date("H:i", $shift['end']) . '<br /><span class="glyphicon glyphicon-map-marker"></span> ' . $room_array[$shift['RID']],
|
||||||
|
'entries' => $shift['name']
|
||||||
|
);
|
||||||
foreach ($types as $type) {
|
foreach ($types as $type) {
|
||||||
if (isset($needed_angel_types[$type['id']]) && $needed_angel_types[$type['id']] > 0)
|
if (isset($needed_angel_types[$type['id']]) && $needed_angel_types[$type['id']] > 0)
|
||||||
$shifts_table .= '<br /><span class="icon-icon_angel"></span> <b>' . $type['name'] . ':</b> ' . $needed_angel_types[$type['id']] . ' missing';
|
$shifts_table_entry['entries'] .= '<br /><span class="icon-icon_angel"></span> <b>' . $type['name'] . ':</b> ' . $needed_angel_types[$type['id']] . ' missing';
|
||||||
}
|
}
|
||||||
$shifts_table .= '</td></tr>';
|
$shifts_table[] = $shifts_table_entry;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Fürs Anlegen zwischenspeichern:
|
// Fürs Anlegen zwischenspeichern:
|
||||||
|
@ -206,18 +208,25 @@ function admin_shifts() {
|
||||||
|
|
||||||
$hidden_types = "";
|
$hidden_types = "";
|
||||||
foreach ($needed_angel_types as $type_id => $count)
|
foreach ($needed_angel_types as $type_id => $count)
|
||||||
$hidden_types .= '<input type="hidden" name="type_' . $type_id . '" value="' . $count . '" />';
|
$hidden_types .= form_hidden('type_' . $type_id, $count);
|
||||||
return template_render('../templates/admin_shift_preview.html', array(
|
return page_with_title(_("Preview"), array(
|
||||||
'shifts_table' => $shifts_table,
|
form(array(
|
||||||
'name' => $name,
|
$hidden_types,
|
||||||
'rid' => $rid,
|
form_hidden('name', $name),
|
||||||
'start' => date("Y-m-d H:i", $start),
|
form_hidden('rid', $rid),
|
||||||
'end' => date("Y-m-d H:i", $end),
|
form_hidden('start', date("Y-m-d H:i", $start)),
|
||||||
'mode' => $mode,
|
form_hidden('end', date("Y-m-d H:i", $end)),
|
||||||
'length' => $length,
|
form_hidden('mode', $mode),
|
||||||
'change_hours' => implode(', ', $change_hours),
|
form_hidden('length', $length),
|
||||||
'angelmode' => $angelmode,
|
form_hidden('change_hours', implode(', ', $change_hours)),
|
||||||
'needed_angel_types' => $hidden_types
|
form_hidden('angelmode', $angelmode),
|
||||||
|
form_submit('back', _("back")),
|
||||||
|
table(array(
|
||||||
|
'timeslot' => _("Timeslot"),
|
||||||
|
'entries' => _("Entries")
|
||||||
|
), $shifts_table),
|
||||||
|
form_submit('submit', _("Save"))
|
||||||
|
))
|
||||||
));
|
));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -8,7 +8,8 @@ function user_unread_messages() {
|
||||||
|
|
||||||
if (isset($user)) {
|
if (isset($user)) {
|
||||||
$new_messages = sql_num_query("SELECT * FROM `Messages` WHERE isRead='N' AND `RUID`=" . sql_escape($user['UID']));
|
$new_messages = sql_num_query("SELECT * FROM `Messages` WHERE isRead='N' AND `RUID`=" . sql_escape($user['UID']));
|
||||||
return '<span class="badge">' . $new_messages . '</span>';
|
if ($new_messages > 0)
|
||||||
|
return '<span class="badge">' . $new_messages . '</span>';
|
||||||
}
|
}
|
||||||
return '';
|
return '';
|
||||||
}
|
}
|
||||||
|
@ -28,7 +29,6 @@ function user_messages() {
|
||||||
|
|
||||||
$to_select = html_select_key('to', 'to', $to_select_data, '');
|
$to_select = html_select_key('to', 'to', $to_select_data, '');
|
||||||
|
|
||||||
$messages_html = "";
|
|
||||||
$messages = sql_select("SELECT * FROM `Messages` WHERE `SUID`=" . sql_escape($user['UID']) . " OR `RUID`=" . sql_escape($user['UID']) . " ORDER BY `isRead`,`Datum` DESC");
|
$messages = sql_select("SELECT * FROM `Messages` WHERE `SUID`=" . sql_escape($user['UID']) . " OR `RUID`=" . sql_escape($user['UID']) . " ORDER BY `isRead`,`Datum` DESC");
|
||||||
foreach ($messages as $message) {
|
foreach ($messages as $message) {
|
||||||
$sender_user_source = User($message['SUID']);
|
$sender_user_source = User($message['SUID']);
|
||||||
|
@ -38,32 +38,43 @@ function user_messages() {
|
||||||
if ($receiver_user_source === false)
|
if ($receiver_user_source === false)
|
||||||
engelsystem_error(_("Unable to load user."));
|
engelsystem_error(_("Unable to load user."));
|
||||||
|
|
||||||
$messages_html .= sprintf('<tr %s> <td>%s</td> <td>%s</td> <td>%s</td> <td>%s</td><td>%s</td>', ($message['isRead'] == 'N' ? ' class="new_message"' : ''), ($message['isRead'] == 'N' ? '•' : ''), date("Y-m-d H:i", $message['Datum']), User_Nick_render($sender_user_source), User_Nick_render($receiver_user_source), str_replace("\n", '<br />', $message['Text']));
|
$messages_table_entry = array(
|
||||||
|
'new' => $message['isRead'] == 'N' ? '<span class="glyphicon glyphicon-envelope"></span>' : '',
|
||||||
|
'timestamp' => date("Y-m-d H:i", $message['Datum']),
|
||||||
|
'from' => User_Nick_render($sender_user_source),
|
||||||
|
'to' => User_Nick_render($receiver_user_source),
|
||||||
|
'text' => str_replace("\n", '<br />', $message['Text'])
|
||||||
|
);
|
||||||
|
|
||||||
$messages_html .= '<td>';
|
|
||||||
if ($message['RUID'] == $user['UID']) {
|
if ($message['RUID'] == $user['UID']) {
|
||||||
if ($message['isRead'] == 'N')
|
if ($message['isRead'] == 'N')
|
||||||
$messages_html .= '<a href="' . page_link_to("user_messages") . '&action=read&id=' . $message['id'] . '">' . _("mark as read") . '</a>';
|
$messages_table_entry['actions'] = button(page_link_to("user_messages") . '&action=read&id=' . $message['id'], _("mark as read"), 'btn-xs');
|
||||||
} else {
|
} else
|
||||||
$messages_html .= '<a href="' . page_link_to("user_messages") . '&action=delete&id=' . $message['id'] . '">' . _("delete message") . '</a>';
|
$messages_table_entry['actions'] = button(page_link_to("user_messages") . '&action=delete&id=' . $message['id'], _("delete message"), 'btn-xs');
|
||||||
}
|
$messages_table[] = $messages_table_entry;
|
||||||
$messages_html .= '</td></tr>';
|
|
||||||
}
|
}
|
||||||
|
$messages_table[] = array(
|
||||||
return template_render('../templates/user_messages.html', array(
|
'news' => '',
|
||||||
'title' => messages_title(),
|
'timestamp' => date("Y-m-d H:i"),
|
||||||
'link' => page_link_to("user_messages"),
|
|
||||||
'greeting' => msg() . sprintf(_("Hello %s, here can you leave messages for other angels"), User_Nick_render($user)) . '<br /><br />',
|
|
||||||
'messages' => $messages_html,
|
|
||||||
'new_label' => _("New"),
|
|
||||||
'date_label' => _("Date"),
|
|
||||||
'from_label' => _("Transmitted"),
|
|
||||||
'to_label' => _("Recipient"),
|
|
||||||
'text_label' => _("Message"),
|
|
||||||
'date' => date("Y-m-d H:i"),
|
|
||||||
'from' => User_Nick_render($user),
|
'from' => User_Nick_render($user),
|
||||||
'to_select' => $to_select,
|
'to' => $to_select,
|
||||||
'submit_label' => _("Save")
|
'text' => form_textarea('text', _("Message"), ''),
|
||||||
|
'actions' => form_submit('submit', _("Save"))
|
||||||
|
);
|
||||||
|
|
||||||
|
return page_with_title(messages_title(), array(
|
||||||
|
msg(),
|
||||||
|
sprintf(_("Hello %s, here can you leave messages for other angels"), User_Nick_render($user)),
|
||||||
|
form(array(
|
||||||
|
table(array(
|
||||||
|
'new' => _("New"),
|
||||||
|
'timestamp' => _("Date"),
|
||||||
|
'from' => _("Transmitted"),
|
||||||
|
'to' => _("Recipient"),
|
||||||
|
'text' => _("Message"),
|
||||||
|
'actions' => ''
|
||||||
|
), $messages_table)
|
||||||
|
), page_link_to('user_messages') . '&action=send')
|
||||||
));
|
));
|
||||||
} else {
|
} else {
|
||||||
switch ($_REQUEST['action']) {
|
switch ($_REQUEST['action']) {
|
||||||
|
|
|
@ -23,7 +23,10 @@ function user_myshifts() {
|
||||||
success(_("Key changed."));
|
success(_("Key changed."));
|
||||||
redirect(page_link_to('user_myshifts'));
|
redirect(page_link_to('user_myshifts'));
|
||||||
}
|
}
|
||||||
return template_render('../templates/user_myshifts_reset.html', array());
|
return page_with_title(_("Reset API key"), array(
|
||||||
|
error(_("If you reset the key, the url to your iCal- and JSON-export and your atom feed changes! You have to update it in every application using one of these exports."), true),
|
||||||
|
button(page_link_to('myshifts') . '&reset=ack', _("Continue"), 'btn-danger')
|
||||||
|
));
|
||||||
} elseif (isset($_REQUEST['edit']) && preg_match("/^[0-9]*$/", $_REQUEST['edit'])) {
|
} elseif (isset($_REQUEST['edit']) && preg_match("/^[0-9]*$/", $_REQUEST['edit'])) {
|
||||||
$id = $_REQUEST['edit'];
|
$id = $_REQUEST['edit'];
|
||||||
$shift = sql_select("SELECT
|
$shift = sql_select("SELECT
|
||||||
|
|
|
@ -1,90 +0,0 @@
|
||||||
<?php
|
|
||||||
function wakeup_title() {
|
|
||||||
return _("Wakeup");
|
|
||||||
}
|
|
||||||
|
|
||||||
function user_wakeup() {
|
|
||||||
global $user;
|
|
||||||
|
|
||||||
$html = "";
|
|
||||||
|
|
||||||
if (isset ($_REQUEST['action'])) {
|
|
||||||
switch ($_REQUEST['action']) {
|
|
||||||
case 'create' :
|
|
||||||
$date = DateTime::createFromFormat("Y-m-d H:i", $_REQUEST['Date']);
|
|
||||||
if ($date != null) {
|
|
||||||
$date = $date->getTimestamp();
|
|
||||||
$bemerkung = strip_request_item_nl('Bemerkung');
|
|
||||||
$ort = strip_request_item('Ort');
|
|
||||||
$SQL = "INSERT INTO `Wecken` (`UID`, `Date`, `Ort`, `Bemerkung`) "
|
|
||||||
. "VALUES ('" . sql_escape($user['UID']) . "', '"
|
|
||||||
. sql_escape($date) . "', '" . sql_escape($ort) . "', " . "'"
|
|
||||||
. sql_escape($bemerkung) . "')";
|
|
||||||
sql_query($SQL);
|
|
||||||
$html .= success(_("Entry saved."), true);
|
|
||||||
} else
|
|
||||||
$html .= error(_("Broken date!"), true);
|
|
||||||
break;
|
|
||||||
|
|
||||||
case 'delete' :
|
|
||||||
if (isset ($_REQUEST['id']) && preg_match("/^[0-9]{1,11}$/", $_REQUEST['id']))
|
|
||||||
$id = $_REQUEST['id'];
|
|
||||||
else
|
|
||||||
return error(_("Incomplete call, missing wake-up ID."), true);
|
|
||||||
|
|
||||||
$wakeup = sql_select("SELECT * FROM `Wecken` WHERE `ID`=" . sql_escape($id) . " LIMIT 1");
|
|
||||||
if (count($wakeup) > 0 && $wakeup[0]['UID'] == $user['UID']) {
|
|
||||||
sql_query("DELETE FROM `Wecken` WHERE `ID`=" . sql_escape($id) . " LIMIT 1");
|
|
||||||
$html .= success(_("Wake-up call deleted."), true);
|
|
||||||
} else
|
|
||||||
return error(_("No wake-up found."), true);
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
$html .= '<p>' . sprintf(_("Hello %s, here you can register for a wake-up call. Simply say when and where the angel should come to wake you."), User_Nick_render($user)) . '</p>';
|
|
||||||
$html .= _("All ordered wake-up calls, next first.");
|
|
||||||
$html .= '
|
|
||||||
<table border="0" width="100%" class="border" cellpadding="2" cellspacing="1">
|
|
||||||
<tr class="contenttopic">
|
|
||||||
<th>' . _("Date") . '</th>
|
|
||||||
<th>' . _("Nick") . '</th>
|
|
||||||
<th>' . _("Place") . '</th>
|
|
||||||
<th>' . _("Notes") . '</th>
|
|
||||||
<th></th>
|
|
||||||
</tr>
|
|
||||||
';
|
|
||||||
|
|
||||||
$wecken_source = sql_select("SELECT * FROM `Wecken` ORDER BY `Date` ASC");
|
|
||||||
foreach($wecken_source as $wecken) {
|
|
||||||
$html .= '<tr class="content">';
|
|
||||||
$html .= '<td>' . date("Y-m-d H:i", $wecken['Date']) . ' </td>';
|
|
||||||
|
|
||||||
$user_source = User($wecken['UID']);
|
|
||||||
if($user_source === false)
|
|
||||||
engelsystem_error("Unable to load user.");
|
|
||||||
|
|
||||||
$html .= '<td>' . User_Nick_render($user_source) . ' </td>';
|
|
||||||
$html .= '<td>' . $wecken['Ort'] . ' </td>';
|
|
||||||
$html .= '<td>' . $wecken['Bemerkung'] . ' </td>';
|
|
||||||
if ($wecken['UID'] == $user['UID'])
|
|
||||||
$html .= '<td><a href="' . page_link_to("user_wakeup") . '&action=delete&id=' . $wecken['ID'] . "\">" . _("delete") . '</a></td>';
|
|
||||||
else
|
|
||||||
$html .= '<td></td>';
|
|
||||||
$html .= '</tr>';
|
|
||||||
}
|
|
||||||
|
|
||||||
$html .= '</table><hr />' . _("Schedule a new wake-up here:");
|
|
||||||
|
|
||||||
$html .= template_render('../templates/user_wakeup.html', array (
|
|
||||||
'wakeup_link' => page_link_to("user_wakeup"),
|
|
||||||
'date_text' => _("Date"),
|
|
||||||
'date_value' => date("Y-m-d H:i"),
|
|
||||||
'place_text' => _("Place"),
|
|
||||||
'comment_text' => _("Notes"),
|
|
||||||
'comment_value' => "Knock knock Leo, follow the white rabbit to the blue tent",
|
|
||||||
'submit_text' => _("Save")
|
|
||||||
));
|
|
||||||
return $html;
|
|
||||||
}
|
|
||||||
?>
|
|
|
@ -54,7 +54,6 @@ function make_navigation() {
|
||||||
"angeltypes" => angeltypes_title(),
|
"angeltypes" => angeltypes_title(),
|
||||||
"user_messages" => messages_title() . ' ' . user_unread_messages(),
|
"user_messages" => messages_title() . ' ' . user_unread_messages(),
|
||||||
"user_questions" => questions_title(),
|
"user_questions" => questions_title(),
|
||||||
"user_wakeup" => wakeup_title(),
|
|
||||||
"admin_arrive" => admin_arrive_title(),
|
"admin_arrive" => admin_arrive_title(),
|
||||||
"admin_active" => admin_active_title(),
|
"admin_active" => admin_active_title(),
|
||||||
"admin_user" => admin_user_title(),
|
"admin_user" => admin_user_title(),
|
||||||
|
|
|
@ -42,6 +42,10 @@ function toolbar_dropdown($glyphicon, $label, $submenu) {
|
||||||
<ul class="dropdown-menu" role="menu">' . join("\n", $submenu) . '</ul></li>';
|
<ul class="dropdown-menu" role="menu">' . join("\n", $submenu) . '</ul></li>';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function form_hidden($name, $value) {
|
||||||
|
return '<input type="hidden" name="' . $name . '" value="' . $value . '" />';
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Rendert ein Zahlenfeld mit Buttons zum verstellen
|
* Rendert ein Zahlenfeld mit Buttons zum verstellen
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -58,7 +58,6 @@ require_once ('includes/pages/user_news.php');
|
||||||
require_once ('includes/pages/user_questions.php');
|
require_once ('includes/pages/user_questions.php');
|
||||||
require_once ('includes/pages/user_settings.php');
|
require_once ('includes/pages/user_settings.php');
|
||||||
require_once ('includes/pages/user_shifts.php');
|
require_once ('includes/pages/user_shifts.php');
|
||||||
require_once ('includes/pages/user_wakeup.php');
|
|
||||||
|
|
||||||
require_once ('vendor/parsedown-0.9.0/Parsedown.php');
|
require_once ('vendor/parsedown-0.9.0/Parsedown.php');
|
||||||
|
|
||||||
|
@ -169,9 +168,6 @@ if (isset($_REQUEST['p']) && preg_match("/^[a-z0-9_]*$/i", $_REQUEST['p']) && (i
|
||||||
} elseif ($p == "user_questions") {
|
} elseif ($p == "user_questions") {
|
||||||
$title = questions_title();
|
$title = questions_title();
|
||||||
$content = user_questions();
|
$content = user_questions();
|
||||||
} elseif ($p == "user_wakeup") {
|
|
||||||
$title = wakeup_title();
|
|
||||||
$content = user_wakeup();
|
|
||||||
} elseif ($p == "user_settings") {
|
} elseif ($p == "user_settings") {
|
||||||
$title = settings_title();
|
$title = settings_title();
|
||||||
$content = user_settings();
|
$content = user_settings();
|
||||||
|
|
|
@ -2689,16 +2689,16 @@ select[multiple].input-lg,
|
||||||
.btn-default {
|
.btn-default {
|
||||||
color: white;
|
color: white;
|
||||||
background-color: #424242;
|
background-color: #424242;
|
||||||
border-color: #424242; }
|
border-color: #282828; }
|
||||||
.btn-default:hover, .btn-default:focus, .btn-default:active, .btn-default.active, .open > .btn-default.dropdown-toggle {
|
.btn-default:hover, .btn-default:focus, .btn-default:active, .btn-default.active, .open > .btn-default.dropdown-toggle {
|
||||||
color: white;
|
color: white;
|
||||||
background-color: #282828;
|
background-color: #282828;
|
||||||
border-color: #232323; }
|
border-color: #090909; }
|
||||||
.btn-default:active, .btn-default.active, .open > .btn-default.dropdown-toggle {
|
.btn-default:active, .btn-default.active, .open > .btn-default.dropdown-toggle {
|
||||||
background-image: none; }
|
background-image: none; }
|
||||||
.btn-default.disabled, .btn-default.disabled:hover, .btn-default.disabled:focus, .btn-default.disabled:active, .btn-default.disabled.active, .btn-default[disabled], .btn-default[disabled]:hover, .btn-default[disabled]:focus, .btn-default[disabled]:active, .btn-default[disabled].active, fieldset[disabled] .btn-default, fieldset[disabled] .btn-default:hover, fieldset[disabled] .btn-default:focus, fieldset[disabled] .btn-default:active, fieldset[disabled] .btn-default.active {
|
.btn-default.disabled, .btn-default.disabled:hover, .btn-default.disabled:focus, .btn-default.disabled:active, .btn-default.disabled.active, .btn-default[disabled], .btn-default[disabled]:hover, .btn-default[disabled]:focus, .btn-default[disabled]:active, .btn-default[disabled].active, fieldset[disabled] .btn-default, fieldset[disabled] .btn-default:hover, fieldset[disabled] .btn-default:focus, fieldset[disabled] .btn-default:active, fieldset[disabled] .btn-default.active {
|
||||||
background-color: #424242;
|
background-color: #424242;
|
||||||
border-color: #424242; }
|
border-color: #282828; }
|
||||||
.btn-default .badge {
|
.btn-default .badge {
|
||||||
color: #424242;
|
color: #424242;
|
||||||
background-color: white; }
|
background-color: white; }
|
||||||
|
@ -2706,16 +2706,16 @@ select[multiple].input-lg,
|
||||||
.btn-primary {
|
.btn-primary {
|
||||||
color: white;
|
color: white;
|
||||||
background-color: #428bca;
|
background-color: #428bca;
|
||||||
border-color: #428bca; }
|
border-color: #282828; }
|
||||||
.btn-primary:hover, .btn-primary:focus, .btn-primary:active, .btn-primary.active, .open > .btn-primary.dropdown-toggle {
|
.btn-primary:hover, .btn-primary:focus, .btn-primary:active, .btn-primary.active, .open > .btn-primary.dropdown-toggle {
|
||||||
color: white;
|
color: white;
|
||||||
background-color: #3071a9;
|
background-color: #3071a9;
|
||||||
border-color: #2d6ca2; }
|
border-color: #090909; }
|
||||||
.btn-primary:active, .btn-primary.active, .open > .btn-primary.dropdown-toggle {
|
.btn-primary:active, .btn-primary.active, .open > .btn-primary.dropdown-toggle {
|
||||||
background-image: none; }
|
background-image: none; }
|
||||||
.btn-primary.disabled, .btn-primary.disabled:hover, .btn-primary.disabled:focus, .btn-primary.disabled:active, .btn-primary.disabled.active, .btn-primary[disabled], .btn-primary[disabled]:hover, .btn-primary[disabled]:focus, .btn-primary[disabled]:active, .btn-primary[disabled].active, fieldset[disabled] .btn-primary, fieldset[disabled] .btn-primary:hover, fieldset[disabled] .btn-primary:focus, fieldset[disabled] .btn-primary:active, fieldset[disabled] .btn-primary.active {
|
.btn-primary.disabled, .btn-primary.disabled:hover, .btn-primary.disabled:focus, .btn-primary.disabled:active, .btn-primary.disabled.active, .btn-primary[disabled], .btn-primary[disabled]:hover, .btn-primary[disabled]:focus, .btn-primary[disabled]:active, .btn-primary[disabled].active, fieldset[disabled] .btn-primary, fieldset[disabled] .btn-primary:hover, fieldset[disabled] .btn-primary:focus, fieldset[disabled] .btn-primary:active, fieldset[disabled] .btn-primary.active {
|
||||||
background-color: #428bca;
|
background-color: #428bca;
|
||||||
border-color: #428bca; }
|
border-color: #282828; }
|
||||||
.btn-primary .badge {
|
.btn-primary .badge {
|
||||||
color: #428bca;
|
color: #428bca;
|
||||||
background-color: white; }
|
background-color: white; }
|
||||||
|
@ -2723,16 +2723,16 @@ select[multiple].input-lg,
|
||||||
.btn-success {
|
.btn-success {
|
||||||
color: white;
|
color: white;
|
||||||
background-color: #5cb85c;
|
background-color: #5cb85c;
|
||||||
border-color: #5cb85c; }
|
border-color: #282828; }
|
||||||
.btn-success:hover, .btn-success:focus, .btn-success:active, .btn-success.active, .open > .btn-success.dropdown-toggle {
|
.btn-success:hover, .btn-success:focus, .btn-success:active, .btn-success.active, .open > .btn-success.dropdown-toggle {
|
||||||
color: white;
|
color: white;
|
||||||
background-color: #449d44;
|
background-color: #449d44;
|
||||||
border-color: #419641; }
|
border-color: #090909; }
|
||||||
.btn-success:active, .btn-success.active, .open > .btn-success.dropdown-toggle {
|
.btn-success:active, .btn-success.active, .open > .btn-success.dropdown-toggle {
|
||||||
background-image: none; }
|
background-image: none; }
|
||||||
.btn-success.disabled, .btn-success.disabled:hover, .btn-success.disabled:focus, .btn-success.disabled:active, .btn-success.disabled.active, .btn-success[disabled], .btn-success[disabled]:hover, .btn-success[disabled]:focus, .btn-success[disabled]:active, .btn-success[disabled].active, fieldset[disabled] .btn-success, fieldset[disabled] .btn-success:hover, fieldset[disabled] .btn-success:focus, fieldset[disabled] .btn-success:active, fieldset[disabled] .btn-success.active {
|
.btn-success.disabled, .btn-success.disabled:hover, .btn-success.disabled:focus, .btn-success.disabled:active, .btn-success.disabled.active, .btn-success[disabled], .btn-success[disabled]:hover, .btn-success[disabled]:focus, .btn-success[disabled]:active, .btn-success[disabled].active, fieldset[disabled] .btn-success, fieldset[disabled] .btn-success:hover, fieldset[disabled] .btn-success:focus, fieldset[disabled] .btn-success:active, fieldset[disabled] .btn-success.active {
|
||||||
background-color: #5cb85c;
|
background-color: #5cb85c;
|
||||||
border-color: #5cb85c; }
|
border-color: #282828; }
|
||||||
.btn-success .badge {
|
.btn-success .badge {
|
||||||
color: #5cb85c;
|
color: #5cb85c;
|
||||||
background-color: white; }
|
background-color: white; }
|
||||||
|
@ -2740,16 +2740,16 @@ select[multiple].input-lg,
|
||||||
.btn-info {
|
.btn-info {
|
||||||
color: white;
|
color: white;
|
||||||
background-color: #5bc0de;
|
background-color: #5bc0de;
|
||||||
border-color: #5bc0de; }
|
border-color: #282828; }
|
||||||
.btn-info:hover, .btn-info:focus, .btn-info:active, .btn-info.active, .open > .btn-info.dropdown-toggle {
|
.btn-info:hover, .btn-info:focus, .btn-info:active, .btn-info.active, .open > .btn-info.dropdown-toggle {
|
||||||
color: white;
|
color: white;
|
||||||
background-color: #31b0d5;
|
background-color: #31b0d5;
|
||||||
border-color: #2aabd2; }
|
border-color: #090909; }
|
||||||
.btn-info:active, .btn-info.active, .open > .btn-info.dropdown-toggle {
|
.btn-info:active, .btn-info.active, .open > .btn-info.dropdown-toggle {
|
||||||
background-image: none; }
|
background-image: none; }
|
||||||
.btn-info.disabled, .btn-info.disabled:hover, .btn-info.disabled:focus, .btn-info.disabled:active, .btn-info.disabled.active, .btn-info[disabled], .btn-info[disabled]:hover, .btn-info[disabled]:focus, .btn-info[disabled]:active, .btn-info[disabled].active, fieldset[disabled] .btn-info, fieldset[disabled] .btn-info:hover, fieldset[disabled] .btn-info:focus, fieldset[disabled] .btn-info:active, fieldset[disabled] .btn-info.active {
|
.btn-info.disabled, .btn-info.disabled:hover, .btn-info.disabled:focus, .btn-info.disabled:active, .btn-info.disabled.active, .btn-info[disabled], .btn-info[disabled]:hover, .btn-info[disabled]:focus, .btn-info[disabled]:active, .btn-info[disabled].active, fieldset[disabled] .btn-info, fieldset[disabled] .btn-info:hover, fieldset[disabled] .btn-info:focus, fieldset[disabled] .btn-info:active, fieldset[disabled] .btn-info.active {
|
||||||
background-color: #5bc0de;
|
background-color: #5bc0de;
|
||||||
border-color: #5bc0de; }
|
border-color: #282828; }
|
||||||
.btn-info .badge {
|
.btn-info .badge {
|
||||||
color: #5bc0de;
|
color: #5bc0de;
|
||||||
background-color: white; }
|
background-color: white; }
|
||||||
|
@ -2757,16 +2757,16 @@ select[multiple].input-lg,
|
||||||
.btn-warning {
|
.btn-warning {
|
||||||
color: white;
|
color: white;
|
||||||
background-color: #f0ad4e;
|
background-color: #f0ad4e;
|
||||||
border-color: #f0ad4e; }
|
border-color: #282828; }
|
||||||
.btn-warning:hover, .btn-warning:focus, .btn-warning:active, .btn-warning.active, .open > .btn-warning.dropdown-toggle {
|
.btn-warning:hover, .btn-warning:focus, .btn-warning:active, .btn-warning.active, .open > .btn-warning.dropdown-toggle {
|
||||||
color: white;
|
color: white;
|
||||||
background-color: #ec971f;
|
background-color: #ec971f;
|
||||||
border-color: #eb9316; }
|
border-color: #090909; }
|
||||||
.btn-warning:active, .btn-warning.active, .open > .btn-warning.dropdown-toggle {
|
.btn-warning:active, .btn-warning.active, .open > .btn-warning.dropdown-toggle {
|
||||||
background-image: none; }
|
background-image: none; }
|
||||||
.btn-warning.disabled, .btn-warning.disabled:hover, .btn-warning.disabled:focus, .btn-warning.disabled:active, .btn-warning.disabled.active, .btn-warning[disabled], .btn-warning[disabled]:hover, .btn-warning[disabled]:focus, .btn-warning[disabled]:active, .btn-warning[disabled].active, fieldset[disabled] .btn-warning, fieldset[disabled] .btn-warning:hover, fieldset[disabled] .btn-warning:focus, fieldset[disabled] .btn-warning:active, fieldset[disabled] .btn-warning.active {
|
.btn-warning.disabled, .btn-warning.disabled:hover, .btn-warning.disabled:focus, .btn-warning.disabled:active, .btn-warning.disabled.active, .btn-warning[disabled], .btn-warning[disabled]:hover, .btn-warning[disabled]:focus, .btn-warning[disabled]:active, .btn-warning[disabled].active, fieldset[disabled] .btn-warning, fieldset[disabled] .btn-warning:hover, fieldset[disabled] .btn-warning:focus, fieldset[disabled] .btn-warning:active, fieldset[disabled] .btn-warning.active {
|
||||||
background-color: #f0ad4e;
|
background-color: #f0ad4e;
|
||||||
border-color: #f0ad4e; }
|
border-color: #282828; }
|
||||||
.btn-warning .badge {
|
.btn-warning .badge {
|
||||||
color: #f0ad4e;
|
color: #f0ad4e;
|
||||||
background-color: white; }
|
background-color: white; }
|
||||||
|
@ -2774,16 +2774,16 @@ select[multiple].input-lg,
|
||||||
.btn-danger {
|
.btn-danger {
|
||||||
color: white;
|
color: white;
|
||||||
background-color: #d9534f;
|
background-color: #d9534f;
|
||||||
border-color: #d9534f; }
|
border-color: #282828; }
|
||||||
.btn-danger:hover, .btn-danger:focus, .btn-danger:active, .btn-danger.active, .open > .btn-danger.dropdown-toggle {
|
.btn-danger:hover, .btn-danger:focus, .btn-danger:active, .btn-danger.active, .open > .btn-danger.dropdown-toggle {
|
||||||
color: white;
|
color: white;
|
||||||
background-color: #c9302c;
|
background-color: #c9302c;
|
||||||
border-color: #c12e2a; }
|
border-color: #090909; }
|
||||||
.btn-danger:active, .btn-danger.active, .open > .btn-danger.dropdown-toggle {
|
.btn-danger:active, .btn-danger.active, .open > .btn-danger.dropdown-toggle {
|
||||||
background-image: none; }
|
background-image: none; }
|
||||||
.btn-danger.disabled, .btn-danger.disabled:hover, .btn-danger.disabled:focus, .btn-danger.disabled:active, .btn-danger.disabled.active, .btn-danger[disabled], .btn-danger[disabled]:hover, .btn-danger[disabled]:focus, .btn-danger[disabled]:active, .btn-danger[disabled].active, fieldset[disabled] .btn-danger, fieldset[disabled] .btn-danger:hover, fieldset[disabled] .btn-danger:focus, fieldset[disabled] .btn-danger:active, fieldset[disabled] .btn-danger.active {
|
.btn-danger.disabled, .btn-danger.disabled:hover, .btn-danger.disabled:focus, .btn-danger.disabled:active, .btn-danger.disabled.active, .btn-danger[disabled], .btn-danger[disabled]:hover, .btn-danger[disabled]:focus, .btn-danger[disabled]:active, .btn-danger[disabled].active, fieldset[disabled] .btn-danger, fieldset[disabled] .btn-danger:hover, fieldset[disabled] .btn-danger:focus, fieldset[disabled] .btn-danger:active, fieldset[disabled] .btn-danger.active {
|
||||||
background-color: #d9534f;
|
background-color: #d9534f;
|
||||||
border-color: #d9534f; }
|
border-color: #282828; }
|
||||||
.btn-danger .badge {
|
.btn-danger .badge {
|
||||||
color: #d9534f;
|
color: #d9534f;
|
||||||
background-color: white; }
|
background-color: white; }
|
||||||
|
|
|
@ -1,20 +0,0 @@
|
||||||
<div class="col-md-10">
|
|
||||||
<h1>%title%</h1>
|
|
||||||
<form action="%link%" method="post">
|
|
||||||
<p>
|
|
||||||
Search Angel: <input type="text" name="search" value="%search%" placeholder="Name"> %angeltypes% <label><input type="checkbox" name="confirmed_only" %confirmed_only% value="1"> Nur zugelassene</label> <input type="submit" name="submit" value="Search">
|
|
||||||
</p>
|
|
||||||
</form>
|
|
||||||
<table class="table">
|
|
||||||
<thead>
|
|
||||||
<tr>
|
|
||||||
<th>Nickname</th>
|
|
||||||
<th>DECT</th>
|
|
||||||
<th>Jabber</th>
|
|
||||||
<th>Edit</th>
|
|
||||||
</tr>
|
|
||||||
</thead>
|
|
||||||
<tbody>%table%
|
|
||||||
</tbody>
|
|
||||||
</table>
|
|
||||||
</div>
|
|
|
@ -1,14 +0,0 @@
|
||||||
<p>
|
|
||||||
Hallo %nick%, <br /> hier hast du die Möglichkeit Gruppenrechte zu ändern:
|
|
||||||
</p>
|
|
||||||
<table class="table">
|
|
||||||
<thead>
|
|
||||||
<tr>
|
|
||||||
<th>Name</th>
|
|
||||||
<th>Rechte</th>
|
|
||||||
<th> </th>
|
|
||||||
</tr>
|
|
||||||
</thead>
|
|
||||||
<tbody>%groups%
|
|
||||||
</tbody>
|
|
||||||
</table>
|
|
|
@ -1,14 +0,0 @@
|
||||||
<form action="%link%&action=save" method="post">
|
|
||||||
<table class="table">
|
|
||||||
<thead>
|
|
||||||
<tr>
|
|
||||||
<th> </th>
|
|
||||||
<th>Name</th>
|
|
||||||
<th>Description</th>
|
|
||||||
</tr>
|
|
||||||
</thead>
|
|
||||||
<tbody>%privileges%
|
|
||||||
</tbody>
|
|
||||||
</table>
|
|
||||||
<input type="hidden" name="id" value="%id%" /><input class="btn btn-primary" type="submit" name="submit" value="Save" />
|
|
||||||
</form>
|
|
|
@ -1,9 +0,0 @@
|
||||||
<tr>
|
|
||||||
<td> %question_nick% </td>
|
|
||||||
<td> %question% </td>
|
|
||||||
<td> %answer_nick% </td>
|
|
||||||
<td> %answer% </td>
|
|
||||||
<td>
|
|
||||||
<a href="%link%&action=delete&id=%question_id%">Löschen</a>
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
|
@ -1,16 +0,0 @@
|
||||||
<tr>
|
|
||||||
<td>%question_nick%</td>
|
|
||||||
<td>%question%</td>
|
|
||||||
<td>
|
|
||||||
<form action="%link%&action=answer" method="post">
|
|
||||||
<div class="form-group">
|
|
||||||
<textarea class="form-control" name="answer"></textarea>
|
|
||||||
</div>
|
|
||||||
<input type="hidden" name="id" value="%question_id%" />
|
|
||||||
<div class="form-group">
|
|
||||||
<input class="btn btn-default" type="submit" name="submit" value="Speichern" />
|
|
||||||
</div>
|
|
||||||
</form>
|
|
||||||
</td>
|
|
||||||
<td><a href="%link%&action=delete&id=%question_id%">Löschen</a></td>
|
|
||||||
</tr>
|
|
|
@ -1,31 +0,0 @@
|
||||||
<div class="col-md-10">
|
|
||||||
<h1>Fragen beantworten</h1>
|
|
||||||
<h2>Unbeantwortete Fragen:</h2>
|
|
||||||
<table class="table">
|
|
||||||
<thead>
|
|
||||||
<tr>
|
|
||||||
<th>Von</th>
|
|
||||||
<th>Frage</th>
|
|
||||||
<th>Antwort</th>
|
|
||||||
<th> </th>
|
|
||||||
</tr>
|
|
||||||
</thead>
|
|
||||||
<tbody>%open_questions%
|
|
||||||
</tbody>
|
|
||||||
</table>
|
|
||||||
<hr />
|
|
||||||
<h2>Beantwortete Fragen:</h2>
|
|
||||||
<table class="table">
|
|
||||||
<thead>
|
|
||||||
<tr>
|
|
||||||
<th>Von</th>
|
|
||||||
<th>Frage</th>
|
|
||||||
<th>Von</th>
|
|
||||||
<th>Antwort</th>
|
|
||||||
<th> </th>
|
|
||||||
</tr>
|
|
||||||
</thead>
|
|
||||||
<tbody>%answered_questions%
|
|
||||||
</tbody>
|
|
||||||
</table>
|
|
||||||
</div>
|
|
|
@ -1,59 +0,0 @@
|
||||||
Raum und dafür benötigte Engel bearbeiten:
|
|
||||||
<br/>
|
|
||||||
<form action="%link%&action=changesave" method="post">
|
|
||||||
<table>
|
|
||||||
<tr>
|
|
||||||
<td>
|
|
||||||
Name
|
|
||||||
</td>
|
|
||||||
<td>
|
|
||||||
<input type="text" name="Name" value="%name%" />
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td>
|
|
||||||
Man
|
|
||||||
</td>
|
|
||||||
<td>
|
|
||||||
<input type="text" name="Man" value="%man%" />
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td>
|
|
||||||
From Pentabarf
|
|
||||||
</td>
|
|
||||||
<td>
|
|
||||||
%from_pentabarf_options%
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td>
|
|
||||||
Show
|
|
||||||
</td>
|
|
||||||
<td>
|
|
||||||
%show_options%
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td>
|
|
||||||
Number
|
|
||||||
</td>
|
|
||||||
<td>
|
|
||||||
<input type="text" name="Number" value="%number%" />
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<th>
|
|
||||||
Angle Type
|
|
||||||
</th>
|
|
||||||
<th>
|
|
||||||
Needed for this room
|
|
||||||
</th>
|
|
||||||
</tr>
|
|
||||||
%angel_types%
|
|
||||||
</table>
|
|
||||||
<input type="hidden" name="RID" value="%room_id%" /><input type="submit" value="Save" />
|
|
||||||
</form>
|
|
||||||
<form action="%link%&action=delete" method="post">
|
|
||||||
<input type="hidden" name="RID" value="%room_id%" /><input type="submit" value="Delete" />
|
|
||||||
</form>
|
|
|
@ -1,46 +0,0 @@
|
||||||
Neuen Raum einrichten:
|
|
||||||
<br/>
|
|
||||||
<form action="%link%&action=newsave" method="post">
|
|
||||||
<table>
|
|
||||||
<tr>
|
|
||||||
<td>
|
|
||||||
Name
|
|
||||||
</td>
|
|
||||||
<td>
|
|
||||||
<input type="text" name="Name" />
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td>
|
|
||||||
Man
|
|
||||||
</td>
|
|
||||||
<td>
|
|
||||||
<input type="text" name="Man" />
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td>
|
|
||||||
From Pentabarf
|
|
||||||
</td>
|
|
||||||
<td>
|
|
||||||
<input type="radio" name="FromPentabarf" value="Y" /> Yes <input type="radio" name="FromPentabarf" value="N" />No
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td>
|
|
||||||
Show
|
|
||||||
</td>
|
|
||||||
<td>
|
|
||||||
<input type="radio" name="Show" value="Y" /> Yes<input type="radio" name="Show" value="N" /> No
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td>
|
|
||||||
Number
|
|
||||||
</td>
|
|
||||||
<td>
|
|
||||||
<input type="text" name="Number" value="" />
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
</table><input type="submit" value="Create" />
|
|
||||||
</form>
|
|
|
@ -1,20 +0,0 @@
|
||||||
<div class="col-md-10">
|
|
||||||
<h1>Vorschau:</h1>
|
|
||||||
<form action="" method="post">
|
|
||||||
<table class="table">
|
|
||||||
<thead>
|
|
||||||
<tr>
|
|
||||||
<th>Timeslot</th>
|
|
||||||
<th>Entries</th>
|
|
||||||
</tr>
|
|
||||||
</thead>
|
|
||||||
<tbody>%shifts_table%
|
|
||||||
</tbody>
|
|
||||||
</table>
|
|
||||||
<p>
|
|
||||||
<input type="submit" name="back" value="Zurück" /><input type="submit" name="submit" value="Erstellen" />
|
|
||||||
</p>
|
|
||||||
<input type="hidden" name="name" value="%name%" /> <input type="hidden" name="rid" value="%rid%" /> <input type="hidden" name="start" value="%start%" /> <input type="hidden" name="end" value="%end%" /> <input type="hidden" name="mode" value="%mode%" /> <input type="hidden" name="length"
|
|
||||||
value="%length%" /> <input type="hidden" name="change_hours" value="%change_hours%" /> <input type="hidden" name="angelmode" value="%angelmode%" /> %needed_angel_types%
|
|
||||||
</form>
|
|
||||||
</div>
|
|
|
@ -1,29 +0,0 @@
|
||||||
<div class="col-md-10">
|
|
||||||
<h1>%title%</h1>
|
|
||||||
%greeting%
|
|
||||||
<form action="%link%&action=send" method="post">
|
|
||||||
<table class="table">
|
|
||||||
<thead>
|
|
||||||
<tr>
|
|
||||||
<th>%new_label%</th>
|
|
||||||
<th>%date_label%</th>
|
|
||||||
<th>%from_label%</th>
|
|
||||||
<th>%to_label%</th>
|
|
||||||
<th>%text_label%</th>
|
|
||||||
<th> </th>
|
|
||||||
</tr>
|
|
||||||
</thead>
|
|
||||||
<tbody>
|
|
||||||
%messages%
|
|
||||||
<tr>
|
|
||||||
<td> </td>
|
|
||||||
<td>%date%</td>
|
|
||||||
<td>%from%</td>
|
|
||||||
<td>%to_select%</td>
|
|
||||||
<td><textarea class="form-control" name="text"></textarea></td>
|
|
||||||
<td><input class="btn btn-primary" type="submit" name="submit" value="%submit_label%" /></td>
|
|
||||||
</tr>
|
|
||||||
</tbody>
|
|
||||||
</table>
|
|
||||||
</form>
|
|
||||||
</div>
|
|
|
@ -1,6 +0,0 @@
|
||||||
<p class="error">
|
|
||||||
Wenn Du Deinen Key zurück setzt, ändert sich der Link zu Deinem iCal- und JSON-Export, sowie zu dem Atom Feed! Du musst diesen dann an allen Stellen, wo Du ihn verwendest aktualisieren.
|
|
||||||
</p>
|
|
||||||
<p>
|
|
||||||
<a href="?p=user_myshifts&reset=ack">Fortfahren »</a>
|
|
||||||
</p>
|
|
|
@ -1,41 +0,0 @@
|
||||||
<p>
|
|
||||||
Beantwortete Fragen:
|
|
||||||
</p>
|
|
||||||
<table>
|
|
||||||
<thead>
|
|
||||||
<tr>
|
|
||||||
<th>
|
|
||||||
Frage
|
|
||||||
</th>
|
|
||||||
<th>
|
|
||||||
Von
|
|
||||||
</th>
|
|
||||||
<th>
|
|
||||||
Antwort
|
|
||||||
</th>
|
|
||||||
<th>
|
|
||||||
|
|
||||||
</th>
|
|
||||||
</tr>
|
|
||||||
</thead>
|
|
||||||
<tbody>
|
|
||||||
%answered_questions%
|
|
||||||
</tbody>
|
|
||||||
</table>
|
|
||||||
<hr/>
|
|
||||||
<p>
|
|
||||||
Frage einen Erzengel:
|
|
||||||
</p>
|
|
||||||
<form action="%link%&action=ask" method="post">
|
|
||||||
<table>
|
|
||||||
<tr>
|
|
||||||
<td>
|
|
||||||
Frage:
|
|
||||||
</td>
|
|
||||||
<td>
|
|
||||||
<textarea name="question"></textarea>
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
</table>
|
|
||||||
<input type="submit" name="submit" value="Fragen" />
|
|
||||||
</form>
|
|
|
@ -1,29 +0,0 @@
|
||||||
<form action="%wakeup_link%&action=create" method="post">
|
|
||||||
<table>
|
|
||||||
<tr>
|
|
||||||
<td align="right">
|
|
||||||
%date_text%:
|
|
||||||
</td>
|
|
||||||
<td>
|
|
||||||
<input type="text" name="Date" value="%date_value%">
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td align="right">
|
|
||||||
%place_text%
|
|
||||||
</td>
|
|
||||||
<td>
|
|
||||||
<input type="text" name="Ort" value="">
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td align="right">
|
|
||||||
%comment_text%
|
|
||||||
</td>
|
|
||||||
<td>
|
|
||||||
<textarea name="Bemerkung" rows="5" cols="40">%comment_value%</textarea>
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
</table>
|
|
||||||
<input type="submit" name="submit" value="%submit_text%" />
|
|
||||||
</form>
|
|
|
@ -167,27 +167,28 @@ $btn-font-weight: normal;
|
||||||
|
|
||||||
$btn-default-color: #fff;
|
$btn-default-color: #fff;
|
||||||
$btn-default-bg: lighten($gray-dark, 10%);
|
$btn-default-bg: lighten($gray-dark, 10%);
|
||||||
$btn-default-border: #282828;
|
|
||||||
|
$btn-default-border: darken($btn-default-bg, 10%);
|
||||||
|
|
||||||
$btn-primary-color: $btn-default-color;
|
$btn-primary-color: $btn-default-color;
|
||||||
$btn-primary-bg: $brand-primary;
|
$btn-primary-bg: $brand-primary;
|
||||||
$btn-primary-border: $btn-primary-bg;
|
$btn-primary-border: darken($btn-default-bg, 10%);
|
||||||
|
|
||||||
$btn-success-color: $btn-default-color;
|
$btn-success-color: $btn-default-color;
|
||||||
$btn-success-bg: $brand-success;
|
$btn-success-bg: $brand-success;
|
||||||
$btn-success-border: $btn-success-bg;
|
$btn-success-border: darken($btn-default-bg, 10%);
|
||||||
|
|
||||||
$btn-info-color: $btn-default-color;
|
$btn-info-color: $btn-default-color;
|
||||||
$btn-info-bg: $brand-info;
|
$btn-info-bg: $brand-info;
|
||||||
$btn-info-border: $btn-info-bg;
|
$btn-info-border: darken($btn-default-bg, 10%);
|
||||||
|
|
||||||
$btn-warning-color: $btn-default-color;
|
$btn-warning-color: $btn-default-color;
|
||||||
$btn-warning-bg: $brand-warning;
|
$btn-warning-bg: $brand-warning;
|
||||||
$btn-warning-border: $btn-warning-bg;
|
$btn-warning-border: darken($btn-default-bg, 10%);
|
||||||
|
|
||||||
$btn-danger-color: $btn-default-color;
|
$btn-danger-color: $btn-default-color;
|
||||||
$btn-danger-bg: $brand-danger;
|
$btn-danger-bg: $brand-danger;
|
||||||
$btn-danger-border: $btn-danger-bg;
|
$btn-danger-border: darken($btn-default-bg, 10%);
|
||||||
|
|
||||||
$btn-link-disabled-color: $gray-light;
|
$btn-link-disabled-color: $gray-light;
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue