mirror of
https://github.com/haiwen/seahub.git
synced 2025-08-30 21:50:59 +00:00
Merge branch 'lj_group'
This commit is contained in:
commit
be89036fcb
@ -1,6 +1,6 @@
|
||||
{% extends base_template %}
|
||||
|
||||
{% load seahub_tags avatar_tags %}
|
||||
{% load seahub_tags avatar_tags group_avatar_tags %}
|
||||
{% load url from future %}
|
||||
|
||||
{% block nav_group_class %}class="cur"{% endblock %}
|
||||
@ -10,33 +10,48 @@
|
||||
{% endblock %}
|
||||
|
||||
{% block left_panel %}
|
||||
<h3>管理员</h3>
|
||||
<ul>
|
||||
{% for member in managers %}
|
||||
<li class="member">{% avatar member.user_name 16 %}<a class="name" href="{{ SITE_ROOT }}profile/{{ member.user_name }}/">{{ member.user_name|email2nickname }}</a></li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
<div class="info-item">
|
||||
<h3 class="info-item-top">基本信息</h3>
|
||||
<div class="info-item-bottom group-basic-info ovhd">
|
||||
<img src="{% grp_avatar_url group.props.id 48 %}" alt="{{ group.props.group_name }}的图标" title="{{ group.props.group_name }}" class="avatar fleft" />
|
||||
<p class="txt fright">{{ group.creator_name }} 创建于<br />{{ group.timestamp|tsstr_sec }}</p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="info-item">
|
||||
<h3 class="info-item-top">管理员</h3>
|
||||
<ul class="info-item-bottom">
|
||||
{% for member in managers %}
|
||||
<li class="member">{% avatar member.user_name 16 %}<a class="name" href="{{ SITE_ROOT }}profile/{{ member.user_name }}/">{{ member.user_name|email2nickname }}</a></li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
<h3>成员</h3>
|
||||
{% if common_members %}
|
||||
<ul>
|
||||
{% for member in common_members %}
|
||||
<li class="member">{% avatar member.user_name 16 %}<a class="name" href="{{ SITE_ROOT }}profile/{{ member.user_name }}/">{{ member.user_name|email2nickname }}</a></li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
{% else %}
|
||||
<p>暂无</p>
|
||||
{% endif %}
|
||||
<div class="info-item">
|
||||
<h3 class="info-item-top">成员</h3>
|
||||
<div class="info-item-bottom">
|
||||
{% if common_members %}
|
||||
<ul>
|
||||
{% for member in common_members %}
|
||||
<li class="member">{% avatar member.user_name 16 %}<a class="name" href="{{ SITE_ROOT }}profile/{{ member.user_name }}/">{{ member.user_name|email2nickname }}</a></li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
{% else %}
|
||||
<p>暂无</p>
|
||||
{% endif %}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{% if is_join %}
|
||||
<h3>操作</h3>
|
||||
<ul class="with-bg">
|
||||
{% if is_staff %}
|
||||
<li><a id="group-mgr" href="{{ SITE_ROOT }}group/{{ group.id }}/members/">群组管理</a></li>
|
||||
{% else %}
|
||||
<li><a id="quit-group" href="#" data="{{ SITE_ROOT }}group/{{ group.id }}/?op=quit">退出群组</a></li>
|
||||
{% endif %}
|
||||
</ul>
|
||||
<div class="info-item">
|
||||
<h3 class="info-item-top">操作</h3>
|
||||
<ul class="with-bg info-item-bottom">
|
||||
{% if is_staff %}
|
||||
<li><a id="group-mgr" href="{{ SITE_ROOT }}group/{{ group.id }}/members/">群组管理</a></li>
|
||||
{% else %}
|
||||
<li><a id="quit-group" href="#" data="{{ SITE_ROOT }}group/{{ group.id }}/?op=quit">退出群组</a></li>
|
||||
{% endif %}
|
||||
</ul>
|
||||
</div>
|
||||
{% endif %}
|
||||
{% endblock %}
|
||||
|
||||
@ -88,13 +103,16 @@
|
||||
|
||||
<div id="group-reply">
|
||||
<h3>信息栏</h3>
|
||||
<form id="group-message-form" action="" method="post">
|
||||
<textarea name="message" id="message">{{ form.data.message }}</textarea><br />
|
||||
{% for error in form.message.errors %}
|
||||
<p class="error">{{ error|escape }}</p>
|
||||
{% endfor %}
|
||||
<input type="submit" value="提交" class="submit" />
|
||||
</form>
|
||||
<div class="w100 ovhd">
|
||||
<img src="{{MEDIA_URL}}avatars/default.jpg" alt="默认头像" class="avatar fleft" width="48" height="48" />
|
||||
<form id="group-message-form" action="" method="post" class="fright">
|
||||
<textarea name="message" id="message">{{ form.data.message }}</textarea><br />
|
||||
{% for error in form.message.errors %}
|
||||
<p class="error">{{ error|escape }}</p>
|
||||
{% endfor %}
|
||||
<input type="submit" value="提交" class="submit" />
|
||||
</form>
|
||||
</div>
|
||||
|
||||
{% if group_msgs %}
|
||||
<ul class="msg-list">
|
||||
|
@ -13,15 +13,9 @@
|
||||
|
||||
{% block extra_script %}
|
||||
<script type="text/javascript">
|
||||
$("#group-add").click(function() {
|
||||
$("#group-add-form").modal({appendTo: "#main"});
|
||||
return false;
|
||||
});
|
||||
|
||||
{% url 'group_list' as group_add_url %}
|
||||
{% with post_url=group_add_url %}
|
||||
{% include "snippets/group_add_js.html" %}
|
||||
{% endwith %}
|
||||
|
||||
</script>
|
||||
{% endblock %}
|
||||
|
@ -197,6 +197,9 @@ ul.with-bg li {
|
||||
border-style: dashed dashed dashed solid;
|
||||
border-left-color: #bbb;
|
||||
}
|
||||
.avatar {
|
||||
border-radius:3px;
|
||||
}
|
||||
.info-item {
|
||||
border: 1px solid #eee;
|
||||
border-radius: 2px;
|
||||
@ -206,6 +209,9 @@ ul.with-bg li {
|
||||
.info-item p {
|
||||
margin:0;
|
||||
}
|
||||
.info-item h3 {
|
||||
font-size:1.15em;
|
||||
}
|
||||
.info-item-top {
|
||||
padding: 4px 10px;
|
||||
background: #f8f8f8;
|
||||
@ -1032,6 +1038,10 @@ ul.with-bg li {
|
||||
-webkit-box-shadow: 0 2px 4px rgba(0,0,0,0.2);
|
||||
-moz-box-shadow: 0 2px 4px rgba(0,0,0,0.2);
|
||||
}
|
||||
.group-basic-info .txt {
|
||||
width:145px;
|
||||
word-wrap:break-word;
|
||||
}
|
||||
|
||||
/* notification admin */
|
||||
.cur-note { color: red; font-size: 75%; }
|
||||
@ -1061,6 +1071,7 @@ ul.with-bg li {
|
||||
|
||||
/* group message and replies */
|
||||
#group-reply {
|
||||
width:602px;
|
||||
margin-top:50px;
|
||||
}
|
||||
.msg-num {
|
||||
@ -1075,11 +1086,14 @@ ul.with-bg li {
|
||||
height: 80px;
|
||||
margin-top: 4px;
|
||||
}
|
||||
#message {
|
||||
width:538px;
|
||||
margin-top:0;
|
||||
}
|
||||
#group-reply .submit {
|
||||
margin-top:3px;
|
||||
}
|
||||
.msg-list {
|
||||
width:602px;
|
||||
margin-top: 10px;
|
||||
}
|
||||
.msg {
|
||||
|
@ -14,15 +14,9 @@
|
||||
|
||||
{% block extra_script %}
|
||||
<script type="text/javascript">
|
||||
$("#group-add").click(function() {
|
||||
$("#group-add-form").modal({appendTo: "#main"});
|
||||
return false;
|
||||
});
|
||||
|
||||
{% url 'org_groups' org.url_prefix as group_add_url %}
|
||||
{% with post_url=group_add_url %}
|
||||
{% include "snippets/group_add_js.html" %}
|
||||
{% endwith %}
|
||||
|
||||
</script>
|
||||
{% endblock %}
|
||||
|
@ -1,3 +1,7 @@
|
||||
$("#group-add").click(function() {
|
||||
$("#group-add-form").modal({appendTo: "#main"});
|
||||
});
|
||||
|
||||
$('#group-add-submit').click(function() {
|
||||
$.ajax({
|
||||
url: '{{ post_url }}',
|
||||
|
Loading…
Reference in New Issue
Block a user