Jhernandez has uploaded a new change for review.

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

Change subject: Add collection-owner icon
......................................................................

Add collection-owner icon

To user profile link when viewing a collection page.

Also:
         * Fix Resources.php icon paths
         * Remove duplicated useless icons folder

Change-Id: Id027a6f4baaa45d1fddcc3cb9cb01700bdc32430
---
M extension.json
D images/icons/next.svg
M includes/Resources.php
M includes/views/Collection.php
M resources/ext.collections.styles/collections.less
M resources/ext.collections.styles/icons.less
A resources/ext.collections.styles/images/icons/user.svg
7 files changed, 25 insertions(+), 15 deletions(-)


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

diff --git a/extension.json b/extension.json
index dfa5340..ea25c73 100644
--- a/extension.json
+++ b/extension.json
@@ -53,7 +53,8 @@
                        "prefix": "mw-ui",
                        "images": {
                                "icon": {
-                                       "collections-read-more:before": 
"images/icons/next.svg"
+                                       "collections-read-more:before": 
"ext.collections.styles/images/icons/next.svg",
+                                       "collection-owner:before": 
"ext.collections.styles/images/icons/user.svg"
                                }
                        }
                },
diff --git a/images/icons/next.svg b/images/icons/next.svg
deleted file mode 100644
index 5b2290e..0000000
--- a/images/icons/next.svg
+++ /dev/null
@@ -1,8 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<svg xmlns="http://www.w3.org/2000/svg"; viewBox="0 0 17.5 26" 
enable-background="new 0 0 17.5 26">
-    <g>
-        <g>
-            <path fill="#347BFF" d="M4.6 24.3l-3.1-3 8.4-8.4-8.4-8.4 3.1-3L16 
12.9z"/>
-        </g>
-    </g>
-</svg>
diff --git a/includes/Resources.php b/includes/Resources.php
index a1b2275..1cf57b7 100644
--- a/includes/Resources.php
+++ b/includes/Resources.php
@@ -57,7 +57,8 @@
                'images' => array(
                        // FIXME: ':before' suffix should be configurable in 
image module.
                        'icon' => array(
-                               'collections-read-more:before' => 
'images/icons/next.svg',
+                               'collections-read-more:before' => 
'ext.collections.styles/images/icons/next.svg',
+                               'collection-owner:before' => 
'ext.collections.styles/images/icons/user.svg',
                        ),
                ),
        ),
diff --git a/includes/views/Collection.php b/includes/views/Collection.php
index 7627265..58da4fa 100644
--- a/includes/views/Collection.php
+++ b/includes/views/Collection.php
@@ -54,9 +54,11 @@
         */
        private function getOwnerHtml( $owner ) {
                return Html::openElement( 'a', array(
-                               'href' => SpecialPage::getTitleFor( 
'UserProfile', $owner->getName() )->getLocalUrl() ) ) .
+                               'href' => SpecialPage::getTitleFor( 
'UserProfile', $owner->getName() )->getLocalUrl(),
+                               'class' => 'collection-owner',
+                       ) ) .
                        Html::element( 'span', array(
-                               'class' => CSS::iconClass( 'user', 'before', 
'collections-owner' ) ) ) .
+                               'class' => CSS::iconClass( 'collection-owner', 
'before', 'collection-owner-icon' ) ) ) .
                        $owner->getName() .
                        Html::closeElement( 'a' );
        }
diff --git a/resources/ext.collections.styles/collections.less 
b/resources/ext.collections.styles/collections.less
index 327acf7..9424291 100644
--- a/resources/ext.collections.styles/collections.less
+++ b/resources/ext.collections.styles/collections.less
@@ -47,9 +47,10 @@
                }
 
                .collection-owner {
-                       &.mw-ui-icon-before:before {
-                               margin-right: 0.5em;
-                               width: 1em;
+                       .collection-owner-icon {
+                               vertical-align: top;
+                               width: 1.7em;
+                               min-width: 1.7em;
                        }
                }
 
diff --git a/resources/ext.collections.styles/icons.less 
b/resources/ext.collections.styles/icons.less
index e698ed0..edb4def 100644
--- a/resources/ext.collections.styles/icons.less
+++ b/resources/ext.collections.styles/icons.less
@@ -3,7 +3,16 @@
 @import "minerva.mixins";
 @import "mediawiki.mixins";
 
+span.mw-ui-icon {
+  display: inline-block;
+}
+
 .mw-ui-icon-collections-read-more {
        .m-background-image-svg-quick( 'images/icons/next' );
 }
 
+.mw-ui-icon-collection-owner {
+       .m-background-image-svg-quick( 'images/icons/user' );
+}
+
+
diff --git a/resources/ext.collections.styles/images/icons/user.svg 
b/resources/ext.collections.styles/images/icons/user.svg
new file mode 100644
index 0000000..9fb090e
--- /dev/null
+++ b/resources/ext.collections.styles/images/icons/user.svg
@@ -0,0 +1,4 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<svg xmlns="http://www.w3.org/2000/svg"; viewBox="0 0 24 24" 
enable-background="new 0 0 24 24">
+    <path d="M16 5H4v12c0 1.7 1.3 3 3 3h12V8c0-1.7-1.3-3-3-3zm-2 4c.7 0 1.2.6 
1.2 1.2s-.6 1.2-1.2 1.2-1.2-.6-1.2-1.2S13.3 9 14 9zM9 9c.7 0 1.2.6 1.2 1.2s-.5 
1.3-1.2 1.3-1.2-.6-1.2-1.2S8.3 9 9 9zm7 5.4c0 .2-.1.3-.3.5-.7.6-1.6 1-2.6 
1.3s-2.1.2-3.1 0-2-.9-2.7-1.5c-.1-.1-.2-.3-.2-.4s.1-.3.2-.4c.1-.1.3-.2.4-.2.2 0 
.3.1.4.2.5.5 1.2.9 2.1 1.1s1.7.2 2.6 0 1.6-.5 
2.1-1c.1-.1.3-.2.4-.2s.3.1.5.2.2.2.2.4z"/>
+</svg>

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Id027a6f4baaa45d1fddcc3cb9cb01700bdc32430
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Gather
Gerrit-Branch: master
Gerrit-Owner: Jhernandez <[email protected]>

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

Reply via email to