|
|
<ion-view view-title="Travel"> <ion-content> <div class="item item-avatar"> <img ng-src="img/{{travel.modality}}.png" /> <div class="item-note o-text-right"> <a class="badge badge-calm" href="#/app/users/{{travel.owner}}">{{travel.owner}}</a> </div> <h2>{{travel.title}}</h2> <div class="">{{travel.date | date:"dd/MM HH:mm a"}}</div> </div> <div class="item item-body"> <div class='o-float-right o-text-right'> <span class="badge badge-balanced" ng-show="travel.collectivized">Collectivized</span>
<br> <div class="o-mini-text" ng-show="travel.package"> <div ng-show="travel.modality=='offering'">can carry package <img src="img/package.png" class="o-imgMenu" /></div> <div ng-show="travel.modality=='asking'">need to carry package <img src="img/package.png" class="o-imgMenu" /></div> </div> </div> <p><img class='o-imgTitle' src="img/from-to.png" />{{travel.from}} - {{travel.to}}</p> <p> <div ng-show="travel.modality=='offering'">nº car seats: {{travel.seats}}</div> <div ng-show="travel.modality=='asking'">nº people: {{travel.seats}}</div> </p> <p class="o-bold">{{travel.description}}</p> <br> <p ng-show="travel.phone"> <img class='o-imgMenu' src="img/smartphone.png" /> {{travel.phone}} </p> <p ng-show="travel.telegram"> <img class='o-imgMenu' src="img/telegram.png" /> {{travel.telegram}} </p>
<div ng-show="storageusername"> <p class='text-right' ng-show="storageusername!==travel.owner"> <div ng-show="arrayObjectIndexOf(joins, storageusername, 'joinedUsername')==-1"> <a ng-show="travel.modality=='offering'" ng-click="joinTravel()" href="#" class="button button-calm o-pull-right">Ask to join</a> <a ng-show="travel.modality=='asking'" ng-click="joinTravel()" href="#" class="button button-calm o-pull-right">Offer car</a> <a ng-show="travel.modality=='package'" ng-click="joinTravel()" href="#" class="button button-calm o-pull-right">Offer car</a> </div>
<div ng-show="arrayObjectIndexOf(joins, storageusername, 'joinedUsername')!=-1"> <a ng-show="travel.modality=='offering'" ng-click="unjoinTravel()" href="#" class="button button-assertive o-pull-right">Unjoin</a> <a ng-show="travel.modality=='asking'" ng-click="unjoinTravel()" href="#" class="button button-assertive o-pull-right">Unoffer car</a> <a ng-show="travel.modality=='package'" ng-click="unjoinTravel()" href="#" class="button button-assertive o-pull-right">Unoffer car</a> </div> </p> <p ng-show="storageusername==travel.owner" class="text-right"> <a href="#" ng-click="deleteTravel()" class="button button-assertive o-pull-right">Delete</a> </p> </div> </div> <div class="item item-body" ng-show="joins[0]"> Joined users:<br> <a ng-repeat="join in 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="comments[0]"> Comments:<br> <a ng-repeat="comment in 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-calm right">New comment</a> </div> <form class="list" ng-show="doingNewComment"> <label class="item item-input item-floating-label"> <span class="input-label">Comment</span> <input ng-model="newComment.comment" type="text" placeholder="Comment"> </label>
<button ng-click="closeNewComment()" class="button button-assertive"> Cancel </button> <button ng-click="doNewComment()" class="button button-calm"> Post comment </button> </form> </div> </ion-content> </ion-view>
|