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.

106 lines
5.1 KiB

8 years ago
8 years ago
8 years ago
8 years ago
8 years ago
8 years ago
8 years ago
8 years ago
  1. <ion-view view-title="{{'Travel' | translate}}">
  2. <ion-content class="has-footer">
  3. <div class="item item-avatar">
  4. <img ng-src="img/{{travel.type}}.png" />
  5. <div class="item-note o-text-right">
  6. <p>
  7. <md-button ng-href="#/app/users/{{travel.user._id}}">
  8. <img style="width: 30px;" ng-src="{{travel.user.avatar}}"></img>
  9. {{travel.user.username}}
  10. </md-button>
  11. </p>
  12. <p ng-show="storageuser._id==travel.user._id" class="text-right">
  13. <a ng-click="deleteTravel()" class="button button-small o_bRed"><i class="icon ion-trash-a"></i></a>
  14. </p>
  15. </div>
  16. <h2>{{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. id="map-simple-map"></leaflet>
  21. <div class="item item-body">
  22. <div class='row'>
  23. <p class="o-bold">{{travel.description}}</p>
  24. </div>
  25. <div class="row">
  26. <p><img class='o-imgTitle' src="img/from-to.png" />{{travel.from.name}} --> {{travel.to.name}}</p>
  27. </div>
  28. <div class='row'>
  29. <div class='col'>
  30. <p ng-show="travel.phone">
  31. <img class='o-imgMenu' src="img/smartphone.png" /> {{travel.user.phone}}
  32. </p>
  33. <p ng-show="travel.telegram">
  34. <!--<a ng-href="https://telegram.me/{{travel.telegram}}" target="_blank" class="button">-->
  35. <img class='o-imgMenu' src="img/telegram.png" /> @{{travel.user.telegram}}
  36. <!--</a>-->
  37. </p>
  38. </div>
  39. <div class='col o-text-right'>
  40. <p ng-show="travel.collectivized">
  41. <span class="o-badgeCollectivized">{{'Collectivized' | translate}}</span>
  42. </p>
  43. <p ng-show="travel.package">
  44. <div class="o-mini-text">
  45. <div ng-show="travel.type=='offering'">{{'Can_carry_package' | translate}} <img src="img/package.png" class="o-imgMenu" /></div>
  46. <div ng-show="travel.type=='asking'">{{'Need_to_carry_package' | translate}} <img src="img/package.png" class="o-imgMenu" /></div>
  47. </div>
  48. </p>
  49. <p>
  50. <div ng-show="travel.type=='offering'">{{'n_Seats' | translate}}: {{travel.seats}}</div>
  51. <div ng-show="travel.type=='asking'">{{'n_People' | translate}}: {{travel.seats}}</div>
  52. </p>
  53. </div>
  54. </div>
  55. <br>
  56. <div ng-show="storageuser._id!=travel.user._id" class="text-right">
  57. <p class='text-right'>
  58. <div ng-show="userHasJoined(travel.joinPetitions, storageuser._id)==-1">
  59. <md-button ng-show="travel.type=='offering'" ng-click="joinTravel()" class="o_purple300">{{'Ask_to_join' | translate}}</md-button>
  60. <md-button ng-show="travel.type=='asking'" ng-click="joinTravel()" class="o_purple300">{{'Offer_car' | translate}}</md-button>
  61. <md-button ng-show="travel.type=='package'" ng-click="joinTravel()" class="o_purple300">{{'Offer_car' | translate}}</md-button>
  62. </div>
  63. <div ng-show="userHasJoined(travel.joinPetitions, storageuser._id)>-1">
  64. <md-button ng-show="travel.type=='offering'" ng-click="unjoinTravel()" class="o_purple100">{{'Unjoin' | translate}}</md-button>
  65. <md-button ng-show="travel.type=='asking'" ng-click="unjoinTravel()" class="o_purple100">{{'Unoffer_car' | translate}}</md-button>
  66. <md-button ng-show="travel.type=='package'" ng-click="unjoinTravel()" class="o_purple100">{{'Unoffer_car' | translate}}</md-button>
  67. </div>
  68. </p>
  69. </div>
  70. </div>
  71. <div class="item item-body" ng-show="travel.joins[0]">
  72. {{'Joined_users' | translate}}:<br>
  73. <a ng-repeat="join in travel.joins" ng-href="#/app/users/{{join.joinedUsername}}" class="button button-small button-dark">
  74. <img ng-src="img/avatars/{{join.joinedAvatar}}.png" class="o-img-joined" />{{join.joinedUsername}}<br>
  75. </a>
  76. </div>
  77. <div class="item item-body">
  78. <div ng-show="travel.comments[0]">
  79. {{'Comments' | translate}}:<br>
  80. <a ng-repeat="comment in travel.comments" ng-href="#/app/users/{{comment.commentUsername}}" class="item">
  81. <h3><img ng-src="img/avatars/{{comment.commentAvatar}}.png" class="o-img-joined" />{{comment.commentUsername}}</h3>
  82. <p>{{comment.comment}}</p>
  83. </a>
  84. </div>
  85. <div ng-show="storageusername">
  86. <a ng-click="showNewComment()" ng-show="!doingNewComment" class="button button-small button-calm right">{{'New_comment' | translate}}</a>
  87. </div>
  88. <form class="list" ng-show="doingNewComment">
  89. <label class="item item-input item-floating-label">
  90. <input ng-model="newComment.comment" type="text" placeholder="Comment">
  91. </label>
  92. <button ng-click="closeNewComment()" class="button button-small button-assertive">
  93. {{'Cancel' | translate}}
  94. </button>
  95. <button ng-click="doNewComment()" ng-show="newComment.comment" class="button button-small button-calm">
  96. {{'Post_comment' | translate}}
  97. </button>
  98. </form>
  99. </div>
  100. </ion-content>
  101. </ion-view>