summaryrefslogtreecommitdiff
path: root/includes
diff options
context:
space:
mode:
authorcbluoss <deinkoks@gmail.com>2019-12-09 22:59:20 +0100
committerIgor Scheller <igor.scheller@igorshp.de>2019-12-12 18:48:26 +0100
commit4beb5a6986cd17643040f04987e1eac3d2c787d6 (patch)
tree02e3118a2e3e972eeb883ebd8e45cdcd477a9bfc /includes
parent74b464aab5845d1d46378397e9c75fa5eac5de8e (diff)
Extended the iCal section with a collapsible card to show the current api key.
Diffstat (limited to 'includes')
-rw-r--r--includes/pages/user_shifts.php9
1 files changed, 7 insertions, 2 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)
. '<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>).'),
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])
- ) . '</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>';
}
/**