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.

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