<ion-view cache-view="true">
	<ion-nav-title>
		<h1 class="title">所有联系人</h1>
	</ion-nav-title>
	<ion-nav-buttons side="left">
		<button class="button icon-left ion-ios-arrow-back button-clear sino-back-button" sino-nav-direction="back" sino-go-back-button>返回</button>
	</ion-nav-buttons>
	<ion-nav-buttons side="right">
		<span style="font-size:30px" class="ion-ios-reload" ng-show="!refreshing" stop-event ng-click="refresh()"></span>
		<ion-spinner icon="android" ng-show="refreshing" stop-event ng-click="refresh()" class="alluser-refresh"></ion-spinner>
	</ion-nav-buttons>

	<sino-breadcrumb class="bar bar-subheader" items="deptNavs" first="topDept" loading="loading" on-item-click="getDetail(item)"></sino-breadcrumb>

	<ion-content class="has-subheader" scroll="true" delegate-handle="deptuserTreeScrollView" on-scroll="onScroll(scrollTop)" ng-show="hasData">
		<div class="list" style="margin-top: -1px;">
			<div class="item item-icon-left sino-user-item item-icon-right" ng-repeat="user in currentDept.users | orderBy:'orderValue'" view-linker-detail="{{user.userId}}" ng-if="user.note === '1'">
				<sino-person-photo user-id="{{user.userId}}" size="32x32"></sino-person-photo>
				{{user.userName}}
				<i class="icon" sino-linker-favorite-button="{{user.userId}}" stop-event></i>
			</div>

			<div class="item item-icon-left sino-user-item" ng-repeat="dept in currentDept.depts | orderBy:'orderNo'" ng-click="getDetail(dept);">
				<i class="icon ion-ios-list"></i>
				{{dept.deptName}}
			</div>

		</div>
	</ion-content>

	<ion-content class="has-subheader" scroll="false" ng-if="!hasData">
		<div class="sino-depttree-nodata-message" ng-show="!hasData && !loading && !loadingError"><span class="sino-depttree-deptname">{{currentDept.text}}</span>部门没有用户。</div>

		<div class="sino-depttree-loadingerror-message" ng-if="!loading && loadingError">
			对不起，加载部门数据失败。
			<button class="button" ng-click="reloading()">重新加载数据</button>
		</div>

		<div class="sino-depttree-loading-message" ng-if="!hasData && loading">
			正在努力加载用户数据。
		</div>
	</ion-content>
</ion-view>
