mirror of
https://github.com/snipe/snipe-it.git
synced 2025-01-11 22:07:29 -08:00
Make version footer configurable. (#5730)
This commit is contained in:
parent
fa465a84df
commit
32e3f748d8
|
@ -396,6 +396,7 @@ class SettingsController extends Controller
|
|||
$setting->brand = $request->input('brand', '1');
|
||||
$setting->header_color = $request->input('header_color');
|
||||
$setting->support_footer = $request->input('support_footer');
|
||||
$setting->version_footer = $request->input('version_footer');
|
||||
$setting->footer_text = $request->input('footer_text');
|
||||
$setting->skin = $request->input('skin');
|
||||
$setting->show_url_in_emails = $request->input('show_url_in_emails', '0');
|
||||
|
|
29
database/migrations/2018_06_21_134622_add_version_footer.php
Executable file
29
database/migrations/2018_06_21_134622_add_version_footer.php
Executable file
|
@ -0,0 +1,29 @@
|
|||
<?php
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
class AddVersionFooter extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
Schema::table('settings', function (Blueprint $table) {
|
||||
$table->char('version_footer', 5)->nullable()->default('on');
|
||||
});
|
||||
}
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::table('settings', function (Blueprint $table) {
|
||||
$table->dropColumn('version_footer');
|
||||
});
|
||||
}
|
||||
}
|
|
@ -122,6 +122,8 @@ return array(
|
|||
'snipe_version' => 'Snipe-IT version',
|
||||
'support_footer' => 'Support Footer Links ',
|
||||
'support_footer_help' => 'Specify who sees the links to the Snipe-IT Support info and Users Manual',
|
||||
'version_footer' => 'Version in Footer ',
|
||||
'version_footer_help' => 'Specify who sees the Snipe-IT version and build number.',
|
||||
'system' => 'System Information',
|
||||
'update' => 'Update Settings',
|
||||
'value' => 'Value',
|
||||
|
|
|
@ -741,7 +741,11 @@
|
|||
<footer class="main-footer hidden-print">
|
||||
|
||||
<div class="pull-right hidden-xs">
|
||||
@if ($snipeSettings->version_footer!='off')
|
||||
@if (($snipeSettings->version_footer=='on') || (($snipeSettings->version_footer=='admin') && (Auth::user()->isSuperUser()=='1')))
|
||||
<b>Version</b> {{ config('version.app_version') }} - build {{ config('version.build_version') }} ({{ config('version.branch') }})
|
||||
@endif
|
||||
@endif
|
||||
|
||||
@if ($snipeSettings->support_footer!='off')
|
||||
@if (($snipeSettings->support_footer=='on') || (($snipeSettings->support_footer=='admin') && (Auth::user()->isSuperUser()=='1')))
|
||||
|
|
|
@ -168,6 +168,24 @@
|
|||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<!-- Version Footer -->
|
||||
<div class="form-group {{ $errors->has('version_footer') ? 'error' : '' }}">
|
||||
<div class="col-md-3">
|
||||
{{ Form::label('version_footer', trans('admin/settings/general.version_footer')) }}
|
||||
</div>
|
||||
<div class="col-md-9">
|
||||
@if (config('app.lock_passwords')===true)
|
||||
{!! Form::select('version_footer', array('on'=>'Enabled','off'=>'Disabled','admin'=>'Superadmin Only'), Input::old('version_footer', $setting->version_footer), ['class' => 'form-control disabled', 'style'=>'width: 150px ;', 'disabled' => 'disabled']) !!}
|
||||
@else
|
||||
{!! Form::select('version_footer', array('on'=>'Enabled','off'=>'Disabled','admin'=>'Superadmin Only'), Input::old('version_footer', $setting->version_footer), array('class' => 'form-control', 'style'=>'width: 150px ;')) !!}
|
||||
@endif
|
||||
|
||||
<p class="help-block">{{ trans('admin/settings/general.version_footer_help') }}</p>
|
||||
{!! $errors->first('version_footer', '<span class="alert-msg">:message</span>') !!}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Additional footer -->
|
||||
<div class="form-group {{ $errors->has('footer_text') ? 'error' : '' }}">
|
||||
<div class="col-md-3">
|
||||
|
|
Loading…
Reference in a new issue