]> BookStack Code Mirror - bookstack/blob - resources/views/users/preferences/shortcuts.blade.php
Added shortcut input controls to make custom shortcuts work
[bookstack] / resources / views / users / preferences / shortcuts.blade.php
1 @extends('layouts.simple')
2
3 @section('body')
4     <div class="container small my-xl">
5
6         <section class="card content-wrap">
7             <form action="{{ url('/preferences/shortcuts') }}" method="post">
8                 {{ method_field('put') }}
9                 {{ csrf_field() }}
10
11                 <h1 class="list-heading">Interface Keyboard Shortcuts</h1>
12
13                 <div class="flex-container-row items-center gap-m wrap mb-m">
14                     <p class="flex mb-none min-width-m text-small text-muted">
15                         Here you can enable or disable keyboard system interface shortcuts, used for navigation
16                         and actions.
17
18                         You can customize each of the shortcuts below. Just press your desired key combination
19                         after selecting the input for a shortcut.
20                     </p>
21                     <div class="flex min-width-m text-m-center">
22                         @include('form.toggle-switch', [
23                             'name' => 'enabled',
24                             'value' => $enabled,
25                             'label' => 'Keyboard shortcuts enabled',
26                         ])
27                     </div>
28                 </div>
29
30                 <hr>
31
32                 <h2 class="list-heading mb-m">Navigation</h2>
33                 <div class="flex-container-row wrap gap-m mb-xl">
34                     <div class="flex min-width-l item-list">
35                         @include('users.preferences.parts.shortcut-control', ['label' => 'Homepage', 'id' => 'home_view'])
36                         @include('users.preferences.parts.shortcut-control', ['label' => trans('entities.shelves'), 'id' => 'shelves_view'])
37                         @include('users.preferences.parts.shortcut-control', ['label' => trans('entities.books'), 'id' => 'books_view'])
38                         @include('users.preferences.parts.shortcut-control', ['label' => trans('settings.settings'), 'id' => 'settings_view'])
39                         @include('users.preferences.parts.shortcut-control', ['label' => trans('entities.my_favourites'), 'id' => 'favourites_view'])
40                     </div>
41                     <div class="flex min-width-l item-list">
42                         @include('users.preferences.parts.shortcut-control', ['label' => trans('common.view_profile'), 'id' => 'profile_view'])
43                         @include('users.preferences.parts.shortcut-control', ['label' => trans('auth.logout'), 'id' => 'logout'])
44                         @include('users.preferences.parts.shortcut-control', ['label' => 'Global Search', 'id' => 'global_search'])
45                         @include('users.preferences.parts.shortcut-control', ['label' => trans('common.next'), 'id' => 'next'])
46                         @include('users.preferences.parts.shortcut-control', ['label' => trans('common.previous'), 'id' => 'previous'])
47                     </div>
48                 </div>
49
50                 <h2 class="list-heading mb-m">Common Actions</h2>
51                 <div class="flex-container-row wrap gap-m mb-xl">
52                     <div class="flex min-width-l item-list">
53                         @include('users.preferences.parts.shortcut-control', ['label' => trans('common.new'), 'id' => 'new'])
54                         @include('users.preferences.parts.shortcut-control', ['label' => trans('common.edit'), 'id' => 'edit'])
55                         @include('users.preferences.parts.shortcut-control', ['label' => trans('common.copy'), 'id' => 'copy'])
56                         @include('users.preferences.parts.shortcut-control', ['label' => trans('common.delete'), 'id' => 'delete'])
57                         @include('users.preferences.parts.shortcut-control', ['label' => trans('common.favourite'), 'id' => 'favourite'])
58                     </div>
59                     <div class="flex min-width-l item-list">
60                         @include('users.preferences.parts.shortcut-control', ['label' => trans('entities.export'), 'id' => 'export'])
61                         @include('users.preferences.parts.shortcut-control', ['label' => trans('common.sort'), 'id' => 'sort'])
62                         @include('users.preferences.parts.shortcut-control', ['label' => trans('entities.permissions'), 'id' => 'permissions'])
63                         @include('users.preferences.parts.shortcut-control', ['label' => trans('common.move'), 'id' => 'move'])
64                         @include('users.preferences.parts.shortcut-control', ['label' => trans('entities.revisions'), 'id' => 'revisions'])
65                     </div>
66                 </div>
67
68                 <p class="text-small text-muted">
69                     Note: When shortcuts are enabled a helper overlay is available via pressing "?" which will
70                     highlight the available shortcuts for actions currently visible on the screen.
71                 </p>
72
73                 <div class="form-group text-right">
74                     <button class="button">{{ 'Save Shortcuts' }}</button>
75                 </div>
76
77             </form>
78         </section>
79
80     </div>
81 @stop