From 4beb5a6986cd17643040f04987e1eac3d2c787d6 Mon Sep 17 00:00:00 2001 From: cbluoss Date: Mon, 9 Dec 2019 22:59:20 +0100 Subject: [PATCH] Extended the iCal section with a collapsible card to show the current api key. --- includes/pages/user_shifts.php | 9 +++++++-- resources/lang/de_DE/default.po | 15 ++++++++++----- 2 files changed, 17 insertions(+), 7 deletions(-) diff --git a/includes/pages/user_shifts.php b/includes/pages/user_shifts.php index 20bcca86..b4acd2de 100644 --- a/includes/pages/user_shifts.php +++ b/includes/pages/user_shifts.php @@ -288,13 +288,18 @@ function ical_hint() { $user = auth()->user(); - return heading(__('iCal export') . ' ' . button_help('user/ical'), 2) + return heading(__('iCal export and API') . ' ' . button_help('user/ical'), 2) . '

' . sprintf( __('Export your own shifts. iCal format or JSON format available (please keep secret, otherwise reset the api key).'), page_link_to('ical', ['key' => $user->api_key]), page_link_to('shifts_json_export', ['key' => $user->api_key]), page_link_to('user_myshifts', ['reset' => 1]) - ) . '

'; + ) + . ' ' + . '

' + . '

' . $user->api_key . '

'; } /** diff --git a/resources/lang/de_DE/default.po b/resources/lang/de_DE/default.po index 7f017f13..9542fa19 100644 --- a/resources/lang/de_DE/default.po +++ b/resources/lang/de_DE/default.po @@ -1745,7 +1745,8 @@ msgstr "Meine Schichten" msgid "Key changed." msgstr "Key geändert." -#: includes/pages/user_myshifts.php:42 includes/view/User_view.php:628 +#: includes/pages/user_myshifts.php:42 includes/view/User_view.php:646 +#: includes/pages/user_myshifts.php:42 includes/pages/user_shifts.php:310 msgid "Reset API key" msgstr "API-Key zurücksetzen" @@ -1923,9 +1924,9 @@ msgstr "nächste 4h" msgid "next 8h" msgstr "nächste 8h" -#: includes/pages/user_shifts.php:291 -msgid "iCal export" -msgstr "iCal Export" +#: includes/pages/user_shifts.php:292 +msgid "iCal export and API" +msgstr "iCal Export und API" #: includes/pages/user_shifts.php:293 #, php-format @@ -1938,7 +1939,11 @@ msgstr "" "\">JSON Format verfügbar (Link bitte geheimhalten, sonst API-Key zurücksetzen)." -#: includes/pages/user_shifts.php:326 includes/view/ShiftTypes_view.php:48 +#: includes/pages/user_shifts.php:304 +msgid "Show API Key" +msgstr "API Key anzeigen" + +#: includes/pages/user_shifts.php:327 includes/view/ShiftTypes_view.php:48 msgid "All" msgstr "Alle"