Files
mayan-edms/apps/main/templates/base.html
2011-04-21 23:58:41 -04:00

216 lines
9.0 KiB
HTML

{% extends "web_theme_base.html" %}
{% load i18n %}
{% load project_tags %}
{% load navigation_tags %}
{% load settings %}
{% load search_tags %}
{% load main_settings_tags %}
{% block html_title %}{% project_name %}{% block title %}{% endblock %}{% endblock %}
{% get_main_setting "SIDE_BAR_SEARCH" as debug %}
{% block web_theme_project_name %}{% project_name %}{% if debug %} {% trans "(DEBUG Mode)" %} {% endif %}{% endblock %}
{% block web_theme_stylesheets %}
<link rel="stylesheet" href="{{ MEDIA_URL }}css/override.css" type="text/css" media="screen" />
<link rel="stylesheet" href="{{ MEDIA_URL }}css/famfamfam-silk-sprite.css" type="text/css" media="screen" />
<link rel="stylesheet" href="{{ MEDIA_URL }}packages/jquery.fancybox-1.3.4/fancybox/jquery.fancybox-1.3.4.css" type="text/css" media="screen" />
{#<link rel="stylesheet" href="{{ MEDIA_URL }}packages/nathansmith-960-Grid-System-30906f2/code/css/960.css" type="text/css" media="screen" />#}
<link rel="stylesheet" href="{{ MEDIA_URL }}css/960-fluid.css" type="text/css" media="screen" />
<style type="text/css">
#fancybox-left-ico {
left: 20px;
}
#fancybox-right-ico {
right: 20px;
left: auto;
}
</style>
{% block stylesheets %}{% endblock %}
{% endblock %}
{% block web_theme_javascript %}
<script type="text/javascript" src="{{ MEDIA_URL }}packages/jquery.fancybox-1.3.4/fancybox/jquery.fancybox-1.3.4.pack.js"></script>
<script type="text/javascript" src="{{ MEDIA_URL }}packages/jquery.fancybox-1.3.4/fancybox/jquery.easing-1.3.pack.js"></script>
<script type="text/javascript" src="{{ MEDIA_URL }}packages/jquery.scrollview.js"></script>
<script type="text/javascript">
jQuery(document).ready(function() {
$("input:text:visible:not(#livesearch):not([readonly]):enabled:first").focus();
$('form').submit(function(){
$('button', this).click(function() {
return false;
});
$(':submit', this).click(function() {
return false;
});
});
$("a.fancybox").fancybox({
'titleShow' : false,
'transitionIn' : 'elastic',
'transitionOut' : 'elastic',
'easingIn' : 'easeOutBack',
'easingOut' : 'easeInBack',
'type' : 'image',
'autoScale' : true
});
$("a.fancybox-noscaling").fancybox({
'titleShow' : false,
'transitionIn' : 'elastic',
'transitionOut' : 'elastic',
'easingIn' : 'easeOutBack',
'easingOut' : 'easeInBack',
'type' : 'image',
'autoScale' : false
});
$("a.fancybox-iframe").fancybox({
'titleShow' : false,
'transitionIn' : 'elastic',
'transitionOut' : 'elastic',
'easingIn' : 'easeOutBack',
'easingOut' : 'easeInBack',
'type' : 'iframe',
'autoScale' : false,
'width' : '99%',
'height' : '99%',
'showNavArrows' : false,
'margin' : 20
});
$('.scrollable').scrollview();
$('.full-height').height($(window).height() - 210);
});
</script>
{% block javascript %}{% endblock %}
{% endblock %}
{% block web_theme_user_navigation %}
<li><strong>{% trans "User" %}:</strong>
{% if user.is_anonymous %}
{% trans "Anonymous" %}
{% else %}
{{ user.get_full_name|default:user }}
{% if user.has_usable_password %}
<a href="{% url password_change_view %}">({% trans "New password" %})</a>
{% endif %}
{% endif %}
</li>
{% if user.is_staff or user.is_superuser %}
<li><a href="/admin">{% trans "Admin site" %}</a></li>
{% endif %}
{% if user.is_staff or user.is_superuser %}
<li><a href="{% url sentry %}">{% trans "Sentry" %}</a></li>
{% endif %}
{% get_setting "MIDDLEWARE_CLASSES" as middleware_classes %}
{% if "django.middleware.locale.LocaleMiddleware" in middleware_classes %}
<li>
<form action="{% url set_language %}" method="post">{% csrf_token %}
<select name="language">
{% for lang in LANGUAGES %}
<option value="{{ lang.0 }}">{{ lang.1 }}</option>
{% endfor %}
</select>
<input type="submit" value="{% trans 'Go' %}" />
</form>
</li>
{% endif %}
{% get_setting "LOGIN_URL" as login_url %}
<li><a class="logout" href="{% if user.is_anonymous %}{% url login_view %}?next=/{% else %}{% url logout_view %}?next={{ login_url }}{% endif %}">{% if user.is_anonymous %}{% trans "Login" %}{% else %}{% trans "Logout" %}{% endif %}</a></li>
{% endblock %}
{% block web_theme_main_navigation %}
{% main_navigation %}
{% for link in navigation_main_links %}
<li class="{% if link.first %}first {% endif %}{% if link.active %}active{% endif %}"><a href="{{ link.url }}">{{ link.text|capfirst }}{% if link.famfam %}<span class="famfam active famfam-{{ link.famfam|default:'link' }}"></span>{% endif %}</a></li>
{% endfor %}
{% endblock %}
{% block web_theme_secondary_navigation %}
{% main_navigation %}
{% if navigation_secondary_links %}
<div class="secondary-navigation">
<ul class="wat-cf">
{% for link in navigation_secondary_links %}
<li class="{% if link.first %}first {% endif %}{% if link.active %}active{% endif %}"><a href="{{ link.url }}">{{ link.text|capfirst }}{% if link.famfam %}<span class="famfam active famfam-{{ link.famfam|default:'link' }}"></span>{% endif %}</a></li>
{% endfor %}
</ul>
</div>
{% endif %}
{% get_object_navigation_links "form_header" as form_navigation_links %}
{% if form_navigation_links %}
<div class="secondary-navigation">
<ul class="wat-cf">
{% for link in form_navigation_links %}
<li class="{% if forloop.first %}first {% endif %}{% if link.active %}active{% endif %}"><a href="{{ link.url }}">{{ link.text|capfirst }}{% if link.famfam %}<span class="famfam active famfam-{{ link.famfam|default:'link' }}"></span>{% endif %}</a></li>
{% endfor %}
</ul>
</div>
{% endif %}
{% endblock %}
{% block web_theme_sidebar %}
{% get_main_setting "SIDE_BAR_SEARCH" as side_bar_search %}
{% if side_bar_search and not web_theme_hide_menus %}
{% with "true" as side_bar %}
{% with "true" as form_hide_required_text %}
{% with "" as object %}
{% search_form %}
{% endwith %}
{% endwith %}
{% endwith %}
{% endif %}
{% get_object_navigation_links as object_navigation_links %}
{% if object_navigation_links %}
<div class="block">
{% if object %}
{% if object_name %}
<h3>{% blocktrans %}Actions for {{ object_name }}: {{ object }}{% endblocktrans %}</h3>
{% else %}
<h3>{% blocktrans %}Actions for: {{ object }}{% endblocktrans %}</h3>
{% endif %}
{% else %}
<h3>}{% trans "Actions" %}</h3>
{% endif %}
<ul class="navigation">
{% with "true" as as_li %}
{% include "generic_navigation.html" %}
{% endwith %}
</ul>
</div>
{% endif %}
{% get_object_navigation_links "sidebar" as object_navigation_links %}
{% if object_navigation_links %}
<div class="block">
<h3>{% trans "Other available actions" %}</h3>
<ul class="navigation">
{% with "true" as as_li %}
{% include "generic_navigation.html" %}
{% endwith %}
</ul>
</div>
{% endif %}
{% get_sidebar_templates as sidebar_templates %}
{% for template in sidebar_templates %}
{% with "true" as side_bar %}
{% include template %}
{% endwith %}
{% endfor %}
{% block sidebar %}{% endblock %}
{% endblock %}
{% block web_theme_messages %}{% block messages %}{% endblock %}{% endblock %}
{% block web_theme_content %}{% block content %}{% endblock %}{% endblock %}
{% block web_theme_footer %}{% block footer %}{% endblock %}{% endblock %}