Commit b6e40554 authored by LE GAC Renaud's avatar LE GAC Renaud
Browse files

Rename controller documentations as documentations_table and add documentations_list.

parent 410d73dc
...@@ -2,11 +2,15 @@ ...@@ -2,11 +2,15 @@
Controllers expose by the plugin: Controllers expose by the plugin:
about
call
csv
dbui_conf
documentation
index index
database latex2pdf
configuration satus
version
Author: R. Le Gac
""" """
import json import json
...@@ -161,9 +165,12 @@ def dbui_conf(): ...@@ -161,9 +165,12 @@ def dbui_conf():
return script return script
def documentations(): def documentations_table():
"""Return the Ext.data.Array configuration for the documentation """Documentation for users and developer display as table.
and for the source code.
Returns:
Ext.data.Array:
configuration for the documentation and for the source code.
""" """
from plugin_dbui import get_reference_paths, Store from plugin_dbui import get_reference_paths, Store
...@@ -271,6 +278,25 @@ def documentations(): ...@@ -271,6 +278,25 @@ def documentations():
return dict(cfg_doc=cfg_doc, cfg_src=cfg_src) return dict(cfg_doc=cfg_doc, cfg_src=cfg_src)
def documentations_list():
"""Documentations for users and developers display as list.
Exploit documentations for the application located in:
/static
/docs
/api
/jsduck
/latex
/pdf
/user
Returns:
empty dict.
"""
return dict()
def index(): def index():
"""Default Action to run the plugin """Default Action to run the plugin
Load compressed version of all libraries. Load compressed version of all libraries.
...@@ -292,6 +318,9 @@ def index(): ...@@ -292,6 +318,9 @@ def index():
The scripts are stored in the directory defined by the plugin The scripts are stored in the directory defined by the plugin
configuration app_script_dir. configuration app_script_dir.
Returns:
list of HTML string
""" """
from plugin_dbui import get_file_paths, get_script_path from plugin_dbui import get_file_paths, get_script_path
...@@ -347,9 +376,11 @@ def index(): ...@@ -347,9 +376,11 @@ def index():
fwlib = "" fwlib = ""
for el in lst: for el in lst:
if el.endswith(".css"): if el.endswith(".css"):
fwlib += '<link rel="stylesheet" type="text/css" href="%s"/>\n\t\t' % el fwlib += \
'<link rel="stylesheet" type="text/css" href="%s"/>\n\t\t' % el
else: else:
fwlib +='<script type="text/javascript" src="%s"></script>\n\t\t' %el fwlib += \
'<script type="text/javascript" src="%s"></script>\n\t\t' %el
return dict(fwlib=fwlib) return dict(fwlib=fwlib)
......
...@@ -23,6 +23,7 @@ ...@@ -23,6 +23,7 @@
'countries': 'pays', 'countries': 'pays',
'Country': 'Pays', 'Country': 'Pays',
'Data base scheme': 'Schéma de la base de données', 'Data base scheme': 'Schéma de la base de données',
'Database schema': 'Database schema',
'Dates': 'Dates', 'Dates': 'Dates',
'Definition': 'Définition', 'Definition': 'Définition',
'dev': 'dev', 'dev': 'dev',
...@@ -30,6 +31,8 @@ ...@@ -30,6 +31,8 @@
'Documentation for developers': 'Documentation pour développeurs', 'Documentation for developers': 'Documentation pour développeurs',
'documentations': 'documentations', 'documentations': 'documentations',
'Documentations': 'Documentations', 'Documentations': 'Documentations',
'documentations (list)': 'documentations (liste)',
'documentations (table)': 'documentations (table)',
'Doi': 'Doi', 'Doi': 'Doi',
'domain': 'domaine', 'domain': 'domaine',
'E Print': 'E Print', 'E Print': 'E Print',
...@@ -52,6 +55,8 @@ ...@@ -52,6 +55,8 @@
'Filter reports': 'Filter reports', 'Filter reports': 'Filter reports',
'Filter teams': 'Filter teams', 'Filter teams': 'Filter teams',
'First Page': 'Première Page', 'First Page': 'Première Page',
'For developpers': 'For developpers',
'For users': 'For users',
'Form': 'Formulaire', 'Form': 'Formulaire',
'Forms': 'Formulaires', 'Forms': 'Formulaires',
'General': 'Général', 'General': 'Général',
...@@ -140,6 +145,7 @@ ...@@ -140,6 +145,7 @@
'undefined': 'indéfini', 'undefined': 'indéfini',
'unknown': 'unknown', 'unknown': 'unknown',
'url': 'url', 'url': 'url',
'User guides': 'User guides',
'Value': 'Valeur', 'Value': 'Valeur',
'Value already in database or empty': 'La valeur existe dans la base de données ou est nulle', 'Value already in database or empty': 'La valeur existe dans la base de données ou est nulle',
'value already in database or empty': 'La valeur existe dans la base de données ou est nulle', 'value already in database or empty': 'La valeur existe dans la base de données ou est nulle',
......
...@@ -65,14 +65,24 @@ loader = dict(autoLoad=True, ...@@ -65,14 +65,24 @@ loader = dict(autoLoad=True,
scripts=False, scripts=False,
url=URL('plugin_dbui', 'about')) url=URL('plugin_dbui', 'about'))
aboutLeaf = Panel(loader=loader, plugins=['pPanelLoaderException'], autoScroll=True) aboutLeaf = \
Panel(loader=loader, plugins=['pPanelLoaderException'], autoScroll=True)
loader = dict(autoLoad=True, loader = dict(autoLoad=True,
renderer='html', renderer='html',
scripts=True, scripts=True,
url=URL('plugin_dbui', 'documentations')) url=URL('plugin_dbui', 'documentations_table'))
docLeaf = Panel(loader=loader, plugins=['pPanelLoaderException'], autoScroll=True) docLeafTable = \
Panel(loader=loader, plugins=['pPanelLoaderException'], autoScroll=True)
loader = dict(autoLoad=True,
renderer='html',
scripts=True,
url=URL('plugin_dbui', 'documentations_list'))
docLeafList = \
Panel(loader=loader, plugins=['pPanelLoaderException'], autoScroll=True)
loader = dict(autoLoad=True, loader = dict(autoLoad=True,
renderer='html', renderer='html',
...@@ -83,7 +93,8 @@ versionLeaf = Panel(loader=loader, plugins=['pPanelLoaderException']) ...@@ -83,7 +93,8 @@ versionLeaf = Panel(loader=loader, plugins=['pPanelLoaderException'])
helpNode = Node(T('Help')) helpNode = Node(T('Help'))
helpNode.add_child(T('about'), aboutLeaf) helpNode.add_child(T('about'), aboutLeaf)
helpNode.add_child(T('documentations'), docLeaf) helpNode.add_child(T('documentations (table)'), docLeafTable)
helpNode.add_child(T('documentations (list)'), docLeafList)
helpNode.add_child(T('versions'), versionLeaf) helpNode.add_child(T('versions'), versionLeaf)
#------------------------------------------------------------------------------- #-------------------------------------------------------------------------------
......
<h2 class="dbui-h2 dbui-small-cap">{{=T("Documentations")}}</h2>
<p class="dbui-p dbui-small-cap" style="margin-top: 5ex">
1. {{=T("For users")}}
</p>
<ul>
<li class="dbui-p">
{{=T("User guides")}} (
<a href="/{{=request.application}}/static/docs/user/index.html" target="_blank">
html
</a>,
<a href="/{{=request.application}}/static/docs/pdf/{{=request.application}}_user.pdf" target="_blank">
pdf
</a>)
</li>
<li class="dbui-p">
<a href="/{{=request.application}}/static/docs/database.png" target="_blank">
{{=T("Database schema")}}
</a>
</li>
<li class="dbui-p">
<a href="/{{=request.application}}/static/CHANGELOG" target="_blank">
Change Log
</a>
</li>
</ul>
<p class="dbui-p dbui-small-cap" style="margin-top: 5ex">
2. {{=T("For developpers")}}
</p>
<ul>
<li class="dbui-p">
<a href="/{{=request.application}}/static/docs/api/index.html" target="_blank">
{{=request.application}} python API
</a>
</li>
<li class="dbui-p">
<a href="/{{=request.application}}/static/docs/jsduck/index.html" target="_blank">
{{=request.application}} javascript API
</a>
</li>
</ul>
<ul>
<li class="dbui-p">
<a href="https://marprod.in2p3.fr/plugin_dbui_book" target="_blank">
plugin_dbui reference manual
</a>
</li>
<li class="dbui-p">
<a href="/{{=request.application}}/static/plugin_dbui/docs/api/index.html" target="_blank">
plugin_dbui python API
</a>
</li>
<li class="dbui-p">
<a href="/{{=request.application}}/static/plugin_dbui/docs/jsduck/index.html" target="_blank">
plugin_dbui javascript API
</a>
</li>
</ul>
<ul>
<li class="dbui-p">
<a href="http://web2py.com/book" target="_blank">
Web2py reference manual
</a>
</li>
<li class="dbui-p">
<a href="http://docs.sencha.com/extjs/6.2.0/classic/Ext.html" target="_blank">
Ext JS 6.2.0 javasript API
</a>
</li>
<li class="dbui-p">
<a href="http://pandas.pydata.org/pandas-docs/stable/" target="_blank">
Pandas data analysis toolkit
</a>
</li>
</ul>
<ul>
<li class="dbui-p">
<a href="http://sphinx-doc.org/" target="_blank">
Sphinx documentation generator
</a>
</li>
</ul>
\ No newline at end of file
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