<!-- 意见页面 -->
<div ng-controller="NotionCtrl">
	<ion-header-bar class="bar-dark">
		<button class="button icon-left ion-ios-arrow-back button-clear sino-back-button" sino-modal-back-button="closeNotion()">返回</button>
		<h1 class="title">意见</h1>
		<button class="button button-icon icon" stop-event ng-click="changeDropDown()">排序</button>
	</ion-header-bar>

	<div class="list message-header-dropdown" ng-show="dropdown">
		<a class="item item-icon-left" ng-click="orderBy('node')">
			<i class="icon ion-navicon"></i>
			节点排序
		</a>
		<a class="item item-icon-left" ng-click="orderBy('time')">
			<i class="icon ion-clock"></i>
			时间排序
		</a>
	</div>

	<ion-content scroll="true" delegate-handle="mainScroll" class="has-header has-footer task-content view-task-content" ng-click="closeDropDown()">
		<sino-notion-list notions="notions" flow-type="{{notionConfig.flowType}}" record-id="{{notionConfig.recordId}}" sort-type="order"></sino-notion-list>
		<ion-list class="discussion-content">
			<ion-item ng-repeat="tempNotion in tempNotions" ng-if="tempNotion.show">
				<sino-temp-notion-item
				flow-type="{{notionConfig.flowType}}"
				record-id="{{notionConfig.recordId}}"
				notion-type="flow"
				notion="tempNotion.content"
				flow-notion-name="{{tempNotion.type}}"
				on-edit="setTempNotion(notion, tempNotion.type)"
				table-id="{{notionConfig.tableId}}"
				table-name="{{notionConfig.tableName}}">
					<p>
						<span>您的{{tempNotion.title}}：</span><br>
						<span ng-hide="tempNotion.content">
							<此处显示您的{{tempNotion.title}}>
						</span>
						<div compile="tempNotion.content" name="content" class="task-content" style="white-space:pre-wrap"></div>
					</p>
					<ion-option-button class="button-assertive" ng-if="tempNotion.content" ng-click="deleteNotion($index, tempNotion.type, event)">删除</ion-option-button>
				</sino-temp-notion-item>
			</ion-item>
		</ion-list>
	</ion-content>

	<div class="tabs tabs-icon-top">
		<div ng-repeat="tempNotion in tempNotions" ng-if="tempNotion.show">
			<sino-notion-edit-button
				flow-type="{{notionConfig.flowType}}"
				record-id="{{notionConfig.recordId}}"
				notion-type="flow"
				notion="tempNotion.content"
				flow-notion-name="{{tempNotion.type}}"
				on-edit="setTempNotion(notion, tempNotion.type)"
				class="button button-clear icon-left ion-chatbox-working"
				table-id="{{notionConfig.tableId}}"
				table-name="{{notionConfig.tableName}}"
				title="{{tempNotion.title}}"
			></sino-notion-edit-button>
		</div>
	</div>
</div>
