summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormsquare <msquare@notrademark.de>2019-05-05 15:23:13 +0200
committermsquare <msquare@notrademark.de>2019-05-05 15:23:13 +0200
commitf6a87535a061707290391b775a2cfe6cf9f644d3 (patch)
tree7efb140999a5fa3da6fdbdb7b8d5955f80fce16e
parentca0b2d8b5f650aad37b2d53577379efb4b468044 (diff)
add help button to ical export for android, fixes #402
-rw-r--r--config/config.default.php5
-rw-r--r--includes/pages/user_shifts.php2
-rw-r--r--includes/sys_template.php11
3 files changed, 16 insertions, 2 deletions
diff --git a/config/config.default.php b/config/config.default.php
index f0dc2aee..26217c39 100644
--- a/config/config.default.php
+++ b/config/config.default.php
@@ -31,6 +31,9 @@ return [
// Contact email address, linked on every page
'Contact' => env('CONTACT_EMAIL', 'mailto:ticket@c3heaven.de'),
],
+
+ // Link to documentation/help
+ 'documentation_url' => 'https://engelsystem.de/doc/',
// Email config
'email' => [
@@ -74,7 +77,7 @@ return [
'home_site' => 'news',
// Number of News shown on one site
- 'display_news' => 6,
+ 'display_news' => 10,
// Users are able to sign up
'registration_enabled' => (bool)env('REGISTRATION_ENABLED', true),
diff --git a/includes/pages/user_shifts.php b/includes/pages/user_shifts.php
index 4ddc8f70..b5d975c2 100644
--- a/includes/pages/user_shifts.php
+++ b/includes/pages/user_shifts.php
@@ -289,7 +289,7 @@ function ical_hint()
{
$user = auth()->user();
- return heading(__('iCal export'), 2)
+ return heading(__('iCal export') . ' ' . 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]),
diff --git a/includes/sys_template.php b/includes/sys_template.php
index dc87e94e..e40530d5 100644
--- a/includes/sys_template.php
+++ b/includes/sys_template.php
@@ -379,6 +379,17 @@ function button_glyph($href, $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
*
* @param array $buttons