mirror of
https://github.com/pgadmin-org/pgadmin4.git
synced 2025-02-25 18:55:31 -06:00
Handle standard menu items defined by Nodes in the browser.
The File menu now includes a "Create" submenu, and Delete/Rename options. Nodes can offer Delete/Rename functionality, and the options on the menu are automatically enabled/disabled based on the selected node. Each node can also offer Create functionality, and specify a list of node types (including itself) from which the option should be made available. The menu is dynamically generated based on the selected node. The Context menu on the treeview works in a similar way, except that nodes can offer any context menu items (we don't allow this on the top menu, as that should stay consistent to avoid user confusion).
This commit is contained in:
@@ -10,6 +10,7 @@
|
||||
"""Browser integration functions for the About module."""
|
||||
|
||||
from flask import render_template, url_for
|
||||
from flask.ext.babel import gettext
|
||||
|
||||
import config
|
||||
|
||||
@@ -17,7 +18,7 @@ def get_help_menu_items():
|
||||
"""Return a (set) of dicts of help menu items, with name, priority, URL,
|
||||
target and onclick code."""
|
||||
return [{'name': 'mnu_about',
|
||||
'label': 'About %s' % (config.APP_NAME),
|
||||
'label': gettext('About %(appname)s', appname=config.APP_NAME),
|
||||
'priority': 999,
|
||||
'url': "#",
|
||||
'onclick': "about_show()"}]
|
||||
|
||||
Reference in New Issue
Block a user