<ion-view view-title="货源">
    <ion-nav-buttons side="right">
        <button class="button ion-navicon  icon-right button-clear " ng-click="toggleRight()"></button>
    </ion-nav-buttons>
    <ion-side-menus enable-menu-with-back-views="false">
        <ion-side-menu-content>
            <ion-content>
                <!--下拉刷新-->
                <ion-refresher pulling-text="下拉刷新" on-refresh="load(true)">
                </ion-refresher>
                <div class="row app-link headbck">
                    <div class="col-33">
                        <a ng-click="add()">
                            <div class="app-link-item">
                                <i class="i-applink-addcar"></i>
                                <span>发布货源</span>
                            </div>
                        </a>
                    </div>
                    <div class="col-33">
                        <a ng-click="goCar()">
                            <div class="app-link-item">
                                <i class="i-applink-findgoods"></i>
                                <span>找车源</span>
                            </div>
                        </a>
                    </div>
                    <div class="col-34">
                        <a ng-click="toggleRight()">
                            <div class="app-link-item">
                                <i class="i-applink-search"></i>
                                <span>搜索</span>
                            </div>
                        </a>
                    </div>
                </div>          
                <div class="list">
                    <a class="item" ng-repeat="item in items" 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> 
                    </a>
                    <a class="item item-thumbnail-left" ng-if="items.length==0">
                        <p style="margin-top:25px;margin-left:12%">没有找到货源信息</p>
                    </a>
                </div>

                <!--上拉更多-->
                <ion-infinite-scroll ng-if="filter.hasMore" on-infinite="load(false)" distance="10%"></ion-infinite-scroll>

            </ion-content>   
        </ion-side-menu-content>
        <ion-side-menu width="220" side="right">
            <ion-content>
                <div class="list">
                    <div class="padding">
                        <label class="item item-input">
                            <input ng-model="filter.begin_address" type="text" placeholder="出发地">
                        </label>
                        <label class="item item-input">
                            <input ng-model="filter.end_address" type="text" placeholder="抵达地">
                        </label>
                        <label class="item item-input">
                            <input ng-model="filter.midway_address" type="text" placeholder="途经地">
                        </label> 
                        <button class="button button-assertive button-block button-radius-full" ng-click="toggleRight()">应用</button>
                    </div>
                </div>
            </ion-content>
        </ion-side-menu>
    </ion-side-menus>
</ion-view>
