jenkins-bot has submitted this change and it was merged.

Change subject: Don't show Delete button on a collection page
......................................................................


Don't show Delete button on a collection page

* Only on the edit overlay

Bug: T95732
Change-Id: I71dc36d36a19b4eb6c1cce4769b8ae56c89d65bf
---
M includes/views/Collection.php
1 file changed, 0 insertions(+), 19 deletions(-)

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



diff --git a/includes/views/Collection.php b/includes/views/Collection.php
index d22bdac..ea2f796 100644
--- a/includes/views/Collection.php
+++ b/includes/views/Collection.php
@@ -97,7 +97,6 @@
                                )
                        ) .
                        $this->getEditButtonHtml() .
-                       $this->getDeleteButtonHtml() .
                        Html::closeElement( 'div' );
        }
 
@@ -113,24 +112,6 @@
                                'href' => '#/collection/edit/' . $id,
                                'class' => CSS::buttonClass( 'progressive', 
'collection-action-button edit-collection' )
                        ), wfMessage( 'gather-edit-button' )->text() );
-               } else {
-                       return '';
-               }
-       }
-
-
-       /**
-        * Gets the delete button html if the user can delete
-        * Restricted to collection owner and does not apply to watchlist
-        */
-       public function getDeleteButtonHtml() {
-               $id = $this->collection->getId();
-               if ( $this->collection->isOwner( $this->user ) && $id !== 0 ) {
-                       return Html::element( 'a', array(
-                               // FIXME: This should work without JavaScript
-                               'href' => '#/collection/delete/' . $id,
-                               'class' => CSS::buttonClass( 'destructive', 
'collection-action-button delete-collection' )
-                       ), wfMessage( 'gather-delete-button' )->text()  );
                } else {
                        return '';
                }

-- 
To view, visit https://gerrit.wikimedia.org/r/204243
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: I71dc36d36a19b4eb6c1cce4769b8ae56c89d65bf
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Gather
Gerrit-Branch: master
Gerrit-Owner: Jhernandez <[email protected]>
Gerrit-Reviewer: Jdlrobson <[email protected]>
Gerrit-Reviewer: jenkins-bot <>

_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to