Files
mayan-edms/mayan/apps/appearance/templates/appearance/base.html

333 lines
15 KiB
HTML
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
{% load i18n %}
{% load static %}
{% load compress %}
{% load navigation_tags %}
{% load project_tags %}
{% load settings %}
{% load variable_tags %}
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="en">
<head>
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no" name="viewport">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta http-equiv="Content-Language" content="{{ LANGUAGE_CODE }}" />
<title>{% block project_name %}{% project_name %}{% endblock %}{{ request.new_window_url }}{% block title %}{% endblock %}</title>
{% if new_window_url %}
<script type="text/javascript">
window.open('{{ new_window_url|safe }}','{{ new_window_url_name|default:"_blank" }}','toolbar=1,scrollbars=1,location=1,status=1,menubar=1,resizable=1');
</script>
<noscript>
<META HTTP-EQUIV="refresh" CONTENT="{{ new_window_url_timeout|default:'2' }};{{ new_window_url|safe }}">
</noscript>
{% endif %}
{% compress css %}
<link href="http://fonts.googleapis.com/css?family=IM+Fell+English+SC" rel="stylesheet" type="text/css">
<link href="{% static 'appearance/packages/font-awesome-4.3.0/css/font-awesome.min.css' %}" media="screen" rel="stylesheet" type="text/css" />
<link href="{% static 'appearance/packages/bootstrap-3.3.4-dist/css/bootstrap.min.css' %}" media="screen" rel="stylesheet" type="text/css" />
<link href="{% static 'appearance/packages/bootstrap-3.3.4-dist/css/bootstrap.min.css' %}" media="screen" rel="stylesheet" type="text/css" />
<link href="{% static 'appearance/css/flatly.min.css' %}" media="screen" rel="stylesheet" type="text/css" />
<link href="{% static 'appearance/packages/fancyBox-master/source/jquery.fancybox.css' %}" media="screen" rel="stylesheet" type="text/css" />
<style type="text/css">
body {
padding-top: 70px;
}
.navbar-brand {
font-family: "IM Fell English SC", serif;
}
#fancybox-left-ico {
left: 20px;
}
#fancybox-right-ico {
right: 20px;
left: auto;
}
.thin_border {
border: 1px solid black;
}
.lazy-load-carousel-loaded {
width: 100%;
}
.mayan-page-wrapper-interactive {
overflow: auto;
}
#carousel-container {
overflow-x: scroll; height: 500px;
}
.carousel-item {
margin: 5px 10px 10px 10px
}
.carousel-item-page-number {
text-align: center;
}
.img-nolazyload {
border: 1px solid black;
}
.document-page-content-divider {
text-align: center;
}
</style>
{% block stylesheets %}{% endblock %}
{% endcompress %}
</head>
<body>
{% if web_theme_view_type == 'plain' %}
{% block content_plain %}{% endblock %}
{% else %}
<nav class="navbar navbar-default navbar-fixed-top">
<div class="container">
<div class="navbar-header">
<button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#navbar" aria-expanded="false" aria-controls="navbar">
<span class="sr-only">{% trans 'Toggle navigation' %}</span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
<a class="navbar-brand" href="{% url 'main:home' %}">{% project_name %}{% if debug %} <i class="fa fa-bug"></i>{% endif %}</a>
</div>
<div id="navbar" class="navbar-collapse collapse">
<ul class="nav navbar-nav">
{% get_menu_links 'main menu' as menu_links %}
{% for link in menu_links %}
{% with 'true' as as_li %}
{% with 'true' as hide_active_anchor %}
{% with 'active' as li_class_active %}
{% with 'first' as li_class_first %}
{% with ' ' as link_classes %}
{% include 'navigation/generic_subnavigation.html' %}
{% endwith %}
{% endwith %}
{% endwith %}
{% endwith %}
{% endwith %}
{% endfor %}
</ul>
<ul class="nav navbar-nav navbar-right">
{% if not user.is_authenticated %}
{% trans 'Anonymous' %}
{% else %}
<li><a href="{% url 'common:current_user_details' %}" title="{% trans 'User details' %}">{{ user.get_full_name|default:user }} <i class="fa fa-user"></i></a></li>
{% endif %}
</ul>
</div>
</div>
</nav>
<div class="container">
<div class="row">
<div class="col-xs-12">
{% for message in messages %}
<div class="alert alert-dismissible alert-{% if message.tags == 'error' %}danger{% else %}{{ message.tags }}{% endif %}">
<button type="button" class="close" data-dismiss="alert">×</button>
<h4>{% if 'success' in message.tags %}{% trans 'Success' %}{% elif 'info' in message.tags %}{% trans 'Information' %}{% elif 'warning' in message.tags %}{% trans 'Warning' %}{% else %}{% trans 'Error' %}{% endif %}</h4>
<p>{{ message }}</p>
</div>
{% endfor %}
{% block messages %}{% endblock %}
</div>
</div>
{% get_action_links as links %}
{% get_menu_links 'object facet' as form_navigation_links %}
<div class="row">
{% if links or form_navigation_links %}
<div class="col-xs-8 col-sm-8 col-md-10 col-lg-10">
{% else %}
<div class="col-xs-12">
{% endif %}
{% block content %}{% endblock %}
{% block footer %}{% endblock %}
</div>
{% if links or form_navigation_links %}
<div class="col-xs-4 col-sm-2 col-md-2 col-lg-2">
{% endif %}
{% if links %}
<div class="pull-right btn-group" style="margin-bottom: 10px;">
<button aria-expanded="true" type="button" class="btn btn-danger btn-sm dropdown-toggle" data-toggle="dropdown">
{% trans 'Actions' %}
<span class="sr-only">{% trans 'Toggle Dropdown' %}</span>
</button>
<ul class="dropdown-menu" role="menu">
{% for links_set in links %}
{% for entry in links_set %}
<li><a class="btn-sm" href="{{ entry.url }}">{{ entry.text }}</a></li>
{% endfor %}
{% if not forloop.last and links_set %}
<li class="divider"></li>
{% endif %}
{% endfor %}
</ul>
</div>
<div class="clearfix visible-xs-block visible-sm-block visible-md-block visible-lg-block"></div>
{% endif %}
{% if form_navigation_links %}
<div class="pull-right list-group">
{% if form_navigation_links %}
{% with form_navigation_links as object_navigation_links %}
{% with 'true' as hide_active_anchor %}
{% with 'active' as link_class_active %}
{% with 'list-group-item btn-sm' as link_classes %}
{% include 'navigation/generic_navigation.html' %}
{% endwith %}
{% endwith %}
{% endwith %}
{% endwith %}
{% endif %}
</div>
{% endif %}
{% if links or form_navigation_links %}
</div>
{% endif %}
</div>
</div>
{% endif %}
<!-- HTML5 shim and Respond.js for IE8 support of HTML5 elements and media queries -->
<!--[if lt IE 9]>
<script src="https://oss.maxcdn.com/html5shiv/3.7.2/html5shiv.min.js"></script>
<script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script>
<![endif]-->
{% compress js %}
<script type="text/javascript" src="{% static 'appearance/packages/jquery-2.1.1.min.js' %}"></script>
<script type="text/javascript" src="{% static 'appearance/packages/bootstrap-3.3.4-dist/js/bootstrap.min.js' %}"></script>
<script type="text/javascript" src="{% static 'appearance/packages/jquery.scrollview.js' %}"></script>
<script type="text/javascript" src="{% static 'appearance/packages/jquery_lazyload-master/jquery.lazyload.min.js' %}"></script>
<script type="text/javascript" src="{% static 'appearance/packages/fancyBox-master/source/jquery.fancybox.pack.js' %}"></script>
<script type="text/javascript" src="{% static 'appearance/packages/fancyBox-master/lib/jquery.mousewheel.pack.js' %}"></script>
<script type="text/javascript">
'use strict';
function resizeFullHeight() {
$('.full-height').height($(window).height() - $('.full-height').data('heightDifference'));
}
function set_image_noninteractive(image) {
// Remove border to indicate non interactive image
image.removeClass('thin_border');
container = image.parent().parent();
// Save img HTML
html = image.parent().html();
// Remove anchor
image.parent().remove();
// Place again img
container.html(html);
}
function load_document_image(image) {
$.get( image.attr('data-src'), function(result) {
if (result.status == 'success') {
image.attr('src', result.data);
image.addClass(image.attr('data-post-load-class'));
} else if (result.detail == 'unknown_file_format') {
image.attr('src', "{% static 'images/mimetypes/unknown.png' %}");
set_image_noninteractive(image);
} else {
image.attr('src', "{% static 'images/mimetypes/error.png' %}");
set_image_noninteractive(image);
}
})
.fail(function() {
image.attr('src', "{% static 'images/mimetypes/error.png' %}");
set_image_noninteractive(image);
})
}
jQuery(document).ready(function() {
resizeFullHeight();
$(window).resize(function() {
resizeFullHeight();
});
$('.scrollable').scrollview();
$('a.fancybox').fancybox({
openEffect : 'elastic',
closeEffect : 'elastic',
prevEffect : 'none',
nextEffect : 'none',
titleShow : true,
type : 'image',
autoResize : true,
});
$('a.fancybox-staging').click(function(e) {
var $this = $(this);
$.get($this.attr('href'), function( result ) {
if (result.status == 'success') {
$.fancybox.open([
{
href : result.data,
title : $this.attr('title'),
openEffect : 'elastic',
closeEffect : 'elastic',
prevEffect : 'none',
nextEffect : 'none',
titleShow : true,
type : 'image',
autoResize : true,
},
]);
}
})
e.preventDefault();
})
$('img.lazy-load').lazyload({
appear: function(elements_left, settings) {
load_document_image($(this));
},
});
$('img.lazy-load-carousel').lazyload({
threshold : 400,
container: $("#carousel-container"),
appear: function(elements_left, settings) {
var $this = $(this);
$this.removeClass('lazy-load-carousel');
load_document_image($this);
},
});
$('img.lazy-load-interactive').lazyload({
appear: function(elements_left, settings) {
load_document_image($(this));
}
});
});
</script>
{% block javascript %}{% endblock %}
{% endcompress %}
</body>
</html>