You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

76 lines
3.6 KiB

  1. <ion-view view-title="Travel">
  2. <ion-content>
  3. <div class="item item-avatar">
  4. <img ng-src="img/{{travel.modality}}.png" />
  5. <div class="item-note o-text-right">
  6. <a class="badge badge-calm" href="#/app/users/{{travel.owner}}">{{travel.owner}}</a>
  7. </div>
  8. <h2>{{travel.title}}</h2>
  9. <div class="">{{travel.date | date:"dd/MM HH:mm a"}}</div>
  10. </div>
  11. <div class="item item-body">
  12. <div class='o-float-right o-text-right'>
  13. <span class="badge badge-balanced" ng-show="travel.collectivized">Collectivized</span>
  14. <br>
  15. <div class="o-mini-text" ng-show="travel.package">
  16. <div ng-show="travel.modality=='offering'">can carry package <img src="img/package.png" class="o-imgMenu" /></div>
  17. <div ng-show="travel.modality=='asking'">need to carry package <img src="img/package.png" class="o-imgMenu" /></div>
  18. </div>
  19. </div>
  20. <p><img class='o-imgTitle' src="img/from-to.png" />{{travel.from}} - {{travel.to}}</p>
  21. <p>
  22. <div ng-show="travel.modality=='offering'">nº car seats: {{travel.seats}}</div>
  23. <div ng-show="travel.modality=='asking'">nº people: {{travel.seats}}</div>
  24. </p>
  25. <p class="o-bold">{{travel.description}}</p>
  26. <br>
  27. <p ng-show="travel.phone">
  28. <img class='o-imgMenu' src="img/smartphone.png" /> {{travel.phone}}
  29. </p>
  30. <p ng-show="travel.telegram">
  31. <img class='o-imgMenu' src="img/telegram.png" /> {{travel.telegram}}
  32. </p>
  33. <div ng-show="storageusername">
  34. <p class='text-right' ng-show="storageusername!==travel.owner">
  35. <a ng-show="travel.modality=='offering'" ng-click="joinTravel()" href="#" class="button button-calm o-pull-right">Ask to join</a>
  36. <a ng-show="travel.modality=='asking'" ng-click="joinTravel()" href="#" class="button button-calm o-pull-right">Offer car</a>
  37. <a ng-show="travel.modality=='package'" ng-click="joinTravel()" href="#" class="button button-calm o-pull-right">Offer car</a>
  38. </p>
  39. <p ng-show="storageusername==travel.owner" class="text-right">
  40. <a href="#" ng-click="deleteTravel()" class="button button-assertive o-pull-right">Delete</a>
  41. </p>
  42. </div>
  43. </div>
  44. <div class="item item-body" ng-show="joins[0]">
  45. Joined users:<br>
  46. <a ng-repeat="join in joins" ng-href="#/app/users/{{join.joinedUsername}}" class="button button-small button-dark">
  47. {{join.joinedUsername}}<br>
  48. </a>
  49. </div>
  50. <div class="item item-body">
  51. <div ng-show="comments[0]">
  52. Comments:<br>
  53. <a ng-repeat="comment in comments" ng-href="#/app/users/{{comment.commentUsername}}" class="item">
  54. <h3>{{comment.commentUsername}}</h3>
  55. <p>{{comment.comment}}</p>
  56. </a>
  57. </div>
  58. <a ng-click="showNewComment()" ng-show="!doingNewComment" class="button button-calm right">New comment</a>
  59. <form class="list" ng-show="doingNewComment">
  60. <label class="item item-input item-floating-label">
  61. <span class="input-label">Comment</span>
  62. <input ng-model="newComment.comment" type="text" placeholder="Comment">
  63. </label>
  64. <button ng-click="closeNewComment()" class="button button-assertive">
  65. Cancel
  66. </button>
  67. <button ng-click="doNewComment()" class="button button-calm">
  68. Post comment
  69. </button>
  70. </form>
  71. </div>
  72. </ion-content>
  73. </ion-view>