Loading lib/galaxy/webapps/base/webapp.py +0 −19 Original line number Diff line number Diff line Loading @@ -19,8 +19,6 @@ from urllib.parse import urlparse import mako.lookup import mako.runtime from apispec import APISpec from babel import Locale from babel.support import Translations from sqlalchemy import ( and_, true, Loading Loading @@ -281,7 +279,6 @@ class GalaxyWebTransaction(base.DefaultWebTransaction, context.ProvidesHistoryCo self.user_manager = app[UserManager] self.session_manager = app[GalaxySessionManager] base.DefaultWebTransaction.__init__(self, environ) self.setup_i18n() self.expunge_all() config = self.app.config self.debug = asbool(config.get("debug", False)) Loading Loading @@ -369,22 +366,6 @@ class GalaxyWebTransaction(base.DefaultWebTransaction, context.ProvidesHistoryCo def url_builder(self): return url_builder def setup_i18n(self): locales = [] if "HTTP_ACCEPT_LANGUAGE" in self.environ: # locales looks something like: ['en', 'en-us;q=0.7', 'ja;q=0.3'] client_locales = self.environ["HTTP_ACCEPT_LANGUAGE"].split(",") for locale in client_locales: try: locales.append(Locale.parse(locale.split(";")[0].strip(), sep="-").language) except Exception as e: log.debug("Error parsing locale '%s'. %s: %s", locale, type(e), e) if not locales: # Default to English locales = "en" t = Translations.load(dirname="locale", locales=locales, domain="ginga") self.template_context.update(dict(_=t.ugettext, n_=t.ugettext, N_=t.ungettext)) def set_cors_allow(self, name=None, value=None): acr = "Access-Control-Request-" if name is None: Loading lib/tool_shed/webapp/templates/message.mako +1 −1 Original line number Diff line number Diff line Loading @@ -63,5 +63,5 @@ if status not in ("danger", "info", "success", "warning"): status = "info" %> <div class="message mt-2 alert alert-${status}">${_(sanitize_html(msg))}</div> <div class="message mt-2 alert alert-${status}">${sanitize_html(msg)}</div> </%def> lib/tool_shed/webapp/templates/webapps/tool_shed/base_panels.mako +12 −12 Original line number Diff line number Diff line Loading @@ -139,24 +139,24 @@ <% menu_options = [] menu_options.extend( [ [_('About Tool Shed'), app.config.get( "wiki_url", "https://galaxyproject.org/toolshed" ), "_blank" ], [_('Support'), app.config.get( "support_url", "https://galaxyproject.org/support" ), "_blank" ], [_('Videos'), app.config.get( "screencasts_url", "https://vimeo.com/galaxyproject" ), "_blank" ], [_('How to Cite Tool Shed'), app.config.get( "citation_url", "https://galaxyproject.org/citing-galaxy" ), "_blank" ] ['About Tool Shed', app.config.get( "wiki_url", "https://galaxyproject.org/toolshed" ), "_blank" ], ['Support', app.config.get( "support_url", "https://galaxyproject.org/support" ), "_blank" ], ['Videos', app.config.get( "screencasts_url", "https://vimeo.com/galaxyproject" ), "_blank" ], ['How to Cite Tool Shed', app.config.get( "citation_url", "https://galaxyproject.org/citing-galaxy" ), "_blank" ] ] ) tab( "help", _("Help"), None, menu_options=menu_options ) tab( "help", "Help", None, menu_options=menu_options ) %> ## User tabs. <% from markupsafe import escape # Menu for user who is not logged in. menu_options = [ [ _("Login"), h.url_for( controller='/user', action='login' ), "galaxy_main" ] ] menu_options = [ [ "Login", h.url_for( controller='/user', action='login' ), "galaxy_main" ] ] if app.config.allow_user_creation: menu_options.append( [ _("Register"), h.url_for( controller='/user', action='create', cntrller='user' ), "galaxy_main" ] ) menu_options.append( [ "Register", h.url_for( controller='/user', action='create', cntrller='user' ), "galaxy_main" ] ) extra_class = "loggedout-only" visible = ( trans.user == None ) tab( "user", _("User"), None, visible=visible, menu_options=menu_options ) tab( "user", "User", None, visible=visible, menu_options=menu_options ) # Menu for user who is logged in. if trans.user: email = escape( trans.user.email ) Loading @@ -165,14 +165,14 @@ menu_options = [ [ 'Logged in as <span id="user-email">%s</span>' % email ] ] if app.config.use_remote_user: if app.config.remote_user_logout_href: menu_options.append( [ _('Logout'), app.config.remote_user_logout_href, "_top" ] ) menu_options.append( [ 'Logout', app.config.remote_user_logout_href, "_top" ] ) else: menu_options.append( [ _('Preferences'), h.url_for( controller='/user', action='index', cntrller='user' ), "galaxy_main" ] ) menu_options.append( [ _('API Keys'), h.url_for( controller='/user', action='api_keys', cntrller='user' ), "galaxy_main" ] ) menu_options.append( [ 'Preferences', h.url_for( controller='/user', action='index', cntrller='user' ), "galaxy_main" ] ) menu_options.append( [ 'API Keys', h.url_for( controller='/user', action='api_keys', cntrller='user' ), "galaxy_main" ] ) logout_url = h.url_for( controller='/user', action='logout' ) menu_options.append( [ 'Logout', logout_url, "_top" ] ) if app.config.use_remote_user: menu_options.append( [ _('Public Name'), h.url_for( controller='/user', action='edit_username', cntrller='user' ), "galaxy_main" ] ) menu_options.append( [ 'Public Name', h.url_for( controller='/user', action='edit_username', cntrller='user' ), "galaxy_main" ] ) extra_class = "loggedin-only" visible = ( trans.user != None ) Loading lib/tool_shed/webapp/templates/webapps/tool_shed/user/index.mako +9 −9 Original line number Diff line number Diff line <%inherit file="/base.mako"/> %if trans.user: <h2>${_('User preferences')}</h2> <h2>User preferences</h2> <p>You are currently logged in as ${trans.user.email|h}.</p> <ul> <li><a href="${h.url_for( controller='user', action='manage_user_info', cntrller=cntrller )}">${_('Manage your information')}</a></li> <li><a href="${h.url_for( controller='user', action='change_password', id=trans.app.security.encode_id(trans.user.id) )}">${_('Change your password')}</a></li> <li><a href="${h.url_for( controller='user', action='api_keys', cntrller=cntrller )}">${_('Manage your API keys')}</a></li> <li><a href="${h.url_for( controller='repository', action='manage_email_alerts', cntrller=cntrller )}">${_('Manage your email alerts')}</a></li> <li><a href="${h.url_for( controller='user', action='logout', logout_all=True )}" target="_top">${_('Logout')}</a> ${_('of all user sessions')}</li> <li><a href="${h.url_for( controller='user', action='manage_user_info', cntrller=cntrller )}">Manage your information</a></li> <li><a href="${h.url_for( controller='user', action='change_password', id=trans.app.security.encode_id(trans.user.id) )}">Change your password</a></li> <li><a href="${h.url_for( controller='user', action='api_keys', cntrller=cntrller )}">Manage your API keys</a></li> <li><a href="${h.url_for( controller='repository', action='manage_email_alerts', cntrller=cntrller )}">Manage your email alerts</a></li> <li><a href="${h.url_for( controller='user', action='logout', logout_all=True )}" target="_top">Logout</a> of all user sessions</li> </ul> %else: %if not message: <p>${n_('You are currently not logged in.')}</p> <p>You are currently not logged in.</p> %endif <ul> <li><a href="${h.url_for( controller='user', action='login' )}">${_('Login')}</li> <li><a href="${h.url_for( controller='user', action='create', cntrller='user' )}">${_('Register')}</a></li> <li><a href="${h.url_for( controller='user', action='login' )}">Login</li> <li><a href="${h.url_for( controller='user', action='create', cntrller='user' )}">Register</a></li> </ul> %endif locale/en/LC_MESSAGES/ginga.modeleted 100644 → 0 −3.78 KiB File deleted. View file Loading
lib/galaxy/webapps/base/webapp.py +0 −19 Original line number Diff line number Diff line Loading @@ -19,8 +19,6 @@ from urllib.parse import urlparse import mako.lookup import mako.runtime from apispec import APISpec from babel import Locale from babel.support import Translations from sqlalchemy import ( and_, true, Loading Loading @@ -281,7 +279,6 @@ class GalaxyWebTransaction(base.DefaultWebTransaction, context.ProvidesHistoryCo self.user_manager = app[UserManager] self.session_manager = app[GalaxySessionManager] base.DefaultWebTransaction.__init__(self, environ) self.setup_i18n() self.expunge_all() config = self.app.config self.debug = asbool(config.get("debug", False)) Loading Loading @@ -369,22 +366,6 @@ class GalaxyWebTransaction(base.DefaultWebTransaction, context.ProvidesHistoryCo def url_builder(self): return url_builder def setup_i18n(self): locales = [] if "HTTP_ACCEPT_LANGUAGE" in self.environ: # locales looks something like: ['en', 'en-us;q=0.7', 'ja;q=0.3'] client_locales = self.environ["HTTP_ACCEPT_LANGUAGE"].split(",") for locale in client_locales: try: locales.append(Locale.parse(locale.split(";")[0].strip(), sep="-").language) except Exception as e: log.debug("Error parsing locale '%s'. %s: %s", locale, type(e), e) if not locales: # Default to English locales = "en" t = Translations.load(dirname="locale", locales=locales, domain="ginga") self.template_context.update(dict(_=t.ugettext, n_=t.ugettext, N_=t.ungettext)) def set_cors_allow(self, name=None, value=None): acr = "Access-Control-Request-" if name is None: Loading
lib/tool_shed/webapp/templates/message.mako +1 −1 Original line number Diff line number Diff line Loading @@ -63,5 +63,5 @@ if status not in ("danger", "info", "success", "warning"): status = "info" %> <div class="message mt-2 alert alert-${status}">${_(sanitize_html(msg))}</div> <div class="message mt-2 alert alert-${status}">${sanitize_html(msg)}</div> </%def>
lib/tool_shed/webapp/templates/webapps/tool_shed/base_panels.mako +12 −12 Original line number Diff line number Diff line Loading @@ -139,24 +139,24 @@ <% menu_options = [] menu_options.extend( [ [_('About Tool Shed'), app.config.get( "wiki_url", "https://galaxyproject.org/toolshed" ), "_blank" ], [_('Support'), app.config.get( "support_url", "https://galaxyproject.org/support" ), "_blank" ], [_('Videos'), app.config.get( "screencasts_url", "https://vimeo.com/galaxyproject" ), "_blank" ], [_('How to Cite Tool Shed'), app.config.get( "citation_url", "https://galaxyproject.org/citing-galaxy" ), "_blank" ] ['About Tool Shed', app.config.get( "wiki_url", "https://galaxyproject.org/toolshed" ), "_blank" ], ['Support', app.config.get( "support_url", "https://galaxyproject.org/support" ), "_blank" ], ['Videos', app.config.get( "screencasts_url", "https://vimeo.com/galaxyproject" ), "_blank" ], ['How to Cite Tool Shed', app.config.get( "citation_url", "https://galaxyproject.org/citing-galaxy" ), "_blank" ] ] ) tab( "help", _("Help"), None, menu_options=menu_options ) tab( "help", "Help", None, menu_options=menu_options ) %> ## User tabs. <% from markupsafe import escape # Menu for user who is not logged in. menu_options = [ [ _("Login"), h.url_for( controller='/user', action='login' ), "galaxy_main" ] ] menu_options = [ [ "Login", h.url_for( controller='/user', action='login' ), "galaxy_main" ] ] if app.config.allow_user_creation: menu_options.append( [ _("Register"), h.url_for( controller='/user', action='create', cntrller='user' ), "galaxy_main" ] ) menu_options.append( [ "Register", h.url_for( controller='/user', action='create', cntrller='user' ), "galaxy_main" ] ) extra_class = "loggedout-only" visible = ( trans.user == None ) tab( "user", _("User"), None, visible=visible, menu_options=menu_options ) tab( "user", "User", None, visible=visible, menu_options=menu_options ) # Menu for user who is logged in. if trans.user: email = escape( trans.user.email ) Loading @@ -165,14 +165,14 @@ menu_options = [ [ 'Logged in as <span id="user-email">%s</span>' % email ] ] if app.config.use_remote_user: if app.config.remote_user_logout_href: menu_options.append( [ _('Logout'), app.config.remote_user_logout_href, "_top" ] ) menu_options.append( [ 'Logout', app.config.remote_user_logout_href, "_top" ] ) else: menu_options.append( [ _('Preferences'), h.url_for( controller='/user', action='index', cntrller='user' ), "galaxy_main" ] ) menu_options.append( [ _('API Keys'), h.url_for( controller='/user', action='api_keys', cntrller='user' ), "galaxy_main" ] ) menu_options.append( [ 'Preferences', h.url_for( controller='/user', action='index', cntrller='user' ), "galaxy_main" ] ) menu_options.append( [ 'API Keys', h.url_for( controller='/user', action='api_keys', cntrller='user' ), "galaxy_main" ] ) logout_url = h.url_for( controller='/user', action='logout' ) menu_options.append( [ 'Logout', logout_url, "_top" ] ) if app.config.use_remote_user: menu_options.append( [ _('Public Name'), h.url_for( controller='/user', action='edit_username', cntrller='user' ), "galaxy_main" ] ) menu_options.append( [ 'Public Name', h.url_for( controller='/user', action='edit_username', cntrller='user' ), "galaxy_main" ] ) extra_class = "loggedin-only" visible = ( trans.user != None ) Loading
lib/tool_shed/webapp/templates/webapps/tool_shed/user/index.mako +9 −9 Original line number Diff line number Diff line <%inherit file="/base.mako"/> %if trans.user: <h2>${_('User preferences')}</h2> <h2>User preferences</h2> <p>You are currently logged in as ${trans.user.email|h}.</p> <ul> <li><a href="${h.url_for( controller='user', action='manage_user_info', cntrller=cntrller )}">${_('Manage your information')}</a></li> <li><a href="${h.url_for( controller='user', action='change_password', id=trans.app.security.encode_id(trans.user.id) )}">${_('Change your password')}</a></li> <li><a href="${h.url_for( controller='user', action='api_keys', cntrller=cntrller )}">${_('Manage your API keys')}</a></li> <li><a href="${h.url_for( controller='repository', action='manage_email_alerts', cntrller=cntrller )}">${_('Manage your email alerts')}</a></li> <li><a href="${h.url_for( controller='user', action='logout', logout_all=True )}" target="_top">${_('Logout')}</a> ${_('of all user sessions')}</li> <li><a href="${h.url_for( controller='user', action='manage_user_info', cntrller=cntrller )}">Manage your information</a></li> <li><a href="${h.url_for( controller='user', action='change_password', id=trans.app.security.encode_id(trans.user.id) )}">Change your password</a></li> <li><a href="${h.url_for( controller='user', action='api_keys', cntrller=cntrller )}">Manage your API keys</a></li> <li><a href="${h.url_for( controller='repository', action='manage_email_alerts', cntrller=cntrller )}">Manage your email alerts</a></li> <li><a href="${h.url_for( controller='user', action='logout', logout_all=True )}" target="_top">Logout</a> of all user sessions</li> </ul> %else: %if not message: <p>${n_('You are currently not logged in.')}</p> <p>You are currently not logged in.</p> %endif <ul> <li><a href="${h.url_for( controller='user', action='login' )}">${_('Login')}</li> <li><a href="${h.url_for( controller='user', action='create', cntrller='user' )}">${_('Register')}</a></li> <li><a href="${h.url_for( controller='user', action='login' )}">Login</li> <li><a href="${h.url_for( controller='user', action='create', cntrller='user' )}">Register</a></li> </ul> %endif