diff --git a/paramecio2/libraries/generate_admin_class.py b/paramecio2/libraries/generate_admin_class.py index b112038..ffe45d7 100644 --- a/paramecio2/libraries/generate_admin_class.py +++ b/paramecio2/libraries/generate_admin_class.py @@ -103,12 +103,12 @@ class GenerateAdminClass: try: - item_id=str(int(request.args.get['id'])) + item_id=str(int(request.args.get('id', '0'))) except: item_id='0' - + title_edit=I18n.lang('common', 'add_new_item', 'Add new item') diff --git a/paramecio2/modules/admin/admin/ausers.py b/paramecio2/modules/admin/admin/ausers.py index cf6bbea..f8421dd 100644 --- a/paramecio2/modules/admin/admin/ausers.py +++ b/paramecio2/modules/admin/admin/ausers.py @@ -22,6 +22,9 @@ def admin(**args): user_admin.fields['password'].protected=False + user_admin.check_user=False + user_admin.check_email=False + url=url_for('.admin', module='ausers') admin=GenerateAdminClass(user_admin, url, t) diff --git a/paramecio2/modules/admin/app.py b/paramecio2/modules/admin/app.py index 275c739..9c6d6c6 100644 --- a/paramecio2/modules/admin/app.py +++ b/paramecio2/modules/admin/app.py @@ -113,7 +113,7 @@ def admin(module='', submodule=''): if type(content).__name__=='str': - return t.load_template('content.phtml', title=I18n.lang('admin', 'paramecio_admin', 'Paramecio admin'), contents=content) + return t.load_template('content.phtml', title=I18n.lang('admin', 'paramecio_admin', 'Paramecio admin'), contents=content, path_module=path_module) else: diff --git a/paramecio2/modules/admin/media/css/admin.css b/paramecio2/modules/admin/media/css/admin.css index f741fa6..1af9f79 100644 --- a/paramecio2/modules/admin/media/css/admin.css +++ b/paramecio2/modules/admin/media/css/admin.css @@ -161,7 +161,7 @@ p { background: transparent; } -#menu a:hover +#menu a:hover, #menu a.selected_menu { text-decoration:underline; diff --git a/paramecio2/modules/admin/templates/dashboard.phtml b/paramecio2/modules/admin/templates/dashboard.phtml index 6af6b68..9aedd6e 100644 --- a/paramecio2/modules/admin/templates/dashboard.phtml +++ b/paramecio2/modules/admin/templates/dashboard.phtml @@ -42,14 +42,32 @@ %> % for admin in config_admin.values(): + + <% + + class_selected='' + + %> % if len(admin)==3: + <% + + if admin[2]+'/'==path_module: + class_selected='selected_menu' + + %> -