1
0
mirror of https://github.com/haiwen/seahub.git synced 2025-08-31 14:42:10 +00:00
Files
seahub/templates/base.html

202 lines
8.1 KiB
HTML
Raw Normal View History

2012-09-04 12:11:26 +08:00
{% load seahub_tags avatar_tags %}
{% load url from future %}
2012-07-13 17:26:33 +08:00
<!DOCTYPE html>
2011-03-19 13:15:02 +08:00
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>{{ seahub_title }}</title>
2011-03-19 13:15:02 +08:00
<meta http-equiv="Content-type" content="text/html; charset=utf-8" />
2012-09-04 12:11:26 +08:00
<meta name="keywords" content="文件 协作 团队 团体" />
2012-03-30 13:49:32 +08:00
<link rel="stylesheet" type="text/css" href="{{ MEDIA_URL }}css/ui-lightness/jquery-ui-1.8.16.custom.css" />
2012-10-15 11:10:10 +08:00
<link rel="stylesheet" type="text/css" href="{{ MEDIA_URL }}css/seahub.css?t=4884491531236" />
2012-08-29 13:51:32 +08:00
<link rel="icon" type="image/png" href="{{ MEDIA_URL }}img/favicon.jpg" />
2011-03-19 13:15:02 +08:00
{% block extra_style %}{% endblock %}
</head>
2012-05-29 17:26:00 +08:00
<body>
2011-03-19 13:15:02 +08:00
<div id="wrapper">
2012-06-12 10:13:14 +08:00
{% block info_bar_message %}
{% if request.user.is_authenticated and request.cur_note %}
<div id="info-bar">
2012-10-10 11:54:49 +08:00
<p id="info-bar-info">{{ request.cur_note.message|urlize|url_target_blank }}</p>
2012-08-18 21:30:13 +08:00
<img src="{{ MEDIA_URL }}img/close-16.png" class="close" data="{{ request.cur_note.id }}" />
</div>
{% endif %}
2012-06-12 10:13:14 +08:00
{% endblock info_bar_message %}
2011-10-13 00:17:48 +08:00
<div id="top-bar">
2012-08-21 16:01:18 +08:00
<div class="top-bar-inner">
<div class="top-bar-con">
2012-08-02 14:27:09 +08:00
<div class="manage fleft">
2012-07-27 14:12:25 +08:00
{% if request.user.is_authenticated %}
2012-08-01 22:34:35 +08:00
{% if cloud_mode %}
2012-08-21 16:01:18 +08:00
<a href="#" id="account-context" data="no-popup">
{% if org %} {{ org.org_name }} {% else %} 个人帐号 {% endif %}
<span class="tri-bg tri-down-bg"></span></a>
2012-08-21 16:01:18 +08:00
<ul class="hide" id="account-context-selector">
2012-08-31 17:28:50 +08:00
<li><a href="{% url 'myhome' %}">个人帐号</a></li>
2012-07-27 14:12:25 +08:00
{% for org in request.user.orgs %}
2012-09-03 19:36:47 +08:00
<li><a href="{% url 'org_personal' org.url_prefix %}">{{ org.org_name }}</a></li>
2012-07-27 14:12:25 +08:00
{% endfor %}
2012-08-31 17:28:50 +08:00
<li><a href="{% url 'create_org' %}">新建团体</a></li>
</ul>
{% endif %}
2012-07-27 14:12:25 +08:00
{% endif %}
{% if request.user.is_staff %}
<a href="{{ SITE_ROOT }}sys/useradmin/"{% block top_bar_sys_manager_class %}{% endblock %}>系统管理</a>
<a href="{{ SITE_ROOT }}home/my/"{% block top_bar_myaccount_class %}{% endblock %}>个人工作台</a>
{% endif %}
2012-07-27 14:12:25 +08:00
2012-08-31 17:28:50 +08:00
{% if org.is_staff %}
<a href="{% url 'org_useradmin' org.url_prefix %}"{% block top_bar_org_manager_class %}{% endblock %}>管理员工作台</a>
2012-09-14 11:39:33 +08:00
<a href="{% url 'org_personal' org.url_prefix %}"{% block top_bar_org_myaccount_class %}{% endblock %}>个人工作台</a>
2012-05-17 14:02:47 +08:00
{% endif %}
2012-07-27 14:18:47 +08:00
</div>
2012-08-02 14:27:09 +08:00
<div class="account fright">
2011-10-13 00:17:48 +08:00
{% if request.user.is_authenticated %}
2012-08-31 17:28:50 +08:00
<span>欢迎,</span> <a href="{% url 'avatar_add' %}" class="avatar-link">{% avatar request.user 16 %}</a> <span>{{ request.user }}</span>
2011-10-13 00:17:48 +08:00
<a href="{{ SITE_ROOT }}profile/">设置</a>
<a href="{{ SITE_ROOT }}accounts/logout/">退出</a>
{% else %}
2012-06-20 19:39:21 +08:00
<a href="{{ SITE_ROOT }}accounts/login/">登录</a>
{% if account_type == 'business' %}
<a href="{{ SITE_ROOT }}accounts/business/register/">注册</a>
{% else %}
2011-10-13 00:17:48 +08:00
<a href="{{ SITE_ROOT }}accounts/register/">注册</a>
{% endif %}
2012-06-20 19:39:21 +08:00
{% endif %}
</div>
2011-10-13 00:17:48 +08:00
</div>
</div>
</div>
2012-05-29 17:26:00 +08:00
2011-03-19 13:15:02 +08:00
<div id="header">
2012-09-07 10:52:41 +08:00
<img src="{{ MEDIA_URL }}img/logo.jpg" title="SeaCloud" alt="SeaCloud logo" id="logo" class="fleft" />
2012-07-12 16:05:43 +08:00
{% block nav %}{% endblock %}
2011-03-19 13:15:02 +08:00
</div>
2012-05-29 17:26:00 +08:00
2011-03-19 13:15:02 +08:00
<div id="main">
2012-09-04 11:27:15 +08:00
<div id="title-panel" class="clear w100 ovhd">
{% block title_panel %}{% endblock %}
</div>
2011-03-19 13:15:02 +08:00
<div id="left-panel">
2011-03-19 22:06:58 +08:00
{% block left_panel %}{% endblock %}
2011-03-19 13:15:02 +08:00
</div>
<div id="right-panel">
2011-03-19 22:06:58 +08:00
{% block right_panel %}{% endblock %}
2011-03-19 13:15:02 +08:00
</div>
<div id="main-panel" class="clear w100 ovhd">
{% if messages %}
{% autoescape off %}
<ul class="messages hide">
{% for message in messages %}
2012-09-24 10:54:44 +08:00
<li class="{{ message.tags }}">{{ message }}</li>
{% endfor %}
</ul>
{% endautoescape %}
{% endif %}
{% block main_panel %} {% endblock %}
2011-03-19 13:15:02 +08:00
</div>
</div>
2012-05-29 17:26:00 +08:00
2012-03-22 20:33:27 +08:00
<div id="footer" class="ovhd">
<div class="items fleft">
<div class="item">
<h4>SeaCloud</h4>
<ul>
2012-07-04 17:57:16 +08:00
<li><a href="http://seafile.com/" target="_blank">介绍</a></li>
<li><a href="http://wiki.seafile.com.cn/" target="_blank">Wiki</a></li>
<li><a href="http://gonggeng.org/vanilla/" target="_blank">论坛</a></li>
</ul>
</div>
<div class="item">
<h4>客户端</h4>
<ul>
<li><a href="http://www.seafile.com/download/">Seafile for Windows</a></li>
</ul>
</div>
<div class="item">
<h4>文档</h4>
<ul>
<li><a href="http://www.seafile.com/help/" target="_blank">使用帮助</a></li>
</ul>
</div>
</div>
<div class="other-info fright">
<p>服务器版本:{{ seafile_version }}</p>
2012-07-04 17:57:16 +08:00
<p>© 2012 海文互知</p>
<p><a href="http://seafile.com/contact/" target="_blank">联系我们</a>
</div>
2011-03-19 13:15:02 +08:00
</div>
2012-09-04 12:11:26 +08:00
<div id="dialog-confirm" class="hide">
<p id="confirm-con">确定要删除?</p>
<button id="yes-btn">确定</button>
<button class="simplemodal-close">取消</button>
</div>
2011-03-19 13:15:02 +08:00
</div><!-- wrapper -->
2012-03-22 20:33:27 +08:00
<script type="text/javascript" src="{{ MEDIA_URL }}js/jquery.min.js"></script>
<script type="text/javascript" src="{{ MEDIA_URL }}js/jquery.simplemodal.1.4.1.min.js"></script>
2012-03-30 13:49:32 +08:00
<script type="text/javascript" src="{{ MEDIA_URL }}js/jquery-ui-1.8.16.custom.min.js"></script>
2012-10-13 19:18:24 +08:00
<script type="text/javascript" src="{{ MEDIA_URL }}js/jquery.cookie.js"></script>
2012-10-15 11:10:10 +08:00
<script type="text/javascript" src="{{ MEDIA_URL }}js/utils.js?t=4884491531236"></script>
<script type="text/javascript">
2012-08-21 16:01:18 +08:00
$('.top-bar-con .manage').css('width', $('.top-bar-con').width() - $('.top-bar-con .account').width() - 30);
2012-08-18 17:00:44 +08:00
{% if request.user.is_authenticated %}
{% if request.cur_note %}
$('#info-bar .close').click(function() {
$('#info-bar').addClass('hide');
2012-08-18 21:53:32 +08:00
if (navigator.cookieEnabled) {
2012-08-22 16:22:10 +08:00
var date = new Date(),
cookies = document.cookie.split('; '),
2012-08-21 11:27:09 +08:00
note_id_exist = false,
2012-08-22 16:22:10 +08:00
new_note_id = $(this).attr('data') + ',';
date.setTime(date.getTime() + 14*24*60*60*1000);
new_note_id += '; expires=' + date.toGMTString() + '; path=' + '{{ SITE_ROOT }}';
2012-08-18 21:30:13 +08:00
for (var i = 0, len = cookies.length; i < len; i++) {
2012-08-21 11:27:09 +08:00
if (cookies[i].split('=')[0] == 'note_id') {
note_id_exist = true;
document.cookie = 'note_id=' + cookies[i].split('=')[1] + new_note_id;
2012-08-18 21:30:13 +08:00
break;
}
}
2012-08-21 11:27:09 +08:00
if (!note_id_exist) {
document.cookie = 'note_id=' + new_note_id;
2012-08-18 21:30:13 +08:00
}
}
2012-08-18 17:00:44 +08:00
});
{% endif %}
{% if request.cloud_mode %}
2012-08-21 16:01:18 +08:00
$('#account-context').click(function() {
if ($(this).attr('data') == 'no-popup') {
$(this).parent().css('position', 'relative');
2012-08-21 16:01:18 +08:00
$('#account-context-selector').removeClass('hide');
$(this).attr('data', 'has-popup');
} else {
2012-08-21 16:01:18 +08:00
$('#account-context-selector').addClass('hide');
$(this).attr('data', 'no-popup');
}
return false;
}).focus(function() { $(this).blur(); });
$(document).click(function(e) {
var element = e.target || e.srcElement;
2012-08-21 16:01:18 +08:00
if (element.id != 'account-context-selector' && element.attrid != 'account-context') {
$('#account-context-selector').addClass('hide');
$('#account-context').attr('data', 'no-popup');
}
});
2012-08-18 17:00:44 +08:00
{% endif %}
{% endif %}
</script>
{% block extra_script %}{% endblock %}
2011-03-19 13:15:02 +08:00
</body>
</html>