From 5b054d1fb39604419150051dd1d99dacbdeb2cba Mon Sep 17 00:00:00 2001
From: Christian Weiske
Date: Thu, 1 Sep 2016 08:11:44 +0200
Subject: Make search result hit template configurable, add chat template
Resolves: #9
---
data/templates/search/hit-chat.htm | 22 ++++++++++++++++++++++
data/templates/search/list.htm | 2 +-
2 files changed, 23 insertions(+), 1 deletion(-)
create mode 100644 data/templates/search/hit-chat.htm
(limited to 'data/templates')
diff --git a/data/templates/search/hit-chat.htm b/data/templates/search/hit-chat.htm
new file mode 100644
index 0000000..f44319d
--- /dev/null
+++ b/data/templates/search/hit-chat.htm
@@ -0,0 +1,22 @@
+{% set doc = hit._source %}
+
+
+ {{doc.htmlText|raw}}
+
+
+
+ {% if doc.author.name %}
+
+ {% if doc.author.url %}
+ {{doc.author.name}}
+ {% else %}
+ {{doc.author.name}}
+ {% endif %}
+
+ at
+ {% endif %}
+ {% if doc.modate %}
+ {{doc.modate|date("Y-m-d H:i")}}
+ {% endif %}
+
+
diff --git a/data/templates/search/list.htm b/data/templates/search/list.htm
index c034dc2..97c1731 100644
--- a/data/templates/search/list.htm
+++ b/data/templates/search/list.htm
@@ -21,7 +21,7 @@
{% for hit in hits %}
- {% include 'search/hit.htm' %}
+ {% include hitTemplate %}
{% endfor %}
{% include 'pager.htm' %}
--
cgit v1.2.3