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.

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