diff --git a/CHANGELOG b/CHANGELOG index c28cea4a46d..bdea67ce74d 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -1,5 +1,12 @@ UNRELEASED CHANGES: +* + +RELEASED VERSIONS: + +v1.5.0 - 2018-01-02 +------------------- + * Add Webmanifest to create bookmarks on phones * Add pets management * Activities made with contact now appears in the Journal @@ -9,8 +16,6 @@ UNRELEASED CHANGES: * Show a user's avatar when searching * Fix timezone not being saved in the Settings tab -RELEASED VERSIONS: - v1.4.1 - 2017-12-13 ------------------- diff --git a/app/Http/Controllers/ContactsController.php b/app/Http/Controllers/ContactsController.php index 455371f4e6a..98ae6fcf2c0 100644 --- a/app/Http/Controllers/ContactsController.php +++ b/app/Http/Controllers/ContactsController.php @@ -7,6 +7,7 @@ use App\Tag; use Validator; use App\Contact; +use App\ContactFieldType; use App\Jobs\ResizeAvatars; use Illuminate\Http\Request; use Illuminate\Support\Facades\Storage; @@ -354,7 +355,24 @@ public function search(Request $request) return; } - $results = Contact::search($needle, $accountId); + if (preg_match('/(.{1,})[:](.{1,})/', $needle, $matches)) { + $search_field = $matches[1]; + $search_term = $matches[2]; + + $field = ContactFieldType::where('name', 'LIKE', $search_field)->first(); + + $field_id = $field->id; + + $results = Contact::whereHas('contactFields', function ($query) use ($field_id,$search_term) { + $query->where([ + ['data', 'like', "$search_term%"], + ['contact_field_type_id', $field_id], + ]); + })->get(); + } else { + $results = Contact::search($needle, $accountId); + } + if (count($results) !== 0) { return $results; } else { diff --git a/app/Http/ViewComposers/DateSelectViewComposer.php b/app/Http/ViewComposers/DateSelectViewComposer.php index 5892087747e..7a44f82db8b 100644 --- a/app/Http/ViewComposers/DateSelectViewComposer.php +++ b/app/Http/ViewComposers/DateSelectViewComposer.php @@ -23,6 +23,7 @@ public function compose(View $view) Carbon::setLocale(auth()->user()->locale); $months = []; $currentDate = Carbon::now(); + $currentDate->day = 1; for ($month = 1; $month < 13; $month++) { $currentDate->month = $month; diff --git a/config/monica.php b/config/monica.php index 56db16d49e9..be242bc28b0 100644 --- a/config/monica.php +++ b/config/monica.php @@ -114,5 +114,5 @@ | bad things will happen. | */ - 'app_version' => '1.4.1', + 'app_version' => '1.5.0', ]; diff --git a/docs/installation/generic.md b/docs/installation/generic.md index c0d072e21f0..f2a83a8814f 100644 --- a/docs/installation/generic.md +++ b/docs/installation/generic.md @@ -21,7 +21,7 @@ The official Monica installation uses mySQL as the database system and **this is Once the softwares above are installed: 1. Create a database called `monica` in your mySQL instance. This will let you store your data. -1. Clone the repository: `git clone git@github.com:monicahq/monica.git` in the folder you want to install the software to. +1. Clone the repository: `git clone https://github.com/monicahq/monica` in the folder you want to install the software to. 1. Run `cd monica` to go to the root of the newly created folder containing Monica's code. 1. Run `composer install` at the root of the folder Monica has been cloned. 1. Run `cp .env.example .env`. This will create the `.env` file that contains all the settings about Monica. diff --git a/resources/views/people/debt/add.blade.php b/resources/views/people/debt/add.blade.php old mode 100644 new mode 100755 index 834eee67e21..5b630425480 --- a/resources/views/people/debt/add.blade.php +++ b/resources/views/people/debt/add.blade.php @@ -34,7 +34,8 @@
@include('people.debt.form', [ 'method' => 'POST', - 'action' => route('people.debt.store', $contact) + 'action' => route('people.debt.store', $contact), + 'update_or_add' =>'add' ])
diff --git a/resources/views/people/debt/edit.blade.php b/resources/views/people/debt/edit.blade.php old mode 100644 new mode 100755 index f652fd93f93..10feaef6924 --- a/resources/views/people/debt/edit.blade.php +++ b/resources/views/people/debt/edit.blade.php @@ -34,7 +34,8 @@
@include('people.debt.form', [ 'method' => 'PUT', - 'action' => route('people.debt.update', [$contact, $debt]) + 'action' => route('people.debt.update', [$contact, $debt]), + 'update_or_add' =>'edit' ])
diff --git a/resources/views/people/debt/form.blade.php b/resources/views/people/debt/form.blade.php old mode 100644 new mode 100755 index df66da8b5da..3ec8b808d0f --- a/resources/views/people/debt/form.blade.php +++ b/resources/views/people/debt/form.blade.php @@ -32,7 +32,13 @@
- + {{ trans('app.cancel') }}
diff --git a/routes/web.php b/routes/web.php index 5779f98ad01..c374ab096f3 100644 --- a/routes/web.php +++ b/routes/web.php @@ -11,7 +11,7 @@ */ if (App::environment('production')) { - URL::forceScheme('https'); + URL::forceSchema('https'); } Route::get('/', 'Auth\LoginController@showLoginForm')->name('login'); diff --git a/storage/app/.gitignore b/storage/app/.gitignore old mode 100644 new mode 100755 diff --git a/storage/app/public/.gitignore b/storage/app/public/.gitignore old mode 100644 new mode 100755 diff --git a/storage/debugbar/.gitignore b/storage/debugbar/.gitignore old mode 100644 new mode 100755 diff --git a/storage/framework/.gitignore b/storage/framework/.gitignore old mode 100644 new mode 100755 diff --git a/storage/framework/cache/.gitignore b/storage/framework/cache/.gitignore old mode 100644 new mode 100755 diff --git a/storage/framework/sessions/.gitignore b/storage/framework/sessions/.gitignore old mode 100644 new mode 100755 diff --git a/storage/framework/views/.gitignore b/storage/framework/views/.gitignore old mode 100644 new mode 100755 diff --git a/storage/logs/.gitignore b/storage/logs/.gitignore old mode 100644 new mode 100755