changeset 1520:a9f837dee2d7

More splitted to Admin and User
author Jaiditya Mathur <jaiditya.mathur@gmail.com>
date Thu, 05 Jul 2012 14:50:22 +0530
parents 05e1d8630527
children becedcc3a41a
files MoinMoin/apps/admin/templates/admin/highlighterhelp.html MoinMoin/apps/admin/templates/admin/index.html MoinMoin/apps/admin/templates/admin/interwikihelp.html MoinMoin/apps/admin/templates/admin/itemsize.html MoinMoin/apps/admin/templates/user/highlighterhelp.html MoinMoin/apps/admin/templates/user/index_user.html MoinMoin/apps/admin/templates/user/interwikihelp.html MoinMoin/apps/admin/templates/user/itemsize.html MoinMoin/apps/admin/views.py MoinMoin/config/default.py MoinMoin/templates/itemviews.html MoinMoin/themes/foobar/templates/itemviews.html MoinMoin/themes/foobar/templates/local.html
diffstat 13 files changed, 43 insertions(+), 35 deletions(-) [+]
line wrap: on
line diff
--- a/MoinMoin/apps/admin/templates/admin/highlighterhelp.html	Wed Jul 04 13:31:41 2012 +0530
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,6 +0,0 @@
-{% import "utils.html" as utils %}
-{% extends theme("layout.html") %}
-{% block content %}
-<h1>{{ _("Available Highlighters") }}</h1>
-{{ utils.table(headings, rows) }}
-{% endblock %}
--- a/MoinMoin/apps/admin/templates/admin/index.html	Wed Jul 04 13:31:41 2012 +0530
+++ b/MoinMoin/apps/admin/templates/admin/index.html	Thu Jul 05 14:50:22 2012 +0530
@@ -11,12 +11,4 @@
     <li><a href="{{ url_for('admin.wikiconfig') }}">{{ _("Show Wiki Configuration") }}</a></li>
     <li><a href="{{ url_for('admin.wikiconfighelp') }}">{{ _("Show Wiki Configuration Help") }}</a></li>
 </ul>
-<h1>{{ _("User Menu") }}</h1>
-<ul>
-    <li><a href="{{ url_for('frontend.wanted_items') }}">{{ _("Wanted Items") }}</a></li>
-    <li><a href="{{ url_for('frontend.orphaned_items') }}">{{ _("Orphaned Items") }}</a></li>
-    <li><a href="{{ url_for('admin.itemsize') }}">{{ _("Item sizes (latest revision)") }}</a></li>
-    <li><a href="{{ url_for('admin.interwikihelp') }}">{{ _("Known InterWiki names") }}</a></li>
-    <li><a href="{{ url_for('admin.highlighterhelp') }}">{{ _("Available Highlighters") }}</a></li>
-</ul>
 {% endblock %}
--- a/MoinMoin/apps/admin/templates/admin/interwikihelp.html	Wed Jul 04 13:31:41 2012 +0530
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,6 +0,0 @@
-{% import "utils.html" as utils %}
-{% extends theme("layout.html") %}
-{% block content %}
-<h1>{{ _("Known InterWiki names") }}</h1>
-{{ utils.table(headings, rows) }}
-{% endblock %}
--- a/MoinMoin/apps/admin/templates/admin/itemsize.html	Wed Jul 04 13:31:41 2012 +0530
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,6 +0,0 @@
-{% import "utils.html" as utils %}
-{% extends theme("layout.html") %}
-{% block content %}
-<h1>{{ _("Item sizes (latest revision)") }}</h1>
-{{ utils.table(headings, rows) }}
-{% endblock %}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/MoinMoin/apps/admin/templates/user/highlighterhelp.html	Thu Jul 05 14:50:22 2012 +0530
@@ -0,0 +1,6 @@
+{% import "utils.html" as utils %}
+{% extends theme("layout.html") %}
+{% block content %}
+<h1>{{ _("Available Highlighters") }}</h1>
+{{ utils.table(headings, rows) }}
+{% endblock %}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/MoinMoin/apps/admin/templates/user/index_user.html	Thu Jul 05 14:50:22 2012 +0530
@@ -0,0 +1,11 @@
+{% extends theme("layout.html") %}
+{% block content %}
+<h1>{{ _("User Menu") }}</h1>
+<ul>
+    <li><a href="{{ url_for('frontend.wanted_items') }}">{{ _("Wanted Items") }}</a></li>
+    <li><a href="{{ url_for('frontend.orphaned_items') }}">{{ _("Orphaned Items") }}</a></li>
+    <li><a href="{{ url_for('admin.itemsize') }}">{{ _("Item sizes (latest revision)") }}</a></li>
+    <li><a href="{{ url_for('admin.interwikihelp') }}">{{ _("Known InterWiki names") }}</a></li>
+    <li><a href="{{ url_for('admin.highlighterhelp') }}">{{ _("Available Highlighters") }}</a></li>
+</ul>
+{% endblock %}
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/MoinMoin/apps/admin/templates/user/interwikihelp.html	Thu Jul 05 14:50:22 2012 +0530
@@ -0,0 +1,6 @@
+{% import "utils.html" as utils %}
+{% extends theme("layout.html") %}
+{% block content %}
+<h1>{{ _("Known InterWiki names") }}</h1>
+{{ utils.table(headings, rows) }}
+{% endblock %}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/MoinMoin/apps/admin/templates/user/itemsize.html	Thu Jul 05 14:50:22 2012 +0530
@@ -0,0 +1,6 @@
+{% import "utils.html" as utils %}
+{% extends theme("layout.html") %}
+{% block content %}
+<h1>{{ _("Item sizes (latest revision)") }}</h1>
+{{ utils.table(headings, rows) }}
+{% endblock %}
--- a/MoinMoin/apps/admin/views.py	Wed Jul 04 13:31:41 2012 +0530
+++ b/MoinMoin/apps/admin/views.py	Thu Jul 05 14:50:22 2012 +0530
@@ -25,9 +25,13 @@
 from MoinMoin.config import SUPERUSER
 from MoinMoin.security import require_permission
 
-@admin.route('/')
+@admin.route('/superuser')
 def index():
-    return render_template('admin/index.html', title_name=_(u"More"))
+    return render_template('admin/index.html', title_name=_(u"Admin"))
+
+@admin.route('/user')    
+def index_user():
+    return render_template('user/index_user.html', title_name=_(u"User"))
 
 
 @admin.route('/userbrowser')
@@ -201,7 +205,7 @@
     lexers = pygments.lexers.get_all_lexers()
     rows = sorted([[desc, ' '.join(names), ' '.join(patterns), ' '.join(mimetypes), ]
                    for desc, names, patterns, mimetypes in lexers])
-    return render_template('admin/highlighterhelp.html',
+    return render_template('user/highlighterhelp.html',
                            title_name=_(u"Highlighter Help"),
                            headings=headings,
                            rows=rows)
@@ -214,7 +218,7 @@
                 _('URL'),
                ]
     rows = sorted(app.cfg.interwiki_map.items())
-    return render_template('admin/interwikihelp.html',
+    return render_template('user/interwikihelp.html',
                            title_name=_(u"Interwiki Help"),
                            headings=headings,
                            rows=rows)
@@ -229,7 +233,7 @@
     rows = [(rev.meta[SIZE], rev.meta[NAME])
             for rev in flaskg.storage.documents(wikiname=app.cfg.interwikiname)]
     rows = sorted(rows, reverse=True)
-    return render_template('admin/itemsize.html',
+    return render_template('user/itemsize.html',
                            title_name=_(u"Item Size"),
                            headings=headings,
                            rows=rows)
--- a/MoinMoin/config/default.py	Wed Jul 04 13:31:41 2012 +0530
+++ b/MoinMoin/config/default.py	Thu Jul 05 14:50:22 2012 +0530
@@ -334,7 +334,8 @@
         ('wikilink', 'frontend.global_history', dict(), L_('History'), L_('Global History')),
         ('wikilink', 'frontend.index', dict(), L_('Index'), L_('Global Index')),
         ('wikilink', 'frontend.global_tags', dict(), L_('Tags'), L_('Global Tags Index')),
-        ('wikilink', 'admin.index', dict(), L_('More'), L_('Administration & Docs')),
+        ('wikilink', 'admin.index_user', dict(), L_('User'), L_('User')),
+        ('wikilink', 'admin.index', dict(), L_('Admin'), L_('Administration & Docs')),
      ],
      'Data to create the navi_bar from. Users can add more items in their quick links in user preferences. You need to configure a list of tuples (css_class, endpoint, args, label, title). Use L_() for translating. [list of tuples]'),
 
--- a/MoinMoin/templates/itemviews.html	Wed Jul 04 13:31:41 2012 +0530
+++ b/MoinMoin/templates/itemviews.html	Thu Jul 05 14:50:22 2012 +0530
@@ -35,7 +35,7 @@
 
             {%- if endpoint in [
                 'frontend.global_history', 'frontend.global_index', 'frontend.global_tags',
-                'admin.index',
+                'admin.index', 'admin.index_user',
             ] %}
                 <li>
                     <a href="{{ url_for(endpoint) }}" title="{{ title }}" rel="nofollow">{{ label }}</a>
--- a/MoinMoin/themes/foobar/templates/itemviews.html	Wed Jul 04 13:31:41 2012 +0530
+++ b/MoinMoin/themes/foobar/templates/itemviews.html	Thu Jul 05 14:50:22 2012 +0530
@@ -35,7 +35,7 @@
 
             {%- if endpoint in [
                 'frontend.global_history', 'frontend.global_index', 'frontend.global_tags',
-                'admin.index',
+                'admin.index', 'admin.index_user',
             ] %}
                 <li>
                     <a href="{{ url_for(endpoint) }}" title="{{ title }}" rel="nofollow">{{ label }}</a>
--- a/MoinMoin/themes/foobar/templates/local.html	Wed Jul 04 13:31:41 2012 +0530
+++ b/MoinMoin/themes/foobar/templates/local.html	Thu Jul 05 14:50:22 2012 +0530
@@ -52,7 +52,7 @@
 
                     {%- if endpoint in [
                         'frontend.global_history', 'frontend.global_index', 'frontend.global_tags',
-                        'admin.index',
+                        'admin.index', 'admin.index_user',
                     ] %}
                         <li>
                             <a href="{{ url_for(endpoint) }}" title="{{ title }}" rel="nofollow">{{ label }}</a>