diff options
Diffstat (limited to 'template/en/custom/global')
-rw-r--r-- | template/en/custom/global/choose-product.html.tmpl | 246 | ||||
-rw-r--r-- | template/en/custom/global/common-links.html.tmpl | 153 | ||||
-rw-r--r-- | template/en/custom/global/footer.html.tmpl | 121 | ||||
-rw-r--r-- | template/en/custom/global/header.html.tmpl | 278 | ||||
-rw-r--r-- | template/en/custom/global/product-select.html.tmpl | 98 | ||||
-rw-r--r-- | template/en/custom/global/select-menu.html.tmpl | 52 | ||||
-rw-r--r-- | template/en/custom/global/tabs.html.tmpl | 50 | ||||
-rw-r--r-- | template/en/custom/global/textarea.html.tmpl | 58 | ||||
-rw-r--r-- | template/en/custom/global/useful-links.html.tmpl | 74 |
9 files changed, 1130 insertions, 0 deletions
diff --git a/template/en/custom/global/choose-product.html.tmpl b/template/en/custom/global/choose-product.html.tmpl new file mode 100644 index 000000000..59c2d86e9 --- /dev/null +++ b/template/en/custom/global/choose-product.html.tmpl @@ -0,0 +1,246 @@ +[%# This Source Code Form is subject to the terms of the Mozilla Public + # License, v. 2.0. If a copy of the MPL was not distributed with this + # file, You can obtain one at http://mozilla.org/MPL/2.0/. + # + # This Source Code Form is "Incompatible With Secondary Licenses", as + # defined by the Mozilla Public License, v. 2.0. + #%] + +[%# INTERFACE: + # classifications: array of hashes, with an 'object' key representing a + # classification object and 'products' the list of + # product objects the user can enter bugs into. + # target: the script that displays this template. + #%] + +[% IF target == "enter_bug.cgi" %] + [% title = "Enter $terms.Bug" %] + [% subheader = "Select Product" %] + [% h2 = BLOCK %] + [% IF Param('useclassification') %]Next[% ELSE %]First[% END %], + you must pick a product on which to enter [% terms.abug %]: + [% END %] +[% ELSIF target == "describecomponents.cgi" %] + [% title = "Browse" %] + [% h2 = "Select a product category to browse" %] +[% END %] + +[% DEFAULT title = "Choose a Product" %] +[% PROCESS global/header.html.tmpl %] + +[% USE Bugzilla %] +[% previous_params = Bugzilla.cgi.canonicalise_query('classification', 'product') %] + +<h2>[% h2 FILTER html %]</h2> +[% IF target == "enter_bug.cgi" %] +<small> +Please consult the <a href="https://www.gentoo.org/doc/en/bugzilla-howto.xml#doc_chap6">Bug Reporting Guide</a> +on how to choose the proper product for your issue. +</small> +[% END %] + +<hr/> + +[% IF target == "enter_bug.cgi" %] +<span>If you are <strong>unsure</strong>, please file your bug in this product:</span><br/><br/> + +<div class="row"> +<div class="col-sm-10"> +<div class="panel panel-default" style="cursor:pointer;" onclick="document.location='enter_bug.cgi?product=Gentoo%20Linux[%- IF previous_params %]&[% previous_params FILTER none %][% END -%]'"> +<div class="panel-body"> + <div class="row"> + <div class="col-sm-2"> + <img src="https://www.gentoo.org/assets/img/logo/gentoo-signet.svg" style="width:100%;" /> + </div> + <div class="col-sm-10"> + <table id="choose_product"> + <tr class="hilight"> + + <td valign="top"><b>The Gentoo Linux Distribution – Ebuilds and System related issues</b></td> + </tr> + <tr> + <td> + <strong>Always attach the output of <tt>emerge --info</tt> to your bug report!</strong> + <br /><br /> + Before reporting a bug, please make sure the issue you are about to file + is not the result of a misconfiguration on your part.<br /> + Our other support venues (for instance the + <a href="https://forums.gentoo.org/">Forums</a> or + <a href="https://www.gentoo.org/main/en/irc.xml">IRC channels</a>) + can help you find out whether the issue warrants a bug report. + <br /><br /> + Examples for bugs in this product: + <ul> + <li>New package and version bump requests</li> + <li>Compile errors (please follow the instructions contained in the error message!)</li> + <li>Application crashes (be sure to have a <a href="https://www.gentoo.org/proj/en/qa/backtraces.xml">backtrace</a> available)</li> + <li>General issues regarding your Gentoo system</li> + </ul> + + Examples for bugs that should <span style="color: #a40000;">NOT</span> be filed here: + <ul> + <li>Security updates (use <em>Gentoo Security</em> below)</li> + <li>Documentation updates (use <em>Documentation</em> below)</li> + <li>Issues regarding our website and infrastructure (use <em>Gentoo Infrastructure</em> or <em>Website www.gentoo.org</em> below)</li> + <li>Issues about <em>OpenRC</em>, <em>genkernel</em>, or <em>catalyst</em> (use <em>Hosted projects</em> below)</li> + </ul> + </td></tr> + <tr> + </table> + </div> + </div> +</div> +</div> +</div> +</div> + +<br/> +<span>Or, use one of the following products <strong>if you know that your choice is correct:</strong></span> + +[% END %] + + +<!-- TODO implement switch view --> + +<div class="row" style="margin-bottom:10px;"> +<div class="col-sm-12"> + + <ul class="nav nav-pills pull-right" role="tablist"> + <li role="presentation" class=" active"> + <a class="btn btn-default btn-xs bgo_tab" style="border-right:0px; border-top-right-radius: 0px; border-bottom-right-radius: 0px;" href="#detailed" aria-controls="detailed" role="tab" data-toggle="tab"><i class="fa fa-th-large" aria-hidden="true"></i></a> + </li> + <li role="presentation" class="" style="margin-left:0px;"> + <a class="btn btn-default btn-xs bgo_tab" style="border-right:0px; border-top-right-radius: 0px; border-bottom-right-radius: 0px;border-top-left-radius: 0px; border-bottom-left-radius: 0px;" href="#condensed" aria-controls="condensed" role="tab" data-toggle="tab"><i class="fa fa-th" aria-hidden="true"></i></a> + </li> + <li role="presentation" class="" style="margin-left:0px;"> + <a class="btn btn-default btn-xs bgo_tab" style="border-top-left-radius: 0px; border-bottom-left-radius: 0px;" href="#list" aria-controls="list" role="tab" data-toggle="tab"><i class="fa fa-list-ul" aria-hidden="true"></i></a> + </li> + </ul> +</div> +</div> + + +<div class="tab-content"> +<div role="tabpanel" class="tab-pane" id="list"> + + +<table id="choose_product"> +[% FOREACH c = classifications %] + [% IF c.object %] + <tr> + <th colspan="2" class="left">[% c.object.name FILTER html %]: + [%+ c.object.description FILTER html_light %]</th> + </tr> + [% END %] + + [% FOREACH p = c.products %] + <tr> + <th class="right nowrap"> + <a href="[% target %]?product=[% p.name FILTER uri -%] + [%- IF previous_params %]&[% previous_params FILTER none %][% END -%]"> + [% p.name FILTER html %]</a>: + </th> + + <td>[% p.description FILTER html_light %]</td> + </tr> + [% END %] + + <tr> + <th colspan="2"> </th> + </tr> +[% END %] + +</table> +</div> + + +<div role="tabpanel" class="tab-pane" id="condensed"> + [% FOREACH c = classifications %] + + [% IF c.object %] + <h4>[% c.object.name FILTER html %]: [%+ c.object.description FILTER html_light %]</h4> + <hr/> + [% END %] + + <div class="row" style="width:100%; display: -webkit-flex;display: flex;flex-wrap:wrap;margin-bottom:40px;"> + + [% FOREACH p = c.products %] + + <div class="col-sm-3" style="margin-top:20px;"> + <div class="panel panel-default" style="cursor:pointer;height:60px;" onclick="document.location='[% target %]?product=[% p.name FILTER uri -%][%- IF previous_params %]&[% previous_params FILTER none %][% END -%]'"> + <div class="panel-body" style="height:60px;overflow:hidden;padding-top:5px;padding-bottom:5px;"> + <div class="row equal"> + <div class="col-sm-3 align-v-center" style="height:50px;"> + [% IF p.name == "Gentoo Linux" %] + <img src="https://www.gentoo.org/assets/img/logo/gentoo-signet.svg" style="height:40px;" /> + [% ELSIF p.name == "GURU" %] + <img src="https://wiki.gentoo.org/images/4/47/GURU.svg" style="height:50px;" /> + [% ELSE %] + <img src="https://www.gentoo.org/assets/img/logo/gentoo-signet.svg" style="height:40px;" /> + [% END %] + </div> + <div class="col-sm-9 align-v-center" style="padding: 0px;height:50px;"> + <h4 class="" style="margin:0px;"> + <a style="color:#555;" href="[% target %]?product=[% p.name FILTER uri -%] + [%- IF previous_params %]&[% previous_params FILTER none %][% END -%]">[% p.name FILTER html %]</a> + </h4> + </div> + </div> + </div> + </div> + </div> + [% END %] + </div> + [% END %] +</div> + + + +<div role="tabpanel" class="tab-pane active" id="detailed"> +[% FOREACH c = classifications %] + +[% IF c.object %] +<h4>[% c.object.name FILTER html %]: [%+ c.object.description FILTER html_light %]</h4> +<hr/> +[% END %] + +<div class="row" style="width:100%; display: -webkit-flex;display: flex;flex-wrap:wrap;margin-bottom:40px;"> + +[% FOREACH p = c.products %] + +<div class="col-sm-4" style="margin-top:20px;"> + <div class="panel panel-default" style="cursor:pointer;height:100%;" onclick="document.location='[% target %]?product=[% p.name FILTER uri -%][%- IF previous_params %]&[% previous_params FILTER none %][% END -%]'"> + <div class="panel-body" style="padding-bottom: 0px;"> + <div class="row"> + <div class="col-sm-4"> + [% IF p.name == "Gentoo Linux" %] + <img src="https://www.gentoo.org/assets/img/logo/gentoo-signet.svg" style="width:100%;" /> + [% ELSIF p.name == "GURU" %] + <img src="https://wiki.gentoo.org/images/4/47/GURU.svg" style="width:100%;" /> + [% ELSE %] + <img src="https://www.gentoo.org/assets/img/logo/gentoo-signet.svg" style="width:100%;" /> + [% END %] + + + </div> + <div class="col-sm-8"> + <b><a style="color:#555;" href="[% target %]?product=[% p.name FILTER uri -%] + [%- IF previous_params %]&[% previous_params FILTER none %][% END -%]">[% p.name FILTER html %]</a> + </b><p style="color:#777;padding-bottom: 0px;"> + [% p.description FILTER html_light %] + </p> + </div> + </div> + </div> + </div> +</div> +[% END %] +</div> +[% END %] +</div> + +</div> + + + +[% PROCESS global/footer.html.tmpl %] diff --git a/template/en/custom/global/common-links.html.tmpl b/template/en/custom/global/common-links.html.tmpl new file mode 100644 index 000000000..3f09d0496 --- /dev/null +++ b/template/en/custom/global/common-links.html.tmpl @@ -0,0 +1,153 @@ +[%# This Source Code Form is subject to the terms of the Mozilla Public + # License, v. 2.0. If a copy of the MPL was not distributed with this + # file, You can obtain one at http://mozilla.org/MPL/2.0/. + # + # This Source Code Form is "Incompatible With Secondary Licenses", as + # defined by the Mozilla Public License, v. 2.0. + #%] + +[% DEFAULT qs_suffix = "" %] +[% USE Bugzilla %] + +<nav class="tyrian-navbar" role="navigation"> +<div class="container"> + <div class="row"> + <div class="navbar-header"> + <button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".navbar-main-collapse"> + <span class="sr-only">Toggle navigation</span> + <span class="icon-bar"></span> + <span class="icon-bar"></span> + <span class="icon-bar"></span> + </button> + </div> + <div class="collapse navbar-collapse navbar-main-collapse"> + <ul class="nav navbar-nav"> + + <!-- TODO Can we use the Gentoo logo instead? --> + <li><a href="./">Home</a></li> + + + + <li><a href="enter_bug.cgi?format=guided">New</a></li> + <li><a href="enter_bug.cgi">[Ex]</a></li> + <li><a href="describecomponents.cgi">Browse</a></li> + <li><a href="query.cgi">Search</a></li> + + [% IF user.login %] + <li><a href="page.cgi?id=mydashboard.html">Dashboard</a></li> + [% END %] + + + + + <li class="dropdown"> + <a class="dropdown-toggle" data-toggle="dropdown" role="button" aria-expanded="false"><i class="fa fa-angle-double-right" aria-hidden="true"></i></a> + <ul class="dropdown-menu" role="menu"> + <li><a href="report.cgi" style="color:#262626">Reports</a></li> + <li><a href="https://wiki.gentoo.org/wiki/Foundation:Privacy_Policy" style="color:#262626">Privacy Policy</a></li> + [% PROCESS link_to_documentation %] + </ul> + </li> + + </ul> + + <ul class="nav navbar-nav navbar-right hidden-xs"> + + + [% IF Param('shutdownhtml') || Bugzilla.has_flags %] + [% IF user.id %] + <li><a href="request.cgi?requester=[% user.login FILTER uri %]&requestee= + [% user.login FILTER uri %]&do_union=1&group=type&action=queue"><i class="fa fa-bell" aria-hidden="true"></i></a></li> + + + + [%-# Work around FF bug: keep this on one line %]</li> + [% ELSE %] + <li><a href="request.cgi"><i class="fa fa-bell" aria-hidden="true"></i></a>[%-# Work around FF bug: keep this on one line %]</li> + [% END %] + [% END %] + + + [% Hook.process('action-links') %] + + + <li class="dropdown"> + <a href="/wiki/Gentoo_Wiki:Menu-Documentation" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-expanded="false"> <span class="fa fa-user" aria-label="Personal tools"></span> [% IF sudoer %] [%+ sudoer.login FILTER html %] (<b>impersonating [%+ user.login FILTER html %]</b> <a href="relogin.cgi?action=end-sudo">end session</a>) [% ELSE %] [%+ user.login FILTER html %] [% END %] <span class="caret"></span></a> + <ul class="dropdown-menu" role="menu"> + + [% IF user.login %] + <li><a href="userprefs.cgi" style="color:#262626">Preferences</a></li> + + [% IF user.can_administer %] + <li><a href="admin.cgi" style="color:#262626">Administration</a></li> + [% END %] + + <li> + [% IF user.authorizer.can_logout %] + <a href="index.cgi?logout=1" style="color:#262626">Log out</a> + [% ELSE %] + Logged in as + [% END %] + [%-# Work around FF bug: keep this on one line %]</li> + [% ELSE %] + + [% IF Param('createemailregexp') + && user.authorizer.user_can_create_account %] + <li id="new_account_container[% qs_suffix FILTER html %]"> + <a href="createaccount.cgi" style="color:#262626">New Account</a> + </li> + [% END %] + + [%# Only display one login form when we're on a LOGIN_REQUIRED page. That + # way, we're guaranteed that the user will use the form that has + # hidden_fields in it (the center form) instead of this one. Also, it's + # less confusing to have one form (as opposed to three) when you're + # required to log in. + #%] + [% IF user.authorizer.can_login && !Bugzilla.page_requires_login %] + [% PROCESS "account/auth/login-small.html.tmpl" %] + [% END %] + [% END %] + </ul> + </li> + </ul> + + <form action="buglist.cgi" class="navbar-form navbar-right" method="get" + onsubmit="if (this.quicksearch.value == '') + { alert('Please enter one or more search terms first.'); + return false; } return true;"> + + <input type="hidden" id="no_redirect[% qs_suffix FILTER html %]" name="no_redirect" value="0"> + <script type="text/javascript"> + if (history && history.replaceState) { + var no_redirect = document.getElementById("no_redirect[% qs_suffix FILTER js %]"); + no_redirect.value = 1; + } + </script> + <div class="input-group" style="margin-top:2px;"> + <span class="input-group-addon" style="background:#61597b;color:#FFF;border:0px;" id="basic-addon1"><i class="fa fa-search" aria-hidden="true"></i></span> + <input class="form-control" style="height:30px;border:0px;background:#61597b;color:#FFF;padding-left:0px;box-shadow: none;" type="text" id="quicksearch[% qs_suffix FILTER html %]" name="quicksearch" + title="Quick Search" placeholder="Search Bugs" value="[% quicksearch FILTER html %]"> + </div> + <button class="btn btn-default hidden" type="submit" value="Search" + id="find[% qs_suffix FILTER html %]">Search</button> + + [%-# Work around FF bug: keep this on one line %]</form> + + </div> + </div> +</div> +</nav> + + + + + [% Hook.process("link-row") %] +[% BLOCK link_to_documentation %] + [% IF doc_section %] + <li role="separator" class="divider"></li> + <li> + <a href="[% docs_urlbase _ doc_section FILTER html %]" style="color:#262626" target="_blank">Help</a> + </li> + [% END %] +[% END %] diff --git a/template/en/custom/global/footer.html.tmpl b/template/en/custom/global/footer.html.tmpl new file mode 100644 index 000000000..8a76805cd --- /dev/null +++ b/template/en/custom/global/footer.html.tmpl @@ -0,0 +1,121 @@ +[%# This Source Code Form is subject to the terms of the Mozilla Public + # License, v. 2.0. If a copy of the MPL was not distributed with this + # file, You can obtain one at http://mozilla.org/MPL/2.0/. + # + # This Source Code Form is "Incompatible With Secondary Licenses", as + # defined by the Mozilla Public License, v. 2.0. + #%] + +[%# INTERFACE: + # This template has no interface. However, you must fulfill the interface to + # global/useful-links.html.tmpl. + #%] + + [% Hook.process('main-end') %] + </div> + + + +<footer style="bottom: 0px !important; position: absolute !important; width: 100% !important; background-image: url('https://assets.gentoo.org/tyrian/black-thing.svg'),url('https://assets.gentoo.org/tyrian/znurt.svg')!important;"> + <div class="container"> + <div class="row"> + <div class="col-xs-12 col-md-offset-2 col-md-7"> + <div class="spacer"></div> + <ul id="f-list" style="list-style-type: none;"> + + [% IF user.id %] + <li> + [% title = BLOCK %]Open [% terms.bugs %] assigned to me[% END %] + <a href="buglist.cgi?f1=assigned_to&o1=equals&v1=%25user%25&resolution=---"> + [% title FILTER html %]</a> [% IF assignee_count %] ([% assignee_count FILTER html %]) [% END %] + <a href="buglist.cgi?f1=assigned_to&o1=equals&v1=%25user%25&resolution=---&ctype=atom&title=[% title FILTER uri %]"><i class="fa fa-rss" aria-hidden="true" style="color:#54487A"></i></a> + </li> + <li> + [% title = BLOCK %]Open [% terms.bugs %] reported by me[% END %] + <a href="buglist.cgi?f1=reporter&o1=equals&v1=%25user%25&resolution=---"> + [% title FILTER html %]</a> [% IF reporter_count %] ([% reporter_count FILTER html %]) [% END %] + <a href="buglist.cgi?f1=reporter&o1=equals&v1=%25user%25&resolution=---&ctype=atom&title=[% title FILTER uri %]" ><i class="fa fa-rss" aria-hidden="true" style="color:#54487A"></i></a> + + </li> + [% IF Bugzilla.has_flags %] + <li> + [% title = BLOCK %]Requests addressed to me[% END %] + <a href="request.cgi?action=queue&requestee=[% user.login FILTER uri %]&group=type&do_union=0"> + [% title FILTER html %]</a> [% IF requestee_count %] ([% requestee_count FILTER html %]) [% END %] + + <a href="buglist.cgi?f1=requestees.login_name&o1=equals&v1=%25user%25&ctype=atom&title=[% title FILTER uri %]"><i class="fa fa-rss" aria-hidden="true" style="color:#54487A"></i></a> + + </li> + [% END %] + [% END %] + + <li> + [% terms.Bugs %] reported in the + <a href="buglist.cgi?chfield=%5BBug%20creation%5D&chfieldfrom=24h">last 24 hours</a> + [% title = BLOCK %][% terms.Bugs %] reported in the last 24 hours[% END %] + + <a href="buglist.cgi?chfield=%5BBug%20creation%5D&chfieldfrom=24h&ctype=atom&title=[% title FILTER uri %]"><i class="fa fa-rss" aria-hidden="true" style="color:#54487A"></i></a> + + | <a href="buglist.cgi?chfield=%5BBug%20creation%5D&chfieldfrom=12h">last 12 hours</a> + [% title = BLOCK %][% terms.Bugs %] reported in the last 12 hours[% END %] + + <a href="buglist.cgi?chfield=%5BBug%20creation%5D&chfieldfrom=12h&ctype=atom&title=[% title FILTER uri %]"><i class="fa fa-rss" aria-hidden="true" style="color:#54487A"></i></a> + + + | <a href="buglist.cgi?chfield=%5BBug%20creation%5D&chfieldfrom=7d">last 7 days</a> + [% title = BLOCK %][% terms.Bugs %] reported in the last 7 days[% END %] + + <a href="buglist.cgi?chfield=%5BBug%20creation%5D&chfieldfrom=7d&ctype=atom&title=[% title FILTER uri %]"><i class="fa fa-rss" aria-hidden="true" style="color:#54487A"></i></a> + + </li> + <li> + [% terms.Bugs %] changed in the + <a href="buglist.cgi?chfieldfrom=24h">last 24 hours</a> + [% title = BLOCK %][% terms.Bugs %] changed in the last 24 hours[% END %] + + <a href="buglist.cgi?chfieldfrom=24h&ctype=atom&title=[% title FILTER uri %]"><i class="fa fa-rss" aria-hidden="true" style="color:#54487A"></i></a> + + | <a href="buglist.cgi?chfieldfrom=12h">last 12 hours</a> + [% title = BLOCK %][% terms.Bugs %] changed in the last 12 hours[% END %] + + <a href="buglist.cgi?chfieldfrom=12h&ctype=atom&title=[% title FILTER uri %]"><i class="fa fa-rss" aria-hidden="true" style="color:#54487A"></i></a> + + + | <a href="buglist.cgi?chfieldfrom=7d">last 7 days</a> + [% title = BLOCK %][% terms.Bugs %] changed in the last 7 days[% END %] + <a href="buglist.cgi?chfieldfrom=24h&ctype=atom&title=[% title FILTER uri %]"><i class="fa fa-rss" aria-hidden="true" style="color:#54487A"></i></a> + </li> + <li></li> + </ul> + [% PROCESS "global/useful-links.html.tmpl" %] + </div> + <div class="col-xs-12 col-md-3"> + + <br/><small><span id="information" class="header_addl_info">[% "version ${constants.BUGZILLA_VERSION}${constants.GENTOO_APPEND_VERSION} node ${constants.GENTOO_NODE}" %]</span></small> + <!-- No questions or comments, the Wiki has enough information on how to contact us. --> + </div> + </div> + <div class="row"> + <div class="col-xs-3 col-md-2"> + <ul class="footerlinks three-icons"> + <li><a href="https://twitter.com/gentoo" title="@Gentoo on Twitter"><span class="fa fa-twitter fa-fw"></span></a></li> + <li><a href="https://www.facebook.com/gentoo.org" title="Gentoo on Facebook"><span class="fa fa-facebook fa-fw"></span></a></li> + <li></li> + </ul> + </div> + <div class="col-xs-9 col-md-9"> + <strong>© 2001–2019 Gentoo Foundation, Inc.</strong><br> + <small> + Gentoo is a trademark of the Gentoo Foundation, Inc. + The contents of this document, unless otherwise expressly stated, are licensed under the + <a href="https://creativecommons.org/licenses/by-sa/3.0/" rel="license">CC-BY-SA-3.0</a> license. + The <a href="https://www.gentoo.org/inside-gentoo/foundation/name-logo-guidelines.html">Gentoo Name and Logo Usage Guidelines</a> apply. + </small> + </div> + </div> + </div> +</footer> + + [% Hook.process("end") %] + </body> +</html> diff --git a/template/en/custom/global/header.html.tmpl b/template/en/custom/global/header.html.tmpl new file mode 100644 index 000000000..82da6e7a1 --- /dev/null +++ b/template/en/custom/global/header.html.tmpl @@ -0,0 +1,278 @@ +[%# This Source Code Form is subject to the terms of the Mozilla Public + # License, v. 2.0. If a copy of the MPL was not distributed with this + # file, You can obtain one at http://mozilla.org/MPL/2.0/. + # + # This Source Code Form is "Incompatible With Secondary Licenses", as + # defined by the Mozilla Public License, v. 2.0. + #%] + +[%# INTERFACE: + # (All the below interface elements are optional.) + # title: string. Page title. + # header: string. Main page header. + # subheader: string. Page subheader. + # header_addl_info: string. Additional header information. + # bodyclasses: array of extra CSS classes for the <body> + # onload: string. JavaScript code to run when the page finishes loading. + # javascript: string. Javascript to go in the header. + # javascript_urls: list. List of URLs to Javascript. + # style: string. CSS style. + # style_urls: list. List of URLs to CSS style sheets. + # message: string. A message to display to the user. May contain HTML. + # atomlink: Atom link URL, May contain HTML + # generate_api_token: generate a token which can be used to make authenticated webservice calls + #%] + +[% IF message %] + [% PROCESS global/messages.html.tmpl %] +[% END %] + +[% DEFAULT + subheader = "" + header_addl_info = "" + onload = "" + style_urls = [] + javascript_urls = [] + yui = [] + generate_api_token = 0 + favicon_url = "images/favicon.ico" +%] + +[% SET yui_css = { + autocomplete => 1, + calendar => 1, + datatable => 1, + button => 1, +} %] + +[%# Note: This is simple dependency resolution--you can't have dependencies + # that depend on each other. You have to specify all of a module's deps, + # if that module is going to be specified in "yui". + #%] +[% SET yui_deps = { + autocomplete => ['json', 'connection', 'datasource'], + datatable => ['json', 'connection', 'datasource', 'element'], +} %] + +[%# When using certain YUI modules, we need to process certain + # extra JS templates. + #%] +[% SET yui_templates = { + datatable => ['global/value-descs.js.tmpl'], +} %] + +[%# These are JS URLs that are *always* on the page and come before + # every other JS URL. + #%] +[% SET starting_js_urls = [ + "js/yui/yahoo-dom-event/yahoo-dom-event.js", + "js/yui/cookie/cookie-min.js", +] %] + + +[%# We should be able to set the default value of the header variable + # to the value of the title variable using the DEFAULT directive, + # but that doesn't work if a caller sets header to the empty string + # to avoid header inheriting the value of title, since DEFAULT + # mistakenly treats empty strings as undefined and gives header the + # value of title anyway. To get around that problem we explicitly + # set header's default value here only if it is undefined. %] +[% IF !header.defined %][% header = title %][% END %] + +<!DOCTYPE html> +<html lang="en"> + <head> + [% Hook.process("start") %] + <title>[% title %]</title> + + [% IF Param('utf8') %] + <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> + [% END %] + + [% SET yui = yui_resolve_deps(yui, yui_deps) %] + + [% SET css_sets = css_files(style_urls, yui, yui_css) %] + [% IF constants.CONCATENATE_ASSETS %] + [% PROCESS format_css_link asset_url = css_sets.unified_standard_skin %] + [% ELSE %] + [% FOREACH asset_url = css_sets.standard %] + [% PROCESS format_css_link %] + [% END %] + [% FOREACH asset_url = css_sets.skin %] + [% PROCESS format_css_link %] + [% END %] + [% END %] + + [% IF style %] + <style type="text/css"> + [% style %] + </style> + [% END %] + + [% IF css_sets.unified_custom %] + [% IF constants.CONCATENATE_ASSETS %] + [% PROCESS format_css_link asset_url = css_sets.unified_custom %] + [% ELSE %] + [% FOREACH asset_url = css_sets.custom %] + [% PROCESS format_css_link %] + [% END %] + [% END %] + [% END %] + + [%# YUI Scripts %] + [% FOREACH yui_name = yui %] + [% starting_js_urls.push("js/yui/$yui_name/${yui_name}-min.js") %] + [% END %] + [% starting_js_urls.push('js/global.js') %] + + [% FOREACH asset_url = concatenate_js(starting_js_urls) %] + [% PROCESS format_js_link %] + [% END %] + + <script type="text/javascript"> + <!-- + YAHOO.namespace('bugzilla'); + YAHOO.util.Event.addListener = function (el, sType, fn, obj, overrideContext) { + if ( ("onpagehide" in window || YAHOO.env.ua.gecko) && sType === "unload") { sType = "pagehide"; }; + var capture = ((sType == "focusin" || sType == "focusout") && !YAHOO.env.ua.ie) ? true : false; + return this._addListener(el, this._getType(sType), fn, obj, overrideContext, capture); + }; + if ( "onpagehide" in window || YAHOO.env.ua.gecko) { + YAHOO.util.Event._simpleRemove(window, "unload", + YAHOO.util.Event._unload); + } + [%# The language selector needs javascript to set its cookie, + # so it is hidden in HTML/CSS by the "bz_default_hidden" class. + # If the browser can run javascript, it will then "unhide" + # the language selector using the following code. + #%] + function unhide_language_selector() { + YAHOO.util.Dom.removeClass( + 'lang_links_container', 'bz_default_hidden' + ); + } + YAHOO.util.Event.onDOMReady(unhide_language_selector); + + [%# Make some Bugzilla information available to all scripts. + # We don't import every parameter and constant because we + # don't want to add a lot of uncached JS to every page. + #%] + var BUGZILLA = { + param: { + cookiepath: '[% Param('cookiepath') FILTER js %]', + maxusermatches: [% Param('maxusermatches') FILTER js %] + }, + constant: { + COMMENT_COLS: [% constants.COMMENT_COLS FILTER js %] + }, + string: { + [%# Please keep these in alphabetical order. %] + + attach_desc_required: + "You must enter a Description for this attachment.", + component_required: + "You must select a Component for this [% terms.bug %].", + description_required: + "You must enter a Description for this [% terms.bug %].", + short_desc_required: + "You must enter a Summary for this [% terms.bug %].", + version_required: + "You must select a Version for this [% terms.bug %]." + } + [% IF generate_api_token %] + , api_token: '[% get_api_token FILTER js FILTER html %]' + [% END %] + }; + + [% FOREACH yui_name = yui %] + [% FOREACH yui_template = yui_templates.$yui_name %] + [% INCLUDE $yui_template %] + [% END %] + [% END %] + [% IF javascript %] + [% javascript %] + [% END %] + // --> + </script> + + [% FOREACH asset_url = concatenate_js(javascript_urls) %] + [% PROCESS format_js_link %] + [% END %] + + [%# this puts the live bookmark up on firefox for the Atom feed %] + [% IF atomlink %] + <link rel="alternate" + type="application/atom+xml" title="Atom feed" + href="[% atomlink FILTER html %]"> + [% END %] + + [%# Required for the 'Autodiscovery' feature in Firefox 2 and IE 7. %] + <link rel="search" type="application/opensearchdescription+xml" + title="[% terms.Bugzilla %]" href="./search_plugin.cgi"> + <link rel="shortcut icon" href="[% favicon_url FILTER html %]"> + [% Hook.process("additional_header") %] + </head> + + <body [% IF onload %] onload="[% onload %]"[% END %] + class="[% urlbase.replace('^https?://','').replace('/$','').replace('[-~@:/.]+','-') FILTER css_class_quote %] + [% FOREACH class = bodyclasses %] + [%+ class FILTER css_class_quote %] + [% END %] yui-skin-sam"> + +[% Hook.process("after_body_start") %] + + <div id="header"> + [% INCLUDE global/banner.html.tmpl %] + + <div id="titles"> + <span id="title">[% terms.Bugzilla %][% " – $header" IF header %]</span> + + [% IF subheader %] + <span id="subtitle" class="subheader">[% subheader %]</span> + [% END %] + + [% IF header_addl_info %] + <span id="information" class="header_addl_info">[% header_addl_info %]</span> + [% END %] + </div> + + [% USE Bugzilla %] + [% IF Bugzilla.languages.size > 1 %] + <div id="lang_links_container" class="bz_default_hidden"> + <ul class="links"> + [% FOREACH lang = Bugzilla.languages.sort %] + <li> + [% IF NOT loop.first %]<span class="separator"> | </span>[% END %] + [% IF lang == current_language %] + <span class="lang_current">[% lang FILTER html FILTER upper %]</span> + [% ELSE %] + <a href="#" onclick="set_language('[% lang FILTER none %]');"> + [%- lang FILTER html FILTER upper %]</a> + [% END %] + </li> + [% END %] + </ul> + </div> + [% END %] + + <div id="common_links"> + [% PROCESS "global/common-links.html.tmpl" qs_suffix = "_top" %] + </div> + </div> + + <div id="bugzilla-body" class="container"> + [% IF Param('announcehtml') %] + [% Param('announcehtml') FILTER none %] + [% END %] + + [% IF message %] + <div class="alert alert-warning">[% message %]</div> + [% END %] + +[% BLOCK format_css_link %] + <link href="[% asset_url FILTER html %]" rel="stylesheet" type="text/css"> +[% END %] + +[% BLOCK format_js_link %] + <script type="text/javascript" src="[% asset_url FILTER mtime FILTER html %]"></script> +[% END %] diff --git a/template/en/custom/global/product-select.html.tmpl b/template/en/custom/global/product-select.html.tmpl new file mode 100644 index 000000000..9ec3128dd --- /dev/null +++ b/template/en/custom/global/product-select.html.tmpl @@ -0,0 +1,98 @@ +[%# This Source Code Form is subject to the terms of the Mozilla Public + # License, v. 2.0. If a copy of the MPL was not distributed with this + # file, You can obtain one at http://mozilla.org/MPL/2.0/. + # + # This Source Code Form is "Incompatible With Secondary Licenses", as + # defined by the Mozilla Public License, v. 2.0. + #%] + +[%# INTERFACE: + # name: mandatory; field name + # id: optional; field id + # value: optional; default field value/selection + # classes: optional; an array of classes to be added + # onchange: optional; onchange attribute value + # disabled: optional; if true, the field is disabled + # accesskey: optional; accesskey attribute value + # add: optional; prepend menu option for value specified to start of select + # dontchange: optional; prepend menu option for "dontchange" to start of select + # multiple: optional; do multiselect box, value is size (height) of box + # title: optional; extra information to display as a tooltip + # products: optional; an array of custom product names + # isselect: optional; whether the product list should be displayed as a <select> + # or as just the plain text of its value. + # valueattribute: optional; the product attribute to be used for <option value="">, + # defaults to product name + #%] + +[% IF !isselect.defined %] + [% isselect = 1 %] +[% END %] +[% DEFAULT valueattribute = "name" %] +[% IF isselect %] + + <div class="col-sm-1 align-v-center align-h-right" style="padding-right:0px;"> + Product: + </div> + <div class="col-sm-11"> + <select name="[% name FILTER html %]" + [% IF id %] id="[% id FILTER html %]" [% END %] + [% IF classes %] class="form-control [% classes.join(' ') FILTER html %]" [% ELSE %] class="form-control" [% END %] + [% IF onchange %] onchange="[% onchange FILTER html %]" [% END %] + [% IF disabled %] disabled="[% disabled FILTER html %]" [% END %] + [% IF accesskey %] accesskey="[% accesskey FILTER html %]" [% END %] + [% IF multiple %] multiple="multiple" size="[% multiple FILTER html %]" [% END %] + [% IF title %] title="[% title FILTER html %]" [% END %] + > + [% IF add %] + <option value="">[% add FILTER html %]</option> + [% END %] + [% IF dontchange %] + <option value="[% dontchange FILTER html %]">[% dontchange FILTER html %]</option> + [% END %] + + [% IF Param('useclassification') %] + [% classifications = {} %] + [% IF products %] + [% FOREACH p = products %] + [% IF NOT classifications.${p.classification.name}.defined %] + [% classifications.${p.classification.name} = [] %] + [% END %] + [% classifications.${p.classification.name}.push(p) %] + [% END %] + [% ELSE %] + [% FOREACH c = user.get_selectable_classifications %] + [% classifications.${c.name} = [] %] + [% FOREACH p = user.get_selectable_products(c.id) %] + [% classifications.${c.name}.push(p) %] + [% END %] + [% END %] + [% END %] + + [% FOREACH c = all_classifications %] + [% NEXT UNLESS classifications.${c}.size %] + <optgroup label="[% c FILTER html %]"> + [% FOREACH p = classifications.$c %] + <option value="[% p.$valueattribute FILTER html %]" + [% " selected" IF (cgi.param(name) == p.name) || (value.contains(p.name)) %]> + [% p.name FILTER html %] + </option> + [% END %] + </optgroup> + [% END %] + [% ELSE %] + [% IF NOT products.defined %] + [% products = user.get_selectable_products %] + [% END %] + [% FOREACH p = products %] + <option value="[% p.$valueattribute FILTER html %]" + [% " selected" IF (cgi.param(name) == p.name) || (value.contains(p.name)) %]> + [% p.name FILTER html %] + </option> + [% END %] + [% END %] + </select> +</div> +[% ELSE %] + [% value.join(', ') FILTER html %] +[% END %] diff --git a/template/en/custom/global/select-menu.html.tmpl b/template/en/custom/global/select-menu.html.tmpl new file mode 100644 index 000000000..4d02b8c7e --- /dev/null +++ b/template/en/custom/global/select-menu.html.tmpl @@ -0,0 +1,52 @@ +[%# This Source Code Form is subject to the terms of the Mozilla Public + # License, v. 2.0. If a copy of the MPL was not distributed with this + # file, You can obtain one at http://mozilla.org/MPL/2.0/. + # + # This Source Code Form is "Incompatible With Secondary Licenses", as + # defined by the Mozilla Public License, v. 2.0. + #%] + +[%# INTERFACE: + # name: string; the name of the menu. + # + # multiple: boolean; whether or not the menu is multi-select + # + # size: integer; the number of items to display at once + # + # options: array or hash; the items with which to populate the array. + # If a hash is passed, the hash keys become the names displayed + # to the user while the hash values become the value of the item. + # + # default: string; the item selected in the menu by default. + # + # onchange: code; JavaScript to be run when the user changes the value + # selected in the menu. + #%] + +[%# Get the scalar representation of the options reference, + # which looks like "ARRAY(0xA352BA3F)" or "HASH(0xA352BA3F)", + # so we can figure out whether it is a reference to an array + # or a hash. + #%] +[% options_type = BLOCK %][% options %][% END %] + +<select class="form-control" name="[% name FILTER html %]" + [% IF onchange %]onchange="[% onchange FILTER html %]"[% END %] + [% IF multiple %] multiple [% END %] + [% IF size %] size="[% size %]" [% END %]> + [% IF options_type.search("ARRAY") %] + [% FOREACH value = options %] + <option value="[% value FILTER html %]" + [% " selected" IF value == default %]> + [% value FILTER html %] + </option> + [% END %] + [% ELSIF options_type.search("HASH") %] + [% FOREACH option = options %] + <option value="[% option.value FILTER html %]" + [% " selected" IF option.value == default %]> + [% option.key FILTER html %] + </option> + [% END %] + [% END %] +</select> diff --git a/template/en/custom/global/tabs.html.tmpl b/template/en/custom/global/tabs.html.tmpl new file mode 100644 index 000000000..4d6cb8bfd --- /dev/null +++ b/template/en/custom/global/tabs.html.tmpl @@ -0,0 +1,50 @@ +[%# This Source Code Form is subject to the terms of the Mozilla Public + # License, v. 2.0. If a copy of the MPL was not distributed with this + # file, You can obtain one at http://mozilla.org/MPL/2.0/. + # + # This Source Code Form is "Incompatible With Secondary Licenses", as + # defined by the Mozilla Public License, v. 2.0. + #%] + +[%# INTERFACE: + # tabs: List of hashes. Must have at least one item. Each hash has: + # name: string. Name of the tab. + # link: string. relative URL to the tab's resource on this installation. + # label: string. text displayed in the tab. + # current_tab_name: string. name of the currently selected tab + #%] + +<div class="bs-example bs-example-tabs" data-example-id="togglable-tabs"> + + <div class="panel panel-default"> + <div > + <ul class="nav nav-pills nav-justified" id="myTabs" role="tablist"> + + [% FOREACH tab = tabs %] + [% IF tab.name == current_tab_name %] + <li role="presentation" class="active"><a href="#home" style="border-radius:0px!important;color:#555!important;" id="tab_[% tab.name FILTER html %]" role="tab" data-toggle="tab" aria-controls="tab_[% tab.name FILTER html %]" aria-expanded="true">[% tab.label FILTER html %]</a></li> + [% ELSE %] + <li onClick="document.location='[% tab.link FILTER js FILTER html %]'" role="presentation"><a href="[% tab.link FILTER html %]" style="border-radius:0px!important;" id="tab_[% tab.name FILTER html %]" role="tab" data-toggle="tab" aria-controls="tab_[% tab.name FILTER html %]" aria-expanded="true">[% tab.label FILTER html %]</a></li> + <!-- <a href="[% tab.link FILTER html %]"></a> --> + [% END %] + [% END %] + </ul> + </div> + <div class="panel-body"> + <div class="tab-content" id="myTabContent"> + <div class="tab-pane fade active in" role="tabpanel" id="home" aria-labelledby="tab_[% tab.name FILTER html %]"> + [% content %] + </div> + <!-- + <div class="tab-pane fade" role="tabpanel" id="profile" aria-labelledby="profile-tab"> + </div> + --> + + + </div> + </div> + </div> + + + +</div> diff --git a/template/en/custom/global/textarea.html.tmpl b/template/en/custom/global/textarea.html.tmpl new file mode 100644 index 000000000..24cd51950 --- /dev/null +++ b/template/en/custom/global/textarea.html.tmpl @@ -0,0 +1,58 @@ +[%# This Source Code Form is subject to the terms of the Mozilla Public + # License, v. 2.0. If a copy of the MPL was not distributed with this + # file, You can obtain one at http://mozilla.org/MPL/2.0/. + # + # This Source Code Form is "Incompatible With Secondary Licenses", as + # defined by the Mozilla Public License, v. 2.0. + #%] + +[%# INTERFACE: + # + # id: (optional) The "id"-attribute of the textarea. + # name: (optional) The "name"-attribute of the textarea. + # accesskey: (optional) The "accesskey"-attribute of the textarea. + # classes: (optional) The "class"-attribute of the textarea. + # wrap: (deprecated; optional) The "wrap"-attribute of the textarea. + # disabled: (optional) Disable the textarea. + # placeholder: (optional) Placeholder. + # readonly: (optional) Prevent the textarea from being edited. + # minrows: (required) Number of rows the textarea shall have initially + # and when not having focus. + # maxrows: (optional) Number of rows the textarea shall have if + # maximized (which happens on getting focus). If not given, + # the textarea doesn't maximize when getting focus. + # defaultrows: (optional) Number of rows the textarea shall have if + # the zoom_textareas user preference if off. If not given, + # minrows will be used. + # cols: (required) Number of columns the textarea shall have. + # defaultcontent: (optional) Default content for the textarea. + # mandatory: (optional) Boolean specifying whether or not the textarea + # is mandatory. + # field_hidden: (optional) True if the field is hidden. Only useful if + # the field is mandatory. + #%] + +<textarea [% IF name %]name="[% name FILTER html %]"[% END %] + [% IF id %] id="[% id FILTER html %]"[% END %] + [% IF accesskey %] accesskey="[% accesskey FILTER html %]"[% END %] + [% IF classes %] class="[% classes FILTER html %]"[% END %] + [% IF wrap %] wrap="[% wrap FILTER html %]"[% END %] + [% IF disabled %] disabled="disabled"[% END %] + [% IF placeholder %] placeholder="[% placeholder FILTER html %]"[% END %] + [% IF readonly %] readonly="readonly"[% END %] + [% IF defaultrows && user.settings.zoom_textareas.value == 'off' %] + rows="[% defaultrows FILTER html %]" + [% ELSE %] + rows="[% minrows FILTER html %]" + [% END %] + cols="[% cols FILTER html %]" + [% IF maxrows && user.settings.zoom_textareas.value == 'on' %] + onfocusout="this.rows=10" + onFocus="this.rows=[% maxrows FILTER html %]" + [% END %] + [% IF mandatory %] + data-required="true" [% 'aria-required="true" required' UNLESS field_hidden %] + [% END %] + [% IF onchange %] + onchange="[% onchange FILTER html %]" + [% END %]>[% defaultcontent FILTER html %]</textarea> diff --git a/template/en/custom/global/useful-links.html.tmpl b/template/en/custom/global/useful-links.html.tmpl new file mode 100644 index 000000000..086fe2e91 --- /dev/null +++ b/template/en/custom/global/useful-links.html.tmpl @@ -0,0 +1,74 @@ +[%# This Source Code Form is subject to the terms of the Mozilla Public + # License, v. 2.0. If a copy of the MPL was not distributed with this + # file, You can obtain one at http://mozilla.org/MPL/2.0/. + # + # This Source Code Form is "Incompatible With Secondary Licenses", as + # defined by the Mozilla Public License, v. 2.0. + #%] + +<ul id="useful-links" style="list-style-type:none;"> + <!-- + <li id="links-actions"> + [ % PROCESS "global/common-links.html.tmpl" qs_suffix = "_bottom" % ] + </li> + --> + + [%# Saved searches %] + + [% IF user.showmybugslink OR user.queries.size %] + <li id="links-saved"> + <ul class="links"> + [% print_pipe = 0 %] + [% 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 %] + + [% FOREACH q = user.queries %] + [% NEXT UNLESS q.link_in_footer %] + <li> + [% '<span class="separator">| </span>' IF print_pipe %] + <a href="buglist.cgi?cmdtype=runnamed&namedcmd=[% q.name FILTER uri %]">[% q.name FILTER html %]</a> + </li> + [% print_pipe = 1 %] + [% END %] + </ul> + </li> + [% END %] + + [% IF user.queries_subscribed.size %] + <li id="links-shared"> + <ul class="links"> + [% FOREACH q = user.queries_subscribed %] + <li> + [% '<span class="separator">| </span>' UNLESS loop.first %] + <a href="buglist.cgi?cmdtype=dorem&remaction=run&namedcmd= + [%- q.name FILTER uri %]&sharer_id=[% q.user.id FILTER uri %]" + class="shared" title="Shared by [% q.user.identity FILTER html %]"> + [%- q.name FILTER html %]</a> + </li> + [% END %] + </ul> + </li> + [% END %] + + [% IF user.reports.size %] + <li id="reports-saved"> + <ul class="links"> + [% FOREACH r = user.reports %] + <li> + [% '<span class="separator">| </span>' UNLESS loop.first %] + <a href="report.cgi?[% r.query FILTER html %]&saved_report_id= + [%~ r.id FILTER uri %]">[% r.name FILTER html %]</a> + </li> + [% END %] + </ul> + </li> + [% END %] + + [%# Sections of links to more things users can do on this installation. %] + [% Hook.process("end") %] +</ul> |