aboutsummaryrefslogtreecommitdiff
path: root/data
diff options
context:
space:
mode:
authorChristian Weiske <cweiske@cweiske.de>2012-05-07 22:22:59 +0200
committerChristian Weiske <cweiske@cweiske.de>2012-05-07 22:22:59 +0200
commit347d191850d9a3c5a84f3dff1971e6d955555ac9 (patch)
tree32bac7638c9bed2d9f4843e4fd93f46d6757c9c0 /data
parentfa61fdfea420bb770d4390f49fa5e2f379891d21 (diff)
downloadphorkie-347d191850d9a3c5a84f3dff1971e6d955555ac9.tar.gz
phorkie-347d191850d9a3c5a84f3dff1971e6d955555ac9.zip
implement request #3: show recent pastes in "New paste" screen sidebar
Diffstat (limited to 'data')
-rw-r--r--data/templates/base.htm1
-rw-r--r--data/templates/index.htm12
-rw-r--r--data/templates/repo-sidebar-list.htm7
3 files changed, 20 insertions, 0 deletions
diff --git a/data/templates/base.htm b/data/templates/base.htm
index 8c6b4b0..1fbde4d 100644
--- a/data/templates/base.htm
+++ b/data/templates/base.htm
@@ -2,6 +2,7 @@
<!DOCTYPE html>
<html>
<head>
+ <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<link rel="stylesheet" href="{{css}}"/>
<link rel="stylesheet" href="/phorkie.css" />
<title>{% block title %}{% endblock %} - {{title}}</title>
diff --git a/data/templates/index.htm b/data/templates/index.htm
index 05c4c05..df1977a 100644
--- a/data/templates/index.htm
+++ b/data/templates/index.htm
@@ -26,3 +26,15 @@ $(document).ready(function() {
});
</script>
{% endblock %}
+
+
+{% block sidebar %}
+ {% if recents.results %}
+ <h3>Recently created</h3>
+ <ul>
+ {% for repo in recents.repos %}
+ {% include 'repo-sidebar-list.htm' %}
+ {% endfor %}
+ </ul>
+ {% endif %}
+{% endblock %} \ No newline at end of file
diff --git a/data/templates/repo-sidebar-list.htm b/data/templates/repo-sidebar-list.htm
new file mode 100644
index 0000000..c20e8b6
--- /dev/null
+++ b/data/templates/repo-sidebar-list.htm
@@ -0,0 +1,7 @@
+ <li>
+ <a href="{{repo.getLink('display')}}">
+ {{repo.id}}
+ {{repo.getDescription}}
+ </a><br/>
+ &nbsp;&nbsp;&nbsp;<span title="{{repo.crdate|date('c')}}">{{dh.get(repo.crdate)}}</span>
+ </li>