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.

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