Template cleanups. Move _template to inc/template, remove currently spurious includes...
Tomas Doran [Sun, 17 Jan 2010 22:20:11 +0000 (22:20 +0000)]
12 files changed:
lib/Gitalist/View/Default.pm
root/_history.tt2
root/_shortlog.tt2 [deleted file]
root/fragment/repository/heads.tt2
root/fragment/repository/log.tt2
root/fragment/repository/shortlog.tt2
root/inc/chroma_hash.tt2 [moved from root/_chroma_hash.tt2 with 100% similarity]
root/inc/log_pager.tt2 [moved from root/_log_pager.tt2 with 100% similarity]
root/log.tt2 [deleted file]
root/nav/actions.tt2
root/shortlog.tt2 [deleted file]
root/wrapper.tt2 [moved from root/default.tt2 with 100% similarity]

index d89b1bb..4bc7be6 100644 (file)
@@ -9,7 +9,7 @@ use Template::Plugin::Cycle;
 
 __PACKAGE__->config(
   TEMPLATE_EXTENSION => '.tt2',
-  WRAPPER            => 'default.tt2',
+  WRAPPER            => 'wrapper.tt2',
   subinclude_plugin => 'SubRequest',
 );
 
index 83f09e1..48e926d 100644 (file)
@@ -22,7 +22,7 @@
  <tbody>
  [% FOREACH line IN log_lines %]
   <tr>
-   <td class='sha1' title='[% line.sha1 %]'>[% INCLUDE '_chroma_hash.tt2' sha1 = line.sha1.substr(0, 7) %]</td>
+   <td class='sha1' title='[% line.sha1 %]'>[% INCLUDE 'inc/chroma_hash.tt2' sha1 = line.sha1.substr(0, 7) %]</td>
    <td class='time-since' title='[% line.authored_time %]'>[% time_since(line.authored_time) %]</td>
    <td class='author'>[% line.author.name | html %]</td>
    <td>
diff --git a/root/_shortlog.tt2 b/root/_shortlog.tt2
deleted file mode 100644 (file)
index 19caaf1..0000000
+++ /dev/null
@@ -1,40 +0,0 @@
-<table class='shortlog listing'>
- <thead>
-  <tr>
-   <th>sha1</th>
-   <th>time</th>
-   <th>author</th>
-   <th>message</th>
-   <th>actions</th>
-  </tr>
- </thead>
-
- <tfoot>
-  <tr>
-   <td>sha1</td>
-   <td>time</td>
-   <td>author</td>
-   <td>message</td>
-   <td>actions</td>
-  </tr>
- </tfoot>
-
- <tbody>
- [% FOREACH line IN log_lines %]
-  <tr>
-   <td class='sha1' title='[% line.sha1 %]'>[% INCLUDE '_chroma_hash.tt2' sha1 = line.sha1.substr(0, 7) %]</td>
-   <td class='time-since' title='[% line.authored_time %]'>[% time_since(line.authored_time) %]</td>
-   <td class='author'>[% line.author.name | html %]</td>
-   <td>
-     [% short_cmt(line.comment) | html %]
-     [% INCLUDE '_refs.tt2' object = line %]
-   </td>
-   <td class='action-list'>
-     <a href="[% c.uri_for("commit", {h=line.sha1}) %]">commit</a>
-     <a href="[% c.uri_for("commitdiff", {h=line.sha1}) %]">commitdiff</a>
-     <a href="[% c.uri_for("tree", {h=line.sha1, hb=line.sha1}) %]">tree</a>
-   </td>
-  </tr>
- [% END %]
- </tbody>
-</table>
index 0eb77e7..e2e3329 100644 (file)
@@ -19,7 +19,7 @@
  <tbody>
  [% FOREACH head IN heads %]
   <tr>
-   <td class='sha1' title='[% head.sha1 %]'>[% INCLUDE '_chroma_hash.tt2' sha1 = head.sha1.substr(0,7) %]</td>
+   <td class='sha1' title='[% head.sha1 %]'>[% INCLUDE 'inc/chroma_hash.tt2' sha1 = head.sha1.substr(0,7) %]</td>
    <td class='time-since' title='[% head.last_change %]'>[% time_since(head.last_change) %]</td>
    <td class='head[% head.sha1 == HEAD ? ' current' : '' %]'>[% head.name %]</td>
    <td class='action-list'>
index aeb1b60..7170be7 100644 (file)
@@ -4,7 +4,7 @@
     <div class="message">
        [% message = line.comment | html;
          message.replace("\n", "<br/>") %]
-       <div class='chroma-hash'>[% INCLUDE '_chroma_hash.tt2' sha1 = line.sha1 %]</div>
+       <div class='chroma-hash'>[% INCLUDE 'inc/chroma_hash.tt2' sha1 = line.sha1 %]</div>
       </div>
       <div class="meta">
        <table class='summary' cellspacing='0' cellpadding='0'>
index c1c7383..c31bb45 100644 (file)
@@ -1,7 +1,46 @@
 <div class='content'>
 [%
-  INCLUDE '_log_pager.tt2';
-  INCLUDE '_shortlog.tt2';
-  INCLUDE '_log_pager.tt2';
+  INCLUDE 'inc/log_pager.tt2';
+%]<table class='shortlog listing'>
+ <thead>
+  <tr>
+   <th>sha1</th>
+   <th>time</th>
+   <th>author</th>
+   <th>message</th>
+   <th>actions</th>
+  </tr>
+ </thead>
+
+ <tfoot>
+  <tr>
+   <td>sha1</td>
+   <td>time</td>
+   <td>author</td>
+   <td>message</td>
+   <td>actions</td>
+  </tr>
+ </tfoot>
+
+ <tbody>
+ [% FOREACH line IN log_lines %]
+  <tr>
+   <td class='sha1' title='[% line.sha1 %]'>[% INCLUDE 'inc/chroma_hash.tt2' sha1 = line.sha1.substr(0, 7) %]</td>
+   <td class='time-since' title='[% line.authored_time %]'>[% time_since(line.authored_time) %]</td>
+   <td class='author'>[% line.author.name | html %]</td>
+   <td>
+     [% short_cmt(line.comment) | html %]
+     [% INCLUDE '_refs.tt2' object = line %]
+   </td>
+   <td class='action-list'>
+     <a href="[% c.uri_for("commit", {h=line.sha1}) %]">commit</a>
+     <a href="[% c.uri_for("commitdiff", {h=line.sha1}) %]">commitdiff</a>
+     <a href="[% c.uri_for("tree", {h=line.sha1, hb=line.sha1}) %]">tree</a>
+   </td>
+  </tr>
+ [% END %]
+ </tbody>
+</table>[%
+  INCLUDE 'inc/log_pager.tt2';
 %]
 </div>
similarity index 100%
rename from root/_log_pager.tt2
rename to root/inc/log_pager.tt2
diff --git a/root/log.tt2 b/root/log.tt2
deleted file mode 100644 (file)
index 3e3908a..0000000
+++ /dev/null
@@ -1,35 +0,0 @@
-[% INCLUDE 'nav/actions.tt2' object = commit %]
-
-<div class='content'>
-  [% INCLUDE '_log_pager.tt2' %]
-
-  <div id='log'>
-  [% FOREACH line IN log_lines %]
-    <div class='entry'>
-    <div class="message">
-       [% message = line.comment | html;
-         message.replace("\n", "<br/>") %]
-       <div class='chroma-hash'>[% INCLUDE '_chroma_hash.tt2' sha1 = line.sha1 %]</div>
-      </div>
-      <div class="meta">
-       <table class='summary' cellspacing='0' cellpadding='0'>
-       <tr><td>author</td><td class='author'>[% line.author.name | html %]</td></tr>
-       <tr><td>authored time</td><td class='time'>[% line.authored_time %]</td></tr>
-       [% IF line.author.name != line.committer.name %]
-       <tr><td>committer</td><td class='author'>[% line.committer.name | html %]</td></tr>
-       <tr><td>committered time</td><td class='time'>[% line.committed_time %]</td></tr>
-       [% END %]
-       </table>
-       <span class="time-since">[% time_since(line.authored_time) %]</span>
-       <div class="action-list">
-        <a href="[% c.uri_for("commit", {h=line.sha1}) %]">commit</a>
-       | <a href="[% c.uri_for("commitdiff", {h=line.sha1}) %]">commitdiff</a>
-       | <a href="[% c.uri_for("tree", {h=line.sha1, hb=line.sha1}) %]">tree</a>
-       </div>
-      </div>
-    </div>
-  [% END %]
-  </div>
-
-  [% INCLUDE '_log_pager.tt2' %]
-</div>
index 52ca63e..21fb026 100644 (file)
@@ -16,5 +16,5 @@
     <a href="[% c.uri_for('shortlog', {h=object.sha1,f=filename}) %]">history</a> &bull;
     <a href="[% c.uri_for(action, {f=filename}) %]">HEAD</a>
     [% END %]
-    <div class='chroma-hash'>[% INCLUDE '_chroma_hash.tt2' sha1 = object.sha1 %]</div>
+    <div class='chroma-hash'>[% INCLUDE 'inc/chroma_hash.tt2' sha1 = object.sha1 %]</div>
 </div>
diff --git a/root/shortlog.tt2 b/root/shortlog.tt2
deleted file mode 100644 (file)
index 6f9636e..0000000
+++ /dev/null
@@ -1,9 +0,0 @@
-[% INCLUDE 'nav/actions.tt2' object = commit %]
-
-<div class='content'>
-[%
-  INCLUDE '_log_pager.tt2';
-  INCLUDE '_shortlog.tt2';
-  INCLUDE '_log_pager.tt2';
-%]
-</div>
similarity index 100%
rename from root/default.tt2
rename to root/wrapper.tt2