[MediaWiki-commits] [Gerrit] A user can delete their own collection - change (mediawiki...Gather)

2015-03-12 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged.

Change subject: A user can delete their own collection
..


A user can delete their own collection

* Add delete button to a removable collection view
* Adds a ContentOverlay for deleting a collection
* Add api method for removing a collection
* On delete, redirect to Special:Gather as collection
** No longer will exist

Bug: T91776
Change-Id: Ic561292d483502e4a44dfa0aa00acba83bf43f8f
---
M extension.json
M i18n/en.json
M i18n/qqq.json
M includes/views/Collection.php
M resources/Resources.php
A resources/ext.gather.collection.delete/CollectionDeleteOverlay.js
A resources/ext.gather.collection.delete/content.hogan
A resources/ext.gather.collection.delete/deleteOverlay.less
M resources/ext.gather.special/init.js
M resources/ext.gather.styles/collections.less
M resources/ext.gather.watchstar/CollectionsApi.js
11 files changed, 249 insertions(+), 9 deletions(-)

Approvals:
  Jdlrobson: Looks good to me, approved
  jenkins-bot: Verified



diff --git a/extension.json b/extension.json
index 209a1e9..4fbaafe 100644
--- a/extension.json
+++ b/extension.json
@@ -168,7 +168,8 @@
gather-edit-collection-label-name,
gather-edit-collection-label-description,
gather-edit-collection-label-privacy,
-   gather-edit-collection-save-label
+   gather-edit-collection-save-label,
+   gather-error-unknown-collection
],
templates: {
content.hogan: 
ext.gather.collection.editor/content.hogan
@@ -180,6 +181,36 @@
ext.gather.collection.editor/editOverlay.less
]
},
+   ext.gather.collection.delete: {
+   targets: [
+   mobile,
+   desktop
+   ],
+   dependencies: [
+   mobile.overlays,
+   mobile.toast,
+   ext.gather.api,
+   mediawiki.util
+   ],
+   messages: [
+   gather-delete-collection-confirm,
+   gather-delete-collection-heading,
+   gather-delete-collection-delete-label,
+   gather-delete-collection-cancel-label,
+   gather-delete-collection-success,
+   gather-delete-collection-failed-error,
+   gather-error-unknown-collection
+   ],
+   templates: {
+   content.hogan: 
ext.gather.collection.delete/content.hogan
+   },
+   scripts: [
+   
ext.gather.collection.delete/CollectionDeleteOverlay.js
+   ],
+   styles: [
+   
ext.gather.collection.delete/deleteOverlay.less
+   ]
+   },
ext.gather.special: {
targets: [
mobile,
@@ -187,7 +218,8 @@
],
group: other,
dependencies: [
-   ext.gather.collection.editor
+   ext.gather.collection.editor,
+   ext.gather.collection.delete
],
scripts: [
ext.gather.special/init.js
diff --git a/i18n/en.json b/i18n/en.json
index d18f52d..94976b7 100644
--- a/i18n/en.json
+++ b/i18n/en.json
@@ -8,6 +8,12 @@
gather-edit-collection-label-privacy: Private collection,
gather-edit-collection-save-label: Done,
gather-edit-collection-failed-error: There was a problem saving the 
changes.,
+   gather-delete-collection-confirm: Are you sure you want to delete 
this collection?,
+   gather-delete-collection-heading: Delete collection,
+   gather-delete-collection-delete-label: Delete,
+   gather-delete-collection-cancel-label: Cancel,
+   gather-delete-collection-success: Collection was successfully 
deleted.,
+   gather-delete-collection-failed-error: There was a problem deleting 
this collection.,
gather-error-unknown-collection: Cannot find the requested 
collection to edit.,
gather-collection-member: Is member of collection.,
gather-collection-non-member: Is not member of collection.,
@@ -32,6 +38,7 @@
gather-empty: Nothing in this collection yet...,

[MediaWiki-commits] [Gerrit] A user can delete their own collection - change (mediawiki...Gather)

2015-03-11 Thread Robmoen (Code Review)
Robmoen has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/196055

Change subject: A user can delete their own collection
..

A user can delete their own collection

* Add delete button to a removable collection view
* Adds a ContentOverlay for deleting a collection
* Add api method for removing a collection

Bug: T91776
Change-Id: Ic561292d483502e4a44dfa0aa00acba83bf43f8f
---
M extension.json
M i18n/en.json
M i18n/qqq.json
M includes/views/Collection.php
M resources/Resources.php
A resources/ext.gather.collection.delete/CollectionDeleteOverlay.js
A resources/ext.gather.collection.delete/content.hogan
A resources/ext.gather.collection.delete/deleteOverlay.less
M resources/ext.gather.special/init.js
M resources/ext.gather.styles/collections.less
M resources/ext.gather.watchstar/CollectionsApi.js
11 files changed, 249 insertions(+), 9 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Gather 
refs/changes/55/196055/1

diff --git a/extension.json b/extension.json
index 5c57d94..484ab5f 100644
--- a/extension.json
+++ b/extension.json
@@ -167,7 +167,8 @@
gather-edit-collection-label-name,
gather-edit-collection-label-description,
gather-edit-collection-label-privacy,
-   gather-edit-collection-save-label
+   gather-edit-collection-save-label,
+   gather-error-unknown-collection
],
templates: {
content.hogan: 
ext.gather.collection.editor/content.hogan
@@ -179,6 +180,36 @@
ext.gather.collection.editor/editOverlay.less
]
},
+   ext.gather.collection.delete: {
+   targets: [
+   mobile,
+   desktop
+   ],
+   dependencies: [
+   mobile.overlays,
+   mobile.toast,
+   ext.gather.api,
+   mediawiki.util
+   ],
+   messages: [
+   gather-delete-collection-confirm,
+   gather-delete-collection-heading,
+   gather-delete-collection-delete-label,
+   gather-delete-collection-cancel-label,
+   gather-delete-collection-success,
+   gather-delete-collection-failed-error,
+   gather-error-unknown-collection
+   ],
+   templates: {
+   content.hogan: 
ext.gather.collection.delete/content.hogan
+   },
+   scripts: [
+   
ext.gather.collection.delete/CollectionDeleteOverlay.js
+   ],
+   styles: [
+   
ext.gather.collection.delete/deleteOverlay.less
+   ]
+   },
ext.gather.special: {
targets: [
mobile,
@@ -186,7 +217,8 @@
],
group: other,
dependencies: [
-   ext.gather.collection.editor
+   ext.gather.collection.editor,
+   ext.gather.collection.delete
],
scripts: [
ext.gather.special/init.js
diff --git a/i18n/en.json b/i18n/en.json
index d18f52d..94976b7 100644
--- a/i18n/en.json
+++ b/i18n/en.json
@@ -8,6 +8,12 @@
gather-edit-collection-label-privacy: Private collection,
gather-edit-collection-save-label: Done,
gather-edit-collection-failed-error: There was a problem saving the 
changes.,
+   gather-delete-collection-confirm: Are you sure you want to delete 
this collection?,
+   gather-delete-collection-heading: Delete collection,
+   gather-delete-collection-delete-label: Delete,
+   gather-delete-collection-cancel-label: Cancel,
+   gather-delete-collection-success: Collection was successfully 
deleted.,
+   gather-delete-collection-failed-error: There was a problem deleting 
this collection.,
gather-error-unknown-collection: Cannot find the requested 
collection to edit.,
gather-collection-member: Is member of collection.,
gather-collection-non-member: Is not member of collection.,
@@ -32,6 +38,7 @@
gather-empty: Nothing in this collection yet...,
gather-empty-footer: I don't know how you