mirror of
https://github.com/snipe/snipe-it.git
synced 2024-11-09 23:24:06 -08:00
Added setting to let admin decide whether footer text should link back to site
This commit is contained in:
parent
b46cbac911
commit
160fd1c86a
|
@ -391,6 +391,7 @@ class SettingsController extends Controller
|
|||
|
||||
$setting->brand = $request->input('brand', '1');
|
||||
$setting->header_color = $request->input('header_color');
|
||||
$setting->show_url_in_emails = $request->input('show_url_in_emails', '0');
|
||||
|
||||
|
||||
// Only allow the site name and CSS to be changed if lock_passwords is false
|
||||
|
|
|
@ -0,0 +1,32 @@
|
|||
<?php
|
||||
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
|
||||
class AddDisplayUrlToSettings extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
Schema::table('settings', function (Blueprint $table) {
|
||||
$table->boolean('show_url_in_emails')->default(0);
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::table('settings', function (Blueprint $table) {
|
||||
$table->dropColumn('show_url_in_emails');
|
||||
});
|
||||
}
|
||||
}
|
|
@ -116,6 +116,8 @@ return array(
|
|||
'inches' => 'inches',
|
||||
'width_w' => 'w',
|
||||
'height_h' => 'h',
|
||||
'show_url_in_emails' => 'Link to Snipe-IT in Emails',
|
||||
'show_url_in_emails_help_text' => 'Uncheck this box if you do not wish to link back to your Snipe-IT installation in your email footers. Useful if most of your users never login. ',
|
||||
'text_pt' => 'pt',
|
||||
'thumbnail_max_h' => 'Max thumbnail height',
|
||||
'thumbnail_max_h_help' => 'Maximum height in pixels that thumbnails may display in the listing view. Min 25, max 500.',
|
||||
|
|
|
@ -57,5 +57,10 @@
|
|||
<p><strong><a href="{{ url('/') }}/account/accept-asset/{{ $log_id }}">{{ trans('mail.i_have_read') }}</a></strong></p>
|
||||
@endif
|
||||
|
||||
<p><a href="{{ url('/') }}">{{ $snipeSettings->site_name }}</a></p>
|
||||
@if ($snipeSettings->show_url_in_emails=='1')
|
||||
<p><a href="{{ url('/') }}">{{ $snipeSettings->site_name }}</a></p>
|
||||
@else
|
||||
<p>{{ $snipeSettings->site_name }}</p>
|
||||
@endif
|
||||
|
||||
@stop
|
||||
|
|
|
@ -117,5 +117,10 @@
|
|||
<p><strong><a href="{{ url('/') }}/account/accept-asset/{{ $log_id }}">{{ trans('mail.i_have_read') }}</a></strong></p>
|
||||
@endif
|
||||
|
||||
<p><a href="{{ url('/') }}">{{ $snipeSettings->site_name }}</a></p>
|
||||
@if ($snipeSettings->show_url_in_emails=='1')
|
||||
<p><a href="{{ url('/') }}">{{ $snipeSettings->site_name }}</a></p>
|
||||
@else
|
||||
<p>{{ $snipeSettings->site_name }}</p>
|
||||
@endif
|
||||
|
||||
@stop
|
||||
|
|
|
@ -9,5 +9,9 @@
|
|||
{{ trans('mail.canceled') }} {{ $requested_date }}
|
||||
</p>
|
||||
|
||||
<p><a href="{{ url('/') }}">{{ $snipeSettings->site_name }}</a></p>
|
||||
@if ($snipeSettings->show_url_in_emails=='1')
|
||||
<p><a href="{{ url('/') }}">{{ $snipeSettings->site_name }}</a></p>
|
||||
@else
|
||||
<p>{{ $snipeSettings->site_name }}</p>
|
||||
@endif
|
||||
@stop
|
||||
|
|
|
@ -11,5 +11,10 @@
|
|||
{{ trans('mail.quantity') }} {{ $item_quantity}}
|
||||
@endif
|
||||
|
||||
<p><a href="{{ url('/') }}">{{ $snipeSettings->site_name }}</a></p>
|
||||
@if ($snipeSettings->show_url_in_emails=='1')
|
||||
<p><a href="{{ url('/') }}">{{ $snipeSettings->site_name }}</a></p>
|
||||
@else
|
||||
<p>{{ $snipeSettings->site_name }}</p>
|
||||
@endif
|
||||
|
||||
@stop
|
||||
|
|
|
@ -75,5 +75,10 @@
|
|||
@endif
|
||||
</table>
|
||||
|
||||
<p><a href="{{ url('/') }}">{{ $snipeSettings->site_name }}</a></p>
|
||||
@if ($snipeSettings->show_url_in_emails=='1')
|
||||
<p><a href="{{ url('/') }}">{{ $snipeSettings->site_name }}</a></p>
|
||||
@else
|
||||
<p>{{ $snipeSettings->site_name }}</p>
|
||||
@endif
|
||||
|
||||
@stop
|
||||
|
|
|
@ -17,5 +17,10 @@
|
|||
{!! $email_content !!}
|
||||
</table>
|
||||
|
||||
<p><a href="{{ url('/') }}">{{ $snipeSettings->site_name }}</a></p>
|
||||
@if ($snipeSettings->show_url_in_emails=='1')
|
||||
<p><a href="{{ url('/') }}">{{ $snipeSettings->site_name }}</a></p>
|
||||
@else
|
||||
<p>{{ $snipeSettings->site_name }}</p>
|
||||
@endif
|
||||
|
||||
@stop
|
||||
|
|
|
@ -14,5 +14,10 @@
|
|||
{!! $email_content !!}
|
||||
</table>
|
||||
|
||||
<p><a href="{{ url('/') }}">{{ $snipeSettings->site_name }}</a></p>
|
||||
@if ($snipeSettings->show_url_in_emails=='1')
|
||||
<p><a href="{{ url('/') }}">{{ $snipeSettings->site_name }}</a></p>
|
||||
@else
|
||||
<p>{{ $snipeSettings->site_name }}</p>
|
||||
@endif
|
||||
|
||||
@stop
|
||||
|
|
|
@ -9,5 +9,9 @@
|
|||
|
||||
<p>{{ trans('mail.best_regards') }}</p>
|
||||
|
||||
<p><a href="{{ url('/') }}">{{ $snipeSettings->site_name }}</a></p>
|
||||
@if ($snipeSettings->show_url_in_emails=='1')
|
||||
<p><a href="{{ url('/') }}">{{ $snipeSettings->site_name }}</a></p>
|
||||
@else
|
||||
<p>{{ $snipeSettings->site_name }}</p>
|
||||
@endif
|
||||
@stop
|
||||
|
|
|
@ -27,6 +27,10 @@
|
|||
|
||||
</table>
|
||||
|
||||
<p><a href="{{ url('/') }}">{{ $snipeSettings->site_name }}</a></p>
|
||||
@if ($snipeSettings->show_url_in_emails=='1')
|
||||
<p><a href="{{ url('/') }}">{{ $snipeSettings->site_name }}</a></p>
|
||||
@else
|
||||
<p>{{ $snipeSettings->site_name }}</p>
|
||||
@endif
|
||||
|
||||
@stop
|
||||
|
|
|
@ -9,5 +9,9 @@
|
|||
|
||||
<p>{{ trans('mail.best_regards') }}</p>
|
||||
|
||||
<p><a href="{{ url('/') }}">{{ $snipeSettings->site_name }}</a></p>
|
||||
@if ($snipeSettings->show_url_in_emails=='1')
|
||||
<p><a href="{{ url('/') }}">{{ $snipeSettings->site_name }}</a></p>
|
||||
@else
|
||||
<p>{{ $snipeSettings->site_name }}</p>
|
||||
@endif
|
||||
@stop
|
||||
|
|
|
@ -12,5 +12,10 @@
|
|||
|
||||
<p>{{ trans('mail.best_regards') }}</p>
|
||||
|
||||
<p><a href="{{ url('/') }}">{{ $snipeSettings->site_name }}</a></p>
|
||||
@if ($snipeSettings->show_url_in_emails=='1')
|
||||
<p><a href="{{ url('/') }}">{{ $snipeSettings->site_name }}</a></p>
|
||||
@else
|
||||
<p>{{ $snipeSettings->site_name }}</p>
|
||||
@endif
|
||||
|
||||
@stop
|
||||
|
|
|
@ -86,6 +86,17 @@
|
|||
{!! $errors->first('brand', '<span class="alert-msg">:message</span>') !!}
|
||||
</div>
|
||||
</div>
|
||||
<!-- remote load -->
|
||||
<div class="form-group">
|
||||
<div class="col-md-3">
|
||||
{{ Form::label('show_url_in_emails', trans('admin/settings/general.show_url_in_emails')) }}
|
||||
</div>
|
||||
<div class="col-md-9">
|
||||
{{ Form::checkbox('show_url_in_emails', '1', Input::old('show_url_in_emails', $setting->show_url_in_emails),array('class' => 'minimal')) }}
|
||||
{{ trans('general.yes') }}
|
||||
<p class="help-block">{{ trans('admin/settings/general.show_url_in_emails_help_text') }}</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Header color -->
|
||||
<div class="form-group {{ $errors->has('header_color') ? 'error' : '' }}">
|
||||
|
|
Loading…
Reference in a new issue