From db6cf91b4f0e1e5625685198c42df4992d150527 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michel=20Ka=CC=88ser?= Date: Tue, 11 Aug 2015 19:18:42 +0200 Subject: [PATCH] fix typos; no tables if no record exists; group fixes; button fixes; user-guide link; fix dashboard containers --- ipynbsrv/settings.py | 1 + .../web/collaborationgroups/index.html | 99 +++++++++---------- .../web/collaborationgroups/manage.html | 22 +++-- .../web/collaborationgroups/modal_create.html | 2 +- ipynbsrv/web/templates/web/dashboard.html | 3 - .../templates/web/notifications/index.html | 6 +- .../web/notifications/modal_create.html | 15 +-- ipynbsrv/web/templates/web/shares/manage.html | 28 ++++-- .../web/snippets/container_grid.html | 17 ++-- .../web/templates/web/snippets/navbar.html | 4 +- ipynbsrv/web/views/common.py | 2 +- ipynbsrv/web/views/containers.py | 2 +- 12 files changed, 106 insertions(+), 95 deletions(-) diff --git a/ipynbsrv/settings.py b/ipynbsrv/settings.py index 7fa6c35..7b144e8 100644 --- a/ipynbsrv/settings.py +++ b/ipynbsrv/settings.py @@ -122,6 +122,7 @@ LOGIN_URL = '/accounts/login' LOGIN_REDIRECT_URL = '/accounts/flag' PUBLIC_URL = '/public/' +USER_GUIDE_URL = '/docs/user-guide/' VARS_MODULE_PATH = 'ipynbsrv.core.conf' diff --git a/ipynbsrv/web/templates/web/collaborationgroups/index.html b/ipynbsrv/web/templates/web/collaborationgroups/index.html index 9de0ebc..0abb3d3 100644 --- a/ipynbsrv/web/templates/web/collaborationgroups/index.html +++ b/ipynbsrv/web/templates/web/collaborationgroups/index.html @@ -13,12 +13,12 @@
{% include 'web/snippets/messages.html' with messages=messages only %} -

My Groups

+

Groups

- {% if groups %} + {% if groups and not groups|length_is:"1" %} @@ -29,56 +29,55 @@

My Groups

- {% for group in groups %} - {% if not group.is_single_user_group %} - - - - - + + + + - - {% endif %} - {% endfor %} - + {% if request.user.backend_user.id == group.creator.id or request.user.id in group.admins %} + + {% csrf_token %} + + + + {% endif %} + + + {% endif %} + {% endfor %} +
{{group.name}}{{ group.member_count }}{% if request.user.backend_user.id in group.admins %}Admin{% endif %} - {% if request.user.backend_user.id == group.creator.id %}Creator - {% else %} {% if request.user.backend_user.id in group.member_ids %}Member{% endif %}{% endif %} - - {% if request.user.backend_user.id != group.creator.id and group.creator %} - {% if request.user.backend_user.id in group.member_ids %} -
- {% csrf_token %} - - - -
- {% else %} -
- {% csrf_token %} - - - -
- {% endif %} - {% endif %} + {% for group in groups %} + {% if not group.is_single_user_group %} +
{{group.name}}{{ group.member_count }}{% if request.user.backend_user.id in group.admins %}Admin{% endif %} + {% if request.user.backend_user.id == group.creator.id %}Creator + {% else %} {% if request.user.backend_user.id in group.member_ids %}Member{% endif %}{% endif %} + + {% if request.user.backend_user.id != group.creator.id and group.creator %} + {% if request.user.backend_user.id in group.member_ids %} +
+ {% csrf_token %} + + + +
+ {% else %} +
+ {% csrf_token %} + + + +
+ {% endif %} + {% endif %} - {% if request.user.backend_user.id == group.creator.id or request.user.id in group.admins %} -
- {% csrf_token %} - - -
- {% endif %} -
- {% else %} -
You have no groups yet.
+
You have no groups.
{% endif %} {% include 'web/collaborationgroups/modal_addusers.html' with csrf_token=csrf_token only %} @@ -111,7 +110,7 @@

My Groups

table.find('.label').click(function (e) { var label = $(e.target); search_input.val(label.text()); - search_input.submit(); + search_input.submit(); }); $('[data-toggle="modal"]').click(function (e) { diff --git a/ipynbsrv/web/templates/web/collaborationgroups/manage.html b/ipynbsrv/web/templates/web/collaborationgroups/manage.html index 4d92d31..3f29733 100644 --- a/ipynbsrv/web/templates/web/collaborationgroups/manage.html +++ b/ipynbsrv/web/templates/web/collaborationgroups/manage.html @@ -42,6 +42,12 @@

Group

{% endif %} + + + + + + @@ -54,13 +60,13 @@

Group

PropertyValue
Name:{{ group.name }}

Members

-
- {% if request.user.backend_user.id in group.admins or request.user.backend_user.id == group.creator.id %} - - -
- {% endif %} - +
+ {% if request.user.backend_user.id in group.admins or request.user.backend_user.id == group.creator.id %} +
+ +
+ {% endif %} +
@@ -87,7 +93,7 @@

Members

{% endif %} {% if request.user.backend_user.id in group.admins or request.user.backend_user.id == group.creator.id %} - {% if member.id != group.creator.id %} + {% if member.id != group.creator.id %} {% csrf_token %} diff --git a/ipynbsrv/web/templates/web/collaborationgroups/modal_create.html b/ipynbsrv/web/templates/web/collaborationgroups/modal_create.html index 42e9929..8c622d9 100644 --- a/ipynbsrv/web/templates/web/collaborationgroups/modal_create.html +++ b/ipynbsrv/web/templates/web/collaborationgroups/modal_create.html @@ -21,7 +21,7 @@ - + diff --git a/ipynbsrv/web/templates/web/notifications/index.html b/ipynbsrv/web/templates/web/notifications/index.html index 344d6c4..7b9eaef 100644 --- a/ipynbsrv/web/templates/web/notifications/index.html +++ b/ipynbsrv/web/templates/web/notifications/index.html @@ -31,7 +31,7 @@

Notifications

- {% for n in notifications %} + {% for n in notifications %} @@ -48,11 +48,11 @@

Notifications

- {% endfor %} + {% endfor %}
{{ n.date | date:"d.m.Y, H:i" }} {{ n.notification.sender.username }}
{% else %} -
You have no notifications yet.
+
You have no notifications.
{% endif %} {% include 'web/notifications/modal_create.html' with groups=groups notification_types=notification_types containers=containers container_images=container_images shares=shares csrf_token=csrf_token only %} diff --git a/ipynbsrv/web/templates/web/notifications/modal_create.html b/ipynbsrv/web/templates/web/notifications/modal_create.html index 9d353bb..fe8c67d 100644 --- a/ipynbsrv/web/templates/web/notifications/modal_create.html +++ b/ipynbsrv/web/templates/web/notifications/modal_create.html @@ -11,18 +11,18 @@ {% csrf_token %}