mirror of
https://github.com/snipe/snipe-it.git
synced 2024-11-14 17:44:17 -08:00
Added checkbox and migration on how to show username
Signed-off-by: snipe <snipe@snipe.net>
This commit is contained in:
parent
be404d34c5
commit
dd3fcdf018
|
@ -0,0 +1,34 @@
|
|||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
class AddUsernameDisplayToSettings extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
Schema::table('settings', function (Blueprint $table) {
|
||||
$table->boolean('display_username')->after('show_archived_in_list')->default(1)->nullable();
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::table('settings', function (Blueprint $table) {
|
||||
if (Schema::hasColumn('assets', 'display_username_in_list')) {
|
||||
$table->dropColumn('display_username');
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
|
@ -114,6 +114,22 @@
|
|||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Include username in listings -->
|
||||
<div class="form-group {{ $errors->has('display_username') ? 'error' : '' }}">
|
||||
<div class="col-md-3">
|
||||
{{ Form::label('display_username',
|
||||
trans('general.display_username')) }}
|
||||
</div>
|
||||
<div class="col-md-9">
|
||||
{{ Form::checkbox('display_username', '1', Request::old('display_username', $setting->display_username),array('class' => 'minimal')) }}
|
||||
{{ trans('general.yes') }}
|
||||
{!! $errors->first('display_username', '<span class="alert-msg" aria-hidden="true">:message</span>') !!}
|
||||
<p class="help-block">{{ trans('general.display_username_help_text') }}</p>
|
||||
</div>
|
||||
</div>
|
||||
<!-- /.form-group -->
|
||||
|
||||
|
||||
<!-- Load images in emails -->
|
||||
<div class="form-group {{ $errors->has('show_images_in_email') ? 'error' : '' }}">
|
||||
<div class="col-md-3">
|
||||
|
|
Loading…
Reference in a new issue