X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=portal%2Fplatformsview.py;h=8c7640b46b93b7075e1525226c5d366b83301fcc;hb=4b6622264b59de3edb433a1f886faa2069a11960;hp=0a6677e345c8f68946c872f4d4b64f65bf5947d1;hpb=9d9c9d79c1bb1b54d1c402a7f4c0b895e294e5ef;p=myslice.git diff --git a/portal/platformsview.py b/portal/platformsview.py index 0a6677e3..8c7640b4 100644 --- a/portal/platformsview.py +++ b/portal/platformsview.py @@ -2,9 +2,9 @@ from manifold.core.query import Query from unfold.page import Page from unfold.loginrequired import FreeAccessView -from ui.topmenu import topmenu_items, the_user +from ui.topmenu import topmenu_items_live, the_user -from plugins.hazelnut import Hazelnut +from plugins.querytable import QueryTable # View for platforms class PlatformsView(FreeAccessView): @@ -18,8 +18,7 @@ class PlatformsView(FreeAccessView): page.enqueue_query(platform_query) page.expose_js_metadata() - page.expose_queries() - platformlist = Hazelnut( + platformlist = QueryTable( page = page, title = 'List', domid = 'checkboxes', @@ -27,6 +26,7 @@ class PlatformsView(FreeAccessView): query = platform_query, query_all = platform_query, checkboxes = False, + init_key = 'platform', datatables_options = { 'iDisplayLength': 10, 'bLengthChange' : True, @@ -42,10 +42,12 @@ class PlatformsView(FreeAccessView): # more general variables expected in the template context['title'] = 'Platforms connected to MySlice' # the menu items on the top - context['topmenu_items'] = topmenu_items('Platforms', self.request) + context['topmenu_items'] = topmenu_items_live('Platforms', page) # so we can sho who is logged context['username'] = the_user(self.request) context.update(page.prelude_env()) + context['layout_1_or_2']="layout-unfold2.html" if not context['username'] else "layout-unfold1.html" + return context