diff --git a/changelog.md b/changelog.md index 9b1cb9af..9edcdda8 100644 --- a/changelog.md +++ b/changelog.md @@ -1,5 +1,9 @@ # Changelog +## Version {next} + - Remove reply/like/repost links, not needed without indie-action + - Add facebook syndication link (issue#29) + ## Version 0.0.15.5 (2016-10-31) - Fix: update note view to use longitude in h-card for a place diff --git a/database/factories/ModelFactory.php b/database/factories/ModelFactory.php index 1eb6c116..b4663e4d 100644 --- a/database/factories/ModelFactory.php +++ b/database/factories/ModelFactory.php @@ -25,5 +25,6 @@ $factory->define(App\Note::class, function (Faker\Generator $faker) { return [ 'note' => $faker->paragraph, 'tweet_id' => $faker->randomNumber(9), + 'facebook_url' => 'https://facebook.com/' . $faker->randomNumber(9), ]; }); diff --git a/resources/views/templates/note.blade.php b/resources/views/templates/note.blade.php index 66f7bbb7..01b76d40 100644 --- a/resources/views/templates/note.blade.php +++ b/resources/views/templates/note.blade.php @@ -19,7 +19,7 @@ @if($note->placeLink)in {{ $note->address }} @elseif($note->address)in {!! $note->address !!}@endif @if($note->replies > 0)Replies: {{ $note->replies }}@endif - @if($note->tweet_id)@include('templates.social-links', ['tweet_id' => $note->tweet_id, 'nb60id' => $note->nb60id])@endif + @if($note->tweet_id || $note->facebook_url)@include('templates.social-links', ['tweet_id' => $note->tweet_id, 'facebook_url' => $note->facebook_url])@endif @if ($note->placeLink)
@endif diff --git a/resources/views/templates/social-links.blade.php b/resources/views/templates/social-links.blade.php index afc87d4f..18ec64b8 100644 --- a/resources/views/templates/social-links.blade.php +++ b/resources/views/templates/social-links.blade.php @@ -1,25 +1,21 @@ - + @if($tweet_id !== null) - + - - - - - + @endif + @if($facebook_url !== null) + + + - - - - - - - - - - - - + @endif diff --git a/tests/MicropubClientTest.php b/tests/MicropubClientTest.php index c948e815..265e3f24 100644 --- a/tests/MicropubClientTest.php +++ b/tests/MicropubClientTest.php @@ -48,6 +48,7 @@ class MicropubClientTest extends TestCase public function testClientCreatesNewNoteWithTag() { + //in this test, the syndication targets are blank $faker = \Faker\Factory::create(); $note = 'Fake note from #PHPUnit: ' . $faker->text; $this->withSession([