Merge branch 'develop'

This commit is contained in:
snipe 2018-01-19 20:49:20 -08:00
commit 5dcc63dc74
7 changed files with 77 additions and 2 deletions

2
.github/stale.yml vendored
View file

@ -9,7 +9,7 @@ exemptLabels:
- ready for dev
- bounty
# Label to use when marking an issue as stale
staleLabel: wontfix
staleLabel: stale
# Comment to post when marking an issue as stale. Set to `false` to disable
markComment: >
This issue has been automatically marked as stale because it has not had

View file

@ -317,6 +317,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->dashboard_message = $request->input('dashboard_message');
$setting->email_domain = $request->input('email_domain');
$setting->email_format = $request->input('email_format');
$setting->username_format = $request->input('username_format');

View file

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

View file

@ -25,6 +25,8 @@ return array(
'custom_css_help' => 'Enter any custom CSS overrides you would like to use. Do not include the &lt;style&gt;&lt;/style&gt; tags.',
'custom_forgot_pass_url' => 'Custom Password Reset URL',
'custom_forgot_pass_url_help' => 'This replaces the built-in forgotten password URL on the login screen, useful to direct people to internal or hosted LDAP password reset functionality. It will effectively disable local user forgotten password functionality.',
'dashboard_message' => 'Dashboard Message',
'dashboard_message_help' => 'This text will appear on the dashboard for anyone with permission to view the dashboard.',
'default_currency' => 'Default Currency',
'default_eula_text' => 'Default EULA',
'default_language' => 'Default Language',

View file

@ -85,6 +85,7 @@
'file_name' => 'File',
'file_uploads' => 'File Uploads',
'generate' => 'Generate',
'github_markdown' => 'This field accepts <a href="https://help.github.com/articles/github-flavored-markdown/">Github flavored markdown</a>.',
'groups' => 'Groups',
'gravatar_email' => 'Gravatar Email Address',
'history' => 'History',

View file

@ -10,6 +10,23 @@
{{-- Page content --}}
@section('content')
@if ($snipeSettings->dashboard_message!='')
<div class="row">
<div class="col-md-12">
<div class="box">
<!-- /.box-header -->
<div class="box-body">
<div class="row">
<div class="col-md-12">
{!! Parsedown::instance()->text(e($snipeSettings->dashboard_message)) !!}
</div>
</div>
</div>
</div>
</div>
</div>
@endif
<div class="row">
<!-- panel -->
<div class="col-lg-3 col-xs-6">

View file

@ -160,7 +160,7 @@
<!-- login text -->
<div class="form-group {{ $errors->has('custom_css') ? 'error' : '' }}">
<div class="form-group {{ $errors->has('login_note') ? 'error' : '' }}">
<div class="col-md-3">
{{ Form::label('login_note', trans('admin/settings/general.login_note')) }}
</div>
@ -199,6 +199,28 @@
</div>
<!-- dashboard text -->
<div class="form-group {{ $errors->has('dashboard_message') ? 'error' : '' }}">
<div class="col-md-3">
{{ Form::label('dashboard_message', trans('admin/settings/general.dashboard_message')) }}
</div>
<div class="col-md-9">
@if (config('app.lock_passwords'))
<textarea class="form-control disabled" name="login_note" placeholder="If you do not have a login or have found a device belonging to this company, please call technical support at 888-555-1212. Thank you." rows="2" readonly>{{ Input::old('dashboard_message', $setting->login_note) }}</textarea>
{!! $errors->first('dashboard_message', '<span class="alert-msg">:message</span>') !!}
<p class="help-block">{{ trans('general.lock_passwords') }}</p>
@else
<textarea class="form-control" name="dashboard_message" rows="2">{{ Input::old('login_note', $setting->dashboard_message) }}</textarea>
{!! $errors->first('dashboard_message', '<span class="alert-msg">:message</span>') !!}
@endif
<p class="help-block">
{{ trans('admin/settings/general.dashboard_message_help') }}
{!! trans('general.github_markdown') !!}</p>
</div>
</div>
<!-- Archived in List -->