1
0
mirror of https://github.com/haiwen/seahub.git synced 2025-08-02 07:47:32 +00:00
seahub/templates/repo.html
2012-03-10 22:30:23 +08:00

62 lines
1.4 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">
<p>新口令:</p>
<input id="id_token" type="text" name="token" /><br/>
<input id="id_summit" type="submit" value="提交" />
</form>
<table class="default">
<tr>
<td>ID</td>
<td>{{repo.props.id}}</td>
</tr>
<tr>
<td>描述</td>
<td>{{repo.props.desc}}</td>
</tr>
<tr>
<td>访问口令</td>
{% if is_owner %}
<td>{{token}} <input type="button" id="modify-token-btn" value="修改" /></td>
{% else %}
<td>只有拥有者可见</td>
{% endif %}
</tr>
</table>
<h3>提交记录</h3>
<table class="commit-list default">
<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"});
});
$("#modify-token-form").hide();
})
</script>
{% endblock %}