Files
mayan-edms/mayan/apps/appearance/templates/appearance/base.html
2015-07-17 02:04:01 -04:00

415 lines
19 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 common_tags %}
{% load navigation_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 %}{% block title %}{% endblock %}</title>
{% compress 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/css/flatly.min.css' %}" media="screen" rel="stylesheet" type="text/css" />
<link href="{% static 'appearance/packages/animate/animate.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">
@font-face {
font-family: 'IM Fell English SC';
font-style: normal;
font-weight: normal;
src:
local('IM FELL English SC'),
local('IM_FELL_English_SC'),
url('{% static "appearance/fonts/IM_Fell_English_SC.eot?#iefix" %}') format('embedded-opentype'),
url('{% static "appearance/fonts/IM_Fell_English_SC.woff" %}') format('woff'),
url('{% static "appearance/fonts/IM_Fell_English_SC.svg#IMFellEnglishSC" %}') format('svg'),
url('{% static "appearance/fonts/IM_Fell_English_SC.ttf" %}') format('truetype');
}
/* Flatly fonts */
@font-face {
font-family: 'Lato';
font-style: normal;
font-weight: 400;
src:
local('Lato Regular'),
local('Lato-Regular'),
url('{% static "appearance/fonts/Lato_400.eot?#iefix" %}') format('embedded-opentype'),
url('{% static "appearance/fonts/Lato_400.woff" %}') format('woff'),
url('{% static "appearance/fonts/Lato_400.svg#Lato" %}') format('svg'),
url('{% static "appearance/fonts/Lato_400.ttf" %}') format('truetype');
}
@font-face {
font-family: 'Lato';
font-style: normal;
font-weight: 700;
src:
local('Lato Bold'),
local('Lato-Bold'),
url('{% static "appearance/fonts/Lato_700.eot?#iefix" %}') format('embedded-opentype'),
url('{% static "appearance/fonts/Lato_700.woff" %}') format('woff'),
url('{% static "appearance/fonts/Lato_700.svg#Lato" %}') format('svg'),
url('{% static "appearance/fonts/Lato_700.ttf" %}') format('truetype');
}
@font-face {
font-family: 'Lato';
font-style: italic;
font-weight: 400;
src:
local('Lato Italic'),
local('Lato-Italic'),
url('{% static "appearance/fonts/Lato_400italic.eot?#iefix" %}') format('embedded-opentype'),
url('{% static "appearance/fonts/Lato_400italic.woff" %}') format('woff'),
url('{% static "appearance/fonts/Lato_400italic.svg#Lato" %}') format('svg'),
url('{% static "appearance/fonts/Lato_400italic.ttf" %}') format('truetype');
}
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;
}
.label-tag {
text-shadow: 0px 0px 2px #000
}
.fancybox-nav span {
visibility: visible;
}
hr {
margin-top: 5px;
margin-bottom: 11px;
}
.btn-block {
margin-bottom: 15px;
white-space: normal;
min-height: 120px;
padding-top: 20px;
padding-bottom: 1px;
}
.btn-block .fa {
text-shadow: 1px 1px 1px rgba(0, 0, 0, 0.3);
}
.btn-block {
text-shadow: 1px 1px 1px rgba(0, 0, 0, 0.3);
}
</style>
{% block stylesheets %}{% endblock %}
{% endcompress %}
</head>
<body>
{% if appearance_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>
{# TODO: don't use hardcoded main:home use settings.LOGIN_REDIRECT_URL #}
<a class="navbar-brand" href="{% url 'common: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_set in menu_links %}
{% for link in link_set %}
{% 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 %}
{% 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="animated fadeInDown alert alert-dismissible alert-{% if message.tags == 'error' %}danger{% else %}{{ message.tags }}{% endif %}">
<button type="button" class="close">×</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_menus_links names='object menu,sidebar menu,secondary menu' 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 %}
{% for object_navigation_links in form_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 %}
{% endfor %}
{% 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.4.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 {
image.parent().parent().html('<span class="fa-stack fa-lg"><i class="fa fa-file-o fa-stack-2x"></i><i class="fa fa-times fa-stack-1x text-danger"></i></span>');
set_image_noninteractive(image);
}
})
.fail(function() {
image.parent().parent().html('<span class="fa-stack fa-lg"><i class="fa fa-file-o fa-stack-2x"></i><i class="fa fa-times fa-stack-1x text-danger"></i></span>');
set_image_noninteractive(image);
})
}
function dismissAlert(element) {
element.addClass('fadeOutUp').fadeOut('slow');
}
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);
},
});
$('th input:checkbox').click(function(e) {
var table = $(e.target).closest('table');
var checked = $(e.target).prop('checked');
$('td input:checkbox', table).prop('checked', checked);
});
$('.alert button.close').click(function() {
dismissAlert($(this).parent());
});
setTimeout(function() {
$('.alert-success').each(function() {
dismissAlert($(this));
});
}, 3000);
});
</script>
{% block javascript %}{% endblock %}
{% endcompress %}
</body>
</html>