| <!--! |
| Licensed to the Apache Software Foundation (ASF) under one |
| or more contributor license agreements. See the NOTICE file |
| distributed with this work for additional information |
| regarding copyright ownership. The ASF licenses this file |
| to you under the Apache License, Version 2.0 (the |
| "License"); you may not use this file except in compliance |
| with the License. You may obtain a copy of the License at |
| |
| http://www.apache.org/licenses/LICENSE-2.0 |
| |
| Unless required by applicable law or agreed to in writing, |
| software distributed under the License is distributed on an |
| "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY |
| KIND, either express or implied. See the License for the |
| specific language governing permissions and limitations |
| under the License. |
| --> |
| |
| <!DOCTYPE html |
| PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" |
| "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> |
| <html xmlns="http://www.w3.org/1999/xhtml" |
| xmlns:py="http://genshi.edgewall.org/" |
| xmlns:i18n="http://genshi.edgewall.org/i18n" |
| xmlns:bh="http://issues.apache.org/bloodhound/wiki/Ui/Dashboard" |
| xmlns:xi="http://www.w3.org/2001/XInclude"> |
| <xi:include href="layout.html" /> |
| <xi:include href="widget_macros.html" /> |
| |
| <py:def function="product_owner()"> |
| <py:choose> |
| <py:when test="product.owner"> |
| Owned by |
| <a href="${href.query(owner=product.owner, status='!closed', |
| product=product.name, order='priority')}">${product.owner}</a> |
| </py:when> |
| <py:otherwise> </py:otherwise> |
| </py:choose> |
| </py:def> |
| |
| <py:def function="product_heading()"> |
| <h1>Product ${product.name}</h1> |
| <h6 py:if="product.owner">${product_owner()}</h6> |
| </py:def> |
| |
| <py:def function="product_buttons()"> |
| <div py:if="'PRODUCT_MODIFY' in perm(product.resource) or |
| 'PRODUCT_DELETE' in perm(product.resource) or |
| (attachments and attachments.can_create)" |
| class="buttons"> |
| <form py:if="'PRODUCT_MODIFY' in perm(product.resource)" |
| method="get" action="" id="editproduct" |
| style="display: inline-block"> |
| <input type="hidden" name="action" value="edit" /> |
| <div class="btn-group"> |
| <button class="btn" name="editproductbutton" type="submit"> |
| <i class="icon-edit"></i> |
| ${_('Edit')} |
| </button> |
| </div> |
| </form> |
| <form py:if="'PRODUCT_DELETE' in perm(product.resource)" |
| method="get" action="" id="deleteproduct" |
| style="display: inline-block"> |
| <input type="hidden" name="action" value="delete" /> |
| <div class="btn-group"> |
| <button class="btn" name="deleteproductbutton" type="submit"> |
| <i class="icon-trash"></i> |
| ${_('Delete')} |
| </button> |
| </div> |
| </form> |
| </div> |
| </py:def> |
| |
| <py:def function="product_widgets()"> |
| <bh:widget urn="TicketQuery"> |
| <bh:args> |
| <bh:arg name="max">10</bh:arg> |
| <bh:arg name="query">product=${product.prefix}&status=!closed&group=time&col=id&col=summary&col=owner&col=status&col=priority&order=priority&groupdesc=1&desc=1&owner=$USER</bh:arg> |
| <bh:arg name="title">My Tickets</bh:arg> |
| </bh:args> |
| </bh:widget> |
| <bh:widget urn="TicketQuery"> |
| <bh:args> |
| <bh:arg name="max">10</bh:arg> |
| <bh:arg name="query">product=${product.prefix}&status=!closed&group=time&col=id&col=summary&col=owner&col=status&col=priority&order=priority&groupdesc=1&desc=1</bh:arg> |
| <bh:arg name="title">Active Tickets</bh:arg> |
| </bh:args> |
| </bh:widget> |
| <bh:widget urn="TicketFieldValues"> |
| <bh:args> |
| <bh:arg name="title">Versions</bh:arg> |
| <bh:arg name="field">version</bh:arg> |
| <bh:arg name="verbose">true</bh:arg> |
| <bh:arg name="query">product=${product.prefix}&group=version</bh:arg> |
| </bh:args> |
| </bh:widget> |
| <bh:widget urn="TicketFieldValues"> |
| <bh:args> |
| <bh:arg name="title">Milestones</bh:arg> |
| <bh:arg name="field">milestone</bh:arg> |
| <bh:arg name="verbose">true</bh:arg> |
| <bh:arg name="query">product=${product.prefix}&group=milestone</bh:arg> |
| </bh:args> |
| </bh:widget> |
| <bh:widget urn="TicketFieldValues"> |
| <bh:args> |
| <bh:arg name="title">Components</bh:arg> |
| <bh:arg name="field">component</bh:arg> |
| <bh:arg name="verbose">true</bh:arg> |
| <bh:arg name="query">product=${product.prefix}&group=component</bh:arg> |
| </bh:args> |
| </bh:widget> |
| </py:def> |
| |
| <head> |
| <title>Product ${product.name}</title> |
| <link py:if="'PRODUCT_MODIFY' in perm(product.resource)" rel="alternate" type="application/x-wiki" |
| title="Edit this product" href="${href.products(product.prefix, action='edit')}" /> |
| </head> |
| <body> |
| <div id="content" class="row product"> |
| <xi:include href="bh_model_view.html" |
| py:with="buttons = product_buttons(); |
| description = wiki_to_html(context, product.description); |
| heading = product_heading(); |
| ticket_query = 'product=' + product.name; |
| widgets = product_widgets();" /> |
| </div> |
| </body> |
| |
| </html> |
| |