diff --git a/.all-contributorsrc b/.all-contributorsrc index ed6c2beb7..e54cd35f9 100644 --- a/.all-contributorsrc +++ b/.all-contributorsrc @@ -773,6 +773,15 @@ "contributions": [ "code" ] + }, + { + "login": "BlueHatbRit", + "name": "Elliot Blackburn", + "avatar_url": "https://avatars3.githubusercontent.com/u/1068477?v=4", + "profile": "http://www.elliotblackburn.com", + "contributions": [ + "doc" + ] } ] } diff --git a/README.md b/README.md index 8d9c84b05..5dbd277ad 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,5 @@ -[![Build Status](https://travis-ci.org/snipe/snipe-it.svg?branch=develop)](https://travis-ci.org/snipe/snipe-it) [![Stories in Ready](https://badge.waffle.io/snipe/snipe-it.png?label=ready+for+dev&title=Ready+for+development)](http://waffle.io/snipe/snipe-it) [![Maintenance](https://img.shields.io/maintenance/yes/2017.svg)]() [![Crowdin](https://d322cqt584bo4o.cloudfront.net/snipe-it/localized.png)](https://crowdin.com/project/snipe-it) [![Gitter](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/snipe/snipe-it?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge) [![Docker Pulls](https://img.shields.io/docker/pulls/snipe/snipe-it.svg)](https://hub.docker.com/r/snipe/snipe-it/) [![Twitter Follow](https://img.shields.io/twitter/follow/snipeyhead.svg?style=social)](https://twitter.com/snipeyhead) [![Zenhub](https://raw.githubusercontent.com/ZenHubIO/support/master/zenhub-badge.png)](https://zenhub.io) [![Codacy Badge](https://api.codacy.com/project/badge/Grade/553ce52037fc43ea99149785afcfe641)](https://www.codacy.com/app/snipe/snipe-it?utm_source=github.com&utm_medium=referral&utm_content=snipe/snipe-it&utm_campaign=Badge_Grade) -[![All Contributors](https://img.shields.io/badge/all_contributors-83-orange.svg?style=flat-square)](#contributors) +[![Build Status](https://travis-ci.org/snipe/snipe-it.svg?branch=develop)](https://travis-ci.org/snipe/snipe-it) [![Stories in Ready](https://badge.waffle.io/snipe/snipe-it.png?label=ready+for+dev&title=Ready+for+development)](http://waffle.io/snipe/snipe-it) [![Maintenance](https://img.shields.io/maintenance/yes/2017.svg)]() [![Crowdin](https://d322cqt584bo4o.cloudfront.net/snipe-it/localized.svg)](https://crowdin.com/project/snipe-it) [![Gitter](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/snipe/snipe-it?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge) [![Docker Pulls](https://img.shields.io/docker/pulls/snipe/snipe-it.svg)](https://hub.docker.com/r/snipe/snipe-it/) [![Twitter Follow](https://img.shields.io/twitter/follow/snipeyhead.svg?style=social)](https://twitter.com/snipeyhead) [![Zenhub](https://img.shields.io/badge/Shipping_faster_with-ZenHub-5e60ba.svg)](https://zenhub.io) [![Codacy Badge](https://api.codacy.com/project/badge/Grade/553ce52037fc43ea99149785afcfe641)](https://www.codacy.com/app/snipe/snipe-it?utm_source=github.com&utm_medium=referral&utm_content=snipe/snipe-it&utm_campaign=Badge_Grade) +[![All Contributors](https://img.shields.io/badge/all_contributors-84-orange.svg?style=flat-square)](#contributors) ## Snipe-IT - Open Source Asset Management System @@ -67,7 +67,7 @@ Thanks goes to all of these wonderful people ([emoji key](https://github.com/ken | [
Jay Richards](http://www.cordeos.com)
[💻](https://github.com/snipe/snipe-it/commits?author=technogenus "Code") | [
Alexander Innes](https://necurity.co.uk)
[💻](https://github.com/snipe/snipe-it/commits?author=leostat "Code") | [
Danny Garcia](https://buzzedword.codes)
[💻](https://github.com/snipe/snipe-it/commits?author=buzzedword "Code") | [
archpoint](https://github.com/archpoint)
[💻](https://github.com/snipe/snipe-it/commits?author=archpoint "Code") | [
Jake McGraw](http://www.jakemcgraw.com)
[💻](https://github.com/snipe/snipe-it/commits?author=jakemcgraw "Code") | [
FleischKarussel](https://github.com/FleischKarussel)
[📖](https://github.com/snipe/snipe-it/commits?author=FleischKarussel "Documentation") | [
Dylan Yi](https://github.com/feeva)
[💻](https://github.com/snipe/snipe-it/commits?author=feeva "Code") | | [
Gil Rutkowski](http://FlashingCursor.com)
[💻](https://github.com/snipe/snipe-it/commits?author=flashingcursor "Code") | [
Desmond Morris](http://www.desmondmorris.com)
[💻](https://github.com/snipe/snipe-it/commits?author=desmondmorris "Code") | [
Nick Peelman](http://peelman.us)
[💻](https://github.com/snipe/snipe-it/commits?author=peelman "Code") | [
Abraham Vegh](https://abrahamvegh.com)
[💻](https://github.com/snipe/snipe-it/commits?author=abrahamvegh "Code") | [
Mohamed Rashid](https://github.com/rashivkp)
[📖](https://github.com/snipe/snipe-it/commits?author=rashivkp "Documentation") | [
Kasey](http://hinchk.github.io)
[💻](https://github.com/snipe/snipe-it/commits?author=HinchK "Code") | [
Brett](https://github.com/BrettFagerlund)
[⚠️](https://github.com/snipe/snipe-it/commits?author=BrettFagerlund "Tests") | | [
Jason Spriggs](http://jasonspriggs.com)
[💻](https://github.com/snipe/snipe-it/commits?author=jasonspriggs "Code") | [
Nate Felton](http://n8felton.wordpress.com)
[💻](https://github.com/snipe/snipe-it/commits?author=n8felton "Code") | [
Manasses Ferreira](http://homepages.dcc.ufmg.br/~manassesferreira)
[💻](https://github.com/snipe/snipe-it/commits?author=manassesferreira "Code") | [
Steve](https://github.com/steveelwood)
[⚠️](https://github.com/snipe/snipe-it/commits?author=steveelwood "Tests") | [
matc](http://twitter.com/matc)
[⚠️](https://github.com/snipe/snipe-it/commits?author=matc "Tests") | [
Cole R. Davis](http://www.davisracingteam.com)
[⚠️](https://github.com/snipe/snipe-it/commits?author=VanillaNinjaD "Tests") | [
gibsonjoshua55](https://github.com/gibsonjoshua55)
[💻](https://github.com/snipe/snipe-it/commits?author=gibsonjoshua55 "Code") | -| [
Robin Temme](https://github.com/zwerch)
[💻](https://github.com/snipe/snipe-it/commits?author=zwerch "Code") | [
Iman](https://github.com/imanghafoori1)
[💻](https://github.com/snipe/snipe-it/commits?author=imanghafoori1 "Code") | [
Richard Hofman](https://github.com/richardhofman6)
[💻](https://github.com/snipe/snipe-it/commits?author=richardhofman6 "Code") | [
gizzmojr](https://github.com/gizzmojr)
[💻](https://github.com/snipe/snipe-it/commits?author=gizzmojr "Code") | [
Jenny Li](https://github.com/imjennyli)
[📖](https://github.com/snipe/snipe-it/commits?author=imjennyli "Documentation") | [
Geoff Young](https://github.com/GeoffYoung)
[💻](https://github.com/snipe/snipe-it/commits?author=GeoffYoung "Code") | +| [
Robin Temme](https://github.com/zwerch)
[💻](https://github.com/snipe/snipe-it/commits?author=zwerch "Code") | [
Iman](https://github.com/imanghafoori1)
[💻](https://github.com/snipe/snipe-it/commits?author=imanghafoori1 "Code") | [
Richard Hofman](https://github.com/richardhofman6)
[💻](https://github.com/snipe/snipe-it/commits?author=richardhofman6 "Code") | [
gizzmojr](https://github.com/gizzmojr)
[💻](https://github.com/snipe/snipe-it/commits?author=gizzmojr "Code") | [
Jenny Li](https://github.com/imjennyli)
[📖](https://github.com/snipe/snipe-it/commits?author=imjennyli "Documentation") | [
Geoff Young](https://github.com/GeoffYoung)
[💻](https://github.com/snipe/snipe-it/commits?author=GeoffYoung "Code") | [
Elliot Blackburn](http://www.elliotblackburn.com)
[📖](https://github.com/snipe/snipe-it/commits?author=BlueHatbRit "Documentation") | This project follows the [all-contributors](https://github.com/kentcdodds/all-contributors) specification. Contributions of any kind welcome! diff --git a/app/Http/Controllers/AssetsController.php b/app/Http/Controllers/AssetsController.php index 2c00ee541..119ce8483 100755 --- a/app/Http/Controllers/AssetsController.php +++ b/app/Http/Controllers/AssetsController.php @@ -637,7 +637,7 @@ class AssetsController extends Controller $settings = Setting::getSettings(); if ($settings->qr_code == '1') { - $asset = Asset::find($assetId); + $asset = Asset::find($assetId)->withTrashed(); $size = Helper::barcodeDimensions($settings->barcode_type); $qr_file = public_path().'/uploads/barcodes/qr-'.str_slug($asset->asset_tag).'-'.str_slug($asset->id).'.png'; diff --git a/app/Http/Controllers/SettingsController.php b/app/Http/Controllers/SettingsController.php index b154f6c8c..dcd85d535 100755 --- a/app/Http/Controllers/SettingsController.php +++ b/app/Http/Controllers/SettingsController.php @@ -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 diff --git a/database/migrations/2017_10_17_133709_add_display_url_to_settings.php b/database/migrations/2017_10_17_133709_add_display_url_to_settings.php new file mode 100644 index 000000000..9b90df957 --- /dev/null +++ b/database/migrations/2017_10_17_133709_add_display_url_to_settings.php @@ -0,0 +1,32 @@ +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'); + }); + } +} diff --git a/resources/lang/en/admin/settings/general.php b/resources/lang/en/admin/settings/general.php index 73fd052a5..1beed4ea5 100644 --- a/resources/lang/en/admin/settings/general.php +++ b/resources/lang/en/admin/settings/general.php @@ -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.', diff --git a/resources/views/emails/accept-accessory.blade.php b/resources/views/emails/accept-accessory.blade.php index 61f7cc246..49756d579 100644 --- a/resources/views/emails/accept-accessory.blade.php +++ b/resources/views/emails/accept-accessory.blade.php @@ -57,5 +57,10 @@

{{ trans('mail.i_have_read') }}

@endif -

{{ $snipeSettings->site_name }}

+@if ($snipeSettings->show_url_in_emails=='1') +

{{ $snipeSettings->site_name }}

+@else +

{{ $snipeSettings->site_name }}

+@endif + @stop diff --git a/resources/views/emails/accept-asset.blade.php b/resources/views/emails/accept-asset.blade.php index df078104e..ca209610c 100755 --- a/resources/views/emails/accept-asset.blade.php +++ b/resources/views/emails/accept-asset.blade.php @@ -117,5 +117,10 @@

{{ trans('mail.i_have_read') }}

@endif -

{{ $snipeSettings->site_name }}

+ @if ($snipeSettings->show_url_in_emails=='1') +

{{ $snipeSettings->site_name }}

+ @else +

{{ $snipeSettings->site_name }}

+ @endif + @stop diff --git a/resources/views/emails/asset-canceled.blade.php b/resources/views/emails/asset-canceled.blade.php index 08736b8d6..6f434b683 100644 --- a/resources/views/emails/asset-canceled.blade.php +++ b/resources/views/emails/asset-canceled.blade.php @@ -9,5 +9,9 @@ {{ trans('mail.canceled') }} {{ $requested_date }}

-

{{ $snipeSettings->site_name }}

+@if ($snipeSettings->show_url_in_emails=='1') +

{{ $snipeSettings->site_name }}

+@else +

{{ $snipeSettings->site_name }}

+@endif @stop diff --git a/resources/views/emails/asset-requested.blade.php b/resources/views/emails/asset-requested.blade.php index 901b2606b..c5ece1311 100644 --- a/resources/views/emails/asset-requested.blade.php +++ b/resources/views/emails/asset-requested.blade.php @@ -11,5 +11,10 @@ {{ trans('mail.quantity') }} {{ $item_quantity}} @endif -

{{ $snipeSettings->site_name }}

+@if ($snipeSettings->show_url_in_emails=='1') +

{{ $snipeSettings->site_name }}

+@else +

{{ $snipeSettings->site_name }}

+@endif + @stop diff --git a/resources/views/emails/checkin-asset.blade.php b/resources/views/emails/checkin-asset.blade.php index 6358daffd..2dba781e7 100644 --- a/resources/views/emails/checkin-asset.blade.php +++ b/resources/views/emails/checkin-asset.blade.php @@ -75,5 +75,10 @@ @endif -

{{ $snipeSettings->site_name }}

+@if ($snipeSettings->show_url_in_emails=='1') +

{{ $snipeSettings->site_name }}

+@else +

{{ $snipeSettings->site_name }}

+@endif + @stop diff --git a/resources/views/emails/expiring-assets-report.blade.php b/resources/views/emails/expiring-assets-report.blade.php index d4006b76a..ae36b143a 100644 --- a/resources/views/emails/expiring-assets-report.blade.php +++ b/resources/views/emails/expiring-assets-report.blade.php @@ -17,5 +17,10 @@ {!! $email_content !!} -

{{ $snipeSettings->site_name }}

+ @if ($snipeSettings->show_url_in_emails=='1') +

{{ $snipeSettings->site_name }}

+ @else +

{{ $snipeSettings->site_name }}

+ @endif + @stop diff --git a/resources/views/emails/expiring-licenses-report.blade.php b/resources/views/emails/expiring-licenses-report.blade.php index b032d7c35..bb5373e76 100755 --- a/resources/views/emails/expiring-licenses-report.blade.php +++ b/resources/views/emails/expiring-licenses-report.blade.php @@ -14,5 +14,10 @@ {!! $email_content !!} -

{{ $snipeSettings->site_name }}

+@if ($snipeSettings->show_url_in_emails=='1') +

{{ $snipeSettings->site_name }}

+@else +

{{ $snipeSettings->site_name }}

+@endif + @stop diff --git a/resources/views/emails/forgot-password.blade.php b/resources/views/emails/forgot-password.blade.php index 5ab341881..363cd9fe7 100755 --- a/resources/views/emails/forgot-password.blade.php +++ b/resources/views/emails/forgot-password.blade.php @@ -9,5 +9,9 @@

{{ trans('mail.best_regards') }}

-

{{ $snipeSettings->site_name }}

+@if ($snipeSettings->show_url_in_emails=='1') +

{{ $snipeSettings->site_name }}

+@else +

{{ $snipeSettings->site_name }}

+@endif @stop diff --git a/resources/views/emails/low-inventory.blade.php b/resources/views/emails/low-inventory.blade.php index e7f2191fe..552f0ebd1 100644 --- a/resources/views/emails/low-inventory.blade.php +++ b/resources/views/emails/low-inventory.blade.php @@ -27,6 +27,10 @@ -

{{ $snipeSettings->site_name }}

+ @if ($snipeSettings->show_url_in_emails=='1') +

{{ $snipeSettings->site_name }}

+ @else +

{{ $snipeSettings->site_name }}

+ @endif @stop diff --git a/resources/views/emails/register-activate.blade.php b/resources/views/emails/register-activate.blade.php index cc0b5d8fc..b8d072cfb 100755 --- a/resources/views/emails/register-activate.blade.php +++ b/resources/views/emails/register-activate.blade.php @@ -9,5 +9,9 @@

{{ trans('mail.best_regards') }}

-

{{ $snipeSettings->site_name }}

+@if ($snipeSettings->show_url_in_emails=='1') +

{{ $snipeSettings->site_name }}

+@else +

{{ $snipeSettings->site_name }}

+@endif @stop diff --git a/resources/views/emails/send-login.blade.php b/resources/views/emails/send-login.blade.php index 4f728dec1..24c45cd71 100644 --- a/resources/views/emails/send-login.blade.php +++ b/resources/views/emails/send-login.blade.php @@ -12,5 +12,10 @@

{{ trans('mail.best_regards') }}

-

{{ $snipeSettings->site_name }}

+@if ($snipeSettings->show_url_in_emails=='1') +

{{ $snipeSettings->site_name }}

+@else +

{{ $snipeSettings->site_name }}

+@endif + @stop diff --git a/resources/views/settings/branding.blade.php b/resources/views/settings/branding.blade.php index 5365c091a..3405247c9 100644 --- a/resources/views/settings/branding.blade.php +++ b/resources/views/settings/branding.blade.php @@ -86,6 +86,17 @@ {!! $errors->first('brand', ':message') !!} + +
+
+ {{ Form::label('show_url_in_emails', trans('admin/settings/general.show_url_in_emails')) }} +
+
+ {{ Form::checkbox('show_url_in_emails', '1', Input::old('show_url_in_emails', $setting->show_url_in_emails),array('class' => 'minimal')) }} + {{ trans('general.yes') }} +

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

+
+