mirror of
https://github.com/haiwen/seahub.git
synced 2025-09-07 09:51:26 +00:00
Modify home page
This commit is contained in:
@@ -2,14 +2,10 @@
|
|||||||
{% load url from future %}
|
{% load url from future %}
|
||||||
|
|
||||||
{% block nav_group_class %}class="cur"{% endblock %}
|
{% block nav_group_class %}class="cur"{% endblock %}
|
||||||
{% block left_panel %}
|
|
||||||
<!-- 操作 -->
|
|
||||||
{% include "group/groups_left_panel.html" %}
|
|
||||||
{% endblock %}
|
|
||||||
|
|
||||||
{% block right_panel %}
|
{% block right_panel %}
|
||||||
<!-- 我的小组 -->
|
<!-- 协作小组 -->
|
||||||
<h3>我的小组</h3>
|
<h3>协作小组</h3>
|
||||||
{% include "group/groups_right_panel.html" %}
|
{% include "group/groups_right_panel.html" %}
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|
||||||
|
@@ -1,6 +1,7 @@
|
|||||||
{% load seahub_tags group_avatar_tags %}
|
{% load seahub_tags group_avatar_tags %}
|
||||||
{% load url from future %}
|
{% load url from future %}
|
||||||
|
|
||||||
|
<button id="group-add">添加小组</button>
|
||||||
{% if groups %}
|
{% if groups %}
|
||||||
<ul class="group-list w100 ovhd">
|
<ul class="group-list w100 ovhd">
|
||||||
{% for group in groups %}
|
{% for group in groups %}
|
||||||
@@ -18,8 +19,6 @@
|
|||||||
</li>
|
</li>
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
</ul>
|
</ul>
|
||||||
{% else %}
|
|
||||||
<p>暂无</p>
|
|
||||||
{% endif %}
|
{% endif %}
|
||||||
<form id="group-add-form" action="" method="post" name="group-add-form" class="hide">
|
<form id="group-add-form" action="" method="post" name="group-add-form" class="hide">
|
||||||
<label>小组名称:</label><br />
|
<label>小组名称:</label><br />
|
||||||
|
@@ -569,7 +569,8 @@ ul.with-bg li {
|
|||||||
color: #333;
|
color: #333;
|
||||||
}
|
}
|
||||||
#repo-create,
|
#repo-create,
|
||||||
#contact-add{
|
#contact-add,
|
||||||
|
#group-add{
|
||||||
padding-left:21px;
|
padding-left:21px;
|
||||||
height:27px;
|
height:27px;
|
||||||
background:#f5f5f5 url('../img/add.png') scroll no-repeat 3px 48%;
|
background:#f5f5f5 url('../img/add.png') scroll no-repeat 3px 48%;
|
||||||
|
@@ -3,15 +3,8 @@
|
|||||||
{% load url from future %}
|
{% load url from future %}
|
||||||
|
|
||||||
{% block nav_group_class %}class="cur"{% endblock %}
|
{% block nav_group_class %}class="cur"{% endblock %}
|
||||||
{% block left_panel %}
|
|
||||||
<h3>操作</h3>
|
|
||||||
<ul class="with-bg">
|
|
||||||
<li><a id="group-add" href="#">添加小组</a></li>
|
|
||||||
</ul>
|
|
||||||
{% endblock %}
|
|
||||||
|
|
||||||
{% block right_panel %}
|
{% block right_panel %}
|
||||||
|
|
||||||
<h3>{{ org.org_name }} 的小组</h3>
|
<h3>{{ org.org_name }} 的小组</h3>
|
||||||
{% include "group/groups_right_panel.html" %}
|
{% include "group/groups_right_panel.html" %}
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
@@ -40,7 +40,9 @@
|
|||||||
<p>{{ quota_usage|filesizeformat }} {% if cloud_mode %}/ 2 GB {% endif %}</p>
|
<p>{{ quota_usage|filesizeformat }} {% if cloud_mode %}/ 2 GB {% endif %}</p>
|
||||||
|
|
||||||
<!-- 我的小组 -->
|
<!-- 我的小组 -->
|
||||||
|
{% with groups=joined_groups %}
|
||||||
{% include "snippets/my_groups.html" %}
|
{% include "snippets/my_groups.html" %}
|
||||||
|
{% endwith %}
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|
||||||
{% block right_panel %}
|
{% block right_panel %}
|
||||||
|
4
views.py
4
views.py
@@ -773,6 +773,9 @@ def myhome(request):
|
|||||||
# Get all personal groups used in autocomplete.
|
# Get all personal groups used in autocomplete.
|
||||||
groups = get_personal_groups(-1, -1)
|
groups = get_personal_groups(-1, -1)
|
||||||
|
|
||||||
|
# Get all personal groups I joined.
|
||||||
|
joined_groups = get_personal_groups_by_user(request.user.username)
|
||||||
|
|
||||||
# get nickname
|
# get nickname
|
||||||
if not Profile.objects.filter(user=request.user.username):
|
if not Profile.objects.filter(user=request.user.username):
|
||||||
nickname = ''
|
nickname = ''
|
||||||
@@ -788,6 +791,7 @@ def myhome(request):
|
|||||||
"in_repos": in_repos,
|
"in_repos": in_repos,
|
||||||
"contacts": contacts,
|
"contacts": contacts,
|
||||||
"groups": groups,
|
"groups": groups,
|
||||||
|
"joined_groups": joined_groups,
|
||||||
"notes": notes,
|
"notes": notes,
|
||||||
"grpmsg_list": grpmsg_list,
|
"grpmsg_list": grpmsg_list,
|
||||||
"grpmsg_reply_list": grpmsg_reply_list,
|
"grpmsg_reply_list": grpmsg_reply_list,
|
||||||
|
Reference in New Issue
Block a user