From 488d84633e944dda8381ce9e8fd99674702b9e8c Mon Sep 17 00:00:00 2001 From: Mika Havela Date: Wed, 6 Feb 2008 19:45:08 +0000 Subject: Changed the way the submenu-tabs is displayed. Now tabs are defined in the .menu files. git-svn-id: svn://svn.alpinelinux.org/acf/core/trunk@705 ab2d0c66-481e-0410-8bed-d214d4d58bed --- app/acf_www-controller.lua | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) (limited to 'app/acf_www-controller.lua') diff --git a/app/acf_www-controller.lua b/app/acf_www-controller.lua index 4e89db3..6b4bfdf 100644 --- a/app/acf_www-controller.lua +++ b/app/acf_www-controller.lua @@ -179,13 +179,10 @@ view_resolver = function(self) m=require("menubuilder") local menu = m.get_menuitems(self.conf.appdir) - -- A quick hack - submenu = {} - for k,v in pairs ( self.worker ) do - if type ( self.worker[k] ) == "function" then - table.insert (submenu, k) - end - end + -- Build the submenu table + local submenu = m.get_submenuitems(self.conf.appdir) + -- Show only tabs for current controller + submenu = submenu[pageinfo.controller] return function (viewtable) local template = haserl.loadfile (template) -- cgit v1.2.3