Browse Source

travelListTemplate

master
arnaucode 7 years ago
parent
commit
d42957fcab
10 changed files with 33 additions and 53 deletions
  1. +2
    -2
      www/js/app.js
  2. +1
    -0
      www/js/travels.js
  3. +2
    -2
      www/templates/askForCar.html
  4. +2
    -2
      www/templates/askForPackage.html
  5. +1
    -1
      www/templates/help.html
  6. +1
    -1
      www/templates/settings.html
  7. +3
    -3
      www/templates/travel.html
  8. +17
    -0
      www/templates/travelListTemplate.html
  9. +2
    -18
      www/templates/travels.html
  10. +2
    -24
      www/templates/userTravels.html

+ 2
- 2
www/js/app.js

@ -6,9 +6,9 @@
// 'starter.controllers' is found in controllers.js // 'starter.controllers' is found in controllers.js
//var urlapi = "http://localhost:3000/api/";
var urlapi = "http://localhost:3000/api/";
//var urlapi = "http://192.168.1.36:3000/api/"; //var urlapi = "http://192.168.1.36:3000/api/";
var urlapi = "http://51.255.193.106:3000/api/";
//var urlapi = "http://51.255.193.106:3000/api/";
angular.module('starter', [ angular.module('starter', [
'ionic', 'ionic',

+ 1
- 0
www/js/travels.js

@ -18,6 +18,7 @@ angular.module('app.travels', ['pascalprecht.translate'])
if (data.data.length < 1) { if (data.data.length < 1) {
console.log("setting loadMorePagination to false"); console.log("setting loadMorePagination to false");
$scope.loadMorePagination = false; $scope.loadMorePagination = false;
$scope.$broadcast('scroll.infiniteScrollComplete');
} }
}, function(data) { }, function(data) {

+ 2
- 2
www/templates/askForCar.html

@ -1,4 +1,4 @@
<ion-view view-title="{{'Ask_For_Car' | translate}}">
<ion-view view-title="{{'Ask_for_Car' | translate}}">
<ion-content> <ion-content>
<div class="padding"> <div class="padding">
<label class="item item-input"> <label class="item item-input">
@ -50,7 +50,7 @@
</label> </label>
<p class="padding"> <p class="padding">
<a ng-click="createTravel()" class="button o_purple400 o_floatRight"> <a ng-click="createTravel()" class="button o_purple400 o_floatRight">
{{'Post_asking_car' | translate}}
{{'Ask_for_Car' | translate}}
</a> </a>
</p> </p>
</div><!-- end of padding --> </div><!-- end of padding -->

+ 2
- 2
www/templates/askForPackage.html

@ -1,4 +1,4 @@
<ion-view view-title="{{'Ask_For_Package' | translate}}">
<ion-view view-title="{{'Ask_for_Package' | translate}}">
<ion-content> <ion-content>
<div class="padding"> <div class="padding">
<label class="item item-input"> <label class="item item-input">
@ -50,7 +50,7 @@
</label> </label>
<p class="padding"> <p class="padding">
<a ng-click="createTravel()" class="button o_purple400 o_floatRight"> <a ng-click="createTravel()" class="button o_purple400 o_floatRight">
{{'Ask_for_package' | translate}}
{{'Ask_for_Package' | translate}}
</a> </a>
</p> </p>
</div><!-- end of padding --> </div><!-- end of padding -->

+ 1
- 1
www/templates/help.html

@ -53,7 +53,7 @@
<p> <p>
To <b>create a new publication</b>, just need to click the 'New Travel' button on the right of footer menu,
To <b>create a new publication</b>, just need to click the 'New Travel' button on the right of top menu,
and select wich type of publication is. and select wich type of publication is.
</p> </p>

+ 1
- 1
www/templates/settings.html

@ -10,7 +10,7 @@
</select> </select>
</label> </label>
<p> <p>
{{'version' | translate}}: CarsInCommon-v012
{{'version' | translate}}: CarsInCommon-v0.1
</p> </p>
</ion-content> </ion-content>
</ion-view> </ion-view>

+ 3
- 3
www/templates/travel.html

@ -1,5 +1,5 @@
<ion-view view-title="{{'Travel' | translate}}"> <ion-view view-title="{{'Travel' | translate}}">
<ion-content class="has-footer">
<ion-content>
<ion-refresher <ion-refresher
pulling-text="{{'Pull_to_refresh' | translate}}..." pulling-text="{{'Pull_to_refresh' | translate}}..."
on-refresh="doRefresh()"> on-refresh="doRefresh()">
@ -11,7 +11,7 @@
<img class="o_userImgCircularMini" ng-src="{{travel.user.avatar}}"></img> <img class="o_userImgCircularMini" ng-src="{{travel.user.avatar}}"></img>
{{travel.user.username}} {{travel.user.username}}
</a> </a>
<p class="text-right">
<p class="text-right">
<a ng-click="deleteTravel()" class="button button-small o_bRed" <a ng-click="deleteTravel()" class="button button-small o_bRed"
ng-show="storageuser._id==travel.user._id"> ng-show="storageuser._id==travel.user._id">
<i class="icon ion-trash-a"></i> <i class="icon ion-trash-a"></i>
@ -90,7 +90,7 @@
<!--<button class="o_floatRight button o_grey600" ng-show="travel.user._id==storageuser._id"> <!--<button class="o_floatRight button o_grey600" ng-show="travel.user._id==storageuser._id">
<i class="icon ion-edit"></i> <i class="icon ion-edit"></i>
</button>--> </button>-->
<p>{{travel.joins.length}}/{{travel.seats}} {{'seats' | translate}}</p>
<p ng-show="travel.seats>0">{{travel.joins.length}}/{{travel.seats}} {{'seats' | translate}}</p>
<a ng-repeat="join in travel.joins" ng-href="#/app/users/{{join._id}}"> <a ng-repeat="join in travel.joins" ng-href="#/app/users/{{join._id}}">
<img class="o_userImgCircularMini" ng-src="{{join.avatar}}"></img> <img class="o_userImgCircularMini" ng-src="{{join.avatar}}"></img>
</a> </a>

+ 17
- 0
www/templates/travelListTemplate.html

@ -0,0 +1,17 @@
<div class="item-note text-right">
{{travel.user.username}}
</div>
<i ng-show="travel.type=='offering'" class="icon ion-android-car o_text_grey700"></i>
<i ng-show="travel.type=='asking'" class="icon ion-help o_text_grey700"></i>
<i ng-show="travel.type=='package'" class="icon ion-ios-box o_text_grey700"></i>
<h2 class="o_text_grey800">{{travel.title}}</h2>
<div class="item-note text-right">
<div class="o_text_purple300">{{travel.date | date:"dd/MM"}}</div>
<div class="o_text_purple300">{{travel.date | date:"HH:mm"}}h</div>
</div>
<p>
{{travel.from.name}}
</p>
<p>
{{travel.to.name}}
</p>

+ 2
- 18
www/templates/travels.html

@ -1,5 +1,5 @@
<ion-view view-title="{{'Travels' | translate}}"> <ion-view view-title="{{'Travels' | translate}}">
<ion-content class="has-footer">
<ion-content>
<ion-refresher <ion-refresher
pulling-text="{{'Pull_to_refresh' | translate}}..." pulling-text="{{'Pull_to_refresh' | translate}}..."
on-refresh="paginationNext()"> on-refresh="paginationNext()">
@ -20,23 +20,7 @@
</div> </div>
<a ng-repeat="travel in travels | orderBy: 'date' | filter: search" <a ng-repeat="travel in travels | orderBy: 'date' | filter: search"
class="item item-icon-left" href="#/app/travels/{{travel._id}}"> class="item item-icon-left" href="#/app/travels/{{travel._id}}">
<div class="item-note text-right">
{{travel.user.username}}
</div>
<i ng-show="travel.type=='offering'" class="icon ion-android-car o_text_grey700"></i>
<i ng-show="travel.type=='asking'" class="icon ion-help o_text_grey700"></i>
<i ng-show="travel.type=='package'" class="icon ion-ios-box o_text_grey700"></i>
<h2 class="o_text_grey800">{{travel.title}}</h2>
<div class="item-note text-right">
<div class="o_text_purple300">{{travel.date | date:"dd/MM"}}</div>
<div class="o_text_purple300">{{travel.date | date:"HH:mm"}}h</div>
</div>
<p>
{{travel.from.name}}
</p>
<p>
{{travel.to.name}}
</p>
<div ng-include="'templates/travelListTemplate.html'"></div>
</a> </a>
</div> </div>
<!--<div class="button" ng-click="paginationNext()"> <!--<div class="button" ng-click="paginationNext()">

+ 2
- 24
www/templates/userTravels.html

@ -10,36 +10,14 @@
</div> </div>
<a ng-repeat="travel in travels | orderBy: 'date'" <a ng-repeat="travel in travels | orderBy: 'date'"
class="item item-icon-left" href="#/app/travels/{{travel._id}}"> class="item item-icon-left" href="#/app/travels/{{travel._id}}">
<i class="icon ion-android-car o_text_grey700"></i>
<h2 class="o_text_grey800">{{travel.title}}</h2>
<div class="item-note text-right">
<div class="o_text_purple300">{{travel.date | date:"dd/MM"}}</div>
<div class="o_text_purple300">{{travel.date | date:"HH:mm"}}h</div>
</div>
<p>
{{travel.from.name}}
</p>
<p>
{{travel.to.name}}
</p>
<div ng-include="'templates/travelListTemplate.html'"></div>
</a> </a>
<div class="item item-divider o_purple300" ng-show="joins[0]"> <div class="item item-divider o_purple300" ng-show="joins[0]">
{{'Travels_joining' | translate}} {{'Travels_joining' | translate}}
</div> </div>
<a ng-repeat="travel in joins | orderBy: 'date'" <a ng-repeat="travel in joins | orderBy: 'date'"
class="item item-icon-left" href="#/app/travels/{{travel._id}}"> class="item item-icon-left" href="#/app/travels/{{travel._id}}">
<i class="icon ion-android-car o_text_grey700"></i>
<h2 class="o_text_grey800">{{travel.title}}</h2>
<div class="item-note text-right">
<div class="o_text_purple300">{{travel.date | date:"dd/MM"}}</div>
<div class="o_text_purple300">{{travel.date | date:"HH:mm"}}h</div>
</div>
<p>
{{travel.from.name}}
</p>
<p>
{{travel.to.name}}
</p>
<div ng-include="'templates/travelListTemplate.html'"></div>
</a> </a>
</div> </div>
</ion-content> </ion-content>

Loading…
Cancel
Save