Make the public html pages valid xhtml, and validate more RDFa cases.
[htsworkflow.git] / htsworkflow / frontend / templates / base.html
index 5899e5929b348681d43395963f558b6cd4109ba5..f8899df9e453177629b945e9ff598ecd8edfa5ab 100644 (file)
@@ -1,39 +1,62 @@
-<!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="{{ LANGUAGE_CODE }}" xml:lang="{{ LANGUAGE_CODE }}" {% if LANGUAGE_BIDI %}dir="rtl"{% endif %}>
+{% load i18n %}<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML+RDFa 1.0//EN"
+    "http://www.w3.org/MarkUp/DTD/xhtml-rdfa-1.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml"
+      version="XHTML+RDFa 1.0"
+      xmlns:xml="http://www.w3.org/XML/1998/namespace"
+      xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
+      xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#"
+      xmlns:dc="http://purl.org/dc/elements/1.1/"
+      xmlns:xsd="http://www.w3.org/2001/XMLSchema#"
+      xmlns:libns="http://jumpgate.caltech.edu/wiki/LibraryOntology#"
+      xmlns:invns="http://jumpgate.caltech.edu/wiki/InventoryOntology#"
+      xml:lang="en"
+>
+<!--base.html-->
 <head>
-<title>{% block title %}{% endblock %}</title>
-<link rel="stylesheet" type="text/css" href="{% block stylesheet %}{% load adminmedia %}{% admin_media_prefix %}css/base.css{% endblock %}" />
-{% if LANGUAGE_BIDI %}<link rel="stylesheet" type="text/css" href="{% block stylesheet_rtl %}{% admin_media_prefix %}css/rtl.css{% endblock %}" />{% endif %}
-{% block extrastyle %}{% endblock %}
-{% block extrahead %}{% endblock %}
-{% block blockbots %}<meta name="robots" content="NONE,NOARCHIVE" />{% endblock %}
-</head>
-{% load i18n %}
+    <title>{% block title %}{{ app_name }} - {{ page_name }}{% endblock %}</title>
 
-<body class="{% if is_popup %}popup {% endif %}{% block bodyclass %}{% endblock %}">
+{% block additional_css %}
+    {% load adminmedia %}
+    {% if LANGUAGE_BIDI %}<link rel="stylesheet" type="text/css" href="{% block stylesheet_rtl %}{% admin_media_prefix %}css/rtl.css{% endblock %}" />{% endif %}
+    {% block extrastyle %}{% endblock %}
+    {% block extrahead %}{% endblock %}
+    {% block blockbots %}<meta name="robots" content="NONE,NOARCHIVE" />{% endblock %}
+    <link rel="stylesheet" type="text/css" href="{{ MEDIA_URL }}css/data-browse-index.css" />
+{% endblock %}
 
+</head>
+<body>
 <!-- Container -->
-<div id="container">
-
     {% if not is_popup %}
-    <!-- Header -->
+
     <div id="header">
         <div id="branding">
         {% block branding %}{% endblock %}
         </div>
-        {% if user.is_authenticated and user.is_staff %}
-        <div id="user-tools">{% trans 'Welcome,' %} <strong>{% firstof user.first_name user.username %}</strong>. {% block userlinks %}{% url django-admindocs-docroot as docsroot %}{% if docsroot %}<a href="{{ docsroot }}">{% trans 'Documentation' %}</a> / {% endif %}<a href="{{ root_path }}password_change/">{% trans 'Change password' %}</a> / <a href="{{ root_path }}logout/">{% trans 'Log out' %}</a>{% endblock %} 
-        </div>
+        <div id="user-tools">
+        {% if user.is_authenticated %}
+        {% trans 'Welcome,' %}
+        <strong>{% firstof user.first_name user.username %}</strong>.
+        {% block userlinks %}
+            {% url django-admindocs-docroot as docsroot %}
+            {% if docsroot %}
+                <a href="{{ docsroot }}">{% trans 'Documentation' %}</a> /
+            {% endif %}
+            <a href="{{root_path}}/accounts/password_change/">{% trans 'Change password' %}</a> /
+            <a href="{{root_path}}/accounts/logout/">{% trans 'Log out' %}</a>
+        {% endblock %}
+        {% else %}
+            <a href="{{root_path}}/accounts/login/?next={{thispage}}">{% trans 'Log in' %}</a>
         {% endif %}
+        </div>
         {% block nav-global %}{% endblock %}
     </div>
-    <!-- END Header -->
-    {% block breadcrumbs %}<div class="breadcrumbs"><a href="/">{% trans 'Home' %}</a>{% if title %} &rsaquo; {{ title }}{% endif %}</div>{% endblock %}
     {% endif %}
-
-        {% if messages %}
+    {% block breadcrumbs %}{% endblock %}
+    {% if messages %}
         <ul class="messagelist">{% for message in messages %}<li>{{ message }}</li>{% endfor %}</ul>
-        {% endif %}
+    {% endif %}
 
     <!-- Content -->
     <div id="content" class="{% block coltype %}colM{% endblock %}">
         {{ content }}
         {% endblock %}
         {% block sidebar %}{% endblock %}
-        <br class="clear" />
     </div>
     <!-- END Content -->
 
     {% block footer %}<div id="footer"></div>{% endblock %}
-</div>
 <!-- END Container -->
-
 </body>
 </html>