Extended the iCal section with a collapsible card to show the current api key.
This commit is contained in:
parent
74b464aab5
commit
4beb5a6986
|
@ -288,13 +288,18 @@ function ical_hint()
|
||||||
{
|
{
|
||||||
$user = auth()->user();
|
$user = auth()->user();
|
||||||
|
|
||||||
return heading(__('iCal export') . ' ' . button_help('user/ical'), 2)
|
return heading(__('iCal export and API') . ' ' . button_help('user/ical'), 2)
|
||||||
. '<p>' . sprintf(
|
. '<p>' . sprintf(
|
||||||
__('Export your own shifts. <a href="%s">iCal format</a> or <a href="%s">JSON format</a> available (please keep secret, otherwise <a href="%s">reset the api key</a>).'),
|
__('Export your own shifts. <a href="%s">iCal format</a> or <a href="%s">JSON format</a> available (please keep secret, otherwise <a href="%s">reset the api key</a>).'),
|
||||||
page_link_to('ical', ['key' => $user->api_key]),
|
page_link_to('ical', ['key' => $user->api_key]),
|
||||||
page_link_to('shifts_json_export', ['key' => $user->api_key]),
|
page_link_to('shifts_json_export', ['key' => $user->api_key]),
|
||||||
page_link_to('user_myshifts', ['reset' => 1])
|
page_link_to('user_myshifts', ['reset' => 1])
|
||||||
) . '</p>';
|
)
|
||||||
|
. ' <button class="btn btn-xs btn-danger" data-toggle="collapse" data-target="#collapseApiKey" aria-expanded="false" aria-controls="collapseApiKey">
|
||||||
|
' . __('Show API Key') . '
|
||||||
|
</button>'
|
||||||
|
. '</p>'
|
||||||
|
. '<p id="collapseApiKey" class="collapse"><code>' . $user->api_key . '</code></p>';
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -1745,7 +1745,8 @@ msgstr "Meine Schichten"
|
||||||
msgid "Key changed."
|
msgid "Key changed."
|
||||||
msgstr "Key geändert."
|
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"
|
msgid "Reset API key"
|
||||||
msgstr "API-Key zurücksetzen"
|
msgstr "API-Key zurücksetzen"
|
||||||
|
|
||||||
|
@ -1923,9 +1924,9 @@ msgstr "nächste 4h"
|
||||||
msgid "next 8h"
|
msgid "next 8h"
|
||||||
msgstr "nächste 8h"
|
msgstr "nächste 8h"
|
||||||
|
|
||||||
#: includes/pages/user_shifts.php:291
|
#: includes/pages/user_shifts.php:292
|
||||||
msgid "iCal export"
|
msgid "iCal export and API"
|
||||||
msgstr "iCal Export"
|
msgstr "iCal Export und API"
|
||||||
|
|
||||||
#: includes/pages/user_shifts.php:293
|
#: includes/pages/user_shifts.php:293
|
||||||
#, php-format
|
#, php-format
|
||||||
|
@ -1938,7 +1939,11 @@ msgstr ""
|
||||||
"\">JSON Format</a> verfügbar (Link bitte geheimhalten, sonst <a href=\"%s"
|
"\">JSON Format</a> verfügbar (Link bitte geheimhalten, sonst <a href=\"%s"
|
||||||
"\">API-Key zurücksetzen</a>)."
|
"\">API-Key zurücksetzen</a>)."
|
||||||
|
|
||||||
#: 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"
|
msgid "All"
|
||||||
msgstr "Alle"
|
msgstr "Alle"
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue