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.

104 lines
5.0 KiB

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