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.

99 lines
5.0 KiB

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