1 (edited by apmuthu 04/26/2013 02:40:11 pm)

Topic: Dashboard breaks again?

Latest Dashboard theme and module installed and activated from the fa repo does not seem to have a menu tab for itself as was available earlier and shown in the wiki.

The current hg 3227 version shows it as in the attachment

Since the Dashboard Menu tab's contents like Dashboard Setup and Reminder Setup are now in the Miscellaneous Submenu of the Setup Menu, has the Menu Tab been dispensed with?

The company/*/js_cache had been flushed and the browser restarted on fresh login to no avail.

Is this because the Line 18 in modules/dashboard/dashboard.php is commented out (line 9-20):

class dashboard_app extends application
{
    var $widgets;
    var $apps;

    function dashboard_app()
    {
        $this->application("Dashboard", _($this->help_context = "&Dashboard"));

        //$this->add_module(_("Dashboard"));
        $this->widgets = array();
        $this->add_extensions();

This is so even though the lines 12-21 that call it in modules/dashboard/hooks.php are:

class hooks_dashboard extends hooks {
    var $module_name = 'dashboard';

    /*
        Install additonal menu options provided by module
    */
    function install_tabs($app) {

        $app->add_application(new dashboard_app);
    }
Post's attachments

NoDashboard_MenuTab.png 46.1 kb, file has never been downloaded. 

You don't have the permssions to download the attachments of this post.

Re: Dashboard breaks again?

It appears that it is the intended functionality to remove the Menu Tab.

Quote from forum post:

There was a dashboard tab in an early iteration because the module adds a new application to FA. It is hidden by the dashboard theme render module (~/themes/dashboard/renderer.php). Originally, only the dashboard tab displayed widgets, but by moving the menu to the side, it made more sense to make every application tab a dashboard and hide the dashboard tab itself. I forgot to hide it from the application list in the dashboard set up form.

Re: Dashboard breaks again?

I think the dashboard should be on option. I used a custom theme and have the dashboard tab activated.
It's really usefull as a main dashboard mainly because some widgets can be slow and I don't want to slow down (too much) my day-to-day workflow with heavy widget.

Example, I need to enter a customer payment, I press Sales (which display the top 10 customers) then I press payment and pay.

I have the top 100 customers on the dashboard tab for when I need id .


/Elax

Re: Dashboard breaks again?

@elax: You are right. It should be configurable to be either on a separate tab or in each tab. depending on bandwidth, latency and size of recordset the enduser should make an intelligent choice and I would hard code it to be on a separate tab anyway. Please provide patch for hardcoding it on a separate tab and / or making it configurable.

5 (edited by apmuthu 04/26/2013 06:07:15 pm)

Re: Dashboard breaks again?

If the config.php has:

    $hide_inaccessible_menu_items = 1;

then the Dashboard will not be visible as a menu tab. View it by setting above to 0 (default in FA).

Re: Dashboard breaks again?

I didn't do anything to make the dashboard tab appear. As I said I used the normal dashboard module, but my own theme. I understood (I might be wrong) the presence or not if the Dashboard was just a css decision.

/Elax

7 (edited by apmuthu 04/27/2013 02:40:50 pm)

Re: Dashboard breaks again?

The Dashboard menu tab appears only if the $hide_inaccessible_menu_items = 0; since it is disabled in the install (how to enable it in the install?) and even then it appears blank.

The patch needed is to enable all widgets to be available as menu items in the Dashboard menu tab and make it enabled and have the Dashboard functionality removed from other tabs. Possibly the widget display sql can have the WHERE clause tweaked to not care about the menu tab it is to be displayed in and make a decision to display it only if the Dashboard menu tab is selected.

Re: Dashboard breaks again?

Why do you need to remove dashboard functionality from other tab ?
Maybe it would be just easier to hide dashboard tab when it's empty (meaning when no widget have been assigned to it) and leave the user put widget wherever he needs to

Re: Dashboard breaks again?

To maintain consistency and backward compatibility, we can have all widgets restricted to the Dashboard Tab with the reminders showing up on the main Dashboard tab by default. This will also make for good help screenshots and menu guides as well.

Since during FA operation, the end user will be switching between tabs, no need to waste time in having widgets on non-Dashboard tabs.

Re: Dashboard breaks again?

I think the user should be able to chose on which tab if need wigdet (and if is ok to waste time or not). My initial point was only that an additional dashboard tab is handy.

Re: Dashboard breaks again?

where in the dashboard theme do we enable the dashboard menu tab or where do we enable it by default in the dashboard module install - the hooks.php is quite plain indeed and somewhere defaults are kicking in. The commented out add_module in it does not seem to work even if the comments are removed. Possibly it must be done prior to installation......or activation for a company atleast.....

Re: Dashboard breaks again?

It's the renderer.php module in the dashboard theme that creates the application tab list, as well as the menu

Re: Dashboard breaks again?

The renderer.php lines 112-114:

                foreach ($sel_application->modules as $module)
                {
                    echo "<p ".$first." class='menu_head'>".$module->name."</p>\n";

displays only those modules that are enabled and passed onto it. It appears that the Dashboard module remains inactive as far as ths is concerned even if it has been activated for the company under use.

Therefore during installation, it must be explicitly be made active in the web root's installed_extensions.php and accordingly passed on to the one under the company/#/installed_extensions.php as well.

The non standard approach to having the installed_extensions.php's array subscript "active" as being true/false or 0/1 in the webroot 's installed_extensions.php and in the company/#/installed_extensions.php may cause problems - better to standardise on either the boolean variant or the integer flag method.

The dashboard module's name in line 13 of hooks.php - is it's case sensitivity important:


    var $module_name = 'dashboard';

Lines 18-27 of the dashboard module's dashboard.php:

        //$this->add_module(_("Dashboard"));
        $this->widgets = array();
        $this->add_extensions();

        $this->apps = array("orders"=>_("Sales"),
                        "AP"=>_("Purchases"),
                        "stock"=>_("Items and Inventory"),
                        "manuf"=>_("Manufacturing"),
                        "GL"=>_("Banking and General Ledger"),
                        "Dashboard"=>_("Dashboard"));

also has case sensitive issue for module name and the commented out add_module line.

Also a list of translatable entries should be placed in an empty.po or some sample language file like en_US.po/mo