1
0
mirror of https://github.com/haiwen/seahub.git synced 2025-09-25 14:50:29 +00:00
Files
seahub/templates/repo.html
2012-03-28 10:38:12 +08:00

68 lines
1.7 KiB
HTML

{% extends "myhome_base.html" %}
{% load seahub_tags %}
{% block right_panel %}
<h2>{{repo.props.name}}</h2>
<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>
<h3>基本信息</h3>
<table class="mgb10">
<tr>
<th>ID</th>
<td>{{repo.props.id}}</td>
</tr>
<tr>
<th>描述</th>
<td>{{repo.props.desc}}</td>
</tr>
<tr>
<th>访问口令</th>
{% if is_owner %}
<td><span id="token">*****</span> <input type="checkbox" name="token-show-switch" id="token-show-switch" /><label for="token-show-switch">显示</label> <button id="modify-token-btn">修改</button></td>
{% else %}
<td>只有同步目录拥有者可见</td>
{% endif %}
</tr>
</table>
<h3>修改记录</h3>
<table>
<tr>
<!-- <th>ID</th> -->
<th>修改时间</th>
<th>描述</th>
</tr>
{% for commit in commits %}
<tr>
<!-- <td>{{ commit.props.id }}</td> -->
<td>{{ commit.props.ctime|tsstr_sec }}</td>
<td>{{ commit.props.desc }}</td>
</tr>
{% endfor %}
</table>
{% endblock %}
{% block extra_script %}
<script type="text/javascript">
$(function() {
$("#modify-token-btn").click(function() {
$("#modify-token-form").modal({appendTo: "#main"});
});
})
$('#token-show-switch').click(function() {
if ($(this).attr('checked')) {
$('#token').html('{{token}}');
} else {
$('#token').html('*****');
}
});
</script>
{% endblock %}