diff --git a/public/css/app.css b/public/css/app.css
index 5ff4e5923..6b0d5092a 100644
--- a/public/css/app.css
+++ b/public/css/app.css
@@ -600,3 +600,7 @@ input[type="number"] {
margin-top: 6px;
margin-left: -20px;
}
+
+.user.user-menu, .user.user-menu a.dropdown-toggle {
+ min-height: 50px;
+}
diff --git a/resources/views/auth/users/create.blade.php b/resources/views/auth/users/create.blade.php
index 1bae57785..7dfd10fd3 100644
--- a/resources/views/auth/users/create.blade.php
+++ b/resources/views/auth/users/create.blade.php
@@ -18,7 +18,19 @@
{{ Form::selectGroup('locale', trans_choice('general.languages', 1), 'flag', language()->allowed(), setting('general.default_locale')) }}
- {{ Form::fileGroup('picture', trans_choice('general.pictures', 1)) }}
+ @if (setting('general.use_gravatar', '0') == '1')
+ {{ Form::hidden('picture', trans_choice('general.pictures', 1)) }}
+
+ @else
+ {{ Form::fileGroup('picture', trans_choice('general.pictures', 1)) }}
+ @endif
@permission('read-companies-companies')
{{ Form::checkboxGroup('companies', trans_choice('general.companies', 2), $companies, 'company_name') }}
@@ -60,11 +72,13 @@
placeholder: "{{ trans('general.form.select.field', ['field' => trans_choice('general.languages', 1)]) }}"
});
+ @if (setting('general.use_gravatar', '0') != '1')
$('#picture').fancyfile({
text : '{{ trans('general.form.select.file') }}',
style : 'btn-default',
placeholder : '{{ trans('general.form.no_file_selected') }}'
});
+ @endif
$('input[type=checkbox]').iCheck({
checkboxClass: 'icheckbox_square-green',
diff --git a/resources/views/auth/users/edit.blade.php b/resources/views/auth/users/edit.blade.php
index 1c2d1b9b0..0fde89e6d 100644
--- a/resources/views/auth/users/edit.blade.php
+++ b/resources/views/auth/users/edit.blade.php
@@ -23,7 +23,18 @@
{{ Form::selectGroup('locale', trans_choice('general.languages', 1), 'flag', language()->allowed()) }}
- {{ Form::fileGroup('picture', trans_choice('general.pictures', 1)) }}
+ @if (setting('general.use_gravatar', '0') == '1')
+
+ @else
+ {{ Form::fileGroup('picture', trans_choice('general.pictures', 1)) }}
+ @endif
@permission('read-companies-companies')
{{ Form::checkboxGroup('companies', trans_choice('general.companies', 2), $companies, 'company_name') }}
@@ -68,6 +79,7 @@
placeholder: "{{ trans('general.form.select.field', ['field' => trans_choice('general.languages', 1)]) }}"
});
+ @if (setting('general.use_gravatar', '0') != '1')
$('#picture').fancyfile({
text : '{{ trans('general.form.select.file') }}',
style : 'btn-default',
@@ -98,6 +110,7 @@
confirmDelete("#picture-{!! $user->picture->id !!}", "{!! trans('general.attachment') !!}", "{!! trans('general.delete_confirm', ['name' => '' . $user->picture->basename . '', 'type' => strtolower(trans('general.attachment'))]) !!}", "{!! trans('general.cancel') !!}", "{!! trans('general.delete') !!}");
});
@endif
+ @endif
$('input[type=checkbox]').iCheck({
checkboxClass: 'icheckbox_square-green',
diff --git a/resources/views/auth/users/index.blade.php b/resources/views/auth/users/index.blade.php
index 6b71dedab..00058867e 100644
--- a/resources/views/auth/users/index.blade.php
+++ b/resources/views/auth/users/index.blade.php
@@ -43,8 +43,12 @@
+ @if (setting('general.use_gravatar', '0') == '1')
+
+ @else
@if ($item->picture)
-
+
+ @endif
@endif
{{ $item->name }}
diff --git a/resources/views/items/items/create.blade.php b/resources/views/items/items/create.blade.php
index 55b8e6cd6..b4bd4af29 100644
--- a/resources/views/items/items/create.blade.php
+++ b/resources/views/items/items/create.blade.php
@@ -22,7 +22,17 @@
{{ Form::selectGroup('tax_id', trans_choice('general.taxes', 1), 'percent', $taxes, setting('general.default_tax'), []) }}
- {{ Form::selectGroup('category_id', trans_choice('general.categories', 1), 'folder-open-o', $categories, null, []) }}
+
{{ Form::fileGroup('picture', trans_choice('general.pictures', 1)) }}
@@ -41,10 +51,12 @@
@push('js')
+
@endpush
@push('css')
+
@endpush
@push('scripts')
@@ -71,5 +83,89 @@
placeholder : '{{ trans('general.form.no_file_selected') }}'
});
});
+
+ function createCategory() {
+ $('#modal-create-category').remove();
+
+ modal = '';
+ modal += ' ';
+ modal += ' ';
+ modal += ' ';
+ modal += ' ';
+ modal += ' {!! Form::open(['id' => 'form-create-category', 'role' => 'form']) !!}';
+ modal += ' ';
+ modal += ' ';
+ modal += ' ';
+ modal += ' {!! Form::hidden('type', 'item', []) !!}';
+ modal += ' {!! Form::hidden('enabled', '1', []) !!}';
+ modal += ' ';
+ modal += ' {!! Form::close() !!}';
+ modal += ' ';
+ modal += ' ';
+ modal += ' ';
+ modal += ' ';
+ modal += ' ';
+
+ $('body').append(modal);
+
+ $('#category-color-picker').colorpicker();
+
+ $('#modal-create-category').modal('show');
+ }
+
+ $(document).on('click', '#button-create-category', function (e) {
+ $('#modal-create-category .modal-header').before('');
+
+ $.ajax({
+ url: '{{ url("settings/categories/category") }}',
+ type: 'POST',
+ dataType: 'JSON',
+ data: $("#form-create-category").serialize(),
+ beforeSend: function () {
+ $(".form-group").removeClass("has-error");
+ $(".help-block").remove();
+ },
+ success: function(data) {
+ $('#span-loading').remove();
+
+ $('#modal-create-category').modal('hide');
+
+ $("#category_id").append('');
+ $("#category_id").select2('refresh');
+ },
+ error: function(error, textStatus, errorThrown) {
+ $('#span-loading').remove();
+
+ if (error.responseJSON.name) {
+ $("input[name='name']").parent().parent().addClass('has-error');
+ $("input[name='name']").parent().after('' + error.responseJSON.name + ' ');
+ }
+
+ if (error.responseJSON.color) {
+ $("input[name='color']").parent().parent().addClass('has-error');
+ $("input[name='color']").parent().after('' + error.responseJSON.color + ' ');
+ }
+ }
+ });
+ });
@endpush
|