From 8f3d85a8afa851f4457163d3aade01c1f63075a0 Mon Sep 17 00:00:00 2001 From: Vitaly Takmazov Date: Sat, 25 Jun 2022 01:14:09 +0300 Subject: Fix recommendations counters in html templates * deprecate `likes` message field, use `recommendations` where possible --- src/main/resources/templates/views/thread.html | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'src/main/resources/templates/views/thread.html') diff --git a/src/main/resources/templates/views/thread.html b/src/main/resources/templates/views/thread.html index f1563a7c..6215aa9a 100644 --- a/src/main/resources/templates/views/thread.html +++ b/src/main/resources/templates/views/thread.html @@ -44,7 +44,7 @@ - {% if msg.Likes > 0 %} {{ msg.Likes }} + {% if msg.recommendations.size() > 0 %} {{ msg.recommendations.size() }} {% else %}  {{ i18n("messages","message.recommend") }} {% endif %} @@ -54,7 +54,7 @@ - {% if msg.Likes > 0 %} {{ msg.Likes }} + {% if msg.recommendations.size() > 0 %} {{ msg.recommendations.size() }} {% else %}  {{ i18n("messages","message.recommend") }} {% endif %} @@ -64,7 +64,7 @@ - {% if msg.Likes > 0 %} {{ msg.Likes }} + {% if msg.recommendations.size() > 0 %} {{ msg.recommendations.size() }} {%else %}  {{ i18n("messages","message.recommend") }} {% endif %} @@ -111,8 +111,8 @@ @{{ rec.name }}{% if loop.index < (loop.length - 1) %}, {% endif %} {% endif %} {% endfor %} - {% if msg.likes > recomm.size() %} -  {{ i18n("messages","message.recommendedOthers", msg.likes - recomm.size()) }} + {% if msg.recommendations.size() > recomm.size() %} +  {{ i18n("messages","message.recommendedOthers", msg.recommendations.size() - recomm.size()) }} {% endif %} {% endif %} -- cgit v1.2.3