mirror of
https://github.com/haiwen/seahub.git
synced 2025-09-14 14:21:23 +00:00
Modify myhome and personal page
This commit is contained in:
@@ -9,21 +9,8 @@
|
||||
{% endblock %}
|
||||
|
||||
{% block left_panel %}
|
||||
<h3>我的小组</h3>
|
||||
{% if groups %}
|
||||
<ul>
|
||||
{% for group in groups %}
|
||||
<li class="mygroup">
|
||||
<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" />
|
||||
</a><br />
|
||||
<a href="{{ SITE_ROOT }}group/{{ group.props.id }}/">{{ group.props.group_name }}</a>
|
||||
</li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
{% else %}
|
||||
<p>暂无</p>
|
||||
{% endif %}
|
||||
<!-- 我的小组 -->
|
||||
{% include "snippets/my_groups.html" %}
|
||||
{% endblock %}
|
||||
|
||||
{% block right_panel %}
|
||||
@@ -37,36 +24,10 @@
|
||||
{% endautoescape %}
|
||||
{% endif %}
|
||||
|
||||
<h3>我拥有的同步目录</h3>
|
||||
<button id="repo-create">新建同步目录</button>
|
||||
{% if owned_repos %}
|
||||
<table>
|
||||
<tr>
|
||||
<th width="25%">名字</th>
|
||||
<th width="43%">描述</th>
|
||||
<th width="20%">更新时间</th>
|
||||
<th width="12%">操作</th>
|
||||
</tr>
|
||||
{% for repo in owned_repos %}
|
||||
<tr>
|
||||
<td><a href="{{ SITE_ROOT }}repo/{{ repo.props.id }}/">{{ repo.props.name }}</a></td>
|
||||
<td>{{ repo.props.desc }}</td>
|
||||
{% if repo.latest_modify %}
|
||||
<td>{{ repo.latest_modify|translate_commit_time }}</td>
|
||||
{% else %}
|
||||
<td>--</td>
|
||||
{% endif %}
|
||||
<td>
|
||||
<img src="{{ MEDIA_URL }}img/sync-20.png" data="{{ repo.props.id }}" class="download-btn vh" title="同步到本地" alt="同步" />
|
||||
<img src="{{ MEDIA_URL }}img/share-20.png" data="{{ repo.props.id }}" class="repo-share-btn vh" title="共享" alt="共享" />
|
||||
<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="删除" />
|
||||
</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</table>
|
||||
{% endif %}
|
||||
<!-- 我拥有的同步目录 -->
|
||||
{% include "snippets/my_owned_repos.html" %}
|
||||
|
||||
<h3>共享给我的同步目录</h3>
|
||||
<!-- 共享给我的同步目录 -->
|
||||
{% include "snippets/shared_in_repos.html" %}
|
||||
|
||||
{% url 'org_repo_share' org.url_prefix as repo_share_url %}
|
||||
|
@@ -39,21 +39,8 @@
|
||||
<h3>已用空间</h3>
|
||||
<p>{{ quota_usage|filesizeformat }} {% if cloud_mode %}/ 2 GB {% endif %}</p>
|
||||
|
||||
<h3>我的小组</h3>
|
||||
{% if groups %}
|
||||
<ul>
|
||||
{% for group in groups %}
|
||||
<li class="mygroup">
|
||||
<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" />
|
||||
</a><br />
|
||||
<a href="{{ SITE_ROOT }}group/{{ group.props.id }}/">{{ group.props.group_name }}</a>
|
||||
</li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
{% else %}
|
||||
<p>暂无</p>
|
||||
{% endif %}
|
||||
<!-- 我的小组 -->
|
||||
{% include "snippets/my_groups.html" %}
|
||||
{% endblock %}
|
||||
|
||||
{% block right_panel %}
|
||||
@@ -67,36 +54,10 @@
|
||||
{% endautoescape %}
|
||||
{% endif %}
|
||||
|
||||
<h3>我拥有的同步目录</h3>
|
||||
<button id="repo-create">新建同步目录</button>
|
||||
{% if owned_repos %}
|
||||
<table>
|
||||
<tr>
|
||||
<th width="25%">名字</th>
|
||||
<th width="43%">描述</th>
|
||||
<th width="20%">更新时间</th>
|
||||
<th width="12%">操作</th>
|
||||
</tr>
|
||||
{% for repo in owned_repos %}
|
||||
<tr>
|
||||
<td><a href="{{ SITE_ROOT }}repo/{{ repo.props.id }}/">{{ repo.props.name }}</a></td>
|
||||
<td>{{ repo.props.desc }}</td>
|
||||
{% if repo.latest_modify %}
|
||||
<td>{{ repo.latest_modify|translate_commit_time }}</td>
|
||||
{% else %}
|
||||
<td>--</tdb>
|
||||
{% endif %}
|
||||
<td>
|
||||
<img src="{{ MEDIA_URL }}img/sync-20.png" data="{{ repo.props.id }}" class="download-btn vh" title="同步到本地" alt="同步" />
|
||||
<img src="{{ MEDIA_URL }}img/share-20.png" data="{{ repo.props.id }}" class="repo-share-btn vh" title="共享" alt="共享" />
|
||||
<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="删除" />
|
||||
</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</table>
|
||||
{% endif %}
|
||||
<!-- 我拥有的同步目录 -->
|
||||
{% include "snippets/my_owned_repos.html" %}
|
||||
|
||||
<h3>共享给我的同步目录</h3>
|
||||
<!-- 共享给我的同步目录 -->
|
||||
{% include "snippets/shared_in_repos.html" %}
|
||||
|
||||
{% url 'share_repo' as repo_share_url %}
|
||||
|
16
templates/snippets/my_groups.html
Normal file
16
templates/snippets/my_groups.html
Normal file
@@ -0,0 +1,16 @@
|
||||
{% load group_avatar_tags %}
|
||||
<h3>我的小组</h3>
|
||||
{% if groups %}
|
||||
<ul>
|
||||
{% for group in groups %}
|
||||
<li class="mygroup">
|
||||
<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" />
|
||||
</a><br />
|
||||
<a href="{{ SITE_ROOT }}group/{{ group.props.id }}/">{{ group.props.group_name }}</a>
|
||||
</li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
{% else %}
|
||||
<p>暂无</p>
|
||||
{% endif %}
|
29
templates/snippets/my_owned_repos.html
Normal file
29
templates/snippets/my_owned_repos.html
Normal file
@@ -0,0 +1,29 @@
|
||||
{% load seahub_tags %}
|
||||
<h3>我拥有的同步目录</h3>
|
||||
<button id="repo-create">新建同步目录</button>
|
||||
{% if owned_repos %}
|
||||
<table>
|
||||
<tr>
|
||||
<th width="25%">名字</th>
|
||||
<th width="43%">描述</th>
|
||||
<th width="20%">更新时间</th>
|
||||
<th width="12%">操作</th>
|
||||
</tr>
|
||||
{% for repo in owned_repos %}
|
||||
<tr>
|
||||
<td><a href="{{ SITE_ROOT }}repo/{{ repo.props.id }}/">{{ repo.props.name }}</a></td>
|
||||
<td>{{ repo.props.desc }}</td>
|
||||
{% if repo.latest_modify %}
|
||||
<td>{{ repo.latest_modify|translate_commit_time }}</td>
|
||||
{% else %}
|
||||
<td>--</td>
|
||||
{% endif %}
|
||||
<td>
|
||||
<img src="{{ MEDIA_URL }}img/sync-20.png" data="{{ repo.props.id }}" class="download-btn vh" title="同步到本地" alt="同步" />
|
||||
<img src="{{ MEDIA_URL }}img/share-20.png" data="{{ repo.props.id }}" class="repo-share-btn vh" title="共享" alt="共享" />
|
||||
<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="删除" />
|
||||
</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</table>
|
||||
{% endif %}
|
@@ -1,4 +1,5 @@
|
||||
{% load seahub_tags %}
|
||||
<h3>共享给我的同步目录</h3>
|
||||
{% if in_repos %}
|
||||
<table>
|
||||
<tr>
|
||||
|
Reference in New Issue
Block a user