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 %}
|
2011-05-08 15:19:58 +08:00
|
|
|
|
2012-05-12 15:52:07 +08:00
|
|
|
{% block nav_myhome_class %}class="cur"{% endblock %}
|
2011-11-01 22:21:01 +08:00
|
|
|
{% block left_panel %}
|
2012-05-24 20:19:14 +08:00
|
|
|
|
2012-06-20 14:18:23 +08:00
|
|
|
<h3>我的基本信息</h3>
|
|
|
|
<div class="home-profile w100 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-08-01 17:35:33 +08:00
|
|
|
{% if notes %}
|
|
|
|
<h3>提醒...</h3>
|
|
|
|
<ul>
|
|
|
|
{% if grpmsg_list %}
|
|
|
|
<li>
|
|
|
|
小组
|
|
|
|
{% for grp in grpmsg_list %}
|
2012-08-01 22:45:58 +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-08-01 17:35:33 +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-01 17:35:33 +08:00
|
|
|
<li><a href="{% url org_msg %}" class="no-bold">{{ orgmsg_list|length }}条团体消息</a></li>
|
|
|
|
{% endif %}
|
2012-07-27 17:54:07 +08:00
|
|
|
{% endif %}
|
2012-06-27 19:56:11 +08:00
|
|
|
|
2012-06-20 14:18:23 +08:00
|
|
|
<h3>已用空间</h3>
|
2012-08-01 22:34:35 +08:00
|
|
|
<p>{{ quota_usage|filesizeformat }} {% if cloud_mode %}/ 2 GB {% endif %}</p>
|
2012-06-20 14:18:23 +08:00
|
|
|
|
2012-05-15 14:29:37 +08:00
|
|
|
<h3>我管理的小组</h3>
|
2012-05-16 21:33:35 +08:00
|
|
|
{% if groups_manage %}
|
2012-05-21 15:08:34 +08:00
|
|
|
<ul>
|
2012-05-16 21:33:35 +08:00
|
|
|
{% for group in groups_manage %}
|
|
|
|
<li class="mygroup">
|
2012-07-23 17:36:07 +08:00
|
|
|
<a href="{{ SITE_ROOT }}group/{{ group.props.id }}/" class="no-deco">
|
|
|
|
<img src="{% grp_avatar_url group.props.id 48 %}" alt="{{ group.props.group_name }}的图标" title="{{ group.props.group_name }}" class="avatar" />
|
2012-07-11 15:13:59 +08:00
|
|
|
</a><br />
|
2012-05-16 21:33:35 +08:00
|
|
|
<a href="{{ SITE_ROOT }}group/{{ group.props.id }}/">{{ group.props.group_name }}</a>
|
|
|
|
</li>
|
|
|
|
{% endfor %}
|
|
|
|
</ul>
|
|
|
|
{% else %}
|
|
|
|
<p>暂无</p>
|
2012-05-15 11:23:28 +08:00
|
|
|
{% endif %}
|
2012-05-16 21:33:35 +08:00
|
|
|
|
2012-05-15 11:23:28 +08:00
|
|
|
<h3>我参加的小组</h3>
|
2012-05-16 21:33:35 +08:00
|
|
|
{% if groups_join %}
|
2012-05-21 15:08:34 +08:00
|
|
|
<ul>
|
2012-05-16 21:33:35 +08:00
|
|
|
{% for group in groups_join %}
|
|
|
|
<li class="mygroup">
|
2012-07-24 17:44:44 +08:00
|
|
|
<a href="{{ SITE_ROOT }}group/{{ group.props.id }}/" class="no-deco">
|
|
|
|
<img src="{% grp_avatar_url group.props.id 48 %}" alt="{{ group.props.group_name }}的图标" title="{{ group.props.group_name }}" class="avatar" />
|
2012-07-11 15:13:59 +08:00
|
|
|
</a><br />
|
2012-05-16 21:33:35 +08:00
|
|
|
<a href="{{ SITE_ROOT }}group/{{ group.props.id }}/">{{ group.props.group_name }}</a>
|
|
|
|
</li>
|
|
|
|
{% endfor %}
|
|
|
|
</ul>
|
|
|
|
{% else %}
|
|
|
|
<p>暂无</p>
|
2012-05-15 11:23:28 +08:00
|
|
|
{% endif %}
|
|
|
|
|
2011-11-01 22:21:01 +08:00
|
|
|
{% endblock %}
|
|
|
|
|
|
|
|
|
2011-05-08 15:19:58 +08:00
|
|
|
{% block right_panel %}
|
2012-06-12 10:13:14 +08:00
|
|
|
{% if messages %}
|
|
|
|
<ul class="messages">
|
|
|
|
{% for message in messages %}
|
|
|
|
{% if message.tags == 'info' %}
|
|
|
|
<li class="notification">共享给 {{ message }} 成功,请前往<a href="{{ SITE_ROOT }}shareadmin/">共享管理</a>查看。</li>
|
|
|
|
{% endif %}
|
|
|
|
{% if message.tags == 'error' %}
|
|
|
|
<li class="error">共享给 {{ message }} 失败</li>
|
|
|
|
{% endif %}
|
|
|
|
{% endfor %}
|
|
|
|
|
|
|
|
</ul>
|
|
|
|
{% endif %}
|
|
|
|
|
2012-04-27 13:43:17 +08:00
|
|
|
{% if output_msg %}
|
2012-05-09 13:13:15 +08:00
|
|
|
{% for key, value in output_msg.items %}
|
|
|
|
{% if key == 'info_msg' %}
|
|
|
|
<p class="notification">{{ value }} 请前往<a href="{{ SITE_ROOT }}shareadmin/">共享管理</a>查看。</p>
|
|
|
|
{% endif %}
|
|
|
|
{% if key == 'err_msg' %}
|
|
|
|
<p class="error">{{ value }}</p>
|
|
|
|
{% endif %}
|
|
|
|
{% endfor %}
|
2012-04-27 13:43:17 +08:00
|
|
|
{% endif %}
|
2011-10-13 00:17:48 +08:00
|
|
|
|
2012-07-20 10:53:00 +08:00
|
|
|
<h3>我拥有的同步目录</h3>
|
|
|
|
<button id="repo-create">新建同步目录</button>
|
2012-05-16 21:33:35 +08:00
|
|
|
<table>
|
2011-10-13 00:17:48 +08:00
|
|
|
<tr>
|
2012-06-30 11:59:51 +08:00
|
|
|
<th width="25%">名字</th>
|
|
|
|
<th width="43%">描述</th>
|
2012-06-29 10:16:10 +08:00
|
|
|
<th width="20%">更新时间</th>
|
2012-05-28 22:05:14 +08:00
|
|
|
<th width="12%">操作</th>
|
2011-10-13 00:17:48 +08:00
|
|
|
</tr>
|
2012-07-20 10:53:00 +08:00
|
|
|
{% if owned_repos %}
|
2011-10-13 00:17:48 +08:00
|
|
|
{% for repo in owned_repos %}
|
|
|
|
<tr>
|
2012-04-25 11:18:49 +08:00
|
|
|
<td><a href="{{ SITE_ROOT }}repo/{{ repo.props.id }}/">{{ repo.props.name }}</a></td>
|
2011-10-13 00:17:48 +08:00
|
|
|
<td>{{ repo.props.desc }}</td>
|
2012-06-28 16:58:09 +08:00
|
|
|
{% if repo.latest_modify %}
|
|
|
|
<td>{{ repo.latest_modify|translate_commit_time }}</td>
|
|
|
|
{% else %}
|
|
|
|
<td>—— ——</td>
|
|
|
|
{% endif %}
|
2012-03-29 15:36:15 +08:00
|
|
|
<td>
|
2012-07-20 14:22:39 +08:00
|
|
|
<img src="{{ MEDIA_URL }}img/sync-20.png" data="{{ repo.props.id }}" class="download-btn vh" title="同步到本地" alt="同步" />
|
2012-05-29 11:25:49 +08:00
|
|
|
<img src="{{ MEDIA_URL }}img/share-20.png" data="{{ repo.props.id }}" class="repo-share-btn vh" title="共享" alt="共享" />
|
2012-06-05 19:38:28 +08:00
|
|
|
<img src="{{ MEDIA_URL }}img/delete-20.png" data="{{ SITE_ROOT }}repo/remove/{{ repo.props.id }}/?next={{ request.path }}" class="repo-delete-btn vh" title="删除" alt="删除" />
|
2012-03-29 15:36:15 +08:00
|
|
|
</td>
|
2011-10-13 00:17:48 +08:00
|
|
|
</tr>
|
|
|
|
{% endfor %}
|
2012-03-22 20:33:27 +08:00
|
|
|
{% endif %}
|
2012-07-20 10:53:00 +08:00
|
|
|
</table>
|
2011-10-13 00:17:48 +08:00
|
|
|
|
2012-04-26 22:15:07 +08:00
|
|
|
<h3>共享给我的同步目录</h3>
|
|
|
|
{% if in_repos %}
|
2012-05-16 21:33:35 +08:00
|
|
|
<table>
|
2012-03-11 21:35:44 +08:00
|
|
|
<tr>
|
2012-05-16 21:33:35 +08:00
|
|
|
<th width="25%">名字</th>
|
2012-04-26 22:15:07 +08:00
|
|
|
<th width="20%">共享来源</th>
|
2012-06-28 16:58:09 +08:00
|
|
|
<th width="25%">描述</th>
|
2012-06-29 10:16:10 +08:00
|
|
|
<th width="20%">更新时间</th>
|
2012-05-31 19:21:07 +08:00
|
|
|
<th width="10%">操作</th>
|
2012-03-11 21:35:44 +08:00
|
|
|
</tr>
|
|
|
|
|
2012-04-26 22:15:07 +08:00
|
|
|
{% for repo in in_repos %}
|
2012-03-11 21:35:44 +08:00
|
|
|
<tr>
|
2012-04-26 22:15:07 +08:00
|
|
|
<td><a href="{{ SITE_ROOT }}repo/{{ repo.props.id }}">{{ repo.props.name }}</a></td>
|
|
|
|
<td>{{ repo.props.shared_email }}</td>
|
2012-03-11 21:35:44 +08:00
|
|
|
<td>{{ repo.props.desc }}</td>
|
2012-06-28 16:58:09 +08:00
|
|
|
{% if repo.latest_modify %}
|
|
|
|
<td>{{ repo.latest_modify|translate_commit_time }}</td>
|
|
|
|
{% else %}
|
|
|
|
<td>—— ——</td>
|
|
|
|
{% endif %}
|
2012-03-29 15:36:15 +08:00
|
|
|
<td>
|
2012-07-20 14:22:39 +08:00
|
|
|
<img src="{{ MEDIA_URL }}img/sync-20.png" data="{{ repo.props.id }}" class="download-btn vh" title="同步到本地" alt="同步" />
|
2012-05-29 11:25:49 +08:00
|
|
|
<img src="{{ MEDIA_URL }}img/delete-20.png" data="{{ SITE_ROOT }}shareadmin/removeshare/?repo_id={{ repo.id }}&from={{ repo.shared_email }}&to={{ request.user }}" class="unshare-btn vh" title="取消共享" alt="取消共享" />
|
2012-03-29 15:36:15 +08:00
|
|
|
</td>
|
2012-03-11 21:35:44 +08:00
|
|
|
</tr>
|
|
|
|
{% endfor %}
|
|
|
|
</table>
|
2012-03-22 20:33:27 +08:00
|
|
|
{% else %}
|
|
|
|
<p>暂无</p>
|
|
|
|
{% endif %}
|
2012-04-24 14:21:52 +08:00
|
|
|
|
2012-07-28 16:41:24 +08:00
|
|
|
{% include "snippets/repo_share_form.html" %}
|
|
|
|
{% include "snippets/repo_create_form.html" %}
|
2012-07-16 16:36:46 +08:00
|
|
|
|
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-03-26 16:52:10 +08:00
|
|
|
</script>
|
2011-05-08 15:19:58 +08:00
|
|
|
{% endblock %}
|