# HG changeset patch # User Sverre Rabbelier # Date 1233167025 0 # Node ID cc6aedbde28d69e50cb304ebb8f0aeb6f2b7e0ff # Parent 0fe0cb8f72539a8a76e714cfa7a05e50a153925a Fixed the edit site view having a delete button Also a minor cleanup in group.py. Patch by: Sverre Rabbelier diff -r 0fe0cb8f7253 -r cc6aedbde28d app/soc/templates/soc/models/edit.html --- a/app/soc/templates/soc/models/edit.html Wed Jan 28 17:33:05 2009 +0000 +++ b/app/soc/templates/soc/models/edit.html Wed Jan 28 18:23:45 2009 +0000 @@ -56,9 +56,11 @@ {% endif %} {% if entity %} + {% block delete_button %} + {% endblock %} {% if export_link %} diff -r 0fe0cb8f7253 -r cc6aedbde28d app/soc/templates/soc/site/edit.html --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/app/soc/templates/soc/site/edit.html Wed Jan 28 18:23:45 2009 +0000 @@ -0,0 +1,16 @@ +{% extends "soc/models/edit.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 %} + +{% block delete_button %}{% endblock %} diff -r 0fe0cb8f7253 -r cc6aedbde28d app/soc/views/models/group.py --- a/app/soc/views/models/group.py Wed Jan 28 17:33:05 2009 +0000 +++ b/app/soc/views/models/group.py Wed Jan 28 18:23:45 2009 +0000 @@ -56,21 +56,15 @@ new_params = {} - new_params['extra_dynaexclude'] = ['founder', - # TODO(tlarsen): these need to be enabled once a button to a list - # selection "interstitial" page is implemented, see: - # http://code.google.com/p/soc/issues/detail?id=151 - 'home', 'tos', 'member_template'] + new_params['extra_dynaexclude'] = ['founder','home', 'tos', + 'member_template'] new_params['edit_extra_dynafields'] = { 'founded_by': forms.CharField(widget=widgets.ReadOnlyInput(), required=False), } #set the extra_django_patterns and include the one from params - patterns = params.get('extra_django_patterns') - - if not patterns: - patterns = [] + patterns = params.get('extra_django_patterns', []) patterns += [ (r'^%(url_name)s/(?Plist_requests)/%(key_fields)s$', diff -r 0fe0cb8f7253 -r cc6aedbde28d app/soc/views/models/site.py --- a/app/soc/views/models/site.py Wed Jan 28 17:33:05 2009 +0000 +++ b/app/soc/views/models/site.py Wed Jan 28 18:23:45 2009 +0000 @@ -63,8 +63,10 @@ new_params['sidebar_heading'] = new_params['name_short'] new_params['public_template'] = 'soc/presence/public.html' + new_params['edit_template'] = 'soc/site/edit.html' new_params['home_template'] = 'soc/site/home.html' + new_params['extra_dynaexclude'] = ['is_enabled'] new_params['create_extra_dynafields'] = { 'link_id': forms.CharField(widget=forms.HiddenInput, required=True), }