Merge branch 'develop'

# Conflicts:
#	config/version.php
This commit is contained in:
snipe 2018-01-17 19:31:09 -08:00
commit f38dc37152
7 changed files with 67 additions and 11 deletions

View file

@ -56,6 +56,7 @@ class AssetsController extends Controller
{
$this->authorize('index', Asset::class);
$settings = Setting::getSettings();
$allowed_columns = [
'id',
@ -197,11 +198,15 @@ class AssetsController extends Controller
$assets->where('assets.assigned_to', '>', '0');
break;
default:
// terrible workaround for complex-query Laravel bug in fulltext
$assets->join('status_labels AS status_alias',function ($join) {
$join->on('status_alias.id', "=", "assets.status_id")
->where('status_alias.archived', '=', 0);
});
if ($settings->show_archived_in_list!='1') {
// terrible workaround for complex-query Laravel bug in fulltext
$assets->join('status_labels AS status_alias',function ($join) {
$join->on('status_alias.id', "=", "assets.status_id")
->where('status_alias.archived', '=', 0);
});
}
}
if (count($filter) > 0) {

View file

@ -316,6 +316,7 @@ class SettingsController extends Controller
$setting->full_multiple_companies_support = $request->input('full_multiple_companies_support', '0');
$setting->load_remote = $request->input('load_remote', '0');
$setting->show_archived_in_list = $request->input('show_archived_in_list', '0');
$setting->email_domain = $request->input('email_domain');
$setting->email_format = $request->input('email_format');
$setting->username_format = $request->input('username_format');

View file

@ -25,8 +25,8 @@ class UsersTransformer
'id' => (int) $user->id,
'avatar' => e($user->present()->gravatar),
'name' => e($user->first_name).' '.($user->last_name),
'firstname' => e($user->first_name),
'lastname' => e($user->last_name),
'first_name' => e($user->first_name),
'last_name' => e($user->last_name),
'username' => e($user->username),
'employee_num' => e($user->employee_num),
'manager' => ($user->manager) ? [

View file

@ -1,10 +1,10 @@
<?php
return array (
'app_version' => 'v4.1.10-pre',
'full_app_version' => 'v4.1.10-pre - build 3210-g0eff821',
'build_version' => '3210',
'full_app_version' => 'v4.1.10-pre - build 3215-gf08bec6',
'build_version' => '3215',
'prerelease_version' => '',
'hash_version' => 'g0eff821',
'full_hash' => 'v4.1.10-pre-80-g0eff821',
'hash_version' => 'gf08bec6',
'full_hash' => 'v4.1.10-pre-85-gf08bec6',
'branch' => 'master',
);

View file

@ -0,0 +1,32 @@
<?php
use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
class AddArchivedInListSetting extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::table('settings', function (Blueprint $table) {
$table->boolean('show_archived_in_list')->default(0);
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::table('settings', function (Blueprint $table) {
$table->dropColumn('show_archived_in_list');
});
}
}

View file

@ -92,6 +92,8 @@ return array(
'setting' => 'Setting',
'settings' => 'Settings',
'show_alerts_in_menu' => 'Show alerts in top menu',
'show_archived_in_list' => 'Archived Assets',
'show_archived_in_list_text' => 'Show archived assets in the "all assets" listing',
'site_name' => 'Site Name',
'slack_botname' => 'Slack Botname',
'slack_channel' => 'Slack Channel',

View file

@ -199,6 +199,22 @@
</div>
<!-- Archived in List -->
<div class="form-group {{ $errors->has('show_archived_in_list') ? 'error' : '' }}">
<div class="col-md-3">
{{ Form::label('show_archived_in_list',
trans('admin/settings/general.show_archived_in_list')) }}
</div>
<div class="col-md-9">
{{ Form::checkbox('show_archived_in_list', '1', Input::old('show_archived_in_list', $setting->show_archived_in_list),array('class' => 'minimal')) }}
{{ trans('admin/settings/general.show_archived_in_list_text') }}
{!! $errors->first('show_archived_in_list', '<span class="alert-msg">:message</span>') !!}
</div>
</div>
</div> <!--/.box-body-->
<div class="box-footer">
<div class="text-left col-md-6">