app/soc/views/models/site.py
changeset 542 7cc99461b64d
parent 537 f2bd9c465a6d
child 544 10f9da7e0d17
--- a/app/soc/views/models/site.py	Sat Nov 22 01:55:19 2008 +0000
+++ b/app/soc/views/models/site.py	Sat Nov 22 03:13:59 2008 +0000
@@ -54,9 +54,9 @@
     #: list of model fields which will *not* be gathered by the form
     exclude = ['inheritance_line', 'home', 'scope', 'scope_path', 'link_id']
 
-  scope_path = forms.CharField(widget=forms.HiddenInput)
+#  scope_path = forms.CharField(widget=forms.HiddenInput)
 
-  link_id = forms.CharField(widget=forms.HiddenInput)
+#  link_id = forms.CharField(widget=forms.HiddenInput)
 
 
 class EditForm(CreateForm):
@@ -80,18 +80,20 @@
 
     params = {}
 
-    # add ugettext_lazy ?
+    # TODO(alturin): add ugettext_lazy ?
     params['name'] = "Site Settings"
-    params['name_short'] = "Site Settings"
+    params['name_short'] = "Site"
     params['name_plural'] = "Site Settings"
     # lower name and replace " " with "/"
-    # for module name lower name and replace " " with "_"
     params['url_name'] = "site/settings"
     params['module_name'] = "site"
 
     params['edit_form'] = EditForm
     params['create_form'] = CreateForm
 
+    params['sidebar_defaults'] = [('/%s/edit', 'Edit %(name)s')]
+    params['sidebar_heading'] = params['name_short']
+
     params['lists_template'] = {
       'list_main': 'soc/list/list_main.html',
       'list_pagination': 'soc/list/list_pagination.html',
@@ -101,9 +103,6 @@
 
     params['delete_redirect'] = '/' + params['url_name'] + '/list'
 
-    params['sidebar_additional'] = [
-        ('/' + params['url_name'] + '/edit', 'Edit Main Site Settings')]
-
     params = dicts.merge(original_params, params)
 
     presence.View.__init__(self, original_params=params)