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

Change subject: Add a tag showing privacy status
......................................................................


Add a tag showing privacy status

Bug: T93828
Change-Id: I02b24bfe2d93e9ad7a1b212aa8c9b30622c7fd55
---
M includes/views/Collection.php
M resources/ext.gather.styles/collections.less
2 files changed, 20 insertions(+), 0 deletions(-)

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



diff --git a/includes/views/Collection.php b/includes/views/Collection.php
index f1aa80d..3abde95 100644
--- a/includes/views/Collection.php
+++ b/includes/views/Collection.php
@@ -44,8 +44,16 @@
                $collection = $this->collection;
                $description = $collection->getDescription();
                $owner = $collection->getOwner();
+               if ( $collection->isHidden() ) {
+                       $privacy = 'Hidden';
+               } else {
+                       $privacy = $collection->isPublic() ? 'Public' : 
'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::element( 'h1', array( 'id' => 'section_0' ), 
$collection->getTitle() ) .
                        Html::element( 'div', array( 'class' => 
'collection-description' ), $description ) .
                        $this->getOwnerHtml( $owner ) .
diff --git a/resources/ext.gather.styles/collections.less 
b/resources/ext.gather.styles/collections.less
index ae0b5ae..84d3c90 100644
--- a/resources/ext.gather.styles/collections.less
+++ b/resources/ext.gather.styles/collections.less
@@ -56,6 +56,18 @@
                        color: @grayMediumLight;
                }
 
+               .collection-privacy {
+                       display: inline-block;
+                       background-color: #000;
+                       padding: .2em 0.8em;
+                       border-radius: .2em;
+                       color: @grayMediumLight;
+                       text-transform: uppercase;
+                       font-weight: 500;
+                       font-size: .7em;
+                       margin-bottom: 1em;
+               }
+
                .collection-owner {
                        .collection-owner-icon {
                                display: inline-block;

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

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

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

Reply via email to