{"action":"created","comment":{"url":"https://api.github.com/repos/guardian/frontend/pulls/comments/63379543","id":63379543,"diff_hunk":"@@ -1,49 +1,37 @@\n @(item: model.ContentType, isAmp: Boolean = false)(implicit request: RequestHeader)\n \n+\n @import common.{LinkTo, Localisation}\n @import conf.switches.Switches._\n+@import model.Badges.badgeFor\n \n-@defining(\n-    USElectionSwitch.isSwitchedOn &&\n-    item.content.tags.tags.exists(_.id == \"us-news/us-elections-2016\"),\n-    AUSElectionSwitch.isSwitchedOn &&\n-    item.content.tags.tags.exists(_.id == \"australia-news/australian-election-2016\")\n-){ case (isUSElection, isAUSElection) =>\n-    <div class=\"content__labels @if(isUSElection) {content__labels--us-election} @if(item.content.showNewGalleryDesign) {content__labels--gallery}\">\n-        @if(isUSElection) {\n-            <div class=\"badge-slot badge-slot--us-election\">\n-                @if(isAmp) {\n-                    <amp-img class=\"badge-slot__img\" src=\"@Configuration.static.path/sys-images/Guardian/Pix/pictures/2016/2/2/1454424596176/USElectionlogooffset.png\" layout=\"fixed\" height=\"33\" width=\"33\"></amp-img>\n-                } else {\n-                    <img class=\"badge-slot__img\" src=\"@Configuration.static.path/sys-images/Guardian/Pix/pictures/2016/2/2/1454424596176/USElectionlogooffset.png\"/>\n-                }\n-            </div>\n-        }\n+<div class=\"content__labels @if(item.content.tags.isUSElection) {content__labels--us-election} @if(item.content.tags.isAusElection) {content__labels--aus-election} @if(item.content.showNewGalleryDesign) {content__labels--gallery}\">\n+    @if(USElectionSwitch.isSwitchedOn || AUSElectionSwitch.isSwitchedOn) {\n \n-        @if(isAUSElection) {\n-            <div class=\"badge-slot badge-slot--us-election\">\n+        @badgeFor(item).map { badge =>\n+            <div class=\"badge-slot badge-slot--election\">\n                 @if(isAmp) {\n-                    <amp-img class=\"badge-slot__img\" src=\"@Static(\"images/AUSElectionBadge.png\")\" layout=\"fixed\" height=\"33\" width=\"33\"></amp-img>\n+                    <amp-img class=\"badge-slot__img\" src=\"@badge.imageUrl\" layout=\"fixed\" height=\"33\" width=\"33\"></amp-img>","path":"common/app/views/fragments/meta/metaInline.scala.html","position":33,"original_position":33,"commit_id":"06c6a2db930721ab0695b91f4c459f7d64c1fc36","original_commit_id":"06c6a2db930721ab0695b91f4c459f7d64c1fc36","user":{"login":"janua","id":445472,"avatar_url":"https://avatars.githubusercontent.com/u/445472?v=3","gravatar_id":"","url":"https://api.github.com/users/janua","html_url":"https://github.com/janua","followers_url":"https://api.github.com/users/janua/followers","following_url":"https://api.github.com/users/janua/following{/other_user}","gists_url":"https://api.github.com/users/janua/gists{/gist_id}","starred_url":"https://api.github.com/users/janua/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/janua/subscriptions","organizations_url":"https://api.github.com/users/janua/orgs","repos_url":"https://api.github.com/users/janua/repos","events_url":"https://api.github.com/users/janua/events{/privacy}","received_events_url":"https://api.github.com/users/janua/received_events","type":"User","site_admin":false},"body":"Why move the `Static` to `Badge` when you could just leave it here?","created_at":"2016-05-16T16:15:01Z","updated_at":"2016-05-16T16:15:01Z","html_url":"https://github.com/guardian/frontend/pull/12862#discussion_r63379543","pull_request_url":"https://api.github.com/repos/guardian/frontend/pulls/12862","_links":{"self":{"href":"https://api.github.com/repos/guardian/frontend/pulls/comments/63379543"},"html":{"href":"https://github.com/guardian/frontend/pull/12862#discussion_r63379543"},"pull_request":{"href":"https://api.github.com/repos/guardian/frontend/pulls/12862"}}},"pull_request":{"url":"https://api.github.com/repos/guardian/frontend/pulls/12862","id":69685029,"html_url":"https://github.com/guardian/frontend/pull/12862","diff_url":"https://github.com/guardian/frontend/pull/12862.diff","patch_url":"https://github.com/guardian/frontend/pull/12862.patch","issue_url":"https://api.github.com/repos/guardian/frontend/issues/12862","number":12862,"state":"open","locked":false,"title":"Aus live blog background","user":{"login":"blongden73","id":11950919,"avatar_url":"https://avatars.githubusercontent.com/u/11950919?v=3","gravatar_id":"","url":"https://api.github.com/users/blongden73","html_url":"https://github.com/blongden73","followers_url":"https://api.github.com/users/blongden73/followers","following_url":"https://api.github.com/users/blongden73/following{/other_user}","gists_url":"https://api.github.com/users/blongden73/gists{/gist_id}","starred_url":"https://api.github.com/users/blongden73/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/blongden73/subscriptions","organizations_url":"https://api.github.com/users/blongden73/orgs","repos_url":"https://api.github.com/users/blongden73/repos","events_url":"https://api.github.com/users/blongden73/events{/privacy}","received_events_url":"https://api.github.com/users/blongden73/received_events","type":"User","site_admin":false},"body":"Adds the background to the live blog when the tag is australia election this is for both live and deadblogs.\r\nAlso makes the logo specific to the aus election rather than using the css for the us election. \r\n\r\nRequest feedback\r\n@NataliaLKB @rich-nguyen \r\n","created_at":"2016-05-11T14:47:14Z","updated_at":"2016-05-16T16:15:01Z","closed_at":null,"merged_at":null,"merge_commit_sha":"191a877fbb1b5cfe18d0e339c77460ace2177184","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/guardian/frontend/pulls/12862/commits","review_comments_url":"https://api.github.com/repos/guardian/frontend/pulls/12862/comments","review_comment_url":"https://api.github.com/repos/guardian/frontend/pulls/comments{/number}","comments_url":"https://api.github.com/repos/guardian/frontend/issues/12862/comments","statuses_url":"https://api.github.com/repos/guardian/frontend/statuses/06c6a2db930721ab0695b91f4c459f7d64c1fc36","head":{"label":"guardian:aus-live-blog-background","ref":"aus-live-blog-background","sha":"06c6a2db930721ab0695b91f4c459f7d64c1fc36","user":{"login":"guardian","id":164318,"avatar_url":"https://avatars.githubusercontent.com/u/164318?v=3","gravatar_id":"","url":"https://api.github.com/users/guardian","html_url":"https://github.com/guardian","followers_url":"https://api.github.com/users/guardian/followers","following_url":"https://api.github.com/users/guardian/following{/other_user}","gists_url":"https://api.github.com/users/guardian/gists{/gist_id}","starred_url":"https://api.github.com/users/guardian/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/guardian/subscriptions","organizations_url":"https://api.github.com/users/guardian/orgs","repos_url":"https://api.github.com/users/guardian/repos","events_url":"https://api.github.com/users/guardian/events{/privacy}","received_events_url":"https://api.github.com/users/guardian/received_events","type":"Organization","site_admin":false},"repo":{"id":4370755,"name":"frontend","full_name":"guardian/frontend","owner":{"login":"guardian","id":164318,"avatar_url":"https://avatars.githubusercontent.com/u/164318?v=3","gravatar_id":"","url":"https://api.github.com/users/guardian","html_url":"https://github.com/guardian","followers_url":"https://api.github.com/users/guardian/followers","following_url":"https://api.github.com/users/guardian/following{/other_user}","gists_url":"https://api.github.com/users/guardian/gists{/gist_id}","starred_url":"https://api.github.com/users/guardian/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/guardian/subscriptions","organizations_url":"https://api.github.com/users/guardian/orgs","repos_url":"https://api.github.com/users/guardian/repos","events_url":"https://api.github.com/users/guardian/events{/privacy}","received_events_url":"https://api.github.com/users/guardian/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/guardian/frontend","description":"Source for theguardian.com","fork":false,"url":"https://api.github.com/repos/guardian/frontend","forks_url":"https://api.github.com/repos/guardian/frontend/forks","keys_url":"https://api.github.com/repos/guardian/frontend/keys{/key_id}","collaborators_url":"https://api.github.com/repos/guardian/frontend/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/guardian/frontend/teams","hooks_url":"https://api.github.com/repos/guardian/frontend/hooks","issue_events_url":"https://api.github.com/repos/guardian/frontend/issues/events{/number}","events_url":"https://api.github.com/repos/guardian/frontend/events","assignees_url":"https://api.github.com/repos/guardian/frontend/assignees{/user}","branches_url":"https://api.github.com/repos/guardian/frontend/branches{/branch}","tags_url":"https://api.github.com/repos/guardian/frontend/tags","blobs_url":"https://api.github.com/repos/guardian/frontend/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/guardian/frontend/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/guardian/frontend/git/refs{/sha}","trees_url":"https://api.github.com/repos/guardian/frontend/git/trees{/sha}","statuses_url":"https://api.github.com/repos/guardian/frontend/statuses/{sha}","languages_url":"https://api.github.com/repos/guardian/frontend/languages","stargazers_url":"https://api.github.com/repos/guardian/frontend/stargazers","contributors_url":"https://api.github.com/repos/guardian/frontend/contributors","subscribers_url":"https://api.github.com/repos/guardian/frontend/subscribers","subscription_url":"https://api.github.com/repos/guardian/frontend/subscription","commits_url":"https://api.github.com/repos/guardian/frontend/commits{/sha}","git_commits_url":"https://api.github.com/repos/guardian/frontend/git/commits{/sha}","comments_url":"https://api.github.com/repos/guardian/frontend/comments{/number}","issue_comment_url":"https://api.github.com/repos/guardian/frontend/issues/comments{/number}","contents_url":"https://api.github.com/repos/guardian/frontend/contents/{+path}","compare_url":"https://api.github.com/repos/guardian/frontend/compare/{base}...{head}","merges_url":"https://api.github.com/repos/guardian/frontend/merges","archive_url":"https://api.github.com/repos/guardian/frontend/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/guardian/frontend/downloads","issues_url":"https://api.github.com/repos/guardian/frontend/issues{/number}","pulls_url":"https://api.github.com/repos/guardian/frontend/pulls{/number}","milestones_url":"https://api.github.com/repos/guardian/frontend/milestones{/number}","notifications_url":"https://api.github.com/repos/guardian/frontend/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/guardian/frontend/labels{/name}","releases_url":"https://api.github.com/repos/guardian/frontend/releases{/id}","deployments_url":"https://api.github.com/repos/guardian/frontend/deployments","created_at":"2012-05-18T15:39:15Z","updated_at":"2016-05-16T13:34:21Z","pushed_at":"2016-05-16T16:07:03Z","git_url":"git://github.com/guardian/frontend.git","ssh_url":"git@github.com:guardian/frontend.git","clone_url":"https://github.com/guardian/frontend.git","svn_url":"https://github.com/guardian/frontend","homepage":"http://www.theguardian.com","size":472929,"stargazers_count":3199,"watchers_count":3199,"language":"HTML","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":334,"mirror_url":null,"open_issues_count":51,"forks":334,"open_issues":51,"watchers":3199,"default_branch":"master"}},"base":{"label":"guardian:master","ref":"master","sha":"5cef273481c68fe26870a514f502314e05ef6c3b","user":{"login":"guardian","id":164318,"avatar_url":"https://avatars.githubusercontent.com/u/164318?v=3","gravatar_id":"","url":"https://api.github.com/users/guardian","html_url":"https://github.com/guardian","followers_url":"https://api.github.com/users/guardian/followers","following_url":"https://api.github.com/users/guardian/following{/other_user}","gists_url":"https://api.github.com/users/guardian/gists{/gist_id}","starred_url":"https://api.github.com/users/guardian/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/guardian/subscriptions","organizations_url":"https://api.github.com/users/guardian/orgs","repos_url":"https://api.github.com/users/guardian/repos","events_url":"https://api.github.com/users/guardian/events{/privacy}","received_events_url":"https://api.github.com/users/guardian/received_events","type":"Organization","site_admin":false},"repo":{"id":4370755,"name":"frontend","full_name":"guardian/frontend","owner":{"login":"guardian","id":164318,"avatar_url":"https://avatars.githubusercontent.com/u/164318?v=3","gravatar_id":"","url":"https://api.github.com/users/guardian","html_url":"https://github.com/guardian","followers_url":"https://api.github.com/users/guardian/followers","following_url":"https://api.github.com/users/guardian/following{/other_user}","gists_url":"https://api.github.com/users/guardian/gists{/gist_id}","starred_url":"https://api.github.com/users/guardian/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/guardian/subscriptions","organizations_url":"https://api.github.com/users/guardian/orgs","repos_url":"https://api.github.com/users/guardian/repos","events_url":"https://api.github.com/users/guardian/events{/privacy}","received_events_url":"https://api.github.com/users/guardian/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/guardian/frontend","description":"Source for theguardian.com","fork":false,"url":"https://api.github.com/repos/guardian/frontend","forks_url":"https://api.github.com/repos/guardian/frontend/forks","keys_url":"https://api.github.com/repos/guardian/frontend/keys{/key_id}","collaborators_url":"https://api.github.com/repos/guardian/frontend/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/guardian/frontend/teams","hooks_url":"https://api.github.com/repos/guardian/frontend/hooks","issue_events_url":"https://api.github.com/repos/guardian/frontend/issues/events{/number}","events_url":"https://api.github.com/repos/guardian/frontend/events","assignees_url":"https://api.github.com/repos/guardian/frontend/assignees{/user}","branches_url":"https://api.github.com/repos/guardian/frontend/branches{/branch}","tags_url":"https://api.github.com/repos/guardian/frontend/tags","blobs_url":"https://api.github.com/repos/guardian/frontend/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/guardian/frontend/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/guardian/frontend/git/refs{/sha}","trees_url":"https://api.github.com/repos/guardian/frontend/git/trees{/sha}","statuses_url":"https://api.github.com/repos/guardian/frontend/statuses/{sha}","languages_url":"https://api.github.com/repos/guardian/frontend/languages","stargazers_url":"https://api.github.com/repos/guardian/frontend/stargazers","contributors_url":"https://api.github.com/repos/guardian/frontend/contributors","subscribers_url":"https://api.github.com/repos/guardian/frontend/subscribers","subscription_url":"https://api.github.com/repos/guardian/frontend/subscription","commits_url":"https://api.github.com/repos/guardian/frontend/commits{/sha}","git_commits_url":"https://api.github.com/repos/guardian/frontend/git/commits{/sha}","comments_url":"https://api.github.com/repos/guardian/frontend/comments{/number}","issue_comment_url":"https://api.github.com/repos/guardian/frontend/issues/comments{/number}","contents_url":"https://api.github.com/repos/guardian/frontend/contents/{+path}","compare_url":"https://api.github.com/repos/guardian/frontend/compare/{base}...{head}","merges_url":"https://api.github.com/repos/guardian/frontend/merges","archive_url":"https://api.github.com/repos/guardian/frontend/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/guardian/frontend/downloads","issues_url":"https://api.github.com/repos/guardian/frontend/issues{/number}","pulls_url":"https://api.github.com/repos/guardian/frontend/pulls{/number}","milestones_url":"https://api.github.com/repos/guardian/frontend/milestones{/number}","notifications_url":"https://api.github.com/repos/guardian/frontend/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/guardian/frontend/labels{/name}","releases_url":"https://api.github.com/repos/guardian/frontend/releases{/id}","deployments_url":"https://api.github.com/repos/guardian/frontend/deployments","created_at":"2012-05-18T15:39:15Z","updated_at":"2016-05-16T13:34:21Z","pushed_at":"2016-05-16T16:07:03Z","git_url":"git://github.com/guardian/frontend.git","ssh_url":"git@github.com:guardian/frontend.git","clone_url":"https://github.com/guardian/frontend.git","svn_url":"https://github.com/guardian/frontend","homepage":"http://www.theguardian.com","size":472929,"stargazers_count":3199,"watchers_count":3199,"language":"HTML","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":334,"mirror_url":null,"open_issues_count":51,"forks":334,"open_issues":51,"watchers":3199,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/guardian/frontend/pulls/12862"},"html":{"href":"https://github.com/guardian/frontend/pull/12862"},"issue":{"href":"https://api.github.com/repos/guardian/frontend/issues/12862"},"comments":{"href":"https://api.github.com/repos/guardian/frontend/issues/12862/comments"},"review_comments":{"href":"https://api.github.com/repos/guardian/frontend/pulls/12862/comments"},"review_comment":{"href":"https://api.github.com/repos/guardian/frontend/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/guardian/frontend/pulls/12862/commits"},"statuses":{"href":"https://api.github.com/repos/guardian/frontend/statuses/06c6a2db930721ab0695b91f4c459f7d64c1fc36"}}}}