{"action":"created","comment":{"url":"https://api.github.com/repos/mbernson/culinologie/pulls/comments/59399738","id":59399738,"diff_hunk":"@@ -121,25 +122,141 @@\n \n             {!! $recipe->getHtmlPresentation() !!}\n             @endif\n+           \n         </div>\n \n         <div class=\"col-md-3 sidebar\">\n-\n             @if(file_exists(public_path().key($recipe->getImages())))\n-            <h4>Foto&#39;s</h4>\n+                <h4>Foto&#39;s</h4>\n             @endif\n             @foreach($recipe->getImages() as $url => $title)\n                 @if(file_exists(public_path().$url))\n-                <div class=\"panel panel-default\">\n-                    <div class=\"panel-body\">\n-                        <img src=\"{{ $url }}\" alt=\"{{ $title }}\" />\n+                    <div class=\"panel panel-default\">\n+                        <div class=\"panel-body\">\n+                            <img src=\"{{ $url }}\" alt=\"{{ $title }}\" />\n+                        </div>\n+                        <div class=\"panel-footer\">{{ $title }}</div>\n                     </div>\n-                    <div class=\"panel-footer\">{{ $title }}</div>\n-                </div>\n                 @endif\n             @endforeach\n         </div>\n+            \n+        <div class=\"col-md-9\" id=\"comments\">\n+            <h3 class=\"text-left\">Reacties\n+                <button onClick=\"$('#reviewForm').toggleClass('hidden');\" class=\"btn btn-primary pull-right btn-sm\">Reactie formulier</button>\n+\n+            </h3>\n+            @if(Auth::user())\n+            <form class=\"form-horizontal hidden\" id=\"reviewForm\" method=\"post\" action=\"{{route('recipes.postComment', $recipe->tracking_nr)}}\">\n+                <fieldset>\n+                {!! csrf_field() !!}\n+                <!-- Form Name -->\n+                <legend>Laat een reactie achter!</legend>\n+                \n+                <!-- Text input-->\n+                <div class=\"form-group\">\n+                  <label class=\"col-md-2 control-label\" for=\"title\">Titel*</label>  \n+                  <div class=\"col-md-8\">\n+                  <input id=\"title\" name=\"title\" type=\"text\" placeholder=\"Titel van je review\" class=\"form-control input-md\" required=\"\">\n+                    \n+                  </div>\n+                </div>\n+                \n+                <!-- Multiple Radios (inline) -->\n+                <div class=\"form-group\">\n+                  <label class=\"col-md-2 control-label\" for=\"rating\">Rating\n+                      <small style=\"margin-left: 10px;\"><a class=\"btn btn-xs btn-primary\" id=\"rating-switch\">On</a></small>\n+                  </label>\n+                  <div class=\"col-md-5\">\n+                    <label class=\"radio-inline\" for=\"rating-0\">\n+                      <input type=\"radio\" name=\"rating\" id=\"rating-0\" value=\"1\">\n+                      1\n+                    </label> \n+                    <label class=\"radio-inline\" for=\"rating-1\">\n+                      <input type=\"radio\" name=\"rating\" id=\"rating-1\" value=\"2\">\n+                      2\n+                    </label> \n+                    <label class=\"radio-inline\" for=\"rating-2\">\n+                      <input type=\"radio\" name=\"rating\" id=\"rating-2\" value=\"3\">\n+                      3\n+                    </label> \n+                    <label class=\"radio-inline\" for=\"rating-3\">\n+                      <input type=\"radio\" name=\"rating\" id=\"rating-3\" value=\"4\">\n+                      4\n+                    </label> \n+                    <label class=\"radio-inline\" for=\"rating-4\">\n+                      <input type=\"radio\" name=\"rating\" id=\"rating-4\" value=\"5\">\n+                      5\n+                    </label>\n+                  </div>\n+\n+                </div>\n+                \n+                <!-- Textarea -->\n+                <div class=\"form-group\">\n+                  <label class=\"col-md-2 control-label\" for=\"body\">Bericht</label>\n+                  <div class=\"col-md-8\">                     \n+                    <textarea class=\"form-control\" id=\"body\" name=\"body\"></textarea>\n+                  </div>\n+                </div>\n+                \n+                <!-- Submit button -->\n+                <div class=\"form-group\">\n+                  <label class=\"col-md-2 control-label\" for=\"body\"></label>\n+                  <div class=\"col-md-8\">                     \n+                    <button type=\"submit\" class=\"btn btn-success\">Verstuur je reactie &raquo;</button>\n+                  </div>\n+                </div>\n+                </fieldset>\n+            </form>\n+\n+            @endif\n+            <div class=\"row\">\n+        \t\t                \n+                <div class=\"list-group\">\n+                @if($recipe->comments->count() ==0)\n+                <p class=\"text-center well\">Geen reacties gevonden...</p>\n+                @else\n+                  @foreach($recipe->comments()->orderBy('id','DESC')->get() as $comment)\n+                  <div class=\"list-group-item\">\n+\n+                       <div class=\"pull-right\">\n+                            <small><i class=\"fa fa-user fa-fw\"></i> {{$comment->author->name}}</small>\n+                            <br>\n+\n+                           <div class=\"stars text-left\">\n+                               @if ($comment->rating != NULL)\n+                                {!!$comment->getHtmlStars()!!}\n+                               @else\n+                                   Geen rating\n+                               @endif\n+                            </div>\n+\n+                        </div>\n+\n+                        <h4 class=\"list-group-item-heading\">\n+                            {{$comment->title}}\n+                            @if (Auth::user())\n+                                @if ($comment->user_id == Auth::user()->id)\n+                                    <a class=\"btn btn-xs text-danger pull-right\" href=\"{{route('recipes.deleteComment',[$recipe->id, $comment->id])}}\"><i class=\"fa fa-trash-o fa-fw\"></i></a>\n+                                @endif\n+                            @endif\n+                            <br>\n+                            <p style=\"font-size: 75% !important;\"><small class=\"text-muted\">{{$comment->created_at}}</small></p>\n+\n+                        </h4>\n+                        <p class=\"list-group-item-text\">\n+                            {!!nl2br($comment->body)!!}","path":"resources/views/recipes/show.blade.php","position":145,"original_position":145,"commit_id":"45bdc6eb32c493f89ad8ca4650bb26e943c1880c","original_commit_id":"45bdc6eb32c493f89ad8ca4650bb26e943c1880c","user":{"login":"mbernson","id":477710,"avatar_url":"https://avatars.githubusercontent.com/u/477710?v=3","gravatar_id":"","url":"https://api.github.com/users/mbernson","html_url":"https://github.com/mbernson","followers_url":"https://api.github.com/users/mbernson/followers","following_url":"https://api.github.com/users/mbernson/following{/other_user}","gists_url":"https://api.github.com/users/mbernson/gists{/gist_id}","starred_url":"https://api.github.com/users/mbernson/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mbernson/subscriptions","organizations_url":"https://api.github.com/users/mbernson/orgs","repos_url":"https://api.github.com/users/mbernson/repos","events_url":"https://api.github.com/users/mbernson/events{/privacy}","received_events_url":"https://api.github.com/users/mbernson/received_events","type":"User","site_admin":false},"body":"Arbitrary HTML code can be injected in the comment body by anyone, because Blade's raw output tags are used here.","created_at":"2016-04-12T15:43:50Z","updated_at":"2016-04-12T15:43:50Z","html_url":"https://github.com/mbernson/culinologie/pull/4#discussion_r59399738","pull_request_url":"https://api.github.com/repos/mbernson/culinologie/pulls/4","_links":{"self":{"href":"https://api.github.com/repos/mbernson/culinologie/pulls/comments/59399738"},"html":{"href":"https://github.com/mbernson/culinologie/pull/4#discussion_r59399738"},"pull_request":{"href":"https://api.github.com/repos/mbernson/culinologie/pulls/4"}}},"pull_request":{"url":"https://api.github.com/repos/mbernson/culinologie/pulls/4","id":66177434,"html_url":"https://github.com/mbernson/culinologie/pull/4","diff_url":"https://github.com/mbernson/culinologie/pull/4.diff","patch_url":"https://github.com/mbernson/culinologie/pull/4.patch","issue_url":"https://api.github.com/repos/mbernson/culinologie/issues/4","number":4,"state":"open","locked":false,"title":"Comments","user":{"login":"jargij","id":1433486,"avatar_url":"https://avatars.githubusercontent.com/u/1433486?v=3","gravatar_id":"","url":"https://api.github.com/users/jargij","html_url":"https://github.com/jargij","followers_url":"https://api.github.com/users/jargij/followers","following_url":"https://api.github.com/users/jargij/following{/other_user}","gists_url":"https://api.github.com/users/jargij/gists{/gist_id}","starred_url":"https://api.github.com/users/jargij/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jargij/subscriptions","organizations_url":"https://api.github.com/users/jargij/orgs","repos_url":"https://api.github.com/users/jargij/repos","events_url":"https://api.github.com/users/jargij/events{/privacy}","received_events_url":"https://api.github.com/users/jargij/received_events","type":"User","site_admin":false},"body":"Nieuwe functie om comments te plaatsen incl review cijfer\r\n\r\nLET OP: Gebaseerd op de versie met migrations! Deze eerst mergen svp. ","created_at":"2016-04-12T15:25:46Z","updated_at":"2016-04-12T15:43:50Z","closed_at":null,"merged_at":null,"merge_commit_sha":"00a113a20c49f1fb1e1269a85eab6639484465e7","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/mbernson/culinologie/pulls/4/commits","review_comments_url":"https://api.github.com/repos/mbernson/culinologie/pulls/4/comments","review_comment_url":"https://api.github.com/repos/mbernson/culinologie/pulls/comments{/number}","comments_url":"https://api.github.com/repos/mbernson/culinologie/issues/4/comments","statuses_url":"https://api.github.com/repos/mbernson/culinologie/statuses/45bdc6eb32c493f89ad8ca4650bb26e943c1880c","head":{"label":"jargij:comments","ref":"comments","sha":"45bdc6eb32c493f89ad8ca4650bb26e943c1880c","user":{"login":"jargij","id":1433486,"avatar_url":"https://avatars.githubusercontent.com/u/1433486?v=3","gravatar_id":"","url":"https://api.github.com/users/jargij","html_url":"https://github.com/jargij","followers_url":"https://api.github.com/users/jargij/followers","following_url":"https://api.github.com/users/jargij/following{/other_user}","gists_url":"https://api.github.com/users/jargij/gists{/gist_id}","starred_url":"https://api.github.com/users/jargij/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jargij/subscriptions","organizations_url":"https://api.github.com/users/jargij/orgs","repos_url":"https://api.github.com/users/jargij/repos","events_url":"https://api.github.com/users/jargij/events{/privacy}","received_events_url":"https://api.github.com/users/jargij/received_events","type":"User","site_admin":false},"repo":{"id":51255419,"name":"culinologie","full_name":"jargij/culinologie","owner":{"login":"jargij","id":1433486,"avatar_url":"https://avatars.githubusercontent.com/u/1433486?v=3","gravatar_id":"","url":"https://api.github.com/users/jargij","html_url":"https://github.com/jargij","followers_url":"https://api.github.com/users/jargij/followers","following_url":"https://api.github.com/users/jargij/following{/other_user}","gists_url":"https://api.github.com/users/jargij/gists{/gist_id}","starred_url":"https://api.github.com/users/jargij/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jargij/subscriptions","organizations_url":"https://api.github.com/users/jargij/orgs","repos_url":"https://api.github.com/users/jargij/repos","events_url":"https://api.github.com/users/jargij/events{/privacy}","received_events_url":"https://api.github.com/users/jargij/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/jargij/culinologie","description":"Laravel cookbook application","fork":true,"url":"https://api.github.com/repos/jargij/culinologie","forks_url":"https://api.github.com/repos/jargij/culinologie/forks","keys_url":"https://api.github.com/repos/jargij/culinologie/keys{/key_id}","collaborators_url":"https://api.github.com/repos/jargij/culinologie/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/jargij/culinologie/teams","hooks_url":"https://api.github.com/repos/jargij/culinologie/hooks","issue_events_url":"https://api.github.com/repos/jargij/culinologie/issues/events{/number}","events_url":"https://api.github.com/repos/jargij/culinologie/events","assignees_url":"https://api.github.com/repos/jargij/culinologie/assignees{/user}","branches_url":"https://api.github.com/repos/jargij/culinologie/branches{/branch}","tags_url":"https://api.github.com/repos/jargij/culinologie/tags","blobs_url":"https://api.github.com/repos/jargij/culinologie/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/jargij/culinologie/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/jargij/culinologie/git/refs{/sha}","trees_url":"https://api.github.com/repos/jargij/culinologie/git/trees{/sha}","statuses_url":"https://api.github.com/repos/jargij/culinologie/statuses/{sha}","languages_url":"https://api.github.com/repos/jargij/culinologie/languages","stargazers_url":"https://api.github.com/repos/jargij/culinologie/stargazers","contributors_url":"https://api.github.com/repos/jargij/culinologie/contributors","subscribers_url":"https://api.github.com/repos/jargij/culinologie/subscribers","subscription_url":"https://api.github.com/repos/jargij/culinologie/subscription","commits_url":"https://api.github.com/repos/jargij/culinologie/commits{/sha}","git_commits_url":"https://api.github.com/repos/jargij/culinologie/git/commits{/sha}","comments_url":"https://api.github.com/repos/jargij/culinologie/comments{/number}","issue_comment_url":"https://api.github.com/repos/jargij/culinologie/issues/comments{/number}","contents_url":"https://api.github.com/repos/jargij/culinologie/contents/{+path}","compare_url":"https://api.github.com/repos/jargij/culinologie/compare/{base}...{head}","merges_url":"https://api.github.com/repos/jargij/culinologie/merges","archive_url":"https://api.github.com/repos/jargij/culinologie/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/jargij/culinologie/downloads","issues_url":"https://api.github.com/repos/jargij/culinologie/issues{/number}","pulls_url":"https://api.github.com/repos/jargij/culinologie/pulls{/number}","milestones_url":"https://api.github.com/repos/jargij/culinologie/milestones{/number}","notifications_url":"https://api.github.com/repos/jargij/culinologie/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/jargij/culinologie/labels{/name}","releases_url":"https://api.github.com/repos/jargij/culinologie/releases{/id}","deployments_url":"https://api.github.com/repos/jargij/culinologie/deployments","created_at":"2016-02-07T16:47:41Z","updated_at":"2016-02-07T16:47:42Z","pushed_at":"2016-04-12T15:34:17Z","git_url":"git://github.com/jargij/culinologie.git","ssh_url":"git@github.com:jargij/culinologie.git","clone_url":"https://github.com/jargij/culinologie.git","svn_url":"https://github.com/jargij/culinologie","homepage":"http://koken.metmathijs.nl/","size":1863,"stargazers_count":0,"watchers_count":0,"language":"PHP","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"mbernson:master","ref":"master","sha":"b8ac354f909a729a6ab0aabdba0170cdc1e94c2a","user":{"login":"mbernson","id":477710,"avatar_url":"https://avatars.githubusercontent.com/u/477710?v=3","gravatar_id":"","url":"https://api.github.com/users/mbernson","html_url":"https://github.com/mbernson","followers_url":"https://api.github.com/users/mbernson/followers","following_url":"https://api.github.com/users/mbernson/following{/other_user}","gists_url":"https://api.github.com/users/mbernson/gists{/gist_id}","starred_url":"https://api.github.com/users/mbernson/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mbernson/subscriptions","organizations_url":"https://api.github.com/users/mbernson/orgs","repos_url":"https://api.github.com/users/mbernson/repos","events_url":"https://api.github.com/users/mbernson/events{/privacy}","received_events_url":"https://api.github.com/users/mbernson/received_events","type":"User","site_admin":false},"repo":{"id":34847903,"name":"culinologie","full_name":"mbernson/culinologie","owner":{"login":"mbernson","id":477710,"avatar_url":"https://avatars.githubusercontent.com/u/477710?v=3","gravatar_id":"","url":"https://api.github.com/users/mbernson","html_url":"https://github.com/mbernson","followers_url":"https://api.github.com/users/mbernson/followers","following_url":"https://api.github.com/users/mbernson/following{/other_user}","gists_url":"https://api.github.com/users/mbernson/gists{/gist_id}","starred_url":"https://api.github.com/users/mbernson/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mbernson/subscriptions","organizations_url":"https://api.github.com/users/mbernson/orgs","repos_url":"https://api.github.com/users/mbernson/repos","events_url":"https://api.github.com/users/mbernson/events{/privacy}","received_events_url":"https://api.github.com/users/mbernson/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/mbernson/culinologie","description":"Laravel cookbook application","fork":false,"url":"https://api.github.com/repos/mbernson/culinologie","forks_url":"https://api.github.com/repos/mbernson/culinologie/forks","keys_url":"https://api.github.com/repos/mbernson/culinologie/keys{/key_id}","collaborators_url":"https://api.github.com/repos/mbernson/culinologie/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/mbernson/culinologie/teams","hooks_url":"https://api.github.com/repos/mbernson/culinologie/hooks","issue_events_url":"https://api.github.com/repos/mbernson/culinologie/issues/events{/number}","events_url":"https://api.github.com/repos/mbernson/culinologie/events","assignees_url":"https://api.github.com/repos/mbernson/culinologie/assignees{/user}","branches_url":"https://api.github.com/repos/mbernson/culinologie/branches{/branch}","tags_url":"https://api.github.com/repos/mbernson/culinologie/tags","blobs_url":"https://api.github.com/repos/mbernson/culinologie/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/mbernson/culinologie/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/mbernson/culinologie/git/refs{/sha}","trees_url":"https://api.github.com/repos/mbernson/culinologie/git/trees{/sha}","statuses_url":"https://api.github.com/repos/mbernson/culinologie/statuses/{sha}","languages_url":"https://api.github.com/repos/mbernson/culinologie/languages","stargazers_url":"https://api.github.com/repos/mbernson/culinologie/stargazers","contributors_url":"https://api.github.com/repos/mbernson/culinologie/contributors","subscribers_url":"https://api.github.com/repos/mbernson/culinologie/subscribers","subscription_url":"https://api.github.com/repos/mbernson/culinologie/subscription","commits_url":"https://api.github.com/repos/mbernson/culinologie/commits{/sha}","git_commits_url":"https://api.github.com/repos/mbernson/culinologie/git/commits{/sha}","comments_url":"https://api.github.com/repos/mbernson/culinologie/comments{/number}","issue_comment_url":"https://api.github.com/repos/mbernson/culinologie/issues/comments{/number}","contents_url":"https://api.github.com/repos/mbernson/culinologie/contents/{+path}","compare_url":"https://api.github.com/repos/mbernson/culinologie/compare/{base}...{head}","merges_url":"https://api.github.com/repos/mbernson/culinologie/merges","archive_url":"https://api.github.com/repos/mbernson/culinologie/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/mbernson/culinologie/downloads","issues_url":"https://api.github.com/repos/mbernson/culinologie/issues{/number}","pulls_url":"https://api.github.com/repos/mbernson/culinologie/pulls{/number}","milestones_url":"https://api.github.com/repos/mbernson/culinologie/milestones{/number}","notifications_url":"https://api.github.com/repos/mbernson/culinologie/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/mbernson/culinologie/labels{/name}","releases_url":"https://api.github.com/repos/mbernson/culinologie/releases{/id}","deployments_url":"https://api.github.com/repos/mbernson/culinologie/deployments","created_at":"2015-04-30T10:07:10Z","updated_at":"2016-02-07T17:52:37Z","pushed_at":"2016-04-12T15:34:17Z","git_url":"git://github.com/mbernson/culinologie.git","ssh_url":"git@github.com:mbernson/culinologie.git","clone_url":"https://github.com/mbernson/culinologie.git","svn_url":"https://github.com/mbernson/culinologie","homepage":"http://koken.metmathijs.nl/","size":1864,"stargazers_count":0,"watchers_count":0,"language":"PHP","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1,"mirror_url":null,"open_issues_count":1,"forks":1,"open_issues":1,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/mbernson/culinologie/pulls/4"},"html":{"href":"https://github.com/mbernson/culinologie/pull/4"},"issue":{"href":"https://api.github.com/repos/mbernson/culinologie/issues/4"},"comments":{"href":"https://api.github.com/repos/mbernson/culinologie/issues/4/comments"},"review_comments":{"href":"https://api.github.com/repos/mbernson/culinologie/pulls/4/comments"},"review_comment":{"href":"https://api.github.com/repos/mbernson/culinologie/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/mbernson/culinologie/pulls/4/commits"},"statuses":{"href":"https://api.github.com/repos/mbernson/culinologie/statuses/45bdc6eb32c493f89ad8ca4650bb26e943c1880c"}}}}