1
0
mirror of https://github.com/haiwen/seahub.git synced 2025-08-16 14:08:12 +00:00
seahub/templates/base.html
2013-03-27 19:08:41 +08:00

214 lines
10 KiB
HTML

{% load seahub_tags avatar_tags i18n %}
{% load url from future %}
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>{% if org %}{{ org.org_name }} - {% endif %}{{ site_title }}</title>
<meta http-equiv="Content-type" content="text/html; charset=utf-8" />
<meta name="keywords" content="{% trans "File Collaboration Team Organization" %}" />
<link rel="stylesheet" type="text/css" href="{{ MEDIA_URL }}css/ui-lightness/jquery-ui-1.8.16.custom.css" />
<link rel="stylesheet" type="text/css" href="{{ MEDIA_URL }}css/seahub.css?t=1364382180" />
<link rel="icon" type="image/x-icon" href="{{ MEDIA_URL }}img/favicon.ico?t=1364382180" />
<!--[if IE]>
<link rel="shortcut icon" href="{{ MEDIA_URL }}img/favicon.ico?t=1364382180"/>
<![endif]-->
{% block extra_style %}{% endblock %}
</head>
<body>
<div id="wrapper" class="{{ LANGUAGE_CODE }}">
{% block info_bar_message %}
{% if request.user.is_authenticated and request.cur_note %}
<div id="info-bar">
<p id="info-bar-info">{{ request.cur_note.message|urlize|url_target_blank }}</p>
<img src="{{ MEDIA_URL }}img/close-16.png" class="close" data="{{ request.cur_note.id }}" />
</div>
{% endif %}
{% endblock info_bar_message %}
<div id="top-bar">
<div class="top-bar-inner">
<div class="top-bar-con">
<div class="manage fleft">
{% if request.user.is_authenticated %}
{% if cloud_mode %}
<a href="#" id="account-context" data="no-popup">
{% if org %} {{ org.org_name }} {% else %} {% trans "Personal" %} {% endif %}
<span class="tri-bg tri-down-bg"></span>
</a>
<ul class="hide" id="account-context-selector">
<li><a href="{% url 'myhome' %}">{% trans "Personal" %}</a></li>
{% for org in request.user.orgs %}
<li><a href="{% url 'org_personal' org.url_prefix %}">{{ org.org_name }}</a></li>
{% endfor %}
<li><a href="{% url 'create_org' %}">{% trans "New Organization" %}</a></li>
</ul>
{% endif %}
{% endif %}
{% if request.user.is_staff %}
<a href="{{ SITE_ROOT }}sys/useradmin/"{% block top_bar_sys_manager_class %}{% endblock %}>{% trans "System Admin" %}</a>
<a href="{{ SITE_ROOT }}home/my/"{% block top_bar_myaccount_class %}{% endblock %}>{% trans "Workspace" %}</a>
{% endif %}
{% if org.is_staff %}
<a href="{% url 'org_admin' org.url_prefix %}"{% block top_bar_org_manager_class %}{% endblock %}>{% trans "Admin" %}</a>
<a href="{% url 'org_personal' org.url_prefix %}"{% block top_bar_org_myaccount_class %}{% endblock %}>{% trans "Workspace" %}</a>
{% endif %}
</div>
<div class="account fright">
{% if request.user.is_authenticated %}
<a href="{% url 'edit_profile' %}" class="avatar-link" title="{% trans 'Profile Setting' %}">{% avatar request.user 16 %}</a> <span>{{ request.user }}</span>
<a href="{{ SITE_ROOT }}accounts/logout/">{% trans "Log out" %}</a>
{% else %}
<a href="{{ SITE_ROOT }}accounts/login/">{% trans "Log In" %}</a>
{% if cloud_mode or enable_signup %}
<a href="{{ SITE_ROOT }}accounts/register/">{% trans "Signup" %}</a>
{% endif %}
{% endif %}
<a href="#" id="lang-context" data="no-popup" data-lang="{{ LANGUAGE_CODE }}">{{ 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>
</div>
</div>
</div>
<div id="header">
<div id="header-inner">
{% block notice_panel %}{% endblock %}
<a href="http://seafile.com/" id="logo" class="fleft">
<img src="{{ MEDIA_URL }}img/logo.png?t=1364382180" title="Seafile" alt="Seafile logo" />
</a>
{% block nav %}{% endblock %}
{% if enable_file_search and request.user.is_authenticated %}
<form id="top-search-form" method="get" action="{% url 'search' %}" class="search-form fright">
<input class="search-input" name="q" placeholder="{% trans 'Search Files' %}" value="{{ keyword }}" />
<input type="submit" value="" class="search-submit" />
</form>
{% endif %}
</div>
</div>
<div id="main">
<div id="title-panel" class="w100 ovhd">
{% block title_panel %}{% endblock %}
</div>
<div id="left-panel">
{% block left_panel %}{% endblock %}
</div>
<div id="right-panel">
{% block right_panel %}{% endblock %}
</div>
<div id="main-panel" class="clear w100 ovhd">
{% if messages %}
{% autoescape off %}
<ul class="messages hide">
{% for message in messages %}
<li class="{{ message.tags }}">{{ message }}</li>
{% endfor %}
</ul>
{% endautoescape %}
{% endif %}
{% block main_panel %} {% endblock %}
</div>
<div id="confirm-popup" class="hide">
<div id="confirm-con"></div>
<button id="confirm-yes">{% trans "Yes"%}</button>
<button class="simplemodal-close">{% trans "No"%}</button>
</div>
</div>
<div id="footer" class="ovhd">
<div class="items fleft">
<div class="item">
<h4>Seafile</h4>
<ul>
<li><a href="http://seafile.com/{% if LANGUAGE_CODE == 'en' %}en/{% endif %}home/" target="_blank">{% trans "Introduction" %}</a></li>
<li><a href="https://github.com/haiwen/seafile/wiki{% if LANGUAGE_CODE == 'zh-cn' %}/Seafile-服务器手册中文版{% endif %}" target="_blank">Wiki</a></li>
{% if LANGUAGE_CODE == 'zh-cn' %}<li><a href="http://gonggeng.org/vanilla/" target="_blank">{% trans "Forum" %}</a></li>{% endif %}
</ul>
</div>
<div class="item">
<h4>{% trans "Client" %}</h4>
<ul>
<li><a href="http://www.seafile.com/{% if LANGUAGE_CODE == 'en' %}en/{% endif %}download/">{% trans "Seafile for Windows, Mac and Linux" %}</a></li>
</ul>
</div>
<div class="item">
<h4>{% trans "Documents" %}</h4>
<ul>
<li><a href="http://www.seafile.com/{% if LANGUAGE_CODE == 'en' %}en/{% endif %}help/" target="_blank">{% trans "Help" %}</a></li>
</ul>
</div>
</div>
<div class="other-info fright">
<p>{% trans "Server Version: " %}{{ seafile_version }}</p>
<p>© 2013 {% trans "Seafile" %}</p>
<p><a href="http://seafile.com/{% if LANGUAGE_CODE == 'en' %}en/{% endif %}contact/" target="_blank">{% trans "Contact Us" %}</a></p>
</div>
</div>
</div><!-- wrapper -->
<script type="text/javascript" src="{{ MEDIA_URL }}js/jq.min.js?t=1364382180"></script>
<script type="text/javascript" src="{{ MEDIA_URL }}js/base.js?t=1364382180"></script>
<script type="text/javascript">
{% if request.user.is_authenticated %}
{% if request.cur_note %}
$('#info-bar .close').click(function() {
$('#info-bar').addClass('hide');
if (navigator.cookieEnabled) {
var date = new Date(),
cookies = document.cookie.split('; '),
info_id_exist = false,
new_info_id = $(this).attr('data') + '_';
date.setTime(date.getTime() + 14*24*60*60*1000);
new_info_id += '; expires=' + date.toGMTString() + '; path=' + '{{ SITE_ROOT }}';
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;
break;
}
}
if (!info_id_exist) {
document.cookie = 'info_id=' + new_info_id;
}
}
});
{% endif %}
{% if request.cloud_mode %}
$('#account-context').click(function() {
if ($(this).attr('data') == 'no-popup') {
$(this).parent().css('position', 'relative');
$('#account-context-selector').removeClass('hide');
$(this).attr('data', 'has-popup');
} else {
$('#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;
if (element.id != 'account-context-selector' && element.id != 'account-context') {
$('#account-context-selector').addClass('hide');
$('#account-context').attr('data', 'no-popup');
}
});
{% endif %}
{% endif %}
</script>
{% block extra_script %}{% endblock %}
</body>
</html>