Skip to content

Commit

Permalink
Markdown support for notes and log calls (#544)
Browse files Browse the repository at this point in the history
Close #506 
Fix #545
  • Loading branch information
djaiss authored Aug 16, 2017
1 parent 7069168 commit 503b0f0
Show file tree
Hide file tree
Showing 34 changed files with 15,601 additions and 127 deletions.
5 changes: 5 additions & 0 deletions CHANGELOG
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,11 @@ UNRELEASED CHANGES:

RELEASED VERSIONS:

v0.6.2 - 2017-08-16
-------------------

* Add support for Markdown for the notes and call logs

v0.6.1 - 2017-08-15
-------------------

Expand Down
15 changes: 15 additions & 0 deletions app/Call.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

namespace App;

use Parsedown;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\Relations\BelongsTo;

Expand Down Expand Up @@ -40,4 +41,18 @@ public function contact()
{
return $this->belongsTo(Contact::class);
}

/**
* Return the markdown parsed body.
*
* @return string
*/
public function getParsedContentAttribute()
{
if (is_null($this->content)) {
return;
}

return (new Parsedown())->text($this->content);
}
}
1 change: 1 addition & 0 deletions app/Contact.php
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,7 @@ class Contact extends Model
'account_id',
'is_significant_other',
'is_kid',
'phone_number',
];

/**
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' => '0.6.1',
'app_version' => '0.6.2',
];
6 changes: 6 additions & 0 deletions database/factories/ModelFactory.php
Original file line number Diff line number Diff line change
Expand Up @@ -127,3 +127,9 @@
'country' => 'Mali',
];
});

$factory->define(App\Call::class, function (Faker\Generator $faker) {
return [
'account_id' => 1,
];
});
Loading

0 comments on commit 503b0f0

Please sign in to comment.