mirror of
https://github.com/haiwen/seahub.git
synced 2025-09-19 10:26:17 +00:00
Merge branch 'myhome'
Conflicts: templates/snippets/shared_in_repos.html
This commit is contained in:
@@ -197,6 +197,24 @@ ul.with-bg li {
|
||||
border-style: dashed dashed dashed solid;
|
||||
border-left-color: #bbb;
|
||||
}
|
||||
.info-item {
|
||||
border: 1px solid #eee;
|
||||
border-radius: 2px;
|
||||
margin-bottom: 12px;
|
||||
}
|
||||
.info-item h3,
|
||||
.info-item p {
|
||||
margin:0;
|
||||
}
|
||||
.info-item-top {
|
||||
padding: 4px 10px;
|
||||
border-bottom: 1px solid #eee;
|
||||
border-top-left-radius: 1px;
|
||||
border-top-right-radius: 1px;
|
||||
}
|
||||
.info-item-bottom {
|
||||
padding: 8px 10px;
|
||||
}
|
||||
|
||||
/* container */
|
||||
#header, #main, #footer { width:950px; }
|
||||
@@ -218,9 +236,8 @@ ul.with-bg li {
|
||||
}
|
||||
#left-panel {
|
||||
float:right;
|
||||
width:220px;
|
||||
border-left:1px solid #E8E8E8;
|
||||
padding-left:20px;
|
||||
width:230px;
|
||||
padding-left:10px;
|
||||
}
|
||||
#right-panel {
|
||||
float:left;
|
||||
@@ -567,20 +584,21 @@ ul.with-bg li {
|
||||
/*myhome*/
|
||||
.home-profile .avatar {
|
||||
float:left;
|
||||
margin:0 15px 0 11px;
|
||||
margin:0 15px 0 9px;
|
||||
}
|
||||
.mygroup {
|
||||
display:inline-block;
|
||||
width:70px;
|
||||
float:left;
|
||||
width:69px;
|
||||
text-align:center;
|
||||
word-wrap:break-word;
|
||||
vertical-align:top;
|
||||
margin:0 0px 5px 0;
|
||||
}
|
||||
.mygroup .tip {
|
||||
font-size: 0.9em;
|
||||
color: #333;
|
||||
.mygroup a {
|
||||
display:inline-block;
|
||||
width:100%;
|
||||
}
|
||||
|
||||
#repo-create,
|
||||
#contact-add,
|
||||
#group-add,
|
||||
@@ -614,6 +632,36 @@ ul.with-bg li {
|
||||
width:262px;
|
||||
margin-bottom:10px;
|
||||
}
|
||||
#repos-tabs {
|
||||
font-size:1em;
|
||||
padding:0;
|
||||
border:0;
|
||||
min-height:150px;
|
||||
margin-bottom:75px;
|
||||
}
|
||||
#repos-tabs .ui-tabs-nav {
|
||||
padding:0;
|
||||
}
|
||||
#repos-tabs .ui-tabs-nav li {
|
||||
border:0;
|
||||
background:none;
|
||||
}
|
||||
#repos-tabs .ui-tabs-nav li a {
|
||||
color:#8A948F;
|
||||
font-weight:normal;
|
||||
padding:.3em 0;
|
||||
margin-right:0.6em;
|
||||
}
|
||||
#repos-tabs .ui-tabs-nav .ui-state-active a {
|
||||
color:#DD4B39;
|
||||
border-bottom:2px solid #DD4B39;
|
||||
}
|
||||
#repos-tabs .ui-tabs-nav li a:hover {
|
||||
color:#DD4B39;
|
||||
}
|
||||
#repos-tabs .ui-tabs-panel {
|
||||
padding:0;
|
||||
}
|
||||
.event-item {
|
||||
margin:10px 0 15px;
|
||||
}
|
||||
|
@@ -14,12 +14,9 @@
|
||||
{% endblock %}
|
||||
|
||||
{% block right_panel %}
|
||||
<!-- 我拥有的资料库 -->
|
||||
<!-- 我拥有的资料库 --><!-- 共享给我的资料库 -->
|
||||
{% include "snippets/my_owned_repos.html" %}
|
||||
|
||||
<!-- 共享给我的资料库 -->
|
||||
{% include "snippets/shared_in_repos.html" %}
|
||||
|
||||
{% url 'org_repo_share' org.url_prefix as repo_share_url %}
|
||||
{% with post_url=repo_share_url tips='必须是团体内部成员或群组。' %}
|
||||
{% include "snippets/repo_share_form.html" %}
|
||||
|
@@ -5,8 +5,9 @@
|
||||
{% block nav_myhome_class %}class="cur"{% endblock %}
|
||||
|
||||
{% block left_panel %}
|
||||
<h3>我的基本信息</h3>
|
||||
<div class="home-profile w100 ovhd">
|
||||
<div class="info-item">
|
||||
<h3 class="info-item-top">我的基本信息</h3>
|
||||
<div class="info-item-bottom home-profile ovhd">
|
||||
<a href="{{ SITE_ROOT }}profile/" class="no-deco">{% avatar myname 48 %}</a>
|
||||
{% if nickname %}
|
||||
<p class="fleft">{{ nickname }}</p>
|
||||
@@ -14,10 +15,12 @@
|
||||
<p class="fleft">暂无昵称 <a href="{{ SITE_ROOT }}profile/"><img src="{{ MEDIA_URL }}img/edit_12.png" alt="编辑" title="编辑" /></a></p>
|
||||
{% endif %}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{% if grpmsg_list or grpmsg_reply_list or orgmsg_list %}
|
||||
<h3>提醒...</h3>
|
||||
<ul>
|
||||
<div class="info-item">
|
||||
<h3 class="info-item-top">提醒...</h3>
|
||||
<ul class="info-item-bottom">
|
||||
{% if grpmsg_list %}
|
||||
<li>
|
||||
群组
|
||||
@@ -34,10 +37,13 @@
|
||||
<li><a href="{% url 'org_msg' %}" class="no-bold">{{ orgmsg_list|length }}条团体消息</a></li>
|
||||
{% endif %}
|
||||
</ul>
|
||||
</div>
|
||||
{% endif %}
|
||||
|
||||
<h3>已用空间</h3>
|
||||
<p>{{ quota_usage|filesizeformat }} {% if cloud_mode %}/ 2 GB {% endif %}</p>
|
||||
<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>
|
||||
|
||||
<!-- 我的群组 -->
|
||||
{% with groups=joined_groups %}
|
||||
@@ -46,12 +52,9 @@
|
||||
{% endblock %}
|
||||
|
||||
{% block right_panel %}
|
||||
<!-- 我拥有的资料库 -->
|
||||
<!-- 我拥有的资料库 --><!-- 共享给我的资料库 -->
|
||||
{% include "snippets/my_owned_repos.html" %}
|
||||
|
||||
<!-- 共享给我的资料库 -->
|
||||
{% include "snippets/shared_in_repos.html" %}
|
||||
|
||||
{% if events %}
|
||||
<h3>最近事件</h3>
|
||||
<ul id="events" class="hide">
|
||||
|
@@ -1,16 +1,18 @@
|
||||
{% load group_avatar_tags %}
|
||||
<h3>我的群组</h3>
|
||||
<div class="info-item">
|
||||
<h3 class="info-item-top">我的群组</h3>
|
||||
{% if groups %}
|
||||
<ul>
|
||||
<ul class="info-item-bottom ovhd">
|
||||
{% 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>
|
||||
<a href="{{ SITE_ROOT }}group/{{ group.props.id }}/">{{ group.props.group_name }}</a>
|
||||
</li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
{% else %}
|
||||
<p>暂无</p>
|
||||
<p class="info-item-bottom">暂无</p>
|
||||
{% endif %}
|
||||
</div>
|
||||
|
@@ -1,6 +1,14 @@
|
||||
{% load seahub_tags %}
|
||||
<h3>我拥有的资料库</h3>
|
||||
<button id="repo-create">新建资料库</button>
|
||||
<h3>资料库</h3>
|
||||
<div id="repos-tabs">
|
||||
<div class="ovhd">
|
||||
<ul class="fleft">
|
||||
<li><a href="#my-own-repos" onfocus="this.blur()">我拥有的</a></li>
|
||||
<li><a href="#repos-shared-to-me" onfocus="this.blur()">共享给我的</a></li>
|
||||
</ul>
|
||||
<button id="repo-create" class="fright">新建资料库</button>
|
||||
</div>
|
||||
<div id="my-own-repos">
|
||||
{% if owned_repos %}
|
||||
<table>
|
||||
<tr>
|
||||
@@ -31,3 +39,47 @@
|
||||
{% else %}
|
||||
<p class="empty-repo-tips">您可以新建一个资料库来组织您的文件资料,比如为每个项目创建一个资料库,每个资料库可以单独地同步和共享。</p>
|
||||
{% endif %}
|
||||
</div>
|
||||
<div id="repos-shared-to-me">
|
||||
{% if in_repos %}
|
||||
<table>
|
||||
<tr>
|
||||
<th width="4%"><!--icon--></th>
|
||||
<th width="20%">名字</th>
|
||||
<th width="36%">描述</th>
|
||||
<th width="15%">更新时间</th>
|
||||
<th width="15%">共享来源</th>
|
||||
<th width="10%">操作</th>
|
||||
</tr>
|
||||
|
||||
{% for repo in in_repos %}
|
||||
<tr>
|
||||
<td>
|
||||
{% if repo.user_perm == 'rw' %}
|
||||
<img src="{{MEDIA_URL}}img/sync-folder-20.png" title="可读写" alt="目录icon" />
|
||||
{% else %}
|
||||
<img src="{{MEDIA_URL}}img/folder-no-write-20.png" title="只读" alt="目录icon" />
|
||||
{% endif %}
|
||||
</td>
|
||||
<td><a href="{{ SITE_ROOT }}repo/{{ repo.props.repo_id }}">{{ repo.props.repo_name }}</a></td>
|
||||
<td>{{ repo.props.repo_desc }}</td>
|
||||
{% if repo.props.last_modified %}
|
||||
<td>{{ repo.props.last_modified|translate_commit_time }}</td>
|
||||
{% else %}
|
||||
<td>--</td>
|
||||
{% endif %}
|
||||
<td>{{ repo.props.user|email2nickname }}</td>
|
||||
<td>
|
||||
{% if repo.user_perm == 'rw' %}
|
||||
<img src="{{ MEDIA_URL }}img/download-20.png" data="{{ repo.props.repo_id }}" class="download-btn op-icon vh" title="下载到本地" alt="下载" />
|
||||
{% endif %}
|
||||
<img src="{{ MEDIA_URL }}img/delete-20.png" data="{{ SITE_ROOT }}shareadmin/removeshare/?repo_id={{ repo.props.repo_id }}&from={{ repo.props.user }}&to={{ request.user }}" class="unshare-btn op-icon vh" title="取消共享" alt="取消共享" />
|
||||
</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</table>
|
||||
{% else %}
|
||||
<p class="empty-repo-tips">您的朋友可以将他的资料库共享给您,这些资料库会显示在这里。</p>
|
||||
{% endif %}
|
||||
</div>
|
||||
</div>
|
||||
|
@@ -1,4 +1,5 @@
|
||||
{% load seahub_tags avatar_tags %}
|
||||
$('#repos-tabs').tabs();
|
||||
$(function() {
|
||||
//repo-share-form share-list autocomplete
|
||||
var share_list = [], contact_email, group_name, group_name_py;
|
||||
|
@@ -1,42 +0,0 @@
|
||||
{% load seahub_tags %}
|
||||
<h3>共享给我的资料库</h3>
|
||||
{% if in_repos %}
|
||||
<table>
|
||||
<tr>
|
||||
<th width="4%"><!--icon--></th>
|
||||
<th width="20%">名字</th>
|
||||
<th width="36%">描述</th>
|
||||
<th width="15%">更新时间</th>
|
||||
<th width="15%">共享来源</th>
|
||||
<th width="10%">操作</th>
|
||||
</tr>
|
||||
|
||||
{% for repo in in_repos %}
|
||||
<tr>
|
||||
<td>
|
||||
{% if repo.user_perm == 'rw' %}
|
||||
<img src="{{MEDIA_URL}}img/sync-folder-20.png" title="可读写" alt="目录icon" />
|
||||
{% else %}
|
||||
<img src="{{MEDIA_URL}}img/folder-no-write-20.png" title="只读" alt="目录icon" />
|
||||
{% endif %}
|
||||
</td>
|
||||
<td><a href="{{ SITE_ROOT }}repo/{{ repo.props.repo_id }}">{{ repo.props.repo_name }}</a></td>
|
||||
<td>{{ repo.props.repo_desc }}</td>
|
||||
{% if repo.props.last_modified %}
|
||||
<td>{{ repo.props.last_modified|translate_commit_time }}</td>
|
||||
{% else %}
|
||||
<td>--</td>
|
||||
{% endif %}
|
||||
<td>{{ repo.props.user|email2nickname }}</td>
|
||||
<td>
|
||||
{% if repo.user_perm == 'rw' %}
|
||||
<img src="{{ MEDIA_URL }}img/download-20.png" data="{{ repo.props.repo_id }}" class="download-btn op-icon vh" title="下载到本地" alt="下载" />
|
||||
{% endif %}
|
||||
<img src="{{ MEDIA_URL }}img/delete-20.png" data="{{ SITE_ROOT }}shareadmin/removeshare/?repo_id={{ repo.props.repo_id }}&from={{ repo.props.user }}&to={{ request.user }}" class="unshare-btn op-icon vh" title="取消共享" alt="取消共享" />
|
||||
</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</table>
|
||||
{% else %}
|
||||
<p class="empty-repo-tips">您的朋友可以将他的资料库共享给您,这些资料库会显示在这里。</p>
|
||||
{% endif %}
|
Reference in New Issue
Block a user