Commit | Line | Data |
---|---|---|
e99c53fb BA |
1 | extends layout |
2 | ||
3 | block stylesheets | |
4 | link(rel="stylesheet" href="/stylesheets/courseList.css") | |
5 | ||
6 | block content | |
7 | .container#courseList | |
8 | if teacher | |
9 | .row | |
10 | // Modal Structure | |
11 | #newCourse.modal | |
12 | .modal-content | |
13 | form(@submit.prevent="submit") | |
14 | .input-field | |
15 | input#code.validate(type="text" v-model="newCourse.code" autofocus required) | |
16 | label(for="code") Code | |
17 | .input-field | |
18 | input#description.validate(type="text" v-model="newCourse.description" required) | |
19 | label(for="description") Description | |
20 | .modal-footer | |
21 | #submit.center-align | |
22 | a.waves-effect.waves-light.btn(href="#!" @click="addCourse()") | |
23 | span Submit | |
24 | i.material-icons.right send | |
25 | .row | |
26 | .col.s12.m10.offset-m1.l8.offset-l2.xl6.offset-xl3 | |
27 | .card | |
28 | if teacher | |
29 | // Modal Trigger | |
30 | .center-align | |
31 | a.waves-effect.waves-light.btn.modal-trigger(href="#newCourse") New course | |
32 | table | |
33 | thead | |
34 | tr | |
35 | th Code | |
36 | th Description | |
37 | tbody | |
38 | tr.course(v-for="course in courseArray" @click.left="redirect(course.code)" @contextmenu.prevent="deleteCourse(course)") | |
39 | td {{ course.code }} | |
40 | td(v-html="course.description") | |
41 | ||
42 | block javascripts | |
e99c53fb BA |
43 | script. |
44 | let courseArray = !{JSON.stringify(courseArray)}; | |
45 | const initials = "#{initials}"; | |
46 | const admin = #{teacher}; | |
9872823d BA |
47 | script(src="/javascripts/utils/validation.js") |
48 | script(src="/javascripts/courseList.js") |