1
0
mirror of https://github.com/haiwen/seahub.git synced 2025-07-14 23:46:49 +00:00
seahub/templates/repo.html

82 lines
2.6 KiB
HTML
Raw Normal View History

2011-09-07 02:57:47 +00:00
{% extends "myhome_base.html" %}
2011-10-12 16:17:48 +00:00
{% load seahub_tags %}
2011-08-16 13:05:42 +00:00
2012-04-17 03:41:38 +00:00
{% block left_panel %}
<ul>
2012-04-24 08:15:29 +00:00
{% if is_owner %}
<li><a href="{{ SITE_ROOT }}repo/dir/{{ repo.props.id }}/">浏览</a></li>
{% else %}
{% if repo_ap == 'public' %}
<li><a href="{{ SITE_ROOT }}repo/dir/{{ repo.props.id }}/">浏览</a></li>
{% endif %}
{% endif %}
2012-04-17 03:41:38 +00:00
</ul>
{% endblock %}
2011-08-16 13:05:42 +00:00
{% block right_panel %}
2011-10-12 16:17:48 +00:00
<h2>{{repo.props.name}}</h2>
2012-04-24 08:15:29 +00:00
<p class="repo-desc">{{repo.props.desc}}</p>
<p class="repo-size">大小:{{ repo_size|filesizeformat }}</p>
2012-04-24 08:15:29 +00:00
<p>
<span class="item-name">WEB匿名访问:</span>
{% if is_owner %}
{% if repo_ap == 'public' %}
<input type="checkbox" name="repo-access-switch" id="repo-access-switch" checked="checked" autocomplete="off" /><label for="repo-access-switch">开启</label>
{% else %}
<input type="checkbox" name="repo-access-switch" id="repo-access-switch" autocomplete="off" /><label for="repo-access-switch">开启</label>
{% endif %}
<span class="tip">开启后,任何人都能够访问该目录</span>
{% else %}
<span>只有同步目录拥有者可设置</span>
{% endif %}
</p>
<h3>最近修改</h3>
<table>
<tr>
<th width="20%">修改时间</th>
<th widht="20%">修改者</th>
<th width="60%">描述</th>
2012-04-24 08:15:29 +00:00
</tr>
{% for commit in recent_commits %}
<tr>
<td>{{ commit.props.ctime|tsstr_sec }}</td>
{% if commit.props.creator_name %}
<td>{{ commit.props.creator_name }}</td>
{% else %}
<td>未知</td>
{% endif %}
2012-04-24 08:15:29 +00:00
<td>{{ commit.props.desc }}</td>
</tr>
{% endfor %}
</table>
<a href="{{ SITE_ROOT }}repo/history/{{repo.props.id}}/">查看全部修改</a>
2011-10-18 07:41:48 +00:00
2012-04-24 08:15:29 +00:00
<div id="public-access-start-confirm" class="hide">
<p>确定要开启吗?</p>
<button id="public-access-start-btn">确定</button>
<button id="public-access-start-cancel-btn" class="simplemodal-close">取消</button>
2012-03-30 05:49:32 +00:00
</div>
2011-08-16 13:05:42 +00:00
{% endblock %}
2011-10-18 07:41:48 +00:00
{% block extra_script %}
<script type="text/javascript">
2012-04-25 13:44:23 +00:00
if ($('#repo-access-switch').attr('checked')) {
$('#repo-access-switch').click(function() {
2012-04-26 02:57:36 +00:00
location.href = "{{ SITE_ROOT }}repo/setap/{{ repo.props.id}}/?ap=own";
2012-04-25 13:44:23 +00:00
});
} else {
$('#repo-access-switch').click(function() {
$('#public-access-start-confirm').modal({appendTo:"#main", containerCss:{padding:18}});
});
}
2012-04-20 05:34:52 +00:00
2012-04-24 08:15:29 +00:00
$('#public-access-start-btn').click(function() {
2012-04-26 02:57:36 +00:00
location.href = "{{ SITE_ROOT }}repo/setap/{{ repo.props.id}}/?ap=public";
2012-04-24 08:15:29 +00:00
});
$('#public-access-start-cancel-btn').click(function() {
$('#repo-access-switch').attr('checked', false);
});
2011-10-18 07:41:48 +00:00
</script>
{% endblock %}