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.

157 lines
7.7 KiB

7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
  1. <ion-view view-title="{{'Travel' | translate}}">
  2. <ion-content>
  3. <ion-refresher
  4. pulling-text="{{'Pull_to_refresh' | translate}}..."
  5. on-refresh="doRefresh()">
  6. </ion-refresher>
  7. <div class="item item-icon-left">
  8. <div class="item-note">
  9. <p>
  10. <a class="button" ng-href="#/app/users/{{travel.user._id}}">
  11. <img class="o_userImgCircularMini" ng-src="{{travel.user.avatar}}"></img>
  12. {{travel.user.username}}
  13. <i ng-show="travel.user.validated" class="ion-checkmark-circled ct_blue300"></i>
  14. </a>
  15. <p class="text-right">
  16. <a target="_blank" ng-click="openTravelLink(travel._id)" class="button button-small o_grey300">
  17. <i class="icon ion-share" style="margin-left:-14px;"></i>
  18. </a>
  19. <a ng-href="#/app/editTravel/{{travel._id}}" class="button button-small o_grey600"
  20. ng-show="storageuser._id==travel.user._id">
  21. <i class="icon ion-edit" style="margin-left:-14px;"></i>
  22. </a>
  23. <a ng-click="deleteTravel()" class="button button-small o_bRed"
  24. ng-show="storageuser._id==travel.user._id">
  25. <i class="icon ion-trash-a" style="margin-left:-14px;"></i>
  26. </a>
  27. </p>
  28. </p>
  29. </div>
  30. <h2>
  31. <i ng-show="travel.type=='offering'" class="icon ion-android-car"></i>
  32. <i ng-show="travel.type=='asking'" class="icon ion-help"></i>
  33. <i ng-show="travel.type=='package'" class="icon ion-ios-box"></i>
  34. {{travel.title}}</h2>
  35. <div class="">{{travel.date | date:"dd/MM HH:mm a"}}</div>
  36. </div>
  37. <leaflet width="100%" height="40%" markers="markers" center="center"
  38. tiles="tiles" id="map-simple-map"></leaflet>
  39. <div class="item item-icon-left">
  40. <i class="icon ion-ios-location-outline"></i>{{'From' | translate}}: {{travel.from.name}}
  41. </div>
  42. <div class="item item-icon-left">
  43. <i class="icon ion-ios-location"></i>{{'To' | translate}}: {{travel.to.name}}
  44. </div>
  45. <div class="item item-icon-left">
  46. <i class="icon ion-clipboard"></i> {{travel.description}}
  47. </div>
  48. <div class="item item-icon-left" ng-show="travel.package">
  49. <i class="icon ion-ios-box"></i> {{'package' | translate}}
  50. </div>
  51. <a class="item item-icon-left" ng-show="travel.user.telegram"
  52. ng-click="openTelegram(travel.user.telegram)">
  53. <i class="icon ion-paper-airplane"></i> Telegram: @{{travel.user.telegram}}
  54. </a>
  55. <div class="item item-icon-left" ng-show="travel.user.phone">
  56. <i class="icon ion-ios-telephone"></i> {{travel.user.phone}}
  57. </div>
  58. <div ng-show="storageuser._id!=travel.user._id" class="text-right">
  59. <p class='text-right'>
  60. <div ng-show="userHasJoined(travel.joinPetitions, storageuser._id)==-1">
  61. <div ng-show="userHasJoined(travel.joins, storageuser._id)==-1">
  62. <a ng-show="travel.type=='offering'" ng-click="joinTravel()" class="button button-small o_purple300">{{'Ask_to_join' | translate}}</a>
  63. <a ng-show="travel.type=='asking'" ng-click="joinTravel()" class="button button-small o_purple300">{{'Offer_car' | translate}}</a>
  64. <a ng-show="travel.type=='package'" ng-click="joinTravel()" class="button button-small o_purple300">{{'Offer_car' | translate}}</a>
  65. </div>
  66. </div>
  67. <div ng-show="userHasJoined(travel.joinPetitions, storageuser._id)>-1">
  68. <a ng-show="travel.type=='offering'" ng-click="unjoinTravel()" class="button button-small o_purple100">{{'Unjoin' | translate}}</a>
  69. <a ng-show="travel.type=='asking'" ng-click="unjoinTravel()" class="button button-small o_purple100">{{'Unoffer_car' | translate}}</a>
  70. <a ng-show="travel.type=='package'" ng-click="unjoinTravel()" class="button button-small o_purple100">{{'Unoffer_car' | translate}}</a>
  71. </div>
  72. <div ng-show="userHasJoined(travel.joins, storageuser._id)>-1">
  73. You have been accepted!
  74. <a ng-show="travel.type=='offering'" ng-click="leaveTravel()" class="button button-small o_bRed">{{'Leave' | translate}}</a>
  75. <a ng-show="travel.type=='asking'" ng-click="" class="button button-small o_purple100">{{'Leave' | translate}}</a>
  76. <a ng-show="travel.type=='package'" ng-click="" class="button button-small o_purple100">{{'Leave' | translate}}</a>
  77. </div>
  78. </p>
  79. </div>
  80. <div class="item item-body" ng-show="travel.collectivized">
  81. <div class='row'>
  82. <div class='col o-text-right'>
  83. <p>
  84. <span class="o-badgeCollectivized">{{'Collectivized' | translate}}</span>
  85. </p>
  86. </div>
  87. </div>
  88. <br>
  89. </div>
  90. <div class="item item-icon-left">
  91. <i class="icon ion-ios-people"></i>
  92. <!--<button class="o_floatRight button o_grey600" ng-show="travel.user._id==storageuser._id">
  93. <i class="icon ion-edit"></i>
  94. </button>-->
  95. <p ng-show="travel.seats>0">{{travel.joins.length}}/{{travel.seats}} {{'seats' | translate}}</p>
  96. <a ng-repeat="join in travel.joins" ng-href="#/app/users/{{join._id}}">
  97. <img class="o_userImgCircularMini" ng-src="{{join.avatar}}"></img>
  98. </a>
  99. </div>
  100. <div ng-show="travel.joinPetitions.length>0">
  101. <p>{{'Pendent_petitions' | translate}}</p>
  102. <div class="row" ng-repeat="joinPetition in travel.joinPetitions">
  103. <div class="col col-90">
  104. <a class="item item-avatar" ng-href="#/app/users/{{joinPetition._id}}">
  105. <img class="o_userImgCircularMini" ng-src="{{joinPetition.avatar}}"></img>
  106. <h2>{{joinPetition.username}}</h2>
  107. </a>
  108. </div>
  109. <div class="col" ng-show="travel.user._id==storageuser._id">
  110. <div class="button button-small o_grey600" ng-click="declineJoin(joinPetition)">
  111. <i class="icon ion-close"></i>
  112. </div><br>
  113. <div class="button button-small o_purple400" ng-click="acceptJoin(joinPetition)">
  114. <i class="icon ion-checkmark"></i>
  115. </div><br>
  116. </div>
  117. </div>
  118. </div>
  119. <!--<div class="item item-body" ng-show="travel.joins[0]">
  120. {{'Joined_users' | translate}}:<br>
  121. <a ng-repeat="join in travel.joins" ng-href="#/app/users/{{join.joinedUsername}}" class="button button-small button-dark">
  122. <img ng-src="img/avatars/{{join.joinedAvatar}}.png" class="o-img-joined" />{{join.joinedUsername}}<br>
  123. </a>
  124. </div>-->
  125. <div class="item item-body">
  126. <div ng-show="travel.comments[0]">
  127. {{'Comments' | translate}}:<br>
  128. <a ng-repeat="comment in travel.comments" ng-href="#/app/users/{{comment.commentUsername}}" class="item">
  129. <h3><img ng-src="img/avatars/{{comment.commentAvatar}}.png" class="o-img-joined" />{{comment.commentUsername}}</h3>
  130. <p>{{comment.comment}}</p>
  131. </a>
  132. </div>
  133. <div ng-show="storageusername">
  134. <a ng-click="showNewComment()" ng-show="!doingNewComment" class="button button-small button-calm right">{{'New_comment' | translate}}</a>
  135. </div>
  136. <form class="list" ng-show="doingNewComment">
  137. <label class="item item-input item-floating-label">
  138. <input ng-model="newComment.comment" type="text" placeholder="Comment">
  139. </label>
  140. <div ng-click="closeNewComment()" class="button button-small button-assertive">
  141. {{'Cancel' | translate}}
  142. </div>
  143. <div ng-click="doNewComment()" ng-show="newComment.comment" class="button button-small button-calm">
  144. {{'Post_comment' | translate}}
  145. </div>
  146. </form>
  147. </div>
  148. </ion-content>
  149. </ion-view>