Fix Sponsor profile edit/create template. Don't show "View Sponsor Public Profile" link and Delete button in Create Sponsor view.
authorPawel Solyga <Pawel.Solyga@gmail.com>
Thu, 23 Oct 2008 09:47:38 +0000
changeset 412 5acee4621c3d
parent 411 c8ac5c1161e2
child 413 ec1b590418df
Fix Sponsor profile edit/create template. Don't show "View Sponsor Public Profile" link and Delete button in Create Sponsor view. Patch by: Pawel Solyga Review by: to-be-reviewed
app/soc/templates/soc/site/sponsor/profile/edit.html
--- a/app/soc/templates/soc/site/sponsor/profile/edit.html	Thu Oct 23 09:08:02 2008 +0000
+++ b/app/soc/templates/soc/site/sponsor/profile/edit.html	Thu Oct 23 09:47:38 2008 +0000
@@ -14,11 +14,15 @@
 {% endcomment %}
 {% block submit_buttons %}
 {{ block.super }}
+{% if entity %}
 <td>
  <input type="button" onclick="location.href='/site/{{ entity_type_short|lower }}/profile/delete/{{ entity.link_name }}'" value="Delete"/>
 </td>
+{% endif %}
 {% endblock %}
 {% block body %}
 {{ block.super }}
+{% if entity %}
 <p><a href="/{{ entity_type_short|lower }}/profile/{{ entity.link_name }}">View Sponsor Public Profile</a></p>
+{% endif %}
 {% endblock %}
\ No newline at end of file