From 152a3c24afb565e79d608f703f0cb60f12222c0a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mika=C3=ABl=20Ates?= Date: Thu, 8 Sep 2011 14:50:04 +0200 Subject: [PATCH] Bits of style for the UI --- acs/main_views.py | 16 +- acs/media/css/style.css | 162 ++++++++++++++++-- acs/templates/add_abac_permission.html | 5 +- acs/templates/add_admin_permission.html | 4 +- acs/templates/add_permission.html | 4 +- acs/templates/ask_decision.html | 4 +- acs/templates/ask_decision_regex.html | 4 +- ...deletion_abac_permission_confirmation.html | 4 +- acs/templates/deletion_confirmation.html | 4 +- .../deletion_permission_confirmation.html | 4 +- acs/templates/empower_or_downgrade.html | 4 +- acs/templates/graph.html | 8 +- acs/templates/index.html | 23 +-- acs/templates/list_abac_permissions.html | 4 +- .../list_accesses_for_delegation.html | 4 +- acs/templates/list_admin_views.html | 4 +- acs/templates/list_aliases.html | 4 +- acs/templates/list_aliases_and_add.html | 4 +- acs/templates/list_any.html | 4 +- acs/templates/list_permissions.html | 4 +- acs/templates/list_user.html | 4 +- acs/templates/list_users_for_aliases.html | 4 +- acs/templates/manage_root_administrators.html | 4 +- acs/templates/mod_activity.html | 4 +- acs/templates/mod_admin_view.html | 4 +- acs/templates/mod_any.html | 4 +- acs/templates/mod_any_new.html | 4 +- acs/templates/mod_policy.html | 25 ++- acs/templates/mod_role.html | 4 +- acs/templates/mod_user.html | 4 +- acs/templates/mod_view.html | 4 +- acs/templates/remove_policy.html | 4 +- acs/templates/select_permission_type.html | 9 +- 33 files changed, 282 insertions(+), 70 deletions(-) diff --git a/acs/main_views.py b/acs/main_views.py index 9391cca..62bc87c 100644 --- a/acs/main_views.py +++ b/acs/main_views.py @@ -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 diff --git a/acs/media/css/style.css b/acs/media/css/style.css index 60803eb..8190f2e 100644 --- a/acs/media/css/style.css +++ b/acs/media/css/style.css @@ -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 { diff --git a/acs/templates/add_abac_permission.html b/acs/templates/add_abac_permission.html index 95d58c1..670886a 100644 --- a/acs/templates/add_abac_permission.html +++ b/acs/templates/add_abac_permission.html @@ -528,5 +528,8 @@ -

{% trans "Back" %}

+
+{% trans "Back" %} +
+ {% endblock %} diff --git a/acs/templates/add_admin_permission.html b/acs/templates/add_admin_permission.html index 67578c2..c23c644 100644 --- a/acs/templates/add_admin_permission.html +++ b/acs/templates/add_admin_permission.html @@ -59,5 +59,7 @@

{% trans 'You have not enough rights or there is not enough material in the policy to set a to set a permission.' %}

{% endif %} -

{% trans "Back" %}

+
+{% trans "Back" %} +
{% endblock %} diff --git a/acs/templates/add_permission.html b/acs/templates/add_permission.html index d87c0ac..c8899ea 100644 --- a/acs/templates/add_permission.html +++ b/acs/templates/add_permission.html @@ -63,5 +63,7 @@

{% trans 'You have not enough rights or there is not enough material in the policy to set a to set a permission.' %}

{% endif %} -

{% trans "Back" %}

+
+{% trans "Back" %} +
{% endblock %} diff --git a/acs/templates/ask_decision.html b/acs/templates/ask_decision.html index 0a40bc2..93e54e7 100644 --- a/acs/templates/ask_decision.html +++ b/acs/templates/ask_decision.html @@ -67,5 +67,7 @@ You can only ask decisions on entities you have administration rights.

{% trans 'You have not enough rights or there is not enough material in the policy to ask for a decision.' %}

{% endif %} -Back +
+{% trans "Back" %} +
{% endblock %} diff --git a/acs/templates/ask_decision_regex.html b/acs/templates/ask_decision_regex.html index 377edf7..88914cc 100644 --- a/acs/templates/ask_decision_regex.html +++ b/acs/templates/ask_decision_regex.html @@ -63,5 +63,7 @@ You can only ask decisions on entities you have administration rights.

{% trans 'You have not enough rights or there is not enough material in the policy to ask for a decision.' %}

{% endif %} -Back +
+{% trans "Back" %} +
{% endblock %} diff --git a/acs/templates/deletion_abac_permission_confirmation.html b/acs/templates/deletion_abac_permission_confirmation.html index 9534cfd..24166af 100644 --- a/acs/templates/deletion_abac_permission_confirmation.html +++ b/acs/templates/deletion_abac_permission_confirmation.html @@ -24,6 +24,8 @@ {% else %}

Something bad happened.

-{% trans "Back" %} +
+{% trans "Back" %} +
{% endif %} {% endblock %} diff --git a/acs/templates/deletion_confirmation.html b/acs/templates/deletion_confirmation.html index c865900..e6bd3eb 100644 --- a/acs/templates/deletion_confirmation.html +++ b/acs/templates/deletion_confirmation.html @@ -42,6 +42,8 @@ {% else %}

Something bad happened.

-{% trans "Back" %} +
+{% trans "Back" %} +
{% endif %} {% endblock %} diff --git a/acs/templates/deletion_permission_confirmation.html b/acs/templates/deletion_permission_confirmation.html index ecc843a..b9bc84c 100644 --- a/acs/templates/deletion_permission_confirmation.html +++ b/acs/templates/deletion_permission_confirmation.html @@ -34,6 +34,8 @@ {% else %}

Something bad happened.

-{% trans "Back" %} +
+{% trans "Back" %} +
{% endif %} {% endblock %} diff --git a/acs/templates/empower_or_downgrade.html b/acs/templates/empower_or_downgrade.html index e4e08e5..263fbb1 100644 --- a/acs/templates/empower_or_downgrade.html +++ b/acs/templates/empower_or_downgrade.html @@ -69,5 +69,7 @@ There is no user you are authorized to administrate.

{% endif %} -

{% trans "Back" %}

+
+{% trans "Back" %} +
{% endblock %} diff --git a/acs/templates/graph.html b/acs/templates/graph.html index 9519995..bb51244 100644 --- a/acs/templates/graph.html +++ b/acs/templates/graph.html @@ -19,8 +19,12 @@ {% endif %} {% if backlink %} -{% trans "Back" %} +
+{% trans "Back" %} +
{% else %} -{% trans "Back" %} +
+{% trans "Back" %} +
{% endif %} {% endblock %} diff --git a/acs/templates/index.html b/acs/templates/index.html index fe86b6f..fc3e735 100644 --- a/acs/templates/index.html +++ b/acs/templates/index.html @@ -3,16 +3,19 @@ {% block content %} + + +
+ {% if username %} -

{% trans "You are logged as" %} {{ username }}. {% trans "Logout" %}

+{% trans "You are logged as" %} {{ username }}. {% else %} -

{% trans "Logged in." %} {% trans "Logout" %}

+{% trans "Logged in." %} {% endif %} - -{% if special_role %} -

{{ special_role }}

-{% endif %} - +{{ special_role }} +
{% if messages %} {% endif %} -

{% trans "Back" %}

+
+{% trans "Back" %} +
{% endblock %} diff --git a/acs/templates/list_accesses_for_delegation.html b/acs/templates/list_accesses_for_delegation.html index c5a16eb..d2d28cd 100644 --- a/acs/templates/list_accesses_for_delegation.html +++ b/acs/templates/list_accesses_for_delegation.html @@ -77,5 +77,7 @@ {% trans "No accesses you can delegate." %}

{% endif %} -

{% trans "Back" %}

+
+{% trans "Back" %} +
{% endblock %} diff --git a/acs/templates/list_admin_views.html b/acs/templates/list_admin_views.html index a423072..03c893e 100644 --- a/acs/templates/list_admin_views.html +++ b/acs/templates/list_admin_views.html @@ -41,5 +41,7 @@ {% endfor %} {% endif %} -

{% trans "Back" %}

+
+{% trans "Back" %} +
{% endblock %} diff --git a/acs/templates/list_aliases.html b/acs/templates/list_aliases.html index 9d67776..7618183 100644 --- a/acs/templates/list_aliases.html +++ b/acs/templates/list_aliases.html @@ -67,5 +67,7 @@ {% endif %} -

{% trans "Back" %}

+
+{% trans "Back" %} +
{% endblock %} diff --git a/acs/templates/list_aliases_and_add.html b/acs/templates/list_aliases_and_add.html index 067cc29..c4fbeb5 100644 --- a/acs/templates/list_aliases_and_add.html +++ b/acs/templates/list_aliases_and_add.html @@ -92,5 +92,7 @@ {% endif %} -

{% trans "Back" %}

+
+{% trans "Back" %} +
{% endblock %} diff --git a/acs/templates/list_any.html b/acs/templates/list_any.html index fc6aeb4..b475cf5 100644 --- a/acs/templates/list_any.html +++ b/acs/templates/list_any.html @@ -38,5 +38,7 @@ {% endfor %} {% endif %} -

{% trans "Back" %}

+
+{% trans "Back" %} +
{% endblock %} diff --git a/acs/templates/list_permissions.html b/acs/templates/list_permissions.html index 11a76b7..75a3a07 100644 --- a/acs/templates/list_permissions.html +++ b/acs/templates/list_permissions.html @@ -33,5 +33,7 @@ {% endfor %} {% endif %} -

{% trans "Back" %}

+
+{% trans "Back" %} +
{% endblock %} diff --git a/acs/templates/list_user.html b/acs/templates/list_user.html index c7170e4..fe2e33a 100644 --- a/acs/templates/list_user.html +++ b/acs/templates/list_user.html @@ -32,5 +32,7 @@ {% endfor %} {% endif %} -

{% trans "Back" %}

+
+{% trans "Back" %} +
{% endblock %} diff --git a/acs/templates/list_users_for_aliases.html b/acs/templates/list_users_for_aliases.html index 70f5d7e..d637b69 100644 --- a/acs/templates/list_users_for_aliases.html +++ b/acs/templates/list_users_for_aliases.html @@ -47,5 +47,7 @@ {% endfor %} {% endif %} -{% trans "Back" %} +
+{% trans "Back" %} +
{% endblock %} diff --git a/acs/templates/manage_root_administrators.html b/acs/templates/manage_root_administrators.html index ee7400a..d9a2463 100644 --- a/acs/templates/manage_root_administrators.html +++ b/acs/templates/manage_root_administrators.html @@ -52,5 +52,7 @@ There is no user you are authorized to administrate.

{% endif %} -

{% trans "Back" %}

+
+{% trans "Back" %} +
{% endblock %} diff --git a/acs/templates/mod_activity.html b/acs/templates/mod_activity.html index 2c73a91..17b8bfb 100644 --- a/acs/templates/mod_activity.html +++ b/acs/templates/mod_activity.html @@ -60,5 +60,7 @@ -

{% trans "Back" %}

+
+{% trans "Back" %} +
{% endblock %} diff --git a/acs/templates/mod_admin_view.html b/acs/templates/mod_admin_view.html index 84f0719..1ced7ff 100644 --- a/acs/templates/mod_admin_view.html +++ b/acs/templates/mod_admin_view.html @@ -104,6 +104,8 @@ -

{% trans "Back" %}

+
+{% trans "Back" %} +
{% endblock %} diff --git a/acs/templates/mod_any.html b/acs/templates/mod_any.html index 77ff57e..f58e96e 100644 --- a/acs/templates/mod_any.html +++ b/acs/templates/mod_any.html @@ -27,5 +27,7 @@ -

{% trans "Back" %}

+
+{% trans "Back" %} +
{% endblock %} diff --git a/acs/templates/mod_any_new.html b/acs/templates/mod_any_new.html index 3f74806..d8bf5ad 100644 --- a/acs/templates/mod_any_new.html +++ b/acs/templates/mod_any_new.html @@ -27,5 +27,7 @@ -

{% trans "Back" %}

+
+{% trans "Back" %} +
{% endblock %} diff --git a/acs/templates/mod_policy.html b/acs/templates/mod_policy.html index a60b3b7..0fd0a39 100644 --- a/acs/templates/mod_policy.html +++ b/acs/templates/mod_policy.html @@ -3,21 +3,32 @@ {% block content %} +
+ {% if username %} -

{% trans "You are logged as" %} {{ username }}. {% trans "Logout" %}

+{% trans "You are logged as" %} {{ username }}. {% else %} -

{% trans "Logged in." %} {% trans "Logout" %}

+{% trans "Logged in." %} {% endif %} +
+ + +
+{% trans "Back" %} +

{% trans "Administration of" %} {{policy.name}}

{% if special_roles %} -

{% trans "You have the following special roles" %}:

+
+
{% endif %} {% if messages %} @@ -50,7 +61,7 @@

{{ key }}

{% endif %} @@ -65,7 +76,7 @@

{{ key }}

{% endif %} @@ -75,7 +86,9 @@ -{% trans "Back" %} +
+{% trans "Back" %} +