diff options
author | Kohei Yoshino <kohei.yoshino@gmail.com> | 2018-01-08 20:52:22 +0100 |
---|---|---|
committer | Dylan William Hardison <dylan@hardison.net> | 2018-01-08 20:52:22 +0100 |
commit | 91dc6dc99fa7a699e0b8e822a5c294509c9e9eb7 (patch) | |
tree | 01ab20bc979b3703856b776643c638f8b300f84d /extensions/Review/template/en/default/hook/global/header-badge.html.tmpl | |
parent | 9b3834764b26d0a806b72fdc3657075b7ab9c7c0 (diff) | |
download | bugzilla-91dc6dc99fa7a699e0b8e822a5c294509c9e9eb7.tar.gz bugzilla-91dc6dc99fa7a699e0b8e822a5c294509c9e9eb7.tar.xz |
Bug 1428641 - Implement Requests quick look dropdown on global header
Diffstat (limited to 'extensions/Review/template/en/default/hook/global/header-badge.html.tmpl')
-rw-r--r-- | extensions/Review/template/en/default/hook/global/header-badge.html.tmpl | 47 |
1 files changed, 32 insertions, 15 deletions
diff --git a/extensions/Review/template/en/default/hook/global/header-badge.html.tmpl b/extensions/Review/template/en/default/hook/global/header-badge.html.tmpl index aca61561e..df3dd82be 100644 --- a/extensions/Review/template/en/default/hook/global/header-badge.html.tmpl +++ b/extensions/Review/template/en/default/hook/global/header-badge.html.tmpl @@ -6,18 +6,35 @@ # defined by the Mozilla Public License, v. 2.0. #%] -[% RETURN UNLESS - user.review_request_count - || user.feedback_request_count - || user.needinfo_request_count -%] - -<a id="header-flags" class="badge" - href="request.cgi?action=queue&requestee=[% user.login FILTER uri %]&group=type" - title="Flags requested of you: - [%- " review (" _ user.review_request_count _ ")" IF user.review_request_count -%] - [%- " feedback (" _ user.feedback_request_count _ ")" IF user.feedback_request_count -%] - [%- " needinfo (" _ user.needinfo_request_count _ ")" IF user.needinfo_request_count -%] -"> - [%- user.review_request_count + user.feedback_request_count + user.needinfo_request_count ~%] -</a> +[% IF user.id %] + [% request_count = user.review_request_count + user.feedback_request_count + user.needinfo_request_count %] + <div id="header-requests" class="dropdown"> + <button type="button" id="header-requests-menu-button" class="dropdown-button minor" + title="Requests for you[%- IF request_count -%]: + [%- " review (" _ user.review_request_count _ ")" IF user.review_request_count -%] + [%- " feedback (" _ user.feedback_request_count _ ")" IF user.feedback_request_count -%] + [%- " needinfo (" _ user.needinfo_request_count _ ")" IF user.needinfo_request_count -%][%- END -%]" + aria-label="Requests for you" aria-expanded="false" aria-haspopup="true" aria-controls="header-requests-menu"> + [%- IF request_count -%] + <span class="badge">[% request_count FILTER html %]</span> + [%- ELSE -%] + <span class="icon" aria-hidden="true"></span> + [%- END -%] + </button> + <section class="dropdown-content dropdown-panel left" id="header-requests-menu" role="menu" style="display:none;"> + <header> + <h2>Requests</h2> + </header> + [%- IF request_count -%] + <div class="loading">Loading…</div> + <ul class="notifications" role="none" hidden></ul> + [%- ELSE -%] + <div class="empty">You’re all caught up!</div> + [%- END -%] + <footer> + <div><a href="request.cgi?action=queue&requestee=[% user.login FILTER uri %]&group=requestee" + role="menuitem" tabindex="-1">See All</a></div> + </footer> + </section> + </div> +[% END %] |