From df3c1d039c5aee19e228117f44acf42457170caf Mon Sep 17 00:00:00 2001 From: Michael Ziegler Date: Tue, 14 Apr 2009 00:06:13 +0200 Subject: [PATCH] various layout tunings --- htdocs/css/screen/basemod.css | 5 +++-- htdocs/css/screen/content.css | 4 +++- htdocs/mumble/style.css | 5 +++-- pyweb/mumble/views.py | 3 +++ pyweb/urls.py | 2 ++ pyweb/views.py | 5 ++++- template/index.htm | 24 ++++++++++++------------ template/mumble/content.htm | 2 +- template/mumble/mumble.htm | 5 +++++ template/registration/imprint.html | 17 +++++++++++++++++ 10 files changed, 53 insertions(+), 19 deletions(-) create mode 100644 template/registration/imprint.html diff --git a/htdocs/css/screen/basemod.css b/htdocs/css/screen/basemod.css index 869b64c..564785c 100644 --- a/htdocs/css/screen/basemod.css +++ b/htdocs/css/screen/basemod.css @@ -41,9 +41,10 @@ * */ - #col1 { float: left; width: 25%} + #col1 { float: left; width: 30%} + #col1 { float: left } #col2 { display:none} - #col3 { width: auto; margin: 0 0 0 25%} + #col3 { width: auto; margin: 0 0 0 30%; border-left: 1px #ddd dotted } #col1_content { padding: 0 10px 0 20px } #col3_content { padding: 0 20px 0 10px } diff --git a/htdocs/css/screen/content.css b/htdocs/css/screen/content.css index 47a7bdf..a46da8e 100644 --- a/htdocs/css/screen/content.css +++ b/htdocs/css/screen/content.css @@ -196,7 +196,9 @@ * * @section content-misc */ - + input, textarea { + border: 1px solid #CCCCCC; + } /** * (en) Emphasizing external Hyperlinks via CSS * (de) Hervorhebung externer Hyperlinks mit CSS diff --git a/htdocs/mumble/style.css b/htdocs/mumble/style.css index 6d951e0..dc0d69d 100644 --- a/htdocs/mumble/style.css +++ b/htdocs/mumble/style.css @@ -19,10 +19,11 @@ td.mumble { } div.mumble { - background-color: #BDDAFF; + background-color: #FFFFFF; color: #283E53; padding: 10px; margin-top: 20px; margin-bottom: 20px; - width: 100%; + width: 80%; + min-height: 250px; } diff --git a/pyweb/mumble/views.py b/pyweb/mumble/views.py index ff8e24b..3a490f3 100644 --- a/pyweb/mumble/views.py +++ b/pyweb/mumble/views.py @@ -72,6 +72,7 @@ def show( request, server ): else: adminform = None; + registered = False; if request.user.is_authenticated(): if request.method == 'POST' and 'mode' in request.POST and request.POST['mode'] == 'reg': try: @@ -97,6 +98,7 @@ def show( request, server ): regform = MumbleUserForm(); else: regform = MumbleUserForm( instance=user ); + registered = True; else: regform = None; @@ -109,6 +111,7 @@ def show( request, server ): "CurrentUserIsAdmin": isAdmin, "AdminForm": adminform, "RegForm": regform, + "Registered": registered, }, context_instance = RequestContext(request) ); diff --git a/pyweb/urls.py b/pyweb/urls.py index ffebb5c..4b52b30 100644 --- a/pyweb/urls.py +++ b/pyweb/urls.py @@ -1,3 +1,4 @@ +# -*- coding: utf-8 -*- from django.conf.urls.defaults import * # Uncomment the next two lines to enable the admin: @@ -14,6 +15,7 @@ urlpatterns = patterns('', # (r'^admin/doc/', include('django.contrib.admindocs.urls')), (r'^accounts/profile/', 'views.profile' ), + (r'^accounts/imprint/', 'views.imprint' ), (r'^accounts/', include('registration.urls')), (r'^mumble/', include('mumble.urls')), diff --git a/pyweb/views.py b/pyweb/views.py index cd3005d..26df3ae 100644 --- a/pyweb/views.py +++ b/pyweb/views.py @@ -1,3 +1,4 @@ +# -*- coding: utf-8 -*- from django.shortcuts import render_to_response, get_object_or_404, get_list_or_404 from django.template import RequestContext from django.http import HttpResponseRedirect @@ -23,4 +24,6 @@ def profile( request ): userdata, context_instance = RequestContext(request) ); - + +def imprint( request ): + return render_to_response( 'registration/imprint.html' ); diff --git a/template/index.htm b/template/index.htm index eef6721..192e476 100644 --- a/template/index.htm +++ b/template/index.htm @@ -1,17 +1,15 @@ -Your Page Title - - - - - - - - + Mumble Administration + + + + + +
@@ -26,7 +24,9 @@ . . - Login | Admin | Imprint + Login | + Admin | + Imprint

{% block Headline %}{% endblock %}

diff --git a/template/mumble/content.htm b/template/mumble/content.htm index fa63a81..be6b301 100644 --- a/template/mumble/content.htm +++ b/template/mumble/content.htm @@ -1,6 +1,6 @@ {% load mumble_extras %}
- +
mumble diff --git a/template/mumble/mumble.htm b/template/mumble/mumble.htm index b668a49..cbf5c5a 100644 --- a/template/mumble/mumble.htm +++ b/template/mumble/mumble.htm @@ -13,6 +13,11 @@

Server registration

+ {% if Registered %} + You are registered on this server.
+ {% else %} + You do not have an account on this server.
+ {% endif %} {{ RegForm }}
diff --git a/template/registration/imprint.html b/template/registration/imprint.html new file mode 100644 index 0000000..91c3afa --- /dev/null +++ b/template/registration/imprint.html @@ -0,0 +1,17 @@ +{% extends "index.htm" %} +{% load mumble_extras %} +{% block Content %} +
+

Imprint

+

+ This is Mumble-Django, a Murmur config application for Django that configures a Mumble server. It is able to create and remove server instances, start/stop them, and configure them.
+
+ Furthermore, registered Django users can sign up for user accounts on the configured vservers and change their registration names and passwords, and Django admins can manage server admins through the webinterface.
+
+ It is being developed by Michael "Svedrin" Ziegler, who can be contacted via e-Mail, Jabber or IRC (Svedrin in Freenode). +

+

+ The default design is based on YAML, Yet Another Multicolumn Layout by Dirk Jesse. +

+
+{% endblock %}