@ -0,0 +1,21 @@ |
|||||
|
angular.module('app.newEvent', ['pascalprecht.translate']) |
||||
|
|
||||
|
.controller('NewEventCtrl', function($scope, $http, $ionicModal, $timeout, $ionicLoading, $filter) { |
||||
|
|
||||
|
$scope.event={}; |
||||
|
$scope.event.categories=[{name: "prova"}]; |
||||
|
$scope.postEvent = function(){ |
||||
|
$http({ |
||||
|
url: urlapi + 'events', |
||||
|
method: "POST", |
||||
|
data: $scope.event |
||||
|
}) |
||||
|
.then(function(data) { |
||||
|
window.location.href="#/app/events"; |
||||
|
}, |
||||
|
function(response) { // optional
|
||||
|
// failed
|
||||
|
console.log(response); |
||||
|
}); |
||||
|
}; |
||||
|
}); |
@ -0,0 +1,8 @@ |
|||||
|
angular.module('app.userZone', ['pascalprecht.translate']) |
||||
|
|
||||
|
.controller('UserZoneCtrl', function($scope, $http, $ionicModal, $timeout, $ionicLoading, $filter) { |
||||
|
|
||||
|
|
||||
|
|
||||
|
|
||||
|
}); |
@ -0,0 +1,36 @@ |
|||||
|
<ion-view view-title="New Event"> |
||||
|
<ion-content> |
||||
|
<div class="list"> |
||||
|
<label class="item item-input"> |
||||
|
<input type="text" ng-model="event.title" placeholder="Title"> |
||||
|
</label> |
||||
|
<label class="item item-input"> |
||||
|
<textarea ng-model="event.description" placeholder="Description"></textarea> |
||||
|
</label> |
||||
|
<label class="item-input"> |
||||
|
<span class="input-label">{{'Date' | translate}}</span> |
||||
|
<input ng-model="event.date" type="date" placeholder=""> |
||||
|
</label> |
||||
|
<label class="item-input"> |
||||
|
<span class="input-label">{{'Hour' | translate}}</span> |
||||
|
<input ng-model="event.date" type="time" placeholder=""> |
||||
|
</label> |
||||
|
<!--<label class="item item-input item-select"> |
||||
|
<div class="input-label"> |
||||
|
Categories |
||||
|
</div> |
||||
|
<select> |
||||
|
<option>Xerrada</option> |
||||
|
<option>Esport</option> |
||||
|
<option>Debat</option> |
||||
|
<option>Taller</option> |
||||
|
</select> |
||||
|
</label>--> |
||||
|
<div class="item"> |
||||
|
<div ng-click="postEvent()" class="button c_indigo400 item-note"> |
||||
|
Post new event! |
||||
|
</div> |
||||
|
</div> |
||||
|
</div> |
||||
|
</ion-content> |
||||
|
</ion-view> |
@ -0,0 +1,36 @@ |
|||||
|
<ion-view view-title="User zone"> |
||||
|
<ion-content> |
||||
|
<div class="row o_mainOptionRow"> |
||||
|
<a class="col c_pink400" ng-href="#/app/newEvent"> |
||||
|
<i class="icon ion-compose"></i><!--events--> |
||||
|
</a> |
||||
|
<a class="col" ng-href="#/app/users"> |
||||
|
<i class="icon ion-person-stalker"></i> |
||||
|
</a> |
||||
|
</div> |
||||
|
<div class="row o_mainOptionRow"> |
||||
|
<a class="col" ng-href="#/app/savedEvents"> |
||||
|
<i class="icon ion-heart"></i> |
||||
|
</a> |
||||
|
<a class="col" ng-href="#/app/byplace"> |
||||
|
<i class="icon ion-ios-location"></i><!--by place--> |
||||
|
</a> |
||||
|
</div> |
||||
|
<div class="row o_mainOptionRow"> |
||||
|
<a class="col" ng-href="#/app/search"> |
||||
|
<i class="icon ion-search"></i> |
||||
|
</a> |
||||
|
<a class="col" ng-href="#/app/byCategories"> |
||||
|
<i class="icon ion-pound"></i><!--by categories--> |
||||
|
</a> |
||||
|
</div> |
||||
|
<div class="row o_mainOptionRow"> |
||||
|
<a class="col" ng-href="#/app/bydate"> |
||||
|
<i class="icon ion-calendar"></i><!--by date--> |
||||
|
</a> |
||||
|
<a class="col" ng-href="#/app/settings"> |
||||
|
<i class="icon ion-ios-gear"></i> |
||||
|
</a> |
||||
|
</div> |
||||
|
</ion-content> |
||||
|
</ion-view> |