<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="app-link-bottom"></div>
                <div class="row app-link">
                    <div class="col-25">
                        <a ng-click="add()">
                            <div class="app-link-item">
                                <i class="i-applink-add"></i>
                                <span>发布车源</span>
                            </div>
                        </a>
                    </div>
                </div>
                <div class="app-link-bottom"></div>
                <div class="list">
                    <a class="item" ng-repeat="item in items" ng-click="detail(item)">

                        <h2>从{{item.begin_address}}到{{item.end_address}}</h2>
                        <p>价格:{{item.price}},途经:{{item.midway_address}}</p>
                        <p>联系人:{{item.contact_name}},电话{{item.contact_phone}}</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 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>
