Added project
This commit is contained in:
parent
fe9aa14dfd
commit
2d73cc8845
186 changed files with 21174 additions and 0 deletions
|
|
@ -0,0 +1,8 @@
|
|||
|
||||
$scope.<%= taction %>None = function () {
|
||||
<% if (tview.tlist) { %>
|
||||
$location.url('<%= tview.tmeta.texport.angular.tbase %>/<%= tview.tslug %>/<%= tview.tlist.texport.angular.tslug %>');
|
||||
<% } else { %>
|
||||
$location.url('<%= tview.tmeta.texport.angular.tbase %>/');
|
||||
<% } %>
|
||||
}
|
||||
|
|
@ -0,0 +1,5 @@
|
|||
|
||||
$routeProvider.when('<%= tview.tmeta.texport.angular.tbase %>/<%= tview.tslug %>/<%= tview[taction].texport.angular.tslug %><%= routeEnd %>', {
|
||||
templateUrl: '<%= thtmlPrefix %>/<%= tview[taction].texport.angular.thtml %>',
|
||||
controller: <%= tview[taction].texport.angular.tcontroller.prefix %><%= tview.tcode %><%= tview[taction].texport.angular.tcontroller.postfix %>
|
||||
});
|
||||
|
|
@ -0,0 +1,99 @@
|
|||
'use strict';
|
||||
|
||||
// Auto generated controller mapping for: <%= tview.tid %>
|
||||
|
||||
|
||||
crudRouteInit.push(<%= tview.tcode %>Init);
|
||||
|
||||
function <%= tview.tcode %>Init($routeProvider, $locationProvider) {
|
||||
<% if (tview.tlist) { %>
|
||||
$routeProvider.when('<%= tview.tmeta.texport.angular.tbase %>/<%= tview.tslug %>/', {
|
||||
redirectTo: '<%= tview.tmeta.texport.angular.tbase %>/<%= tview.tslug %>/<%= tview.tlist.texport.angular.tslug %>'
|
||||
});
|
||||
<%- include('controller-route', {tview: tview,thtmlPrefix:thtmlPrefix,taction: 'tlist', routeEnd: ''}); %>
|
||||
<% } %>
|
||||
<% if (tview.tcreate) { %>
|
||||
<%- include('controller-route', {tview: tview,thtmlPrefix:thtmlPrefix,taction: 'tcreate', routeEnd: ''}); %>
|
||||
<% } %>
|
||||
<% if (tview.tedit) { %>
|
||||
<%- include('controller-route', {tview: tview,thtmlPrefix:thtmlPrefix,taction: 'tedit', routeEnd: '/:id'}); %>
|
||||
<% } %>
|
||||
<% if (tview.tread) { %>
|
||||
<%- include('controller-route', {tview: tview,thtmlPrefix:thtmlPrefix,taction: 'tread', routeEnd: '/:id'}); %>
|
||||
<% } %>
|
||||
<% if (tview.tdelete) { %>
|
||||
<%- include('controller-route', {tview: tview,thtmlPrefix:thtmlPrefix,taction: 'tdelete', routeEnd: '/:id'}); %>
|
||||
<% } %>
|
||||
}
|
||||
|
||||
<% if (tview.tlist) { %>
|
||||
function <%= tview.tlist.texport.angular.tcontroller.prefix %><%= tview.tcode %><%= tview.tlist.texport.angular.tcontroller.postfix %>(<%= tview.tlist.texport.angular.tcontroller.argu %>) {
|
||||
$http.get('<%= tapiPrefix %>/<%= tview.tlist.texport.json.tslug %>').success(function(data, status, headers, config) {
|
||||
$scope.data = data.data;
|
||||
});
|
||||
}
|
||||
<% } %>
|
||||
|
||||
<% if (tview.tcreate) { %>
|
||||
function <%= tview.tcreate.texport.angular.tcontroller.prefix %><%= tview.tcode %><%= tview.tcreate.texport.angular.tcontroller.postfix %>(<%= tview.tcreate.texport.angular.tcontroller.argu %>) {
|
||||
$scope.data = {};
|
||||
$scope.tcreateData = function () {
|
||||
$http.post('<%= tapiPrefix %>/<%= tview.tcreate.texport.json.tslug %>', $scope.data).success(function(data) {
|
||||
<% if (tview.tlist) { %>
|
||||
$location.url('<%= tview.tmeta.texport.angular.tbase %>/<%= tview.tslug %>/<%= tview.tlist.texport.angular.tslug %>');
|
||||
<% } else { %>
|
||||
$location.url('<%= tview.tmeta.texport.angular.tbase %>/');
|
||||
<% } %>
|
||||
});
|
||||
}
|
||||
<%- include('controller-action-none', {tview: tview,taction: 'tcreate'}); %>
|
||||
}
|
||||
<% } %>
|
||||
|
||||
<% if (tview.tread) { %>
|
||||
function <%= tview.tread.texport.angular.tcontroller.prefix %><%= tview.tcode %><%= tview.tread.texport.angular.tcontroller.postfix %>(<%= tview.tread.texport.angular.tcontroller.argu %>) {
|
||||
$scope.data = {};
|
||||
$http.get('<%= tapiPrefix %>/<%= tview.tread.texport.json.tslug %>/' + $routeParams.id).success(function(data) {
|
||||
$scope.data = data.data;
|
||||
});
|
||||
<%- include('controller-action-none', {tview: tview,taction: 'tread'}); %>
|
||||
}
|
||||
<% } %>
|
||||
|
||||
<% if (tview.tedit) { %>
|
||||
function <%= tview.tedit.texport.angular.tcontroller.prefix %><%= tview.tcode %><%= tview.tedit.texport.angular.tcontroller.postfix %>(<%= tview.tedit.texport.angular.tcontroller.argu %>) {
|
||||
$scope.data = {};
|
||||
$http.get('<%= tapiPrefix %>/<%= tview.tread.texport.json.tslug %>/' + $routeParams.id).success(function(data) {
|
||||
$scope.data = data.data;
|
||||
});
|
||||
$scope.teditData = function () {
|
||||
$http.put('<%= tapiPrefix %>/<%= tview.tedit.texport.json.tslug %>/' + $routeParams.id, $scope.data ).success(function(data) {
|
||||
<% if (tview.tread) { %>
|
||||
$location.url('<%= tview.tmeta.texport.angular.tbase %>/<%= tview.tslug %>/<%= tview.tread.texport.angular.tslug %>/' + $routeParams.id);
|
||||
<% } else { %>
|
||||
$location.url('<%= tview.tmeta.texport.angular.tbase %>/');
|
||||
<% } %>
|
||||
});
|
||||
}
|
||||
<%- include('controller-action-none', {tview: tview,taction: 'tedit'}); %>
|
||||
}
|
||||
<% } %>
|
||||
|
||||
<% if (tview.tdelete) { %>
|
||||
function <%= tview.tdelete.texport.angular.tcontroller.prefix %><%= tview.tcode %><%= tview.tdelete.texport.angular.tcontroller.postfix %>(<%= tview.tdelete.texport.angular.tcontroller.argu %>) {
|
||||
$scope.data = {};
|
||||
$http.get('<%= tapiPrefix %>/<%= tview.tread.texport.json.tslug %>/' + $routeParams.id).success(function(data) {
|
||||
$scope.data = data.data;
|
||||
});
|
||||
$scope.tdeleteData = function () {
|
||||
$http.delete('<%= tapiPrefix %>/<%= tview.tdelete.texport.json.tslug %>/'+ $routeParams.id, $scope.data).success(function(data) {
|
||||
<% if (tview.tlist) { %>
|
||||
$location.url('<%= tview.tmeta.texport.angular.tbase %>/<%= tview.tslug %>/<%= tview.tlist.texport.angular.tslug %>');
|
||||
<% } else { %>
|
||||
$location.url('<%= tview.tmeta.texport.angular.tbase %>/');
|
||||
<% } %>
|
||||
});
|
||||
}
|
||||
<%- include('controller-action-none', {tview: tview,taction: 'tdelete'}); %>
|
||||
}
|
||||
<% } %>
|
||||
|
|
@ -0,0 +1,20 @@
|
|||
<h2>Create <%= tview.tname %></h2>
|
||||
<div class="row">
|
||||
<div class="col-lg-8">
|
||||
<form role="form">
|
||||
<% tview.tedit.tfields.forEach(function (fieldKey) { %>
|
||||
<div class="form-group">
|
||||
<label for="<%= tview.tmeta.tfields[fieldKey].tid %>"><%= tview.tmeta.tfields[fieldKey].tname %></label>
|
||||
<input ng-model="data.<%= tview.tmeta.tfields[fieldKey].tid %>" name="<%= tview.tmeta.tfields[fieldKey].tid %>" class="form-control"></input>
|
||||
</div>
|
||||
<% }) %>
|
||||
<button type="submit" class="btn btn-default" ng-click="tcreateData()">Submit</button>
|
||||
<button type="submit" class="btn btn-default" ng-click="tcreateNone()">Cancel</button>
|
||||
</form>
|
||||
</div>
|
||||
<div class="col-lg-4"></div>
|
||||
</div>
|
||||
<!--
|
||||
06 308 500 37
|
||||
-->
|
||||
|
||||
|
|
@ -0,0 +1,6 @@
|
|||
<h2>Delete <%= tview.tname %></h2>
|
||||
<div>
|
||||
<p>Are you sure you want to delete this <%= tview.tname %> {{data._id}} ?</p>
|
||||
<button ng-click="tdeleteData()">Yes</button> | -
|
||||
<button ng-click="tdeleteNone()">No thanks</button>
|
||||
<div>
|
||||
|
|
@ -0,0 +1,16 @@
|
|||
|
||||
<h2> Edit <%= tview.tname %></h2>
|
||||
<div class="row">
|
||||
<div class="col-lg-8">
|
||||
<form role="form">
|
||||
<% tview.tedit.tfields.forEach(function (fieldKey) { %>
|
||||
<div class="form-group">
|
||||
<label for="<%= tview.tmeta.tfields[fieldKey].tid %>"><%= tview.tmeta.tfields[fieldKey].tname %></label>
|
||||
<input ng-model="data.<%= tview.tmeta.tfields[fieldKey].tid %>" name="<%= tview.tmeta.tfields[fieldKey].tid %>" class="form-control"></input>
|
||||
</div>
|
||||
<% }) %>
|
||||
<button type="submit" class="btn btn-default" ng-click="teditData()">Submit</button>
|
||||
<button type="submit" class="btn btn-default" ng-click="teditNone()">Cancel</button>
|
||||
</form>
|
||||
<div class="col-lg-4"></div>
|
||||
</div>
|
||||
|
|
@ -0,0 +1,50 @@
|
|||
|
||||
<p>There are {{data.length}} <%= tview.tplural %></p>
|
||||
|
||||
<% if (tview.tcreate) { %>
|
||||
<p>
|
||||
<a href="<%= tview.tmeta.texport.angular.tbase %>/<%= tview.tslug %>/<%= tview.tcreate.texport.angular.tslug %>">Create New</a>
|
||||
</p>
|
||||
<% } %>
|
||||
<div class="table-responsive">
|
||||
<table class="table table-bordered table-hover table-striped">
|
||||
<thead>
|
||||
<tr>
|
||||
<% if (tview.tread) { %><th>Open</th><% } %>
|
||||
<% if (tview.tedit) { %><th>Edit</th><% } %>
|
||||
<% if (tview.tdelete) { %><th>Delete</th><% } %>
|
||||
<% tview.tlist.tfields.forEach(function (fieldKey) { %>
|
||||
<th><%= tview.tmeta.tfields[fieldKey].tname %></th>
|
||||
<% }) %>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr ng-repeat="row in data">
|
||||
<% if (tview.tread) { %>
|
||||
<td>
|
||||
<a href="<%= tview.tmeta.texport.angular.tbase %>/<%= tview.tslug %>/<%= tview.tread.texport.angular.tslug %>/{{row._id}}">Read</a>
|
||||
</td>
|
||||
<% } %>
|
||||
<% if (tview.tedit) { %>
|
||||
<td>
|
||||
<a href="<%= tview.tmeta.texport.angular.tbase %>/<%= tview.tslug %>/<%= tview.tedit.texport.angular.tslug %>/{{row._id}}">Edit</a>
|
||||
</td>
|
||||
<% } %>
|
||||
<% if (tview.tdelete) { %>
|
||||
<td>
|
||||
<a href="<%= tview.tmeta.texport.angular.tbase %>/<%= tview.tslug %>/<%= tview.tdelete.texport.angular.tslug %>/{{row._id}}">Delete</a>
|
||||
</td>
|
||||
<% } %>
|
||||
<% tview.tlist.tfields.forEach(function (fieldKey) { %>
|
||||
<td>{{row.<%= tview.tmeta.tfields[fieldKey].tid %>}}</td>
|
||||
<% }) %>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<% if (tview.tcreate) { %>
|
||||
<p>
|
||||
<a href="<%= tview.tmeta.texport.angular.tbase %>/<%= tview.tslug %>/<%= tview.tcreate.texport.angular.tslug %>">Create New</a>
|
||||
</p>
|
||||
<% } %>
|
||||
|
||||
|
|
@ -0,0 +1,19 @@
|
|||
<section>
|
||||
<h2> {{data._id}} </h2>
|
||||
<% if (tview.tedit) { %>
|
||||
<p>
|
||||
<a href="<%= tview.tmeta.texport.angular.tbase %>/<%= tview.tslug %>/<%= tview.tedit.texport.angular.tslug %>/{{data._id}}">Edit</a>
|
||||
</p>
|
||||
<% } %>
|
||||
<% if (tview.tdelete) { %>
|
||||
<p>
|
||||
<a href="<%= tview.tmeta.texport.angular.tbase %>/<%= tview.tslug %>/<%= tview.tdelete.texport.angular.tslug %>/{{data._id}}">Delete</a>
|
||||
</p>
|
||||
<% } %>
|
||||
<% tview.tread.tfields.forEach(function (fieldKey) { %>
|
||||
<p><%= tview.tmeta.tfields[fieldKey].tname %>: {{data.<%= tview.tmeta.tfields[fieldKey].tid %>}}</p>
|
||||
<% }) %>
|
||||
<p>
|
||||
<button ng-click="treadNone()">Back</button>
|
||||
</p>
|
||||
<sector>
|
||||
|
|
@ -0,0 +1 @@
|
|||
# END
|
||||
|
|
@ -0,0 +1 @@
|
|||
# CSV: <%= tview.tid %>
|
||||
|
|
@ -0,0 +1 @@
|
|||
<% Object.keys(tview.tlist.tfields).forEach(function (tfieldKey) {var tfield = tview.tlist.tfields[tfieldKey]; %><%= record[tfield.tid] %>,<% }) %>
|
||||
|
|
@ -0,0 +1 @@
|
|||
<% Object.keys(tview.tlist.tfields).forEach(function (tfieldKey) {var tfield = tview.tlist.tfields[tfieldKey]; %><%= record[tfield.tid] %>,<% }) %>
|
||||
|
|
@ -0,0 +1 @@
|
|||
</<%= tview.tid %>List>
|
||||
|
|
@ -0,0 +1,2 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<<%= tview.tid %>List>
|
||||
|
|
@ -0,0 +1,5 @@
|
|||
<<%= tview.tid %>>
|
||||
<% Object.keys(tview.tlist.tfields).forEach(function (tfieldKey) {var tfield = tview.tlist.tfields[tfieldKey]; %>
|
||||
<<%= tfieldKey %> type="<%= tfield.type %>"><%= record[tfield.tid] %></<%= tfieldKey %>>
|
||||
<% }) %>
|
||||
</<%= tview.tid %>>
|
||||
|
|
@ -0,0 +1,2 @@
|
|||
</<%= tview.tid %>List>
|
||||
</data>
|
||||
|
|
@ -0,0 +1,3 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<data>
|
||||
<<%= tview.tid %>List>
|
||||
|
|
@ -0,0 +1,5 @@
|
|||
<<%= tview.tid %>>
|
||||
<% Object.keys(tview.tlist.tfields).forEach(function (tfieldKey) {var tfield = tview.tlist.tfields[tfieldKey]; %>
|
||||
<<%= tfieldKey %> type="<%= tfield.type %>"><%= record[tfield.tid] %></<%= tfieldKey %>>
|
||||
<% }) %>
|
||||
</<%= tview.tid %>>
|
||||
|
|
@ -0,0 +1,8 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<data>
|
||||
<<%= tview.tid %>>
|
||||
<% Object.keys(tview.tlist.tfields).forEach(function (tfieldKey) {var tfield = tview.tlist.tfields[tfieldKey]; %>
|
||||
<<%= tfieldKey %> type="<%= tfield.type %>"><%= record[tfield.tid] %></<%= tfieldKey %>>
|
||||
<% }) %>
|
||||
</<%= tview.tid %>>
|
||||
</data>
|
||||
Loading…
Add table
Add a link
Reference in a new issue