Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
yotta
/
pictogram
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
60
Merge Requests
0
Pipelines
Wiki
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
917c1634
authored
Feb 04, 2017
by
Sebastián Collado Montañez
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
supervisor list: student list v1
parent
d7a7770f
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
28 additions
and
21 deletions
sails/src/assets/scripts/modules/supervisor/controllers/supervisors.js
sails/src/assets/scripts/modules/supervisor/views/supervisors_list.html
sails/src/assets/scripts/modules/supervisor/controllers/supervisors.js
View file @
917c1634
...
...
@@ -12,7 +12,6 @@ dashboardControllers.controller('SupervisorsCtrl', function SupervisorsCtrl($sco
// Add to list
$scope
.
office
=
data
[
0
];
$scope
.
supervisors_list
();
console
.
log
(
$scope
.
office
.
id
);
})
.
error
(
function
(
data
,
status
,
headers
,
config
)
{
console
.
log
(
"Error from API: "
+
data
.
error
);
...
...
@@ -24,6 +23,7 @@ dashboardControllers.controller('SupervisorsCtrl', function SupervisorsCtrl($sco
.
get
(
config
.
backend
+
'/office/get/'
+
$scope
.
office
.
id
+
'/supervisors'
)
.
success
(
function
(
data
,
status
,
headers
,
config
)
{
$scope
.
supervisors_list
=
data
;
console
.
log
(
$scope
.
supervisors_list
);
})
.
error
(
function
(
data
,
status
,
headers
,
config
)
{
$translate
(
'error_downloading_supervisors'
).
then
(
function
(
translation
)
{
...
...
sails/src/assets/scripts/modules/supervisor/views/supervisors_list.html
View file @
917c1634
<!-- Supervisors -->
<div
class=
"panel panel-default"
>
<div
class=
"row"
>
<h3
translate
>
supervisors
</h3>
</div>
<div
class=
"row"
>
</div>
<div
class=
"row"
>
<div
class=
"panel panel-default"
>
<div
class=
"panel-heading"
>
<div
class=
"col-xs-4 input-group"
>
<input
type=
"text"
ng-model=
"search_sups"
id=
"search_sups"
placeholder=
"{{ 'filter' | translate }}"
class=
"form-control"
aria-describedby=
"basic-addon2"
>
<span
class=
"input-group-addon glyphicon glyphicon-search"
id=
"basic-addon2"
aria-hidden=
"true"
></span>
<div
class=
"panel-heading"
>
<div
class=
"row"
>
<div
class=
"col-xs-4"
>
<h5
translate
>
supervisors
</h5>
</div>
<div
class=
"col-xs-4"
>
</div>
<div
class=
"col-xs-4"
>
<div
class=
" input-group"
>
<input
type=
"text"
ng-model=
"search_sups"
id=
"search_sups"
placeholder=
"{{ 'filter' | translate }}"
class=
"form-control"
aria-describedby=
"basic-addon2"
>
<span
class=
"input-group-addon glyphicon glyphicon-search"
id=
"basic-addon2"
aria-hidden=
"true"
></span>
</div>
</div>
</div>
</div>
<table
class=
"table"
>
<div
class=
"table-responsive"
>
<table
class=
"table table-hover"
>
<thead
class=
"thead-default"
>
<tr>
<th
translate
>
name
</th>
<th
translate
>
email
</th>
<th
translate
>
option
s
</th>
<th
translate
>
student
s
</th>
</tr>
</thead>
<tbody>
<tr
ng-repeat=
"supervisor in supervisors_list | filter:search_sups | orderBy: 'name'"
>
<td
class=
"color_blue"
>
{{supervisor.name}} {{supervisor.surname}}
</td>
<td>
{{supervisor.email}}
</td>
<td
class=
"ops"
></td>
<td>
<table>
<tr
ng-repeat=
"student in supervisor.students"
>
<td>
{{ student.name }} {{ student.surname }}
</td>
</tr>
</table>
</td>
</tr>
</tbody>
</table>
</div>
</div>
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment