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.

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