]> BookStack Code Mirror - bookstack/blob - resources/views/users/account/profile.blade.php
4256df109e4052ce83dc6c6f2b70ff567c33e0cf
[bookstack] / resources / views / users / account / profile.blade.php
1 @extends('users.account.layout')
2
3 @section('main')
4
5     <section class="card content-wrap auto-height">
6         <form action="{{ url('/my-account/profile') }}" method="post" enctype="multipart/form-data">
7             {{ method_field('put') }}
8             {{ csrf_field() }}
9
10             <div class="flex-container-row gap-l items-center wrap justify-space-between">
11                 <h1 class="list-heading">{{ trans('preferences.profile') }}</h1>
12                 <div>
13                     <a href="{{ user()->getProfileUrl() }}" class="button outline">View Public Profile</a>
14                 </div>
15             </div>
16
17             <p class="text-muted text-small mb-none">
18                 Manage the details of your account that represent you to other users, in addition to
19                 details that are used for communication and system personalisation.
20             </p>
21
22             <div class="setting-list">
23
24                 <div class="flex-container-row gap-l items-center wrap">
25                     <div class="flex">
26                         <label class="setting-list-label" for="name">{{ trans('auth.name') }}</label>
27                         <p class="text-small mb-none">
28                             Configure your display name which will be visible to other users in the system
29                             within the activity you perform, and content you own.
30                         </p>
31                     </div>
32                     <div class="flex stretch-inputs">
33                         @include('form.text', ['name' => 'name'])
34                     </div>
35                 </div>
36
37                 <div>
38                     <div class="flex-container-row gap-l items-center wrap">
39                         <div class="flex">
40                             <label class="setting-list-label" for="email">{{ trans('auth.email') }}</label>
41                             <p class="text-small mb-none">
42                                 This email will be used for notifications and, depending on active system authentication, system access.
43                             </p>
44                         </div>
45                         <div class="flex stretch-inputs">
46                             @include('form.text', ['name' => 'email', 'disabled' => !userCan('users-manage')])
47                         </div>
48                     </div>
49                     @if(!userCan('users-manage'))
50                         <p class="text-small text-muted">
51                             Unfortunately you don't have permission to change your email address.
52                             If you want to change this, you'd need to ask an administrator to change this for you.
53                         </p>
54                     @endif
55                 </div>
56
57                 <div class="grid half gap-xl">
58                     <div>
59                         <label for="user-avatar"
60                                class="setting-list-label">{{ trans('settings.users_avatar') }}</label>
61                         <p class="text-small">
62                             Select an image which will be used to represent yourself to others
63                             in the system. Ideally this image should be square and about 256px in width and height.
64                         </p>
65                     </div>
66                     <div>
67                         @include('form.image-picker', [
68                             'resizeHeight' => '512',
69                             'resizeWidth' => '512',
70                             'showRemove' => false,
71                             'defaultImage' => url('/user_avatar.png'),
72                             'currentImage' => user()->getAvatar(80),
73                             'currentId' => user()->image_id,
74                             'name' => 'profile_image',
75                             'imageClass' => 'avatar large'
76                         ])
77                     </div>
78                 </div>
79
80                 @include('users.parts.language-option-row', ['value' => old('language') ?? user()->getLocale()->appLocale()])
81
82             </div>
83
84             <div class="form-group text-right">
85                 <button class="button">{{ trans('common.save') }}</button>
86             </div>
87
88         </form>
89     </section>
90
91     @if(userCan('users-manage'))
92         <section class="card content-wrap auto-height">
93             <div class="flex-container-row gap-l items-center wrap">
94                 <div class="flex">
95                     <h2 class="list-heading">Administrator Options</h2>
96                     <p class="text-small">
97                         Additional administrator-level options, like role options, can be found for your user account in the
98                         <nobr>"Settings > Users"</nobr> area of the application.
99                     </p>
100                 </div>
101                 <div class="text-m-right">
102                     <a class="button outline" href="{{ user()->getEditUrl() }}">Open</a>
103                 </div>
104             </div>
105         </section>
106     @endif
107 @stop