script(data-id="location-dashboard", type="text/ng-template")
    div(id="location-dashboard")
        div(class="grid-container grid-dir",
                data-columns="2",
                data-width="478",
                data-max-width="478",
                data-height="40",
                data-max-height="305",
                data-gutter="8")
            div(class="widget grid-widget", data-ng-repeat="location in locations")
                div(class="widget-header")
                    b: a(href="#", data-ng-href="{{g.dashboard}}/materialAtLocation/location/{{location.code}}", title="{{location.name || location.code}}: {{location.desc || ''}}") {{location.location || location.code}}
                    div(class="pull-right")
                        a(data-ng-href="{{g.dashboard}}/planningAtLocation/location/{{location.code}}")<span class="fa fa-bar-chart-o fa-lg"></span>
                        a(href="#", class="widget-toggle-btn")<span data-ng-click="syncLocation($event, location.code)", class="fa fa-plus"></span>
                div(class="widget-body")
                    section(class="widget-legend")
                        div(class="inset")
                            ul
                                li(class="icon-container", data-ng-repeat="action in actioncolorsKeys")
                                    span(class="icon-action", data-ng-style="{'background-color': actioncolors[action]}")
                                    span {{ locale(action) }}
                    section(class="scrollable", style="height: 254px; width: 478px")
                        div(data-ng-hide="location.materials.length")
                            h2(style="text-align:center;margin-top:95px;font-size:25px;") #{__("No Materials")}
                        div(data-ng-show="location.materials.length")
                            div(class="square-badge ng-cloak", data-ng-style="{'border-color': actioncolors[material.currentAction]}", data-ng-repeat="material in location.materials | orderBy : 'code'", data-ng-hide="material.ignore", title="{{material.code}}: {{material.desc}}", data-ng-click="gotoMaterialDetail(location.code, material.code)")
                                header
                                    b {{getMaterialName(material) || "&nbsp;"}}
                                section
                                    h3 <span class="text-on-hand" ng-style="{fontSize: fontValue}">{{setFontSize(checkValue(material.onHand)) | number:2 }}</span>&nbsp;<span class="text-uom" ng-style="{fontSize: fontValue}">{{material.uom}}</span>
