mirror of
https://github.com/pgadmin-org/pgadmin4.git
synced 2025-02-25 18:55:31 -06:00
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).
28 lines
940 B
Python
28 lines
940 B
Python
##########################################################################
|
|
#
|
|
# pgAdmin 4 - PostgreSQL Tools
|
|
#
|
|
# Copyright (C) 2013 - 2015, The pgAdmin Development Team
|
|
# This software is released under the PostgreSQL Licence
|
|
#
|
|
##########################################################################
|
|
|
|
"""Browser integration functions for the About module."""
|
|
|
|
from flask import render_template, url_for
|
|
from flask.ext.babel import gettext
|
|
|
|
import config
|
|
|
|
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': gettext('About %(appname)s', appname=config.APP_NAME),
|
|
'priority': 999,
|
|
'url': "#",
|
|
'onclick': "about_show()"}]
|
|
|
|
def get_scripts():
|
|
"""Return a list of script URLs to include in the rendered page header"""
|
|
return [ url_for('about.script') ] |