[bugzilla-gnome-org-extensions] Move template files around to conform more to the Bugzilla 3.6 extension standards.



commit 3955dba05f93eed93117ac61fa9ce3fcf6bbf12b
Author: Max Kanat-Alexander <mkanat bugzilla org>
Date:   Mon Feb 8 14:51:35 2010 -0800

    Move template files around to conform more to the Bugzilla 3.6 extension
    standards.

 Extension.pm                                       |   10 +++++-----
 .../hook/reports/menu-current_state.html.tmpl      |    2 +-
 .../{ => traceparser}/popular-traces.html.tmpl     |    4 ++--
 .../pages/{ => traceparser}/trace.html.tmpl        |    4 ++--
 .../{trace => traceparser}/format.html.tmpl        |    2 +-
 .../possible-duplicate.html.tmpl                   |    2 +-
 6 files changed, 12 insertions(+), 12 deletions(-)
---
diff --git a/Extension.pm b/Extension.pm
index c7ac201..ec6a616 100644
--- a/Extension.pm
+++ b/Extension.pm
@@ -98,7 +98,7 @@ sub _check_duplicate_trace {
         }
 
         print $cgi->header;
-        $template->process('trace/possible-duplicate.html.tmpl', \%vars)
+        $template->process('traceparser/possible-duplicate.html.tmpl', \%vars)
           or ThrowTemplateError($template->error);
         exit;
     }
@@ -272,7 +272,7 @@ sub bug_format_comment {
     $match_text = quotemeta($match_text);
     my $replacement;
     my $template = Bugzilla->template_inner;
-    $template->process('trace/format.html.tmpl', { trace => $trace },
+    $template->process('traceparser/format.html.tmpl', { trace => $trace },
                        \$replacement)
       || ThrowTemplateError($template->error);
     # Make sure that replacements don't contain $1, $2, etc.
@@ -386,13 +386,13 @@ sub page_before_template {
     my ($self, $args) = @_;
     
     my ($vars, $page) = @$args{qw(vars page_id)};
-    if ($page =~ /^trace\./) {
+    if ($page =~ m{^traceparser/trace\.}) {
         _page_trace($vars);
     }
-    elsif ($page =~ /^popular-traces\./) {
+    elsif ($page =~ m{^traceparser/popular-traces\.}) {
         _page_popular_traces($vars);
     }
-    elsif ($page =~ /^post-duplicate-trace/) {
+    elsif ($page =~ m{^traceparser/post-duplicate-trace\.}) {
         _page_post_duplicate_trace($vars);
     }
 }
diff --git a/template/en/default/hook/reports/menu-current_state.html.tmpl 
b/template/en/default/hook/reports/menu-current_state.html.tmpl
index dedb9f3..6417e52 100644
--- a/template/en/default/hook/reports/menu-current_state.html.tmpl
+++ b/template/en/default/hook/reports/menu-current_state.html.tmpl
@@ -18,5 +18,5 @@
   # Contributor(s):
   #   Max Kanat-Alexander <mkanat bugzilla org>
   #%]
-<li><strong><a href="page.cgi?id=popular-traces.html">Most Popular
+<li><strong><a href="page.cgi?id=traceparser/popular-traces.html">Most Popular
    Traces</a></strong></li>
diff --git a/template/en/default/pages/popular-traces.html.tmpl 
b/template/en/default/pages/traceparser/popular-traces.html.tmpl
similarity index 91%
rename from template/en/default/pages/popular-traces.html.tmpl
rename to template/en/default/pages/traceparser/popular-traces.html.tmpl
index 427f6ce..41a6e35 100644
--- a/template/en/default/pages/popular-traces.html.tmpl
+++ b/template/en/default/pages/traceparser/popular-traces.html.tmpl
@@ -25,7 +25,7 @@
 
 <form action="page.cgi" method="GET">
 <div>
-  <input type="hidden" name="id" value="popular-traces.html">
+  <input type="hidden" name="id" value="traceparser/popular-traces.html">
   Show the top 
   <input type="text" size="3" name="limit" value="[% limit FILTER html %]">
   traces.
@@ -39,7 +39,7 @@
 <ul class="trace_list">
   [% FOREACH trace = traces %]
     <li>
-      <a href="page.cgi?id=trace.html&amp;trace_id=
+      <a href="page.cgi?id=traceparser/trace.html&amp;trace_id=
                [%- trace.id FILTER url_quote %]">
         [%- trace_count.${trace.id} FILTER html %]</a>:
       [% FOREACH function = trace.short_stack %]
diff --git a/template/en/default/pages/trace.html.tmpl b/template/en/default/pages/traceparser/trace.html.tmpl
similarity index 95%
rename from template/en/default/pages/trace.html.tmpl
rename to template/en/default/pages/traceparser/trace.html.tmpl
index a6f7ece..6723e1b 100644
--- a/template/en/default/pages/trace.html.tmpl
+++ b/template/en/default/pages/traceparser/trace.html.tmpl
@@ -25,7 +25,7 @@
 
 [% IF user.in_group('traceparser_edit') %]
   <h2>Properties of trace [% trace.id FILTER html %]</h2>
-  <form action="page.cgi?id=trace.html&amp;trace_id=
+  <form action="page.cgi?id=traceparser/trace.html&amp;trace_id=
                 [%- trace.id FILTER url_quote %]"
         method="POST">
   <div>
@@ -73,7 +73,7 @@
       [% FOREACH this_trace = list.$product %]
         [% SET bug = this_trace.bug %]
         <li>
-          <a href="page.cgi?id=trace.html&amp;trace_id=
+          <a href="page.cgi?id=traceparser/trace.html&amp;trace_id=
                    [%- this_trace.id FILTER url_quote %]">Trace
             [%+ this_trace.id FILTER html %]</a>
           (Quality: <strong>[% this_trace.quality FILTER html %]</strong>)
diff --git a/template/en/default/trace/format.html.tmpl b/template/en/default/traceparser/format.html.tmpl
similarity index 98%
rename from template/en/default/trace/format.html.tmpl
rename to template/en/default/traceparser/format.html.tmpl
index 57444c7..edb1852 100644
--- a/template/en/default/trace/format.html.tmpl
+++ b/template/en/default/traceparser/format.html.tmpl
@@ -26,7 +26,7 @@
      title="Expand/Collapse Trace"
      onclick="traceparser_toggle_trace(this, [% trace.id FILTER html %]); return false;">
     [%~ IF show %]&mdash;[% ELSE %]+[% END %]</a>
-  <a href="page.cgi?id=trace.html&trace_id=
+  <a href="page.cgi?id=traceparser/trace.html&trace_id=
            [%- trace.id FILTER url_quote %]">Trace
     [%+ trace.id FILTER html %]</a></p>
 
diff --git a/template/en/default/trace/possible-duplicate.html.tmpl 
b/template/en/default/traceparser/possible-duplicate.html.tmpl
similarity index 98%
rename from template/en/default/trace/possible-duplicate.html.tmpl
rename to template/en/default/traceparser/possible-duplicate.html.tmpl
index a8b9cb8..b90189e 100644
--- a/template/en/default/trace/possible-duplicate.html.tmpl
+++ b/template/en/default/traceparser/possible-duplicate.html.tmpl
@@ -38,7 +38,7 @@
 <h2>Similar [% terms.Bugs %]</h2>
 
 <form id="submit_dup" method="POST" 
-      action="page.cgi?id=post-duplicate-trace.none">
+      action="page.cgi?id=traceparser/post-duplicate-trace.none">
   <input type="hidden" name="comment" value="[% comment.body FILTER html %]">
   <input type="hidden" name="isprivate" 
          value="[% comment.is_private FILTER html %]">


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]