mirror of
https://github.com/haiwen/seahub.git
synced 2025-09-01 07:01:12 +00:00
improved repo, ownerhome, useradmin pages
This commit is contained in:
@@ -2,7 +2,6 @@ body,div,h1,h2,h3,h4,h5,h6,p,ul,li,blockquote,form,input,button,img { margin:0;
|
|||||||
ul > li { list-style:none; }
|
ul > li { list-style:none; }
|
||||||
.error { color:red; }
|
.error { color:red; }
|
||||||
.float_left { float:left; }
|
.float_left { float:left; }
|
||||||
.hidden { display:none }
|
|
||||||
.clear { clear:both; }
|
.clear { clear:both; }
|
||||||
.fleft { float:left }
|
.fleft { float:left }
|
||||||
.fright { float:right }
|
.fright { float:right }
|
||||||
@@ -18,7 +17,7 @@ ul > li { list-style:none; }
|
|||||||
a { color:#ee8833; text-decoration:none; font-weight:bold; }
|
a { color:#ee8833; text-decoration:none; font-weight:bold; }
|
||||||
a:hover { color: #ff9933; text-decoration: underline; }
|
a:hover { color: #ff9933; text-decoration: underline; }
|
||||||
/* table */
|
/* table */
|
||||||
table { border-spacing: 0; border-collapse: collapse; }
|
table { border-spacing: 0; border-collapse: collapse; margin:3px 0 5px; }
|
||||||
td, th { padding: 3px; border: 1px solid #aaa; }
|
td, th { padding: 3px; border: 1px solid #aaa; }
|
||||||
th { color:#808; }
|
th { color:#808; }
|
||||||
tr.even { background-color: #FAFAFA; }
|
tr.even { background-color: #FAFAFA; }
|
||||||
@@ -178,5 +177,5 @@ span.small-action-link { font-size: 9px; }
|
|||||||
input.ccnet_id { width: 400px; }
|
input.ccnet_id { width: 400px; }
|
||||||
.notification { background:#FDF; width:580px; margin:10px 0; border:1px solid #faf; padding:10px; }
|
.notification { background:#FDF; width:580px; margin:10px 0; border:1px solid #faf; padding:10px; }
|
||||||
.repo-list {
|
.repo-list {
|
||||||
margin-bottom: 10px;
|
margin-bottom: 12px;
|
||||||
}
|
}
|
||||||
|
@@ -15,7 +15,7 @@
|
|||||||
<h3>{{ owner }}的同步目录</h3>
|
<h3>{{ owner }}的同步目录</h3>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% if owned_repos %}
|
{% if owned_repos %}
|
||||||
<table class="repo-list default">
|
<table class="repo-list">
|
||||||
<tr>
|
<tr>
|
||||||
<th>名字</th>
|
<th>名字</th>
|
||||||
<th>ID</th>
|
<th>ID</th>
|
||||||
@@ -28,7 +28,7 @@
|
|||||||
<td><a href="{{ SITE_ROOT }}repo/{{ repo.props.id }}">{{ repo.props.name }}</a></td>
|
<td><a href="{{ SITE_ROOT }}repo/{{ repo.props.id }}">{{ repo.props.name }}</a></td>
|
||||||
<td>{{ repo.props.id }}</td>
|
<td>{{ repo.props.id }}</td>
|
||||||
<td>{{ repo.props.desc }}</td>
|
<td>{{ repo.props.desc }}</td>
|
||||||
<td><a href="{{ SITE_ROOT }}repo/remove/{{ repo.props.id }}/">删除</a></td>
|
<td><button data="{{ SITE_ROOT }}repo/remove/{{ repo.props.id }}/" class="repo-delete-btn">删除</button></td>
|
||||||
</tr>
|
</tr>
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
</table>
|
</table>
|
||||||
@@ -42,7 +42,7 @@
|
|||||||
<h3>{{ owner }}用过的同步目录</h3>
|
<h3>{{ owner }}用过的同步目录</h3>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% if fetched_repos %}
|
{% if fetched_repos %}
|
||||||
<table class="repo-list default">
|
<table class="repo-list">
|
||||||
<tr>
|
<tr>
|
||||||
<th>名字</th>
|
<th>名字</th>
|
||||||
<th>ID</th>
|
<th>ID</th>
|
||||||
@@ -55,11 +55,32 @@
|
|||||||
<td><a href="{{ SITE_ROOT }}repo/{{ repo.props.id }}">{{ repo.props.name }}</a></td>
|
<td><a href="{{ SITE_ROOT }}repo/{{ repo.props.id }}">{{ repo.props.name }}</a></td>
|
||||||
<td>{{ repo.props.id }}</td>
|
<td>{{ repo.props.id }}</td>
|
||||||
<td>{{ repo.props.desc }}</td>
|
<td>{{ repo.props.desc }}</td>
|
||||||
<td><a href="{{ SITE_ROOT }}repo/remove/{{ repo.props.id }}/">删除</a></td>
|
<td><button data="{{ SITE_ROOT }}repo/remove/{{ repo.props.id }}/" class="repo-delete-btn">删除</button></td>
|
||||||
</tr>
|
</tr>
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
</table>
|
</table>
|
||||||
{% else %}
|
{% else %}
|
||||||
<p>暂无</p>
|
<p>暂无</p>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
|
<div id="delete-confirm" class="center hide">
|
||||||
|
<p>确定要删除吗?</p>
|
||||||
|
<button id="yes-btn">删除</button>
|
||||||
|
<button class="simplemodal-close">取消</button>
|
||||||
|
</div>
|
||||||
|
{% endblock %}
|
||||||
|
|
||||||
|
{% block extra_script %}
|
||||||
|
<script type="text/javascript">
|
||||||
|
var Del_url = '';
|
||||||
|
$('.repo-delete-btn').each(function() {
|
||||||
|
$(this).click(function() {
|
||||||
|
$('#delete-confirm').modal({appendTo:'#main'});
|
||||||
|
Del_url = $(this).attr('data');
|
||||||
|
});
|
||||||
|
});
|
||||||
|
$('#yes-btn').click(function() {
|
||||||
|
location.href = Del_url;
|
||||||
|
});
|
||||||
|
</script>
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
@@ -5,36 +5,37 @@
|
|||||||
|
|
||||||
<h2>{{repo.props.name}}</h2>
|
<h2>{{repo.props.name}}</h2>
|
||||||
|
|
||||||
<form id="modify-token-form" action="{{ SITE_ROOT }}repo/token/modify/{{repo.props.id}}/" method="post">
|
<form id="modify-token-form" action="{{ SITE_ROOT }}repo/token/modify/{{repo.props.id}}/" method="post" class="hide">
|
||||||
<p>新口令:</p>
|
<h3>新口令:</h3>
|
||||||
<input id="id_token" type="text" name="token" /><br/>
|
<input id="id_token" type="text" name="token" /><br/>
|
||||||
<input id="id_summit" type="submit" value="提交" />
|
<input id="id_summit" type="submit" value="提交" />
|
||||||
</form>
|
</form>
|
||||||
|
|
||||||
<table class="default">
|
<h3>基本信息</h3>
|
||||||
|
<table class="mgb10">
|
||||||
<tr>
|
<tr>
|
||||||
<td>ID</td>
|
<th>ID</th>
|
||||||
<td>{{repo.props.id}}</td>
|
<td>{{repo.props.id}}</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td>描述</td>
|
<th>描述</th>
|
||||||
<td>{{repo.props.desc}}</td>
|
<td>{{repo.props.desc}}</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td>访问口令</td>
|
<th>访问口令</th>
|
||||||
{% if is_owner %}
|
{% if is_owner %}
|
||||||
<td>{{token}} <input type="button" id="modify-token-btn" value="修改" /></td>
|
<td>{{token}} <button id="modify-token-btn">修改</button></td>
|
||||||
{% else %}
|
{% else %}
|
||||||
<td>只有拥有者可见</td>
|
<td>只有同步目录拥有者可见</td>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
</tr>
|
</tr>
|
||||||
</table>
|
</table>
|
||||||
|
|
||||||
<h3>提交记录</h3>
|
<h3>修改记录</h3>
|
||||||
<table class="commit-list default">
|
<table>
|
||||||
<tr>
|
<tr>
|
||||||
<!-- <th>ID</th> -->
|
<!-- <th>ID</th> -->
|
||||||
<th>时间</th>
|
<th>修改时间</th>
|
||||||
<th>描述</th>
|
<th>描述</th>
|
||||||
</tr>
|
</tr>
|
||||||
{% for commit in commits %}
|
{% for commit in commits %}
|
||||||
@@ -54,8 +55,6 @@ $(function() {
|
|||||||
$("#modify-token-btn").click(function() {
|
$("#modify-token-btn").click(function() {
|
||||||
$("#modify-token-form").modal({appendTo: "#main"});
|
$("#modify-token-form").modal({appendTo: "#main"});
|
||||||
});
|
});
|
||||||
|
|
||||||
$("#modify-token-form").hide();
|
|
||||||
})
|
})
|
||||||
</script>
|
</script>
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
@@ -49,15 +49,11 @@
|
|||||||
{% endfor %}
|
{% endfor %}
|
||||||
</table>
|
</table>
|
||||||
|
|
||||||
<div class="hidden">
|
<form id="add-role-form" action="" method="post" class="hide">
|
||||||
|
<p><span id="user_email"></span> 的新角色 (即 MyClient 等):</p>
|
||||||
<form id="add-role-form" action="" method="post">
|
<input id="id_role" type="text" name="role" /><br/>
|
||||||
<p><span id="user_email"></span> 的新角色 (即 MyClient 等):</p>
|
<input id="id_summit" type="submit" value="提交" />
|
||||||
<input id="id_role" type="text" name="role" /><br/>
|
</form>
|
||||||
<input id="id_summit" type="submit" value="Submit" />
|
|
||||||
</form>
|
|
||||||
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div id="dialog-delete-confirm" class="center hide">
|
<div id="dialog-delete-confirm" class="center hide">
|
||||||
<p>确认要删除?</p>
|
<p>确认要删除?</p>
|
||||||
|
Reference in New Issue
Block a user