Sitic has uploaded a new change for review.

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

Change subject: Show links to page history and user contribs
......................................................................

Show links to page history and user contribs

Added links to page history and user contribs when a watchlist event is
clicked. (This will later be expanded to also show a diff)

Bug: T103677
Change-Id: I3612b66177fc2b993898f9925e271ed580b0d416
---
M frontend/src/app/index.css
M frontend/src/components/watchlist/edit.directive.html
M frontend/src/components/watchlist/page.directive.js
M frontend/src/components/watchlist/user.directive.js
M frontend/src/components/watchlist/watchlist.html
M frontend/src/i18n/locale-en.json
6 files changed, 19 insertions(+), 4 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/labs/tools/crosswatch 
refs/changes/91/220491/1

diff --git a/frontend/src/app/index.css b/frontend/src/app/index.css
index db23674..c6151ee 100644
--- a/frontend/src/app/index.css
+++ b/frontend/src/app/index.css
@@ -125,6 +125,10 @@
   overflow: hidden;
 }
 
+watchlist-entry:focus {
+  outline:none;
+}
+
 #watchlist:last-child md-divider {
   border-top: 0;
 }
diff --git a/frontend/src/components/watchlist/edit.directive.html 
b/frontend/src/components/watchlist/edit.directive.html
index 7da2727..fc01176 100644
--- a/frontend/src/components/watchlist/edit.directive.html
+++ b/frontend/src/components/watchlist/edit.directive.html
@@ -3,6 +3,9 @@
 ><span class="botedit" ng-if="::event.bot" translate="BOTEDIT_FLAG"></span>
 <a 
ng-href="{{::event.projecturl}}/w/index.php?oldid={{::event.old_revid}}&diff={{::event.revid}}"
    ng-class="::event.titlestyle"  target="_blank">{{::event.title}}</a>
+<span ng-if="event.clicked">
+  (<a href="{{::event.projecturl}}/w/index.php?title={{::event.title | 
urlEncode}}&action=history" translate="HISTORY"></a>)
+</span>
 <span ng-class="::event.bytestyle">({{::event.bytes}})</span>
 <div>
   <user></user>
diff --git a/frontend/src/components/watchlist/page.directive.js 
b/frontend/src/components/watchlist/page.directive.js
index 043f6d4..52f86f5 100644
--- a/frontend/src/components/watchlist/page.directive.js
+++ b/frontend/src/components/watchlist/page.directive.js
@@ -6,7 +6,10 @@
   var directive = {
     link: link,
     scope: true,
-    template: '<a href="{{::event.projecturl}}/wiki/{{::event.title | 
urlEncode}}"  target="_blank">{{::event.title}}</a>',
+    template: '<a href="{{::event.projecturl}}/wiki/{{::event.title | 
urlEncode}}"  target="_blank">{{::event.title}}</a> ' +
+    '<span ng-if="event.clicked">' +
+    '(<a href="{{::event.projecturl}}/w/index.php?title={{::event.title | 
urlEncode}}&action=history" translate="HISTORY"></a>)' +
+    '</span>',
     restrict: 'E'
   };
   return directive;
diff --git a/frontend/src/components/watchlist/user.directive.js 
b/frontend/src/components/watchlist/user.directive.js
index cd21010..2b3fdad 100644
--- a/frontend/src/components/watchlist/user.directive.js
+++ b/frontend/src/components/watchlist/user.directive.js
@@ -6,7 +6,10 @@
   var directive = {
     link: link,
     scope: true,
-    template: '<a href="{{::event.projecturl}}/wiki/User:{{::event.user | 
urlEncode}}"  target="_blank">{{::event.user}}</a>',
+    template: '<a href="{{::event.projecturl}}/wiki/User:{{::event.user | 
urlEncode}}"  target="_blank">{{::event.user}}</a> ' +
+    '<span ng-if="event.clicked">' +
+    '(<a 
href="{{::event.projecturl}}/wiki/Special:Contributions/{{::event.user | 
urlEncode}}" translate="CONTRIBS"></a>)' +
+    '</span>',
     restrict: 'E'
   };
   return directive;
diff --git a/frontend/src/components/watchlist/watchlist.html 
b/frontend/src/components/watchlist/watchlist.html
index dd450dd..94982e8 100644
--- a/frontend/src/components/watchlist/watchlist.html
+++ b/frontend/src/components/watchlist/watchlist.html
@@ -26,7 +26,7 @@
              infinite-scroll-distance="1">
       <md-list-item layout="row" id="watchlist"
                     ng-repeat="event in ctrl.watchlist.active track by 
event.id">
-        <watchlist-entry></watchlist-entry>
+        <watchlist-entry ng-click="event.clicked = !event.clicked" 
md-ink-ripple></watchlist-entry>
         <md-divider></md-divider>
       </md-list-item>
     </md-list>
diff --git a/frontend/src/i18n/locale-en.json b/frontend/src/i18n/locale-en.json
index df0be42..62c3899 100644
--- a/frontend/src/i18n/locale-en.json
+++ b/frontend/src/i18n/locale-en.json
@@ -63,5 +63,7 @@
   "NS_11": "Template talk",
   "NS_12": "Help",
   "NS_13": "Help talk",
-  "NS_OTHER": "Other namespaces"
+  "NS_OTHER": "Other namespaces",
+  "HISTORY": "history",
+  "CONTRIBS": "contribs"
 }

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I3612b66177fc2b993898f9925e271ed580b0d416
Gerrit-PatchSet: 1
Gerrit-Project: labs/tools/crosswatch
Gerrit-Branch: master
Gerrit-Owner: Sitic <jan.leb...@online.de>

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

Reply via email to