From 4833540642ace18204933633cd159594c53fe7a9 Mon Sep 17 00:00:00 2001 From: Jonny Barnes Date: Thu, 3 Nov 2016 19:45:56 +0000 Subject: [PATCH] Squashed commit of the following: MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit commit e7723f4290dd79eddc2a8dd1d4c2725914a90b55 Author: Jonny Barnes Date: Thu Nov 3 19:44:33 2016 +0000 Add latest change to the changelog commit e2104997ab796eeba320931beaec3bc99fd2d296 Author: Jonny Barnes Date: Thu Nov 3 19:43:27 2016 +0000 Pass correct info to updated social links template commit 586ca9b5446e272ef3b89a615ba0666e6f7d8d82 Author: Jonny Barnes Date: Thu Nov 3 19:42:08 2016 +0000 Remove reply/like/repost links, add facebook link commit 00483089380d2e00d24d86a4b1a03363161c7a97 Author: Jonny Barnes Date: Thu Nov 3 19:22:46 2016 +0000 Add dummy Facebook URLs for syndication commit 2e001b04e36a7fd1198fe5ee70db65cd2523e123 Author: Jonny Barnes Date: Thu Nov 3 19:22:11 2016 +0000 Clarify that syndication isn’t being tested during micropub client integration test --- changelog.md | 4 +++ database/factories/ModelFactory.php | 1 + resources/views/templates/note.blade.php | 2 +- .../views/templates/social-links.blade.php | 32 ++++++++----------- tests/MicropubClientTest.php | 1 + 5 files changed, 21 insertions(+), 19 deletions(-) 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 @@ 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([