# HG changeset patch # User Sverre Rabbelier # Date 1224178258 0 # Node ID 5ad9cabb5892b91570d89bc379be61238624f5a2 # Parent 4308324241bc8c866c0f3d901aab4c1e35572713 Rename 'group' to 'entity' in the Django templates This allows for generic use of these templates. Patch by: Sverre Rabbelier Reviewed by: to-be-reviewed diff -r 4308324241bc -r 5ad9cabb5892 app/soc/templates/soc/group/list/all.html --- a/app/soc/templates/soc/group/list/all.html Thu Oct 16 16:05:08 2008 +0000 +++ b/app/soc/templates/soc/group/list/all.html Thu Oct 16 17:30:58 2008 +0000 @@ -14,18 +14,18 @@ {% endcomment %} {% load forms_helpers %} {% block page_title %} -Site: {{ group_type_plural }} List +Site: {{ entity_type_plural }} List {% endblock %} {% block header_title %} -{{ group_type_plural }} List +{{ entity_type_plural }} List {% endblock %} {% block body %}

{% block instructions %} -List of {{ group_type_plural }} in Google Open Source Programs. +List of {{ entity_type_plural }} in Google Open Source Programs. {% endblock %}

{% include list_main %}

-{% endblock %} \ No newline at end of file +{% endblock %} diff -r 4308324241bc -r 5ad9cabb5892 app/soc/templates/soc/group/list/group_row.html --- a/app/soc/templates/soc/group/list/group_row.html Thu Oct 16 16:05:08 2008 +0000 +++ b/app/soc/templates/soc/group/list/group_row.html Thu Oct 16 17:30:58 2008 +0000 @@ -1,7 +1,7 @@ +onclick="document.location.href='/site/{{ entity_type|lower }}/profile/{{ data_element.link_name }}'" name="name">
{{ data_element.name }} + href="/site/{{ entity_type|lower }}/profile/{{ data_element.link_name }}">{{ data_element.name }}
diff -r 4308324241bc -r 5ad9cabb5892 app/soc/templates/soc/group/profile/edit.html --- a/app/soc/templates/soc/group/profile/edit.html Thu Oct 16 16:05:08 2008 +0000 +++ b/app/soc/templates/soc/group/profile/edit.html Thu Oct 16 17:30:58 2008 +0000 @@ -18,17 +18,17 @@ {% endblock %} {% block page_title %} -{% if existing_group %} -Site: Modify Existing {{ group_type }} +{% if existing_entity %} +Site: Modify Existing {{ entity_type }} {% else %} -Site: Create New {{ group_type }} +Site: Create New {{ entity_type }} {% endif %} {% endblock %} {% block header_title %} -{% if existing_group %} -Modify Existing {{ group_type }} +{% if entity %} +Modify Existing {{ entity_type }} {% else %} -Create a New {{ group_type }} +Create a New {{ entity_type }} {% endif %} {% endblock %} @@ -36,7 +36,7 @@

{% block instructions %} -Please use this form to alter {{ group_type }} details. +Please use this form to alter {{ entity_type }} details. {% endblock %}

diff -r 4308324241bc -r 5ad9cabb5892 app/soc/templates/soc/group/profile/public.html --- a/app/soc/templates/soc/group/profile/public.html Thu Oct 16 16:05:08 2008 +0000 +++ b/app/soc/templates/soc/group/profile/public.html Thu Oct 16 17:30:58 2008 +0000 @@ -13,22 +13,22 @@ limitations under the License. {% endcomment %} {% load forms_helpers %} -{% block page_title %}{{ group_type }} Public Profile{% endblock %} +{% block page_title %}{{ entity_type }} Public Profile{% endblock %} {% block header_title %} -{{ group_type }} Public Profile for {{ link_name_group.name }} +{{ entity_type }} Public Profile for {{ entity.name }} {% endblock %} {% block body %}

- {% readonly_field_as_table_row link_name_group.fields.name.label link_name_group.name %} - {% readonly_field_as_table_row link_name_group.fields.home_page.label link_name_group.home_page %} - {% readonly_field_as_table_row link_name_group.fields.description.label link_name_group.description %} - {% readonly_field_as_table_row link_name_group.fields.street.label link_name_group.street %} - {% readonly_field_as_table_row link_name_group.fields.city.label link_name_group.city %} - {% readonly_field_as_table_row link_name_group.fields.state.label link_name_group.state %} - {% readonly_field_as_table_row link_name_group.fields.country.label link_name_group.country %} - {% readonly_field_as_table_row link_name_group.fields.postalcode.label link_name_group.postalcode %} - {% readonly_field_as_table_row link_name_group.fields.phone.label link_name_group.phone %} + {% 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.street.label entity.street %} + {% readonly_field_as_table_row entity.fields.city.label entity.city %} + {% readonly_field_as_table_row entity.fields.state.label entity.state %} + {% readonly_field_as_table_row entity.fields.country.label entity.country %} + {% readonly_field_as_table_row entity.fields.postalcode.label entity.postalcode %} + {% readonly_field_as_table_row entity.fields.phone.label entity.phone %}

-{% endblock %} \ No newline at end of file +{% endblock %} diff -r 4308324241bc -r 5ad9cabb5892 app/soc/templates/soc/site/sponsor/profile/edit.html --- a/app/soc/templates/soc/site/sponsor/profile/edit.html Thu Oct 16 16:05:08 2008 +0000 +++ b/app/soc/templates/soc/site/sponsor/profile/edit.html Thu Oct 16 17:30:58 2008 +0000 @@ -15,6 +15,6 @@ {% block submit_buttons %} {{ block.super }} - + - {% endblock %} \ No newline at end of file + {% endblock %} diff -r 4308324241bc -r 5ad9cabb5892 app/soc/views/site/sponsor/list.py --- a/app/soc/views/site/sponsor/list.py Thu Oct 16 16:05:08 2008 +0000 +++ b/app/soc/views/site/sponsor/list.py Thu Oct 16 17:30:58 2008 +0000 @@ -78,8 +78,8 @@ offset=offset, limit=limit, list_templates=list_templates) - context.update({'group_type': 'Sponsor', - 'group_type_plural': sponsor_model.Sponsor.GROUP_TYPE_PLURAL, - 'group_type_short': sponsor_model.Sponsor.GROUP_TYPE_SHORT}) + context.update({'entity_type': 'Sponsor', + 'entity_type_plural': sponsor_model.Sponsor.GROUP_TYPE_PLURAL, + 'entity_type_short': sponsor_model.Sponsor.GROUP_TYPE_SHORT}) return helper.responses.respond(request, template, context) diff -r 4308324241bc -r 5ad9cabb5892 app/soc/views/site/sponsor/profile.py --- a/app/soc/views/site/sponsor/profile.py Thu Oct 16 16:05:08 2008 +0000 +++ b/app/soc/views/site/sponsor/profile.py Thu Oct 16 17:30:58 2008 +0000 @@ -192,9 +192,9 @@ sponsor_form = CreateForm() context.update({'form': sponsor_form, - 'existing_group': existing_sponsor, - 'group_type': 'Sponsor', - 'group_type_short': sponsor_model.Sponsor.GROUP_TYPE_SHORT}) + 'entity': existing_sponsor, + 'entity_type': 'Sponsor', + 'entity_type_short': sponsor_model.Sponsor.GROUP_TYPE_SHORT}) return helper.responses.respond(request, template, context) diff -r 4308324241bc -r 5ad9cabb5892 app/soc/views/sponsor/profile.py --- a/app/soc/views/sponsor/profile.py Thu Oct 16 16:05:08 2008 +0000 +++ b/app/soc/views/sponsor/profile.py Thu Oct 16 17:30:58 2008 +0000 @@ -59,7 +59,7 @@ link_name_sponsor.description = \ helper.templates.unescape(link_name_sponsor.description) - context.update({'link_name_group': link_name_sponsor, - 'group_type': 'Sponsor'}) + context.update({'entity': link_name_sponsor, + 'entity_type': 'Sponsor'}) return helper.responses.respond(request, template, context) \ No newline at end of file