diff --git a/group/templates/group/groups.html b/group/templates/group/groups.html index facc8ccdf4..d9aaf3bb73 100644 --- a/group/templates/group/groups.html +++ b/group/templates/group/groups.html @@ -2,14 +2,10 @@ {% load url from future %} {% block nav_group_class %}class="cur"{% endblock %} -{% block left_panel %} - -{% include "group/groups_left_panel.html" %} -{% endblock %} {% block right_panel %} - -

我的小组

+ +

协作小组

{% include "group/groups_right_panel.html" %} {% endblock %} diff --git a/group/templates/group/groups_right_panel.html b/group/templates/group/groups_right_panel.html index 2f5a3ecc01..da62119045 100644 --- a/group/templates/group/groups_right_panel.html +++ b/group/templates/group/groups_right_panel.html @@ -1,6 +1,7 @@ {% load seahub_tags group_avatar_tags %} {% load url from future %} + {% if groups %} -{% else %} -

暂无

{% endif %}

diff --git a/media/css/seahub.css b/media/css/seahub.css index 4639d26172..c118d9e5d8 100644 --- a/media/css/seahub.css +++ b/media/css/seahub.css @@ -569,7 +569,8 @@ ul.with-bg li { color: #333; } #repo-create, -#contact-add{ +#contact-add, +#group-add{ padding-left:21px; height:27px; background:#f5f5f5 url('../img/add.png') scroll no-repeat 3px 48%; diff --git a/organizations/templates/organizations/org_groups.html b/organizations/templates/organizations/org_groups.html index 4600573c99..d128dea797 100644 --- a/organizations/templates/organizations/org_groups.html +++ b/organizations/templates/organizations/org_groups.html @@ -3,15 +3,8 @@ {% load url from future %} {% block nav_group_class %}class="cur"{% endblock %} -{% block left_panel %} -

操作

- -{% endblock %} {% block right_panel %} -

{{ org.org_name }} 的小组

{% include "group/groups_right_panel.html" %} {% endblock %} diff --git a/templates/myhome.html b/templates/myhome.html index 9b75b53a25..917ccb7e60 100644 --- a/templates/myhome.html +++ b/templates/myhome.html @@ -40,7 +40,9 @@

{{ quota_usage|filesizeformat }} {% if cloud_mode %}/ 2 GB {% endif %}

+{% with groups=joined_groups %} {% include "snippets/my_groups.html" %} +{% endwith %} {% endblock %} {% block right_panel %} diff --git a/views.py b/views.py index a685f665d5..02ce89b598 100644 --- a/views.py +++ b/views.py @@ -773,6 +773,9 @@ def myhome(request): # Get all personal groups used in autocomplete. groups = get_personal_groups(-1, -1) + # Get all personal groups I joined. + joined_groups = get_personal_groups_by_user(request.user.username) + # get nickname if not Profile.objects.filter(user=request.user.username): nickname = '' @@ -788,6 +791,7 @@ def myhome(request): "in_repos": in_repos, "contacts": contacts, "groups": groups, + "joined_groups": joined_groups, "notes": notes, "grpmsg_list": grpmsg_list, "grpmsg_reply_list": grpmsg_reply_list,