Generalize the Javascript menu rendering into an API for templates that only refresh the menu when there are changes. Closes GitLab issue #511. Thanks to Daniel Carrico @daniel1113 for the report.

Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
This commit is contained in:
Roberto Rosario
2018-09-16 21:48:37 -04:00
parent 654f2a1ad2
commit fafdb538b3
10 changed files with 98 additions and 29 deletions

View File

@@ -3,11 +3,11 @@ from __future__ import unicode_literals
from django.conf.urls import url
from django.views.i18n import javascript_catalog, set_language
from .api_views import APIContentTypeList
from .api_views import APIContentTypeList, APITemplateView
from .views import (
AboutView, CheckVersionView, CurrentUserDetailsView, CurrentUserEditView,
CurrentUserLocaleProfileDetailsView, CurrentUserLocaleProfileEditView,
FaviconRedirectView, HomeView, LicenseView, MainMenuView,
FaviconRedirectView, HomeView, LicenseView,
ObjectErrorLogEntryListClearView, ObjectErrorLogEntryListView,
PackagesLicensesView, RootView, SetupListView, ToolsListView,
multi_object_action_view
@@ -22,7 +22,6 @@ urlpatterns = [
name='check_version_view'
),
url(r'^license/$', LicenseView.as_view(), name='license_view'),
url(r'^main_menu/$', MainMenuView.as_view(), name='main_menu_view'),
url(
r'^packages/licenses/$', PackagesLicensesView.as_view(),
name='packages_licenses_view'
@@ -78,4 +77,8 @@ api_urls = [
r'^content_types/$', APIContentTypeList.as_view(),
name='content-type-list'
),
url(
r'^templates/(?P<name>[-\w]+)/$', APITemplateView.as_view(),
name='template-detail'
),
]