{"action":"created","comment":{"url":"https://api.github.com/repos/liqd/adhocracy3/pulls/comments/68718150","id":68718150,"diff_hunk":"@@ -103,6 +103,43 @@ export var hideActionDirective = (\n     };\n };\n \n+export var deleteActionDirective = (\n+    adhHttp : AdhHttp.Service<any>,\n+    adhTopLevelState : AdhTopLevelState.Service,\n+    adhResourceUrlFilter,\n+    $translate,\n+    $window : Window\n+) => {\n+    return {\n+        restrict: \"E\",\n+        template: \"<a class=\\\"{{class}}\\\" href=\\\"\\\" data-ng-click=\\\"delete();\\\">{{ 'TR__HIDE' | translate }}</a>\",\n+        require: \"^adhMovingColumn\",\n+        scope: {\n+            resourcePath: \"@\",\n+            parentPath: \"=?\",\n+            class: \"@\",\n+            redirectUrl: \"@?\",\n+        },\n+        link: (scope, element) => {\n+            scope.delete = () => {\n+                return $translate(\"TR__ASK_TO_CONFIRM_DELETE_ACTION\").then((question) => {\n+                    var path = scope.parentPath ? AdhUtil.parentPath(scope.resourcePath) : scope.resourcePath;\n+                    if ($window.confirm(question)) {\n+                        return adhHttp.delete(path).then(() => {\n+                            var url = scope.redirectUrl;\n+                            if (!url) {\n+                                var processUrl = adhTopLevelState.get(\"processUrl\");\n+                                url = processUrl ? adhResourceUrlFilter(processUrl) : \"/\";\n+                            }\n+                            adhTopLevelState.goToCameFrom(url);","path":"src/adhocracy_frontend/adhocracy_frontend/static/js/Packages/ResourceActions/ResourceActions.ts","position":32,"original_position":32,"commit_id":"73ae74ff4e50901366fdd44d7ec903d9279e9997","original_commit_id":"73ae74ff4e50901366fdd44d7ec903d9279e9997","user":{"login":"xi","id":202576,"avatar_url":"https://avatars.githubusercontent.com/u/202576?v=3","gravatar_id":"","url":"https://api.github.com/users/xi","html_url":"https://github.com/xi","followers_url":"https://api.github.com/users/xi/followers","following_url":"https://api.github.com/users/xi/following{/other_user}","gists_url":"https://api.github.com/users/xi/gists{/gist_id}","starred_url":"https://api.github.com/users/xi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/xi/subscriptions","organizations_url":"https://api.github.com/users/xi/orgs","repos_url":"https://api.github.com/users/xi/repos","events_url":"https://api.github.com/users/xi/events{/privacy}","received_events_url":"https://api.github.com/users/xi/received_events","type":"User","site_admin":false},"body":"The blog entries do not have their own pages, so it does not make sense to redirect here. Note that in the original code, `scope.onChange()` was called.","created_at":"2016-06-28T08:38:58Z","updated_at":"2016-06-28T08:38:58Z","html_url":"https://github.com/liqd/adhocracy3/pull/2453#discussion_r68718150","pull_request_url":"https://api.github.com/repos/liqd/adhocracy3/pulls/2453","_links":{"self":{"href":"https://api.github.com/repos/liqd/adhocracy3/pulls/comments/68718150"},"html":{"href":"https://github.com/liqd/adhocracy3/pull/2453#discussion_r68718150"},"pull_request":{"href":"https://api.github.com/repos/liqd/adhocracy3/pulls/2453"}}},"pull_request":{"url":"https://api.github.com/repos/liqd/adhocracy3/pulls/2453","id":74950730,"html_url":"https://github.com/liqd/adhocracy3/pull/2453","diff_url":"https://github.com/liqd/adhocracy3/pull/2453.diff","patch_url":"https://github.com/liqd/adhocracy3/pull/2453.patch","issue_url":"https://api.github.com/repos/liqd/adhocracy3/issues/2453","number":2453,"state":"open","locked":false,"title":"reimplement adhDeleteAction for Blog","user":{"login":"der-john","id":16540898,"avatar_url":"https://avatars.githubusercontent.com/u/16540898?v=3","gravatar_id":"","url":"https://api.github.com/users/der-john","html_url":"https://github.com/der-john","followers_url":"https://api.github.com/users/der-john/followers","following_url":"https://api.github.com/users/der-john/following{/other_user}","gists_url":"https://api.github.com/users/der-john/gists{/gist_id}","starred_url":"https://api.github.com/users/der-john/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/der-john/subscriptions","organizations_url":"https://api.github.com/users/der-john/orgs","repos_url":"https://api.github.com/users/der-john/repos","events_url":"https://api.github.com/users/der-john/events{/privacy}","received_events_url":"https://api.github.com/users/der-john/received_events","type":"User","site_admin":false},"body":"This is made possible by #2365.\r\n\r\nUnfortunately, I haven't tested it. There seems to be no UI for assigning badges in Mercator2015, so I can't see a journey.","created_at":"2016-06-23T13:02:30Z","updated_at":"2016-06-28T08:38:58Z","closed_at":null,"merged_at":null,"merge_commit_sha":"8899325000cead4cb3d66ee31062e1c644e2b8b5","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/liqd/adhocracy3/pulls/2453/commits","review_comments_url":"https://api.github.com/repos/liqd/adhocracy3/pulls/2453/comments","review_comment_url":"https://api.github.com/repos/liqd/adhocracy3/pulls/comments{/number}","comments_url":"https://api.github.com/repos/liqd/adhocracy3/issues/2453/comments","statuses_url":"https://api.github.com/repos/liqd/adhocracy3/statuses/73ae74ff4e50901366fdd44d7ec903d9279e9997","head":{"label":"liqd:2016-06-js-adh-physical-delete","ref":"2016-06-js-adh-physical-delete","sha":"73ae74ff4e50901366fdd44d7ec903d9279e9997","user":{"login":"liqd","id":2312088,"avatar_url":"https://avatars.githubusercontent.com/u/2312088?v=3","gravatar_id":"","url":"https://api.github.com/users/liqd","html_url":"https://github.com/liqd","followers_url":"https://api.github.com/users/liqd/followers","following_url":"https://api.github.com/users/liqd/following{/other_user}","gists_url":"https://api.github.com/users/liqd/gists{/gist_id}","starred_url":"https://api.github.com/users/liqd/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/liqd/subscriptions","organizations_url":"https://api.github.com/users/liqd/orgs","repos_url":"https://api.github.com/users/liqd/repos","events_url":"https://api.github.com/users/liqd/events{/privacy}","received_events_url":"https://api.github.com/users/liqd/received_events","type":"Organization","site_admin":false},"repo":{"id":22982974,"name":"adhocracy3","full_name":"liqd/adhocracy3","owner":{"login":"liqd","id":2312088,"avatar_url":"https://avatars.githubusercontent.com/u/2312088?v=3","gravatar_id":"","url":"https://api.github.com/users/liqd","html_url":"https://github.com/liqd","followers_url":"https://api.github.com/users/liqd/followers","following_url":"https://api.github.com/users/liqd/following{/other_user}","gists_url":"https://api.github.com/users/liqd/gists{/gist_id}","starred_url":"https://api.github.com/users/liqd/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/liqd/subscriptions","organizations_url":"https://api.github.com/users/liqd/orgs","repos_url":"https://api.github.com/users/liqd/repos","events_url":"https://api.github.com/users/liqd/events{/privacy}","received_events_url":"https://api.github.com/users/liqd/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/liqd/adhocracy3","description":"Adhocracy 3 with customizations for various projects","fork":false,"url":"https://api.github.com/repos/liqd/adhocracy3","forks_url":"https://api.github.com/repos/liqd/adhocracy3/forks","keys_url":"https://api.github.com/repos/liqd/adhocracy3/keys{/key_id}","collaborators_url":"https://api.github.com/repos/liqd/adhocracy3/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/liqd/adhocracy3/teams","hooks_url":"https://api.github.com/repos/liqd/adhocracy3/hooks","issue_events_url":"https://api.github.com/repos/liqd/adhocracy3/issues/events{/number}","events_url":"https://api.github.com/repos/liqd/adhocracy3/events","assignees_url":"https://api.github.com/repos/liqd/adhocracy3/assignees{/user}","branches_url":"https://api.github.com/repos/liqd/adhocracy3/branches{/branch}","tags_url":"https://api.github.com/repos/liqd/adhocracy3/tags","blobs_url":"https://api.github.com/repos/liqd/adhocracy3/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/liqd/adhocracy3/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/liqd/adhocracy3/git/refs{/sha}","trees_url":"https://api.github.com/repos/liqd/adhocracy3/git/trees{/sha}","statuses_url":"https://api.github.com/repos/liqd/adhocracy3/statuses/{sha}","languages_url":"https://api.github.com/repos/liqd/adhocracy3/languages","stargazers_url":"https://api.github.com/repos/liqd/adhocracy3/stargazers","contributors_url":"https://api.github.com/repos/liqd/adhocracy3/contributors","subscribers_url":"https://api.github.com/repos/liqd/adhocracy3/subscribers","subscription_url":"https://api.github.com/repos/liqd/adhocracy3/subscription","commits_url":"https://api.github.com/repos/liqd/adhocracy3/commits{/sha}","git_commits_url":"https://api.github.com/repos/liqd/adhocracy3/git/commits{/sha}","comments_url":"https://api.github.com/repos/liqd/adhocracy3/comments{/number}","issue_comment_url":"https://api.github.com/repos/liqd/adhocracy3/issues/comments{/number}","contents_url":"https://api.github.com/repos/liqd/adhocracy3/contents/{+path}","compare_url":"https://api.github.com/repos/liqd/adhocracy3/compare/{base}...{head}","merges_url":"https://api.github.com/repos/liqd/adhocracy3/merges","archive_url":"https://api.github.com/repos/liqd/adhocracy3/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/liqd/adhocracy3/downloads","issues_url":"https://api.github.com/repos/liqd/adhocracy3/issues{/number}","pulls_url":"https://api.github.com/repos/liqd/adhocracy3/pulls{/number}","milestones_url":"https://api.github.com/repos/liqd/adhocracy3/milestones{/number}","notifications_url":"https://api.github.com/repos/liqd/adhocracy3/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/liqd/adhocracy3/labels{/name}","releases_url":"https://api.github.com/repos/liqd/adhocracy3/releases{/id}","deployments_url":"https://api.github.com/repos/liqd/adhocracy3/deployments","created_at":"2014-08-15T08:07:57Z","updated_at":"2016-06-13T16:05:33Z","pushed_at":"2016-06-28T08:05:59Z","git_url":"git://github.com/liqd/adhocracy3.git","ssh_url":"git@github.com:liqd/adhocracy3.git","clone_url":"https://github.com/liqd/adhocracy3.git","svn_url":"https://github.com/liqd/adhocracy3","homepage":"https://adhocracy3.readthedocs.io","size":25005,"stargazers_count":44,"watchers_count":44,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":true,"forks_count":14,"mirror_url":null,"open_issues_count":99,"forks":14,"open_issues":99,"watchers":44,"default_branch":"master"}},"base":{"label":"liqd:master","ref":"master","sha":"1ec9cdaee34f8b8dba4353c44170735088204167","user":{"login":"liqd","id":2312088,"avatar_url":"https://avatars.githubusercontent.com/u/2312088?v=3","gravatar_id":"","url":"https://api.github.com/users/liqd","html_url":"https://github.com/liqd","followers_url":"https://api.github.com/users/liqd/followers","following_url":"https://api.github.com/users/liqd/following{/other_user}","gists_url":"https://api.github.com/users/liqd/gists{/gist_id}","starred_url":"https://api.github.com/users/liqd/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/liqd/subscriptions","organizations_url":"https://api.github.com/users/liqd/orgs","repos_url":"https://api.github.com/users/liqd/repos","events_url":"https://api.github.com/users/liqd/events{/privacy}","received_events_url":"https://api.github.com/users/liqd/received_events","type":"Organization","site_admin":false},"repo":{"id":22982974,"name":"adhocracy3","full_name":"liqd/adhocracy3","owner":{"login":"liqd","id":2312088,"avatar_url":"https://avatars.githubusercontent.com/u/2312088?v=3","gravatar_id":"","url":"https://api.github.com/users/liqd","html_url":"https://github.com/liqd","followers_url":"https://api.github.com/users/liqd/followers","following_url":"https://api.github.com/users/liqd/following{/other_user}","gists_url":"https://api.github.com/users/liqd/gists{/gist_id}","starred_url":"https://api.github.com/users/liqd/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/liqd/subscriptions","organizations_url":"https://api.github.com/users/liqd/orgs","repos_url":"https://api.github.com/users/liqd/repos","events_url":"https://api.github.com/users/liqd/events{/privacy}","received_events_url":"https://api.github.com/users/liqd/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/liqd/adhocracy3","description":"Adhocracy 3 with customizations for various projects","fork":false,"url":"https://api.github.com/repos/liqd/adhocracy3","forks_url":"https://api.github.com/repos/liqd/adhocracy3/forks","keys_url":"https://api.github.com/repos/liqd/adhocracy3/keys{/key_id}","collaborators_url":"https://api.github.com/repos/liqd/adhocracy3/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/liqd/adhocracy3/teams","hooks_url":"https://api.github.com/repos/liqd/adhocracy3/hooks","issue_events_url":"https://api.github.com/repos/liqd/adhocracy3/issues/events{/number}","events_url":"https://api.github.com/repos/liqd/adhocracy3/events","assignees_url":"https://api.github.com/repos/liqd/adhocracy3/assignees{/user}","branches_url":"https://api.github.com/repos/liqd/adhocracy3/branches{/branch}","tags_url":"https://api.github.com/repos/liqd/adhocracy3/tags","blobs_url":"https://api.github.com/repos/liqd/adhocracy3/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/liqd/adhocracy3/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/liqd/adhocracy3/git/refs{/sha}","trees_url":"https://api.github.com/repos/liqd/adhocracy3/git/trees{/sha}","statuses_url":"https://api.github.com/repos/liqd/adhocracy3/statuses/{sha}","languages_url":"https://api.github.com/repos/liqd/adhocracy3/languages","stargazers_url":"https://api.github.com/repos/liqd/adhocracy3/stargazers","contributors_url":"https://api.github.com/repos/liqd/adhocracy3/contributors","subscribers_url":"https://api.github.com/repos/liqd/adhocracy3/subscribers","subscription_url":"https://api.github.com/repos/liqd/adhocracy3/subscription","commits_url":"https://api.github.com/repos/liqd/adhocracy3/commits{/sha}","git_commits_url":"https://api.github.com/repos/liqd/adhocracy3/git/commits{/sha}","comments_url":"https://api.github.com/repos/liqd/adhocracy3/comments{/number}","issue_comment_url":"https://api.github.com/repos/liqd/adhocracy3/issues/comments{/number}","contents_url":"https://api.github.com/repos/liqd/adhocracy3/contents/{+path}","compare_url":"https://api.github.com/repos/liqd/adhocracy3/compare/{base}...{head}","merges_url":"https://api.github.com/repos/liqd/adhocracy3/merges","archive_url":"https://api.github.com/repos/liqd/adhocracy3/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/liqd/adhocracy3/downloads","issues_url":"https://api.github.com/repos/liqd/adhocracy3/issues{/number}","pulls_url":"https://api.github.com/repos/liqd/adhocracy3/pulls{/number}","milestones_url":"https://api.github.com/repos/liqd/adhocracy3/milestones{/number}","notifications_url":"https://api.github.com/repos/liqd/adhocracy3/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/liqd/adhocracy3/labels{/name}","releases_url":"https://api.github.com/repos/liqd/adhocracy3/releases{/id}","deployments_url":"https://api.github.com/repos/liqd/adhocracy3/deployments","created_at":"2014-08-15T08:07:57Z","updated_at":"2016-06-13T16:05:33Z","pushed_at":"2016-06-28T08:05:59Z","git_url":"git://github.com/liqd/adhocracy3.git","ssh_url":"git@github.com:liqd/adhocracy3.git","clone_url":"https://github.com/liqd/adhocracy3.git","svn_url":"https://github.com/liqd/adhocracy3","homepage":"https://adhocracy3.readthedocs.io","size":25005,"stargazers_count":44,"watchers_count":44,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":true,"forks_count":14,"mirror_url":null,"open_issues_count":99,"forks":14,"open_issues":99,"watchers":44,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/liqd/adhocracy3/pulls/2453"},"html":{"href":"https://github.com/liqd/adhocracy3/pull/2453"},"issue":{"href":"https://api.github.com/repos/liqd/adhocracy3/issues/2453"},"comments":{"href":"https://api.github.com/repos/liqd/adhocracy3/issues/2453/comments"},"review_comments":{"href":"https://api.github.com/repos/liqd/adhocracy3/pulls/2453/comments"},"review_comment":{"href":"https://api.github.com/repos/liqd/adhocracy3/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/liqd/adhocracy3/pulls/2453/commits"},"statuses":{"href":"https://api.github.com/repos/liqd/adhocracy3/statuses/73ae74ff4e50901366fdd44d7ec903d9279e9997"}}}}
{"actor":{"display_login":"xi"}}