Browse Source

updated

master
arnaucode 7 years ago
parent
commit
d76ea5ca19
22 changed files with 248 additions and 162 deletions
  1. +9
    -0
      www/css/style.css
  2. BIN
      www/img/faircoinpublickey_sample.png
  3. +3
    -2
      www/index.html
  4. +17
    -6
      www/js/app.js
  5. +0
    -5
      www/js/newPublication.js
  6. +5
    -0
      www/js/newTravel.js
  7. +17
    -11
      www/js/notifications.js
  8. +30
    -0
      www/js/search.js
  9. +2
    -0
      www/js/translations.js
  10. +24
    -40
      www/js/travel.js
  11. +1
    -0
      www/templates/login.html
  12. +17
    -9
      www/templates/main.html
  13. +8
    -4
      www/templates/menu.html
  14. +2
    -2
      www/templates/newTravel.html
  15. +12
    -9
      www/templates/notifications.html
  16. +26
    -36
      www/templates/offerCar.html
  17. +40
    -0
      www/templates/search.html
  18. +1
    -1
      www/templates/settings.html
  19. +15
    -15
      www/templates/travel.html
  20. +2
    -7
      www/templates/travels.html
  21. +16
    -14
      www/templates/user.html
  22. +1
    -1
      www/templates/users.html

+ 9
- 0
www/css/style.css

@ -201,6 +201,9 @@
} }
.o_text_white{
color: #ffffff!important;
}
.o_text_purple400{ .o_text_purple400{
color: #7E57C2!important; color: #7E57C2!important;
} }
@ -210,3 +213,9 @@
.o_text_purple600{ .o_text_purple600{
color: #5E35B1!important; color: #5E35B1!important;
} }
.o_text_purple700{
color: #512DA8!important;
}
.o_text_purple800{
color: #4527A0!important;
}

BIN
www/img/faircoinpublickey_sample.png

Before After
Width: 374  |  Height: 374  |  Size: 18 KiB Width: 375  |  Height: 377  |  Size: 21 KiB

+ 3
- 2
www/index.html

@ -3,7 +3,7 @@
<head> <head>
<meta charset="utf-8"> <meta charset="utf-8">
<meta name="viewport" content="initial-scale=1, maximum-scale=1, user-scalable=no, width=device-width"> <meta name="viewport" content="initial-scale=1, maximum-scale=1, user-scalable=no, width=device-width">
<title>collectivecar</title>
<title>CarsInCommon</title>
<link href="lib/ionic/css/ionic.css" rel="stylesheet"> <link href="lib/ionic/css/ionic.css" rel="stylesheet">
<link href="css/style.css" rel="stylesheet"> <link href="css/style.css" rel="stylesheet">
@ -38,9 +38,10 @@
<script src="js/menu.js"></script> <script src="js/menu.js"></script>
<script src="js/footerMenu.js"></script> <script src="js/footerMenu.js"></script>
<script src="js/main.js"></script> <script src="js/main.js"></script>
<script src="js/search.js"></script>
<script src="js/travels.js"></script> <script src="js/travels.js"></script>
<script src="js/travel.js"></script> <script src="js/travel.js"></script>
<script src="js/newPublication.js"></script>
<script src="js/newTravel.js"></script>
<script src="js/offerCar.js"></script> <script src="js/offerCar.js"></script>
<!--<script src="js/askCar.js"></script> <!--<script src="js/askCar.js"></script>
<script src="js/askPackage.js"></script>--> <script src="js/askPackage.js"></script>-->

+ 17
- 6
www/js/app.js

@ -6,8 +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="https://collectivecar.paas.primustech.io/api/"; //var urlapi="https://collectivecar.paas.primustech.io/api/";
var urlapi="http://147.83.7.158:3000/api/";
angular.module('starter', [ angular.module('starter', [
@ -19,9 +20,10 @@ angular.module('starter', [
'app.menu', 'app.menu',
'app.footerMenu', 'app.footerMenu',
'app.main', 'app.main',
'app.search',
'app.travels', 'app.travels',
'app.travel', 'app.travel',
'app.newPublication',
'app.newTravel',
'app.offerCar', 'app.offerCar',
/* 'app.askCar', /* 'app.askCar',
'app.askPackage',*/ 'app.askPackage',*/
@ -84,6 +86,15 @@ angular.module('starter', [
} }
} }
}) })
.state('app.search', {
url: '/search',
views: {
'menuContent': {
templateUrl: 'templates/search.html',
controller: 'SearchCtrl'
}
}
})
.state('app.travels', { .state('app.travels', {
url: '/travels', url: '/travels',
views: { views: {
@ -104,12 +115,12 @@ angular.module('starter', [
} }
}) })
.state('app.newPublication', {
url: '/newPublication',
.state('app.newTravel', {
url: '/newTravel',
views: { views: {
'menuContent': { 'menuContent': {
templateUrl: 'templates/newPublication.html',
controller: 'NewPublicationCtrl'
templateUrl: 'templates/newTravel.html',
controller: 'NewTravelCtrl'
} }
} }
}) })

+ 0
- 5
www/js/newPublication.js

@ -1,5 +0,0 @@
angular.module('app.newPublication', ['pascalprecht.translate'])
.controller('NewPublicationCtrl', function($scope, $stateParams, $translate, $filter) {
});

+ 5
- 0
www/js/newTravel.js

@ -0,0 +1,5 @@
angular.module('app.newTravel', ['pascalprecht.translate'])
.controller('NewTravelCtrl', function($scope, $stateParams, $translate, $filter) {
});

+ 17
- 11
www/js/notifications.js

@ -1,15 +1,21 @@
angular.module('app.notifications', ['pascalprecht.translate']) angular.module('app.notifications', ['pascalprecht.translate'])
.controller('NotificationsCtrl', function($scope, $stateParams, $translate, $filter) {
if(localStorage.getItem('c_token')){// adding token to the headers
// $http.defaults.headers.common['X-Access-Token'] = localStorage.getItem('c_token');
}
$scope.storageusername=localStorage.getItem("c_username");
$scope.users= JSON.parse(localStorage.getItem('c_users'));
$scope.user = $filter('filter')($scope.users, {username: $stateParams.username}, true)[0];
$scope.notifications=$scope.user.notifications;
.controller('NotificationsCtrl', function($scope, $http, $ionicLoading,
$stateParams, $translate, $filter) {
$scope.notifications=[];
$scope.doRefresh = function(){
$http.get(urlapi + 'notifications')
.then(function(data){
console.log(data); // for browser console
$scope.notifications = data.data; // for UI
$scope.$broadcast('scroll.refreshComplete');//refresher stop
console.log($stateParams.username);
console.log($scope.notifications);
console.log("notifications page");
}, function(data){
console.log('data error');
$scope.$broadcast('scroll.refreshComplete');//refresher stop
$ionicLoading.show({ template: 'Error connecting server', noBackdrop: true, duration: 2000 });
});
};
$scope.doRefresh();
}); });

+ 30
- 0
www/js/search.js

@ -0,0 +1,30 @@
angular.module('app.search', ['pascalprecht.translate'])
.controller('SearchCtrl', function($scope, $http, $ionicModal, $timeout, $ionicLoading, $filter) {
$scope.users=[];
$scope.travels=[];
$scope.search={
word:""
};
$scope.doSearch = function() {
console.log("doing search");
console.log($scope.search.word);
/* travels refresh: */
$http.get(urlapi + 'search/'+ $scope.search.word)
.then(function(data){
console.log('data success travels');
console.log(data); // for browser console
$scope.users = data.data.users; // for UI
$scope.travels = data.data.travels; // for UI
$scope.$broadcast('scroll.refreshComplete');//refresher stop
}, function(data){
console.log('data error');
$scope.$broadcast('scroll.refreshComplete');//refresher stop
$ionicLoading.show({ template: 'Error connecting server', noBackdrop: true, duration: 2000 });
});
};
});

+ 2
- 0
www/js/translations.js

@ -5,6 +5,7 @@ var translations = {
"Signup": "Signup", "Signup": "Signup",
"Login": "Login", "Login": "Login",
"Travels": "Travels", "Travels": "Travels",
"Travels_feed": "Travels feed",
"Users": "Users", "Users": "Users",
"Notifications": "Notifications", "Notifications": "Notifications",
"Logout": "Logout", "Logout": "Logout",
@ -50,6 +51,7 @@ var translations = {
"Post_comment": "Post comment", "Post_comment": "Post comment",
"Pull_to_refresh": "Pull to refresh", "Pull_to_refresh": "Pull to refresh",
"search": "search", "search": "search",
"filter": "filter",
"No_data_in_memory": "No data in memory", "No_data_in_memory": "No data in memory",
"Pull_from_top_to_refresh": "Pull from top to refresh", "Pull_from_top_to_refresh": "Pull from top to refresh",
"User": "User", "User": "User",

+ 24
- 40
www/js/travel.js

@ -1,6 +1,6 @@
angular.module('app.travel', ['pascalprecht.translate']) angular.module('app.travel', ['pascalprecht.translate'])
.controller('TravelCtrl', function($scope, $stateParams, $http, $ionicModal, $ionicPopup, $filter) {
.controller('TravelCtrl', function($scope, $stateParams, $http, $ionicModal, $ionicLoading, $ionicPopup, $filter) {
$scope.travel={}; $scope.travel={};
$scope.doRefresh = function() { $scope.doRefresh = function() {
@ -53,55 +53,38 @@ angular.module('app.travel', ['pascalprecht.translate'])
}; };
$scope.joinTravel = function(){ $scope.joinTravel = function(){
$scope.newjoin={
//travelId: $stateParams.travelId,
/*joinedUserId: localStorage.getItem("c_userid"),
joinedUsername: localStorage.getItem("c_username"),
joinedAvatar: localStorage.getItem("c_avatar")*/
};
$http({ $http({
url: urlapi + 'travels/'+ $stateParams.travelId+'/join',
url: urlapi + 'travels/join/'+ $stateParams.travelid,
method: "POST", method: "POST",
data: $scope.newjoin
data: {}
}) })
.then(function(response) {
// success
console.log("response: ");
console.log(response);
$scope.travels=response.data;
localStorage.setItem('c_travels', JSON.stringify($scope.travels));
localStorage.setItem('c_travelsLastDate', JSON.stringify(new Date()));
$scope.travel = $filter('filter')($scope.travels, $stateParams.travelId, true)[0];
.then(function(data) {
console.log("data: ");
console.log(data);
if(data.success==false){
$ionicLoading.show({template: 'Error on unjoin', noBackdrop: true, duration: 2000});
}else{
$scope.travel=data.data;
}
}, },
function(response) { // optional function(response) { // optional
// failed // failed
}); });
}; };
$scope.unjoinTravel = function(){ $scope.unjoinTravel = function(){
console.log("unjoin");
$scope.unjoin={
travelId: $stateParams.travelId,
/*joinedUserId: localStorage.getItem("c_userid"),
joinedUsername: localStorage.getItem("c_username"),
joinedAvatar: localStorage.getItem("c_avatar")*/
};
$http({ $http({
url: urlapi + 'travels/'+ $stateParams.travelId+'/unjoin',
url: urlapi + 'travels/unjoin/'+ $stateParams.travelid,
method: "POST", method: "POST",
data: $scope.unjoin
data: {}
}) })
.then(function(response) {
// success
console.log("response: ");
console.log(response);
$scope.travels=response.data;
localStorage.setItem('c_travels', JSON.stringify($scope.travels));
localStorage.setItem('c_travelsLastDate', JSON.stringify(new Date()));
$scope.travel = $filter('filter')($scope.travels, $stateParams.travelId, true)[0];
.then(function(data) {
console.log("data: ");
console.log(data);
if(data.success==false){
$ionicLoading.show({template: 'Error on unjoin', noBackdrop: true, duration: 2000});
}else{
$scope.travel=data.data;
}
}, },
function(response) { // optional function(response) { // optional
// failed // failed
@ -149,12 +132,13 @@ console.log($scope.newComment);
}; };
$scope.arrayObjectIndexOf = function(myArray, searchTerm, property) {
$scope.userHasJoined = function(myArray, searchTerm) {
//console.log(myArray+", "+searchTerm+", "+property); //console.log(myArray+", "+searchTerm+", "+property);
if(myArray) if(myArray)
{ {
for(var i = 0, len = myArray.length; i < len; i++) { for(var i = 0, len = myArray.length; i < len; i++) {
if (myArray[i][property] === searchTerm){
//console.log(myArray[i] + " - " + searchTerm);
if (myArray[i] === searchTerm){
//console.log("i: " + i); //console.log("i: " + i);
return i; return i;
} }

+ 1
- 0
www/templates/login.html

@ -3,6 +3,7 @@
<img src="img/header.png" style="width:100%;"/> <img src="img/header.png" style="width:100%;"/>
<form ng-submit="doLogin()"> <form ng-submit="doLogin()">
<div class="list padding"> <div class="list padding">
<span class="item-note">v0.0.1</span>
<md-input-container class="md-block" flex-gt-sm> <md-input-container class="md-block" flex-gt-sm>
<label>{{'Username' | translate}}</label> <label>{{'Username' | translate}}</label>
<input ng-model="loginData.username"> <input ng-model="loginData.username">

+ 17
- 9
www/templates/main.html

@ -1,32 +1,40 @@
<ion-view view-title="Main"> <ion-view view-title="Main">
<ion-content>
<ion-content class="has-footer">
<a ng-href="#/app/users/{{storageuser._id}}" class="item item-icon-left o_purpleG300to500"> <a ng-href="#/app/users/{{storageuser._id}}" class="item item-icon-left o_purpleG300to500">
<i class="icon ion-person"></i> <i class="icon ion-person"></i>
{{storageuser.username}} profile {{storageuser.username}} profile
</a> </a>
<a ng-href="#/app/newPublication" class="item item-icon-left o_purpleG300to500">
<i class="icon ion-paper-airplane"></i>
New publication
<a ng-href="#/app/newTravel" class="item item-icon-left o_purpleG300to500">
<i class="icon ion-map"></i>
New travel
</a>
<a ng-href="#/app/search" class="item item-icon-left o_purpleG300to500">
<i class="icon ion-search"></i>
{{'Search' | translate }}
</a> </a>
<a ng-href="#/app/travels" class="item item-icon-left o_purpleG300to500"> <a ng-href="#/app/travels" class="item item-icon-left o_purpleG300to500">
<i class="icon ion-android-car"></i> <i class="icon ion-android-car"></i>
Travels
{{'Travels_feed' | translate }}
</a> </a>
<a href="#/app/users" class="item item-icon-left o_purpleG300to500"> <a href="#/app/users" class="item item-icon-left o_purpleG300to500">
<i class="icon ion-person-stalker"></i> <i class="icon ion-person-stalker"></i>
Users
{{'Users' | translate }}
</a> </a>
<a href="#/app/notifications" class="item item-icon-left o_purpleG300to500"> <a href="#/app/notifications" class="item item-icon-left o_purpleG300to500">
<i class="icon ion-android-notifications"></i> <i class="icon ion-android-notifications"></i>
Notifications
{{'Notifications' | translate }}
</a> </a>
<a href="#/app/settings" class="item item-icon-left o_purpleG300to500"> <a href="#/app/settings" class="item item-icon-left o_purpleG300to500">
<i class="icon ion-settings"></i> <i class="icon ion-settings"></i>
Settings
{{'Settings' | translate }}
</a>
<a href="#/app/help" class="item item-icon-left o_purpleG300to500">
<i class="icon ion-ios-paper-outline"></i>
F.A.Q.
</a> </a>
<a href="#/app/help" class="item item-icon-left o_purpleG300to500"> <a href="#/app/help" class="item item-icon-left o_purpleG300to500">
<i class="icon ion-ios-help-outline"></i> <i class="icon ion-ios-help-outline"></i>
Help
{{'Help' | translate }}
</a> </a>
</ion-content> </ion-content>
</ion-view> </ion-view>

+ 8
- 4
www/templates/menu.html

@ -11,15 +11,16 @@
</ion-nav-bar> </ion-nav-bar>
<ion-nav-view name="menuContent"></ion-nav-view> <ion-nav-view name="menuContent"></ion-nav-view>
<!-- menu footer --> <!-- menu footer -->
<div class="tabs tabs-icon-left" ng-controller="FooterMenuCtrl" ng-show="storageuser">
<div class="tabs tabs-icon-left" style="position:absolute;"
ng-controller="FooterMenuCtrl" ng-show="storageuser">
<a class="tab-item" ng-href="#/app/notifications"> <a class="tab-item" ng-href="#/app/notifications">
<i class="icon ion-android-notifications-none"></i> Notifications <i class="icon ion-android-notifications-none"></i> Notifications
</a> </a>
<a class="tab-item" ng-href="#/app/main"> <a class="tab-item" ng-href="#/app/main">
<i class="icon ion-home"></i> Home <i class="icon ion-home"></i> Home
</a> </a>
<a ng-href="#/app/newPublication" class="tab-item">
<i class="icon ion-paper-airplane"></i> New publication
<a ng-href="#/app/newTravel" class="tab-item">
<i class="icon ion-map"></i> New travel
</a> </a>
</div> </div>
<!-- /menu footer --> <!-- /menu footer -->
@ -37,8 +38,11 @@
<a class="item item-icon-left o_bSidenav" menu-close ng-href="#/app/users/{{storageuser._id}}"> <a class="item item-icon-left o_bSidenav" menu-close ng-href="#/app/users/{{storageuser._id}}">
<i class="icon ion-person"></i> {{storageuser.username}} <i class="icon ion-person"></i> {{storageuser.username}}
</a> </a>
<a class="item item-icon-left o_bSidenav" menu-close ng-href="#/app/search">
<i class="icon ion-search"></i> {{'Search' | translate }}
</a>
<a class="item item-icon-left o_bSidenav" menu-close ng-href="#/app/travels"> <a class="item item-icon-left o_bSidenav" menu-close ng-href="#/app/travels">
<i class="icon ion-android-car"></i> {{'Travels' | translate }}
<i class="icon ion-android-car"></i> {{'Travels_feed' | translate }}
</a> </a>
<a class="item item-icon-left o_bSidenav" menu-close ng-href="#/app/users"> <a class="item item-icon-left o_bSidenav" menu-close ng-href="#/app/users">
<i class="icon ion-person-stalker"></i> {{'Users' | translate }} <i class="icon ion-person-stalker"></i> {{'Users' | translate }}

www/templates/newPublication.html → www/templates/newTravel.html

@ -1,5 +1,5 @@
<ion-view view-title="New Publication">
<ion-content>
<ion-view view-title="New Travel">
<ion-content class="has-footer">
<a ng-href="#/app/offerCar" class="item item-icon-left o_purple500"> <a ng-href="#/app/offerCar" class="item item-icon-left o_purple500">
<i class="icon ion-android-car"></i> <i class="icon ion-android-car"></i>
Offer Car Offer Car

+ 12
- 9
www/templates/notifications.html

@ -1,14 +1,17 @@
<ion-view view-title="{{'Notifications' | translate}} {{user.username}}">
<ion-content>
<div class="item item-body">
<a ng-repeat="notification in notifications | orderBy: '-date'" class="item item-avatar" href="#/app/{{notification.link}}">
<img ng-src="img/{{notification.type}}.png"/>
<h2>{{notification.description}}</h2>
<ion-view view-title="{{'Notifications' | translate}}">
<ion-content class="has-footer">
<ion-refresher
pulling-text="{{'Pull_to_refresh' | translate}}..."
on-refresh="doRefresh()">
</ion-refresher>
<a ng-repeat="notification in notifications | orderBy: '-date'"
class="item item-icon-left" href="#/app/{{notification.link}}">
<i class="icon ion-android-notifications-none"></i>
<h2>{{notification.message}}</h2>
<div class="item-note text-right"> <div class="item-note text-right">
<div class="positive">{{notification.date | date:"dd/MM"}}</div>
<div class="positive">{{notification.date | date:"HH:mm:ss"}}</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> </div>
</a> </a>
</div>
</ion-content> </ion-content>
</ion-view> </ion-view>

+ 26
- 36
www/templates/offerCar.html

@ -1,42 +1,33 @@
<ion-view view-title="Offer Car"> <ion-view view-title="Offer Car">
<ion-content>
<div class="list">
<label class="item item-input">
<span class="input-label">{{'Title' | translate}}</span>
<input ng-model="newtravel.title" class="positive" type="text" placeholder="">
</label>
<label class="item item-input">
<img class='o-imgMenu' src="img/localization.png" />
<span class="input-label">{{'From' | translate}}</span>
<input ng-model="newtravel.from" type="text" placeholder="">
</label>
<label class="item item-input">
<img class='o-imgMenu' src="img/localization.png" />
<span class="input-label">{{'To' | translate}}</span>
<input ng-model="newtravel.to" type="text" placeholder="">
</label>
<ion-content class="has-footer">
<div class="padding">
<md-input-container class="md-block" flex-gt-sm>
<label>{{'Title' | translate}}</label>
<input ng-model="newtravel.title">
</md-input-container>
<div layout="row">
<md-input-container>
<label>{{'From' | translate}}</label>
<input ng-model="newtravel.from">
</md-input-container>
<md-input-container>
<label>{{'To' | translate}}</label>
<input ng-model="newtravel.to">
</md-input-container>
</div>
<md-input-container class="md-block" flex-gt-sm>
<label>{{'n_Seats' | translate}}</label>
<input ng-model="newtravel.seats" type="number">
</md-input-container>
<label class="item item-input">
<span class="input-label">{{'n_Seats' | translate}}</span>
<input ng-model="newtravel.seats" type="number" placeholder="">
</label>
<label class="item item-input">
<label class="item-input">
<span class="input-label">{{'Date' | translate}}</span> <span class="input-label">{{'Date' | translate}}</span>
<input ng-model="newtravel.date" type="date" placeholder=""> <input ng-model="newtravel.date" type="date" placeholder="">
</label> </label>
<label class="item item-input">
<label class="item-input">
<span class="input-label">{{'Hour' | translate}}</span> <span class="input-label">{{'Hour' | translate}}</span>
<input ng-model="newtravel.date" type="time" placeholder=""> <input ng-model="newtravel.date" type="time" placeholder="">
</label> </label>
<!--<label class="item item-input">
<span class="input-label"><i class="icon ion-iphone"></i> {{'Phone_contact' | translate}}</span>
<input ng-model="newtravel.phone" type="number" placeholder="">
</label>
<label class="item item-input">
<span class="input-label">{{'Telegram_user' | translate}}</span>
<input ng-model="newtravel.telegram" type="text" placeholder="">
</label>-->
<ion-toggle ng-model="newtravel.package" toggle-class="toggle-calm"> <ion-toggle ng-model="newtravel.package" toggle-class="toggle-calm">
<img class='o-imgMenu' src="img/package.png" /> <img class='o-imgMenu' src="img/package.png" />
{{'Can_carry_package' | translate}} {{'Can_carry_package' | translate}}
@ -44,11 +35,10 @@
<ion-toggle ng-model="newtravel.collectivized" toggle-class="toggle-calm"> <ion-toggle ng-model="newtravel.collectivized" toggle-class="toggle-calm">
{{'Collectivized_car' | translate}} {{'Collectivized_car' | translate}}
</ion-toggle> </ion-toggle>
<label class="item item-input item-floating-label">
<span class="input-label">{{'Description' | translate}}</span>
<input ng-model="newtravel.description" type="text" placeholder="Description">
</label>
<md-input-container class="md-block" flex-gt-sm>
<label>{{'Description' | translate}}</label>
<input ng-model="newtravel.description">
</md-input-container>
<p class="padding"> <p class="padding">
<md-button ng-click="createTravel()" class="o_purple400 o_floatRight"> <md-button ng-click="createTravel()" class="o_purple400 o_floatRight">
{{'Create_travel' | translate}} {{'Create_travel' | translate}}

+ 40
- 0
www/templates/search.html

@ -0,0 +1,40 @@
<ion-view view-title="{{'Search' | translate}}">
<ion-content class="has-footer">
<div class="list">
<div class="item item-input">
<i class="icon ion-search placeholder-icon"></i>
<input type="search" placeholder="{{'search' | translate}}..." ng-model="search.word">
<md-button class="o_purple300" ng-click="doSearch()"><i class="icon ion-search"></i></md-button>
</div>
<div class="item item-divider o_purple300" ng-show="travels[0]">
Travels
</div>
<a ng-repeat="travel in travels | orderBy: 'date'"
class="item item-avatar" href="#/app/travels/{{travel._id}}">
<img ng-src="img/{{travel.type}}.png"/>
<h2 class="o_text_purple600">{{travel.title}}</h2>
<div class="item-note text-right">
<div class="o_text_purple400">{{travel.date | date:"dd/MM"}}</div>
<div class="o_text_purple400">{{travel.date | date:"HH:mm"}}h</div>
<!--<div class="badge badge-calm">{{travel.owner}}</div>-->
</div>
<p>
{{travel.description}}
</p>
<!--<p class="" ng-show="travel.modality=='offering'">nºseats: {{travel.seats}}</p>
<p class="" ng-show="travel.modality=='asking'">nºpeople: {{travel.seats}}</p>-->
<p class="">{{travel.from}} --> {{travel.to}}</p>
</a>
<div class="item item-divider o_purple300" ng-show="users[0]">
Users
</div>
<a ng-repeat="user in users | orderBy: 'date'" class="item item-avatar" ng-href="#/app/users/{{user._id}}">
<img ng-src="{{user.avatar}}">
<h2 class="o_text_purple600">{{user.username}}</h2>
<p>
{{user.description}}
</p>
</a>
</div>
</ion-content>
</ion-view>

+ 1
- 1
www/templates/settings.html

@ -1,5 +1,5 @@
<ion-view view-title="{{'Settings' | translate}}"> <ion-view view-title="{{'Settings' | translate}}">
<ion-content>
<ion-content class="has-footer">
<label class="item item-input item-select"> <label class="item item-input item-select">
<div class="input-label"> <div class="input-label">
{{'Actual_language' | translate}} {{'Actual_language' | translate}}

+ 15
- 15
www/templates/travel.html

@ -1,11 +1,11 @@
<ion-view view-title="{{'Travel' | translate}}"> <ion-view view-title="{{'Travel' | translate}}">
<ion-content>
<ion-content class="has-footer">
<div class="item item-avatar"> <div class="item item-avatar">
<img ng-src="img/{{travel.type}}.png" /> <img ng-src="img/{{travel.type}}.png" />
<div class="item-note o-text-right"> <div class="item-note o-text-right">
<p> <p>
<md-button class="md-raised" ng-href="#/app/users/{{travel.user._id}}">
<img class="mdl-chip__contact" style="width: 30px;" ng-src="{{travel.user.avatar}}"></img>
<md-button ng-href="#/app/users/{{travel.user._id}}">
<img style="width: 30px;" ng-src="{{travel.user.avatar}}"></img>
{{travel.user.username}} {{travel.user.username}}
</md-button> </md-button>
</p> </p>
@ -40,14 +40,14 @@
</p> </p>
<p ng-show="travel.package"> <p ng-show="travel.package">
<div class="o-mini-text"> <div class="o-mini-text">
<div ng-show="travel.modality=='offering'">{{'Can_carry_package' | translate}} <img src="img/package.png" class="o-imgMenu" /></div>
<div ng-show="travel.modality=='asking'">{{'Need_to_carry_package' | translate}} <img src="img/package.png" class="o-imgMenu" /></div>
<div ng-show="travel.type=='offering'">{{'Can_carry_package' | translate}} <img src="img/package.png" class="o-imgMenu" /></div>
<div ng-show="travel.type=='asking'">{{'Need_to_carry_package' | translate}} <img src="img/package.png" class="o-imgMenu" /></div>
</div> </div>
</p> </p>
<p> <p>
<div ng-show="travel.modality=='offering'">{{'n_Seats' | translate}}: {{travel.seats}}</div>
<div ng-show="travel.modality=='asking'">{{'n_People' | translate}}: {{travel.seats}}</div>
<div ng-show="travel.type=='offering'">{{'n_Seats' | translate}}: {{travel.seats}}</div>
<div ng-show="travel.type=='asking'">{{'n_People' | translate}}: {{travel.seats}}</div>
</p> </p>
</div> </div>
</div> </div>
@ -56,16 +56,16 @@
<div ng-show="storageuser._id!=travel.user._id" class="text-right"> <div ng-show="storageuser._id!=travel.user._id" class="text-right">
<p class='text-right'> <p class='text-right'>
<div ng-show="arrayObjectIndexOf(travel.joins, storageuser.username, 'joinPetitions')==-1">
<a ng-show="travel.modality=='offering'" ng-click="joinTravel()" class="button button-calm o-pull-right">{{'Ask_to_join' | translate}}</a>
<a ng-show="travel.modality=='asking'" ng-click="joinTravel()" class="button button-calm o-pull-right">{{'Offer_car' | translate}}</a>
<a ng-show="travel.modality=='package'" ng-click="joinTravel()" class="button button-calm o-pull-right">{{'Offer_car' | translate}}</a>
<div ng-show="userHasJoined(travel.joinPetitions, storageuser._id)==-1">
<md-button ng-show="travel.type=='offering'" ng-click="joinTravel()" class="o_purple300">{{'Ask_to_join' | translate}}</md-button>
<md-button ng-show="travel.type=='asking'" ng-click="joinTravel()" class="o_purple300">{{'Offer_car' | translate}}</md-button>
<md-button ng-show="travel.type=='package'" ng-click="joinTravel()" class="o_purple300">{{'Offer_car' | translate}}</md-button>
</div> </div>
<div ng-show="arrayObjectIndexOf(travel.joins, storageuser.username, 'joinPetitions')!=-1">
<a ng-show="travel.modality=='offering'" ng-click="unjoinTravel()" class="button button-assertive o-pull-right">{{'Unjoin' | translate}}</a>
<a ng-show="travel.modality=='asking'" ng-click="unjoinTravel()" class="button button-assertive o-pull-right">{{'Unoffer_car' | translate}}</a>
<a ng-show="travel.modality=='package'" ng-click="unjoinTravel()" class="button button-assertive o-pull-right">{{'Unoffer_car' | translate}}</a>
<div ng-show="userHasJoined(travel.joinPetitions, storageuser._id)>-1">
<md-button ng-show="travel.type=='offering'" ng-click="unjoinTravel()" class="o_purple100">{{'Unjoin' | translate}}</md-button>
<md-button ng-show="travel.type=='asking'" ng-click="unjoinTravel()" class="o_purple100">{{'Unoffer_car' | translate}}</md-button>
<md-button ng-show="travel.type=='package'" ng-click="unjoinTravel()" class="o_purple100">{{'Unoffer_car' | translate}}</md-button>
</div> </div>
</p> </p>
</div> </div>

+ 2
- 7
www/templates/travels.html

@ -1,19 +1,14 @@
<ion-view view-title="{{'Travels' | translate}}"> <ion-view view-title="{{'Travels' | translate}}">
<ion-content>
<ion-content class="has-footer">
<ion-refresher <ion-refresher
pulling-text="{{'Pull_to_refresh' | translate}}..." pulling-text="{{'Pull_to_refresh' | translate}}..."
on-refresh="doRefresh()"> on-refresh="doRefresh()">
</ion-refresher> </ion-refresher>
<div class="list"> <div class="list">
<div> <div>
<div class="o-float-right" ng-show="storageusername">
<a ng-click="showNewAskingPackage()" class="button"><img ng-src="img/newpackage.png" class="o-img-new"/></a>
<a ng-click="showNewAskingTravel()" class="button"><img ng-src="img/newasking.png" class="o-img-new"/></a>
<a ng-click="showNewOfferingTravel()" class="button"><img ng-src="img/newoffering.png" class="o-img-new"/></a>
</div>
<label class="item item-input"> <label class="item item-input">
<i class="icon ion-search placeholder-icon"></i> <i class="icon ion-search placeholder-icon"></i>
<input type="search" placeholder="{{'search' | translate}}..." ng-model="search">
<input type="search" placeholder="{{'filter' | translate}}..." ng-model="search">
</label> </label>
</div> </div>

+ 16
- 14
www/templates/user.html

@ -1,26 +1,28 @@
<ion-view view-title="{{'User' | translate}} {{user.username}}"> <ion-view view-title="{{'User' | translate}} {{user.username}}">
<ion-content>
<ion-content class="has-footer">
<div class="o_userProfileBackground"> <div class="o_userProfileBackground">
<img ng-src="{{user.avatar}}" class="o_userImgCircular" /> <img ng-src="{{user.avatar}}" class="o_userImgCircular" />
<h3>{{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>
</div> </div>
<div class=""> <div class="">
<p ng-show="user.telegram">
<!--<a ng-href="https://telegram.me/{{user.telegram}}" target="_blank" class="button">-->
<img class='o-imgMenu' src="img/telegram.png" /> @{{user.telegram}}
<!--</a>-->
</p>
<div class="row">
<a class="tab-item" ng-show="user.telegram">
<i class="icon ion-paper-airplane"></i>
@{{user.telegram}}
</a>
<a class="tab-item">
<i class="icon ion-android-car"></i>
{{user.travels.length}} Travels
</a>
<a class="tab-item">
<i class="icon ion-ios-heart"></i>
{{user.favs.length}} favs
</a>
</div>
<div class="o-text-right"> <div class="o-text-right">
<div ng-click="showFavsList()">
<b>favs:</b>
<span class="">{{user.favs.length}}</span>
</div>
<br>
<div ng-show="storageusername && storageusername!=user.username"> <div ng-show="storageusername && storageusername!=user.username">
<a ng-show="arrayObjectIndexOf(user.favs, storageusername, 'username')==-1" ng-click="favUser()"> <a ng-show="arrayObjectIndexOf(user.favs, storageusername, 'username')==-1" ng-click="favUser()">
<img class="o-imgMenu" src="img/unlike.png" /> <img class="o-imgMenu" src="img/unlike.png" />

+ 1
- 1
www/templates/users.html

@ -1,5 +1,5 @@
<ion-view view-title="{{'Users' | translate}}"> <ion-view view-title="{{'Users' | translate}}">
<ion-content>
<ion-content class="has-footer">
<ion-refresher <ion-refresher
pulling-text="Pull to refresh..." pulling-text="Pull to refresh..."
on-refresh="doRefresh()"> on-refresh="doRefresh()">

Loading…
Cancel
Save