Add frontend controllers for apy deals
This commit is contained in:
@@ -0,0 +1,6 @@
|
||||
#header {
|
||||
height: 30%;
|
||||
width: 100%;
|
||||
background-color:#7c1330;
|
||||
text-align: center;
|
||||
}
|
||||
@@ -0,0 +1,12 @@
|
||||
<link rel="stylesheet" href="/static/css/apy.css">
|
||||
<div ng-controller="ApyController">
|
||||
<div class="header-row row">
|
||||
<div class="col-sm-9">Kilta</div>
|
||||
<div class="col-sm-3">Lehdet</div>
|
||||
</div>
|
||||
<div class="repeat-item row event" ng-repeat="event in events">
|
||||
<div class="col-sm-9 event-col">{{event.name}}</div>
|
||||
<div class="col-sm-3 event-col">{{event.amount}}</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
@@ -0,0 +1,10 @@
|
||||
<div ng-controller="infoadmin_apyitem_create" style="margin-top:20px;">
|
||||
<div>
|
||||
create apyitem
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label>Name:</label>
|
||||
<input type="text" ng-model="item.name"></input>
|
||||
</div>
|
||||
<input type="button" class="btn btn-success" ng-click="send()" value="create"></input>
|
||||
</div>
|
||||
@@ -181,3 +181,10 @@ app.controller('infoadmin_image_create', ['$scope', 'Upload', '$timeout',"ItemLi
|
||||
});
|
||||
}
|
||||
}]);
|
||||
|
||||
app.controller('infoadmin_apyitem_create', function($scope, $http,ItemList){
|
||||
$scope.item = {}
|
||||
$scope.send = function(){
|
||||
$http.post("/infoscreen/create_apyitem", $scope.item).then(ItemList.loadItems)
|
||||
}
|
||||
});
|
||||
|
||||
@@ -73,6 +73,15 @@ app.controller('SossoController', function($scope, $http) {
|
||||
$scope.data = response.data;
|
||||
})
|
||||
});
|
||||
|
||||
app.controller('ApyController', function($scope, $http) {
|
||||
$scope.data = [];
|
||||
$http.get("/infoscreen/apyjson").then(function)(response)
|
||||
{
|
||||
$scope.data = response.data.data
|
||||
}
|
||||
});
|
||||
|
||||
app.controller('EventController', function($scope, $http) {
|
||||
$scope.data = [];
|
||||
$http.get("https://sik.ayy.fi/api/events.php?limit=10").then(function(response)
|
||||
|
||||
Reference in New Issue
Block a user