|
|
<ion-view view-title="{{'Travel' | translate}}"> <ion-content> <ion-refresher pulling-text="{{'Pull_to_refresh' | translate}}..." on-refresh="doRefresh()"> </ion-refresher> <div class="item item-icon-left"> <div class="item-note"> <p> <a class="button" ng-href="#/app/users/{{travel.user._id}}"> <img class="o_userImgCircularMini" ng-src="{{travel.user.avatar}}"></img> {{travel.user.username}} <i ng-show="travel.user.validated" class="ion-checkmark-circled ct_blue300"></i> </a> <p class="text-right"> <a target="_blank" ng-click="openTravelLink(travel._id)" class="button button-small o_grey300"> <i class="icon ion-share" style="margin-left:-14px;"></i> </a> <a ng-href="#/app/editTravel/{{travel._id}}" class="button button-small o_grey600" ng-show="storageuser._id==travel.user._id"> <i class="icon ion-edit" style="margin-left:-14px;"></i> </a> <a ng-click="deleteTravel()" class="button button-small o_bRed" ng-show="storageuser._id==travel.user._id"> <i class="icon ion-trash-a" style="margin-left:-14px;"></i> </a> </p> </p> </div> <h2> <i ng-show="travel.type=='offering'" class="icon ion-android-car"></i> <i ng-show="travel.type=='asking'" class="icon ion-help"></i> <i ng-show="travel.type=='package'" class="icon ion-ios-box"></i> {{travel.title}}</h2> <div class="">{{travel.date | date:"dd/MM HH:mm a"}}</div> </div>
<leaflet width="100%" height="40%" markers="markers" center="center" tiles="tiles" id="map-simple-map"></leaflet>
<div class="item item-icon-left"> <i class="icon ion-ios-location-outline"></i>{{'From' | translate}}: {{travel.from.name}} </div> <div class="item item-icon-left"> <i class="icon ion-ios-location"></i>{{'To' | translate}}: {{travel.to.name}} </div>
<div class="item item-icon-left"> <i class="icon ion-clipboard"></i> {{travel.description}} </div> <div class="item item-icon-left" ng-show="travel.package"> <i class="icon ion-ios-box"></i> {{'package' | translate}} </div> <a class="item item-icon-left" ng-show="travel.user.telegram" ng-click="openTelegram(travel.user.telegram)"> <i class="icon ion-paper-airplane"></i> Telegram: @{{travel.user.telegram}} </a> <div class="item item-icon-left" ng-show="travel.user.phone"> <i class="icon ion-ios-telephone"></i> {{travel.user.phone}} </div> <div ng-show="storageuser._id!=travel.user._id" class="text-right"> <p class='text-right'> <div ng-show="userHasJoined(travel.joinPetitions, storageuser._id)==-1"> <div ng-show="userHasJoined(travel.joins, storageuser._id)==-1"> <a ng-show="travel.type=='offering'" ng-click="joinTravel()" class="button button-small o_purple300">{{'Ask_to_join' | translate}}</a> <a ng-show="travel.type=='asking'" ng-click="joinTravel()" class="button button-small o_purple300">{{'Offer_car' | translate}}</a> <a ng-show="travel.type=='package'" ng-click="joinTravel()" class="button button-small o_purple300">{{'Offer_car' | translate}}</a> </div> </div>
<div ng-show="userHasJoined(travel.joinPetitions, storageuser._id)>-1"> <a ng-show="travel.type=='offering'" ng-click="unjoinTravel()" class="button button-small o_purple100">{{'Unjoin' | translate}}</a> <a ng-show="travel.type=='asking'" ng-click="unjoinTravel()" class="button button-small o_purple100">{{'Unoffer_car' | translate}}</a> <a ng-show="travel.type=='package'" ng-click="unjoinTravel()" class="button button-small o_purple100">{{'Unoffer_car' | translate}}</a> </div>
<div ng-show="userHasJoined(travel.joins, storageuser._id)>-1"> You have been accepted! <a ng-show="travel.type=='offering'" ng-click="leaveTravel()" class="button button-small o_bRed">{{'Leave' | translate}}</a> <a ng-show="travel.type=='asking'" ng-click="" class="button button-small o_purple100">{{'Leave' | translate}}</a> <a ng-show="travel.type=='package'" ng-click="" class="button button-small o_purple100">{{'Leave' | translate}}</a> </div> </p> </div> <div class="item item-body" ng-show="travel.collectivized"> <div class='row'> <div class='col o-text-right'> <p> <span class="o-badgeCollectivized">{{'Collectivized' | translate}}</span> </p> </div> </div> <br> </div>
<div class="item item-icon-left"> <i class="icon ion-ios-people"></i> <!--<button class="o_floatRight button o_grey600" ng-show="travel.user._id==storageuser._id">
<i class="icon ion-edit"></i> </button>--> <p ng-show="travel.seats>0">{{travel.joins.length}}/{{travel.seats}} {{'seats' | translate}}</p> <a ng-repeat="join in travel.joins" ng-href="#/app/users/{{join._id}}"> <img class="o_userImgCircularMini" ng-src="{{join.avatar}}"></img> </a> </div> <div ng-show="travel.joinPetitions.length>0"> <p>{{'Pendent_petitions' | translate}}</p> <div class="row" ng-repeat="joinPetition in travel.joinPetitions"> <div class="col col-90"> <a class="item item-avatar" ng-href="#/app/users/{{joinPetition._id}}"> <img class="o_userImgCircularMini" ng-src="{{joinPetition.avatar}}"></img> <h2>{{joinPetition.username}}</h2> </a> </div> <div class="col" ng-show="travel.user._id==storageuser._id"> <div class="button button-small o_grey600" ng-click="declineJoin(joinPetition)"> <i class="icon ion-close"></i> </div><br> <div class="button button-small o_purple400" ng-click="acceptJoin(joinPetition)"> <i class="icon ion-checkmark"></i> </div><br> </div> </div> </div>
<!--<div class="item item-body" ng-show="travel.joins[0]">
{{'Joined_users' | translate}}:<br> <a ng-repeat="join in travel.joins" ng-href="#/app/users/{{join.joinedUsername}}" class="button button-small button-dark"> <img ng-src="img/avatars/{{join.joinedAvatar}}.png" class="o-img-joined" />{{join.joinedUsername}}<br> </a> </div>--> <div class="item item-body"> <div ng-show="travel.comments[0]"> {{'Comments' | translate}}:<br> <a ng-repeat="comment in travel.comments" ng-href="#/app/users/{{comment.commentUsername}}" class="item"> <h3><img ng-src="img/avatars/{{comment.commentAvatar}}.png" class="o-img-joined" />{{comment.commentUsername}}</h3> <p>{{comment.comment}}</p> </a> </div> <div ng-show="storageusername"> <a ng-click="showNewComment()" ng-show="!doingNewComment" class="button button-small button-calm right">{{'New_comment' | translate}}</a> </div> <form class="list" ng-show="doingNewComment"> <label class="item item-input item-floating-label"> <input ng-model="newComment.comment" type="text" placeholder="Comment"> </label>
<div ng-click="closeNewComment()" class="button button-small button-assertive"> {{'Cancel' | translate}} </div> <div ng-click="doNewComment()" ng-show="newComment.comment" class="button button-small button-calm"> {{'Post_comment' | translate}} </div> </form> </div> </ion-content> </ion-view>
|