@ -1 +1,6 @@ |
|||||
# carsincommonAdminWeb |
|
||||
|
# carsincommonAdminWeb |
||||
|
|
||||
|
- server code: https://github.com/arnaucode/carsincommonServer |
||||
|
- frontend app code: https://github.com/arnaucode/carsincommonApp |
||||
|
- images server: https://github.com/arnaucode/goImgServer |
||||
|
- admin web: https://github.com/arnaucode/carsincommonAdminWeb |
@ -0,0 +1,77 @@ |
|||||
|
<div ng-include="'views/navbar.html'"></div> |
||||
|
|
||||
|
|
||||
|
<div class="container"> |
||||
|
<div class="row"> |
||||
|
<div class="col-sm-4"> |
||||
|
<div class="panel"> |
||||
|
<div class="panel-heading c_deepPurple300"> |
||||
|
<h3 class="panel-title">{{travel.title}}</h3> |
||||
|
</div> |
||||
|
<div class="panel-body"> |
||||
|
<p> |
||||
|
From: {{travel.from.name}} |
||||
|
</p> |
||||
|
<p> |
||||
|
To: {{travel.from.name}} |
||||
|
</p> |
||||
|
<p ng-show="travel.package"> |
||||
|
Can transport package |
||||
|
</p> |
||||
|
</div> |
||||
|
</div> |
||||
|
<div class="panel"> |
||||
|
<div class="panel-heading c_deepPurple300"> |
||||
|
<h3 class="panel-title">Map</h3> |
||||
|
</div> |
||||
|
<div class="panel-body"> |
||||
|
here the map |
||||
|
</div> |
||||
|
</div> |
||||
|
</div> |
||||
|
<div class="col-sm-4"> |
||||
|
<div class="panel"> |
||||
|
<div class="panel-heading c_deepPurple300"> |
||||
|
<h3 class="panel-title">{{travel.joinPetitions.length}} Pendent joins</h3> |
||||
|
</div> |
||||
|
<div class="panel-body"> |
||||
|
<div class="list-group"> |
||||
|
<a ng-repeat="user in travel.joinPetitions" ng-href="#!/user/{{user._id}}" class="list-group-item"> |
||||
|
<div class="row-picture"> |
||||
|
<img class="circle" ng-src="{{user.avatar}}" alt="icon"> |
||||
|
</div> |
||||
|
<div class="row-content"> |
||||
|
<h4 class="list-group-item-heading">{{user.username}}</h4> |
||||
|
|
||||
|
<p class="list-group-item-text">{{user.description}}</p> |
||||
|
</div> |
||||
|
<div class="list-group-separator"></div> |
||||
|
</a> |
||||
|
</div> |
||||
|
</div> |
||||
|
</div> |
||||
|
</div> |
||||
|
|
||||
|
<div class="col-sm-4"> |
||||
|
<div class="panel"> |
||||
|
<div class="panel-heading c_deepPurple300"> |
||||
|
<h3 class="panel-title">Accepted users {{travel.joins.length}}/{{travel.seats}}</h3> |
||||
|
</div> |
||||
|
<div class="panel-body"> |
||||
|
<div class="list-group"> |
||||
|
<a ng-repeat="user in travel.joins" ng-href="#!/user/{{user._id}}" class="list-group-item"> |
||||
|
<div class="row-picture"> |
||||
|
<img class="circle" ng-src="{{user.avatar}}" alt="icon"> |
||||
|
</div> |
||||
|
<div class="row-content"> |
||||
|
<h4 class="list-group-item-heading">{{user.username}}</h4> |
||||
|
|
||||
|
<p class="list-group-item-text">{{user.description}}</p> |
||||
|
</div> |
||||
|
<div class="list-group-separator"></div> |
||||
|
</a> |
||||
|
</div> |
||||
|
</div> |
||||
|
</div> |
||||
|
</div> |
||||
|
</div> |
@ -0,0 +1,23 @@ |
|||||
|
'use strict'; |
||||
|
|
||||
|
angular.module('app.travel', ['ngRoute']) |
||||
|
|
||||
|
.config(['$routeProvider', function($routeProvider) { |
||||
|
$routeProvider.when('/travel/:travelid', { |
||||
|
templateUrl: 'views/travel/travel.html', |
||||
|
controller: 'TravelCtrl' |
||||
|
}); |
||||
|
}]) |
||||
|
|
||||
|
.controller('TravelCtrl', function($scope, $http, $routeParams) { |
||||
|
$scope.travel = {}; |
||||
|
$http.get(urlapi + 'travels/id/' + $routeParams.travelid) |
||||
|
.then(function(data, status, headers, config) { |
||||
|
console.log('data success'); |
||||
|
console.log(data); |
||||
|
|
||||
|
$scope.travel = data.data; |
||||
|
}, function(data, status, headers, config) { |
||||
|
console.log('data error'); |
||||
|
}); |
||||
|
}); |
@ -1,5 +1,80 @@ |
|||||
<p>This is the partial for view 2.</p> |
|
||||
<p> |
|
||||
Showing of 'interpolate' filter: |
|
||||
{{ 'Current version is v%VERSION%.' | interpolate }} |
|
||||
</p> |
|
||||
|
<div ng-include="'views/navbar.html'"></div> |
||||
|
|
||||
|
|
||||
|
<div class="container"> |
||||
|
<div class="row"> |
||||
|
<div class="col-sm-4"> |
||||
|
<div class="panel"> |
||||
|
<div class="panel-heading c_deepPurple300"> |
||||
|
<h3 class="panel-title">User profile</h3> |
||||
|
</div> |
||||
|
<div class="panel-body"> |
||||
|
<div class="list-group"> |
||||
|
<a ng-href="#!/user" class="list-group-item"> |
||||
|
<div class="row-picture"> |
||||
|
<img class="circle" ng-src="{{user.avatar}}" alt="icon"> |
||||
|
</div> |
||||
|
<div class="row-content"> |
||||
|
<h4 class="list-group-item-heading">{{user.username}}</h4> |
||||
|
|
||||
|
<p class="list-group-item-text">{{user.description}}</p> |
||||
|
</div> |
||||
|
</a> |
||||
|
</div> |
||||
|
<p> |
||||
|
{{user.email}} |
||||
|
</p> |
||||
|
<p> |
||||
|
{{user.telegram}} |
||||
|
</p> |
||||
|
<p> |
||||
|
{{user.phone}} |
||||
|
</p> |
||||
|
</div> |
||||
|
</div> |
||||
|
<div class="panel"> |
||||
|
<div class="panel-heading c_deepPurple300"> |
||||
|
<h3 class="panel-title">User likes</h3> |
||||
|
</div> |
||||
|
<div class="panel-body"> |
||||
|
Panel content |
||||
|
</div> |
||||
|
</div> |
||||
|
</div> |
||||
|
<div class="col-sm-8"> |
||||
|
<div class="panel"> |
||||
|
<div class="panel-heading c_deepPurple300"> |
||||
|
<h3 class="panel-title">User travels</h3> |
||||
|
</div> |
||||
|
<div class="panel-body"> |
||||
|
<table class="table table-striped table-hover "> |
||||
|
<thead> |
||||
|
<tr> |
||||
|
<th>Type</th> |
||||
|
<th>Title</th> |
||||
|
<th>Date</th> |
||||
|
<th>User</th> |
||||
|
<th>nºJoins</th> |
||||
|
<th></th> |
||||
|
</tr> |
||||
|
</thead> |
||||
|
<tbody> |
||||
|
<tr ng-repeat="travel in user.travels"> |
||||
|
<td>{{travel.type}}</td> |
||||
|
<td>{{travel.title}}</td> |
||||
|
<td>{{travel.date | date}}</td> |
||||
|
<td> |
||||
|
<a ng-href="#!/user/{{travel.user._id}}"> |
||||
|
{{travel.user.username}} |
||||
|
</a> |
||||
|
</td> |
||||
|
<td>{{travel.joins.length}}</td> |
||||
|
<td><a ng-href="#!/travel/{{travel._id}}">View</a></td> |
||||
|
</tr> |
||||
|
</tbody> |
||||
|
</table> |
||||
|
</div> |
||||
|
</div> |
||||
|
</div> |
||||
|
</div> |
||||
|
</div> |