<%inherit file="//layout/view.html" /> <%namespace file="//view/_helpers.html" import="*"/> <%namespace name="lib" file="//lib.html" import="*"/> <%! import math headerPanels = ["appHeader", "navigationHeader"] upperPanels = ["viewHeader", "splSearchControls-inline", "mainSearchControls"] renderingErrors = [] %> <%def name="css()"> <% parent.css() %> <%lib:stylesheet_tags files="${['/static/css/dashboard.css']}" /> <%def name="js()"> <% parent.js() %> <%def name="getTitleForPanel(modules, panelName)"> % for module in modules[panelName]: % if module.has_key('params'): % if module["params"].has_key("group") :

${module["params"]["groupLabel"] | h}

<% break %> % endif % endif % endfor <%doc> Takes an array of layoutPanel strings, all of which are assumed to be for a particular row N and column M In other words, everything within a particular rounded-corner panel. There will be so called 'ungrouped' layout panels as well as 'grouped' ones. <%def name="getDashboardPanel(modules, panelGroup)"> % if VIEW.get('nativeObjectMode','')=='SimpleDashboard' and VIEW['canWrite'] is True and VIEW['hasRowGrouping'] is False:
% if len(panelGroup) > 0: % for module in modules[panelGroup[0]]: % if module.get('intersect'): ${_('Edit')} % endif % endfor % endif
% else:
% endif % if (len(panelGroup) > 0 ) : <%call expr="getTitleForPanel(modules, panelGroup[0])"> % else : <% renderingErrors.append("unable to find a group"); %> Error - this should not occur % endif
% for groupName in panelGroup : % if (groupName.find("_grp") == -1) : <%call expr="parent.buildPanelContents(modules, groupName)"> % endif % endfor <% numberOfGroups = 0; groupWidth=100 for groupName in panelGroup : if (groupName.find("_grp") != -1) : numberOfGroups = numberOfGroups+1; if (numberOfGroups):groupWidth = math.floor(100 / numberOfGroups) %> % for groupName in panelGroup : % if (groupName.find("_grp") != -1) :
<%call expr="parent.buildPanelContents(modules, groupName)">
% endif % endfor
% if "messaging" in modules : <%call expr="parent.buildSimplePanelContainer(modules, 'messaging')"> % endif
% for panelName in headerPanels : <%call expr="parent.buildSimplePanelContainer(modules, panelName)"> % endfor
% for panelName in upperPanels : <%call expr="parent.buildSimplePanelContainer(modules, panelName)"> % endfor ## the maximum number of rows a dashboard can have is 50 % for rowNumber in range(1,51): <%call expr="parent.getFloatLayoutRow(modules, rowNumber)"> % endfor