<!-- 收文单列表页面 -->
<ion-view ng-controller="ArchivesInceptGroupCtrl" cache-view="false">
	<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>
		<i class="button button-icon icon ion-ios-reloading" ng-show="loading"></i>
	</ion-nav-buttons>

	<ion-content class="task-list has-header">
		<sino-list-tabs name="xiugai">
			<sino-list-pane title="未签收" cache-array="groupCtrl.todos">
        <ion-list>
				<ion-item class="item item-avatar" ng-repeat="item in groupCtrl.todos.items track by item.id" ng-click="groupCtrl.toDetail(item)">
					<sino-person-photo user-id="{{item | prewriteidfilter}}"></sino-person-photo>
					<h2>{{item.subject}}</h2>
					<p>
						<span>来文单位：{{item.fawenjiguan}}</span><br/>
						<span>收文时间：{{item.delivereddate}}</span>
					</p>
          <ion-option-button
            class="button-assertive ion ion-android-delete"
            stop-event
            sino-click="groupCtrl.remove(groupCtrl.todos, item)"
            sino-click-title="正在删除收文单..."
            ng-if="true"></ion-option-button>
				</ion-item>
        </ion-list>
			</sino-list-pane>

			<sino-list-pane title="已签收" cache-array="groupCtrl.relatedList">
        <ion-list>
				<ion-item class="item item-avatar" ng-repeat="item in groupCtrl.relatedList.items track by item.id" ng-click="groupCtrl.toDetail(item)">
					<sino-person-photo user-id="{{item.userList | writeuseridfilter}}" ></sino-person-photo>
					<h2>{{item.subject}}</h2>
					<p>
						<span>来文单位：{{item.fawenjiguan}}</span><br/>
            <span>收文时间：{{item.delivereddate}}</span>
					</p>
          <ion-option-button
            class="button-assertive ion ion-android-delete"
            stop-event
            sino-click="groupCtrl.remove(groupCtrl.relatedList, item)"
            sino-click-title="正在删除收文单..."
            ng-if="true"></ion-option-button>
				</ion-item>
        </ion-list>
			</sino-list-pane>
		</sino-list-tabs>
	</ion-content>
</ion-view>
