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
//var urlapi = "http://localhost:3000/api/";
var urlapi = "http://localhost: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', [
'ionic',

+ 1
- 0
www/js/travels.js

@ -18,6 +18,7 @@ angular.module('app.travels', ['pascalprecht.translate'])
if (data.data.length < 1) {
console.log("setting loadMorePagination to false");
$scope.loadMorePagination = false;
$scope.$broadcast('scroll.infiniteScrollComplete');
}
}, 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>
<div class="padding">
<label class="item item-input">
@ -50,7 +50,7 @@
</label>
<p class="padding">
<a ng-click="createTravel()" class="button o_purple400 o_floatRight">
{{'Post_asking_car' | translate}}
{{'Ask_for_Car' | translate}}
</a>
</p>
</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>
<div class="padding">
<label class="item item-input">
@ -50,7 +50,7 @@
</label>
<p class="padding">
<a ng-click="createTravel()" class="button o_purple400 o_floatRight">
{{'Ask_for_package' | translate}}
{{'Ask_for_Package' | translate}}
</a>
</p>
</div><!-- end of padding -->

+ 1
- 1
www/templates/help.html

@ -53,7 +53,7 @@
<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.
</p>

+ 1
- 1
www/templates/settings.html

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

+ 3
- 3
www/templates/travel.html

@ -1,5 +1,5 @@
<ion-view view-title="{{'Travel' | translate}}">
<ion-content class="has-footer">
<ion-content>
<ion-refresher
pulling-text="{{'Pull_to_refresh' | translate}}..."
on-refresh="doRefresh()">
@ -11,7 +11,7 @@
<img class="o_userImgCircularMini" ng-src="{{travel.user.avatar}}"></img>
{{travel.user.username}}
</a>
<p class="text-right">
<p class="text-right">
<a ng-click="deleteTravel()" class="button button-small o_bRed"
ng-show="storageuser._id==travel.user._id">
<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">
<i class="icon ion-edit"></i>
</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}}">
<img class="o_userImgCircularMini" ng-src="{{join.avatar}}"></img>
</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-content class="has-footer">
<ion-content>
<ion-refresher
pulling-text="{{'Pull_to_refresh' | translate}}..."
on-refresh="paginationNext()">
@ -20,23 +20,7 @@
</div>
<a ng-repeat="travel in travels | orderBy: 'date' | filter: search"
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>
</div>
<!--<div class="button" ng-click="paginationNext()">

+ 2
- 24
www/templates/userTravels.html

@ -10,36 +10,14 @@
</div>
<a ng-repeat="travel in travels | orderBy: 'date'"
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>
<div class="item item-divider o_purple300" ng-show="joins[0]">
{{'Travels_joining' | translate}}
</div>
<a ng-repeat="travel in joins | orderBy: 'date'"
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>
</div>
</ion-content>

Loading…
Cancel
Save