Merge pull request #320 from spametki/master

admin plugins page: show license information and small enhancements
This commit is contained in:
mdipierro
2013-12-08 06:28:08 -08:00
3 changed files with 34 additions and 21 deletions
+1 -18
View File
@@ -1834,24 +1834,7 @@ def plugins():
"public/api.json/action/list/content/Package?package" + "public/api.json/action/list/content/Package?package" +
"_type=plugin&search_index=false").read() "_type=plugin&search_index=false").read()
session.plugins = loads_json(rawlist) session.plugins = loads_json(rawlist)
plugins = TABLE( return dict(plugins=session.plugins["results"], app=request.args(0))
*[TR(TD(H5(article["article"]["title"]),
A(T("Install"),
_href=URL(c="default",
f="install_plugin",
args=[app,],
vars={"source":
article["package_data"]["download"],
"plugin": article["article"]["title"]}
))),
TD(article["article"]["description"], BR(),
A(T("Plugin page"),
_href="http://www.web2pyslices.com/slice/show/%s/" % \
article["article"]["id"])),
TD(IMG(_src="http://www.web2pyslices.com/download/%s" % \
article["article"]["thumbnail"])))
for article in session.plugins["results"]])
return dict(plugins=plugins, app=request.args(0))
def install_plugin(): def install_plugin():
app = request.args(0) app = request.args(0)
+16 -2
View File
@@ -1,4 +1,4 @@
# coding: utf8 # -*- coding: utf-8 -*-
{ {
'!langcode!': 'es', '!langcode!': 'es',
'!langname!': 'Español', '!langname!': 'Español',
@@ -9,6 +9,7 @@
'%Y-%m-%d %H:%M:%S': '%Y-%m-%d %H:%M:%S', '%Y-%m-%d %H:%M:%S': '%Y-%m-%d %H:%M:%S',
'(requires internet access, experimental)': '(requiere acceso a internet, experimental)', '(requires internet access, experimental)': '(requiere acceso a internet, experimental)',
'(something like "it-it")': '(algo como "it-it")', '(something like "it-it")': '(algo como "it-it")',
'(version %s)': '(version %s)',
'@markmin\x01(file **gluon/contrib/plural_rules/%s.py** is not found)': '(file **gluon/contrib/plural_rules/%s.py** is not found)', '@markmin\x01(file **gluon/contrib/plural_rules/%s.py** is not found)': '(file **gluon/contrib/plural_rules/%s.py** is not found)',
'@markmin\x01An error occured, please [[reload %s]] the page': 'An error occured, please [[reload %s]] the page', '@markmin\x01An error occured, please [[reload %s]] the page': 'An error occured, please [[reload %s]] the page',
'@markmin\x01Searching: **%s** %%{file}': 'Searching: **%s** files', '@markmin\x01Searching: **%s** %%{file}': 'Searching: **%s** files',
@@ -122,6 +123,7 @@
'delete plugin': 'eliminar plugin', 'delete plugin': 'eliminar plugin',
'Delete this file (you will be asked to confirm deletion)': 'Elimine este fichero (se le pedirá confirmación)', 'Delete this file (you will be asked to confirm deletion)': 'Elimine este fichero (se le pedirá confirmación)',
'Delete:': 'Elimine:', 'Delete:': 'Elimine:',
'Demo': 'Demo',
'Deploy': 'Deploy', 'Deploy': 'Deploy',
'Deploy on Google App Engine': 'Instale en Google App Engine', 'Deploy on Google App Engine': 'Instale en Google App Engine',
'Deploy to OpenShift': 'Instale en OpenShift', 'Deploy to OpenShift': 'Instale en OpenShift',
@@ -134,6 +136,7 @@
'direction: ltr': 'direction: ltr', 'direction: ltr': 'direction: ltr',
'Disable': 'Deshabilitar', 'Disable': 'Deshabilitar',
'docs': 'docs', 'docs': 'docs',
'Docs': 'Docs',
'Done!': 'Done!', 'Done!': 'Done!',
'done!': 'listo!', 'done!': 'listo!',
'Download': 'Descargar', 'Download': 'Descargar',
@@ -157,6 +160,7 @@
'Editing myemail': 'Editing myemail', 'Editing myemail': 'Editing myemail',
'Editing rbare': 'Editing rbare', 'Editing rbare': 'Editing rbare',
'Editing ul': 'Editing ul', 'Editing ul': 'Editing ul',
'Enable': 'Enable',
'Enterprise Web Framework': 'Armazón Empresarial para Internet', 'Enterprise Web Framework': 'Armazón Empresarial para Internet',
'Error': 'Error', 'Error': 'Error',
'Error logs for "%(app)s"': 'Bitácora de errores en "%(app)s"', 'Error logs for "%(app)s"': 'Bitácora de errores en "%(app)s"',
@@ -190,6 +194,8 @@
'First name': 'Nombre', 'First name': 'Nombre',
'Frames': 'Frames', 'Frames': 'Frames',
'Functions with no doctests will result in [passed] tests.': 'Funciones sin doctests equivalen a pruebas [aceptadas].', 'Functions with no doctests will result in [passed] tests.': 'Funciones sin doctests equivalen a pruebas [aceptadas].',
'Git Pull': 'Git Pull',
'Git Push': 'Git Push',
'Globals##debug': 'Globals', 'Globals##debug': 'Globals',
'graph model': 'graph model', 'graph model': 'graph model',
'Group ID': 'ID de Grupo', 'Group ID': 'ID de Grupo',
@@ -213,6 +219,7 @@
'internal error': 'error interno', 'internal error': 'error interno',
'Internal State': 'Estado Interno', 'Internal State': 'Estado Interno',
'Invalid action': 'Acción inválida', 'Invalid action': 'Acción inválida',
'Invalid application name': 'Invalid application name',
'Invalid email': 'Correo inválido', 'Invalid email': 'Correo inválido',
'invalid password': 'contraseña inválida', 'invalid password': 'contraseña inválida',
'invalid password.': 'invalid password.', 'invalid password.': 'invalid password.',
@@ -230,6 +237,7 @@
'Last name': 'Apellido', 'Last name': 'Apellido',
'Last saved on:': 'Guardado en:', 'Last saved on:': 'Guardado en:',
'License for': 'Licencia para', 'License for': 'Licencia para',
'License:': 'License:',
'lists by ticket': 'lists by ticket', 'lists by ticket': 'lists by ticket',
'loading...': 'cargando...', 'loading...': 'cargando...',
'locals': 'locals', 'locals': 'locals',
@@ -250,6 +258,7 @@
'new application "%s" created': 'nueva aplicación "%s" creada', 'new application "%s" created': 'nueva aplicación "%s" creada',
'New application wizard': 'Asistente para nueva aplicación', 'New application wizard': 'Asistente para nueva aplicación',
'new plugin installed': 'nuevo plugin instalado', 'new plugin installed': 'nuevo plugin instalado',
'New plugin installed: %s': 'New plugin installed: %s',
'New plugin installed: web2py.plugin.attachment.w2p': 'New plugin installed: web2py.plugin.attachment.w2p', 'New plugin installed: web2py.plugin.attachment.w2p': 'New plugin installed: web2py.plugin.attachment.w2p',
'New plugin installed: web2py.plugin.dialog.w2p': 'New plugin installed: web2py.plugin.dialog.w2p', 'New plugin installed: web2py.plugin.dialog.w2p': 'New plugin installed: web2py.plugin.dialog.w2p',
'New plugin installed: web2py.plugin.math2py.w2p': 'New plugin installed: web2py.plugin.math2py.w2p', 'New plugin installed: web2py.plugin.math2py.w2p': 'New plugin installed: web2py.plugin.math2py.w2p',
@@ -310,6 +319,8 @@
'Removed Breakpoint on %s at line %s': 'Eliminado punto de ruptura en %s en la línea %s', 'Removed Breakpoint on %s at line %s': 'Eliminado punto de ruptura en %s en la línea %s',
'Replace': 'Reemplazar', 'Replace': 'Reemplazar',
'Replace All': 'Reemplazar todos', 'Replace All': 'Reemplazar todos',
'Repository (%s)': 'Repository (%s)',
'Repository: %s': 'Repository: %s',
'request': 'request', 'request': 'request',
'Resolve Conflict file': 'archivo Resolución de Conflicto', 'Resolve Conflict file': 'archivo Resolución de Conflicto',
'response': 'response', 'response': 'response',
@@ -329,6 +340,8 @@
'Save file: %s': 'Guardar: %s', 'Save file: %s': 'Guardar: %s',
'Save via Ajax': 'Guardar via Ajax', 'Save via Ajax': 'Guardar via Ajax',
'Saved file hash:': 'Hash del archivo guardado:', 'Saved file hash:': 'Hash del archivo guardado:',
'Screenshot %s': 'Screenshot %s',
'Screenshots': 'Screenshots',
'selected': 'seleccionado(s)', 'selected': 'seleccionado(s)',
'session': 'session', 'session': 'session',
'session expired': 'sesión expirada', 'session expired': 'sesión expirada',
@@ -336,6 +349,7 @@
'shell': 'shell', 'shell': 'shell',
'Site': 'sitio', 'Site': 'sitio',
'some files could not be removed': 'algunos archivos no pudieron ser removidos', 'some files could not be removed': 'algunos archivos no pudieron ser removidos',
'source : filesystem': 'source : filesystem',
'Start searching': 'Iniciar búsqueda', 'Start searching': 'Iniciar búsqueda',
'Start wizard': 'Iniciar asistente', 'Start wizard': 'Iniciar asistente',
'state': 'estado', 'state': 'estado',
@@ -355,8 +369,8 @@
'test': 'probar', 'test': 'probar',
'Testing application': 'Probando aplicación', 'Testing application': 'Probando aplicación',
'The "query" is a condition like "db.table1.field1==\'value\'". Something like "db.table1.field1==db.table2.field2" results in a SQL JOIN.': 'La "consulta" es una condición como "db.tabla1.campo1==\'valor\'". Algo como "db.tabla1.campo1==db.tabla2.campo2" resulta en un JOIN SQL.', 'The "query" is a condition like "db.table1.field1==\'value\'". Something like "db.table1.field1==db.table2.field2" results in a SQL JOIN.': 'La "consulta" es una condición como "db.tabla1.campo1==\'valor\'". Algo como "db.tabla1.campo1==db.tabla2.campo2" resulta en un JOIN SQL.',
'the application logic, each URL path is mapped in one exposed function in the controller': 'la lógica de la aplicación, cada ruta URL se mapea en una función expuesta en el controlador',
'The application logic, each URL path is mapped in one exposed function in the controller': 'La lógica de la aplicación, cada ruta URL se mapea en una función expuesta en el controlador', 'The application logic, each URL path is mapped in one exposed function in the controller': 'La lógica de la aplicación, cada ruta URL se mapea en una función expuesta en el controlador',
'the application logic, each URL path is mapped in one exposed function in the controller': 'la lógica de la aplicación, cada ruta URL se mapea en una función expuesta en el controlador',
'the data representation, define database tables and sets': 'la representación de datos, define tablas y conjuntos de base de datos', 'the data representation, define database tables and sets': 'la representación de datos, define tablas y conjuntos de base de datos',
'The data representation, define database tables and sets': 'La representación de datos, define tablas y conjuntos de base de datos', 'The data representation, define database tables and sets': 'La representación de datos, define tablas y conjuntos de base de datos',
'The presentations layer, views are also known as templates': 'La capa de presentación, las vistas también son llamadas plantillas', 'The presentations layer, views are also known as templates': 'La capa de presentación, las vistas también son llamadas plantillas',
+17 -1
View File
@@ -1,5 +1,21 @@
{{extend 'layout.html'}} {{extend 'layout.html'}}
{{=H3("Available plugins")}} {{=H3("Available plugins")}}
{{=P("Source: web2pyslices")}} {{=P("Source: web2pyslices")}}
{{=plugins}} {{articles = []}}
{{for article in plugins:}}
{{screenshots = [A(" ", T("Screenshot %s") % (x+1), " ", _href=item) for (x, item) in enumerate(article["package_data"]["screenshots"])]}}
{{articles.append(TR(TD(H5(article["article"]["title"]),
button(URL(c="default", f="install_plugin", args=[app,], vars={"source": article["package_data"]["download"], "plugin": article["article"]["title"]}), T("Install")),
BR(),
IMG(_src="http://www.web2pyslices.com/download/%s" % article["article"]["thumbnail"], _style="margin-top: 1em;"), _style="width: 20em;"),
TD(article["article"]["description"], BR(),
A(T("Plugin page"), _href="http://www.web2pyslices.com/slice/show/%s/" % article["article"]["id"]), " | ",
A(T("Demo"), _href=article["package_data"]["demo"]), " | ",
A(T("Docs"), _href=article["package_data"]["documentation"]), " | ",
A(T("Repository (%s)") % article["package_data"]["repository_brand"], _href=article["package_data"]["repository_page"]), " | ",
A(T("License:"), " ", (article["package_data"]["license_type"] or "").upper(), " ", T("(version %s)") % article["package_data"]["license_version"] if article["package_data"]["license_version"] else "", _href=article["package_data"]["license_url"]), " | " if screenshots else "", *screenshots, _style="width: 40em;"))
)
}}
{{pass}}
{{=TABLE(*articles)}}