Aklapper has uploaded a new change for review.

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


Change subject: [4.4] Update custom search-links so Saved Reports are displayed
......................................................................

[4.4] Update custom search-links so Saved Reports are displayed

DO NOT COMMIT until Bugzilla has been upgraded to 4.4.

Saved Reports are a new feature in 4.4 but we use custom code for
the sidebar so they'd never get displayed without updating this.

Bug: 59889
Change-Id: I1b243f32aa01eb1b6b5a80b29b518fbd3aea01e4
---
M template/en/custom/global/search-links.html.tmpl
1 file changed, 48 insertions(+), 27 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/wikimedia/bugzilla/modifications 
refs/changes/23/107423/1

diff --git a/template/en/custom/global/search-links.html.tmpl 
b/template/en/custom/global/search-links.html.tmpl
index ddbb19a..9c6f26d 100644
--- a/template/en/custom/global/search-links.html.tmpl
+++ b/template/en/custom/global/search-links.html.tmpl
@@ -1,31 +1,52 @@
+[%# This file is template/en/default/global/useful-links.html.tmpl in upstream 
 %]
 
-[%# Saved searches %]
+  [%# Saved searches %]
+    
+  [% IF user.showmybugslink OR user.queries.size 
+        OR user.queries_subscribed.size 
+  %]
+    <li id="links-saved">
+      <ul class="links">
+        [% IF user.showmybugslink %]
+          [% filtered_username = user.login FILTER uri %]
+          <li><a href="[% Param('mybugstemplate').replace('%userid%', 
filtered_username) %]">My [% terms.Bugs %]</a></li>
+          [% print_pipe = 1 %]
+        [% END %]
 
-                               [% IF user.showmybugslink %]
-                                       [% filtered_username = user.login 
FILTER uri %]
-                                       <li><a href="[% 
Param('mybugstemplate').replace('%userid%', filtered_username) %]">My [% 
terms.Bugs %]</a></li>
-                               [% END %]
+        [% FOREACH q = user.queries %]
+          [% IF q.link_in_footer %]
+            <li>
+            <a href="buglist.cgi?cmdtype=runnamed&amp;namedcmd=[% q.name 
FILTER uri %]">[% q.name FILTER html %]</a>
+            </li>
+          [% END %]
+        [% END %]
+        [% FOREACH q = user.queries_subscribed %]
+          [% IF new_line %]
+            <br>
+            [% new_line = 0 %]
+          [% END %]
+          <li>
+            <a href="buglist.cgi?cmdtype=dorem&amp;remaction=run&amp;namedcmd=
+                     [% q.name FILTER uri %]&amp;sharer_id=
+                     [% q.user.id FILTER uri %]"
+               class="shared"
+               title="Shared by [% q.user.identity FILTER html %]"
+               >[% q.name FILTER html FILTER %]</a>
+          </li>
+        [% END %]
+      </ul>
+    </li>
+  [% END %]
 
-                               [% FOREACH q = user.queries %]
-                                       [% IF q.link_in_footer %]
-                                               <li>
-                                                       <a 
href="buglist.cgi?cmdtype=runnamed&amp;namedcmd=[% q.name FILTER uri %]">[% 
q.name FILTER html %]</a>
-                                               </li>
-                                       [% END %]
-                               [% END %]
-                               [% FOREACH q = user.queries_subscribed %]
-                                       [% IF new_line %]
-                                               <br>
-                                               [% new_line = 0 %]
-                                       [% END %]
-                                       <li>
-                                               <a 
href="buglist.cgi?cmdtype=dorem&amp;remaction=run&amp;namedcmd=
-                                                       [% q.name FILTER uri 
%]&amp;sharer_id=
-                                                       [% q.user.id FILTER uri 
%]"
-                                                       class="shared"
-                                                       title="Shared by [% 
q.user.identity FILTER html %]"
-                                                       >[% q.name FILTER html 
%]
-                                               </a>
-                                       </li>
-                               [% END %]
+  [% IF user.reports.size %]
+    <li id="reports-saved">
+      <ul class="links">
+        [% FOREACH r = user.reports %]
+          <li>
+          <a href="report.cgi?[% r.query FILTER html %]&amp;saved_report_id=
+                  [%~ r.id FILTER uri %]">[% r.name FILTER html %]</a></li>
+        [% END %]
+      </ul>
+    </li>
+  [% END %]
 

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I1b243f32aa01eb1b6b5a80b29b518fbd3aea01e4
Gerrit-PatchSet: 1
Gerrit-Project: wikimedia/bugzilla/modifications
Gerrit-Branch: master
Gerrit-Owner: Aklapper <aklap...@wikimedia.org>

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

Reply via email to