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.

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