0001-misc-remove-unused-insert_first-menu-item-registrati.patch
wcs/qommon/backoffice/root.py | ||
---|---|---|
27 | 27 |
setattr(cls, urlname, directory) |
28 | 28 | |
29 | 29 |
@classmethod |
30 |
def register_menu_item(cls, url, title, check_display_function=None, insert_first=False):
|
|
30 |
def register_menu_item(cls, url, title, check_display_function=None): |
|
31 | 31 |
for i, v in enumerate(cls.menu_items): |
32 | 32 |
if v[0] == url: |
33 | 33 |
del cls.menu_items[i] |
34 | 34 |
if title is None: |
35 | 35 |
# used to remove an item |
36 | 36 |
return |
37 |
if insert_first: |
|
38 |
cls.menu_items.insert(0, (url, title, check_display_function)) |
|
39 |
else: |
|
40 |
cls.menu_items.append((url, title, check_display_function)) |
|
37 |
cls.menu_items.append((url, title, check_display_function)) |
|
41 | 38 | |
42 | 39 |
def _q_access(self): |
43 | 40 |
get_response().breadcrumb.append( ('backoffice/', _('Back Office')) ) |
44 |
- |