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.

101 lines
5.2 KiB

8 years ago
8 years ago
8 years ago
8 years ago
  1. <ion-view view-title="{{'Travel' | translate}}">
  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. <p>
  7. <a class="o-badge-calm" href="#/app/users/{{travel.owner}}">{{travel.owner}}</a>
  8. </p>
  9. <p ng-show="storageusername==travel.owner" class="text-right">
  10. <a ng-click="deleteTravel()" class="button button-small button-assertive o-pull-right"><i class="icon ion-trash-a"></i></a>
  11. </p>
  12. </div>
  13. <h2>{{travel.title}}</h2>
  14. <div class="">{{travel.date | date:"dd/MM HH:mm a"}}</div>
  15. </div>
  16. <div class="item item-body">
  17. <div class='row'>
  18. <p class="o-bold">{{travel.description}}</p>
  19. </div>
  20. <div class="row">
  21. <p><img class='o-imgTitle' src="img/from-to.png" />{{travel.from}} --> {{travel.to}}</p>
  22. </div>
  23. <div class='row'>
  24. <div class='col'>
  25. <p ng-show="travel.phone">
  26. <img class='o-imgMenu' src="img/smartphone.png" /> {{travel.phone}}
  27. </p>
  28. <p ng-show="travel.telegram">
  29. <!--<a ng-href="https://telegram.me/{{travel.telegram}}" target="_blank" class="button">-->
  30. <img class='o-imgMenu' src="img/telegram.png" /> @{{travel.telegram}}
  31. <!--</a>-->
  32. </p>
  33. </div>
  34. <div class='col o-text-right'>
  35. <p ng-show="travel.collectivized">
  36. <span class="o-badgeCollectivized">{{'Collectivized' | translate}}</span>
  37. </p>
  38. <p ng-show="travel.package">
  39. <div class="o-mini-text">
  40. <div ng-show="travel.modality=='offering'">{{'Can_carry_package' | translate}} <img src="img/package.png" class="o-imgMenu" /></div>
  41. <div ng-show="travel.modality=='asking'">{{'Need_to_carry_package' | translate}} <img src="img/package.png" class="o-imgMenu" /></div>
  42. </div>
  43. </p>
  44. <p>
  45. <div ng-show="travel.modality=='offering'">{{'n_Seats' | translate}}: {{travel.seats}}</div>
  46. <div ng-show="travel.modality=='asking'">{{'n_People' | translate}}: {{travel.seats}}</div>
  47. </p>
  48. </div>
  49. </div>
  50. <br>
  51. <div ng-show="storageusername && storageusername!=travel.owner" class="text-right">
  52. <p class='text-right'>
  53. <div ng-show="arrayObjectIndexOf(travel.joins, storageusername, 'joinedUsername')==-1">
  54. <a ng-show="travel.modality=='offering'" ng-click="joinTravel()" class="button button-calm o-pull-right">{{'Ask_to_join' | translate}}</a>
  55. <a ng-show="travel.modality=='asking'" ng-click="joinTravel()" class="button button-calm o-pull-right">{{'Offer_car' | translate}}</a>
  56. <a ng-show="travel.modality=='package'" ng-click="joinTravel()" class="button button-calm o-pull-right">{{'Offer_car' | translate}}</a>
  57. </div>
  58. <div ng-show="arrayObjectIndexOf(travel.joins, storageusername, 'joinedUsername')!=-1">
  59. <a ng-show="travel.modality=='offering'" ng-click="unjoinTravel()" class="button button-assertive o-pull-right">{{'Unjoin' | translate}}</a>
  60. <a ng-show="travel.modality=='asking'" ng-click="unjoinTravel()" class="button button-assertive o-pull-right">{{'Unoffer_car' | translate}}</a>
  61. <a ng-show="travel.modality=='package'" ng-click="unjoinTravel()" class="button button-assertive o-pull-right">{{'Unoffer_car' | translate}}</a>
  62. </div>
  63. </p>
  64. </div>
  65. </div>
  66. <div class="item item-body" ng-show="travel.joins[0]">
  67. {{'Joined_users' | translate}}:<br>
  68. <a ng-repeat="join in travel.joins" ng-href="#/app/users/{{join.joinedUsername}}" class="button button-small button-dark">
  69. <img ng-src="img/avatars/{{join.joinedAvatar}}.png" class="o-img-joined" />{{join.joinedUsername}}<br>
  70. </a>
  71. </div>
  72. <div class="item item-body">
  73. <div ng-show="travel.comments[0]">
  74. {{'Comments' | translate}}:<br>
  75. <a ng-repeat="comment in travel.comments" ng-href="#/app/users/{{comment.commentUsername}}" class="item">
  76. <h3><img ng-src="img/avatars/{{comment.commentAvatar}}.png" class="o-img-joined" />{{comment.commentUsername}}</h3>
  77. <p>{{comment.comment}}</p>
  78. </a>
  79. </div>
  80. <div ng-show="storageusername">
  81. <a ng-click="showNewComment()" ng-show="!doingNewComment" class="button button-small button-calm right">{{'New_comment' | translate}}</a>
  82. </div>
  83. <form class="list" ng-show="doingNewComment">
  84. <label class="item item-input item-floating-label">
  85. <input ng-model="newComment.comment" type="text" placeholder="Comment">
  86. </label>
  87. <button ng-click="closeNewComment()" class="button button-small button-assertive">
  88. {{'Cancel' | translate}}
  89. </button>
  90. <button ng-click="doNewComment()" ng-show="newComment.comment" class="button button-small button-calm">
  91. {{'Post_comment' | translate}}
  92. </button>
  93. </form>
  94. </div>
  95. </ion-content>
  96. </ion-view>