[%# 1.0@bugzilla.org %] [%# The contents of this file are subject to the Mozilla Public # License Version 1.1 (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.mozilla.org/MPL/ # # Software distributed under the License is distributed on an "AS # IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or # implied. See the License for the specific language governing # rights and limitations under the License. # # The Original Code is the Bugzilla Bug Tracking System. # # The Initial Developer of the Original Code is Netscape Communications # Corporation. Portions created by Netscape are # Copyright (C) 1998 Netscape Communications Corporation. All # Rights Reserved. # # Contributor(s): Tobias Burnus # Ville Skyttä # Myk Melez # André Batosti #%] [% PROCESS global/variables.none.tmpl %] [% filtered_desc = blocked_tree.$bugid.summary FILTER html %] [% PROCESS global/header.html.tmpl title = "Dependency tree for $terms.Bug $bugid" h1 = "Dependency tree for $terms.Bug $bugid" javascript_urls = ["js/expanding-tree.js"] style_urls = ["skins/standard/dependency-tree.css"] h2 = filtered_desc %] [% PROCESS depthControlToolbar %] [% INCLUDE tree_section ids=dependson_ids type=1 %] [% INCLUDE tree_section ids=blocked_ids type=2 %] [% PROCESS depthControlToolbar %] [% PROCESS global/footer.html.tmpl %] [%###########################################################################%] [%# Tree-drawing blocks #%] [%###########################################################################%] [% BLOCK tree_section %] [%# INTERFACE # - ids: a list of bug IDs to be displayed as children # - type: the type of tree. 1 = depends on, 2 = blockeds # GLOBALS # - seen: Maintains a global hash of bugs that have been displayed #%] [% global.seen = {} %] [%# Display the tree of bugs that this bug depends on. %]

[% ids.size %] [% IF hide_resolved %] Open [% terms.bugs %] [% ELSE %] [% terms.Bugs %] [%- END %] that [% terms.bug %] [%+ bugid %] [% IF type == 1 %] [% tree_name = "dependson_tree" %] depends on [% ELSIF type == 2 %] [% tree_name = "blocked_tree" %] blocks [% END %]

[% IF ids.size > 0 %] ([% IF maxdepth -%]Up to [% maxdepth %] level[% "s" IF maxdepth > 1 %] deep | [% END -%] view as [% terms.bug %] list [% IF canedit && ids.size > 1 %] | change several [% END %])
    [% INCLUDE display_tree tree=$tree_name %]

[% ELSE %]

None

[% END %] [% END %] [% BLOCK display_tree %] [%# INTERFACE # - bugid: the ID of the bug being displayed # - tree: a hash of bug objects #%] [% bug = tree.$bugid %]
  • [%- INCLUDE bullet bugid=bugid bug=bug -%] [%- INCLUDE buglink bug=bug bugid=bugid %] [% IF global.seen.$bugid %] (*) [% ELSIF bug.dependencies.size %]
      [% FOREACH depid = bug.dependencies %] [% INCLUDE display_tree bugid=depid %] [% END %]
    [% END %]
  • [% global.seen.$bugid = 1 %] [% END %] [% BLOCK bullet %] [% IF bug.dependencies.size > 0 && ! global.seen.$bugid %] [% extra_class = " b_open" %] [% extra_args = 'onclick="return doToggle(this, event)"' %] [% END %]    [% END %] [% BLOCK buglink %] [% isclosed = !bug.open %] [% FILTER closed(isclosed) -%] [%- bugid %]: [%+ bug.summary FILTER html %] [[% INCLUDE buginfo %]] [% END %] [% END %] [% BLOCK buginfo %] [% bug.status FILTER html %] [%+ bug.resolution FILTER html %]; assigned to [% bug.assignee_email FILTER html %]; [% "Target: " _ bug.milestone IF bug.milestone %] [% END %] [%###########################################################################%] [%# Block for depth control toolbar #%] [%###########################################################################%] [% BLOCK depthControlToolbar %] [%# Hide/show resolved button Swaps text depending on the state of hide_resolved %]
    [% IF maxdepth %] [% END %]
    Max Depth:  
    [%# set to one form %]
    [%# Minus one form Allow subtracting only when realdepth and maxdepth > 1 %]
    [%# Limit entry form: the button can not do anything when total depth is less than two, so disable it %]
    [%# plus one form Disable button if total depth < 2, or if depth set to unlimited %] [% IF maxdepth %] [% END %] = realdepth %] %]>
    [%# Unlimited button %]
    [% END %]