2011-04-30 13:18:32 +08:00
|
|
|
{% extends "myhome_base.html" %}
|
2012-07-14 13:31:34 +08:00
|
|
|
{% load seahub_tags avatar_tags group_avatar_tags %}
|
2012-08-30 20:15:17 +08:00
|
|
|
{% load url from future %}
|
2011-05-08 15:19:58 +08:00
|
|
|
|
2012-05-12 15:52:07 +08:00
|
|
|
{% block nav_myhome_class %}class="cur"{% endblock %}
|
2012-05-24 20:19:14 +08:00
|
|
|
|
2012-09-28 21:51:04 +08:00
|
|
|
{% block left_panel %}
|
2012-10-09 14:59:42 +08:00
|
|
|
<div class="info-item">
|
|
|
|
<h3 class="info-item-top">我的基本信息</h3>
|
|
|
|
<div class="info-item-bottom home-profile ovhd">
|
2012-07-23 17:36:07 +08:00
|
|
|
<a href="{{ SITE_ROOT }}profile/" class="no-deco">{% avatar myname 48 %}</a>
|
2012-06-21 15:26:03 +08:00
|
|
|
{% if nickname %}
|
|
|
|
<p class="fleft">{{ nickname }}</p>
|
|
|
|
{% else %}
|
|
|
|
<p class="fleft">暂无昵称 <a href="{{ SITE_ROOT }}profile/"><img src="{{ MEDIA_URL }}img/edit_12.png" alt="编辑" title="编辑" /></a></p>
|
|
|
|
{% endif %}
|
2012-06-20 14:18:23 +08:00
|
|
|
</div>
|
2012-10-09 14:59:42 +08:00
|
|
|
</div>
|
2012-06-20 14:18:23 +08:00
|
|
|
|
2012-09-27 16:05:07 +08:00
|
|
|
{% if grpmsg_list or grpmsg_reply_list or orgmsg_list %}
|
2012-10-09 14:59:42 +08:00
|
|
|
<div class="info-item">
|
|
|
|
<h3 class="info-item-top">提醒...</h3>
|
|
|
|
<ul class="info-item-bottom">
|
2012-08-01 17:35:33 +08:00
|
|
|
{% if grpmsg_list %}
|
|
|
|
<li>
|
2012-09-24 10:10:01 +08:00
|
|
|
群组
|
2012-08-01 17:35:33 +08:00
|
|
|
{% for grp in grpmsg_list %}
|
2012-08-30 20:15:17 +08:00
|
|
|
<a href="{% url 'group_info' grp.id %}" class="no-bold">{{ grp.group_name }}</a>
|
2012-08-01 17:35:33 +08:00
|
|
|
{% endfor %}
|
|
|
|
有新留言
|
|
|
|
</li>
|
|
|
|
{% endif %}
|
2012-06-28 19:24:27 +08:00
|
|
|
{% if grpmsg_reply_list %}
|
2012-09-24 10:10:01 +08:00
|
|
|
<li><a href="{{ SITE_ROOT }}group/reply/new/" class="no-bold">{{ grpmsg_reply_list|length }}条群组留言有新回复</a></li>
|
2012-06-27 19:56:11 +08:00
|
|
|
{% endif %}
|
2012-07-27 17:54:07 +08:00
|
|
|
{% if orgmsg_list %}
|
2012-08-30 20:15:17 +08:00
|
|
|
<li><a href="{% url 'org_msg' %}" class="no-bold">{{ orgmsg_list|length }}条团体消息</a></li>
|
2012-08-01 17:35:33 +08:00
|
|
|
{% endif %}
|
2012-08-01 23:16:53 +08:00
|
|
|
</ul>
|
2012-10-09 14:59:42 +08:00
|
|
|
</div>
|
2012-09-27 16:05:07 +08:00
|
|
|
{% endif %}
|
2012-06-27 19:56:11 +08:00
|
|
|
|
2012-10-09 14:59:42 +08:00
|
|
|
<div class="info-item">
|
|
|
|
<h3 class="info-item-top">已用空间</h3>
|
|
|
|
<p class="info-item-bottom">{{ quota_usage|filesizeformat }} {% if cloud_mode %}/ 2 GB {% endif %}</p>
|
|
|
|
</div>
|
2012-06-20 14:18:23 +08:00
|
|
|
|
2012-09-24 10:10:01 +08:00
|
|
|
<!-- 我的群组 -->
|
2012-09-22 19:17:22 +08:00
|
|
|
{% with groups=joined_groups %}
|
2012-09-05 11:03:15 +08:00
|
|
|
{% include "snippets/my_groups.html" %}
|
2012-09-22 19:17:22 +08:00
|
|
|
{% endwith %}
|
2011-11-01 22:21:01 +08:00
|
|
|
{% endblock %}
|
|
|
|
|
2011-05-08 15:19:58 +08:00
|
|
|
{% block right_panel %}
|
2012-10-09 17:47:31 +08:00
|
|
|
<!-- 我拥有的资料库 --><!-- 共享给我的资料库 -->
|
2012-09-05 11:03:15 +08:00
|
|
|
{% include "snippets/my_owned_repos.html" %}
|
2011-10-13 00:17:48 +08:00
|
|
|
|
2012-09-28 21:51:04 +08:00
|
|
|
{% if events %}
|
|
|
|
<h3>最近事件</h3>
|
2012-09-29 17:17:00 +08:00
|
|
|
<ul id="events" class="hide">
|
2012-09-28 21:51:04 +08:00
|
|
|
{% for ev in events %}
|
2012-09-29 17:17:00 +08:00
|
|
|
<li class="event-item w100 ovhd">
|
2012-09-28 21:51:04 +08:00
|
|
|
{% if ev.etype == 'repo-update' %}
|
|
|
|
{% with author=ev.commit.creator_name commit=ev.commit repo=ev.repo %}
|
2012-09-29 17:17:00 +08:00
|
|
|
<div class="pic fleft" data="{{ author }}">
|
|
|
|
<a href="{% url 'user_profile' author %}" title="{{ author|email2nickname}}">{% avatar author 40 %}</a>
|
|
|
|
</div>
|
|
|
|
<div class="txt fright">
|
|
|
|
<div class="event-hd">
|
|
|
|
<span class="time">{{ commit.ctime|translate_commit_time }}</span>
|
|
|
|
<a href="{% url 'user_profile' author %}" title="{{ author|email2nickname}}">{{ author|email2nickname }}</a>
|
|
|
|
</div>
|
2012-10-09 21:47:54 +08:00
|
|
|
<p>更新了资料库 <a href="{{SITE_ROOT}}repo/{{repo.id}}">{{ repo.name }}</a> <a class="lsch" href="{{ SITE_ROOT }}repo/history/changes/{{ repo.id }}/?commit_id={{ commit.id }}" data="{{ commit.props.ctime|tsstr_sec }}">详情</a></P>
|
2012-09-29 17:17:00 +08:00
|
|
|
</div>
|
2012-09-28 21:51:04 +08:00
|
|
|
{% endwith %}
|
|
|
|
{% endif %}
|
|
|
|
|
|
|
|
{% if ev.etype == 'repo-create' %}
|
|
|
|
{% with author=ev.creator repo_id=ev.repo_id repo_name=ev.repo_name %}
|
2012-09-29 17:17:00 +08:00
|
|
|
<div class="pic fleft" data="{{ author }}">
|
|
|
|
<a href="{% url 'user_profile' author %}" title="{{ author|email2nickname}}">{% avatar author 40 %}</a>
|
|
|
|
</div>
|
|
|
|
<div class="txt fright">
|
|
|
|
<div class="event-hd">
|
|
|
|
<span class="time">{{ ev.timestamp|translate_commit_time }}</span>
|
|
|
|
<a href="{% url 'user_profile' author %}" title="{{ author|email2nickname}}">{{ author|email2nickname }}</a>
|
|
|
|
</div>
|
2012-10-09 21:47:54 +08:00
|
|
|
<p>创建了资料库 <a href="{{SITE_ROOT}}repo/{{repo_id}}">{{ repo_name }}</a></p>
|
2012-09-29 17:17:00 +08:00
|
|
|
</div>
|
2012-09-28 21:51:04 +08:00
|
|
|
{% endwith %}
|
|
|
|
{% endif %}
|
|
|
|
|
|
|
|
{% if ev.etype == 'repo-delete' %}
|
|
|
|
{% with author=ev.repo_owner repo_name=ev.repo_name %}
|
2012-09-29 17:17:00 +08:00
|
|
|
<div class="pic fleft" data="{{ author }}">
|
|
|
|
<a href="{% url 'user_profile' author %}" title="{{ author|email2nickname}}">{% avatar author 40 %}</a>
|
|
|
|
</div>
|
|
|
|
<div class="txt fright">
|
|
|
|
<div class="event-hd">
|
|
|
|
<span class="time">{{ ev.timestamp|translate_commit_time }}</span>
|
|
|
|
<a href="{% url 'user_profile' author %}" title="{{ author|email2nickname}}">{{ author|email2nickname }}</a>
|
|
|
|
</div>
|
2012-10-09 21:47:54 +08:00
|
|
|
<p>删除了资料库 {{ repo_name }}</p>
|
2012-09-29 17:17:00 +08:00
|
|
|
</div>
|
2012-09-28 21:51:04 +08:00
|
|
|
{% endwith %}
|
|
|
|
{% endif %}
|
|
|
|
</li>
|
|
|
|
{% endfor %}
|
|
|
|
</ul>
|
|
|
|
<div id="ls-ch" class="hide"></div><!--list modification details of a commit-->
|
|
|
|
{% endif %}
|
|
|
|
|
2012-09-01 17:46:46 +08:00
|
|
|
{% url 'share_repo' as repo_share_url %}
|
2012-09-27 11:08:05 +08:00
|
|
|
{% with post_url=repo_share_url tips='' %}
|
2012-07-28 16:41:24 +08:00
|
|
|
{% include "snippets/repo_share_form.html" %}
|
2012-09-01 17:46:46 +08:00
|
|
|
{% endwith %}
|
|
|
|
|
2012-07-28 16:41:24 +08:00
|
|
|
{% include "snippets/repo_create_form.html" %}
|
2012-03-26 16:52:10 +08:00
|
|
|
{% endblock %}
|
|
|
|
|
|
|
|
{% block extra_script %}
|
|
|
|
<script type="text/javascript">
|
2012-07-28 16:41:24 +08:00
|
|
|
{% include "snippets/myhome_extra_script.html" %}
|
2012-09-01 17:46:46 +08:00
|
|
|
|
|
|
|
{% url 'seahub.views.repo_create' as repo_create_url %}
|
|
|
|
{% with post_url=repo_create_url %}
|
2012-08-18 18:00:21 +08:00
|
|
|
{% include "snippets/repo_create_js.html" %}
|
2012-09-01 17:46:46 +08:00
|
|
|
{% endwith %}
|
2012-09-28 21:51:04 +08:00
|
|
|
|
|
|
|
{% if events %}
|
|
|
|
{% include 'snippets/list_commit_detail.html' %}
|
2012-09-29 17:17:00 +08:00
|
|
|
$('.event-item').each(function(index) {
|
|
|
|
if (index > 0 && $(this).children('.pic').attr('data') == $(this).prev().children('.pic').attr('data')) {
|
|
|
|
$(this).children('.pic').addClass('hide');
|
|
|
|
}
|
|
|
|
});
|
|
|
|
$('#events').removeClass('hide');
|
2012-09-28 21:51:04 +08:00
|
|
|
{% endif %}
|
2012-03-26 16:52:10 +08:00
|
|
|
</script>
|
2011-05-08 15:19:58 +08:00
|
|
|
{% endblock %}
|