add: removed the user and group tables from the controller index.
authorRicardo Velhote <rvelhote@gmail.com>
Fri, 28 May 2010 21:34:14 +0000 (22:34 +0100)
committerRicardo Velhote <rvelhote@gmail.com>
Fri, 28 May 2010 21:34:14 +0000 (22:34 +0100)
swat/controllers/account.py
swat/templates/default/derived/account-dashboard.mako [new file with mode: 0644]

index e42c2760259d24d654335b92379b00d41dfeee4c..d76ef7a265ef20fa5359cdd266ab57c025b4fafe 100644 (file)
@@ -33,14 +33,9 @@ from samba import param
 log = logging.getLogger(__name__)
 
 class AccountController(BaseController):
-    """ Account Management Controller.
-    
-    TODO Too many *group/user actions. I think this should be improved. No idea
-    how yet :)
-    
-    """
+    """ Account Management Controller """
     def __init__(self):
-        """ """
+        """ Initialization """
         me = request.environ['pylons.routes_dict']['controller']
         action = request.environ['pylons.routes_dict']['action']
         
@@ -76,7 +71,7 @@ class AccountController(BaseController):
         c.list_users = True
         c.list_groups = True
         
-        return render('/default/derived/account.mako')
+        return render('/default/derived/account-dashboard.mako')
     
     def user(self, subaction="index", id=-1):
         id = int(id)        
diff --git a/swat/templates/default/derived/account-dashboard.mako b/swat/templates/default/derived/account-dashboard.mako
new file mode 100644 (file)
index 0000000..1f98336
--- /dev/null
@@ -0,0 +1,28 @@
+<%doc>
+#
+# Account Management Dashboard Mako Template file for SWAT
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
+#   
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#   
+# You should have received a copy of the GNU General Public License
+# 
+</%doc>
+<%inherit file="/default/base/base.mako" />
+<%namespace name="toolbar" file="/default/component/toolbar.mako" />
+<%namespace name="pagination" file="/default/component/pagination.mako" />
+
+${parent.action_title(c.config.get_action_info('friendly_name'))}
+${toolbar.write(c.config.get_toolbar_items())}
+
+<%doc></%doc>
+<%def name="page_title()">
+    ${parent.page_title()} :: ${c.config.get_action_info('friendly_name')}
+</%def>