Sfoglia il codice sorgente

Implemented new domain pages

parent
commit
19e1986c6e

+ 9
- 1
app/controllers/OutcomesController.php Vedi File

@@ -159,8 +159,16 @@ class OutcomesController extends \BaseController {
159 159
 //        DB::disableQueryLog();
160 160
         $outcome = Outcome::find($id);
161 161
         $title = $outcome->name;
162
+        $courses = Auth::user()->courses()->get();
163
+        $activities = [];
164
+        foreach ($courses as $course) {
165
+            foreach ($course->activities as $activity) {
166
+                $activities[] = $activity;
167
+            }
168
+        }
169
+
162 170
 
163
-        return View::make('local.managers.admins.new-learning-outcome', compact('title', 'outcome'));
171
+        return View::make('local.managers.admins.new-learning-outcome', compact('title', 'outcome', 'courses', 'activities'));
164 172
     }
165 173
 
166 174
     public function update()

+ 40
- 2
app/views/local/managers/admins/new-learning-outcome.blade.php Vedi File

@@ -14,10 +14,48 @@
14 14
 
15 15
     <div class="row">
16 16
         <div class="col-md-12">
17
-
17
+            <h3>Courses</h3>
18 18
         </div>
19 19
     </div>
20
-
20
+    <div class="row">
21
+        @foreach($courses as $course)
22
+            <div class="col-md-2">
23
+{{--                TODO: Add href --}}
24
+                <a href="" style="text-decoration: none">
25
+                    <div class="panel panel-default" style="height: 10rem">
26
+                        <div class="panel-heading">
27
+                            <h5 class="panel-title">{{ $course->code }}</h5>
28
+                        </div>
29
+                        <div class="panel-body">
30
+                            <h6>{{ $course->name }}</h6>
31
+                        </div>
32
+                    </div>
33
+                </a>
34
+            </div>
35
+        @endforeach
36
+    </div>
37
+    <div class="row">
38
+        <div class="col-md-12">
39
+            <h3>Activities</h3>
40
+        </div>
41
+    </div>
42
+    <div class="row">
43
+        @foreach($activities as $activity)
44
+            <div class="col-md-2">
45
+                {{--                TODO: Add href --}}
46
+                <a href="" style="text-decoration: none">
47
+                    <div class="panel panel-default" style="height: 10rem">
48
+                        <div class="panel-heading">
49
+                            <h5 class="panel-title">{{ $activity->name }}</h5>
50
+                        </div>
51
+                        <div class="panel-body">
52
+                            <h6>{{ $activity->description }}</h6>
53
+                        </div>
54
+                    </div>
55
+                </a>
56
+            </div>
57
+        @endforeach
58
+    </div>
21 59
 @stop
22 60
 
23 61
 @section('included-js')

+ 1
- 1
app/views/local/managers/admins/new-learning-outcomes.blade.php Vedi File

@@ -16,7 +16,7 @@
16 16
         <div class="col-md-12">
17 17
             @foreach($outcomes as $outcome)
18 18
                 <div class="col-md-3">
19
-                    <a href="TODO" style="text-decoration: none">
19
+                    <a href="{{ URL::action('OutcomesController@newShow', ['id' => $outcome->id]) }}" style="text-decoration: none">
20 20
                         <div class="panel panel-default" style="height: 20rem">
21 21
                             <div class="panel-heading">
22 22
                                 <h5 class="panel-title">{{ $outcome->name }}</h5>