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.

86 lines
4.5 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. <div ng-show="arrayObjectIndexOf(joins, storageusername, 'joinedUsername')==-1">
  36. <a ng-show="travel.modality=='offering'" ng-click="joinTravel()" href="#" class="button button-calm o-pull-right">Ask to join</a>
  37. <a ng-show="travel.modality=='asking'" ng-click="joinTravel()" href="#" class="button button-calm o-pull-right">Offer car</a>
  38. <a ng-show="travel.modality=='package'" ng-click="joinTravel()" href="#" class="button button-calm o-pull-right">Offer car</a>
  39. </div>
  40. <div ng-show="arrayObjectIndexOf(joins, storageusername, 'joinedUsername')!=-1">
  41. <a ng-show="travel.modality=='offering'" ng-click="unjoinTravel()" href="#" class="button button-assertive o-pull-right">Unjoin</a>
  42. <a ng-show="travel.modality=='asking'" ng-click="unjoinTravel()" href="#" class="button button-assertive o-pull-right">Unoffer car</a>
  43. <a ng-show="travel.modality=='package'" ng-click="unjoinTravel()" href="#" class="button button-assertive o-pull-right">Unoffer car</a>
  44. </div>
  45. </p>
  46. <p ng-show="storageusername==travel.owner" class="text-right">
  47. <a href="#" ng-click="deleteTravel()" class="button button-assertive o-pull-right">Delete</a>
  48. </p>
  49. </div>
  50. </div>
  51. <div class="item item-body" ng-show="joins[0]">
  52. Joined users:<br>
  53. <a ng-repeat="join in joins" ng-href="#/app/users/{{join.joinedUsername}}" class="button button-small button-dark">
  54. <img ng-src="img/avatars/{{join.joinedAvatar}}.png" class="o-img-joined" />{{join.joinedUsername}}<br>
  55. </a>
  56. </div>
  57. <div class="item item-body">
  58. <div ng-show="comments[0]">
  59. Comments:<br>
  60. <a ng-repeat="comment in comments" ng-href="#/app/users/{{comment.commentUsername}}" class="item">
  61. <h3><img ng-src="img/avatars/{{comment.commentAvatar}}.png" class="o-img-joined" />{{comment.commentUsername}}</h3>
  62. <p>{{comment.comment}}</p>
  63. </a>
  64. </div>
  65. <div ng-show="storageusername">
  66. <a ng-click="showNewComment()" ng-show="!doingNewComment" class="button button-calm right">New comment</a>
  67. </div>
  68. <form class="list" ng-show="doingNewComment">
  69. <label class="item item-input item-floating-label">
  70. <span class="input-label">Comment</span>
  71. <input ng-model="newComment.comment" type="text" placeholder="Comment">
  72. </label>
  73. <button ng-click="closeNewComment()" class="button button-assertive">
  74. Cancel
  75. </button>
  76. <button ng-click="doNewComment()" class="button button-calm">
  77. Post comment
  78. </button>
  79. </form>
  80. </div>
  81. </ion-content>
  82. </ion-view>