{"action":"created","comment":{"url":"https://api.github.com/repos/BinaryStudioAcademy/bsa-2016-forum/pulls/comments/77509217","id":77509217,"diff_hunk":"@@ -1,5 +1,142 @@\n+var Backbone = require('backbone');\n var Marionette = require('backbone.marionette');\n+var Radio = require('backbone.radio');\n+var moment = require('moment');\n+\n+var DateHelper = require('../../helpers/dateHelper.js');\n+\n+var currentUser = require('../../initializers/currentUser');\n+\n+var CreateVoteItemCollection = require('./CreateVoteItemCollection');\n+var userCollectionView = require('../users/userCollection');\n+\n \n module.exports = Marionette.LayoutView.extend({\n-    template: 'voteCreateLayout'\n+    className: 'well',\n+    template: 'voteCreateLayout',\n+    regions: {\n+        answers: '#vote-answers',\n+        voteAcessedUsers: '#vote-access-users',\n+        voteNotAccessedUsers: '#vote-new-addUsers'\n+    },\n+    ui: {\n+        add: '#addAnswer',\n+        start: '#start',\n+        title: '#question-title',\n+        errors: '.js-errors',\n+        tags: '#tags',\n+        isPublic: 'input[name=access]:checked',\n+        finished: '#finished',\n+        dateerrors: '.js-date-errors',\n+        isSingle: 'input[name=isSingle]:checked',\n+        all: '*'\n+    },\n+    modelEvents: {\n+        'invalid': function (model, errors) {\n+            this.ui.errors.empty();\n+            var self = this;\n+            $.each(errors, function (key, error) {","path":"resources/assets/js/app/views/votes/CreateVote.js","position":39,"original_position":39,"commit_id":"60399ed6d96ceae52f70a1f68344c5f8fb58b169","original_commit_id":"60399ed6d96ceae52f70a1f68344c5f8fb58b169","user":{"login":"TatsuUkraine","id":621542,"avatar_url":"https://avatars.githubusercontent.com/u/621542?v=3","gravatar_id":"","url":"https://api.github.com/users/TatsuUkraine","html_url":"https://github.com/TatsuUkraine","followers_url":"https://api.github.com/users/TatsuUkraine/followers","following_url":"https://api.github.com/users/TatsuUkraine/following{/other_user}","gists_url":"https://api.github.com/users/TatsuUkraine/gists{/gist_id}","starred_url":"https://api.github.com/users/TatsuUkraine/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/TatsuUkraine/subscriptions","organizations_url":"https://api.github.com/users/TatsuUkraine/orgs","repos_url":"https://api.github.com/users/TatsuUkraine/repos","events_url":"https://api.github.com/users/TatsuUkraine/events{/privacy}","received_events_url":"https://api.github.com/users/TatsuUkraine/received_events","type":"User","site_admin":false},"body":"use underscore _.each method","created_at":"2016-09-05T11:36:59Z","updated_at":"2016-09-05T11:36:59Z","html_url":"https://github.com/BinaryStudioAcademy/bsa-2016-forum/pull/247#discussion_r77509217","pull_request_url":"https://api.github.com/repos/BinaryStudioAcademy/bsa-2016-forum/pulls/247","_links":{"self":{"href":"https://api.github.com/repos/BinaryStudioAcademy/bsa-2016-forum/pulls/comments/77509217"},"html":{"href":"https://github.com/BinaryStudioAcademy/bsa-2016-forum/pull/247#discussion_r77509217"},"pull_request":{"href":"https://api.github.com/repos/BinaryStudioAcademy/bsa-2016-forum/pulls/247"}}},"pull_request":{"url":"https://api.github.com/repos/BinaryStudioAcademy/bsa-2016-forum/pulls/247","id":83920297,"html_url":"https://github.com/BinaryStudioAcademy/bsa-2016-forum/pull/247","diff_url":"https://github.com/BinaryStudioAcademy/bsa-2016-forum/pull/247.diff","patch_url":"https://github.com/BinaryStudioAcademy/bsa-2016-forum/pull/247.patch","issue_url":"https://api.github.com/repos/BinaryStudioAcademy/bsa-2016-forum/issues/247","number":247,"state":"open","locked":false,"title":"Os/feature create vote","user":{"login":"JIamep20","id":20907048,"avatar_url":"https://avatars.githubusercontent.com/u/20907048?v=3","gravatar_id":"","url":"https://api.github.com/users/JIamep20","html_url":"https://github.com/JIamep20","followers_url":"https://api.github.com/users/JIamep20/followers","following_url":"https://api.github.com/users/JIamep20/following{/other_user}","gists_url":"https://api.github.com/users/JIamep20/gists{/gist_id}","starred_url":"https://api.github.com/users/JIamep20/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/JIamep20/subscriptions","organizations_url":"https://api.github.com/users/JIamep20/orgs","repos_url":"https://api.github.com/users/JIamep20/repos","events_url":"https://api.github.com/users/JIamep20/events{/privacy}","received_events_url":"https://api.github.com/users/JIamep20/received_events","type":"User","site_admin":false},"body":"","created_at":"2016-09-04T11:31:29Z","updated_at":"2016-09-05T11:36:59Z","closed_at":null,"merged_at":null,"merge_commit_sha":"791c209562b6d63788e9dc1c915706d93c03047e","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/BinaryStudioAcademy/bsa-2016-forum/pulls/247/commits","review_comments_url":"https://api.github.com/repos/BinaryStudioAcademy/bsa-2016-forum/pulls/247/comments","review_comment_url":"https://api.github.com/repos/BinaryStudioAcademy/bsa-2016-forum/pulls/comments{/number}","comments_url":"https://api.github.com/repos/BinaryStudioAcademy/bsa-2016-forum/issues/247/comments","statuses_url":"https://api.github.com/repos/BinaryStudioAcademy/bsa-2016-forum/statuses/60399ed6d96ceae52f70a1f68344c5f8fb58b169","head":{"label":"BinaryStudioAcademy:os/featureCreateVote","ref":"os/featureCreateVote","sha":"60399ed6d96ceae52f70a1f68344c5f8fb58b169","user":{"login":"BinaryStudioAcademy","id":13114349,"avatar_url":"https://avatars.githubusercontent.com/u/13114349?v=3","gravatar_id":"","url":"https://api.github.com/users/BinaryStudioAcademy","html_url":"https://github.com/BinaryStudioAcademy","followers_url":"https://api.github.com/users/BinaryStudioAcademy/followers","following_url":"https://api.github.com/users/BinaryStudioAcademy/following{/other_user}","gists_url":"https://api.github.com/users/BinaryStudioAcademy/gists{/gist_id}","starred_url":"https://api.github.com/users/BinaryStudioAcademy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/BinaryStudioAcademy/subscriptions","organizations_url":"https://api.github.com/users/BinaryStudioAcademy/orgs","repos_url":"https://api.github.com/users/BinaryStudioAcademy/repos","events_url":"https://api.github.com/users/BinaryStudioAcademy/events{/privacy}","received_events_url":"https://api.github.com/users/BinaryStudioAcademy/received_events","type":"Organization","site_admin":false},"repo":{"id":65197608,"name":"bsa-2016-forum","full_name":"BinaryStudioAcademy/bsa-2016-forum","owner":{"login":"BinaryStudioAcademy","id":13114349,"avatar_url":"https://avatars.githubusercontent.com/u/13114349?v=3","gravatar_id":"","url":"https://api.github.com/users/BinaryStudioAcademy","html_url":"https://github.com/BinaryStudioAcademy","followers_url":"https://api.github.com/users/BinaryStudioAcademy/followers","following_url":"https://api.github.com/users/BinaryStudioAcademy/following{/other_user}","gists_url":"https://api.github.com/users/BinaryStudioAcademy/gists{/gist_id}","starred_url":"https://api.github.com/users/BinaryStudioAcademy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/BinaryStudioAcademy/subscriptions","organizations_url":"https://api.github.com/users/BinaryStudioAcademy/orgs","repos_url":"https://api.github.com/users/BinaryStudioAcademy/repos","events_url":"https://api.github.com/users/BinaryStudioAcademy/events{/privacy}","received_events_url":"https://api.github.com/users/BinaryStudioAcademy/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/BinaryStudioAcademy/bsa-2016-forum","description":"BSA 2016 PHP Forum project","fork":false,"url":"https://api.github.com/repos/BinaryStudioAcademy/bsa-2016-forum","forks_url":"https://api.github.com/repos/BinaryStudioAcademy/bsa-2016-forum/forks","keys_url":"https://api.github.com/repos/BinaryStudioAcademy/bsa-2016-forum/keys{/key_id}","collaborators_url":"https://api.github.com/repos/BinaryStudioAcademy/bsa-2016-forum/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/BinaryStudioAcademy/bsa-2016-forum/teams","hooks_url":"https://api.github.com/repos/BinaryStudioAcademy/bsa-2016-forum/hooks","issue_events_url":"https://api.github.com/repos/BinaryStudioAcademy/bsa-2016-forum/issues/events{/number}","events_url":"https://api.github.com/repos/BinaryStudioAcademy/bsa-2016-forum/events","assignees_url":"https://api.github.com/repos/BinaryStudioAcademy/bsa-2016-forum/assignees{/user}","branches_url":"https://api.github.com/repos/BinaryStudioAcademy/bsa-2016-forum/branches{/branch}","tags_url":"https://api.github.com/repos/BinaryStudioAcademy/bsa-2016-forum/tags","blobs_url":"https://api.github.com/repos/BinaryStudioAcademy/bsa-2016-forum/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/BinaryStudioAcademy/bsa-2016-forum/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/BinaryStudioAcademy/bsa-2016-forum/git/refs{/sha}","trees_url":"https://api.github.com/repos/BinaryStudioAcademy/bsa-2016-forum/git/trees{/sha}","statuses_url":"https://api.github.com/repos/BinaryStudioAcademy/bsa-2016-forum/statuses/{sha}","languages_url":"https://api.github.com/repos/BinaryStudioAcademy/bsa-2016-forum/languages","stargazers_url":"https://api.github.com/repos/BinaryStudioAcademy/bsa-2016-forum/stargazers","contributors_url":"https://api.github.com/repos/BinaryStudioAcademy/bsa-2016-forum/contributors","subscribers_url":"https://api.github.com/repos/BinaryStudioAcademy/bsa-2016-forum/subscribers","subscription_url":"https://api.github.com/repos/BinaryStudioAcademy/bsa-2016-forum/subscription","commits_url":"https://api.github.com/repos/BinaryStudioAcademy/bsa-2016-forum/commits{/sha}","git_commits_url":"https://api.github.com/repos/BinaryStudioAcademy/bsa-2016-forum/git/commits{/sha}","comments_url":"https://api.github.com/repos/BinaryStudioAcademy/bsa-2016-forum/comments{/number}","issue_comment_url":"https://api.github.com/repos/BinaryStudioAcademy/bsa-2016-forum/issues/comments{/number}","contents_url":"https://api.github.com/repos/BinaryStudioAcademy/bsa-2016-forum/contents/{+path}","compare_url":"https://api.github.com/repos/BinaryStudioAcademy/bsa-2016-forum/compare/{base}...{head}","merges_url":"https://api.github.com/repos/BinaryStudioAcademy/bsa-2016-forum/merges","archive_url":"https://api.github.com/repos/BinaryStudioAcademy/bsa-2016-forum/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/BinaryStudioAcademy/bsa-2016-forum/downloads","issues_url":"https://api.github.com/repos/BinaryStudioAcademy/bsa-2016-forum/issues{/number}","pulls_url":"https://api.github.com/repos/BinaryStudioAcademy/bsa-2016-forum/pulls{/number}","milestones_url":"https://api.github.com/repos/BinaryStudioAcademy/bsa-2016-forum/milestones{/number}","notifications_url":"https://api.github.com/repos/BinaryStudioAcademy/bsa-2016-forum/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/BinaryStudioAcademy/bsa-2016-forum/labels{/name}","releases_url":"https://api.github.com/repos/BinaryStudioAcademy/bsa-2016-forum/releases{/id}","deployments_url":"https://api.github.com/repos/BinaryStudioAcademy/bsa-2016-forum/deployments","created_at":"2016-08-08T11:07:57Z","updated_at":"2016-08-08T12:28:55Z","pushed_at":"2016-09-05T11:23:33Z","git_url":"git://github.com/BinaryStudioAcademy/bsa-2016-forum.git","ssh_url":"git@github.com:BinaryStudioAcademy/bsa-2016-forum.git","clone_url":"https://github.com/BinaryStudioAcademy/bsa-2016-forum.git","svn_url":"https://github.com/BinaryStudioAcademy/bsa-2016-forum","homepage":"","size":3257,"stargazers_count":0,"watchers_count":0,"language":"PHP","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":3,"mirror_url":null,"open_issues_count":6,"forks":3,"open_issues":6,"watchers":0,"default_branch":"next"}},"base":{"label":"BinaryStudioAcademy:next","ref":"next","sha":"a7c81345852bd7d565c19abb3eaae7b73528a394","user":{"login":"BinaryStudioAcademy","id":13114349,"avatar_url":"https://avatars.githubusercontent.com/u/13114349?v=3","gravatar_id":"","url":"https://api.github.com/users/BinaryStudioAcademy","html_url":"https://github.com/BinaryStudioAcademy","followers_url":"https://api.github.com/users/BinaryStudioAcademy/followers","following_url":"https://api.github.com/users/BinaryStudioAcademy/following{/other_user}","gists_url":"https://api.github.com/users/BinaryStudioAcademy/gists{/gist_id}","starred_url":"https://api.github.com/users/BinaryStudioAcademy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/BinaryStudioAcademy/subscriptions","organizations_url":"https://api.github.com/users/BinaryStudioAcademy/orgs","repos_url":"https://api.github.com/users/BinaryStudioAcademy/repos","events_url":"https://api.github.com/users/BinaryStudioAcademy/events{/privacy}","received_events_url":"https://api.github.com/users/BinaryStudioAcademy/received_events","type":"Organization","site_admin":false},"repo":{"id":65197608,"name":"bsa-2016-forum","full_name":"BinaryStudioAcademy/bsa-2016-forum","owner":{"login":"BinaryStudioAcademy","id":13114349,"avatar_url":"https://avatars.githubusercontent.com/u/13114349?v=3","gravatar_id":"","url":"https://api.github.com/users/BinaryStudioAcademy","html_url":"https://github.com/BinaryStudioAcademy","followers_url":"https://api.github.com/users/BinaryStudioAcademy/followers","following_url":"https://api.github.com/users/BinaryStudioAcademy/following{/other_user}","gists_url":"https://api.github.com/users/BinaryStudioAcademy/gists{/gist_id}","starred_url":"https://api.github.com/users/BinaryStudioAcademy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/BinaryStudioAcademy/subscriptions","organizations_url":"https://api.github.com/users/BinaryStudioAcademy/orgs","repos_url":"https://api.github.com/users/BinaryStudioAcademy/repos","events_url":"https://api.github.com/users/BinaryStudioAcademy/events{/privacy}","received_events_url":"https://api.github.com/users/BinaryStudioAcademy/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/BinaryStudioAcademy/bsa-2016-forum","description":"BSA 2016 PHP Forum project","fork":false,"url":"https://api.github.com/repos/BinaryStudioAcademy/bsa-2016-forum","forks_url":"https://api.github.com/repos/BinaryStudioAcademy/bsa-2016-forum/forks","keys_url":"https://api.github.com/repos/BinaryStudioAcademy/bsa-2016-forum/keys{/key_id}","collaborators_url":"https://api.github.com/repos/BinaryStudioAcademy/bsa-2016-forum/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/BinaryStudioAcademy/bsa-2016-forum/teams","hooks_url":"https://api.github.com/repos/BinaryStudioAcademy/bsa-2016-forum/hooks","issue_events_url":"https://api.github.com/repos/BinaryStudioAcademy/bsa-2016-forum/issues/events{/number}","events_url":"https://api.github.com/repos/BinaryStudioAcademy/bsa-2016-forum/events","assignees_url":"https://api.github.com/repos/BinaryStudioAcademy/bsa-2016-forum/assignees{/user}","branches_url":"https://api.github.com/repos/BinaryStudioAcademy/bsa-2016-forum/branches{/branch}","tags_url":"https://api.github.com/repos/BinaryStudioAcademy/bsa-2016-forum/tags","blobs_url":"https://api.github.com/repos/BinaryStudioAcademy/bsa-2016-forum/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/BinaryStudioAcademy/bsa-2016-forum/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/BinaryStudioAcademy/bsa-2016-forum/git/refs{/sha}","trees_url":"https://api.github.com/repos/BinaryStudioAcademy/bsa-2016-forum/git/trees{/sha}","statuses_url":"https://api.github.com/repos/BinaryStudioAcademy/bsa-2016-forum/statuses/{sha}","languages_url":"https://api.github.com/repos/BinaryStudioAcademy/bsa-2016-forum/languages","stargazers_url":"https://api.github.com/repos/BinaryStudioAcademy/bsa-2016-forum/stargazers","contributors_url":"https://api.github.com/repos/BinaryStudioAcademy/bsa-2016-forum/contributors","subscribers_url":"https://api.github.com/repos/BinaryStudioAcademy/bsa-2016-forum/subscribers","subscription_url":"https://api.github.com/repos/BinaryStudioAcademy/bsa-2016-forum/subscription","commits_url":"https://api.github.com/repos/BinaryStudioAcademy/bsa-2016-forum/commits{/sha}","git_commits_url":"https://api.github.com/repos/BinaryStudioAcademy/bsa-2016-forum/git/commits{/sha}","comments_url":"https://api.github.com/repos/BinaryStudioAcademy/bsa-2016-forum/comments{/number}","issue_comment_url":"https://api.github.com/repos/BinaryStudioAcademy/bsa-2016-forum/issues/comments{/number}","contents_url":"https://api.github.com/repos/BinaryStudioAcademy/bsa-2016-forum/contents/{+path}","compare_url":"https://api.github.com/repos/BinaryStudioAcademy/bsa-2016-forum/compare/{base}...{head}","merges_url":"https://api.github.com/repos/BinaryStudioAcademy/bsa-2016-forum/merges","archive_url":"https://api.github.com/repos/BinaryStudioAcademy/bsa-2016-forum/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/BinaryStudioAcademy/bsa-2016-forum/downloads","issues_url":"https://api.github.com/repos/BinaryStudioAcademy/bsa-2016-forum/issues{/number}","pulls_url":"https://api.github.com/repos/BinaryStudioAcademy/bsa-2016-forum/pulls{/number}","milestones_url":"https://api.github.com/repos/BinaryStudioAcademy/bsa-2016-forum/milestones{/number}","notifications_url":"https://api.github.com/repos/BinaryStudioAcademy/bsa-2016-forum/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/BinaryStudioAcademy/bsa-2016-forum/labels{/name}","releases_url":"https://api.github.com/repos/BinaryStudioAcademy/bsa-2016-forum/releases{/id}","deployments_url":"https://api.github.com/repos/BinaryStudioAcademy/bsa-2016-forum/deployments","created_at":"2016-08-08T11:07:57Z","updated_at":"2016-08-08T12:28:55Z","pushed_at":"2016-09-05T11:23:33Z","git_url":"git://github.com/BinaryStudioAcademy/bsa-2016-forum.git","ssh_url":"git@github.com:BinaryStudioAcademy/bsa-2016-forum.git","clone_url":"https://github.com/BinaryStudioAcademy/bsa-2016-forum.git","svn_url":"https://github.com/BinaryStudioAcademy/bsa-2016-forum","homepage":"","size":3257,"stargazers_count":0,"watchers_count":0,"language":"PHP","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":3,"mirror_url":null,"open_issues_count":6,"forks":3,"open_issues":6,"watchers":0,"default_branch":"next"}},"_links":{"self":{"href":"https://api.github.com/repos/BinaryStudioAcademy/bsa-2016-forum/pulls/247"},"html":{"href":"https://github.com/BinaryStudioAcademy/bsa-2016-forum/pull/247"},"issue":{"href":"https://api.github.com/repos/BinaryStudioAcademy/bsa-2016-forum/issues/247"},"comments":{"href":"https://api.github.com/repos/BinaryStudioAcademy/bsa-2016-forum/issues/247/comments"},"review_comments":{"href":"https://api.github.com/repos/BinaryStudioAcademy/bsa-2016-forum/pulls/247/comments"},"review_comment":{"href":"https://api.github.com/repos/BinaryStudioAcademy/bsa-2016-forum/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/BinaryStudioAcademy/bsa-2016-forum/pulls/247/commits"},"statuses":{"href":"https://api.github.com/repos/BinaryStudioAcademy/bsa-2016-forum/statuses/60399ed6d96ceae52f70a1f68344c5f8fb58b169"}}}}
{"actor":{"display_login":"TatsuUkraine"}}