From 322ac5980aaf68921fad0a33182dba749a2218e8 Mon Sep 17 00:00:00 2001 From: Benjamin David Date: Sat, 11 Jan 2014 17:33:21 +0100 Subject: [PATCH] example templates --- example-templates/like/assets.html | 17 ++++++++++++++--- example-templates/like/entries.html | 2 +- example-templates/like/users.html | 6 ++++-- 3 files changed, 19 insertions(+), 6 deletions(-) diff --git a/example-templates/like/assets.html b/example-templates/like/assets.html index 3720034..aaa777c 100644 --- a/example-templates/like/assets.html +++ b/example-templates/like/assets.html @@ -9,7 +9,7 @@

Assets

You need to log in in order to start liking elements.

{% endif %} - {% set assets = craft.assets.limit(5).find() %} + {% set assets = craft.assets.find() %}
@@ -30,12 +30,23 @@

Assets

{% else %} Like {% endif %} -
-
+ + {% set likes = craft.like.getLikes(asset.id) %} + + {% if likes|length == 0 %} + 0 likes + {% else %} + {{likes|length}} like{{(likes|length > 1 ? 's':'')}} + {% endif %} +

+ + {% if loop.index is divisible by(2) %} +
+ {% endif %} {% endfor %} diff --git a/example-templates/like/entries.html b/example-templates/like/entries.html index 7e4fcb4..dafe86a 100644 --- a/example-templates/like/entries.html +++ b/example-templates/like/entries.html @@ -9,7 +9,7 @@

Entries

You need to log in in order to start liking elements.

{% endif %} - {% set entries = craft.entries.limit(5).find() %} + {% set entries = craft.entries.find() %}
diff --git a/example-templates/like/users.html b/example-templates/like/users.html index d945d9d..262d517 100644 --- a/example-templates/like/users.html +++ b/example-templates/like/users.html @@ -9,12 +9,14 @@

Users

You need to log in in order to start liking elements.

{% endif %} - {% set entries = craft.users.limit(5).find() %} + {% set entries = craft.users.find() %}
{% for entry in entries %} -

{{entry.email}}

+ +

{{entry.fullName}}

+

Lorem ipsum dolor sit amet, consectetur adipisicing elit. Officia, earum, incidunt, ad, necessitatibus consectetur soluta eaque ratione porro corrupti dignissimos itaque provident amet non. Veritatis illum laudantium consectetur vel earum?