<ion-view view-title="我的发布">
    <ion-nav-bar class="bar-positive nav-bar-container" nav-bar-transition="ios" nav-bar-direction="exit" nav-swipe="">
        <ion-nav-back-button>
        </ion-nav-back-button>
        <ion-nav-buttons side="right">
            <button class="button  button-clear icon-left ion-ios-trash-outline" ng-click="close()">{{shouldShowDelete?'取消':'关闭'}}
            </button>
        </ion-nav-buttons>
    </ion-nav-bar>
    <ion-content>
        <!--下拉刷新-->
        <ion-refresher pulling-text="下拉刷新" on-refresh="load(true)">
        </ion-refresher>
        <ion-list  show-delete="shouldShowDelete">
            <div   ng-repeat="item in items">
                <ion-item class="item" ng-if="item.type==1" ng-click="detail(item)">
                    <h2>【{{item.begin_address | shortAddress}}】-【{{item.end_address | shortAddress}}】</h2>
                    <p>
                        <span style="float:left"><b style="color:orangered">￥{{item.price}}</b><em style="padding-left:3px;font-size:0.75em">起</em></span>
                        <span style="float:right">途经：{{item.midway_address | shortAddress}}</span>
                    </p>
                    <p><span style="float:left">联系人：{{item.contact_name}}</span> <span style="float:right">电话：{{item.contact_phone}}</span></p>
                    <ion-delete-button class="ion-minus-circled"
                                       ng-click="closeItem(item,$index)">
                    </ion-delete-button>
                </ion-item>
                <ion-item class="item item-thumbnail-left" ng-if="item.type==2" ng-click="detail(item)">
                    <img ng-src="{{item.truck.data.photo | truckPhoto}}" />
                    <h2 style="white-space:normal">【{{item.begin_address | shortAddress}}】-【{{item.end_address | shortAddress}}】<span style="color:gray;">({{item.title}})</span></h2>
                    <p><span style="float:left"><b style="color:orangered">￥{{item.price}}</b><em style="padding-left:3px;font-size:0.75em">起</em></span></p>
                    <p><span style="float:left">联系人：{{item.contact_name}}</span> <span style="float:right">电话：{{item.contact_phone}}</span></p>
                    <ion-delete-button class="ion-minus-circled"
                                       ng-click="closeItem(item,$index)">
                    </ion-delete-button>
                </ion-item>
              
            </div>
            </ion-list>
    <!--上拉更多-->
    <ion-infinite-scroll ng-if="filter.hasMore" on-infinite="load(false)" distance="10%"></ion-infinite-scroll>
</ion-content>
</ion-view>
