# HG changeset patch # User Pawel Solyga # Date 1223575897 0 # Node ID 1cece5192e263cf283944ee8e0d3e4afcca2431b # Parent 5905c8e97e68f070de23cca2421964518d01a95a Enable recently commited delete Sponsor request handler (added to map.py) and Delete button in Sponsor edit view. Still missing "Are you sure ?" question box. Patch by: Pawel Solyga Review by: to-be-reviewed diff -r 5905c8e97e68 -r 1cece5192e26 app/soc/logic/site/map.py --- a/app/soc/logic/site/map.py Thu Oct 09 18:06:50 2008 +0000 +++ b/app/soc/logic/site/map.py Thu Oct 09 18:11:37 2008 +0000 @@ -187,6 +187,14 @@ short_name='Create New Site Sponsor', parent=site_home_edit) +site_sponsor_delete = page.Page( + page.Url( + r'^site/sponsor/profile/%s/delete$' % path_linkname.LINKNAME_ARG_PATTERN, + 'soc.views.site.sponsor.profile.delete'), + 'Site: Delete Existing Sponsor', + short_name='Delete Site Sponsor', + parent=site_home_edit) + site_sponsor_edit = page.Page( page.Url( r'^site/sponsor/profile/%s' % path_linkname.LINKNAME_ARG_PATTERN, @@ -194,7 +202,7 @@ 'Site: Modify Existing Sponsor', short_name='Modify Site Sponsor', parent=site_home_edit) - + site_sponsor_list = page.Page( page.Url( r'^site/sponsor/list$', diff -r 5905c8e97e68 -r 1cece5192e26 app/soc/views/site/sponsor/profile.py --- a/app/soc/views/site/sponsor/profile.py Thu Oct 09 18:06:50 2008 +0000 +++ b/app/soc/views/site/sponsor/profile.py Thu Oct 09 18:11:37 2008 +0000 @@ -76,7 +76,7 @@ return link_name -DEF_SITE_SPONSOR_PROFILE_EDIT_TMPL = 'soc/group/profile/edit.html' +DEF_SITE_SPONSOR_PROFILE_EDIT_TMPL = 'soc/site/sponsor/profile/edit.html' DEF_SPONSOR_NO_LINKNAME_CHANGE_MSG = 'Sponsor link name cannot be changed.' DEF_CREATE_NEW_SPONSOR_MSG = ' You can create a new sponsor by visiting' \ ' Create ' \ @@ -187,7 +187,9 @@ return helper.responses.respond(request, template, context) -def create(request, template=DEF_SITE_SPONSOR_PROFILE_EDIT_TMPL): +DEF_SITE_SPONSOR_PROFILE_CREATE_TMPL = 'soc/group/profile/edit.html' + +def create(request, template=DEF_SITE_SPONSOR_PROFILE_CREATE_TMPL): """create() view is same as edit() view, but with no linkname supplied. """ return edit(request, linkname=None, template=template)