From 48770585552dc34cea6bdeef4147227e85b9225a Mon Sep 17 00:00:00 2001 From: "lpsolit%gmail.com" <> Date: Thu, 23 Feb 2006 06:02:07 +0000 Subject: =?UTF-8?q?Bug=20251656:=20Redesign=20dependency=20tree,=20part=20?= =?UTF-8?q?1:=20fix=20the=20tree=20itself=20-=20Patch=20by=20Andr=C3=A9=20?= =?UTF-8?q?Batosti=20=20r=3Dmyk=20r=3DLpSolit=20a=3D?= =?UTF-8?q?justdave?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- template/en/default/bug/dependency-tree.html.tmpl | 216 +++++++++++----------- 1 file changed, 108 insertions(+), 108 deletions(-) (limited to 'template/en/default/bug') diff --git a/template/en/default/bug/dependency-tree.html.tmpl b/template/en/default/bug/dependency-tree.html.tmpl index 8b5ecd59c..8fd0c18e6 100644 --- a/template/en/default/bug/dependency-tree.html.tmpl +++ b/template/en/default/bug/dependency-tree.html.tmpl @@ -19,6 +19,7 @@ # Contributor(s): Tobias Burnus # Ville Skyttä # Myk Melez + # André Batosti #%] [% PROCESS global/variables.none.tmpl %] @@ -26,136 +27,135 @@ [% 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" + 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 %] - -[%# Display the tree of bugs that this bug depends on. %] -

- [% IF hide_resolved %] - Open [% terms.bugs %] - [% ELSE %] - [% terms.Bugs %] - [% END %] - that [% terms.bug %] [%+ bugid %] - depends on

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

None

-[% END %] - -[%# Display the tree of bugs that this bug blocks. %] -

- [% IF hide_resolved %] - Open [% terms.bugs %] - [% ELSE %] - [% terms.Bugs %] - [% END %] - that [% terms.bug %] [%+ bugid %] - blocks

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

None

-[% END %] + +[% INCLUDE tree_section ids=dependson_ids type=1 %] + +[% INCLUDE tree_section ids=blocked_ids type=2 %] [% PROCESS depthControlToolbar %] +[% PROCESS global/footer.html.tmpl %] + [%###########################################################################%] -[%# Block to display a tree #%] +[%# 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 %] -[% tree.$bug_id.seen = 1 %] -
    - [% FOREACH dep_id = tree.$bug_id.dependencies %] - [% dep = tree.$dep_id %] -
  • - [% "" - IF dep.dependencies.size > 0 && !dep.seen %] - [% isclosed = !dep.open %] - [% FILTER closed(isclosed) %] - [% dep_id %] - [[% IF dep.milestone %][% dep.milestone FILTER html %], [% END %] - [% dep.assignee_email FILTER html %]] - - [% IF dep.seen %] - This [% terms.bug %] appears elsewhere in this tree. - [% ELSE %] - [%+ dep.summary FILTER html %]. + [%# 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 %] - [% INCLUDE display_tree bug_id=dep_id - IF dep.dependencies.size > 0 && !dep.seen %] - +
    + [% 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 %] -[% PROCESS global/footer.html.tmpl %] +[% 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 %]
-- cgit v1.2.1