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.

100 lines
4.6 KiB

8 years ago
8 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 o-text-right">
  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>
  11. <p ng-show="storageuser._id==travel.user._id" class="text-right">
  12. <a ng-click="deleteTravel()" class="button button-small o_bRed"><i class="icon ion-trash-a"></i></a>
  13. </p>
  14. </div>
  15. <h2>
  16. <i class="icon ion-android-car"></i> {{travel.title}}</h2>
  17. <div class="">{{travel.date | date:"dd/MM HH:mm a"}}</div>
  18. </div>
  19. <leaflet width="100%" height="40%" markers="markers" center="center"
  20. tiles="tiles" id="map-simple-map"></leaflet>
  21. <div ng-show="storageuser._id!=travel.user._id" class="text-right">
  22. <p class='text-right'>
  23. <div ng-show="userHasJoined(travel.joinPetitions, storageuser._id)==-1">
  24. <md-button ng-show="travel.type=='offering'" ng-click="joinTravel()" class="o_purple300">{{'Ask_to_join' | translate}}</md-button>
  25. <md-button ng-show="travel.type=='asking'" ng-click="joinTravel()" class="o_purple300">{{'Offer_car' | translate}}</md-button>
  26. <md-button ng-show="travel.type=='package'" ng-click="joinTravel()" class="o_purple300">{{'Offer_car' | translate}}</md-button>
  27. </div>
  28. <div ng-show="userHasJoined(travel.joinPetitions, storageuser._id)>-1">
  29. <md-button ng-show="travel.type=='offering'" ng-click="unjoinTravel()" class="o_purple100">{{'Unjoin' | translate}}</md-button>
  30. <md-button ng-show="travel.type=='asking'" ng-click="unjoinTravel()" class="o_purple100">{{'Unoffer_car' | translate}}</md-button>
  31. <md-button ng-show="travel.type=='package'" ng-click="unjoinTravel()" class="o_purple100">{{'Unoffer_car' | translate}}</md-button>
  32. </div>
  33. </p>
  34. </div>
  35. <div class="item item-icon-left">
  36. <i class="icon ion-ios-location"></i>{{travel.from.name}} --> {{travel.to.name}}
  37. </div>
  38. <div class="item item-icon-left">
  39. <i class="icon ion-clipboard"></i> {{travel.description}}
  40. </div>
  41. <div class="item item-icon-left" ng-show="travel.package">
  42. <i class="icon ion-ios-box"></i> package
  43. </div>
  44. <div class="item item-icon-left" ng-show="travel.user.telegram">
  45. <i class="icon ion-paper-airplane"></i> @{{user.telegram}}
  46. </div>
  47. <div class="item item-icon-left" ng-show="travel.user.phone">
  48. <i class="icon ion-ios-telephone"></i> {{travel.user.phone}}
  49. </div>
  50. <div class="item item-icon-left">
  51. <i class="icon ion-ios-people"></i> {{travel.seats}} seats
  52. </div>
  53. <div class="item item-body">
  54. <div class='row'>
  55. <div class='col o-text-right'>
  56. <p ng-show="travel.collectivized">
  57. <span class="o-badgeCollectivized">{{'Collectivized' | translate}}</span>
  58. </p>
  59. </div>
  60. </div>
  61. <br>
  62. </div>
  63. <div class="item item-body" ng-show="travel.joins[0]">
  64. {{'Joined_users' | translate}}:<br>
  65. <a ng-repeat="join in travel.joins" ng-href="#/app/users/{{join.joinedUsername}}" class="button button-small button-dark">
  66. <img ng-src="img/avatars/{{join.joinedAvatar}}.png" class="o-img-joined" />{{join.joinedUsername}}<br>
  67. </a>
  68. </div>
  69. <div class="item item-body">
  70. <div ng-show="travel.comments[0]">
  71. {{'Comments' | translate}}:<br>
  72. <a ng-repeat="comment in travel.comments" ng-href="#/app/users/{{comment.commentUsername}}" class="item">
  73. <h3><img ng-src="img/avatars/{{comment.commentAvatar}}.png" class="o-img-joined" />{{comment.commentUsername}}</h3>
  74. <p>{{comment.comment}}</p>
  75. </a>
  76. </div>
  77. <div ng-show="storageusername">
  78. <a ng-click="showNewComment()" ng-show="!doingNewComment" class="button button-small button-calm right">{{'New_comment' | translate}}</a>
  79. </div>
  80. <form class="list" ng-show="doingNewComment">
  81. <label class="item item-input item-floating-label">
  82. <input ng-model="newComment.comment" type="text" placeholder="Comment">
  83. </label>
  84. <button ng-click="closeNewComment()" class="button button-small button-assertive">
  85. {{'Cancel' | translate}}
  86. </button>
  87. <button ng-click="doNewComment()" ng-show="newComment.comment" class="button button-small button-calm">
  88. {{'Post_comment' | translate}}
  89. </button>
  90. </form>
  91. </div>
  92. </ion-content>
  93. </ion-view>