Bits of style for the UI

This commit is contained in:
Mikaël Ates 2011-09-08 14:50:04 +02:00
parent 1db7883e7a
commit 152a3c24af
33 changed files with 282 additions and 70 deletions

View File

@ -200,11 +200,11 @@ def index(request):
tpl_parameters['exploitation_services'] = list_exploitation_services
tpl_parameters['username'] = request.user.username
if is_root_administrator(request.user):
tpl_parameters['special_role'] = _('You are a root administrator')
tpl_parameters['special_role'] = _('You are a root administrator of A.C.S.')
elif is_user_administrator(request.user):
tpl_parameters['special_role'] = _('You are a user administrator')
tpl_parameters['special_role'] = _('You are a user administrator of A.C.S.')
elif is_abac_administrator(request.user):
tpl_parameters['special_role'] = _('You are an abac administrator')
tpl_parameters['special_role'] = _('You are an abac administrator of A.C.S.')
return render_to_response('index.html',
tpl_parameters,
context_instance=RequestContext(request))
@ -468,17 +468,17 @@ def mod_policy(request):
tpl_parameters['username'] = request.user.username
if is_policy_root_administrator(request.user, policy):
tpl_parameters['special_roles'] = \
[_('You are a root administrator of this policy')]
[_('Root administrator of this policy.')]
else:
l = []
if is_policy_user_administrator(request.user, policy):
l.append(_('User and Roles administrator'))
l.append(_('User and Roles administrator of this policy.'))
if is_policy_abac_administrator(request.user, policy):
l.append(_('ABAC administrator'))
l.append(_('ABAC administrator of this policy.'))
if is_policy_object_creator(request.user, policy):
l.append(_('Objects and Views administrator'))
l.append(_('Objects and Views administrator of this policy.'))
if is_policy_action_creator(request.user, policy):
l.append(_('Actions and Activities administrator'))
l.append(_('Actions and Activities administrator of this policy.'))
if l:
tpl_parameters['special_roles'] = l

View File

@ -9,7 +9,7 @@ html, body {
}
body#iframe {
background: white;
background: white;
}
html {
@ -17,6 +17,76 @@ html {
color: #8c8c73;
}
div.right {
text-align: right
}
a.button {
-moz-border-radius: 5px;
-webkit-border-radius: 5px;
border-radius: 5px;
background: #5C5C5C;
color: #FF6600;
font-weight: bold;
padding-top: 5px;
padding-bottom: 5px;
padding-right: 10px;
padding-left: 10px;
margin: 0;
cursor: pointer;
text-decoration: none;
}
a.button:hover {
background: black;
}
a.back {
-moz-border-radius: 5px;
-webkit-border-radius: 5px;
border-radius: 5px;
background: #5C5C5C;
color: white;
font-weight: bold;
padding-top: 5px;
padding-bottom: 5px;
padding-right: 10px;
padding-left: 10px;
margin: 10px;
cursor: pointer;
text-decoration: none;
}
a.back:hover {
background: black;
}
li.bigbutton {
list-style: none;
-moz-border-radius: 5px;
-webkit-border-radius: 5px;
border-radius: 5px;
background: #F7F7F7;
color: #5C5C5C;
font-weight: bold;
padding-top: 5px;
padding-bottom: 5px;
padding-right: 10px;
padding-left: 10px;
margin: 10px;
cursor: pointer;
text-align: center
}
li.bigbutton a.bigbutton {
text-decoration: none;
}
li.bigbutton a.bigbutton:hover {
text-decoration: none;
color: black;
}
a
{
color: #FF7800;
@ -150,14 +220,59 @@ form p textarea {
margin-left: 10px;
}
div.admin_info {
list-style: none;
-moz-border-radius: 5px;
-webkit-border-radius: 5px;
border-radius: 5px;
background: #F5F5F5;
color: #171717;
margin-top: 5px;
margin-bottom: 10px;
padding: 10px;
}
ul.messages {
margin: 0;
padding: 0;
list-style: none;
margin-top: 10px;
margin-bottom: 10px;
padding: 10px;
}
ul.messages li.info {
list-style: none;
-moz-border-radius: 5px;
-webkit-border-radius: 5px;
border-radius: 5px;
background: #CCEBCC;
color: #009900;
padding-top: 5px;
padding-bottom: 5px;
padding-right: 10px;
padding-left: 10px;
}
ul.messages li.warn {
list-style: none;
-moz-border-radius: 5px;
-webkit-border-radius: 5px;
border-radius: 5px;
background: #FFE0CC;
color: #FF6600;
margin-top: 10px;
margin-bottom: 10px;
padding: 10px;
}
ul.messages li.error {
color: #e80404;
list-style: none;
-moz-border-radius: 5px;
-webkit-border-radius: 5px;
border-radius: 5px;
background: #F0B2B2;
color:#e80404;
margin-top: 10px;
margin-bottom: 10px;
padding: 10px;
}
ul.errorlist {
@ -180,19 +295,38 @@ textarea:focus, input[type="text"]:focus, input[type="password"]:focus {
color:#333333;
}
input[type=submit] {
color: #ffffff;
background:#4690d6;
border: 1px solid #2a567f;
font-weight: bold;
padding: 2px 8px 2px 8px;
margin: 0;
cursor: pointer;
-moz-border-radius: 5px;
-webkit-border-radius: 5px;
border-radius: 5px;
background: #5C5C5C;
color: #FF6600;
font-weight: bold;
padding-top: 5px;
padding-bottom: 5px;
padding-right: 10px;
padding-left: 10px;
margin: 0;
cursor: pointer;
text-decoration: none;
}
input[type=submit]:hover {
border-color: #0e1d2b;
background: black;
}
input[type=text] {
-moz-border-radius: 5px;
-webkit-border-radius: 5px;
border-radius: 5px;
background-color:white;
color:grey;
border: 1px solid grey;
}
input[type=text]:hover {
border-color: #0e1d2b;
}
form#login-form ul.errorlist {

View File

@ -528,5 +528,8 @@
</div>
<p><a href="{{ backlink }}">{% trans "Back" %}</a></p>
<div class="right">
<a class="back" href="/">{% trans "Back" %}</a>
</div>
{% endblock %}

View File

@ -59,5 +59,7 @@
<p>{% trans 'You have not enough rights or there is not enough material in the policy to set a to set a permission.' %}</p>
{% endif %}
<p><a href="{{ backlink }}">{% trans "Back" %}</a></p>
<div class="right">
<a class="back" href="{{ backlink }}">{% trans "Back" %}</a>
</div>
{% endblock %}

View File

@ -63,5 +63,7 @@
<p>{% trans 'You have not enough rights or there is not enough material in the policy to set a to set a permission.' %}</p>
{% endif %}
<p><a href="{{ backlink }}">{% trans "Back" %}</a></p>
<div class="right">
<a class="back" href="{{ backlink }}">{% trans "Back" %}</a>
</div>
{% endblock %}

View File

@ -67,5 +67,7 @@ You can only ask decisions on entities you have administration rights.
<p>{% trans 'You have not enough rights or there is not enough material in the policy to ask for a decision.' %}</p>
{% endif %}
<a href="{{ backlink }}">Back</a>
<div class="right">
<a class="back" href="{{ backlink }}">{% trans "Back" %}</a>
</div>
{% endblock %}

View File

@ -63,5 +63,7 @@ You can only ask decisions on entities you have administration rights.
<p>{% trans 'You have not enough rights or there is not enough material in the policy to ask for a decision.' %}</p>
{% endif %}
<a href="{{ backlink }}">Back</a>
<div class="right">
<a class="back" href="{{ backlink }}">{% trans "Back" %}</a>
</div>
{% endblock %}

View File

@ -24,6 +24,8 @@
{% else %}
<p>Something bad happened.</p>
<a href="/">{% trans "Back" %}</a>
<div class="right">
<a class="back" href="/">{% trans "Back" %}</a>
</div>
{% endif %}
{% endblock %}

View File

@ -42,6 +42,8 @@
{% else %}
<p>Something bad happened.</p>
<a href="/">{% trans "Back" %}</a>
<div class="right">
<a class="back" href="/">{% trans "Back" %}</a>
</div>
{% endif %}
{% endblock %}

View File

@ -34,6 +34,8 @@
{% else %}
<p>Something bad happened.</p>
<a href="/">{% trans "Back" %}</a>
<div class="right">
<a class="back" href="/">{% trans "Back" %}</a>
</div>
{% endif %}
{% endblock %}

View File

@ -69,5 +69,7 @@ There is no user you are authorized to administrate.
</p>
{% endif %}
<p><a href="{{ backlink }}">{% trans "Back" %}</a></p>
<div class="right">
<a class="back" href="{{ backlink }}">{% trans "Back" %}</a>
</div>
{% endblock %}

View File

@ -19,8 +19,12 @@
{% endif %}
{% if backlink %}
<a href="{{ backlink }}">{% trans "Back" %}</a>
<div class="right">
<a class="back" href="{{ backlink }}">{% trans "Back" %}</a>
</div>
{% else %}
<a href="/">{% trans "Back" %}</a>
<div class="right">
<a class="back" href="/">{% trans "Back" %}</a>
</div>
{% endif %}
{% endblock %}

View File

@ -3,16 +3,19 @@
{% block content %}
<div class="admin_info">
<div class="right">
<a class="button" href="/logout">{% trans "Logout" %}</a>
</div>
{% if username %}
<p>{% trans "You are logged as" %} <strong>{{ username }}</strong>. <a href="/logout">{% trans "Logout" %}</a></p>
{% trans "You are logged as" %} <strong>{{ username }}</strong>.
{% else %}
<p>{% trans "Logged in." %} <a href="/logout">{% trans "Logout" %}</a></p>
{% trans "Logged in." %}
{% endif %}
{% if special_role %}
<p>{{ special_role }}</p>
{% endif %}
{{ special_role }}
</div>
{% if messages %}
<ul class="messages">
@ -45,7 +48,7 @@
<h2>{{ key }}</h2>
<ul>
{% for k, v in value.items %}
<li><a href="{{ k }}">{{ v }}</a></li>
<li class="bigbutton"><a class="bigbutton" href="{{ k }}">{{ v }}</a></li>
{% endfor %}
</ul>
{% endif %}
@ -60,7 +63,7 @@
<h2>{{ key }}</h2>
<ul>
{% for k, v in value.items %}
<li><a href="{{ k }}">{{ v }}</a></li>
<li class="bigbutton"><a class="bigbutton" href="{{ k }}">{{ v }}</a></li>
{% endfor %}
</ul>
{% endif %}
@ -75,7 +78,7 @@
<h2>{{ key }}</h2>
<ul>
{% for k, v in value.items %}
<li><a href="{{ k }}">{{ v }}</a></li>
<li class="bigbutton"><a class="bigbutton" href="{{ k }}">{{ v }}</a></li>
{% endfor %}
</ul>
{% endif %}

View File

@ -32,5 +32,7 @@
{% endfor %}
</ul>
{% endif %}
<p><a href="{{ backlink }}">{% trans "Back" %}</a></p>
<div class="right">
<a class="back" href="{{ backlink }}">{% trans "Back" %}</a>
</div>
{% endblock %}

View File

@ -77,5 +77,7 @@
{% trans "No accesses you can delegate." %}
</p>
{% endif %}
<p><a href="{{ backlink }}">{% trans "Back" %}</a></p>
<div class="right">
<a class="back" href="{{ backlink }}">{% trans "Back" %}</a>
</div>
{% endblock %}

View File

@ -41,5 +41,7 @@
{% endfor %}
</ul>
{% endif %}
<p><a href="{{ backlink }}">{% trans "Back" %}</a></p>
<div class="right">
<a class="back" href="{{ backlink }}">{% trans "Back" %}</a>
</div>
{% endblock %}

View File

@ -67,5 +67,7 @@
</div>
{% endif %}
<p><a href="{{ backlink }}">{% trans "Back" %}</a></p>
<div class="right">
<a class="back" href="{{ backlink }}">{% trans "Back" %}</a>
</div>
{% endblock %}

View File

@ -92,5 +92,7 @@
{% endif %}
<p><a href="{{ backlink }}">{% trans "Back" %}</a></p>
<div class="right">
<a class="back" href="{{ backlink }}">{% trans "Back" %}</a>
</div>
{% endblock %}

View File

@ -38,5 +38,7 @@
{% endfor %}
</ul>
{% endif %}
<p><a href="{{ backlink }}">{% trans "Back" %}</a></p>
<div class="right">
<a class="back" href="{{ backlink }}">{% trans "Back" %}</a>
</div>
{% endblock %}

View File

@ -33,5 +33,7 @@
{% endfor %}
</ul>
{% endif %}
<p><a href="{{ backlink }}">{% trans "Back" %}</a></p>
<div class="right">
<a class="back" href="{{ backlink }}">{% trans "Back" %}</a>
</div>
{% endblock %}

View File

@ -32,5 +32,7 @@
{% endfor %}
</ul>
{% endif %}
<p><a href="{{ backlink }}">{% trans "Back" %}</a></p>
<div class="right">
<a class="back" href="{{ backlink }}">{% trans "Back" %}</a>
</div>
{% endblock %}

View File

@ -47,5 +47,7 @@
{% endfor %}
</ul>
{% endif %}
<a href="{{ backlink }}">{% trans "Back" %}</a>
<div class="right">
<a class="back" href="{{ backlink }}">{% trans "Back" %}</a>
</div>
{% endblock %}

View File

@ -52,5 +52,7 @@ There is no user you are authorized to administrate.
</p>
{% endif %}
<p><a href="{{ backlink }}">{% trans "Back" %}</a></p>
<div class="right">
<a class="back" href="{{ backlink }}">{% trans "Back" %}</a>
</div>
{% endblock %}

View File

@ -60,5 +60,7 @@
</form>
</div>
<p><a href="{{ backlink }}">{% trans "Back" %}</a></p>
<div class="right">
<a class="back" href="{{ backlink }}">{% trans "Back" %}</a>
</div>
{% endblock %}

View File

@ -104,6 +104,8 @@
</form>
</div>
<p><a href="{{ backlink }}">{% trans "Back" %}</a></p>
<div class="right">
<a class="back" href="{{ backlink }}">{% trans "Back" %}</a>
</div>
{% endblock %}

View File

@ -27,5 +27,7 @@
</form>
</div>
<p><a href="{{ backlink }}">{% trans "Back" %}</a></p>
<div class="right">
<a class="back" href="{{ backlink }}">{% trans "Back" %}</a>
</div>
{% endblock %}

View File

@ -27,5 +27,7 @@
</form>
</div>
<p><a href="{{ backlink }}">{% trans "Back" %}</a></p>
<div class="right">
<a class="back" href="{{ backlink }}">{% trans "Back" %}</a>
</div>
{% endblock %}

View File

@ -3,21 +3,32 @@
{% block content %}
<div class="admin_info">
<div class="right">
<a class="button" href="/logout">{% trans "Logout" %}</a>
</div>
{% if username %}
<p>{% trans "You are logged as" %} <strong>{{ username }}</strong>. <a href="/logout">{% trans "Logout" %}</a></p>
{% trans "You are logged as" %} <strong>{{ username }}</strong>.
{% else %}
<p>{% trans "Logged in." %} <a href="/logout">{% trans "Logout" %}</a></p>
{% trans "Logged in." %}
{% endif %}
</div>
<div class="right">
<a class="back" href="/">{% trans "Back" %}</a>
</div>
<h2>{% trans "Administration of" %} {{policy.name}}</h2>
{% if special_roles %}
<p>{% trans "You have the following special roles" %}:</p>
<div class="admin_info">
<ul>
{% for role in special_roles %}
<li>{{ role }}</li>
{% endfor %}
</ul>
</div>
{% endif %}
{% if messages %}
@ -50,7 +61,7 @@
<h2>{{ key }}</h2>
<ul>
{% for k, v in value.items %}
<li><a href="{{ k }}">{{ v }}</a></li>
<li class="bigbutton"><a class="bigbutton" href="{{ k }}">{{ v }}</a></li>
{% endfor %}
</ul>
{% endif %}
@ -65,7 +76,7 @@
<h2>{{ key }}</h2>
<ul>
{% for k, v in value.items %}
<li><a href="{{ k }}">{{ v }}</a></li>
<li class="bigbutton"><a class="bigbutton" href="{{ k }}">{{ v }}</a></li>
{% endfor %}
</ul>
{% endif %}
@ -75,7 +86,9 @@
</div>
<a href="/">{% trans "Back" %}</a>
<div class="right">
<a class="back" href="/">{% trans "Back" %}</a>
</div>
<script type="text/javascript">
$( "#tabs" ).tabs({cookie: {path: '/'}});

View File

@ -68,5 +68,7 @@
</form>
</div>
<p><a href="{{ backlink }}">{% trans "Back" %}</a></p>
<div class="right">
<a class="back" href="{{ backlink }}">{% trans "Back" %}</a>
</div>
{% endblock %}

View File

@ -25,5 +25,7 @@
</form>
</div>
<p><a href="{{ backlink }}">{% trans "Back" %}</a></p>
<div class="right">
<a class="back" href="{{ backlink }}">{% trans "Back" %}</a>
</div>
{% endblock %}

View File

@ -60,5 +60,7 @@
</form>
</div>
<p><a href="{{ backlink }}">{% trans "Back" %}</a></p>
<div class="right">
<a class="back" href="{{ backlink }}">{% trans "Back" %}</a>
</div>
{% endblock %}

View File

@ -30,5 +30,7 @@ There is no policy to remove.
</p>
{% endif %}
<p><a href="{{ backlink }}">{% trans "Back" %}</a></p>
<div class="right">
<a class="back" href="/">{% trans "Back" %}</a>
</div>
{% endblock %}

View File

@ -20,8 +20,8 @@
<p>
<ul>
<li><a href='/add_permission'>Add an IBAC or RBAC permission</a></li>
<li><a href='/add_abac_permission'>Add an ABAC permission</a></li>
<li class="bigbutton"><a class="bigbutton" href='/add_permission'>Add an IBAC or RBAC permission</a></li>
<li class="bigbutton"><a class="bigbutton" href='/add_abac_permission'>Add an ABAC permission</a></li>
</ul>
</p>
@ -38,5 +38,8 @@ An ABAC permission is not delegable. And this even if you can define ABAC permis
</p>
<p><a href="{{ backlink }}">{% trans "Back" %}</a></p>
<div class="right">
<a class="back" href="/">{% trans "Back" %}</a>
</div>
{% endblock %}