]> git.parisson.com Git - telemeta.git/commitdiff
rearrange admin pages
authoryomguy <yomguy@parisson.com>
Wed, 2 Mar 2011 23:02:13 +0000 (00:02 +0100)
committeryomguy <yomguy@parisson.com>
Wed, 2 Mar 2011 23:02:13 +0000 (00:02 +0100)
12 files changed:
INSTALL
telemeta/htdocs/css/admin.css
telemeta/htdocs/css/telemeta.css
telemeta/templates/telemeta/admin_enumerations.html [new file with mode: 0644]
telemeta/templates/telemeta/admin_general.html [new file with mode: 0644]
telemeta/templates/telemeta_default/admin.html
telemeta/templates/telemeta_default/admin_enumerations.html [new file with mode: 0644]
telemeta/templates/telemeta_default/admin_general.html [new file with mode: 0644]
telemeta/templates/telemeta_default/login.html
telemeta/templates/telemeta_default/mediaitem_detail.html
telemeta/urls.py
telemeta/web/base.py

diff --git a/INSTALL b/INSTALL
index 9369bbb4b0cc2c013394ba24b439645cad0dbd27..8d282e2ee804aedd899f750412084cc69f540711 100644 (file)
--- a/INSTALL
+++ b/INSTALL
@@ -132,7 +132,7 @@ Add the following variables:
     
     TEMPLATE_CONTEXT_PROCESSORS = (
         'django.core.context_processors.request',
-        'django.core.context_processors.auth',)
+        'django.contrib.auth.context_processors.auth',)
 
     TELEMETA_ORGANIZATION =  name of the organization which hosts this installation
     TELEMETA_SUBJECTS =      tuple of subject keywords (used for Dublin Core), such as "Ethnology", etc...
index 53a526b0fb31be36aef87a875b355f2c147082e9..f63806d7d09d88a970d5fce8742f4e1647e56fa3 100644 (file)
@@ -1,35 +1,38 @@
-/* Shamelessly stolen from trac's admin.css... */\r
-\r
-.tabs {\r
- border: 1px solid black;\r
- border-color: gray black black gray;\r
- margin: 2em 0;\r
- padding: .5em 0 0;\r
- float: left;\r
- width: 12em;\r
-}\r
-.tabs ul { list-style: none; margin: 0 0 .5em; padding: 0 }\r
-.tabs li { margin: 0; padding: 0.1em .5em }\r
-.tabs li li { margin: 0 -0.5em; padding-left: 1.5em }\r
-.tabs li li.active { background: #ccb; }\r
-.tabs :link, .tabs :visited { border: none; display: block }\r
-.tabs :link:hover, .tabs :visited:hover { background: transparent }\r
-\r
-.tabcontents {\r
- padding: 0.4em 2em;\r
- margin-left: 12em;\r
- min-height: 300px;\r
-}\r
-p.help { color: #666; font-size: 90%; margin: 1em .5em .5em }\r
-\r
-form.addnew { clear: right; float: right; margin: -2em 0 4em; width: 33% }\r
-form.mod { margin-top: 1em; }\r
-form.mod .field { margin: .5em 0; }\r
-form .field em { color: #888; font-size: smaller }\r
-form .field .disabled em { color: #d7d7d7 }\r
-\r
-table.listing { clear: none; width: 64% }\r
-table.listing .sel, table.listing .default { text-align: center; width: 1% }\r
-\r
-\r
-\r
+/* Shamelessly stolen from trac's admin.css... */
+
+.tabs {
+ border: 1px solid black;
+ border-color: gray black black gray;
+ margin: 2em 0;
+ padding: .5em 0 0 .5em;
+ float: left;
+ width: 12em;
+ color: #6a0307;
+ font-size: 1em;
+ font-weight: bold;
+}
+.tabs ul { list-style: none; margin: 0 0 .5em; padding: 0 }
+.tabs li { margin: 0; padding: 0.1em .5em }
+.tabs li li { margin: 0 -0.5em; padding-left: 1.5em }
+.tabs li li.active { background: #ccb; }
+.tabs :link, .tabs :visited { border: none; display: block }
+.tabs :link:hover, .tabs :visited:hover { background: transparent }
+
+.tabcontents {
+ padding: 0.4em 2em;
+ margin-left: 12em;
+ min-height: 300px;
+}
+p.help { color: #666; font-size: 90%; margin: 1em .5em .5em }
+
+form.addnew { clear: right; float: right; margin: -2em 0 4em; width: 33% }
+form.mod { margin-top: 1em; }
+form.mod .field { margin: .5em 0; }
+form .field em { color: #888; font-size: smaller }
+form .field .disabled em { color: #d7d7d7 }
+
+table.listing { clear: none; width: 64% }
+table.listing .sel, table.listing .default { text-align: center; width: 1% }
+
+
+
index 4aae0db7a67678a4255fef8f8039b437519d110c..482fc9ecdce4503667e3e65ebc3c6fecab956a5c 100644 (file)
@@ -268,7 +268,7 @@ label.disabled { color: #d7d7d7 }
     background: #FFF url(search_bg.png) no-repeat;
     padding: .4em .1em;
     padding-left: 25px;
-    width: 150px;
+    width: 180px;
     color: #555;
     font-weight: bold;
 }
@@ -808,4 +808,3 @@ a.image-link {
     border-bottom: 1px solid #ffffff;
     z-index: 10;
 }
-
diff --git a/telemeta/templates/telemeta/admin_enumerations.html b/telemeta/templates/telemeta/admin_enumerations.html
new file mode 100644 (file)
index 0000000..1d1dd2d
--- /dev/null
@@ -0,0 +1 @@
+{% extends "telemeta_default/admin_enumerations.html" %}
diff --git a/telemeta/templates/telemeta/admin_general.html b/telemeta/templates/telemeta/admin_general.html
new file mode 100644 (file)
index 0000000..1154dc2
--- /dev/null
@@ -0,0 +1 @@
+{% extends "telemeta_default/admin_general.html" %}
index 5cc5d36f96842c217758f73baf98293a163ae441..59a5edcbf1c83d8ed4977e485ad30c140cbf5cb5 100644 (file)
@@ -7,24 +7,11 @@
 
 {% block content %}
 <h3>Administration</h3>
+<br />
 <div class="tabs">
 <ul>
-<li>Users</li>
-
-{% if enumerations %}
-    <li>Enumerations
-    <ul>
-    {% for enum in enumerations %}
-        {%ifequal enum.id enumeration_id %}
-            <li class="active">{{ enum.name|capfirst }}</li>
-        {%else%}
-            <li><a href="{% url telemeta-enumeration-edit enum.id %}">
-                {{ enum.name|capfirst }}</a></li>
-        {%endifequal%}
-    {% endfor %}
-    </ul>
-</li>
-{% endif %}
+<li><a href="/admin/general/">Administration générale</a></li>
+<li><a href="/admin/enumerations/">Enumerations</a></li>
 </ul>
 </div>
 <div class="tabcontents">
diff --git a/telemeta/templates/telemeta_default/admin_enumerations.html b/telemeta/templates/telemeta_default/admin_enumerations.html
new file mode 100644 (file)
index 0000000..1b04a38
--- /dev/null
@@ -0,0 +1,32 @@
+{% extends "telemeta/admin.html" %}
+
+{% block content %}
+<h3>Administration</h3>
+<br />
+<div class="tabs">
+<ul>
+<li><a href="/admin/general/">Administration générale</a></li>
+<li><a href="/admin/enumerations/">Enumerations</a></li>
+</ul>
+</div>
+
+<div class="tabs">
+{% if enumerations %}
+    <ul>
+    {% for enum in enumerations %}
+        {%ifequal enum.id enumeration_id %}
+            <li class="active">{{ enum.name|capfirst }}</li>
+        {%else%}
+            <li><a href="{% url telemeta-enumeration-edit enum.id %}">
+                {{ enum.name|capfirst }}</a></li>
+        {%endifequal%}
+    {% endfor %}
+    </ul>
+{% endif %}
+</div>
+
+<div class="tabcontents">
+    {% block tabcontents %}
+    {% endblock %}
+</div>
+{% endblock %}
diff --git a/telemeta/templates/telemeta_default/admin_general.html b/telemeta/templates/telemeta_default/admin_general.html
new file mode 100644 (file)
index 0000000..362522f
--- /dev/null
@@ -0,0 +1,6 @@
+{% extends "telemeta/admin.html" %}
+{% load i18n %}
+
+{% block tabcontents %}
+ <iframe align="middle" frameborder="0" width="100%" height="75%"  src="/djangoadmin/" />
+{% endblock %}
index d3ebae56eb26d94b85d3c126f77939d6d7f30f96..ce4250126956c14854d6a20b64e674beb7eda67f 100644 (file)
@@ -21,6 +21,4 @@
 <input type="hidden" name="next" value="{{ next }}" />
 </form>
 
-<div class="wazing" />
-
 {% endblock %}
index b7db80cc6735cb24a36ce4b6646df3115f8f966b..f3b868cd35facb9584b6fc6d6dee7eb228a7c820 100644 (file)
 
 {% block content %}
 
-<h3><img src="../../images/item.png" style="vertical-align:middle" /> ITEM : {{ item }}</h3>
+<h3><img src="../../images/item.png" style="vertical-align:middle" /> Item : {{ item }}</h3>
 
 <div class="{% if item.file %}with-rightcol{% endif %}">
 
index ac3e016ffc14912986c23d3e770666a1ed09082c..42bfebfbd350a648f81cd94a0a45c07e7f0d4246 100644 (file)
@@ -122,7 +122,9 @@ urlpatterns = patterns('',
 
     # administration        
     url(r'^admin/$', web_view.admin_index, name="telemeta-admin"),        
-
+    url(r'^admin/general/$', web_view.admin_general, name="telemeta-admin-general"),        
+    url(r'^admin/enumerations/$', web_view.admin_enumerations, name="telemeta-admin-enumerations"),        
+    
     # enumerations administration
     url(r'^admin/enumerations/(?P<enumeration_id>[0-9a-z]+)/$', 
         web_view.edit_enumeration ,
index c34321b5dd84144d09bf959943421ba8d17e745e..e325effc275940e5866a18ede5f69ec2030645a4 100644 (file)
@@ -469,6 +469,14 @@ class WebView(object):
     def admin_index(self, request):
         return render(request, 'telemeta/admin.html', self.__get_admin_context_vars())
 
+    @method_decorator(login_required) #@login_required
+    def admin_general(self, request):
+        return render(request, 'telemeta/admin_general.html', self.__get_admin_context_vars())
+    
+    @method_decorator(login_required) #@login_required
+    def admin_enumerations(self, request):
+        return render(request, 'telemeta/admin_enumerations.html', self.__get_admin_context_vars())
+
     def __get_enumeration(self, id):
         from django.db.models import get_models
         models = get_models(telemeta.models)