Robmoen has uploaded a new change for review.

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

Change subject: Remove privacy tag from public collection
......................................................................

Remove privacy tag from public collection

bug: T95639
Change-Id: I7bc5c53c1c60aac2ebaeb068eec9c0893d16b6d2
---
M includes/views/Collection.php
1 file changed, 9 insertions(+), 5 deletions(-)


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

diff --git a/includes/views/Collection.php b/includes/views/Collection.php
index 3abde95..d5b7df1 100644
--- a/includes/views/Collection.php
+++ b/includes/views/Collection.php
@@ -44,16 +44,20 @@
                $collection = $this->collection;
                $description = $collection->getDescription();
                $owner = $collection->getOwner();
+
                if ( $collection->isHidden() ) {
                        $privacy = 'Hidden';
-               } else {
-                       $privacy = $collection->isPublic() ? 'Public' : 
'Private';
+               } elseif ( !$collection->isPublic() ) {
+                       $privacy = 'Private';
                }
 
                $html = Html::openElement( 'div', array( 'class' => 
'collection-header' ) ) .
-                       Html::openElement( 'div', array( 'class' => 
'collection-meta' ) ) .
-                               Html::element( 'div', array( 'class' => 
'collection-privacy' ), $privacy ) .
-                       Html::closeElement( 'div' ) .
+                       Html::openElement( 'div', array( 'class' => 
'collection-meta' ) );
+               // Provide privacy tag if collection is not public
+               if ( isset( $privacy ) ) {
+                       $html .= Html::element( 'div', array( 'class' => 
'collection-privacy' ), $privacy );
+               }
+               $html .= Html::closeElement( 'div' ) .
                        Html::element( 'h1', array( 'id' => 'section_0' ), 
$collection->getTitle() ) .
                        Html::element( 'div', array( 'class' => 
'collection-description' ), $description ) .
                        $this->getOwnerHtml( $owner ) .

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I7bc5c53c1c60aac2ebaeb068eec9c0893d16b6d2
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Gather
Gerrit-Branch: master
Gerrit-Owner: Robmoen <rm...@wikimedia.org>

_______________________________________________
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to