1
0
mirror of https://github.com/haiwen/seahub.git synced 2025-09-19 01:44:13 +00:00
Files
seahub/templates/base.html

231 lines
9.5 KiB
HTML
Raw Normal View History

2012-10-26 19:15:52 +08:00
{% load seahub_tags avatar_tags i18n %}
2012-09-04 12:11:26 +08:00
{% 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>
2012-10-23 20:53:59 +08:00
<title>{% if org %}{{ org.org_name }} - {% endif %}{{ seahub_title }}</title>
2011-03-19 13:15:02 +08:00
<meta http-equiv="Content-type" content="text/html; charset=utf-8" />
<meta name="keywords" content="{% trans "File Collaboration Team Organization" %}" />
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-19 17:53:31 +08:00
<link rel="stylesheet" type="text/css" href="{{ MEDIA_URL }}css/seahub.css?t=4884491531237" />
2012-11-01 14:41:23 +08:00
<link rel="icon" type="image/png" href="{{ MEDIA_URL }}img/favicon.jpg?t=1" />
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">
2012-11-03 21:45:38 +08:00
{% if org %} {{ org.org_name }} {% else %} {% trans "Personal" %} {% endif %}
2012-11-02 11:39:34 +08:00
<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-11-03 21:45:38 +08:00
<li><a href="{% url 'myhome' %}">{% trans "Personal" %}</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 %}
<li><a href="{% url 'create_org' %}">{% trans "New Organization" %}</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 %}>{% trans "System Admin" %}</a>
2012-11-03 21:45:38 +08:00
<a href="{{ SITE_ROOT }}home/my/"{% block top_bar_myaccount_class %}{% endblock %}>{% trans "Workspace" %}</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_admin' org.url_prefix %}"{% block top_bar_org_manager_class %}{% endblock %}>{% trans "Admin" %}</a>
2012-11-03 21:45:38 +08:00
<a href="{% url 'org_personal' org.url_prefix %}"{% block top_bar_org_myaccount_class %}{% endblock %}>{% trans "Workspace" %}</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-11-03 21:45:38 +08:00
<a href="{% url 'edit_profile' %}" class="avatar-link">{% avatar request.user 16 %}</a> <span>{{ request.user }}</span>
2012-10-27 11:42:13 +08:00
<a href="{{ SITE_ROOT }}accounts/logout/">{% trans "Log out" %}</a>
2011-10-13 00:17:48 +08:00
{% else %}
2012-10-26 19:15:52 +08:00
<a href="{{ SITE_ROOT }}accounts/login/">{% trans "Log In" %}</a>
2012-10-27 21:12:28 +08:00
<a href="{{ SITE_ROOT }}accounts/register/">{% trans "Signup" %}</a>
2012-06-20 19:39:21 +08:00
{% endif %}
2012-11-02 11:39:34 +08:00
<a href="#" id="lang-context" data="no-popup">
{{ LANGUAGE_CODE|language_name_local }}
<span class="tri-bg tri-down-bg"></span>
</a>
<ul class="hide" id="lang-context-selector">
{% for LANG in LANGUAGES %}
<li><a href="{% url 'i18n' %}?lang={{ LANG.0 }}">{{ LANG.1 }}</a></li>
{% endfor %}
</ul>
</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-11-03 18:05:50 +08:00
<div id="header-inner">
2012-11-03 21:37:41 +08:00
<img src="{{ MEDIA_URL }}img/logo.png?t=2" title="Seafile" alt="Seafile logo" id="logo" class="fleft" />
2012-07-12 16:05:43 +08:00
{% block nav %}{% endblock %}
2012-11-03 18:05:50 +08:00
</div>
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-10-26 19:15:52 +08:00
<li><a href="http://seafile.com/" target="_blank">{% trans "Introduction" %}</a></li>
<li><a href="http://wiki.seafile.com.cn/" target="_blank">Wiki</a></li>
2012-10-26 19:15:52 +08:00
<li><a href="http://gonggeng.org/vanilla/" target="_blank">{% trans "Forum" %}</a></li>
</ul>
</div>
<div class="item">
2012-10-26 19:15:52 +08:00
<h4>{% trans "Client" %}</h4>
<ul>
<li><a href="http://www.seafile.com/download/">Seafile for Windows</a></li>
</ul>
</div>
<div class="item">
2012-10-26 19:15:52 +08:00
<h4>{% trans "Documents" %}</h4>
<ul>
2012-10-26 19:15:52 +08:00
<li><a href="http://www.seafile.com/help/" target="_blank">{% trans "Help" %}</a></li>
</ul>
</div>
</div>
<div class="other-info fright">
2012-10-26 19:15:52 +08:00
<p>{% trans "Server Version: " %}{{ seafile_version }}</p>
<p>© 2012 {% trans "Seafile" %}</p>
<p><a href="http://seafile.com/contact/" target="_blank">{% trans "Contact Us" %}</a></p>
</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">{% trans "Really want to delete?" %}</p>
2012-10-27 14:11:37 +08:00
<button id="yes-btn">{% trans "Yes"%}</button>
<button class="simplemodal-close">{% trans "No"%}</button>
2012-09-04 12:11:26 +08:00
</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-19 17:53:31 +08:00
<script type="text/javascript" src="{{ MEDIA_URL }}js/jquery.placeholder.min.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-11-02 11:39:34 +08:00
$('input, textarea').placeholder();
$('.top-bar-con .manage').css('width', $('.top-bar-con').width() - $('.top-bar-con .account').width() - 30);
2012-10-26 19:15:52 +08:00
$('#lang-context').click(function() {
if ($(this).attr('data') == 'no-popup') {
$(this).parent().css('position', 'relative');
$('#lang-context-selector').removeClass('hide');
$(this).attr('data', 'has-popup');
} else {
$('#lang-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-11-02 11:39:34 +08:00
if (element.id != 'lang-context-selector' && element.id != 'lang-context') {
2012-10-26 19:15:52 +08:00
$('#lang-context-selector').addClass('hide');
$('#lang-context').attr('data', 'no-popup');
}
});
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('; '),
info_id_exist = false,
new_info_id = $(this).attr('data') + '_';
2012-08-22 16:22:10 +08:00
date.setTime(date.getTime() + 14*24*60*60*1000);
new_info_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++) {
if (cookies[i].split('=')[0] == 'info_id') {
info_id_exist = true;
document.cookie = 'info_id=' + cookies[i].split('=')[1] + new_info_id;
2012-08-18 21:30:13 +08:00
break;
}
}
if (!info_id_exist) {
document.cookie = 'info_id=' + new_info_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-11-02 11:39:34 +08:00
if (element.id != 'account-context-selector' && element.id != 'account-context') {
2012-08-21 16:01:18 +08:00
$('#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>