Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 7 additions & 2 deletions CHANGELOG
Original file line number Diff line number Diff line change
@@ -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
Expand All @@ -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
-------------------

Expand Down
20 changes: 19 additions & 1 deletion app/Http/Controllers/ContactsController.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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 {
Expand Down
1 change: 1 addition & 0 deletions app/Http/ViewComposers/DateSelectViewComposer.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
2 changes: 1 addition & 1 deletion config/monica.php
Original file line number Diff line number Diff line change
Expand Up @@ -114,5 +114,5 @@
| bad things will happen.
|
*/
'app_version' => '1.4.1',
'app_version' => '1.5.0',
];
2 changes: 1 addition & 1 deletion docs/installation/generic.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
3 changes: 2 additions & 1 deletion resources/views/people/debt/add.blade.php
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,8 @@
<div class="col-xs-12 col-sm-6 col-sm-offset-3">
@include('people.debt.form', [
'method' => 'POST',
'action' => route('people.debt.store', $contact)
'action' => route('people.debt.store', $contact),
'update_or_add' =>'add'
])
</div>
</div>
Expand Down
3 changes: 2 additions & 1 deletion resources/views/people/debt/edit.blade.php
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,8 @@
<div class="col-xs-12 col-sm-6 col-sm-offset-3">
@include('people.debt.form', [
'method' => 'PUT',
'action' => route('people.debt.update', [$contact, $debt])
'action' => route('people.debt.update', [$contact, $debt]),
'update_or_add' =>'edit'
])
</div>
</div>
Expand Down
8 changes: 7 additions & 1 deletion resources/views/people/debt/form.blade.php
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,13 @@
</div>

<div class="form-group actions">
<button type="submit" class="btn btn-primary">{{ trans('people.debt_add_add_cta') }}</button>
<button type="submit" class="btn btn-primary">
@if($update_or_add == 'add')
{{ trans('people.debt_add_add_cta') }}
@elseif ($update_or_add == 'edit')
{{ trans('people.debt_edit_update_cta') }}
@endif
</button>
<a href="{{ route('people.show', $contact) }}" class="btn btn-secondary">{{ trans('app.cancel') }}</a>
</div> <!-- .form-group -->
</form>
2 changes: 1 addition & 1 deletion routes/web.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
*/

if (App::environment('production')) {
URL::forceScheme('https');
URL::forceSchema('https');
}

Route::get('/', 'Auth\LoginController@showLoginForm')->name('login');
Expand Down
Empty file modified storage/app/.gitignore
100644 → 100755
Empty file.
Empty file modified storage/app/public/.gitignore
100644 → 100755
Empty file.
Empty file modified storage/debugbar/.gitignore
100644 → 100755
Empty file.
Empty file modified storage/framework/.gitignore
100644 → 100755
Empty file.
Empty file modified storage/framework/cache/.gitignore
100644 → 100755
Empty file.
Empty file modified storage/framework/sessions/.gitignore
100644 → 100755
Empty file.
Empty file modified storage/framework/views/.gitignore
100644 → 100755
Empty file.
Empty file modified storage/logs/.gitignore
100644 → 100755
Empty file.