Remove private data from club and org public templates
Also re-use the club/public.html template in organization's template.
Patch by: Sverre Rabbelier
--- a/app/soc/templates/soc/club/public.html Sat Feb 14 21:31:33 2009 +0000
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,40 +0,0 @@
-{% extends "soc/base.html" %}
-{% comment %}
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-{% endcomment %}
-{% load forms_helpers %}
-
-{% block header_title %}
-{{ page_name }} for {{ entity.name }}
-{% endblock %}
-
-{% block body %}
-<p>
- <table>
- {% readonly_field_as_table_row entity.fields.name.label entity.name %}
- {% readonly_field_as_table_row entity.fields.home_page.label entity.home_page %}
- {% readonly_field_as_table_row entity.fields.description.label entity.description %}
- {% readonly_field_as_table_row entity.fields.contact_street.label entity.contact_street %}
- {% readonly_field_as_table_row entity.fields.contact_city.label entity.contact_city %}
- {% readonly_field_as_table_row entity.fields.contact_state.label entity.contact_state %}
- {% readonly_field_as_table_row entity.fields.contact_country.label entity.contact_country %}
- {% readonly_field_as_table_row entity.fields.contact_postalcode.label entity.contact_postalcode %}
- {% readonly_field_as_table_row entity.fields.phone.label entity.phone %}
- {% readonly_field_as_table_row entity.fields.shipping_street.label entity.shipping_street %}
- {% readonly_field_as_table_row entity.fields.shipping_city.label entity.shipping_city %}
- {% readonly_field_as_table_row entity.fields.shipping_state.label entity.shipping_state %}
- {% readonly_field_as_table_row entity.fields.shipping_country.label entity.shipping_country %}
- {% readonly_field_as_table_row entity.fields.shipping_postalcode.label entity.shipping_postalcode %}
- </table>
-</p>
-{% endblock %}
--- a/app/soc/templates/soc/group/public.html Sat Feb 14 21:31:33 2009 +0000
+++ b/app/soc/templates/soc/group/public.html Sat Feb 14 21:32:25 2009 +0000
@@ -21,20 +21,17 @@
{% block body %}
<p>
<table>
+ {% block fields %}
{% readonly_field_as_table_row entity.fields.name.label entity.name %}
{% readonly_field_as_table_row entity.fields.home_page.label entity.home_page %}
{% readonly_field_as_table_row entity.fields.description.label entity.description %}
- {% readonly_field_as_table_row entity.fields.contact_street.label entity.contact_street %}
- {% readonly_field_as_table_row entity.fields.contact_city.label entity.contact_city %}
- {% readonly_field_as_table_row entity.fields.contact_state.label entity.contact_state %}
- {% readonly_field_as_table_row entity.fields.contact_country.label entity.contact_country %}
- {% readonly_field_as_table_row entity.fields.contact_postalcode.label entity.contact_postalcode %}
- {% readonly_field_as_table_row entity.fields.phone.label entity.phone %}
- {% readonly_field_as_table_row entity.fields.shipping_street.label entity.shipping_street %}
- {% readonly_field_as_table_row entity.fields.shipping_city.label entity.shipping_city %}
- {% readonly_field_as_table_row entity.fields.shipping_state.label entity.shipping_state %}
- {% readonly_field_as_table_row entity.fields.shipping_country.label entity.shipping_country %}
- {% readonly_field_as_table_row entity.fields.shipping_postalcode.label entity.shipping_postalcode %}
+ {% readonly_field_as_table_row entity.fields.founder.label entity.founder.link_id %}
+ {% readonly_field_as_table_row entity.fields.home_page.label entity.home_page %}
+ {% readonly_field_as_table_row entity.fields.email.label entity.email %}
+ {% readonly_field_as_table_row entity.fields.description.label entity.description %}
+ {% readonly_field_as_table_row entity.fields.pub_mailing_list.label entity.pub_mailing_list %}
+ {% readonly_field_as_table_row entity.fields.irc_channel.label entity.irc_channel %}
+ {% endblock %}
</table>
</p>
{% endblock %}
--- a/app/soc/templates/soc/organization/public.html Sat Feb 14 21:31:33 2009 +0000
+++ b/app/soc/templates/soc/organization/public.html Sat Feb 14 21:32:25 2009 +0000
@@ -1,4 +1,4 @@
-{% extends "soc/base.html" %}
+{% extends "soc/group/public.html" %}
{% comment %}
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
@@ -14,27 +14,9 @@
{% endcomment %}
{% load forms_helpers %}
-{% block header_title %}
-{{ page_name }} for {{ entity.name }}
+{% block fields %}
+ {{ block.super }}
+ {% readonly_field_as_table_row entity.fields.dev_mailing_list.label entity.dev_mailing_list %}
+ {% readonly_field_as_table_row entity.fields.member_template.label entity.member_template %}
+ {% readonly_field_as_table_row entity.fields.ideas.label entity.ideas %}
{% endblock %}
-
-{% block body %}
-<p>
- <table>
- {% readonly_field_as_table_row entity.fields.name.label entity.name %}
- {% readonly_field_as_table_row entity.fields.home_page.label entity.home_page %}
- {% readonly_field_as_table_row entity.fields.description.label entity.description %}
- {% readonly_field_as_table_row entity.fields.contact_street.label entity.contact_street %}
- {% readonly_field_as_table_row entity.fields.contact_city.label entity.contact_city %}
- {% readonly_field_as_table_row entity.fields.contact_state.label entity.contact_state %}
- {% readonly_field_as_table_row entity.fields.contact_country.label entity.contact_country %}
- {% readonly_field_as_table_row entity.fields.contact_postalcode.label entity.contact_postalcode %}
- {% readonly_field_as_table_row entity.fields.phone.label entity.phone %}
- {% readonly_field_as_table_row entity.fields.shipping_street.label entity.shipping_street %}
- {% readonly_field_as_table_row entity.fields.shipping_city.label entity.shipping_city %}
- {% readonly_field_as_table_row entity.fields.shipping_state.label entity.shipping_state %}
- {% readonly_field_as_table_row entity.fields.shipping_country.label entity.shipping_country %}
- {% readonly_field_as_table_row entity.fields.shipping_postalcode.label entity.shipping_postalcode %}
- </table>
-</p>
-{% endblock %}
--- a/app/soc/views/models/club.py Sat Feb 14 21:31:33 2009 +0000
+++ b/app/soc/views/models/club.py Sat Feb 14 21:32:25 2009 +0000
@@ -78,6 +78,8 @@
new_params['document_prefix'] = "club"
new_params['sidebar_grouping'] = 'Clubs'
+ new_params['public_template'] = 'soc/group/public.html'
+
patterns = []
patterns += [(r'^%(url_name)s/(?P<access_type>apply_member)$',