1
0
mirror of https://github.com/haiwen/seahub.git synced 2025-08-16 22:17:59 +00:00
seahub/templates/base.html

214 lines
10 KiB
HTML
Raw Normal View History

2012-10-26 11:15:52 +00:00
{% load seahub_tags avatar_tags i18n %}
2012-09-04 04:11:26 +00:00
{% load url from future %}
2012-07-13 09:26:33 +00:00
<!DOCTYPE html>
2011-03-19 05:15:02 +00:00
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
2012-11-07 12:39:59 +00:00
<title>{% if org %}{{ org.org_name }} - {% endif %}{{ site_title }}</title>
2011-03-19 05:15:02 +00:00
<meta http-equiv="Content-type" content="text/html; charset=utf-8" />
<meta name="keywords" content="{% trans "File Collaboration Team Organization" %}" />
2012-03-30 05:49:32 +00:00
<link rel="stylesheet" type="text/css" href="{{ MEDIA_URL }}css/ui-lightness/jquery-ui-1.8.16.custom.css" />
2013-03-27 11:08:41 +00:00
<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" />
2012-11-21 13:24:51 +00:00
<!--[if IE]>
2013-03-27 11:08:41 +00:00
<link rel="shortcut icon" href="{{ MEDIA_URL }}img/favicon.ico?t=1364382180"/>
2012-11-21 13:24:51 +00:00
<![endif]-->
2011-03-19 05:15:02 +00:00
{% block extra_style %}{% endblock %}
</head>
2012-05-29 09:26:00 +00:00
<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 %}
2012-06-12 02:13:14 +00:00
<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>
2011-10-12 16:17:48 +00:00
</div>
</div>
2012-05-29 09:26:00 +00:00
<div id="header">
<div id="header-inner">
2013-03-01 03:27:58 +00:00
{% block notice_panel %}{% endblock %}
<a href="http://seafile.com/" id="logo" class="fleft">
2013-03-27 11:08:41 +00:00
<img src="{{ MEDIA_URL }}img/logo.png?t=1364382180" title="Seafile" alt="Seafile logo" />
</a>
{% block nav %}{% endblock %}
2013-03-04 09:25:47 +00:00
2013-03-09 06:15:53 +00:00
{% if enable_file_search and request.user.is_authenticated %}
2013-03-08 08:45:04 +00:00
<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" />
2013-03-04 09:25:47 +00:00
</form>
{% endif %}
</div>
2012-11-09 11:16:31 +00:00
</div>
2012-05-29 09:26:00 +00:00
<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>
2011-03-19 05:15:02 +00:00
<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>
2011-03-19 05:15:02 +00:00
</div><!-- wrapper -->
2013-03-27 11:08:41 +00:00
<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">
2012-08-18 09:00:44 +00:00
{% if request.user.is_authenticated %}
{% if request.cur_note %}
$('#info-bar .close').click(function() {
$('#info-bar').addClass('hide');
2012-08-18 13:53:32 +00:00
if (navigator.cookieEnabled) {
2012-08-22 08:22:10 +00:00
var date = new Date(),
cookies = document.cookie.split('; '),
info_id_exist = false,
new_info_id = $(this).attr('data') + '_';
2012-08-22 08:22:10 +00:00
date.setTime(date.getTime() + 14*24*60*60*1000);
2013-03-04 09:25:47 +00:00
new_info_id += '; expires=' + date.toGMTString() + '; path=' + '{{ SITE_ROOT }}';
2012-08-18 13:30:13 +00:00
for (var i = 0, len = cookies.length; i < len; i++) {
if (cookies[i].split('=')[0] == 'info_id') {
info_id_exist = true;
2013-03-04 09:25:47 +00:00
document.cookie = 'info_id=' + cookies[i].split('=')[1] + new_info_id;
2012-08-18 13:30:13 +00:00
break;
}
}
if (!info_id_exist) {
2013-03-04 09:25:47 +00:00
document.cookie = 'info_id=' + new_info_id;
2012-08-18 13:30:13 +00:00
}
}
2012-08-18 09:00:44 +00:00
});
{% endif %}
{% if request.cloud_mode %}
2012-08-21 08:01:18 +00:00
$('#account-context').click(function() {
if ($(this).attr('data') == 'no-popup') {
$(this).parent().css('position', 'relative');
2012-08-21 08:01:18 +00:00
$('#account-context-selector').removeClass('hide');
$(this).attr('data', 'has-popup');
} else {
2012-08-21 08:01:18 +00: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 03:39:34 +00:00
if (element.id != 'account-context-selector' && element.id != 'account-context') {
2012-08-21 08:01:18 +00:00
$('#account-context-selector').addClass('hide');
$('#account-context').attr('data', 'no-popup');
}
});
2013-03-04 09:25:47 +00:00
2012-08-18 09:00:44 +00:00
{% endif %}
{% endif %}
</script>
{% block extra_script %}{% endblock %}
2011-03-19 05:15:02 +00:00
</body>
</html>