File tree Expand file tree Collapse file tree 3 files changed +8
-3
lines changed
ForgeImporters/forgeimporters Expand file tree Collapse file tree 3 files changed +8
-3
lines changed Original file line number Diff line number Diff line change @@ -172,7 +172,7 @@ def sidebar_menu(self):
172
172
173
173
for ep_name in sorted (g .entry_points ['admin' ].keys ()):
174
174
admin_extension = g .entry_points ['admin' ][ep_name ]
175
- admin_extension ().update_project_sidebar_menu (links )
175
+ links = ( admin_extension ().update_project_sidebar_menu (links ) or links )
176
176
177
177
return links
178
178
Original file line number Diff line number Diff line change 33
33
from hashlib import sha256
34
34
from base64 import b64encode
35
35
from datetime import datetime , timedelta
36
+ import typing
36
37
import calendar
37
38
import six
38
39
60
61
from allura .tasks import activity_tasks
61
62
from allura .tasks .index_tasks import solr_del_project_artifacts
62
63
64
+ if typing .TYPE_CHECKING :
65
+ from allura .app import SitemapEntry
66
+
63
67
log = logging .getLogger (__name__ )
64
68
65
69
@@ -1800,7 +1804,7 @@ class AdminExtension:
1800
1804
1801
1805
project_admin_controllers = {}
1802
1806
1803
- def update_project_sidebar_menu (self , sidebar_links ) :
1807
+ def update_project_sidebar_menu (self , sidebar_links : list [ 'SitemapEntry' ]) -> list [ 'SitemapEntry' ] :
1804
1808
"""
1805
1809
Implement this function to modify the project sidebar.
1806
1810
Check `c.project` if you want to limit when this displays
@@ -1811,7 +1815,7 @@ def update_project_sidebar_menu(self, sidebar_links):
1811
1815
1812
1816
:rtype: ``None``
1813
1817
"""
1814
- pass
1818
+ return sidebar_links
1815
1819
1816
1820
1817
1821
class SiteAdminExtension :
Original file line number Diff line number Diff line change @@ -611,6 +611,7 @@ def update_project_sidebar_menu(self, sidebar_links):
611
611
base_url = c .project .url () + 'admin/ext/'
612
612
link = SitemapEntry ('Import' , base_url + 'import/' )
613
613
sidebar_links .append (link )
614
+ return sidebar_links
614
615
615
616
616
617
def bytesio_parser (page ):
You can’t perform that action at this time.
0 commit comments