X-Git-Url: https://git.decadent.org.uk/gitweb/?p=memories.git;a=blobdiff_plain;f=templates%2Fmacros;fp=templates%2Fmacros;h=514f270cb5c4047ce0f1d7df31b4762d273413d7;hp=05824ef88ce77ba83437d3613c0422b23bd796f5;hb=d1391b6c98b7f74a85b2a83ce2f0d48a3bf5bfc2;hpb=96eff7a2eba91cdc0386c963462b537b4aedfd1d
diff --git a/templates/macros b/templates/macros
index 05824ef..514f270 100644
--- a/templates/macros
+++ b/templates/macros
@@ -1,3 +1,9 @@
+[% MACRO ministar(rating, photo) BLOCK;
+IF photo.rated > 0; %]
+
@@ -16,10 +22,17 @@
[% FOR tag = photo.tags %] [%tag %] [% END %]
- Uploaded by
+
+ Uploaded by
[% photo.uploader.name |html%]
-
at [% photo.uploaded %]
at [% photo.uploaded %]
+ [% SET r = photo.approx_rating %]
+
+[% IF r > 0 OR photo.hit_count > 0 %]
+ [% photo.hit_count %] views
+ [% IF r > 0 %]
[% ministar(r, photo) %] in [%photo.rated %] ratings [% END %]
+[% END %]
+
[% IF request.user %]
[% IF album == 1 %]