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.

145 lines
6.8 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 o_purple300">{{'Ask_to_join' | translate}}</a>
  52. <a ng-show="travel.type=='asking'" ng-click="joinTravel()" class="button o_purple300">{{'Offer_car' | translate}}</a>
  53. <a ng-show="travel.type=='package'" ng-click="joinTravel()" class="button 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 o_purple100">{{'Unjoin' | translate}}</a>
  58. <a ng-show="travel.type=='asking'" ng-click="unjoinTravel()" class="button o_purple100">{{'Unoffer_car' | translate}}</a>
  59. <a ng-show="travel.type=='package'" ng-click="unjoinTravel()" class="button o_purple100">{{'Unoffer_car' | translate}}</a>
  60. </div>
  61. <div ng-show="userHasJoined(travel.joins, storageuser._id)>-1">
  62. <a ng-show="travel.type=='offering'" ng-click="leaveTravel()" class="button o_bRed">{{'Leave' | translate}}</a>
  63. <a ng-show="travel.type=='asking'" ng-click="" class="button o_purple100">{{'Leave' | translate}}</a>
  64. <a ng-show="travel.type=='package'" ng-click="" class="button o_purple100">{{'Leave' | translate}}</a>
  65. </div>
  66. </p>
  67. </div>
  68. <div class="item item-body" ng-show="travel.collectivized">
  69. <div class='row'>
  70. <div class='col o-text-right'>
  71. <p>
  72. <span class="o-badgeCollectivized">{{'Collectivized' | translate}}</span>
  73. </p>
  74. </div>
  75. </div>
  76. <br>
  77. </div>
  78. <div class="item item-icon-left">
  79. <i class="icon ion-ios-people"></i>
  80. <!--<button class="o_floatRight button o_grey600" ng-show="travel.user._id==storageuser._id">
  81. <i class="icon ion-edit"></i>
  82. </button>-->
  83. <p>{{travel.joins.length}}/{{travel.seats}} {{'seats' | translate}}</p>
  84. <a ng-repeat="join in travel.joins" ng-href="#/app/users/{{join._id}}">
  85. <img class="o_userImgCircularMini" ng-src="{{join.avatar}}"></img>
  86. </a>
  87. </div>
  88. <div ng-show="travel.joinPetitions.length>0">
  89. <p>{{'Pendent_petitions' | translate}}</p>
  90. <div class="row" ng-repeat="joinPetition in travel.joinPetitions">
  91. <div class="col col-90">
  92. <a class="item item-avatar" ng-href="#/app/users/{{joinPetition._id}}">
  93. <img class="o_userImgCircularMini" ng-src="{{joinPetition.avatar}}"></img>
  94. <h2>{{joinPetition.username}}</h2>
  95. </a>
  96. </div>
  97. <div class="col" ng-show="travel.user._id==storageuser._id">
  98. <div class="button button-small o_grey600" ng-click="declineJoin(joinPetition)">
  99. <i class="icon ion-close"></i>
  100. </div><br>
  101. <div class="button button-small o_purple400" ng-click="acceptJoin(joinPetition)">
  102. <i class="icon ion-checkmark"></i>
  103. </div><br>
  104. </div>
  105. </div>
  106. </div>
  107. <!--<div class="item item-body" ng-show="travel.joins[0]">
  108. {{'Joined_users' | translate}}:<br>
  109. <a ng-repeat="join in travel.joins" ng-href="#/app/users/{{join.joinedUsername}}" class="button button-small button-dark">
  110. <img ng-src="img/avatars/{{join.joinedAvatar}}.png" class="o-img-joined" />{{join.joinedUsername}}<br>
  111. </a>
  112. </div>-->
  113. <div class="item item-body">
  114. <div ng-show="travel.comments[0]">
  115. {{'Comments' | translate}}:<br>
  116. <a ng-repeat="comment in travel.comments" ng-href="#/app/users/{{comment.commentUsername}}" class="item">
  117. <h3><img ng-src="img/avatars/{{comment.commentAvatar}}.png" class="o-img-joined" />{{comment.commentUsername}}</h3>
  118. <p>{{comment.comment}}</p>
  119. </a>
  120. </div>
  121. <div ng-show="storageusername">
  122. <a ng-click="showNewComment()" ng-show="!doingNewComment" class="button button-small button-calm right">{{'New_comment' | translate}}</a>
  123. </div>
  124. <form class="list" ng-show="doingNewComment">
  125. <label class="item item-input item-floating-label">
  126. <input ng-model="newComment.comment" type="text" placeholder="Comment">
  127. </label>
  128. <div ng-click="closeNewComment()" class="button button-small button-assertive">
  129. {{'Cancel' | translate}}
  130. </div>
  131. <div ng-click="doNewComment()" ng-show="newComment.comment" class="button button-small button-calm">
  132. {{'Post_comment' | translate}}
  133. </div>
  134. </form>
  135. </div>
  136. </ion-content>
  137. </ion-view>