1
0
mirror of https://github.com/BookStackApp/BookStack.git synced 2025-08-09 10:22:51 +03:00

Added custom user avatars

This commit is contained in:
Dan Brown
2015-12-09 22:30:55 +00:00
parent db3acabc66
commit 8f7c642f32
16 changed files with 230 additions and 68 deletions

View File

@@ -33,7 +33,7 @@
<div class="form-group" id="logo-control">
<label for="setting-app-logo">Application Logo</label>
<p class="small">This image should be 43px in height. <br>Large images will be scaled down.</p>
<image-picker current-image="{{ Setting::get('app-logo', '') }}" default-image="/logo.png" name="setting-app-logo" image-class="logo-image"></image-picker>
<image-picker resize-height="43" resize-width="200" current-image="{{ Setting::get('app-logo', '') }}" default-image="/logo.png" name="setting-app-logo" image-class="logo-image"></image-picker>
</div>
</div>
</div>
@@ -86,6 +86,6 @@
</div>
<image-manager image-type="system" resize-height="43" resize-width="200"></image-manager>
<image-manager image-type="system"></image-manager>
@stop

View File

@@ -19,26 +19,25 @@
<div class="container small">
<form action="/users/{{$user->id}}" method="post">
<div class="row">
<div class="col-md-6">
<h1>Edit {{ $user->id === $currentUser->id ? 'Profile' : 'User' }}</h1>
<form action="/users/{{$user->id}}" method="post">
{!! csrf_field() !!}
<input type="hidden" name="_method" value="put">
@include('users/form', ['model' => $user])
</form>
{!! csrf_field() !!}
<input type="hidden" name="_method" value="put">
@include('users/form', ['model' => $user])
</div>
<div class="col-md-6">
<h1>&nbsp;</h1>
<div class="shaded padded margin-top">
<p>
<img class="avatar" src="{{ $user->getAvatar(80) }}" alt="{{ $user->name }}">
</p>
<p class="text-muted">You can change your profile picture at <a href="http://en.gravatar.com/">Gravatar</a>.</p>
<div class="form-group" id="logo-control">
<label for="user-avatar">User Avatar</label>
<p class="small">This image should be approx 256px square.</p>
<image-picker resize-height="512" resize-width="512" current-image="{{ $user->getAvatar(80) }}" current-id="{{ $user->image_id }}" default-image="/user_avatar.png" name="image_id" show-remove="false" image-class="avatar large"></image-picker>
</div>
</div>
</div>
</form>
<hr class="margin-top large">
@@ -80,5 +79,5 @@
</div>
<p class="margin-top large"><br></p>
<image-manager image-type="user"></image-manager>
@stop

View File

@@ -36,4 +36,5 @@
<div class="form-group">
<a href="/users" class="button muted">Cancel</a>
<button class="button pos" type="submit">Save</button>
</div>
</div>