Skip a field when it's value is not set
authorSverre Rabbelier <srabbelier@gmail.com>
Sat, 14 Feb 2009 21:31:33 +0000
changeset 1329 c0af9fa2f83d
parent 1328 cd175dddc15c
child 1330 fa13d8b45594
Skip a field when it's value is not set Patch by: Sverre Rabbelier
app/soc/templates/soc/templatetags/_readonly_field_as_table_row.html
app/soc/templates/soc/templatetags/_readonly_field_as_twoline_table_row.html
app/soc/templates/soc/templatetags/_readonly_multiline_field_as_table_row.html
--- a/app/soc/templates/soc/templatetags/_readonly_field_as_table_row.html	Sat Feb 14 21:18:12 2009 +0000
+++ b/app/soc/templates/soc/templatetags/_readonly_field_as_table_row.html	Sat Feb 14 21:31:33 2009 +0000
@@ -11,6 +11,8 @@
 See the License for the specific language governing permissions and
 limitations under the License.
 {% endcomment %}
+
+{% if field_value %}
 <tr title="{{ field.help_text }}">
  <td class="formfieldlabel">
 	{{ field_label }}:
@@ -19,3 +21,4 @@
 	{{ field_value }}
  </td>
 </tr>
+{% endif %}
--- a/app/soc/templates/soc/templatetags/_readonly_field_as_twoline_table_row.html	Sat Feb 14 21:18:12 2009 +0000
+++ b/app/soc/templates/soc/templatetags/_readonly_field_as_twoline_table_row.html	Sat Feb 14 21:31:33 2009 +0000
@@ -11,6 +11,8 @@
 See the License for the specific language governing permissions and
 limitations under the License.
 {% endcomment %}
+
+{% if field_value %}
  <tr>
  <td class="formfieldlabel">
 	{{ field_label }}:
@@ -21,5 +23,4 @@
 	{{ field_value }}
  </td>
 </tr>
-
-
+{% endif %}
--- a/app/soc/templates/soc/templatetags/_readonly_multiline_field_as_table_row.html	Sat Feb 14 21:18:12 2009 +0000
+++ b/app/soc/templates/soc/templatetags/_readonly_multiline_field_as_table_row.html	Sat Feb 14 21:31:33 2009 +0000
@@ -11,6 +11,8 @@
 See the License for the specific language governing permissions and
 limitations under the License.
 {% endcomment %}
+
+{% if field_value %}
 <tr title="{{ field.help_text }}">
  <td class="formfieldlabel">
 	{{ field_label }}:
@@ -19,3 +21,4 @@
 	{{ field_value|linebreaks }}
  </td>
 </tr>
+{% endif %}