-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
3aa15b5
commit 7dcb383
Showing
3 changed files
with
119 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
'use strict'; | ||
|
||
define(['paw'], function(paw) { | ||
paw.controller('AdminsIndexCtrl', ['$routeParams', function($routeParams) { | ||
|
||
var _this = this; | ||
this.filter = { | ||
dni: $routeParams.dni, | ||
firstName: $routeParams.firstName, | ||
lastName: $routeParams.lastName | ||
}; | ||
|
||
this.resetSearch = function() { | ||
this.filter = {}; | ||
}; | ||
|
||
this.admins = [ | ||
{ | ||
firstName: 'Matías', | ||
lastName: 'Mercado', | ||
dni: '12345685' | ||
}, | ||
{ | ||
firstName: 'Facundo', | ||
lastName: 'Mercado', | ||
dni: '32775545' | ||
}, | ||
{ | ||
firstName: 'Gibar', | ||
lastName: 'Sin', | ||
dni: '32365545' | ||
}, | ||
{ | ||
firstName: 'Obi Wan', | ||
lastName: 'Kenobi', | ||
dni: '45645682' | ||
}, | ||
{ | ||
firstName: 'Darth', | ||
lastName: 'Vader', | ||
dni: '12345685' | ||
}, | ||
{ | ||
firstName: 'Luke', | ||
lastName: 'Skywalker', | ||
dni: '56345686' | ||
}]; | ||
}]); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,65 @@ | ||
<div ng-controller='AdminsIndexCtrl as controller' class='admins-index-container'> | ||
<!-- Page Heading --> | ||
<h1 translate='i18nAdminsPanelSection' class='page-header'></h1> | ||
<!-- /Page Heading --> | ||
|
||
<!-- Filter --> | ||
<div class='filter-container'> | ||
<div class='filter-fields'> | ||
<div class='own-input-group'> | ||
<span class='search-label' translate=i18nDni></span> | ||
<input type='text' class='form-input-field' ng-model='controller.filter.DNI' placeholder="{{ 'i18nDni' | translate }}..."/> | ||
</div> | ||
<div class='own-input-group'> | ||
<span class='search-label' translate='i18nFirstName'></span> | ||
<input type='text' class='form-input-field' ng-model='controller.filter.firstName' placeholder="{{ 'i18nFirstName' | translate }}..."/> | ||
</div> | ||
<div class='own-input-group'> | ||
<span class='search-label' translate='i18nLastName'></span> | ||
<input type='text' class='form-input-field' ng-model='controller.filter.lastName' placeholder="{{ 'i18nLastName' | translate }}..."/> | ||
</div> | ||
</div> | ||
<div class='filter-buttons'> | ||
<button class='btn btn-default' type='submit'> | ||
<span class='fa fa-search' aria-hidden='true'></span> | ||
<span translate='i18nSearchButton' translate ></span> | ||
</button> | ||
<button class='btn btn-default' ng-click='controller.resetSearch()' type='submit'> | ||
<span class='fa fa-repeat' aria-hidden='true'></span> | ||
<span translate='i18nResetButton'></span> | ||
</button> | ||
</div> | ||
</div> | ||
<!-- /Filter --> | ||
|
||
<!-- Admins --> | ||
<div class='table-responsive'> | ||
<table class='table table-hover'> | ||
<thead> | ||
<tr> | ||
<th translate='i18nDni'></th> | ||
<th translate='i18nFirstName'></th> | ||
<th translate='i18nLastName'></th> | ||
<th translate='i18nActions'></th> | ||
</tr> | ||
</thead> | ||
<tbody> | ||
<tr ng-hide='controller.admins.length > 0' class='bg-warning'> | ||
<td colspan='4' class='text-danger text-center' translate='i18nNoStudentsFound'></td> | ||
</tr> | ||
<tr ng-repeat='admin in controller.admins'> | ||
<td>{{ admin.dni }}</td> | ||
<td>{{ admin.firstName }}</td> | ||
<td>{{ admin.lastName }}</td> | ||
<td class='actions-container'> | ||
<a class='btn btn-default' role='button'> | ||
<span class='fa fa-user' aria-hidden='true'></span> | ||
<span translate='i18nAdminShow'></span> | ||
</a> | ||
</td> | ||
</tr> | ||
</tbody> | ||
</table> | ||
</div> | ||
<!-- /Admins --> | ||
</div> |