implemented infinite scroll on travels, user avatar show image, added username on travels list
|
Before Width: | Height: | Size: 15 KiB |
BIN
www/img/avatars/chameleon.png
Normal file
|
After Width: | Height: | Size: 15 KiB |
BIN
www/img/avatars/clown-fish.png
Normal file
|
After Width: | Height: | Size: 21 KiB |
BIN
www/img/avatars/duck.png
Normal file
|
After Width: | Height: | Size: 9.6 KiB |
BIN
www/img/avatars/owl.png
Normal file
|
After Width: | Height: | Size: 15 KiB |
BIN
www/img/avatars/penguin.png
Normal file
|
After Width: | Height: | Size: 14 KiB |
BIN
www/img/avatars/siberian-husky.png
Normal file
|
After Width: | Height: | Size: 19 KiB |
BIN
www/img/avatars/sloth.png
Normal file
|
After Width: | Height: | Size: 15 KiB |
BIN
www/img/avatars/tiger.png
Normal file
|
After Width: | Height: | Size: 22 KiB |
BIN
www/img/avatars/toucan.png
Normal file
|
After Width: | Height: | Size: 11 KiB |
|
Before Width: | Height: | Size: 1.7 KiB |
|
Before Width: | Height: | Size: 754 B |
|
Before Width: | Height: | Size: 1.0 KiB |
BIN
www/img/fav.png
|
Before Width: | Height: | Size: 722 B |
|
Before Width: | Height: | Size: 6.5 KiB |
|
Before Width: | Height: | Size: 1.2 KiB |
|
Before Width: | Height: | Size: 764 KiB |
|
Before Width: | Height: | Size: 767 KiB |
BIN
www/img/help.png
|
Before Width: | Height: | Size: 701 B |
|
Before Width: | Height: | Size: 4.6 KiB |
BIN
www/img/join.png
|
Before Width: | Height: | Size: 291 B |
|
Before Width: | Height: | Size: 891 B |
|
Before Width: | Height: | Size: 46 KiB |
|
Before Width: | Height: | Size: 41 KiB |
|
Before Width: | Height: | Size: 66 KiB |
|
Before Width: | Height: | Size: 797 B |
|
Before Width: | Height: | Size: 9.8 KiB |
|
Before Width: | Height: | Size: 555 B |
BIN
www/img/road.png
|
Before Width: | Height: | Size: 1.1 KiB |
|
Before Width: | Height: | Size: 1.2 KiB |
|
Before Width: | Height: | Size: 1.3 KiB |
|
Before Width: | Height: | Size: 893 B |
|
Before Width: | Height: | Size: 1013 B |
|
Before Width: | Height: | Size: 793 B |
|
Before Width: | Height: | Size: 922 B |
@@ -49,7 +49,11 @@ angular.module('app.travel', ['pascalprecht.translate', 'ui-leaflet'])
|
|||||||
}, function(data) {
|
}, function(data) {
|
||||||
console.log('data error');
|
console.log('data error');
|
||||||
$scope.$broadcast('scroll.refreshComplete'); //refresher stop
|
$scope.$broadcast('scroll.refreshComplete'); //refresher stop
|
||||||
$ionicLoading.show({ template: 'Error connecting server', noBackdrop: true, duration: 2000 });
|
$ionicLoading.show({
|
||||||
|
template: 'Error connecting server',
|
||||||
|
noBackdrop: true,
|
||||||
|
duration: 2000
|
||||||
|
});
|
||||||
|
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
@@ -96,7 +100,11 @@ angular.module('app.travel', ['pascalprecht.translate', 'ui-leaflet'])
|
|||||||
console.log("data: ");
|
console.log("data: ");
|
||||||
console.log(data);
|
console.log(data);
|
||||||
if (data.data.success == false) {
|
if (data.data.success == false) {
|
||||||
$ionicLoading.show({template: 'Error on unjoin', noBackdrop: true, duration: 2000});
|
$ionicLoading.show({
|
||||||
|
template: 'Error on unjoin',
|
||||||
|
noBackdrop: true,
|
||||||
|
duration: 2000
|
||||||
|
});
|
||||||
} else {
|
} else {
|
||||||
$scope.travel = data.data;
|
$scope.travel = data.data;
|
||||||
}
|
}
|
||||||
@@ -115,7 +123,11 @@ angular.module('app.travel', ['pascalprecht.translate', 'ui-leaflet'])
|
|||||||
console.log("data: ");
|
console.log("data: ");
|
||||||
console.log(data);
|
console.log(data);
|
||||||
if (data.data.success == false) {
|
if (data.data.success == false) {
|
||||||
$ionicLoading.show({template: 'Error on unjoin', noBackdrop: true, duration: 2000});
|
$ionicLoading.show({
|
||||||
|
template: 'Error on unjoin',
|
||||||
|
noBackdrop: true,
|
||||||
|
duration: 2000
|
||||||
|
});
|
||||||
} else {
|
} else {
|
||||||
$scope.travel = data.data;
|
$scope.travel = data.data;
|
||||||
}
|
}
|
||||||
@@ -129,13 +141,19 @@ angular.module('app.travel', ['pascalprecht.translate', 'ui-leaflet'])
|
|||||||
$http({
|
$http({
|
||||||
url: urlapi + 'travels/declineJoin/' + $stateParams.travelid,
|
url: urlapi + 'travels/declineJoin/' + $stateParams.travelid,
|
||||||
method: "POST",
|
method: "POST",
|
||||||
data: {userid: joinPetition._id}
|
data: {
|
||||||
|
userid: joinPetition._id
|
||||||
|
}
|
||||||
})
|
})
|
||||||
.then(function(data) {
|
.then(function(data) {
|
||||||
console.log("data: ");
|
console.log("data: ");
|
||||||
console.log(data);
|
console.log(data);
|
||||||
if (data.data.success == false) {
|
if (data.data.success == false) {
|
||||||
$ionicLoading.show({template: 'Error on declining', noBackdrop: true, duration: 2000});
|
$ionicLoading.show({
|
||||||
|
template: 'Error on declining',
|
||||||
|
noBackdrop: true,
|
||||||
|
duration: 2000
|
||||||
|
});
|
||||||
} else {
|
} else {
|
||||||
$scope.travel = data.data;
|
$scope.travel = data.data;
|
||||||
console.log("success");
|
console.log("success");
|
||||||
@@ -150,13 +168,19 @@ angular.module('app.travel', ['pascalprecht.translate', 'ui-leaflet'])
|
|||||||
$http({
|
$http({
|
||||||
url: urlapi + 'travels/acceptJoin/' + $stateParams.travelid,
|
url: urlapi + 'travels/acceptJoin/' + $stateParams.travelid,
|
||||||
method: "POST",
|
method: "POST",
|
||||||
data: {userid: joinPetition._id}
|
data: {
|
||||||
|
userid: joinPetition._id
|
||||||
|
}
|
||||||
})
|
})
|
||||||
.then(function(data) {
|
.then(function(data) {
|
||||||
console.log("data: ");
|
console.log("data: ");
|
||||||
console.log(data);
|
console.log(data);
|
||||||
if (data.data.success == false) {
|
if (data.data.success == false) {
|
||||||
$ionicLoading.show({template: 'Error on accepting', noBackdrop: true, duration: 2000});
|
$ionicLoading.show({
|
||||||
|
template: 'Error on accepting',
|
||||||
|
noBackdrop: true,
|
||||||
|
duration: 2000
|
||||||
|
});
|
||||||
} else {
|
} else {
|
||||||
$scope.travel = data.data;
|
$scope.travel = data.data;
|
||||||
console.log("success");
|
console.log("success");
|
||||||
@@ -168,6 +192,12 @@ angular.module('app.travel', ['pascalprecht.translate', 'ui-leaflet'])
|
|||||||
};
|
};
|
||||||
|
|
||||||
$scope.leaveTravel = function() {
|
$scope.leaveTravel = function() {
|
||||||
|
var confirmPopup = $ionicPopup.confirm({
|
||||||
|
title: 'Leaving travel',
|
||||||
|
template: 'Are you sure you want to leave <b>' + $scope.travel.title + '</b>?'
|
||||||
|
});
|
||||||
|
confirmPopup.then(function(res) {
|
||||||
|
if (res) {
|
||||||
$http({
|
$http({
|
||||||
url: urlapi + 'travels/leave/' + $stateParams.travelid,
|
url: urlapi + 'travels/leave/' + $stateParams.travelid,
|
||||||
method: "POST",
|
method: "POST",
|
||||||
@@ -177,7 +207,11 @@ angular.module('app.travel', ['pascalprecht.translate', 'ui-leaflet'])
|
|||||||
console.log("data: ");
|
console.log("data: ");
|
||||||
console.log(data);
|
console.log(data);
|
||||||
if (data.data.success == false) {
|
if (data.data.success == false) {
|
||||||
$ionicLoading.show({template: 'Error on unjoin', noBackdrop: true, duration: 2000});
|
$ionicLoading.show({
|
||||||
|
template: 'Error on unjoin',
|
||||||
|
noBackdrop: true,
|
||||||
|
duration: 2000
|
||||||
|
});
|
||||||
} else {
|
} else {
|
||||||
$scope.travel = data.data;
|
$scope.travel = data.data;
|
||||||
}
|
}
|
||||||
@@ -185,6 +219,10 @@ angular.module('app.travel', ['pascalprecht.translate', 'ui-leaflet'])
|
|||||||
function(response) { // optional
|
function(response) { // optional
|
||||||
// failed
|
// failed
|
||||||
});
|
});
|
||||||
|
} else {
|
||||||
|
console.log('You are not sure');
|
||||||
|
}
|
||||||
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
/* adding comment */
|
/* adding comment */
|
||||||
@@ -218,7 +256,11 @@ console.log($scope.newComment);
|
|||||||
|
|
||||||
if (response.data.success == false) {
|
if (response.data.success == false) {
|
||||||
|
|
||||||
$ionicLoading.show({ template: 'failed to generate new asking package', noBackdrop: true, duration: 2000 });
|
$ionicLoading.show({
|
||||||
|
template: 'failed to generate new asking package',
|
||||||
|
noBackdrop: true,
|
||||||
|
duration: 2000
|
||||||
|
});
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
function(response) { // optional
|
function(response) { // optional
|
||||||
@@ -230,8 +272,7 @@ console.log($scope.newComment);
|
|||||||
|
|
||||||
$scope.userHasJoined = function(myArray, searchTerm) {
|
$scope.userHasJoined = function(myArray, searchTerm) {
|
||||||
//console.log(myArray+", "+searchTerm);
|
//console.log(myArray+", "+searchTerm);
|
||||||
if(myArray)
|
if (myArray) {
|
||||||
{
|
|
||||||
for (var i = 0, len = myArray.length; i < len; i++) {
|
for (var i = 0, len = myArray.length; i < len; i++) {
|
||||||
//console.log(myArray[i] + " - " + searchTerm);
|
//console.log(myArray[i] + " - " + searchTerm);
|
||||||
if (myArray[i]._id === searchTerm) {
|
if (myArray[i]._id === searchTerm) {
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
angular.module('app.travels', ['pascalprecht.translate'])
|
angular.module('app.travels', ['pascalprecht.translate'])
|
||||||
|
|
||||||
.controller('TravelsCtrl', function($scope, $http, $ionicModal, $timeout, $ionicLoading, $filter) {
|
.controller('TravelsCtrl', function($scope, $http, $ionicModal, $timeout, $ionicLoading, $filter) {
|
||||||
|
$scope.loadMorePagination = true;
|
||||||
|
|
||||||
$scope.travels = [];
|
$scope.travels = [];
|
||||||
$scope.page = 0;
|
$scope.page = 0;
|
||||||
@@ -14,19 +14,33 @@ angular.module('app.travels', ['pascalprecht.translate'])
|
|||||||
//$scope.travels = data.data; // for UI
|
//$scope.travels = data.data; // for UI
|
||||||
$scope.travels = $scope.travels.concat(data.data);
|
$scope.travels = $scope.travels.concat(data.data);
|
||||||
$scope.$broadcast('scroll.refreshComplete'); //refresher stop
|
$scope.$broadcast('scroll.refreshComplete'); //refresher stop
|
||||||
|
$scope.$broadcast('scroll.infiniteScrollComplete');
|
||||||
|
if (data.data.length < 1) {
|
||||||
|
console.log("setting loadMorePagination to false");
|
||||||
|
$scope.loadMorePagination = false;
|
||||||
|
}
|
||||||
|
|
||||||
}, function(data) {
|
}, function(data) {
|
||||||
console.log('data error');
|
console.log('data error');
|
||||||
$scope.$broadcast('scroll.refreshComplete'); //refresher stop
|
$scope.$broadcast('scroll.refreshComplete'); //refresher stop
|
||||||
$ionicLoading.show({ template: 'Error connecting server', noBackdrop: true, duration: 2000 });
|
$ionicLoading.show({
|
||||||
|
template: 'Error connecting server',
|
||||||
|
noBackdrop: true,
|
||||||
|
duration: 2000
|
||||||
|
});
|
||||||
|
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
$scope.doRefresh();
|
$scope.doRefresh();
|
||||||
|
|
||||||
$scope.paginationNext = function() {
|
$scope.paginationNext = function() {
|
||||||
|
if ($scope.loadMorePagination == true) {
|
||||||
$scope.page++;
|
$scope.page++;
|
||||||
console.log($scope.page);
|
console.log($scope.page);
|
||||||
$scope.doRefresh();
|
$scope.doRefresh();
|
||||||
|
}else{
|
||||||
|
console.log("limit pagination reached");
|
||||||
|
$scope.$broadcast('scroll.infiniteScrollComplete');
|
||||||
|
}
|
||||||
};
|
};
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -11,8 +11,7 @@ angular.module('app.user', ['pascalprecht.translate'])
|
|||||||
console.log('data success');
|
console.log('data success');
|
||||||
console.log(data); // for browser console
|
console.log(data); // for browser console
|
||||||
$scope.user = data.data; // for UI
|
$scope.user = data.data; // for UI
|
||||||
if($scope.storageuser._id==$scope.user._id)
|
if ($scope.storageuser._id == $scope.user._id) {
|
||||||
{
|
|
||||||
localStorage.setItem("cim_app_userdata", JSON.stringify(data.data));
|
localStorage.setItem("cim_app_userdata", JSON.stringify(data.data));
|
||||||
}
|
}
|
||||||
$scope.$broadcast('scroll.refreshComplete'); //refresher stop
|
$scope.$broadcast('scroll.refreshComplete'); //refresher stop
|
||||||
@@ -34,7 +33,11 @@ angular.module('app.user', ['pascalprecht.translate'])
|
|||||||
// success
|
// success
|
||||||
if (data.data.success == false) {
|
if (data.data.success == false) {
|
||||||
console.log("failed");
|
console.log("failed");
|
||||||
$ionicLoading.show({template: 'Error on like', noBackdrop: true, duration: 2000});
|
$ionicLoading.show({
|
||||||
|
template: 'Error on like',
|
||||||
|
noBackdrop: true,
|
||||||
|
duration: 2000
|
||||||
|
});
|
||||||
} else {
|
} else {
|
||||||
$scope.user = data.data; // for UI
|
$scope.user = data.data; // for UI
|
||||||
}
|
}
|
||||||
@@ -54,7 +57,11 @@ angular.module('app.user', ['pascalprecht.translate'])
|
|||||||
// success
|
// success
|
||||||
if (data.data.success == false) {
|
if (data.data.success == false) {
|
||||||
console.log("failed");
|
console.log("failed");
|
||||||
$ionicLoading.show({template: 'Error on unlike', noBackdrop: true, duration: 2000});
|
$ionicLoading.show({
|
||||||
|
template: 'Error on unlike',
|
||||||
|
noBackdrop: true,
|
||||||
|
duration: 2000
|
||||||
|
});
|
||||||
} else {
|
} else {
|
||||||
$scope.user = data.data; // for UI
|
$scope.user = data.data; // for UI
|
||||||
}
|
}
|
||||||
@@ -86,7 +93,9 @@ angular.module('app.user', ['pascalprecht.translate'])
|
|||||||
|
|
||||||
$scope.users = response.data;
|
$scope.users = response.data;
|
||||||
localStorage.setItem('c_users', JSON.stringify($scope.users));
|
localStorage.setItem('c_users', JSON.stringify($scope.users));
|
||||||
$scope.user = $filter('filter')($scope.users, {username: $stateParams.username}, true)[0];
|
$scope.user = $filter('filter')($scope.users, {
|
||||||
|
username: $stateParams.username
|
||||||
|
}, true)[0];
|
||||||
|
|
||||||
},
|
},
|
||||||
function(response) { // optional
|
function(response) { // optional
|
||||||
@@ -113,7 +122,9 @@ angular.module('app.user', ['pascalprecht.translate'])
|
|||||||
|
|
||||||
$scope.users = response.data;
|
$scope.users = response.data;
|
||||||
localStorage.setItem('c_users', JSON.stringify($scope.users));
|
localStorage.setItem('c_users', JSON.stringify($scope.users));
|
||||||
$scope.user = $filter('filter')($scope.users, {username: $stateParams.username}, true)[0];
|
$scope.user = $filter('filter')($scope.users, {
|
||||||
|
username: $stateParams.username
|
||||||
|
}, true)[0];
|
||||||
|
|
||||||
},
|
},
|
||||||
function(response) { // optional
|
function(response) { // optional
|
||||||
@@ -146,4 +157,34 @@ angular.module('app.user', ['pascalprecht.translate'])
|
|||||||
}
|
}
|
||||||
return -1;
|
return -1;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
//show image
|
||||||
|
$ionicModal.fromTemplateUrl('templates/imgView.html', {
|
||||||
|
scope: $scope,
|
||||||
|
animation: 'slide-in-up'
|
||||||
|
}).then(function(modal) {
|
||||||
|
$scope.modal = modal;
|
||||||
|
});
|
||||||
|
$scope.openModal = function() {
|
||||||
|
$scope.modal.show();
|
||||||
|
};
|
||||||
|
$scope.closeModal = function() {
|
||||||
|
$scope.modal.hide();
|
||||||
|
};
|
||||||
|
// Cleanup the modal when we're done with it!
|
||||||
|
$scope.$on('$destroy', function() {
|
||||||
|
$scope.modal.remove();
|
||||||
|
});
|
||||||
|
// Execute action on hide modal
|
||||||
|
$scope.$on('modal.hidden', function() {
|
||||||
|
// Execute action
|
||||||
|
});
|
||||||
|
// Execute action on remove modal
|
||||||
|
$scope.$on('modal.removed', function() {
|
||||||
|
// Execute action
|
||||||
|
});
|
||||||
|
$scope.showImg = function() {
|
||||||
|
console.log("show image");
|
||||||
|
$scope.openModal();
|
||||||
|
};
|
||||||
});
|
});
|
||||||
|
|||||||
9
www/templates/imgView.html
Normal file
@@ -0,0 +1,9 @@
|
|||||||
|
<ion-view view-title="{{'Users' | translate}}">
|
||||||
|
<ion-content>
|
||||||
|
<ion-header-bar class="bar bar-header">
|
||||||
|
<a class="button" ng-click="modal.hide()">Back</a>
|
||||||
|
<h1 class="title">{{user.username}} profile image</h1>
|
||||||
|
</ion-header-bar>
|
||||||
|
<img ng-click="modal.hide()" ng-src="{{user.avatar}}" style="width:100%;" />
|
||||||
|
</ion-content>
|
||||||
|
</ion-view>
|
||||||
@@ -5,23 +5,21 @@
|
|||||||
<div ng-show="!notifications[0]" class="item">
|
<div ng-show="!notifications[0]" class="item">
|
||||||
No notifications yet
|
No notifications yet
|
||||||
</div>
|
</div>
|
||||||
<a ng-repeat="notification in notifications | orderBy: '-date'" ng-show="notification.state=='pendent'"
|
<a ng-repeat="notification in notifications | orderBy: '-date'" ng-show="notification.state=='pendent'" class="item item-icon-left item-text-wrap c_deepPurple100" href="#/app/{{notification.link}}">
|
||||||
class="item item-icon-left c_deepPurple100" href="#/app/{{notification.link}}">
|
<div class="item-note text-right">
|
||||||
|
<div class="o_text_purple600">{{notification.date | date:"dd/MM"}}</div>
|
||||||
|
<div class="o_text_purple600">{{notification.date | date:"HH:mm:ss"}}</div>
|
||||||
|
</div>
|
||||||
<i ng-show="notification.state=='pendent'" class="icon ion-android-notifications-none o_text_purple600"></i>
|
<i ng-show="notification.state=='pendent'" class="icon ion-android-notifications-none o_text_purple600"></i>
|
||||||
<h2>{{notification.message}}</h2>
|
<h2>{{notification.message}}</h2>
|
||||||
|
</a>
|
||||||
|
<a ng-repeat="notification in notifications | orderBy: '-date'" ng-show="notification.state=='viewed'" class="item item-icon-left item-text-wrap" href="#/app/{{notification.link}}">
|
||||||
<div class="item-note text-right">
|
<div class="item-note text-right">
|
||||||
<div class="o_text_purple600">{{notification.date | date:"dd/MM"}}</div>
|
<div class="o_text_purple600">{{notification.date | date:"dd/MM"}}</div>
|
||||||
<div class="o_text_purple600">{{notification.date | date:"HH:mm:ss"}}</div>
|
<div class="o_text_purple600">{{notification.date | date:"HH:mm:ss"}}</div>
|
||||||
</div>
|
</div>
|
||||||
</a>
|
|
||||||
<a ng-repeat="notification in notifications | orderBy: '-date'" ng-show="notification.state=='viewed'"
|
|
||||||
class="item item-icon-left" href="#/app/{{notification.link}}">
|
|
||||||
<i ng-show="notification.state=='viewed'" class="icon ion-android-notifications-none"></i>
|
<i ng-show="notification.state=='viewed'" class="icon ion-android-notifications-none"></i>
|
||||||
<h2>{{notification.message}}</h2>
|
<h2>{{notification.message}}</h2>
|
||||||
<div class="item-note text-right">
|
|
||||||
<div class="o_text_purple600">{{notification.date | date:"dd/MM"}}</div>
|
|
||||||
<div class="o_text_purple600">{{notification.date | date:"HH:mm:ss"}}</div>
|
|
||||||
</div>
|
|
||||||
</a>
|
</a>
|
||||||
</ion-content>
|
</ion-content>
|
||||||
</ion-view>
|
</ion-view>
|
||||||
|
|||||||
@@ -51,22 +51,23 @@
|
|||||||
<p class='text-right'>
|
<p class='text-right'>
|
||||||
<div ng-show="userHasJoined(travel.joinPetitions, storageuser._id)==-1">
|
<div ng-show="userHasJoined(travel.joinPetitions, storageuser._id)==-1">
|
||||||
<div ng-show="userHasJoined(travel.joins, storageuser._id)==-1">
|
<div ng-show="userHasJoined(travel.joins, storageuser._id)==-1">
|
||||||
<a ng-show="travel.type=='offering'" ng-click="joinTravel()" class="button o_purple300">{{'Ask_to_join' | translate}}</a>
|
<a ng-show="travel.type=='offering'" ng-click="joinTravel()" class="button button-small o_purple300">{{'Ask_to_join' | translate}}</a>
|
||||||
<a ng-show="travel.type=='asking'" ng-click="joinTravel()" class="button o_purple300">{{'Offer_car' | translate}}</a>
|
<a ng-show="travel.type=='asking'" ng-click="joinTravel()" class="button button-small o_purple300">{{'Offer_car' | translate}}</a>
|
||||||
<a ng-show="travel.type=='package'" ng-click="joinTravel()" class="button o_purple300">{{'Offer_car' | translate}}</a>
|
<a ng-show="travel.type=='package'" ng-click="joinTravel()" class="button button-small o_purple300">{{'Offer_car' | translate}}</a>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div ng-show="userHasJoined(travel.joinPetitions, storageuser._id)>-1">
|
<div ng-show="userHasJoined(travel.joinPetitions, storageuser._id)>-1">
|
||||||
<a ng-show="travel.type=='offering'" ng-click="unjoinTravel()" class="button o_purple100">{{'Unjoin' | translate}}</a>
|
<a ng-show="travel.type=='offering'" ng-click="unjoinTravel()" class="button button-small o_purple100">{{'Unjoin' | translate}}</a>
|
||||||
<a ng-show="travel.type=='asking'" ng-click="unjoinTravel()" class="button o_purple100">{{'Unoffer_car' | translate}}</a>
|
<a ng-show="travel.type=='asking'" ng-click="unjoinTravel()" class="button button-small o_purple100">{{'Unoffer_car' | translate}}</a>
|
||||||
<a ng-show="travel.type=='package'" ng-click="unjoinTravel()" class="button o_purple100">{{'Unoffer_car' | translate}}</a>
|
<a ng-show="travel.type=='package'" ng-click="unjoinTravel()" class="button button-small o_purple100">{{'Unoffer_car' | translate}}</a>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div ng-show="userHasJoined(travel.joins, storageuser._id)>-1">
|
<div ng-show="userHasJoined(travel.joins, storageuser._id)>-1">
|
||||||
<a ng-show="travel.type=='offering'" ng-click="leaveTravel()" class="button o_bRed">{{'Leave' | translate}}</a>
|
You have been accepted!
|
||||||
<a ng-show="travel.type=='asking'" ng-click="" class="button o_purple100">{{'Leave' | translate}}</a>
|
<a ng-show="travel.type=='offering'" ng-click="leaveTravel()" class="button button-small o_bRed">{{'Leave' | translate}}</a>
|
||||||
<a ng-show="travel.type=='package'" ng-click="" class="button o_purple100">{{'Leave' | translate}}</a>
|
<a ng-show="travel.type=='asking'" ng-click="" class="button button-small o_purple100">{{'Leave' | translate}}</a>
|
||||||
|
<a ng-show="travel.type=='package'" ng-click="" class="button button-small o_purple100">{{'Leave' | translate}}</a>
|
||||||
</div>
|
</div>
|
||||||
</p>
|
</p>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -20,6 +20,9 @@
|
|||||||
</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 class="icon ion-android-car o_text_grey700"></i>
|
<i class="icon ion-android-car o_text_grey700"></i>
|
||||||
<h2 class="o_text_grey800">{{travel.title}}</h2>
|
<h2 class="o_text_grey800">{{travel.title}}</h2>
|
||||||
<div class="item-note text-right">
|
<div class="item-note text-right">
|
||||||
@@ -34,8 +37,13 @@
|
|||||||
</p>
|
</p>
|
||||||
</a>
|
</a>
|
||||||
</div>
|
</div>
|
||||||
<div class="button" ng-click="paginationNext()">
|
<!--<div class="button" ng-click="paginationNext()">
|
||||||
{{'load_more' | translate}}
|
{{'load_more' | translate}}
|
||||||
</div>
|
</div>-->
|
||||||
|
<ion-infinite-scroll
|
||||||
|
ng-if="loadMorePagination"
|
||||||
|
on-infinite="paginationNext()"
|
||||||
|
distance="1%">
|
||||||
|
</ion-infinite-scroll>
|
||||||
</ion-content>
|
</ion-content>
|
||||||
</ion-view>
|
</ion-view>
|
||||||
|
|||||||
@@ -1,11 +1,13 @@
|
|||||||
<ion-view view-title="{{'User' | translate}} {{user.username}}">
|
<ion-view view-title="{{'User' | translate}} {{user.username}}">
|
||||||
<ion-content class="has-footer">
|
<ion-content>
|
||||||
<ion-refresher
|
<ion-refresher pulling-text="{{'Pull_to_refresh' | translate}}..." on-refresh="doRefresh()">
|
||||||
pulling-text="{{'Pull_to_refresh' | translate}}..."
|
|
||||||
on-refresh="doRefresh()">
|
|
||||||
</ion-refresher>
|
</ion-refresher>
|
||||||
<div class="o_userProfileBackground">
|
<div class="o_userProfileBackground">
|
||||||
<img ng-src="{{user.avatar}}" class="o_userImgCircular" />
|
<img ng-click="showImg()" ng-src="{{user.avatar}}" class="o_userImgCircular" />
|
||||||
|
<!--
|
||||||
|
show image disabled, here the code prepared to enable show image:
|
||||||
|
<img ng-click="showImg()" ng-src="{{user.avatar}}" class="o_userImgCircular" />
|
||||||
|
-->
|
||||||
<h3 class="o_text_white">{{user.username}}</h3>
|
<h3 class="o_text_white">{{user.username}}</h3>
|
||||||
<p>{{user.description}}</p>
|
<p>{{user.description}}</p>
|
||||||
<p>{{user.email}}</p>
|
<p>{{user.email}}</p>
|
||||||
@@ -19,8 +21,7 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="">
|
<div class="">
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<a class="tab-item" ng-show="user.telegram"
|
<a class="tab-item" ng-show="user.telegram" ng-href="http://telegram.me/{{user.telegram}}">
|
||||||
ng-href="http://telegram.me/{{user.telegram}}">
|
|
||||||
<i class="icon ion-paper-airplane"></i>
|
<i class="icon ion-paper-airplane"></i>
|
||||||
@{{user.telegram}}
|
@{{user.telegram}}
|
||||||
</a>
|
</a>
|
||||||
|
|||||||