From bb66ed7a9601287d5bd2f44df36c2b930dcda829 Mon Sep 17 00:00:00 2001 From: Hillel Coren Date: Tue, 31 Mar 2015 12:38:24 +0300 Subject: [PATCH] Fixed creating invoices --- app/Http/Controllers/InvoiceController.php | 3 + app/Libraries/Utils.php | 5 +- app/Models/Account.php | 7 +- app/Models/AccountGateway.php | 7 +- app/Models/AccountGatewayToken.php | 5 +- app/Models/AccountToken.php | 7 +- app/Models/Activity.php | 9 +- app/Models/Client.php | 23 ++- app/Models/Contact.php | 7 +- app/Models/Country.php | 3 +- app/Models/Credit.php | 9 +- app/Models/Currency.php | 1 - app/Models/DateFormat.php | 1 - app/Models/DatetimeFormat.php | 1 - app/Models/EntityModel.php | 2 - app/Models/Frequency.php | 1 - app/Models/Gateway.php | 5 +- app/Models/Industry.php | 1 - app/Models/Invitation.php | 11 +- app/Models/Invoice.php | 17 +- app/Models/InvoiceDesign.php | 1 - app/Models/InvoiceItem.php | 9 +- app/Models/InvoiceStatus.php | 1 - app/Models/Language.php | 1 - app/Models/License.php | 5 +- app/Models/Payment.php | 15 +- app/Models/PaymentLibrary.php | 2 +- app/Models/PaymentTerm.php | 1 - app/Models/PaymentType.php | 1 - app/Models/Product.php | 5 + app/Models/Project.php | 6 +- app/Models/ProjectCode.php | 11 +- app/Models/Size.php | 1 - app/Models/Subscription.php | 7 +- app/Models/TaxRate.php | 4 + app/Models/Theme.php | 1 - app/Models/Timesheet.php | 9 +- app/Models/TimesheetEvent.php | 15 +- app/Models/TimesheetEventSource.php | 9 +- app/Models/Timezone.php | 1 - app/Models/User.php | 5 +- app/Ninja/Repositories/AccountRepository.php | 8 +- app/Ninja/Repositories/ClientRepository.php | 5 +- app/Ninja/Repositories/CreditRepository.php | 4 +- app/Ninja/Repositories/InvoiceRepository.php | 8 +- app/Ninja/Repositories/PaymentRepository.php | 8 +- app/Ninja/Repositories/TaxRateRepository.php | 2 +- config/bootstrapper.php | 10 ++ config/chumper.datatable.php | 149 +++++++++++++++++ config/countries.php | 16 ++ config/debugbar.php | 157 ++++++++++++++++++ config/former.php | 66 ++++++++ config/former/Nude.php | 14 ++ config/former/TwitterBootstrap.php | 14 ++ config/former/TwitterBootstrap3.php | 26 +++ config/former/ZurbFoundation.php | 35 ++++ config/former/ZurbFoundation4.php | 36 ++++ config/ide-helper.php | 89 ++++++++++ config/image.php | 20 +++ resources/views/header.blade.php | 4 +- resources/views/invoices/edit.blade.php | 12 +- .../chumper.datatable/javascript.blade.php | 23 +++ .../chumper.datatable/options.blade.php | 20 +++ .../chumper.datatable/template.blade.php | 27 +++ 64 files changed, 884 insertions(+), 104 deletions(-) create mode 100644 config/bootstrapper.php create mode 100644 config/chumper.datatable.php create mode 100644 config/countries.php create mode 100644 config/debugbar.php create mode 100644 config/former.php create mode 100644 config/former/Nude.php create mode 100644 config/former/TwitterBootstrap.php create mode 100644 config/former/TwitterBootstrap3.php create mode 100644 config/former/ZurbFoundation.php create mode 100644 config/former/ZurbFoundation4.php create mode 100644 config/ide-helper.php create mode 100644 config/image.php create mode 100644 resources/views/vendor/chumper.datatable/javascript.blade.php create mode 100644 resources/views/vendor/chumper.datatable/options.blade.php create mode 100644 resources/views/vendor/chumper.datatable/template.blade.php diff --git a/app/Http/Controllers/InvoiceController.php b/app/Http/Controllers/InvoiceController.php index bf76fd8edb..99af87a6f4 100644 --- a/app/Http/Controllers/InvoiceController.php +++ b/app/Http/Controllers/InvoiceController.php @@ -6,8 +6,11 @@ use Utils; use View; use Input; use Cache; +use Redirect; +use DB; use App\Models\Invoice; +use App\Models\Invitation; use App\Models\Client; use App\Models\Account; use App\Models\Product; diff --git a/app/Libraries/Utils.php b/app/Libraries/Utils.php index e9780fe6a7..7b63c9a47e 100644 --- a/app/Libraries/Utils.php +++ b/app/Libraries/Utils.php @@ -7,10 +7,13 @@ use Schema; use Session; use Request; use View; -use App\Models\Currency; use DateTimeZone; use Input; use Log; +use DateTime; +use stdClass; + +use App\Models\Currency; class Utils { diff --git a/app/Models/Account.php b/app/Models/Account.php index ecf99aba84..eb34445249 100644 --- a/app/Models/Account.php +++ b/app/Models/Account.php @@ -1,11 +1,14 @@ -belongsTo('Gateway'); + return $this->belongsTo('App\Models\Gateway'); } public function getCreditcardTypes() diff --git a/app/Models/AccountGatewayToken.php b/app/Models/AccountGatewayToken.php index a1d18291b2..7726df1301 100644 --- a/app/Models/AccountGatewayToken.php +++ b/app/Models/AccountGatewayToken.php @@ -1,7 +1,10 @@ belongsTo('Account'); + return $this->belongsTo('App\Models\Account'); } } diff --git a/app/Models/Activity.php b/app/Models/Activity.php index aa20221160..c9c3f99269 100644 --- a/app/Models/Activity.php +++ b/app/Models/Activity.php @@ -1,11 +1,14 @@ belongsTo('Account'); + return $this->belongsTo('App\Models\Account'); } public function user() diff --git a/app/Models/Client.php b/app/Models/Client.php index 8a11a26b96..0bfcc156e6 100644 --- a/app/Models/Client.php +++ b/app/Models/Client.php @@ -1,7 +1,12 @@ belongsTo('Account'); + return $this->belongsTo('App\Models\Account'); } public function invoices() { - return $this->hasMany('Invoice'); + return $this->hasMany('App\Models\Invoice'); } public function payments() { - return $this->hasMany('Payment'); + return $this->hasMany('App\Models\Payment'); } public function contacts() { - return $this->hasMany('Contact'); + return $this->hasMany('App\Models\Contact'); } public function projects() { - return $this->hasMany('Project'); + return $this->hasMany('App\Models\Project'); } public function country() { - return $this->belongsTo('Country'); + return $this->belongsTo('App\Models\Country'); } public function currency() { - return $this->belongsTo('Currency'); + return $this->belongsTo('App\Models\Currency'); } public function size() { - return $this->belongsTo('Size'); + return $this->belongsTo('App\Models\Size'); } public function industry() { - return $this->belongsTo('Industry'); + return $this->belongsTo('App\Models\Industry'); } public function getTotalCredit() diff --git a/app/Models/Contact.php b/app/Models/Contact.php index 425d8b0eb7..da7fb3436d 100644 --- a/app/Models/Contact.php +++ b/app/Models/Contact.php @@ -1,7 +1,12 @@ belongsTo('Client'); + return $this->belongsTo('App\Models\Client'); } public function getPersonType() diff --git a/app/Models/Country.php b/app/Models/Country.php index 1e5b5eb884..d5143e6562 100644 --- a/app/Models/Country.php +++ b/app/Models/Country.php @@ -4,8 +4,7 @@ use Eloquent; class Country extends Eloquent { - public $timestamps = false; - protected $softDelete = false; + public $timestamps = false; protected $visible = ['id', 'name']; } diff --git a/app/Models/Credit.php b/app/Models/Credit.php index 77cc11fcfc..9a507bc6bb 100644 --- a/app/Models/Credit.php +++ b/app/Models/Credit.php @@ -1,15 +1,20 @@ belongsTo('Invoice')->withTrashed(); + return $this->belongsTo('App\Models\Invoice')->withTrashed(); } public function client() { - return $this->belongsTo('Client')->withTrashed(); + return $this->belongsTo('App\Models\Client')->withTrashed(); } public function getName() diff --git a/app/Models/Currency.php b/app/Models/Currency.php index 8308c7c4f9..4a2cbc21f8 100644 --- a/app/Models/Currency.php +++ b/app/Models/Currency.php @@ -5,5 +5,4 @@ use Eloquent; class Currency extends Eloquent { public $timestamps = false; - protected $softDelete = false; } diff --git a/app/Models/DateFormat.php b/app/Models/DateFormat.php index 77e1f692d8..b343fd4226 100644 --- a/app/Models/DateFormat.php +++ b/app/Models/DateFormat.php @@ -5,5 +5,4 @@ use Eloquent; class DateFormat extends Eloquent { public $timestamps = false; - protected $softDelete = false; } diff --git a/app/Models/DatetimeFormat.php b/app/Models/DatetimeFormat.php index 80974f9d0a..1d7ba8b936 100644 --- a/app/Models/DatetimeFormat.php +++ b/app/Models/DatetimeFormat.php @@ -5,5 +5,4 @@ use Eloquent; class DatetimeFormat extends Eloquent { public $timestamps = false; - protected $softDelete = false; } diff --git a/app/Models/EntityModel.php b/app/Models/EntityModel.php index 4f98b39f4f..739f7d6a02 100644 --- a/app/Models/EntityModel.php +++ b/app/Models/EntityModel.php @@ -6,9 +6,7 @@ use Utils; class EntityModel extends Eloquent { - protected $softDelete = true; public $timestamps = true; - protected $hidden = ['id']; public static function createNew($parent = false) diff --git a/app/Models/Frequency.php b/app/Models/Frequency.php index f232894d8d..b4a7b5c339 100644 --- a/app/Models/Frequency.php +++ b/app/Models/Frequency.php @@ -5,5 +5,4 @@ use Eloquent; class Frequency extends Eloquent { public $timestamps = false; - protected $softDelete = false; } diff --git a/app/Models/Gateway.php b/app/Models/Gateway.php index 2052ad7722..541354f890 100644 --- a/app/Models/Gateway.php +++ b/app/Models/Gateway.php @@ -3,10 +3,13 @@ use Eloquent; use Omnipay; +use Illuminate\Database\Eloquent\SoftDeletes; + class Gateway extends Eloquent { public $timestamps = true; - protected $softDelete = false; + use SoftDeletes; + protected $dates = ['deleted_at']; public function paymentlibrary() { diff --git a/app/Models/Industry.php b/app/Models/Industry.php index 1ad7c12a31..569bb14ddc 100644 --- a/app/Models/Industry.php +++ b/app/Models/Industry.php @@ -5,5 +5,4 @@ use Eloquent; class Industry extends Eloquent { public $timestamps = false; - protected $softDelete = false; } diff --git a/app/Models/Invitation.php b/app/Models/Invitation.php index ef0a537535..58aedfb5cd 100644 --- a/app/Models/Invitation.php +++ b/app/Models/Invitation.php @@ -1,15 +1,20 @@ belongsTo('Invoice'); + return $this->belongsTo('App\Models\Invoice'); } public function contact() { - return $this->belongsTo('Contact')->withTrashed(); + return $this->belongsTo('App\Models\Contact')->withTrashed(); } public function user() @@ -19,7 +24,7 @@ class Invitation extends EntityModel public function account() { - return $this->belongsTo('Account'); + return $this->belongsTo('App\Models\Account'); } public function getLink() diff --git a/app/Models/Invoice.php b/app/Models/Invoice.php index 99cf8b9eb1..294a4eef1b 100644 --- a/app/Models/Invoice.php +++ b/app/Models/Invoice.php @@ -1,10 +1,15 @@ belongsTo('Account'); + return $this->belongsTo('App\Models\Account'); } public function user() @@ -14,27 +19,27 @@ class Invoice extends EntityModel public function client() { - return $this->belongsTo('Client')->withTrashed(); + return $this->belongsTo('App\Models\Client')->withTrashed(); } public function invoice_items() { - return $this->hasMany('InvoiceItem')->orderBy('id'); + return $this->hasMany('App\Models\InvoiceItem')->orderBy('id'); } public function invoice_status() { - return $this->belongsTo('InvoiceStatus'); + return $this->belongsTo('App\Models\InvoiceStatus'); } public function invoice_design() { - return $this->belongsTo('InvoiceDesign'); + return $this->belongsTo('App\Models\InvoiceDesign'); } public function invitations() { - return $this->hasMany('Invitation')->orderBy('invitations.contact_id'); + return $this->hasMany('App\Models\Invitation')->orderBy('invitations.contact_id'); } public function getName() diff --git a/app/Models/InvoiceDesign.php b/app/Models/InvoiceDesign.php index 9604a3451c..db29926747 100644 --- a/app/Models/InvoiceDesign.php +++ b/app/Models/InvoiceDesign.php @@ -5,5 +5,4 @@ use Eloquent; class InvoiceDesign extends Eloquent { public $timestamps = false; - protected $softDelete = false; } diff --git a/app/Models/InvoiceItem.php b/app/Models/InvoiceItem.php index bd8c043afa..396a1c7134 100644 --- a/app/Models/InvoiceItem.php +++ b/app/Models/InvoiceItem.php @@ -1,14 +1,19 @@ belongsTo('Invoice'); + return $this->belongsTo('App\Models\Invoice'); } public function product() { - return $this->belongsTo('Product'); + return $this->belongsTo('App\Models\Product'); } } diff --git a/app/Models/InvoiceStatus.php b/app/Models/InvoiceStatus.php index 1a18b92605..36164d26c6 100644 --- a/app/Models/InvoiceStatus.php +++ b/app/Models/InvoiceStatus.php @@ -5,5 +5,4 @@ use Eloquent; class InvoiceStatus extends Eloquent { public $timestamps = false; - protected $softDelete = false; } diff --git a/app/Models/Language.php b/app/Models/Language.php index 9db30753e8..d1e7579368 100644 --- a/app/Models/Language.php +++ b/app/Models/Language.php @@ -5,5 +5,4 @@ use Eloquent; class Language extends Eloquent { public $timestamps = false; - protected $softDelete = false; } diff --git a/app/Models/License.php b/app/Models/License.php index c5601ccdbd..dff6f25b40 100644 --- a/app/Models/License.php +++ b/app/Models/License.php @@ -1,7 +1,10 @@ belongsTo('Invoice')->withTrashed(); + return $this->belongsTo('App\Models\Invoice')->withTrashed(); } public function invitation() { - return $this->belongsTo('Invitation'); + return $this->belongsTo('App\Models\Invitation'); } public function client() { - return $this->belongsTo('Client')->withTrashed(); + return $this->belongsTo('App\Models\Client')->withTrashed(); } public function account() { - return $this->belongsTo('Account'); + return $this->belongsTo('App\Models\Account'); } public function contact() { - return $this->belongsTo('Contact'); + return $this->belongsTo('App\Models\Contact'); } public function getAmount() diff --git a/app/Models/PaymentLibrary.php b/app/Models/PaymentLibrary.php index be6e601afe..3f0f5c860d 100644 --- a/app/Models/PaymentLibrary.php +++ b/app/Models/PaymentLibrary.php @@ -9,6 +9,6 @@ class PaymentLibrary extends Eloquent public function gateways() { - return $this->hasMany('Gateway', 'payment_library_id'); + return $this->hasMany('App\Models\Gateway', 'payment_library_id'); } } diff --git a/app/Models/PaymentTerm.php b/app/Models/PaymentTerm.php index 4cbe50bfa3..de8cced5db 100644 --- a/app/Models/PaymentTerm.php +++ b/app/Models/PaymentTerm.php @@ -5,5 +5,4 @@ use Eloquent; class PaymentTerm extends Eloquent { public $timestamps = false; - protected $softDelete = false; } diff --git a/app/Models/PaymentType.php b/app/Models/PaymentType.php index 4572a41a4b..f7c0ecd36d 100644 --- a/app/Models/PaymentType.php +++ b/app/Models/PaymentType.php @@ -5,5 +5,4 @@ use Eloquent; class PaymentType extends Eloquent { public $timestamps = false; - protected $softDelete = false; } diff --git a/app/Models/Product.php b/app/Models/Product.php index 49f0a8735c..a1059dfbd7 100644 --- a/app/Models/Product.php +++ b/app/Models/Product.php @@ -1,7 +1,12 @@ where('product_key', '=', $key)->first(); diff --git a/app/Models/Project.php b/app/Models/Project.php index f3ecdf3f18..2dad20d294 100644 --- a/app/Models/Project.php +++ b/app/Models/Project.php @@ -10,7 +10,7 @@ class Project extends Eloquent public function account() { - return $this->belongsTo('Account'); + return $this->belongsTo('App\Models\Account'); } public function user() @@ -20,12 +20,12 @@ class Project extends Eloquent public function client() { - return $this->belongsTo('Client'); + return $this->belongsTo('App\Models\Client'); } public function codes() { - return $this->hasMany('ProjectCode'); + return $this->hasMany('App\Models\ProjectCode'); } public static function createNew($parent = false) diff --git a/app/Models/ProjectCode.php b/app/Models/ProjectCode.php index 17531449bf..5849c5f23d 100644 --- a/app/Models/ProjectCode.php +++ b/app/Models/ProjectCode.php @@ -3,14 +3,17 @@ use Auth; use Utils; +use Illuminate\Database\Eloquent\SoftDeletes; + class ProjectCode extends Eloquent { public $timestamps = true; - protected $softDelete = true; + use SoftDeletes; + protected $dates = ['deleted_at']; public function account() { - return $this->belongsTo('Account'); + return $this->belongsTo('App\Models\Account'); } public function user() @@ -20,12 +23,12 @@ class ProjectCode extends Eloquent public function project() { - return $this->belongsTo('Project'); + return $this->belongsTo('App\Models\Project'); } public function events() { - return $this->hasMany('TimesheetEvent'); + return $this->hasMany('App\Models\TimesheetEvent'); } public static function createNew($parent = false) diff --git a/app/Models/Size.php b/app/Models/Size.php index ae49e15540..76a9dc91a9 100644 --- a/app/Models/Size.php +++ b/app/Models/Size.php @@ -5,5 +5,4 @@ use Eloquent; class Size extends Eloquent { public $timestamps = false; - protected $softDelete = false; } diff --git a/app/Models/Subscription.php b/app/Models/Subscription.php index 08bd5f2193..3592ac8149 100644 --- a/app/Models/Subscription.php +++ b/app/Models/Subscription.php @@ -1,7 +1,12 @@ belongsTo('Account'); + return $this->belongsTo('App\Models\Account'); } public function user() @@ -17,6 +20,6 @@ class Timesheet extends Eloquent public function timesheet_events() { - return $this->hasMany('TimeSheetEvent'); + return $this->hasMany('App\Models\TimeSheetEvent'); } } diff --git a/app/Models/TimesheetEvent.php b/app/Models/TimesheetEvent.php index 33f8e39c57..7fc9811980 100644 --- a/app/Models/TimesheetEvent.php +++ b/app/Models/TimesheetEvent.php @@ -3,10 +3,13 @@ use Auth; use Utils; +use Illuminate\Database\Eloquent\SoftDeletes; + class TimesheetEvent extends Eloquent { public $timestamps = true; - protected $softDelete = true; + use SoftDeletes; + protected $dates = ['deleted_at']; /* protected $dates = array('org_updated_at'); @@ -22,7 +25,7 @@ class TimesheetEvent extends Eloquent public function account() { - return $this->belongsTo('Account'); + return $this->belongsTo('App\Models\Account'); } public function user() @@ -32,22 +35,22 @@ class TimesheetEvent extends Eloquent public function source() { - return $this->belongsTo('TimesheetEventSource'); + return $this->belongsTo('App\Models\TimesheetEventSource'); } public function timesheet() { - return $this->belongsTo('Timesheet'); + return $this->belongsTo('App\Models\Timesheet'); } public function project() { - return $this->belongsTo('Project'); + return $this->belongsTo('App\Models\Project'); } public function project_code() { - return $this->belongsTo('ProjectCode'); + return $this->belongsTo('App\Models\ProjectCode'); } /** diff --git a/app/Models/TimesheetEventSource.php b/app/Models/TimesheetEventSource.php index 2f82b3c6b6..9ae36be0c1 100644 --- a/app/Models/TimesheetEventSource.php +++ b/app/Models/TimesheetEventSource.php @@ -3,14 +3,17 @@ use Auth; use Utils; +use Illuminate\Database\Eloquent\SoftDeletes; + class TimesheetEventSource extends Eloquent { public $timestamps = true; - protected $softDelete = true; + use SoftDeletes; + protected $dates = ['deleted_at']; public function account() { - return $this->belongsTo('Account'); + return $this->belongsTo('App\Models\Account'); } public function user() @@ -20,7 +23,7 @@ class TimesheetEventSource extends Eloquent public function events() { - return $this->hasMany('TimesheetEvent'); + return $this->hasMany('App\Models\TimesheetEvent'); } public static function createNew($parent = false) diff --git a/app/Models/Timezone.php b/app/Models/Timezone.php index 4b90b7d3fa..5c00fd12da 100644 --- a/app/Models/Timezone.php +++ b/app/Models/Timezone.php @@ -5,5 +5,4 @@ use Eloquent; class Timezone extends Eloquent { public $timestamps = false; - protected $softDelete = false; } diff --git a/app/Models/User.php b/app/Models/User.php index 0967ed2360..c6f3b03bd2 100644 --- a/app/Models/User.php +++ b/app/Models/User.php @@ -8,6 +8,7 @@ use Illuminate\Database\Eloquent\Model; use Illuminate\Auth\Passwords\CanResetPassword; use Illuminate\Contracts\Auth\Authenticatable as AuthenticatableContract; use Illuminate\Contracts\Auth\CanResetPassword as CanResetPasswordContract; +use Illuminate\Database\Eloquent\SoftDeletes; class User extends Model implements AuthenticatableContract, CanResetPasswordContract { @@ -34,8 +35,8 @@ class User extends Model implements AuthenticatableContract, CanResetPasswordCon */ protected $hidden = ['password', 'remember_token']; - protected $softDelete = true; - + use SoftDeletes; + protected $dates = ['deleted_at']; public function account() { diff --git a/app/Ninja/Repositories/AccountRepository.php b/app/Ninja/Repositories/AccountRepository.php index 616c133aa6..d1c5e6ded3 100644 --- a/app/Ninja/Repositories/AccountRepository.php +++ b/app/Ninja/Repositories/AccountRepository.php @@ -1,15 +1,15 @@ '3.3.0', + 'jqueryVersion' => '2.1.0', + 'icon_prefix' => 'glyphicon' +]; diff --git a/config/chumper.datatable.php b/config/chumper.datatable.php new file mode 100644 index 0000000000..9a0a8b07a8 --- /dev/null +++ b/config/chumper.datatable.php @@ -0,0 +1,149 @@ + array( + + /* + |-------------------------------------------------------------------------- + | Table class + |-------------------------------------------------------------------------- + | + | Class(es) added to the table + | Supported: string + | + */ + + 'class' => 'table table-bordered', + + /* + |-------------------------------------------------------------------------- + | Table ID + |-------------------------------------------------------------------------- + | + | ID given to the table. Used for connecting the table and the Datatables + | jQuery plugin. If left empty a random ID will be generated. + | Supported: string + | + */ + + 'id' => '', + + /* + |-------------------------------------------------------------------------- + | DataTable options + |-------------------------------------------------------------------------- + | + | jQuery dataTable plugin options. The array will be json_encoded and + | passed through to the plugin. See https://datatables.net/usage/options + | for more information. + | Supported: array + | + */ + + 'options' => array( + + "sPaginationType" => "full_numbers", + + "bProcessing" => false + + ), + + /* + |-------------------------------------------------------------------------- + | DataTable callbacks + |-------------------------------------------------------------------------- + | + | jQuery dataTable plugin callbacks. The array will be json_encoded and + | passed through to the plugin. See https://datatables.net/usage/callbacks + | for more information. + | Supported: array + | + */ + + 'callbacks' => array(), + + /* + |-------------------------------------------------------------------------- + | Skip javascript in table template + |-------------------------------------------------------------------------- + | + | Determines if the template should echo the javascript + | Supported: boolean + | + */ + + 'noScript' => false, + + + /* + |-------------------------------------------------------------------------- + | Table view + |-------------------------------------------------------------------------- + | + | Template used to render the table + | Supported: string + | + */ + + 'table_view' => 'chumper.datatable::template', + + + /* + |-------------------------------------------------------------------------- + | Script view + |-------------------------------------------------------------------------- + | + | Template used to render the javascript + | Supported: string + | + */ + + 'script_view' => 'chumper.datatable::javascript', + + /* + |-------------------------------------------------------------------------- + | Option view + |-------------------------------------------------------------------------- + | + | Template used to render the options recursive + | + */ + + 'options_view' => config('chumper.datatable::options') + + ), + + + /* + |-------------------------------------------------------------------------- + | Engine specific configuration options. + |-------------------------------------------------------------------------- + | + */ + + 'engine' => array( + + /* + |-------------------------------------------------------------------------- + | Search for exact words + |-------------------------------------------------------------------------- + | + | If the search should be done with exact matching + | Supported: boolean + | + */ + + 'exactWordSearch' => false, + + ) + + +); diff --git a/config/countries.php b/config/countries.php new file mode 100644 index 0000000000..30204de213 --- /dev/null +++ b/config/countries.php @@ -0,0 +1,16 @@ + 'countries', + +); diff --git a/config/debugbar.php b/config/debugbar.php new file mode 100644 index 0000000000..a389dd17da --- /dev/null +++ b/config/debugbar.php @@ -0,0 +1,157 @@ + null, + + /* + |-------------------------------------------------------------------------- + | Storage settings + |-------------------------------------------------------------------------- + | + | DebugBar stores data for session/ajax requests. + | You can disable this, so the debugbar stores data in headers/session, + | but this can cause problems with large data collectors. + | By default, file storage (in the storage folder) is used. Redis and PDO + | can also be used. For PDO, run the package migrations first. + | + */ + 'storage' => array( + 'enabled' => true, + 'driver' => 'file', // redis, file, pdo + 'path' => storage_path() . '/debugbar', // For file driver + 'connection' => null, // Leave null for default connection (Redis/PDO) + ), + + /* + |-------------------------------------------------------------------------- + | Vendors + |-------------------------------------------------------------------------- + | + | Vendor files are included by default, but can be set to false. + | This can also be set to 'js' or 'css', to only include javascript or css vendor files. + | Vendor files are for css: font-awesome (including fonts) and highlight.js (css files) + | and for js: jquery and and highlight.js + | So if you want syntax highlighting, set it to true. + | jQuery is set to not conflict with existing jQuery scripts. + | + */ + + 'include_vendors' => true, + + /* + |-------------------------------------------------------------------------- + | Capture Ajax Requests + |-------------------------------------------------------------------------- + | + | The Debugbar can capture Ajax requests and display them. If you don't want this (ie. because of errors), + | you can use this option to disable sending the data through the headers. + | + */ + + 'capture_ajax' => true, + + /* + |-------------------------------------------------------------------------- + | DataCollectors + |-------------------------------------------------------------------------- + | + | Enable/disable DataCollectors + | + */ + + 'collectors' => array( + 'phpinfo' => true, // Php version + 'messages' => true, // Messages + 'time' => true, // Time Datalogger + 'memory' => true, // Memory usage + 'exceptions' => true, // Exception displayer + 'log' => true, // Logs from Monolog (merged in messages if enabled) + 'db' => true, // Show database (PDO) queries and bindings + 'views' => true, // Views with their data + 'route' => true, // Current route information + 'laravel' => false, // Laravel version and environment + 'events' => false, // All events fired + 'default_request' => false, // Regular or special Symfony request logger + 'symfony_request' => true, // Only one can be enabled.. + 'mail' => true, // Catch mail messages + 'logs' => false, // Add the latest log messages + 'files' => false, // Show the included files + 'config' => false, // Display config settings + 'auth' => false, // Display Laravel authentication status + 'session' => false, // Display session data in a separate tab + ), + + /* + |-------------------------------------------------------------------------- + | Extra options + |-------------------------------------------------------------------------- + | + | Configure some DataCollectors + | + */ + + 'options' => array( + 'auth' => array( + 'show_name' => false, // Also show the users name/email in the debugbar + ), + 'db' => array( + 'with_params' => true, // Render SQL with the parameters substituted + 'timeline' => false, // Add the queries to the timeline + 'backtrace' => false, // EXPERIMENTAL: Use a backtrace to find the origin of the query in your files. + 'explain' => array( // EXPERIMENTAL: Show EXPLAIN output on queries + 'enabled' => false, + 'types' => array('SELECT'), // array('SELECT', 'INSERT', 'UPDATE', 'DELETE'); for MySQL 5.6.3+ + ), + 'hints' => true, // Show hints for common mistakes + ), + 'mail' => array( + 'full_log' => false + ), + 'views' => array( + 'data' => false, //Note: Can slow down the application, because the data can be quite large.. + ), + 'route' => array( + 'label' => true // show complete route on bar + ), + 'logs' => array( + 'file' => null + ), + ), + + /* + |-------------------------------------------------------------------------- + | Inject Debugbar in Response + |-------------------------------------------------------------------------- + | + | Usually, the debugbar is added just before , by listening to the + | Response after the App is done. If you disable this, you have to add them + | in your template yourself. See http://phpdebugbar.com/docs/rendering.html + | + */ + + 'inject' => true, + + /* + |-------------------------------------------------------------------------- + | DebugBar route prefix + |-------------------------------------------------------------------------- + | + | Sometimes you want to set route prefix to be used by DebugBar to load + | its resources from. Usually the need comes from misconfigured web server or + | from trying to overcome bugs like this: http://trac.nginx.org/nginx/ticket/97 + | + */ + 'route_prefix' => '_debugbar', + +); diff --git a/config/former.php b/config/former.php new file mode 100644 index 0000000000..9a9196c749 --- /dev/null +++ b/config/former.php @@ -0,0 +1,66 @@ + true, + + // The default form type + 'default_form_type' => 'horizontal', + + // The framework to be used by Former + 'framework' => 'TwitterBootstrap3', + + // Validation + //////////////////////////////////////////////////////////////////// + + // Whether Former should fetch errors from Session + 'fetch_errors' => true, + + // Whether Former should try to apply Validator rules as attributes + 'live_validation' => true, + + // Whether Former should automatically fetch error messages and + // display them next to the matching fields + 'error_messages' => true, + + // Checkables + //////////////////////////////////////////////////////////////////// + + // Whether checkboxes should always be present in the POST data, + // no matter if you checked them or not + 'push_checkboxes' => false, + + // The value a checkbox will have in the POST array if unchecked + 'unchecked_value' => 0, + + // Required fields + //////////////////////////////////////////////////////////////////// + + // The class to be added to required fields + 'required_class' => 'required', + + // A facultative text to append to the labels of required fields + 'required_text' => '*', + + // Translations + //////////////////////////////////////////////////////////////////// + + // Where Former should look for translations + 'translate_from' => 'validation.attributes', + + // Whether text that comes out of the translated + // should be capitalized (ex: email => Email) automatically + 'capitalize_translations' => true, + + // An array of attributes to automatically translate + 'translatable' => array( + 'help', + 'inlineHelp', + 'blockHelp', + 'placeholder', + 'data_placeholder', + 'label', + ), +); diff --git a/config/former/Nude.php b/config/former/Nude.php new file mode 100644 index 0000000000..18f5239b82 --- /dev/null +++ b/config/former/Nude.php @@ -0,0 +1,14 @@ + array( + + 'tag' => 'i', + 'set' => null, + 'prefix' => 'icon', + + ), + +); \ No newline at end of file diff --git a/config/former/TwitterBootstrap.php b/config/former/TwitterBootstrap.php new file mode 100644 index 0000000000..dfac6d7bc7 --- /dev/null +++ b/config/former/TwitterBootstrap.php @@ -0,0 +1,14 @@ + array( + + 'tag' => 'i', + 'set' => null, + 'prefix' => 'icon', + + ), + +); \ No newline at end of file diff --git a/config/former/TwitterBootstrap3.php b/config/former/TwitterBootstrap3.php new file mode 100644 index 0000000000..fad6b7882c --- /dev/null +++ b/config/former/TwitterBootstrap3.php @@ -0,0 +1,26 @@ + array( + 'large' => 'lg', + 'medium' => 'md', + 'small' => 'sm', + 'mini' => 'xs', + ), + + // Width of labels for horizontal forms expressed as viewport => grid columns + 'labelWidths' => array( + 'large' => 4, + 'small' => 4, + ), + + // HTML markup and classes used by Bootstrap 3 for icons + 'icon' => array( + 'tag' => 'span', + 'set' => 'glyphicon', + 'prefix' => 'glyphicon', + ), + +); \ No newline at end of file diff --git a/config/former/ZurbFoundation.php b/config/former/ZurbFoundation.php new file mode 100644 index 0000000000..9223978736 --- /dev/null +++ b/config/former/ZurbFoundation.php @@ -0,0 +1,35 @@ + array( + + 'large' => '', + 'medium' => null, + 'small' => 'mobile-', + 'mini' => null, + + ), + + // Width of labels for horizontal forms expressed as viewport => grid columns + 'labelWidths' => array( + + 'large' => 2, + 'small' => 4, + + ), + + // Classes to be applied to wrapped labels in horizontal forms + 'wrappedLabelClasses' => array('right','inline'), + + // HTML markup and classes used by Foundation 3 for icons + 'icon' => array( + + 'tag' => 'i', + 'set' => null, + 'prefix' => 'fi', + + ), + +); \ No newline at end of file diff --git a/config/former/ZurbFoundation4.php b/config/former/ZurbFoundation4.php new file mode 100644 index 0000000000..4f55a44f9c --- /dev/null +++ b/config/former/ZurbFoundation4.php @@ -0,0 +1,36 @@ + array( + + 'large' => 'large', + 'medium' => null, + 'small' => 'small', + 'mini' => null, + + ), + + // Width of labels for horizontal forms expressed as viewport => grid columns + 'labelWidths' => array( + + 'small' => 3, + + ), + + // Classes to be applied to wrapped labels in horizontal forms + 'wrappedLabelClasses' => array('right','inline'), + + // HTML markup and classes used by Foundation 4 for icons + 'icon' => array( + + 'tag' => 'i', + 'set' => 'general', + 'prefix' => 'foundicon', + + ), + +); \ No newline at end of file diff --git a/config/ide-helper.php b/config/ide-helper.php new file mode 100644 index 0000000000..d0dd7d6620 --- /dev/null +++ b/config/ide-helper.php @@ -0,0 +1,89 @@ + '_ide_helper', + 'format' => 'php', + + /* + |-------------------------------------------------------------------------- + | Helper files to include + |-------------------------------------------------------------------------- + | + | Include helper files. By default not included, but can be toggled with the + | -- helpers (-H) option. Extra helper files can be included. + | + */ + + 'include_helpers' => false, + + 'helper_files' => array( + base_path().'/vendor/laravel/framework/src/Illuminate/Support/helpers.php', + ), + + /* + |-------------------------------------------------------------------------- + | Model locations to include + |-------------------------------------------------------------------------- + | + | Define in which directories the ide-helper:models command should look + | for models. + | + */ + + 'model_locations' => array( + 'app', + ), + + + /* + |-------------------------------------------------------------------------- + | Extra classes + |-------------------------------------------------------------------------- + | + | These implementations are not really extended, but called with magic functions + | + */ + + 'extra' => array( + 'Eloquent' => array('Illuminate\Database\Eloquent\Builder', 'Illuminate\Database\Query\Builder'), + 'Session' => array('Illuminate\Session\Store'), + ), + + 'magic' => array( + 'Log' => array( + 'debug' => 'Monolog\Logger::addDebug', + 'info' => 'Monolog\Logger::addInfo', + 'notice' => 'Monolog\Logger::addNotice', + 'warning' => 'Monolog\Logger::addWarning', + 'error' => 'Monolog\Logger::addError', + 'critical' => 'Monolog\Logger::addCritical', + 'alert' => 'Monolog\Logger::addAlert', + 'emergency' => 'Monolog\Logger::addEmergency', + ) + ), + + /* + |-------------------------------------------------------------------------- + | Interface implementations + |-------------------------------------------------------------------------- + | + | These interfaces will be replaced with the implementing class. Some interfaces + | are detected by the helpers, others can be listed below. + | + */ + + 'interfaces' => array( + '\Illuminate\Contracts\Auth\Authenticatable' => config('auth.model', 'App\User'), + ) + +); diff --git a/config/image.php b/config/image.php new file mode 100644 index 0000000000..b106809e24 --- /dev/null +++ b/config/image.php @@ -0,0 +1,20 @@ + 'gd' + +); diff --git a/resources/views/header.blade.php b/resources/views/header.blade.php index 90b64ffdc2..43500b55a7 100644 --- a/resources/views/header.blade.php +++ b/resources/views/header.blade.php @@ -57,9 +57,9 @@
-   {{ isset($recurringHelp) ? $recurringHelp : '' }}   +   {!! isset($recurringHelp) ? $recurringHelp : '' !!}