Commit 3d3d51e1 authored by LE GAC Renaud's avatar LE GAC Renaud
Browse files

Add About and licence stuff.

parent 1f35416f
""" Main Controller to run the application with the user privileges.
"""
import os
def about():
fn = os.path.join("applications",
request.application,
"static",
"ABOUT.html")
return open(fn, 'rb').read()
def index():
session.role = ''
return LOAD('plugin_dbui', 'index', vars=request.vars)
def licence():
fn = os.path.join("applications",
request.application,
"static",
"LICENSE_FR.html")
return open(fn, 'rb').read()
def user():
"""exposes:
http://..../[app]/default/user/login
......@@ -27,7 +45,7 @@ def schema():
""" expose http://.../default/schema and display the database schema.
"""
return IMG(_src=URL("static", "database.png"), _width="99%")
return IMG(_src=URL("static", "database.png"), _height="99%")
def versions():
......
......@@ -5,6 +5,7 @@
'%Y-%m-%d %H:%M:%S': '%Y-%m-%d %H:%M:%S',
"'et al.' in authors": "'et al.' dans les authors",
'Abbreviation': 'Abréviation',
'about': 'à propos',
'ACL': 'ACL',
'ACLN': 'ACLN',
'ACTI': 'ACTI',
......@@ -175,6 +176,7 @@
'Level 3': 'Niveau 3',
'Level 4': 'Niveau 4',
'levels': 'niveaux',
'licence': 'license',
'Lignes': 'Lignes',
'List': 'Liste',
'List of authors belonging to CPPM, separated by comma: P.-Y. Doe, J. Smith': 'List of authors belonging to CPPM, separated by comma: P.-Y. Doe, J. Smith',
......
......@@ -68,30 +68,32 @@ if session.role in ('admin', 'user'):
#
# help node
#
schemaNode = dbui.Panel(autoLoad=URL('default', 'schema'))
versionNode = dbui.Panel(autoLoad=URL('default', 'versions'))
aboutLeaf = dbui.Panel(autoLoad=URL('default', 'about'), autoScroll=True)
schemaLeaf = dbui.Panel(autoLoad=URL('default', 'schema'), autoScroll=True)
versionLeaf = dbui.Panel(autoLoad=URL('default', 'versions'))
helpNode = dbui.Node(T('Help'))
helpNode.add_child(T('versions'), versionNode)
helpNode.add_child(T('about'), aboutLeaf)
helpNode.add_child(T('versions'), versionLeaf)
if session.role == 'admin':
helpNode.add_child(T('database schema'), schemaNode)
helpNode.add_child(T('database schema'), schemaLeaf)
helpNode.sort_children()
#
# report node
#
listNode = dbui.to_panelWithUrlSelector(virtdb.list_selector,
listLeaf = dbui.to_panelWithUrlSelector(virtdb.list_selector,
baseUrl=URL('lists', 'index'),
isMathJax=dbui.is_mathjax())
metricNode = dbui.to_panelWithUrlSelector(virtdb.metric_selector,
metricLeaf = dbui.to_panelWithUrlSelector(virtdb.metric_selector,
baseUrl=URL('metrics', 'index'))
reportNode = dbui.Node(T('Reports'))
reportNode.add_child(T('lists'), listNode)
reportNode.add_child(T('metrics'), metricNode)
reportNode.add_child(T('lists'), listLeaf)
reportNode.add_child(T('metrics'), metricLeaf)
reportNode.sort_children()
......@@ -99,37 +101,37 @@ reportNode.sort_children()
# wizard node
#
if session.role in ('admin', 'user'):
authorNode = dbui.to_panelWithUrlSelector(virtdb.authors_selector,
authorLeaf = dbui.to_panelWithUrlSelector(virtdb.authors_selector,
baseUrl=URL('wizards', 'extract_authors'))
freeNode = dbui.to_panelWithUrlSelector(virtdb.free_harvester_selector,
freeLeaf = dbui.to_panelWithUrlSelector(virtdb.free_harvester_selector,
baseUrl=URL('harvest', 'free_run'),
timeout=3600)
checkNode = dbui.to_panelWithUrlSelector(virtdb.check_selector,
checkLeaf = dbui.to_panelWithUrlSelector(virtdb.check_selector,
baseUrl=URL('wizards', 'check_validate'))
harvesterNode = dbui.to_panelWithUrlSelector(virtdb.harvester_selector,
harvesterLeaf = dbui.to_panelWithUrlSelector(virtdb.harvester_selector,
baseUrl=URL('harvest', 'run'),
timeout=3600)
marc12Node = dbui.to_panelWithUrlSelector(virtdb.marc12_selector,
marc12Leaf = dbui.to_panelWithUrlSelector(virtdb.marc12_selector,
baseUrl=URL('harvest', 'insert_marcxml'))
runAllNode = dbui.to_panelWithUrlSelector(virtdb.run_all_harvesters_selector,
runAllLeaf = dbui.to_panelWithUrlSelector(virtdb.run_all_harvesters_selector,
baseUrl=URL('harvest', 'run_all'),
timeout=3600)
wizardNode = dbui.Node(T('Wizards'))
wizardNode.add_child(T('insert MARCXML'), marc12Node)
wizardNode.add_child(T('run a free harvester'), freeNode)
wizardNode.add_child(T('insert MARCXML'), marc12Leaf)
wizardNode.add_child(T('run a free harvester'), freeLeaf)
if session.role == 'admin':
wizardNode.add_child(T('check and validate'), checkNode)
wizardNode.add_child(T('extract authors'), authorNode)
wizardNode.add_child(T('run a harvester'), harvesterNode)
wizardNode.add_child(T('run all harvester'), runAllNode)
wizardNode.add_child(T('check and validate'), checkLeaf)
wizardNode.add_child(T('extract authors'), authorLeaf)
wizardNode.add_child(T('run a harvester'), harvesterLeaf)
wizardNode.add_child(T('run all harvester'), runAllLeaf)
wizardNode.sort_children()
......
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<style type="text/css">
.my-h2,
.my-li,
.my-p,
.my-ul {font-family: Liberation Sherif, Sherif;
font-size: 11px;
list-style-type: none;}
.my-h2 {font-family: Liberation Sans, Sans;
margin-bottom: 2ex;
margin-left: 3%;
margin-top: 3ex;}
.my-h3 {font-family: Liberation Sans, Sans;
margin-left: 3%;
margin-top: 3ex;}
.my-li {margin-left: 9%;
margin-right: 9%;
text-align: justify;}
.my-p {margin-left: 3%;
margin-right: 10%;
text-align: justify;}
.my-small-cap {font-variant: small-caps;}
</style>
</head>
<body>
<h2 class="my-h2 my-small-cap">Base de donnée des publications</h2>
<p class="my-p">Permet de recenser la production scientifique d'une organisation
composée d'équipes et de projets et d'en extraire des listes
ou des métriques. Aucun documents n'est stocké dans la base
de donnée.</p>
<h3 class="my-h3 my-small-cap">Composants logiciel open source</h3>
<p class="my-p">Ce logiciel s'appuit sur les logiciels open source suivant :</p>
<br>
<ul class="my-ul">
<li class="my-li"><a href="http://www.sencha.com/" target="_blank">Ext JS</a></li>
<li class="my-li"><a href="http://www.mathjax.org/" target="_blank">MathJax</a></li>
<li class="my-li">plugin dbui</li>
<li class="my-li"><a href="http://www.python.org/" target="_blank">Python</a></li>
<li class="my-li"><a href="http://web2py.com/" target="_blank">Web2py</a></li>
</ul>
<h3 class="my-h3 my-small-cap">Auteur</h3>
<ul class="my-ul">
<li class="my-li">Renaud Le Gac</li>
<ul>
<h3 class="my-h3 my-small-cap">Contributeurs</h3>
<h3 class="my-h3 my-small-cap">Licence</h3>
<p class="my-p">Ce logiciel est distribué sous la licence opence source CeCILL.</p>
<br>
<p class="my-p">&copy; 2010 - 2012 Renaud Le Gac</p>
</body>
</html>
\ No newline at end of file
--------------------------------- CHANGELOG ----------------------------------
HEAD
- Add About and licence stuff.
0.8.0 (Dec 2012)
- Migrate to plugin_dbui 0.4.10.0.
- New node CAS to manage user and their group.
......
This diff is collapsed.
This diff is collapsed.
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment