aboutsummaryrefslogtreecommitdiffstats
path: root/templates
diff options
context:
space:
mode:
authorMatthew Somerville <matthew@mysociety.org>2013-05-13 12:28:18 +0100
committerMatthew Somerville <matthew@mysociety.org>2013-05-13 12:39:19 +0100
commitd290d52f48a167131cab3bdc6844888ed824d7fe (patch)
tree6bdb06fd9d5328a8c0a7ef22f11cb869c46652e9 /templates
parente0f04654af67eb27ac8e5876a4b39d0cde43f3cb (diff)
Consolidate photo display checking to one function.
Diffstat (limited to 'templates')
-rw-r--r--templates/web/default/report/photo.html2
-rw-r--r--templates/web/fixmystreet/report/photo-js.html2
-rw-r--r--templates/web/zurich/report/_item.html2
-rw-r--r--templates/web/zurich/report/_main.html2
4 files changed, 4 insertions, 4 deletions
diff --git a/templates/web/default/report/photo.html b/templates/web/default/report/photo.html
index 02ab9228b..c463c34c4 100644
--- a/templates/web/default/report/photo.html
+++ b/templates/web/default/report/photo.html
@@ -1,4 +1,4 @@
-[% IF c.cobrand.allow_photo_display && object.photo %]
+[% IF c.cobrand.allow_photo_display(object) && object.photo %]
[% photo = object.get_photo_params %]
<div class="update-img">
[% IF photo.url_full %]<a href="[% photo.url_full %]" rel="fancy">[% END
diff --git a/templates/web/fixmystreet/report/photo-js.html b/templates/web/fixmystreet/report/photo-js.html
index df0e2f92d..9075ce005 100644
--- a/templates/web/fixmystreet/report/photo-js.html
+++ b/templates/web/fixmystreet/report/photo-js.html
@@ -1,4 +1,4 @@
-[% IF c.cobrand.allow_photo_display %]
+[% IF c.cobrand.allow_photo_display(problem) %]
[% extra_css = BLOCK %]
<link rel="stylesheet" href="[% version('/js/fancybox/jquery.fancybox-1.3.4.css') %]">
[% END %]
diff --git a/templates/web/zurich/report/_item.html b/templates/web/zurich/report/_item.html
index 7adb7cdd4..22b39a2c8 100644
--- a/templates/web/zurich/report/_item.html
+++ b/templates/web/zurich/report/_item.html
@@ -1,6 +1,6 @@
<li>
<a class="text" href="[% c.uri_for('/report', problem.id ) %]">
- [% IF problem.state != 'unconfirmed' AND problem.photo AND problem.extra.publish_photo;
+ [% IF problem.state != 'unconfirmed' AND problem.photo AND c.cobrand.allow_photo_display(problem);
photo = problem.get_photo_params
%]
<img class="img" height="60" width="90" src="[% photo.url_fp %]" alt="">
diff --git a/templates/web/zurich/report/_main.html b/templates/web/zurich/report/_main.html
index c5fbabf1c..d80eeb9a4 100644
--- a/templates/web/zurich/report/_main.html
+++ b/templates/web/zurich/report/_main.html
@@ -6,7 +6,7 @@
</p>
[% IF problem.state != 'unconfirmed' %]
- [% IF problem.extra.publish_photo %]
+ [% IF c.cobrand.allow_photo_display(problem) %]
[% INCLUDE 'report/photo.html' object=problem %]
[% END %]
[% add_links( problem.detail ) | html_para %]