diff --git a/pylons_app/config/middleware.py b/pylons_app/config/middleware.py
--- a/pylons_app/config/middleware.py
+++ b/pylons_app/config/middleware.py
@@ -58,7 +58,9 @@ def make_app(global_conf, full_stack=Tru
else:
app = StatusCodeRedirect(app, [400, 401, 403, 404, 500])
+ #enable https redirets based on HTTP_X_URL_SCHEME set by proxy
app = HttpsFixup(app)
+
# Establish the Registry for this application
app = RegistryManager(app)
diff --git a/pylons_app/controllers/admin.py b/pylons_app/controllers/admin.py
--- a/pylons_app/controllers/admin.py
+++ b/pylons_app/controllers/admin.py
@@ -7,7 +7,6 @@ from pylons_app.lib.base import BaseCont
from pylons_app.model import meta
from pylons_app.model.db import UserLogs
from webhelpers.paginate import Page
-from pylons_app.lib.utils import check_repo, invalidate_cache
from pylons_app.lib.auth import LoginRequired
log = logging.getLogger(__name__)
@@ -31,37 +30,5 @@ class AdminController(BaseController):
c.log_data = render('admin/admin_log.html')
if request.params.get('partial'):
return c.log_data
- return render('admin/admin.html')
-
- def add_repo(self, new_repo):
- #extra check it can be add since it's the command
- if new_repo == '_admin':
- c.msg = 'DENIED'
- c.new_repo = ''
- return render('admin/add.html')
-
- new_repo = new_repo.replace(" ", "_")
- new_repo = new_repo.replace("-", "_")
-
- try:
- self._create_repo(new_repo)
- c.new_repo = new_repo
- c.msg = 'added repo'
- #clear our cached list for refresh with new repo
- invalidate_cache('cached_repo_list')
- except Exception as e:
- c.new_repo = 'Exception when adding: %s' % new_repo
- c.msg = str(e)
-
- return render('admin/add.html')
-
-
- def _create_repo(self, repo_name):
- if repo_name in [None, '', 'add']:
- raise Exception('undefined repo_name of repo')
- repo_path = os.path.join(g.base_path, repo_name)
- if check_repo(repo_name, g.base_path):
- log.info('creating repo %s in %s', repo_name, repo_path)
- from vcs.backends.hg import MercurialRepository
- MercurialRepository(repo_path, create=True)
+ return render('admin/admin.html')
diff --git a/pylons_app/templates/admin/admin.html b/pylons_app/templates/admin/admin.html
--- a/pylons_app/templates/admin/admin.html
+++ b/pylons_app/templates/admin/admin.html
@@ -2,7 +2,7 @@
<%inherit file="/base/base.html"/>
<%def name="title()">
- ${_('Repository managment')}
+ ${_('Administration')}
%def>
<%def name="breadcrumbs()">
${h.link_to(u'Admin',h.url('admin_home'))}
@@ -10,20 +10,13 @@
%def>
<%def name="page_nav()">
${self.menu('admin')}
+ ${self.submenu('')}
%def>
<%def name="main()">
%if c.admin_user:
-
-
Welcome ${c.admin_username}
+ ${_('Last actions')}
${c.log_data}
diff --git a/pylons_app/templates/admin/repos/repo_add.html b/pylons_app/templates/admin/repos/repo_add.html
--- a/pylons_app/templates/admin/repos/repo_add.html
+++ b/pylons_app/templates/admin/repos/repo_add.html
@@ -2,39 +2,39 @@
<%inherit file="/base/base.html"/>
<%def name="title()">
- ${_('Add new repository')}
+ ${_('Repositories administration')}
%def>
-
<%def name="breadcrumbs()">
${h.link_to(u'Admin',h.url('admin_home'))}
- /
+ /
%def>
-
<%def name="page_nav()">
${self.menu('admin')}
-%def>
-
-<%def name="main()">
-
-
- ${c.msg} |
-
-
- ${c.new_repo} |
-
-
+ ${self.submenu('repos')}
%def>
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+<%def name="main()">
+
+
${_('Repositories')} - ${_('add new')}
+ ${h.form(url('repos'))}
+
+
+ ${_('Name')} |
+ ${h.text('name',c.new_repo)} |
+
+
+ ${_('Description')} |
+ ${h.textarea('description',cols=23,rows=5)} |
+
+
+ ${_('Private')} |
+ ${h.checkbox('private')} |
+
+
+ |
+ ${h.submit('add','add')} |
+
+
+
+ ${h.end_form()}
+
+%def>
diff --git a/pylons_app/templates/admin/repos/repo_edit.html b/pylons_app/templates/admin/repos/repo_edit.html
--- a/pylons_app/templates/admin/repos/repo_edit.html
+++ b/pylons_app/templates/admin/repos/repo_edit.html
@@ -1,25 +1,40 @@
-<%inherit file="base/base.html"/>
+## -*- coding: utf-8 -*-
+<%inherit file="/base/base.html"/>
+
<%def name="title()">
- ${_('Repository managment')}
+ ${_('Repositories administration')}
%def>
<%def name="breadcrumbs()">
- ${h.link_to(u'Admin',h.url('admin_home'))}
- /
- ${h.link_to(u'Repos managment',h.url('repos'))}
+ ${h.link_to(u'Admin',h.url('admin_home'))}
+ /
%def>
<%def name="page_nav()">
${self.menu('admin')}
+ ${self.submenu('repos')}
%def>
<%def name="main()">
-
-
${_('Mercurial repos')}
+
${_('Repositories')} - ${_('edit')}
+ ${h.form(url('repos'))}
+
+
+ ${_('Name')} |
+ ${h.text('name',c.new_repo)} |
+
+
+ ${_('Description')} |
+ ${h.textarea('description',cols=23,rows=5)} |
+
+
+ ${_('Private')} |
+ ${h.checkbox('private')} |
+
+
+ |
+ ${h.submit('add','add')} |
+
+
+
+ ${h.end_form()}
-%def>
\ No newline at end of file
+%def>
diff --git a/pylons_app/templates/admin/repos/repos.html b/pylons_app/templates/admin/repos/repos.html
--- a/pylons_app/templates/admin/repos/repos.html
+++ b/pylons_app/templates/admin/repos/repos.html
@@ -1,26 +1,20 @@
+## -*- coding: utf-8 -*-
<%inherit file="/base/base.html"/>
+
<%def name="title()">
- ${_('Repository managment')}
+ ${_('Repositories administration')}
%def>
<%def name="breadcrumbs()">
- ${h.link_to(u'Admin',h.url('admin_home'))}
- /
- ${h.link_to(u'Repos managment',h.url('repos'))}
+ ${h.link_to(u'Admin',h.url('admin_home'))}
+ /
%def>
<%def name="page_nav()">
${self.menu('admin')}
+ ${self.submenu('repos')}
%def>
<%def name="main()">
-
-
${_('Mercurial repos')}
+
${_('Repositories administration')}
%for cnt,repo in enumerate(c.repos_list):
@@ -35,4 +29,4 @@
%endfor
-%def>
\ No newline at end of file
+%def>
diff --git a/pylons_app/templates/admin/users/user_add.html b/pylons_app/templates/admin/users/user_add.html
--- a/pylons_app/templates/admin/users/user_add.html
+++ b/pylons_app/templates/admin/users/user_add.html
@@ -1,24 +1,18 @@
+## -*- coding: utf-8 -*-
<%inherit file="/base/base.html"/>
+
<%def name="title()">
- ${_('User')} - ${_('add new')}
+ ${_('User administration')}
%def>
<%def name="breadcrumbs()">
- ${h.link_to(u'Admin',h.url('admin_home'))}
- /
- ${h.link_to(u'Users',h.url('users'))}
+ ${h.link_to(u'Admin',h.url('admin_home'))}
+ /
%def>
<%def name="page_nav()">
${self.menu('admin')}
+ ${self.submenu('users')}
%def>
<%def name="main()">
-
${_('User')} - ${_('add new')}
${h.form(url('users'))}
@@ -41,7 +35,6 @@
-
${h.end_form()}
%def>
\ No newline at end of file
diff --git a/pylons_app/templates/admin/users/user_edit.html b/pylons_app/templates/admin/users/user_edit.html
--- a/pylons_app/templates/admin/users/user_edit.html
+++ b/pylons_app/templates/admin/users/user_edit.html
@@ -1,24 +1,18 @@
+## -*- coding: utf-8 -*-
<%inherit file="/base/base.html"/>
+
<%def name="title()">
- ${_('User')} - ${c.user.username}
+ ${_('User administration')}
%def>
<%def name="breadcrumbs()">
- ${h.link_to(u'Admin',h.url('admin_home'))}
- /
- ${h.link_to(u'Users',h.url('users'))}
+ ${h.link_to(u'Admin',h.url('admin_home'))}
+ /
%def>
<%def name="page_nav()">
${self.menu('admin')}
+ ${self.submenu('users')}
%def>
<%def name="main()">
-
${_('User')} - ${c.user.username}
${h.form(url('user', id=c.user.user_id),method='put')}
@@ -41,7 +35,6 @@
-
${h.end_form()}
-%def>
\ No newline at end of file
+%def>
\ No newline at end of file
diff --git a/pylons_app/templates/admin/users/users.html b/pylons_app/templates/admin/users/users.html
--- a/pylons_app/templates/admin/users/users.html
+++ b/pylons_app/templates/admin/users/users.html
@@ -1,24 +1,18 @@
+## -*- coding: utf-8 -*-
<%inherit file="/base/base.html"/>
+
<%def name="title()">
- ${_('Users managment')}
+ ${_('Users administration')}
%def>
<%def name="breadcrumbs()">
- ${h.link_to(u'Admin',h.url('admin_home'))}
- /
- ${h.link_to(u'Users managment',h.url('users'))}
+ ${h.link_to(u'Admin',h.url('admin_home'))}
+ /
%def>
<%def name="page_nav()">
${self.menu('admin')}
+ ${self.submenu('users')}
%def>
<%def name="main()">
-
${_('Mercurial users')}
${h.link_to(u'Add user',h.url('new_user'))}
-
-%def>
\ No newline at end of file
+%def>
diff --git a/pylons_app/templates/base/base.html b/pylons_app/templates/base/base.html
--- a/pylons_app/templates/base/base.html
+++ b/pylons_app/templates/base/base.html
@@ -5,6 +5,7 @@
${next.title()}
+ ##For future use yui reset for cross browser compatability.
##
${self.css()}
${self.js()}
@@ -15,12 +16,11 @@
${next.main()}
@@ -43,6 +43,7 @@
<%def name="page_nav()">
${self.menu()}
+ ${self.submenu()}
%def>
<%def name="menu(current)">
@@ -52,6 +53,7 @@ def is_current(selected):
return "class='current'"
%>
%if current not in ['home','admin']:
+ ##regular menu