use special revision template
authorChristian Weiske <cweiske@cweiske.de>
Tue, 17 Apr 2012 17:33:48 +0000 (19:33 +0200)
committerChristian Weiske <cweiske@cweiske.de>
Tue, 17 Apr 2012 17:33:48 +0000 (19:33 +0200)
data/templates/revision-head.htm [new file with mode: 0644]
data/templates/revision.htm [new file with mode: 0644]
www/revision.php

diff --git a/data/templates/revision-head.htm b/data/templates/revision-head.htm
new file mode 100644 (file)
index 0000000..a653615
--- /dev/null
@@ -0,0 +1,20 @@
+<h1>{{repo.getDescription}}</h1>
+<div class="row-fluid repo-info">
+ <div class="span2">
+   <a class="btn btn-primary" href="{{repo.getLink('display')}}">
+    <i class="icon-arrow-left icon-white"></i> HEAD
+   </a>
+ </div>
+ <div class="span8" style="text-align: center">
+  <h3>
+   Paste #{{repo.id}}
+  </h3>
+  <p>
+   revision <strong>{{repo.hash}}</strong>
+  </p>
+  <p>
+  </p>
+ </div>
+ <div class="span2">
+ </div>
+</div>
diff --git a/data/templates/revision.htm b/data/templates/revision.htm
new file mode 100644 (file)
index 0000000..f4da363
--- /dev/null
@@ -0,0 +1,22 @@
+{% extends "base.htm" %}
+{% block title %}
+ {%if repo.getDescription %}
+  {{repo.getDescription}}
+ {%else%}
+  {{repo.id}}
+ {%endif%}
+ - revision {{repo.hash}}
+{% endblock %}
+
+{% block content %}
+ {% include 'revision-head.htm' %}
+
+{% for file in repo.getFiles %}
+ {% include 'display-file.htm' %}
+{% endfor %}
+
+{% endblock %}
+
+{% block sidebar %}
+ {% include 'display-sidebar-history.htm' %}
+{% endblock %}
index c8df8a9..53ac458 100644 (file)
@@ -9,7 +9,7 @@ $repo = new Repository();
 $repo->loadFromRequest();
 
 render(
-    'display',
+    'revision',
     array(
         'repo' => $repo,
         'dh'   => new \Date_HumanDiff(),