add help button to ical export for android, fixes #402

This commit is contained in:
msquare 2019-05-05 15:23:13 +02:00
parent ca0b2d8b5f
commit f6a87535a0
3 changed files with 16 additions and 2 deletions

View File

@ -32,6 +32,9 @@ return [
'Contact' => env('CONTACT_EMAIL', 'mailto:ticket@c3heaven.de'), 'Contact' => env('CONTACT_EMAIL', 'mailto:ticket@c3heaven.de'),
], ],
// Link to documentation/help
'documentation_url' => 'https://engelsystem.de/doc/',
// Email config // Email config
'email' => [ 'email' => [
// Can be mail, smtp, sendmail or log // Can be mail, smtp, sendmail or log
@ -74,7 +77,7 @@ return [
'home_site' => 'news', 'home_site' => 'news',
// Number of News shown on one site // Number of News shown on one site
'display_news' => 6, 'display_news' => 10,
// Users are able to sign up // Users are able to sign up
'registration_enabled' => (bool)env('REGISTRATION_ENABLED', true), 'registration_enabled' => (bool)env('REGISTRATION_ENABLED', true),

View File

@ -289,7 +289,7 @@ function ical_hint()
{ {
$user = auth()->user(); $user = auth()->user();
return heading(__('iCal export'), 2) return heading(__('iCal export') . ' ' . 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]),

View File

@ -378,6 +378,17 @@ function button_glyph($href, $glyph, $class = '')
return button($href, glyph($glyph), $class); return button($href, glyph($glyph), $class);
} }
/**
* Rendert einen Knopf, der zur Hilfe eines bestimmten Themas führt.
*
* @param string $topic documentation resource (like user/), is appended to documentation url.
* @return string
*/
function button_help($topic = '')
{
return button(config('documentation_url') . $topic, glyph('question-sign'), 'btn-sm');
}
/** /**
* Rendert eine Toolbar mit Knöpfen * Rendert eine Toolbar mit Knöpfen
* *