mirror of
https://github.com/haiwen/seahub.git
synced 2025-09-04 16:31:13 +00:00
Modify home page
This commit is contained in:
@@ -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 %}
|
||||
<!-- 我的小组 -->
|
||||
<h3>我的小组</h3>
|
||||
<!-- 协作小组 -->
|
||||
<h3>协作小组</h3>
|
||||
{% include "group/groups_right_panel.html" %}
|
||||
{% endblock %}
|
||||
|
||||
|
@@ -1,6 +1,7 @@
|
||||
{% load seahub_tags group_avatar_tags %}
|
||||
{% load url from future %}
|
||||
|
||||
<button id="group-add">添加小组</button>
|
||||
{% if groups %}
|
||||
<ul class="group-list w100 ovhd">
|
||||
{% for group in groups %}
|
||||
@@ -18,8 +19,6 @@
|
||||
</li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
{% else %}
|
||||
<p>暂无</p>
|
||||
{% endif %}
|
||||
<form id="group-add-form" action="" method="post" name="group-add-form" class="hide">
|
||||
<label>小组名称:</label><br />
|
||||
|
@@ -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%;
|
||||
|
@@ -3,15 +3,8 @@
|
||||
{% load url from future %}
|
||||
|
||||
{% 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 %}
|
||||
|
||||
<h3>{{ org.org_name }} 的小组</h3>
|
||||
{% include "group/groups_right_panel.html" %}
|
||||
{% endblock %}
|
||||
|
@@ -40,7 +40,9 @@
|
||||
<p>{{ quota_usage|filesizeformat }} {% if cloud_mode %}/ 2 GB {% endif %}</p>
|
||||
|
||||
<!-- 我的小组 -->
|
||||
{% with groups=joined_groups %}
|
||||
{% include "snippets/my_groups.html" %}
|
||||
{% endwith %}
|
||||
{% endblock %}
|
||||
|
||||
{% block right_panel %}
|
||||
|
4
views.py
4
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,
|
||||
|
Reference in New Issue
Block a user