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