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.

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