<!--

    Copyright © 2016-2018 The Thingsboard Authors

    Licensed under the Apache License, Version 2.0 (the "License");
    you may not use this file except in compliance with the License.
    You may obtain a copy of the License at

        http://www.apache.org/licenses/LICENSE-2.0

    Unless required by applicable law or agreed to in writing, software
    distributed under the License is distributed on an "AS IS" BASIS,
    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    See the License for the specific language governing permissions and
    limitations under the License.

-->
<md-grid-list class="tb-home-links" md-cols="{{vm.cols}}" md-row-height="280px">
	<md-grid-tile md-colspan="2" md-colspan-gt-sm="{{vm.sectionColspan(section)}}" ng-repeat="section in vm.model">
		<md-card style='width: 100%;'>
			<md-card-title>
				<md-card-title-text>
					<span translate class="md-headline">{{ section.name }}</span>
				</md-card-title-text>
			</md-card-title>
			<md-card-content>
				<md-grid-list md-row-height="170px" md-cols="{{section.places.length}}" md-cols-gt-md="{{section.places.length}}">
					<md-grid-tile class="card-tile" ng-repeat="place in section.places">
						<md-button class="tb-card-button md-raised md-primary" layout="column" ui-sref="{{place.state}}">
							<md-icon class="material-icons tb-md-96" aria-label="{{place.icon}}">{{place.icon}}</md-icon>
							<span translate>{{place.name}}</span>
						</md-button>
					</md-grid-tile>
				</md-grid-list>
			</md-card-content>
		</md-card>
	</md-grid-tile>
</md-grid-list>