|
@@ -0,0 +1,145 @@
|
|
1
|
+@extends('layouts.master')
|
|
2
|
+
|
|
3
|
+@section('navigation')
|
|
4
|
+ @if(Auth::user()->role==1)
|
|
5
|
+ @include('local.managers.admins._navigation')
|
|
6
|
+ @elseif(Auth::user()->role==2)
|
|
7
|
+ @include('local.managers.sCoords._navigation')
|
|
8
|
+ @elseif(Auth::user()->role==3)
|
|
9
|
+ @include('local.managers.pCoords._navigation')
|
|
10
|
+ @elseif(Auth::user()->role==4)
|
|
11
|
+ @include('local.professors._navigation')
|
|
12
|
+ @endif
|
|
13
|
+@stop
|
|
14
|
+
|
|
15
|
+@section('main')
|
|
16
|
+
|
|
17
|
+ <div class="row">
|
|
18
|
+ <div class="col-md-3">
|
|
19
|
+ <div class="list-group">
|
|
20
|
+ @foreach ($objectives as $objective)
|
|
21
|
+ <li data-objective-id="{{ $objective->id }}"class="list-group-item">{{ $objective->text }}</li>
|
|
22
|
+ @endforeach
|
|
23
|
+ </div>
|
|
24
|
+ </div>
|
|
25
|
+
|
|
26
|
+ <div class="col-md-9">
|
|
27
|
+ <div id="objective-display" class="panel panel-default">
|
|
28
|
+ <div class="panel-heading">
|
|
29
|
+ <h4 class=" panel-title" style="cursor:auto!important;">
|
|
30
|
+ </h4>
|
|
31
|
+ </div>
|
|
32
|
+ <div class="panel-body">
|
|
33
|
+ <p class="objective-definition "></p>
|
|
34
|
+ <div class="table-responsive">
|
|
35
|
+ <table class="table table-striped table-condensed datatable">
|
|
36
|
+ <thead><tr><th>Criterion</th><th>Beginning (1-2)</th><th>In Progress (3-4)</th><th>Satisfactory (5-6)</th><th>Excellent (7-8)</th></tr></thead>
|
|
37
|
+ <tfoot>
|
|
38
|
+ <tr class="column-search">
|
|
39
|
+ <th><input class="column-search-bar form-control" type="text" placeholder="Buscar"/></th>
|
|
40
|
+ <th><input class="column-search-bar form-control" type="text" placeholder="Buscar"/></th>
|
|
41
|
+ <th><input class="column-search-bar form-control" type="text" placeholder="Buscar"/></th>
|
|
42
|
+ <th><input class="column-search-bar form-control" type="text" placeholder="Buscar"/></th>
|
|
43
|
+ <th><input class="column-search-bar form-control" type="text" placeholder="Buscar"/></th>
|
|
44
|
+ </tr>
|
|
45
|
+ </tfoot>
|
|
46
|
+ <tbody>
|
|
47
|
+ </tbody>
|
|
48
|
+ </table>
|
|
49
|
+ </div>
|
|
50
|
+
|
|
51
|
+ </div>
|
|
52
|
+ </div>
|
|
53
|
+ </div>
|
|
54
|
+
|
|
55
|
+ <div class="col-md-9">
|
|
56
|
+ <div class="no-objective alert alert-info">
|
|
57
|
+ <p>Select a Learning Objective to view its information</p>
|
|
58
|
+ </div>
|
|
59
|
+ </div>
|
|
60
|
+
|
|
61
|
+ </div>
|
|
62
|
+@stop
|
|
63
|
+
|
|
64
|
+@section('included-js')
|
|
65
|
+ @include('global._datatables_js')
|
|
66
|
+@stop
|
|
67
|
+
|
|
68
|
+@section('javascript')
|
|
69
|
+
|
|
70
|
+$(document).ready(function()
|
|
71
|
+{
|
|
72
|
+ // --------------------------------------------------------------------------
|
|
73
|
+ // Page load
|
|
74
|
+ // --------------------------------------------------------------------------
|
|
75
|
+
|
|
76
|
+ // Hide accordion panel contents by default
|
|
77
|
+ $('.panel-group .panel-body').hide();
|
|
78
|
+
|
|
79
|
+ $('#objective-display').parent().hide();
|
|
80
|
+
|
|
81
|
+ // --------------------------------------------------------------------------
|
|
82
|
+ // Functions
|
|
83
|
+ // --------------------------------------------------------------------------
|
|
84
|
+
|
|
85
|
+ // --------------------------------------------------------------------------
|
|
86
|
+ // Events
|
|
87
|
+ // --------------------------------------------------------------------------
|
|
88
|
+
|
|
89
|
+ // When list item is clicked, load corresponding info
|
|
90
|
+ $('.list-group-item').on('click', function()
|
|
91
|
+ {
|
|
92
|
+ var id = $(this).data('objective-id');
|
|
93
|
+
|
|
94
|
+ $.post(
|
|
95
|
+ "{{ URL::action('ObjectivesController@fetchObjectiveForCriteria') }}",
|
|
96
|
+ { id: id },
|
|
97
|
+ function(json)
|
|
98
|
+ {
|
|
99
|
+ // Retrieve datatable instance
|
|
100
|
+ var table = $('.datatable').DataTable();
|
|
101
|
+
|
|
102
|
+ var name = json.objective.text;
|
|
103
|
+ var definition = json.objective.program.name;
|
|
104
|
+ var criteria =json.objective.criteria;
|
|
105
|
+
|
|
106
|
+ $('#objective-display').parent().show();
|
|
107
|
+ $('.no-objective').parent().hide();
|
|
108
|
+
|
|
109
|
+ //Display title and definition
|
|
110
|
+ $('#objective-display .panel-title').html(name);
|
|
111
|
+ $('#objective-display .objective-definition').html(definition);
|
|
112
|
+
|
|
113
|
+ //Empty table
|
|
114
|
+ table.clear();
|
|
115
|
+
|
|
116
|
+ // Add new criteria
|
|
117
|
+ if(criteria.length>0)
|
|
118
|
+ {
|
|
119
|
+ $('table').show();
|
|
120
|
+ $.each(criteria, function(index, value)
|
|
121
|
+ {
|
|
122
|
+ table.row.add([
|
|
123
|
+ value.name,
|
|
124
|
+ value.description12,
|
|
125
|
+ value.description34,
|
|
126
|
+ value.description56,
|
|
127
|
+ value.description78
|
|
128
|
+ ]);
|
|
129
|
+ });
|
|
130
|
+ }
|
|
131
|
+ else
|
|
132
|
+ {
|
|
133
|
+ $('table').hide();
|
|
134
|
+ }
|
|
135
|
+
|
|
136
|
+ // Update display
|
|
137
|
+ table.draw();
|
|
138
|
+ },
|
|
139
|
+ 'json'
|
|
140
|
+ );
|
|
141
|
+
|
|
142
|
+ })
|
|
143
|
+});
|
|
144
|
+
|
|
145
|
+@stop
|