diff --git a/app/www/css/style.css b/app/www/css/style.css index 2afdee5..ff2075d 100644 --- a/app/www/css/style.css +++ b/app/www/css/style.css @@ -13,3 +13,10 @@ .o-float-right{ float: right; } +.o-text-right{ + text-align: right; +} +.o-mini-text{ + font-size: 12px; + display: inline-block; +} diff --git a/app/www/img/asking.png b/app/www/img/asking.png new file mode 100644 index 0000000..b7c8440 Binary files /dev/null and b/app/www/img/asking.png differ diff --git a/app/www/img/collectivized.png b/app/www/img/collectivized.png new file mode 100644 index 0000000..a081555 Binary files /dev/null and b/app/www/img/collectivized.png differ diff --git a/app/www/img/localization.png b/app/www/img/localization.png new file mode 100644 index 0000000..3eaa343 Binary files /dev/null and b/app/www/img/localization.png differ diff --git a/app/www/img/offering.png b/app/www/img/offering.png new file mode 100644 index 0000000..d08b2e2 Binary files /dev/null and b/app/www/img/offering.png differ diff --git a/app/www/img/box.png b/app/www/img/package.png similarity index 100% rename from app/www/img/box.png rename to app/www/img/package.png diff --git a/app/www/img/telegram.png b/app/www/img/telegram.png new file mode 100644 index 0000000..3de14d0 Binary files /dev/null and b/app/www/img/telegram.png differ diff --git a/app/www/js/controllers.js b/app/www/js/controllers.js index d0cac2e..5b26447 100644 --- a/app/www/js/controllers.js +++ b/app/www/js/controllers.js @@ -61,26 +61,45 @@ angular.module('starter.controllers', []) $scope.newtravel={}; // Create the login modal that we will use later - $ionicModal.fromTemplateUrl('templates/newtravel.html', { + $ionicModal.fromTemplateUrl('templates/newofferingtravel.html', { scope: $scope }).then(function(modal) { - $scope.modal = modal; + $scope.modalOffering = modal; + }); + + // Create the login modal that we will use later + $ionicModal.fromTemplateUrl('templates/newaskingtravel.html', { + scope: $scope + }).then(function(modal) { + $scope.modalAsking = modal; }); + // Triggered in the login modal to close it - $scope.closeNewTravel = function() { - $scope.modal.hide(); + $scope.closeNewOfferingTravel = function() { + $scope.modalOffering.hide(); + }; + // Triggered in the login modal to close it + $scope.closeNewAskingTravel = function() { + $scope.modalAsking.hide(); }; // Open the login modal - $scope.showNewTravel = function() { - $scope.modal.show(); + $scope.showNewOfferingTravel = function() { + $scope.modalOffering.show(); }; + // Open the login modal + $scope.showNewAskingTravel = function() { + $scope.modalAsking.show(); + }; + // Perform the login action when the user submits the login form - $scope.doNewTravel = function() { + $scope.doNewOfferingTravel = function() { console.log('Doing new travel', $scope.newtravel); $scope.newtravel.icon="lorry"; $scope.newtravel.generateddate=$scope.newtravel.date; $scope.newtravel.owner="user"; + + $scope.newtravel.modality="offering"; console.log($scope.newtravel); $http({ url: 'http://localhost:3000/api/travels', @@ -101,7 +120,7 @@ angular.module('starter.controllers', []) // Simulate a login delay. Remove this and replace with your login // code if using a login system $timeout(function() { - $scope.closeNewTravel(); + $scope.closeNewOfferingTravel(); }, 1000); }; }) diff --git a/app/www/templates/menu.html b/app/www/templates/menu.html index 0f32aab..1d1ef50 100644 --- a/app/www/templates/menu.html +++ b/app/www/templates/menu.html @@ -30,16 +30,13 @@ Travels - + Transport material Available cars - - Ask for a car - Users diff --git a/app/www/templates/newaskingtravel.html b/app/www/templates/newaskingtravel.html new file mode 100644 index 0000000..f18f0dc --- /dev/null +++ b/app/www/templates/newaskingtravel.html @@ -0,0 +1,66 @@ + + + +

+ + New Asking Travel {{newtravel.title}} +

+
+ + + + + + + + + Can carry package + + + + + + + Collectivized car + + + + + +
+ +
+
diff --git a/app/www/templates/newtravel.html b/app/www/templates/newofferingtravel.html similarity index 66% rename from app/www/templates/newtravel.html rename to app/www/templates/newofferingtravel.html index 1b8dc2f..69296bb 100644 --- a/app/www/templates/newtravel.html +++ b/app/www/templates/newofferingtravel.html @@ -12,10 +12,12 @@ @@ -24,7 +26,10 @@ nºSeats - + + + Can carry package + + + + Collectivized car + - - diff --git a/app/www/templates/travel.html b/app/www/templates/travel.html index f222bdc..64c820e 100644 --- a/app/www/templates/travel.html +++ b/app/www/templates/travel.html @@ -1,12 +1,19 @@
- + + Collectivized

{{travel.title}}

{{travel.owner}}

-
{{travel.date | date:"dd/MM HH:mm a"}}
+
+
{{travel.date | date:"dd/MM HH:mm a"}}
+
+
[periodic travel]
+
+
can carry package
+

{{travel.from}} - {{travel.to}}

nº car seats: {{trave.seats}}

{{travel.description}}

@@ -14,6 +21,9 @@

{{travel.phone}}

+

+ {{travel.telegram}} +

Ask to join diff --git a/app/www/templates/travels.html b/app/www/templates/travels.html index 73e97a3..edb1019 100644 --- a/app/www/templates/travels.html +++ b/app/www/templates/travels.html @@ -2,11 +2,12 @@