Skip to content
Snippets Groups Projects
Commit 9f27f8a4 authored by Vermaat's avatar Vermaat
Browse files

Last fixes for Jinja2 (removing TAL dependency)

parent 7dc49f37
No related branches found
No related tags found
No related merge requests found
{% extends "base.html" %} {% extends "base.html" %}
{% set active_page = "batch-jobs" %} {% if batchType == "NameChecker" %}
{% set active_page = "batch-name-checker" %}
{% elif batchType == "SyntaxChecker" %}
{% set active_page = "batch-syntax-checker" %}
{% elif batchType == "PositionConverter" %}
{% set active_page = "batch-position-converter" %}
{% elif batchType == "SnpConverter" %}
{% set active_page = "batch-snp-converter" %}
{% else %}
{% set active_page = "batch-jobs" %}
{% endif %}
{% set page_title = "Batch {{ batchType|e }} Interface" %} {% set page_title = "Batch {{ batchType|e }} Interface" %}
{% block content %} {% block content %}
......
<html>
<head>
<link rel="shortcut icon"
href="static/images/favicon.ico"
type="image/x-icon">
<link rel="stylesheet"
type="text/css"
href="static/css/style.css">
<script
type="text/javascript"
language="javascript"
src="static/js/interface.js">
</script>
<script
type="text/javascript"
language="javascript"
src="static/js/generator.js">
</script>
<meta http-equiv="Content-Type"
content="text/html; charset=iso-8859-1">
<title tal:content = "structure string:Mutalyzer ${version}"></title>
</head>
<body
style="background-image: url('static/images/background.gif');
background-repeat: repeat-y;"
leftmargin="0"
topmargin="0"
marginwidth="0"
marginheight="0">
<!-- Header -->
<a id = "top" name = "top"></a>
<table width="98%"
border="0"
cellspacing="0"
cellpadding="0">
<tr>
<!-- Corner logo -->
<td rowspan="2"
valign="bottom"
width="180">
<a href="index"
target="_top"><img
src="static/images/mutalyzer_logo_bw.png" width="180" height="112"
alt="Rauzy fractal" border="0" hspace="0" vspace="0"></a></td>
<td valign="top"
bgcolor="#FFFFFF"
width="20"><img
src="static/images/1x1b.gif" height="1" width="20" border="0">
</td>
<td align="left"
valign="bottom"
bgcolor="White"
width="98%">
<!-- Banner -->
<center>
<a href="index"><img
src="static/images/mutalyzer_logo.png"
width="90%"
height="90"
alt="Rauzy color fractal"
border="0"></a>
</center>
</td>
</tr>
<tr>
<td>
</td>
<td>
<table width = "100%" style = "padding:0; border:0; margin:0">
<tr>
<td align="left">
<a href="javascript:history.back(-1);"
class="hornav">previous page</a>&nbsp;&nbsp;&nbsp;
</td>
<td align="right">
<a href="index"
class="hornav">home</a>&nbsp;&nbsp;&nbsp;
<a href="about"
class="hornav">about</a>&nbsp;&nbsp;&nbsp;
<a tal:attributes = "href string:mailto:${contactEmail}"
class="hornav">contact</a>&nbsp;&nbsp;&nbsp;
<a href="#bottom" class="hornav">go to bottom</a>&nbsp;&nbsp;&nbsp;
</td>
</tr>
</table>
</td>
</tr>
<tr>
<td colspan="3"
bgcolor="#000000"><img
src="static/images/1x1b.gif"
height="1"
border="0"></td>
</tr>
</table>
<table width="98%"
border="0"
cellspacing="0"
cellpadding="0">
<tr>
<td width="180" valign="top">
<table id="menu" width="180" border="0" cellspacing="0" cellpadding="0">
<tr>
<td valign="top" width="20">
<img src="static/images/1x1b.gif" height="19" border="0">
</td>
</tr>
<tr tal:attributes="class active/index">
<td valign="top" width="20" class="bullet"></td>
<td colspan="3">
<a href="index">Home</a>
</td>
</tr>
<tr tal:attributes="class active/check">
<td valign="top" width="20" class="bullet"></td>
<td colspan="3">
<a href="check">Name Checker</a>
</td>
</tr>
<tr tal:attributes="class active/parse">
<td valign="top" width="20" class="bullet"></td>
<td colspan="3">
<a href="syntaxCheck">Syntax Checker</a>
</td>
</tr>
<tr tal:attributes="class active/converter">
<td valign="top" width="20" class="bullet"></td>
<td colspan="3">
<a href="positionConverter">Position Converter</a>
</td>
</tr>
<tr tal:attributes="class active/snp">
<td valign="top" width="20" class="bullet"></td>
<td colspan="3">
<a href="snp">SNP Converter</a>
</td>
</tr>
<tr tal:attributes="class active/nameGenerator">
<td valign="top" width="20" class="bullet"></td>
<td colspan="3">
<a href="nameGenerator">Name Generator</a>
</td>
</tr>
<tr tal:attributes="class active/descriptionExtract">
<td valign="top" width="20" class="bullet"></td>
<td colspan="3">
<a href="descriptionExtract">Description Extractor</a>
</td>
</tr>
<tr tal:attributes="class active/gbupload">
<td valign="top" width="20" class="bullet"></td>
<td colspan="3">
<a href="upload">Reference File Loader</a>
</td>
</tr>
<tr tal:attributes="class active/batch">
<td valign="top" width="20" class="bullet"></td>
<td colspan="3">
<a href="batch">Batch Jobs</a>
</td>
</tr>
<tr tal:attributes="class active/batchNameChecker">
<td></td>
<td valign="baseline" width="10" class="bullet sub"></td>
<td colspan="2">
<a href="batchNameChecker">Name Checker</a>
</td>
</tr>
<tr tal:attributes="class active/batchSyntaxChecker">
<td></td>
<td valign="baseline" width="10" class="bullet sub"></td>
<td colspan="2">
<a href="batchSyntaxChecker">Syntax Checker</a>
</td>
</tr>
<tr tal:attributes="class active/batchPositionConverter">
<td></td>
<td valign="baseline" width="10" class="bullet sub"></td>
<td colspan="2">
<a href="batchPositionConverter">Position Converter</a>
</td>
</tr>
<tr tal:attributes="class active/batchSnpConverter">
<td></td>
<td valign="baseline" width="10" class="bullet sub"></td>
<td colspan="2">
<a href="batchSnpConverter">SNP Converter</a>
</td>
</tr>
<tr tal:attributes="class active/webservices">
<td valign="top" width="20" class="bullet"></td>
<td colspan="3">
<a href="webservices">Web services</a>
</td>
</tr>
<tr><td>&nbsp;</td></tr>
<tr tal:attributes="class active/help">
<td valign="top" width="20" class="bullet"></td>
<td colspan="3">
<a href="https://humgenprojects.lumc.nl/trac/mutalyzer/wiki/MutalyzerDocumentation">Documentation</a>
</td>
</tr>
<tr tal:attributes="class active/faq">
<td valign="top" width="20" class="bullet"></td>
<td colspan="3">
<a href="https://humgenprojects.lumc.nl/trac/mutalyzer/wiki/MutalyzerFaq">FAQ</a>
</td>
</tr>
<tr tal:attributes="class active/exercise">
<td valign="top" width="20" class="bullet"></td>
<td colspan="3">
<a href="https://humgenprojects.lumc.nl/trac/mutalyzer/wiki/MutalyzerExercise">Exercise</a>
</td>
</tr>
<tr tal:attributes="class active/disclaimer">
<td valign="top" width="20" class="bullet"></td>
<td colspan="3">
<a href="https://humgenprojects.lumc.nl/trac/mutalyzer/wiki/MutalyzerDisclaimer">Disclaimer</a>
</td>
</tr>
<tr class="menu">
<td valign="top" width="20" class="bullet"></td>
<td colspan="3">
<a href="https://humgenprojects.lumc.nl/trac/mutalyzer">Feedback</a>
</td>
</tr>
<tr><td>&nbsp;</td></tr>
<tr class="menu inactive">
<td valign="top" width="20" class="bullet"></td>
<td colspan="3">
External Links
</td>
</tr>
<tr class="menu">
<td></td>
<td valign="baseline" width="10" class="bullet sub"></td>
<td colspan="2">
<a href="http://www.genenames.org/guidelines.html"
>Human Gene Nomenclature</a>
</td>
</tr>
<tr class="menu">
<td></td>
<td valign="baseline" width="10" class="bullet sub"></td>
<td colspan="2">
<a href="http://www.hgvs.org/mutnomen/"
>HGVS Variation Nomenclature</a>
</td>
</tr>
<tr class="menu">
<td></td>
<td valign="baseline" width="10" class="bullet sub"></td>
<td colspan="2">
<a href="http://dx.doi.org/10.1002/humu.21427"
>HGVS Nomenclature Extension Proposal</a>
</td>
</tr>
<tr class="menu">
<td></td>
<td valign="baseline" width="10" class="bullet sub"></td>
<td colspan="2">
<a href="http://www.lovd.nl/">LOVD</a>
</td>
</tr>
<tr>
<td width="20"><img
src="static/images/1x1b.gif"
height="10"
width="20"
border="0">
</td>
<td width="12"><img
src="static/images/1x1b.gif"
height="10"
width="10"
border="0">
</td>
<td valign="top" width="12"><img
src="static/images/1x1b.gif"
height="10"
width="10"
border="0">
</td>
<td valign="top" width="136"><img
src="static/images/1x1b.gif"
height="10"
width="136"
border="0">
</td>
</tr>
</table>
</td>
<td width="20"><img
src="static/images/1x1b.gif"
height="1"
width="20"
border="0">
</td>
<td width="98%" valign="top"><br>
<!-- Content -->
<table cellpadding="0" cellspacing="0" width="100%" border="0">
<tbody><tr>
<td width="0"></td>
<td width="0">
<center>
<h2 tal:condition = "release"
tal:content = "structure string:Mutalyzer ${version}<br>
<small><small><small><small>
released on ${releaseDate}
</small></small></small></small>"></h2>
<h2 tal:condition = "not:release"
tal:content = "structure string:Mutalyzer ${version}<br>
<small><small><small><small>
development version
</small></small></small></small>"></h2>
HGVS nomenclature version
<span tal:content = "nomenclatureVersion"></span>
</center>
<p>
<div metal:use-macro = "sitemacros/macros/content"></div>
<!-- Navigation bar -->
<table border="0"
cellspacing="0"
cellpadding="0"
width="100%"
align="center">
<tr>
<td colspan="2"><img
src="static/images/1x1b.gif"
width="1"
height="20"
border="0">
</td>
</tr>
<tr>
<td bgcolor="#000000" colspan="3"><img
src="static/images/1x1b.gif"
width="100%"
height="1"
border="0"></td>
</tr>
<tr>
<td align="left">
&nbsp;<a href="javascript:history.back(-1);"
class="hornav">previous page</a>
</td>
<td align="middle">
<img src = "static/images/LUMC_24x24.png" align = "middle">
&nbsp; &copy; <tal tal:replace = "copyrightYears/0"></tal>-<tal tal:replace = "copyrightYears/1"></tal>
<a href = "http://www.lumc.nl">LUMC</a>
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp;
</td>
<td align="right">
<a href="#top" class="hornav">go to top</a>&nbsp;&nbsp;&nbsp;&nbsp;
</td>
</tr>
<tr>
<!--
<td colspan="2"
align="center">Last edited by: with /usr/bin/vim
</td>
-->
</tr>
<tr>
<td colspan="2"><img
src="static/images/1x1b.gif"
width="1"
height="10"
border="0">
</td>
</tr>
</table>
</td>
</tr>
</table>
<a id = "bottom" name = "bottom"></a>
<div tal:condition="piwik" tal:omit-tag="">
<!-- Piwik -->
<script type="text/javascript" tal:content="string:
var pkBaseURL = &quot;${piwikBase}/&quot;;
document.write(unescape(&quot;%3Cscript src='&quot; + pkBaseURL + &quot;piwik.js' type='text/javascript'%3E%3C/script%3E&quot;));
"></script><script type="text/javascript" tal:content="string:
try {
var piwikTracker = Piwik.getTracker(pkBaseURL + &quot;piwik.php&quot;, ${piwikSite});
piwikTracker.trackPageView();
piwikTracker.enableLinkTracking();
} catch( err ) {}
"></script><noscript><p><img tal:attributes="src string:${piwikBase}/piwik.php?idsite=${piwikSite}" style="border:0" alt="" /></p></noscript>
<!-- End Piwik Tracking Code -->
</div>
</body>
</html>
<html>
<head>
<title></title>
</head>
<body>
<div metal:define-macro="content">
<center>
<h3>Skeleton</h3>
</center>
Your text here.
</div>
</body>
</html>
...@@ -29,8 +29,6 @@ from web.contrib.template import render_jinja ...@@ -29,8 +29,6 @@ from web.contrib.template import render_jinja
from lxml import etree from lxml import etree
import pkg_resources import pkg_resources
from cStringIO import StringIO from cStringIO import StringIO
from simpletal import simpleTALES
from simpletal import simpleTAL
from spyne.server.http import HttpBase from spyne.server.http import HttpBase
import mutalyzer import mutalyzer
...@@ -191,6 +189,8 @@ render_ = render_tal(pkg_resources.resource_filename('mutalyzer', 'templates'), ...@@ -191,6 +189,8 @@ render_ = render_tal(pkg_resources.resource_filename('mutalyzer', 'templates'),
}) })
# Jinja2 template render # Jinja2 template render
# Todo: We rely on Apache to add a Content-Type header, we should actually
# set it ourselves.
render = render_jinja(pkg_resources.resource_filename('mutalyzer', 'templates'), render = render_jinja(pkg_resources.resource_filename('mutalyzer', 'templates'),
encoding='utf-8', encoding='utf-8',
globals = { globals = {
...@@ -913,7 +913,9 @@ class Check: ...@@ -913,7 +913,9 @@ class Check:
output.addMessage(__file__, -1, 'INFO', 'Finished variant %s' % name) output.addMessage(__file__, -1, 'INFO', 'Finished variant %s' % name)
return render.name_checker(args, prevent_caching=True) web.header('Cache-Control', 'no-cache')
web.header('Expires', '-1')
return render.name_checker(args)
#check #check
#Check #Check
...@@ -1189,10 +1191,7 @@ class BatchChecker: ...@@ -1189,10 +1191,7 @@ class BatchChecker:
} }
# Make sure the correct page is displayed for an entrypoint # Make sure the correct page is displayed for an entrypoint
if batchType: if not batchType:
page = 'batch' + batchType
else:
page = 'batch'
batchType = 'NameChecker' batchType = 'NameChecker'
if batchType in attr["batchTypes"]: if batchType in attr["batchTypes"]:
...@@ -1248,7 +1247,7 @@ class BatchChecker: ...@@ -1248,7 +1247,7 @@ class BatchChecker:
attr["errors"].extend(map(util.message_info, O.getMessages())) attr["errors"].extend(map(util.message_info, O.getMessages()))
return render.batch_jobs(attr, page=page) return render.batch_jobs(attr)
#batch #batch
#BatchChecker #BatchChecker
......
...@@ -20,4 +20,3 @@ WebTest==1.4.2 ...@@ -20,4 +20,3 @@ WebTest==1.4.2
cssselect==0.9.1 cssselect==0.9.1
Jinja2==2.7.1 Jinja2==2.7.1
-e git+https://github.com/mammadori/magic-python.git#egg=Magic_file_extensions -e git+https://github.com/mammadori/magic-python.git#egg=Magic_file_extensions
http://www.owlfish.com/software/simpleTAL/downloads/SimpleTAL-4.3.tar.gz
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment