diff options
author | Frederic Guillot <fred@kanboard.net> | 2016-03-11 23:01:38 -0500 |
---|---|---|
committer | Frederic Guillot <fred@kanboard.net> | 2016-03-11 23:01:38 -0500 |
commit | 241ca53e4705c389b40c3a133727a2833085ae28 (patch) | |
tree | e53b4555a40bfd77c374a591f860e5f8f4fb4e80 /app | |
parent | 4f54a547fad80200ab2f2804be631ecde11ec3b5 (diff) |
Added "?" to display list of keyboard shortcuts
Diffstat (limited to 'app')
-rw-r--r-- | app/Controller/Doc.php | 8 | ||||
-rw-r--r-- | app/Template/config/about.php | 35 | ||||
-rw-r--r-- | app/Template/config/keyboard_shortcuts.php | 35 | ||||
-rw-r--r-- | app/Template/layout.php | 1 |
4 files changed, 45 insertions, 34 deletions
diff --git a/app/Controller/Doc.php b/app/Controller/Doc.php index 6f309d48..f85326ac 100644 --- a/app/Controller/Doc.php +++ b/app/Controller/Doc.php @@ -54,4 +54,12 @@ class Doc extends Base $this->response->html($this->helper->layout->app('doc/show', $this->readFile($filename))); } + + /** + * Display keyboard shortcut + */ + public function shortcuts() + { + $this->response->html($this->template->render('config/keyboard_shortcuts')); + } } diff --git a/app/Template/config/about.php b/app/Template/config/about.php index c7600d20..75d1320e 100644 --- a/app/Template/config/about.php +++ b/app/Template/config/about.php @@ -48,40 +48,7 @@ </ul> </div> -<div class="page-header"> - <h2><?= t('Keyboard shortcuts') ?></h2> -</div> -<div class="listing"> - <h3><?= t('Board/Calendar/List view') ?></h3> - <ul> - <li><?= t('Switch to the project overview') ?> = <strong>v o</strong></li> - <li><?= t('Switch to the board view') ?> = <strong>v b</strong></li> - <li><?= t('Switch to the calendar view') ?> = <strong>v c</strong></li> - <li><?= t('Switch to the list view') ?> = <strong>v l</strong></li> - <li><?= t('Switch to the Gantt chart view') ?> = <strong>v g</strong></li> - </ul> - <h3><?= t('Board view') ?></h3> - <ul> - <li><?= t('New task') ?> = <strong>n</strong></li> - <li><?= t('Expand/collapse tasks') ?> = <strong>s</strong></li> - <li><?= t('Compact/wide view') ?> = <strong>c</strong></li> - </ul> - <h3><?= t('Task view') ?></h3> - <ul> - <li><?= t('Edit task') ?> = <strong>e</strong></li> - <li><?= t('New subtask') ?> = <strong>s</strong></li> - <li><?= t('New comment') ?> = <strong>c</strong></li> - <li><?= t('New internal link') ?> = <strong>l</strong></li> - </ul> - <h3><?= t('Application') ?></h3> - <ul> - <li><?= t('Open board switcher') ?> = <strong>b</strong></li> - <li><?= t('Go to the search/filter box') ?> = <strong>f</strong></li> - <li><?= t('Reset the search/filter box') ?> = <strong>r</strong></li> - <li><?= t('Close dialog box') ?> = <strong>ESC</strong></li> - <li><?= t('Submit a form') ?> = <strong>CTRL+ENTER</strong> <?= t('or') ?> <strong>⌘+ENTER</strong></li> - </ul> -</div> +<?= $this->render('config/keyboard_shortcuts') ?> <div class="page-header"> <h2><?= t('License') ?></h2> diff --git a/app/Template/config/keyboard_shortcuts.php b/app/Template/config/keyboard_shortcuts.php new file mode 100644 index 00000000..9725ecf9 --- /dev/null +++ b/app/Template/config/keyboard_shortcuts.php @@ -0,0 +1,35 @@ +<div class="page-header"> + <h2><?= t('Keyboard shortcuts') ?></h2> +</div> +<div class="listing"> + <h3><?= t('Board/Calendar/List view') ?></h3> + <ul> + <li><?= t('Switch to the project overview') ?> = <strong>v o</strong></li> + <li><?= t('Switch to the board view') ?> = <strong>v b</strong></li> + <li><?= t('Switch to the calendar view') ?> = <strong>v c</strong></li> + <li><?= t('Switch to the list view') ?> = <strong>v l</strong></li> + <li><?= t('Switch to the Gantt chart view') ?> = <strong>v g</strong></li> + </ul> + <h3><?= t('Board view') ?></h3> + <ul> + <li><?= t('New task') ?> = <strong>n</strong></li> + <li><?= t('Expand/collapse tasks') ?> = <strong>s</strong></li> + <li><?= t('Compact/wide view') ?> = <strong>c</strong></li> + </ul> + <h3><?= t('Task view') ?></h3> + <ul> + <li><?= t('Edit task') ?> = <strong>e</strong></li> + <li><?= t('New subtask') ?> = <strong>s</strong></li> + <li><?= t('New comment') ?> = <strong>c</strong></li> + <li><?= t('New internal link') ?> = <strong>l</strong></li> + </ul> + <h3><?= t('Application') ?></h3> + <ul> + <li><?= t('Display list of keyboard shortcuts') ?> = <strong>?</strong></li> + <li><?= t('Open board switcher') ?> = <strong>b</strong></li> + <li><?= t('Go to the search/filter box') ?> = <strong>f</strong></li> + <li><?= t('Reset the search/filter box') ?> = <strong>r</strong></li> + <li><?= t('Close dialog box') ?> = <strong>ESC</strong></li> + <li><?= t('Submit a form') ?> = <strong>CTRL+ENTER</strong> <?= t('or') ?> <strong>⌘+ENTER</strong></li> + </ul> +</div>
\ No newline at end of file diff --git a/app/Template/layout.php b/app/Template/layout.php index a694a96a..74faf487 100644 --- a/app/Template/layout.php +++ b/app/Template/layout.php @@ -37,6 +37,7 @@ <body data-status-url="<?= $this->url->href('app', 'status') ?>" data-login-url="<?= $this->url->href('auth', 'login') ?>" data-markdown-preview-url="<?= $this->url->href('TaskHelper', 'preview') ?>" + data-keyboard-shortcut-url="<?= $this->url->href('Doc', 'shortcuts') ?>" data-timezone="<?= $this->app->getTimezone() ?>" data-js-lang="<?= $this->app->jsLang() ?>"> |