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.

150 lines
7.3 KiB

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