$templates.shared.doctype Untitled Document {= expand(templates.shared.content_type); =}
{= subroutine(generate_submenu(string itemsnode, bool expanded, string profile_name), ( # itemsnode; string item; foreach item (itemsnode) ( # If this is a "leaf", display the view button if ($(item . ".type") eq "view") then ( # Start the div "
"; # url = report_url(node_name(profile_name), $(item . ".view_name"), "internal.active_statistics_view = " . $(item . ".view_name")); # string profile_name = profile; string page_name = $(item . ".view_name"); ""; # Add the img tag ""; # if (node_name(item) eq internal.active_statistics_view) then ("menu_leaf_selected.gif") else ("menu_leaf.gif"); # Add the label $(item . ".label"); # Close the link ""; # End the div "
\n"; ); # if view # If it's a group, display it recursively else ( # Start the div "
"; ""; ""; # Add the label $(item . ".label"); # Close the link ""; # End the div "
\n"; # Recursively generate the submenu (hidden) generate_submenu(item . ".items", false, profile_name); ); # if group ); # foreach item )); # generate_submenu() # Generate the left menu from the statistics.report_menu node generate_submenu("templates.config.left_navigation_structure", true, profile_name); # debug_message("building report menu complete\n"); clear_session_changes(); =}