aboutsummaryrefslogtreecommitdiffstats
path: root/templates/web/default/admin/problem_row.html
diff options
context:
space:
mode:
authorMatthew Somerville <matthew@mysociety.org>2013-06-05 09:42:46 +0100
committerMatthew Somerville <matthew@mysociety.org>2013-06-05 09:49:08 +0100
commita8e7842bd2a2e7f6f25cd947aca5174356d9bfcc (patch)
treeade30560a817acd458c28c98f7e157b2008295bc /templates/web/default/admin/problem_row.html
parent3269d92c2f148ea906681c41d6fa5847203c6943 (diff)
Only append cobrand_data to URI if present.
Diffstat (limited to 'templates/web/default/admin/problem_row.html')
-rw-r--r--templates/web/default/admin/problem_row.html12
1 files changed, 9 insertions, 3 deletions
diff --git a/templates/web/default/admin/problem_row.html b/templates/web/default/admin/problem_row.html
index ec8fda6c5..6dc4de188 100644
--- a/templates/web/default/admin/problem_row.html
+++ b/templates/web/default/admin/problem_row.html
@@ -1,9 +1,15 @@
[%- FOR problem IN problems %]
<tr[% ' class="adminhidden"' IF problem.state == 'hidden' %]>
<td class="record-id">[%- IF problem.is_visible -%]
- [%- cobrand_data = problem.cobrand_data %]
- [%- cobrand_data = c.data_for_generic_problem IF !problem.cobrand %]
- <a href="[% c.uri_for_email( '/report', problem.id, cobrand_data ) %]">[% problem.id %]</a>
+ [%- cobrand_data = problem.cobrand_data;
+ cobrand_data = c.data_for_generic_problem IF !problem.cobrand;
+ IF cobrand_data;
+ uri = c.uri_for_email( '/report', problem.id, cobrand_data );
+ ELSE;
+ uri = c.uri_for_email( '/report', problem.id );
+ END;
+ %]
+ <a href="[% uri %]">[% problem.id %]</a>
[%- ELSE %]
[%- problem.id %]
[%- END -%]</td>