{"action":"created","comment":{"url":"https://api.github.com/repos/GPII/gpii-handlebars/pulls/comments/33667135","id":33667135,"diff_hunk":"@@ -0,0 +1,81 @@\n+// Handlebars helper to allow us to compare values used in presentation logic.\n+//\n+// This can be used to do things like add an extra CSS class to records whose status is \"deleted\".\n+//\n+// The helper can be accessed in your markup using syntax like:\n+//\n+// `{{#equals VARIABLE1 VARIABLE2 }}`\n+// `  The variables are equal.`\n+// `{{/equals}}`\n+//\n+// `{{#equals VARIABLE1 \"TEXT\" }}`\n+// `  The variable is equal to the text.`\n+// `{{#else}}`\n+// `  The variable is not equal to the text.`\n+// `{{/equals}}\n+//\n+// Note in the second example that `else` is supported if the condition is not matched, as with the built-in `{{#if}}` helper.\n+//\n+// Adapted from the approach outlined in this blog by \"bendog\":\n+// http://doginthehat.com.au/2012/02/comparison-block-helper-for-handlebars-templates/\n+//\n+\"use strict\";\n+var fluid = fluid || require(\"infusion\");\n+var gpii  = fluid.registerNamespace(\"gpii\");\n+fluid.registerNamespace(\"gpii.templates.helper.initBlock\");\n+\n+gpii.templates.helper.initBlock.getHelper = function (that) {\n+    return that.generateInitBlock;\n+};\n+\n+gpii.templates.helper.initBlock.generateInitBlock = function (that, gradeName) {\n+    if (!gradeName) {\n+        fluid.fail(\"You must call the 'initBlock' helper with a gradeName.\");\n+    }\n+    else {\n+        var options = fluid.copy(that.options.baseOptions);\n+        options.components.requireRenderer.options.components.pageComponent.type = gradeName;","path":"src/js/server/initblock.js","position":37,"original_position":37,"commit_id":"7aeeb523747d81fb8caadb5ff721fbde8f3cadcd","original_commit_id":"7aeeb523747d81fb8caadb5ff721fbde8f3cadcd","user":{"login":"amb26","id":561418,"avatar_url":"https://avatars.githubusercontent.com/u/561418?v=3","gravatar_id":"","url":"https://api.github.com/users/amb26","html_url":"https://github.com/amb26","followers_url":"https://api.github.com/users/amb26/followers","following_url":"https://api.github.com/users/amb26/following{/other_user}","gists_url":"https://api.github.com/users/amb26/gists{/gist_id}","starred_url":"https://api.github.com/users/amb26/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/amb26/subscriptions","organizations_url":"https://api.github.com/users/amb26/orgs","repos_url":"https://api.github.com/users/amb26/repos","events_url":"https://api.github.com/users/amb26/events{/privacy}","received_events_url":"https://api.github.com/users/amb26/received_events","type":"User","site_admin":false},"body":"var pageComponent = options.components.requireRenderer.options.components.pageComponent; to consolidate these long refs","created_at":"2015-07-01T10:43:40Z","updated_at":"2015-07-01T10:43:40Z","html_url":"https://github.com/GPII/gpii-handlebars/pull/10#discussion_r33667135","pull_request_url":"https://api.github.com/repos/GPII/gpii-handlebars/pulls/10","_links":{"self":{"href":"https://api.github.com/repos/GPII/gpii-handlebars/pulls/comments/33667135"},"html":{"href":"https://github.com/GPII/gpii-handlebars/pull/10#discussion_r33667135"},"pull_request":{"href":"https://api.github.com/repos/GPII/gpii-handlebars/pulls/10"}}},"pull_request":{"url":"https://api.github.com/repos/GPII/gpii-handlebars/pulls/10","id":38912525,"html_url":"https://github.com/GPII/gpii-handlebars/pull/10","diff_url":"https://github.com/GPII/gpii-handlebars/pull/10.diff","patch_url":"https://github.com/GPII/gpii-handlebars/pull/10.patch","issue_url":"https://api.github.com/repos/GPII/gpii-handlebars/issues/10","number":10,"state":"open","locked":false,"title":"GPII-1225: Create a server-side initBlock handlebars helper...","user":{"login":"the-t-in-rtf","id":5765222,"avatar_url":"https://avatars.githubusercontent.com/u/5765222?v=3","gravatar_id":"","url":"https://api.github.com/users/the-t-in-rtf","html_url":"https://github.com/the-t-in-rtf","followers_url":"https://api.github.com/users/the-t-in-rtf/followers","following_url":"https://api.github.com/users/the-t-in-rtf/following{/other_user}","gists_url":"https://api.github.com/users/the-t-in-rtf/gists{/gist_id}","starred_url":"https://api.github.com/users/the-t-in-rtf/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/the-t-in-rtf/subscriptions","organizations_url":"https://api.github.com/users/the-t-in-rtf/orgs","repos_url":"https://api.github.com/users/the-t-in-rtf/repos","events_url":"https://api.github.com/users/the-t-in-rtf/events{/privacy}","received_events_url":"https://api.github.com/users/the-t-in-rtf/received_events","type":"User","site_admin":false},"body":"See [GPII-1225](https://issues.gpii.net/browse/GPII-1225) for details.","created_at":"2015-06-30T19:02:00Z","updated_at":"2015-07-01T10:43:40Z","closed_at":null,"merged_at":null,"merge_commit_sha":"df384a4318879030ea0e641d617ed82d02d01bee","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/GPII/gpii-handlebars/pulls/10/commits","review_comments_url":"https://api.github.com/repos/GPII/gpii-handlebars/pulls/10/comments","review_comment_url":"https://api.github.com/repos/GPII/gpii-handlebars/pulls/comments{/number}","comments_url":"https://api.github.com/repos/GPII/gpii-handlebars/issues/10/comments","statuses_url":"https://api.github.com/repos/GPII/gpii-handlebars/statuses/7aeeb523747d81fb8caadb5ff721fbde8f3cadcd","head":{"label":"the-t-in-rtf:GPII-1225","ref":"GPII-1225","sha":"7aeeb523747d81fb8caadb5ff721fbde8f3cadcd","user":{"login":"the-t-in-rtf","id":5765222,"avatar_url":"https://avatars.githubusercontent.com/u/5765222?v=3","gravatar_id":"","url":"https://api.github.com/users/the-t-in-rtf","html_url":"https://github.com/the-t-in-rtf","followers_url":"https://api.github.com/users/the-t-in-rtf/followers","following_url":"https://api.github.com/users/the-t-in-rtf/following{/other_user}","gists_url":"https://api.github.com/users/the-t-in-rtf/gists{/gist_id}","starred_url":"https://api.github.com/users/the-t-in-rtf/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/the-t-in-rtf/subscriptions","organizations_url":"https://api.github.com/users/the-t-in-rtf/orgs","repos_url":"https://api.github.com/users/the-t-in-rtf/repos","events_url":"https://api.github.com/users/the-t-in-rtf/events{/privacy}","received_events_url":"https://api.github.com/users/the-t-in-rtf/received_events","type":"User","site_admin":false},"repo":{"id":30923199,"name":"gpii-handlebars","full_name":"the-t-in-rtf/gpii-handlebars","owner":{"login":"the-t-in-rtf","id":5765222,"avatar_url":"https://avatars.githubusercontent.com/u/5765222?v=3","gravatar_id":"","url":"https://api.github.com/users/the-t-in-rtf","html_url":"https://github.com/the-t-in-rtf","followers_url":"https://api.github.com/users/the-t-in-rtf/followers","following_url":"https://api.github.com/users/the-t-in-rtf/following{/other_user}","gists_url":"https://api.github.com/users/the-t-in-rtf/gists{/gist_id}","starred_url":"https://api.github.com/users/the-t-in-rtf/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/the-t-in-rtf/subscriptions","organizations_url":"https://api.github.com/users/the-t-in-rtf/orgs","repos_url":"https://api.github.com/users/the-t-in-rtf/repos","events_url":"https://api.github.com/users/the-t-in-rtf/events{/privacy}","received_events_url":"https://api.github.com/users/the-t-in-rtf/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/the-t-in-rtf/gpii-handlebars","description":"","fork":true,"url":"https://api.github.com/repos/the-t-in-rtf/gpii-handlebars","forks_url":"https://api.github.com/repos/the-t-in-rtf/gpii-handlebars/forks","keys_url":"https://api.github.com/repos/the-t-in-rtf/gpii-handlebars/keys{/key_id}","collaborators_url":"https://api.github.com/repos/the-t-in-rtf/gpii-handlebars/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/the-t-in-rtf/gpii-handlebars/teams","hooks_url":"https://api.github.com/repos/the-t-in-rtf/gpii-handlebars/hooks","issue_events_url":"https://api.github.com/repos/the-t-in-rtf/gpii-handlebars/issues/events{/number}","events_url":"https://api.github.com/repos/the-t-in-rtf/gpii-handlebars/events","assignees_url":"https://api.github.com/repos/the-t-in-rtf/gpii-handlebars/assignees{/user}","branches_url":"https://api.github.com/repos/the-t-in-rtf/gpii-handlebars/branches{/branch}","tags_url":"https://api.github.com/repos/the-t-in-rtf/gpii-handlebars/tags","blobs_url":"https://api.github.com/repos/the-t-in-rtf/gpii-handlebars/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/the-t-in-rtf/gpii-handlebars/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/the-t-in-rtf/gpii-handlebars/git/refs{/sha}","trees_url":"https://api.github.com/repos/the-t-in-rtf/gpii-handlebars/git/trees{/sha}","statuses_url":"https://api.github.com/repos/the-t-in-rtf/gpii-handlebars/statuses/{sha}","languages_url":"https://api.github.com/repos/the-t-in-rtf/gpii-handlebars/languages","stargazers_url":"https://api.github.com/repos/the-t-in-rtf/gpii-handlebars/stargazers","contributors_url":"https://api.github.com/repos/the-t-in-rtf/gpii-handlebars/contributors","subscribers_url":"https://api.github.com/repos/the-t-in-rtf/gpii-handlebars/subscribers","subscription_url":"https://api.github.com/repos/the-t-in-rtf/gpii-handlebars/subscription","commits_url":"https://api.github.com/repos/the-t-in-rtf/gpii-handlebars/commits{/sha}","git_commits_url":"https://api.github.com/repos/the-t-in-rtf/gpii-handlebars/git/commits{/sha}","comments_url":"https://api.github.com/repos/the-t-in-rtf/gpii-handlebars/comments{/number}","issue_comment_url":"https://api.github.com/repos/the-t-in-rtf/gpii-handlebars/issues/comments{/number}","contents_url":"https://api.github.com/repos/the-t-in-rtf/gpii-handlebars/contents/{+path}","compare_url":"https://api.github.com/repos/the-t-in-rtf/gpii-handlebars/compare/{base}...{head}","merges_url":"https://api.github.com/repos/the-t-in-rtf/gpii-handlebars/merges","archive_url":"https://api.github.com/repos/the-t-in-rtf/gpii-handlebars/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/the-t-in-rtf/gpii-handlebars/downloads","issues_url":"https://api.github.com/repos/the-t-in-rtf/gpii-handlebars/issues{/number}","pulls_url":"https://api.github.com/repos/the-t-in-rtf/gpii-handlebars/pulls{/number}","milestones_url":"https://api.github.com/repos/the-t-in-rtf/gpii-handlebars/milestones{/number}","notifications_url":"https://api.github.com/repos/the-t-in-rtf/gpii-handlebars/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/the-t-in-rtf/gpii-handlebars/labels{/name}","releases_url":"https://api.github.com/repos/the-t-in-rtf/gpii-handlebars/releases{/id}","created_at":"2015-02-17T15:32:14Z","updated_at":"2015-03-03T13:14:56Z","pushed_at":"2015-06-30T18:55:51Z","git_url":"git://github.com/the-t-in-rtf/gpii-handlebars.git","ssh_url":"git@github.com:the-t-in-rtf/gpii-handlebars.git","clone_url":"https://github.com/the-t-in-rtf/gpii-handlebars.git","svn_url":"https://github.com/the-t-in-rtf/gpii-handlebars","homepage":null,"size":392,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","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":"GPII:master","ref":"master","sha":"cca04af6b6ca187992373dcd454fad820f24ba4a","user":{"login":"GPII","id":1343050,"avatar_url":"https://avatars.githubusercontent.com/u/1343050?v=3","gravatar_id":"","url":"https://api.github.com/users/GPII","html_url":"https://github.com/GPII","followers_url":"https://api.github.com/users/GPII/followers","following_url":"https://api.github.com/users/GPII/following{/other_user}","gists_url":"https://api.github.com/users/GPII/gists{/gist_id}","starred_url":"https://api.github.com/users/GPII/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/GPII/subscriptions","organizations_url":"https://api.github.com/users/GPII/orgs","repos_url":"https://api.github.com/users/GPII/repos","events_url":"https://api.github.com/users/GPII/events{/privacy}","received_events_url":"https://api.github.com/users/GPII/received_events","type":"Organization","site_admin":false},"repo":{"id":30920744,"name":"gpii-handlebars","full_name":"GPII/gpii-handlebars","owner":{"login":"GPII","id":1343050,"avatar_url":"https://avatars.githubusercontent.com/u/1343050?v=3","gravatar_id":"","url":"https://api.github.com/users/GPII","html_url":"https://github.com/GPII","followers_url":"https://api.github.com/users/GPII/followers","following_url":"https://api.github.com/users/GPII/following{/other_user}","gists_url":"https://api.github.com/users/GPII/gists{/gist_id}","starred_url":"https://api.github.com/users/GPII/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/GPII/subscriptions","organizations_url":"https://api.github.com/users/GPII/orgs","repos_url":"https://api.github.com/users/GPII/repos","events_url":"https://api.github.com/users/GPII/events{/privacy}","received_events_url":"https://api.github.com/users/GPII/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/GPII/gpii-handlebars","description":"","fork":false,"url":"https://api.github.com/repos/GPII/gpii-handlebars","forks_url":"https://api.github.com/repos/GPII/gpii-handlebars/forks","keys_url":"https://api.github.com/repos/GPII/gpii-handlebars/keys{/key_id}","collaborators_url":"https://api.github.com/repos/GPII/gpii-handlebars/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/GPII/gpii-handlebars/teams","hooks_url":"https://api.github.com/repos/GPII/gpii-handlebars/hooks","issue_events_url":"https://api.github.com/repos/GPII/gpii-handlebars/issues/events{/number}","events_url":"https://api.github.com/repos/GPII/gpii-handlebars/events","assignees_url":"https://api.github.com/repos/GPII/gpii-handlebars/assignees{/user}","branches_url":"https://api.github.com/repos/GPII/gpii-handlebars/branches{/branch}","tags_url":"https://api.github.com/repos/GPII/gpii-handlebars/tags","blobs_url":"https://api.github.com/repos/GPII/gpii-handlebars/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/GPII/gpii-handlebars/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/GPII/gpii-handlebars/git/refs{/sha}","trees_url":"https://api.github.com/repos/GPII/gpii-handlebars/git/trees{/sha}","statuses_url":"https://api.github.com/repos/GPII/gpii-handlebars/statuses/{sha}","languages_url":"https://api.github.com/repos/GPII/gpii-handlebars/languages","stargazers_url":"https://api.github.com/repos/GPII/gpii-handlebars/stargazers","contributors_url":"https://api.github.com/repos/GPII/gpii-handlebars/contributors","subscribers_url":"https://api.github.com/repos/GPII/gpii-handlebars/subscribers","subscription_url":"https://api.github.com/repos/GPII/gpii-handlebars/subscription","commits_url":"https://api.github.com/repos/GPII/gpii-handlebars/commits{/sha}","git_commits_url":"https://api.github.com/repos/GPII/gpii-handlebars/git/commits{/sha}","comments_url":"https://api.github.com/repos/GPII/gpii-handlebars/comments{/number}","issue_comment_url":"https://api.github.com/repos/GPII/gpii-handlebars/issues/comments{/number}","contents_url":"https://api.github.com/repos/GPII/gpii-handlebars/contents/{+path}","compare_url":"https://api.github.com/repos/GPII/gpii-handlebars/compare/{base}...{head}","merges_url":"https://api.github.com/repos/GPII/gpii-handlebars/merges","archive_url":"https://api.github.com/repos/GPII/gpii-handlebars/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/GPII/gpii-handlebars/downloads","issues_url":"https://api.github.com/repos/GPII/gpii-handlebars/issues{/number}","pulls_url":"https://api.github.com/repos/GPII/gpii-handlebars/pulls{/number}","milestones_url":"https://api.github.com/repos/GPII/gpii-handlebars/milestones{/number}","notifications_url":"https://api.github.com/repos/GPII/gpii-handlebars/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/GPII/gpii-handlebars/labels{/name}","releases_url":"https://api.github.com/repos/GPII/gpii-handlebars/releases{/id}","created_at":"2015-02-17T14:35:56Z","updated_at":"2015-05-18T16:03:06Z","pushed_at":"2015-06-30T19:02:01Z","git_url":"git://github.com/GPII/gpii-handlebars.git","ssh_url":"git@github.com:GPII/gpii-handlebars.git","clone_url":"https://github.com/GPII/gpii-handlebars.git","svn_url":"https://github.com/GPII/gpii-handlebars","homepage":null,"size":423,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1,"mirror_url":null,"open_issues_count":4,"forks":1,"open_issues":4,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/GPII/gpii-handlebars/pulls/10"},"html":{"href":"https://github.com/GPII/gpii-handlebars/pull/10"},"issue":{"href":"https://api.github.com/repos/GPII/gpii-handlebars/issues/10"},"comments":{"href":"https://api.github.com/repos/GPII/gpii-handlebars/issues/10/comments"},"review_comments":{"href":"https://api.github.com/repos/GPII/gpii-handlebars/pulls/10/comments"},"review_comment":{"href":"https://api.github.com/repos/GPII/gpii-handlebars/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/GPII/gpii-handlebars/pulls/10/commits"},"statuses":{"href":"https://api.github.com/repos/GPII/gpii-handlebars/statuses/7aeeb523747d81fb8caadb5ff721fbde8f3cadcd"}}}}