{"action":"created","comment":{"url":"https://api.github.com/repos/oppia/oppia/pulls/comments/195927061","pull_request_review_id":129387441,"id":195927061,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDE5NTkyNzA2MQ==","diff_hunk":"@@ -0,0 +1,99 @@\n+// Copyright 2018 The Oppia Authors. All Rights Reserved.\n+//\n+// Licensed under the Apache License, Version 2.0 (the \"License\");\n+// you may not use this file except in compliance with the License.\n+// You may obtain a copy of the License at\n+//\n+//      http://www.apache.org/licenses/LICENSE-2.0\n+//\n+// Unless required by applicable law or agreed to in writing, software\n+// distributed under the License is distributed on an \"AS-IS\" BASIS,\n+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n+// See the License for the specific language governing permissions and\n+// limitations under the License.\n+\n+/**\n+ * @fileoverview Directive for the navbar of the topic editor.\n+ */\n+\n+oppia.directive('topicEditorNavbar', [\n+  'UrlInterpolationService', function(UrlInterpolationService) {\n+    return {\n+      restrict: 'E',\n+      templateUrl: UrlInterpolationService.getDirectiveTemplateUrl(\n+        '/pages/topic_editor/topic_editor_navbar_directive.html'),\n+      controller: [\n+        '$scope', '$uibModal', 'AlertsService',\n+        'UndoRedoService', 'TopicEditorStateService',\n+        'TopicRightsBackendApiService',\n+        'EVENT_TOPIC_INITIALIZED', 'EVENT_TOPIC_REINITIALIZED',\n+        'EVENT_UNDO_REDO_SERVICE_CHANGE_APPLIED',\n+        function(\n+            $scope, $uibModal, AlertsService, UndoRedoService,\n+            TopicEditorStateService, TopicRightsBackendApiService,\n+            EVENT_TOPIC_INITIALIZED, EVENT_TOPIC_REINITIALIZED,\n+            EVENT_UNDO_REDO_SERVICE_CHANGE_APPLIED) {\n+          $scope.topicId = GLOBALS.topicId;\n+          $scope.topic = TopicEditorStateService.getTopic();\n+          $scope.topicRights = TopicEditorStateService.getTopicRights();\n+          $scope.isSaveInProgress = TopicEditorStateService.isSavingTopic;\n+\n+          $scope.publishTopic = function() {\n+            if (!$scope.topicRights.getCanPublishTopic()) {\n+              return false;\n+            }\n+            TopicRightsBackendApiService.publishTopic($scope.topicId).then(\n+              function() {\n+                $scope.topicRights.publishTopic();\n+                TopicEditorStateService.setTopicRights($scope.topicRights);\n+              });\n+          };\n+\n+          $scope.getChangeListCount = function() {\n+            return UndoRedoService.getChangeCount();\n+          };\n+\n+          $scope.isTopicSaveable = function() {\n+            return $scope.getChangeListCount() > 0;\n+          };\n+\n+          $scope.saveChanges = function() {\n+            var isPublished = $scope.topicRights.isPublished();","path":"core/templates/dev/head/pages/topic_editor/TopicEditorNavbarDirective.js","position":null,"original_position":61,"commit_id":"c55949f2a949b337347c83ce31f9157ca3e0bb77","original_commit_id":"10c46bbf0022339a45f1a3ee15906a1d436107e1","user":{"login":"aks681","id":22347970,"node_id":"MDQ6VXNlcjIyMzQ3OTcw","avatar_url":"https://avatars3.githubusercontent.com/u/22347970?v=4","gravatar_id":"","url":"https://api.github.com/users/aks681","html_url":"https://github.com/aks681","followers_url":"https://api.github.com/users/aks681/followers","following_url":"https://api.github.com/users/aks681/following{/other_user}","gists_url":"https://api.github.com/users/aks681/gists{/gist_id}","starred_url":"https://api.github.com/users/aks681/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/aks681/subscriptions","organizations_url":"https://api.github.com/users/aks681/orgs","repos_url":"https://api.github.com/users/aks681/repos","events_url":"https://api.github.com/users/aks681/events{/privacy}","received_events_url":"https://api.github.com/users/aks681/received_events","type":"User","site_admin":false},"body":"Ok, done.","created_at":"2018-06-17T11:52:00Z","updated_at":"2018-06-17T11:52:01Z","html_url":"https://github.com/oppia/oppia/pull/5112#discussion_r195927061","pull_request_url":"https://api.github.com/repos/oppia/oppia/pulls/5112","author_association":"MEMBER","_links":{"self":{"href":"https://api.github.com/repos/oppia/oppia/pulls/comments/195927061"},"html":{"href":"https://github.com/oppia/oppia/pull/5112#discussion_r195927061"},"pull_request":{"href":"https://api.github.com/repos/oppia/oppia/pulls/5112"}},"in_reply_to_id":195915571},"pull_request":{"url":"https://api.github.com/repos/oppia/oppia/pulls/5112","id":195286710,"node_id":"MDExOlB1bGxSZXF1ZXN0MTk1Mjg2NzEw","html_url":"https://github.com/oppia/oppia/pull/5112","diff_url":"https://github.com/oppia/oppia/pull/5112.diff","patch_url":"https://github.com/oppia/oppia/pull/5112.patch","issue_url":"https://api.github.com/repos/oppia/oppia/issues/5112","number":5112,"state":"open","locked":false,"title":"Create Topic Editor (Part 3): Create the editor UI","user":{"login":"aks681","id":22347970,"node_id":"MDQ6VXNlcjIyMzQ3OTcw","avatar_url":"https://avatars3.githubusercontent.com/u/22347970?v=4","gravatar_id":"","url":"https://api.github.com/users/aks681","html_url":"https://github.com/aks681","followers_url":"https://api.github.com/users/aks681/followers","following_url":"https://api.github.com/users/aks681/following{/other_user}","gists_url":"https://api.github.com/users/aks681/gists{/gist_id}","starred_url":"https://api.github.com/users/aks681/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/aks681/subscriptions","organizations_url":"https://api.github.com/users/aks681/orgs","repos_url":"https://api.github.com/users/aks681/repos","events_url":"https://api.github.com/users/aks681/events{/privacy}","received_events_url":"https://api.github.com/users/aks681/received_events","type":"User","site_admin":false},"body":"In this PR:\r\n\r\n- TopicRights have been added, along with its corresponding services.\r\n- A method to publish and unpublish topics have been added.\r\n- A basic UI with functionality to edit Name and Description are done.\r\n- Have a Save Topic functionality.\r\n\r\nThe editor can be accessed by clicking on the topic to edit in the Topics and Skills Dashboard.\r\nThe commits for this PR are from (and including) e3449b1.\r\n\r\nCurrent UI:\r\n![screenshot from 2018-06-16 20-51-10](https://user-images.githubusercontent.com/22347970/41499954-19595ddc-71a7-11e8-9b6f-918b8b54007d.png)\r\n\r\n","created_at":"2018-06-15T21:26:51Z","updated_at":"2018-06-17T11:52:01Z","closed_at":null,"merged_at":null,"merge_commit_sha":"0b4ad9b8b6d04c57d30976f6f0b55bf60980dc0d","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/oppia/oppia/pulls/5112/commits","review_comments_url":"https://api.github.com/repos/oppia/oppia/pulls/5112/comments","review_comment_url":"https://api.github.com/repos/oppia/oppia/pulls/comments{/number}","comments_url":"https://api.github.com/repos/oppia/oppia/issues/5112/comments","statuses_url":"https://api.github.com/repos/oppia/oppia/statuses/c55949f2a949b337347c83ce31f9157ca3e0bb77","head":{"label":"aks681:topic-editor","ref":"topic-editor","sha":"c55949f2a949b337347c83ce31f9157ca3e0bb77","user":{"login":"aks681","id":22347970,"node_id":"MDQ6VXNlcjIyMzQ3OTcw","avatar_url":"https://avatars3.githubusercontent.com/u/22347970?v=4","gravatar_id":"","url":"https://api.github.com/users/aks681","html_url":"https://github.com/aks681","followers_url":"https://api.github.com/users/aks681/followers","following_url":"https://api.github.com/users/aks681/following{/other_user}","gists_url":"https://api.github.com/users/aks681/gists{/gist_id}","starred_url":"https://api.github.com/users/aks681/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/aks681/subscriptions","organizations_url":"https://api.github.com/users/aks681/orgs","repos_url":"https://api.github.com/users/aks681/repos","events_url":"https://api.github.com/users/aks681/events{/privacy}","received_events_url":"https://api.github.com/users/aks681/received_events","type":"User","site_admin":false},"repo":{"id":112202645,"node_id":"MDEwOlJlcG9zaXRvcnkxMTIyMDI2NDU=","name":"oppia","full_name":"aks681/oppia","owner":{"login":"aks681","id":22347970,"node_id":"MDQ6VXNlcjIyMzQ3OTcw","avatar_url":"https://avatars3.githubusercontent.com/u/22347970?v=4","gravatar_id":"","url":"https://api.github.com/users/aks681","html_url":"https://github.com/aks681","followers_url":"https://api.github.com/users/aks681/followers","following_url":"https://api.github.com/users/aks681/following{/other_user}","gists_url":"https://api.github.com/users/aks681/gists{/gist_id}","starred_url":"https://api.github.com/users/aks681/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/aks681/subscriptions","organizations_url":"https://api.github.com/users/aks681/orgs","repos_url":"https://api.github.com/users/aks681/repos","events_url":"https://api.github.com/users/aks681/events{/privacy}","received_events_url":"https://api.github.com/users/aks681/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/aks681/oppia","description":"Tool for collaboratively building interactive lessons.","fork":true,"url":"https://api.github.com/repos/aks681/oppia","forks_url":"https://api.github.com/repos/aks681/oppia/forks","keys_url":"https://api.github.com/repos/aks681/oppia/keys{/key_id}","collaborators_url":"https://api.github.com/repos/aks681/oppia/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/aks681/oppia/teams","hooks_url":"https://api.github.com/repos/aks681/oppia/hooks","issue_events_url":"https://api.github.com/repos/aks681/oppia/issues/events{/number}","events_url":"https://api.github.com/repos/aks681/oppia/events","assignees_url":"https://api.github.com/repos/aks681/oppia/assignees{/user}","branches_url":"https://api.github.com/repos/aks681/oppia/branches{/branch}","tags_url":"https://api.github.com/repos/aks681/oppia/tags","blobs_url":"https://api.github.com/repos/aks681/oppia/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/aks681/oppia/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/aks681/oppia/git/refs{/sha}","trees_url":"https://api.github.com/repos/aks681/oppia/git/trees{/sha}","statuses_url":"https://api.github.com/repos/aks681/oppia/statuses/{sha}","languages_url":"https://api.github.com/repos/aks681/oppia/languages","stargazers_url":"https://api.github.com/repos/aks681/oppia/stargazers","contributors_url":"https://api.github.com/repos/aks681/oppia/contributors","subscribers_url":"https://api.github.com/repos/aks681/oppia/subscribers","subscription_url":"https://api.github.com/repos/aks681/oppia/subscription","commits_url":"https://api.github.com/repos/aks681/oppia/commits{/sha}","git_commits_url":"https://api.github.com/repos/aks681/oppia/git/commits{/sha}","comments_url":"https://api.github.com/repos/aks681/oppia/comments{/number}","issue_comment_url":"https://api.github.com/repos/aks681/oppia/issues/comments{/number}","contents_url":"https://api.github.com/repos/aks681/oppia/contents/{+path}","compare_url":"https://api.github.com/repos/aks681/oppia/compare/{base}...{head}","merges_url":"https://api.github.com/repos/aks681/oppia/merges","archive_url":"https://api.github.com/repos/aks681/oppia/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/aks681/oppia/downloads","issues_url":"https://api.github.com/repos/aks681/oppia/issues{/number}","pulls_url":"https://api.github.com/repos/aks681/oppia/pulls{/number}","milestones_url":"https://api.github.com/repos/aks681/oppia/milestones{/number}","notifications_url":"https://api.github.com/repos/aks681/oppia/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/aks681/oppia/labels{/name}","releases_url":"https://api.github.com/repos/aks681/oppia/releases{/id}","deployments_url":"https://api.github.com/repos/aks681/oppia/deployments","created_at":"2017-11-27T13:56:34Z","updated_at":"2018-06-16T09:36:26Z","pushed_at":"2018-06-17T11:47:33Z","git_url":"git://github.com/aks681/oppia.git","ssh_url":"git@github.com:aks681/oppia.git","clone_url":"https://github.com/aks681/oppia.git","svn_url":"https://github.com/aks681/oppia","homepage":"https://www.oppia.org","size":104099,"stargazers_count":0,"watchers_count":0,"language":"Python","has_issues":false,"has_projects":true,"has_downloads":false,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":0,"license":{"key":"apache-2.0","name":"Apache License 2.0","spdx_id":"Apache-2.0","url":"https://api.github.com/licenses/apache-2.0","node_id":"MDc6TGljZW5zZTI="},"forks":0,"open_issues":0,"watchers":0,"default_branch":"develop"}},"base":{"label":"oppia:develop","ref":"develop","sha":"b23254d9750660f37a9060b14261b937da1663a9","user":{"login":"oppia","id":11620230,"node_id":"MDEyOk9yZ2FuaXphdGlvbjExNjIwMjMw","avatar_url":"https://avatars1.githubusercontent.com/u/11620230?v=4","gravatar_id":"","url":"https://api.github.com/users/oppia","html_url":"https://github.com/oppia","followers_url":"https://api.github.com/users/oppia/followers","following_url":"https://api.github.com/users/oppia/following{/other_user}","gists_url":"https://api.github.com/users/oppia/gists{/gist_id}","starred_url":"https://api.github.com/users/oppia/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/oppia/subscriptions","organizations_url":"https://api.github.com/users/oppia/orgs","repos_url":"https://api.github.com/users/oppia/repos","events_url":"https://api.github.com/users/oppia/events{/privacy}","received_events_url":"https://api.github.com/users/oppia/received_events","type":"Organization","site_admin":false},"repo":{"id":40687563,"node_id":"MDEwOlJlcG9zaXRvcnk0MDY4NzU2Mw==","name":"oppia","full_name":"oppia/oppia","owner":{"login":"oppia","id":11620230,"node_id":"MDEyOk9yZ2FuaXphdGlvbjExNjIwMjMw","avatar_url":"https://avatars1.githubusercontent.com/u/11620230?v=4","gravatar_id":"","url":"https://api.github.com/users/oppia","html_url":"https://github.com/oppia","followers_url":"https://api.github.com/users/oppia/followers","following_url":"https://api.github.com/users/oppia/following{/other_user}","gists_url":"https://api.github.com/users/oppia/gists{/gist_id}","starred_url":"https://api.github.com/users/oppia/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/oppia/subscriptions","organizations_url":"https://api.github.com/users/oppia/orgs","repos_url":"https://api.github.com/users/oppia/repos","events_url":"https://api.github.com/users/oppia/events{/privacy}","received_events_url":"https://api.github.com/users/oppia/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/oppia/oppia","description":"Tool for collaboratively building interactive lessons.","fork":false,"url":"https://api.github.com/repos/oppia/oppia","forks_url":"https://api.github.com/repos/oppia/oppia/forks","keys_url":"https://api.github.com/repos/oppia/oppia/keys{/key_id}","collaborators_url":"https://api.github.com/repos/oppia/oppia/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/oppia/oppia/teams","hooks_url":"https://api.github.com/repos/oppia/oppia/hooks","issue_events_url":"https://api.github.com/repos/oppia/oppia/issues/events{/number}","events_url":"https://api.github.com/repos/oppia/oppia/events","assignees_url":"https://api.github.com/repos/oppia/oppia/assignees{/user}","branches_url":"https://api.github.com/repos/oppia/oppia/branches{/branch}","tags_url":"https://api.github.com/repos/oppia/oppia/tags","blobs_url":"https://api.github.com/repos/oppia/oppia/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/oppia/oppia/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/oppia/oppia/git/refs{/sha}","trees_url":"https://api.github.com/repos/oppia/oppia/git/trees{/sha}","statuses_url":"https://api.github.com/repos/oppia/oppia/statuses/{sha}","languages_url":"https://api.github.com/repos/oppia/oppia/languages","stargazers_url":"https://api.github.com/repos/oppia/oppia/stargazers","contributors_url":"https://api.github.com/repos/oppia/oppia/contributors","subscribers_url":"https://api.github.com/repos/oppia/oppia/subscribers","subscription_url":"https://api.github.com/repos/oppia/oppia/subscription","commits_url":"https://api.github.com/repos/oppia/oppia/commits{/sha}","git_commits_url":"https://api.github.com/repos/oppia/oppia/git/commits{/sha}","comments_url":"https://api.github.com/repos/oppia/oppia/comments{/number}","issue_comment_url":"https://api.github.com/repos/oppia/oppia/issues/comments{/number}","contents_url":"https://api.github.com/repos/oppia/oppia/contents/{+path}","compare_url":"https://api.github.com/repos/oppia/oppia/compare/{base}...{head}","merges_url":"https://api.github.com/repos/oppia/oppia/merges","archive_url":"https://api.github.com/repos/oppia/oppia/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/oppia/oppia/downloads","issues_url":"https://api.github.com/repos/oppia/oppia/issues{/number}","pulls_url":"https://api.github.com/repos/oppia/oppia/pulls{/number}","milestones_url":"https://api.github.com/repos/oppia/oppia/milestones{/number}","notifications_url":"https://api.github.com/repos/oppia/oppia/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/oppia/oppia/labels{/name}","releases_url":"https://api.github.com/repos/oppia/oppia/releases{/id}","deployments_url":"https://api.github.com/repos/oppia/oppia/deployments","created_at":"2015-08-14T00:16:14Z","updated_at":"2018-06-17T10:35:12Z","pushed_at":"2018-06-17T11:47:35Z","git_url":"git://github.com/oppia/oppia.git","ssh_url":"git@github.com:oppia/oppia.git","clone_url":"https://github.com/oppia/oppia.git","svn_url":"https://github.com/oppia/oppia","homepage":"https://www.oppia.org","size":104297,"stargazers_count":673,"watchers_count":673,"language":"Python","has_issues":true,"has_projects":true,"has_downloads":false,"has_wiki":true,"has_pages":false,"forks_count":645,"mirror_url":null,"archived":false,"open_issues_count":322,"license":{"key":"apache-2.0","name":"Apache License 2.0","spdx_id":"Apache-2.0","url":"https://api.github.com/licenses/apache-2.0","node_id":"MDc6TGljZW5zZTI="},"forks":645,"open_issues":322,"watchers":673,"default_branch":"develop"}},"_links":{"self":{"href":"https://api.github.com/repos/oppia/oppia/pulls/5112"},"html":{"href":"https://github.com/oppia/oppia/pull/5112"},"issue":{"href":"https://api.github.com/repos/oppia/oppia/issues/5112"},"comments":{"href":"https://api.github.com/repos/oppia/oppia/issues/5112/comments"},"review_comments":{"href":"https://api.github.com/repos/oppia/oppia/pulls/5112/comments"},"review_comment":{"href":"https://api.github.com/repos/oppia/oppia/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/oppia/oppia/pulls/5112/commits"},"statuses":{"href":"https://api.github.com/repos/oppia/oppia/statuses/c55949f2a949b337347c83ce31f9157ca3e0bb77"}},"author_association":"MEMBER"}}
{"actor":{"display_login":"aks681"}}