diff --git a/app/Http/Controllers/SettingsController.php b/app/Http/Controllers/SettingsController.php index ee9d02b5bf..7034186cc7 100755 --- a/app/Http/Controllers/SettingsController.php +++ b/app/Http/Controllers/SettingsController.php @@ -169,11 +169,7 @@ class SettingsController extends Controller $settings->alerts_enabled = 1; $settings->pwd_secure_min = 10; $settings->brand = 1; - - if (!config('app.lock_passwords')) { - $settings->locale = $request->input('locale', 'en'); - } - + $settings->locale = $request->input('locale', 'en'); $settings->default_currency = $request->input('default_currency', "USD"); $settings->user_id = 1; $settings->email_domain = $request->input('email_domain'); @@ -405,6 +401,8 @@ class SettingsController extends Controller $setting->footer_text = $request->input('footer_text'); $setting->skin = $request->input('skin'); $setting->show_url_in_emails = $request->input('show_url_in_emails', '0'); + $setting->logo_print_assets = $request->input('logo_print_assets', '0'); + // Only allow the site name and CSS to be changed if lock_passwords is false @@ -541,7 +539,9 @@ class SettingsController extends Controller return redirect()->to('admin')->with('error', trans('admin/settings/message.update.error')); } - $setting->locale = $request->input('locale', 'en'); + if (!config('app.lock_passwords')) { + $setting->locale = $request->input('locale', 'en'); + } $setting->default_currency = $request->input('default_currency', '$'); $setting->date_display_format = $request->input('date_display_format'); $setting->time_display_format = $request->input('time_display_format'); diff --git a/database/migrations/2018_07_24_154348_add_logo_to_print_assets.php b/database/migrations/2018_07_24_154348_add_logo_to_print_assets.php new file mode 100644 index 0000000000..70ffe193c4 --- /dev/null +++ b/database/migrations/2018_07_24_154348_add_logo_to_print_assets.php @@ -0,0 +1,34 @@ +boolean('logo_print_assets')->default('0'); + }); + + + } + + /** + * Reverse the migrations. + * + * @return void + */ + public function down() + { + Schema::table('settings', function (Blueprint $table) { + $table->dropColumn('logo_print_assets'); + }); + } +} diff --git a/resources/lang/en/admin/settings/general.php b/resources/lang/en/admin/settings/general.php index a6abf8bc77..252589705d 100644 --- a/resources/lang/en/admin/settings/general.php +++ b/resources/lang/en/admin/settings/general.php @@ -88,6 +88,8 @@ return array( 'login_remote_user_custom_logout_url_text' => 'Custom logout URL', 'login_remote_user_custom_logout_url_help' => 'If a url is provided here, users will get redirected to this URL after the user logs out of Snipe-IT. This is useful to close the user sessions of your Authentication provider correctly.', 'logo' => 'Logo', + 'logo_print_assets' => 'Use in Print', + 'logo_print_assets_help' => 'Use branding on printable asset lists ', 'full_multiple_companies_support_help_text' => 'Restricting users (including admins) assigned to companies to their company\'s assets.', 'full_multiple_companies_support_text' => 'Full Multiple Companies Support', 'show_in_model_list' => 'Show in Model Dropdowns', diff --git a/resources/views/settings/branding.blade.php b/resources/views/settings/branding.blade.php index c01fae1780..d2ffd400fb 100644 --- a/resources/views/settings/branding.blade.php +++ b/resources/views/settings/branding.blade.php @@ -93,7 +93,20 @@ {!! $errors->first('brand', ':message') !!} - + + +
+
+ {{ Form::label('logo_print_assets', trans('admin/settings/general.logo_print_assets')) }} +
+
+ {{ Form::checkbox('logo_print_assets', '1', Input::old('logo_print_assets', $setting->logo_print_assets),array('class' => 'minimal')) }} + {{ trans('admin/settings/general.logo_print_assets_help') }} +
+
+ + +
{{ Form::label('show_url_in_emails', trans('admin/settings/general.show_url_in_emails')) }} diff --git a/resources/views/settings/general.blade.php b/resources/views/settings/general.blade.php index 174d173afa..41fe09ea59 100644 --- a/resources/views/settings/general.blade.php +++ b/resources/views/settings/general.blade.php @@ -118,7 +118,7 @@
{{ Form::checkbox('load_remote', '1', Input::old('load_remote', $setting->load_remote),array('class' => 'minimal')) }} - {{ trans('admin/settings/general.load_remote_help_text') }} +

{{ trans('admin/settings/general.load_remote_help_text') }}

diff --git a/resources/views/users/print.blade.php b/resources/views/users/print.blade.php index 2367978336..974f32d997 100644 --- a/resources/views/users/print.blade.php +++ b/resources/views/users/print.blade.php @@ -22,10 +22,34 @@ padding: 3px; font-size: 12px; } + + .print-logo { + max-height: 40px; + } + -

Assigned to {{ $show_user->present()->fullName() }}

+ +@if ($snipeSettings->logo_print_assets=='1') + @if ($snipeSettings->brand == '3') + +

+ @if ($snipeSettings->logo!='') + + @endif + {{ $snipeSettings->site_name }} +

+ @elseif ($snipeSettings->brand == '2') + @if ($snipeSettings->logo!='') + + @endif + @else +

{{ $snipeSettings->site_name }}

+ @endif +@endif + +

Assigned to {{ $show_user->present()->fullName() }}

@if ($assets->count() > 0) @php