Skip to content

Commit 3dae11f

Browse files
sandershihackerDerekTBrown
authored andcommitted
explore publish and taskview sidenav
explore view links to course/courseId taskview sidenav Termplate Issues (#143) * Updated Schemas * Load Screen * Loading Screen * publish subscribe and dynamic explore page * deleted swap file * publish subscribe * template fixes * added start for reactive publication * template issue * . * . * course_records publish * course_records reactively publish * revert meteor update * publish subscribe and lineheight for searchpage icons * fixed indentation and removed test file * indentation * indentation * Accounts page and fixed random erro * toolbar for mobile devices * toolbar * account.html fixes * Toolbar made responsive * Responsive toolbar fixes * created userlist component * course_records course_id validation * indentation * markdown * import changes * validation addition * Forms Module Deprecated Warning. Issue #110 * indentation * Use routerLink * api changes (#126) * issue 32 fixed * removed swp * fixed nconf issues * issue 82, 84 fixes * fixed #82 * isse #77 * fixed tests * fixed files * fixed tests master * fixed comment * moved validator * removed duplicate file * fixed tests, removed duplicate underscore, publish * changes * fixed methods.ts import * fixed issues w methods * fixes * minor fixes * A * api changes * fixed api * comments * minor changes * minor fixes * method implementations (#127) * issue 32 fixed * removed swp * fixed nconf issues * issue 82, 84 fixes * fixed #82 * isse #77 * fixed tests * fixed files * fixed tests master * fixed comment * moved validator * removed duplicate file * fixed tests, removed duplicate underscore, publish * changes * fixed methods.ts import * fixed issues w methods * fixes * minor fixes * A * api changes * fixed api * comments * minor changes * minor fixes * method implementations * course pages now uses Child Routing * deleted LabData class * school name * search function * icon size and #136 * dashboard pull data from database * fix inappropriate file naming for gradelist and lablist * more templating issues * . * . * markdown default * lablist and gradelist * template changes * explore page changes * delete instructor page * user schema * indentation * indentation Extend terminal on small width Taskview (#146) * Updated Schemas * Load Screen * Loading Screen * publish subscribe and dynamic explore page * deleted swap file * publish subscribe * template fixes * added start for reactive publication * template issue * . * . * course_records publish * course_records reactively publish * revert meteor update * publish subscribe and lineheight for searchpage icons * fixed indentation and removed test file * indentation * indentation * Accounts page and fixed random erro * toolbar for mobile devices * toolbar * account.html fixes * Toolbar made responsive * Responsive toolbar fixes * created userlist component * course_records course_id validation * indentation * markdown * import changes * validation addition * Forms Module Deprecated Warning. Issue #110 * indentation * Use routerLink * api changes (#126) * issue 32 fixed * removed swp * fixed nconf issues * issue 82, 84 fixes * fixed #82 * isse #77 * fixed tests * fixed files * fixed tests master * fixed comment * moved validator * removed duplicate file * fixed tests, removed duplicate underscore, publish * changes * fixed methods.ts import * fixed issues w methods * fixes * minor fixes * A * api changes * fixed api * comments * minor changes * minor fixes * method implementations (#127) * issue 32 fixed * removed swp * fixed nconf issues * issue 82, 84 fixes * fixed #82 * isse #77 * fixed tests * fixed files * fixed tests master * fixed comment * moved validator * removed duplicate file * fixed tests, removed duplicate underscore, publish * changes * fixed methods.ts import * fixed issues w methods * fixes * minor fixes * A * api changes * fixed api * comments * minor changes * minor fixes * method implementations * course pages now uses Child Routing * deleted LabData class * school name * search function * icon size and #136 * dashboard pull data from database * fix inappropriate file naming for gradelist and lablist * more templating issues * . * . * markdown default * lablist and gradelist * template changes * explore page changes * delete instructor page * user schema * indentation * indentation * explore publish and taskview sidenav * explore view links to course/courseId * taskview sidenav * taskview Added UserList Component in Courses Termplate Issues complete except for off-canvas taskview (#150) * Updated Schemas * Load Screen * Loading Screen * publish subscribe and dynamic explore page * deleted swap file * publish subscribe * template fixes * added start for reactive publication * template issue * . * . * course_records publish * course_records reactively publish * revert meteor update * publish subscribe and lineheight for searchpage icons * fixed indentation and removed test file * indentation * indentation * Accounts page and fixed random erro * toolbar for mobile devices * toolbar * account.html fixes * Toolbar made responsive * Responsive toolbar fixes * created userlist component * course_records course_id validation * indentation * markdown * import changes * validation addition * Forms Module Deprecated Warning. Issue #110 * indentation * Use routerLink * api changes (#126) * issue 32 fixed * removed swp * fixed nconf issues * issue 82, 84 fixes * fixed #82 * isse #77 * fixed tests * fixed files * fixed tests master * fixed comment * moved validator * removed duplicate file * fixed tests, removed duplicate underscore, publish * changes * fixed methods.ts import * fixed issues w methods * fixes * minor fixes * A * api changes * fixed api * comments * minor changes * minor fixes * method implementations (#127) * issue 32 fixed * removed swp * fixed nconf issues * issue 82, 84 fixes * fixed #82 * isse #77 * fixed tests * fixed files * fixed tests master * fixed comment * moved validator * removed duplicate file * fixed tests, removed duplicate underscore, publish * changes * fixed methods.ts import * fixed issues w methods * fixes * minor fixes * A * api changes * fixed api * comments * minor changes * minor fixes * method implementations * course pages now uses Child Routing * deleted LabData class * school name * search function * icon size and #136 * dashboard pull data from database * fix inappropriate file naming for gradelist and lablist * more templating issues * . * . * markdown default * lablist and gradelist * template changes * explore page changes * delete instructor page * user schema * indentation * indentation * explore publish and taskview sidenav * explore view links to course/courseId * taskview sidenav * taskview * taskview sidenav changes * Extend terminal on small width * . * .
1 parent 3a36490 commit 3dae11f

21 files changed

+356
-260
lines changed

client/imports/ui/components/explore/explore.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ <h2>{{ course.course_number }} | {{ course.course_name }}</h2>
1212
{{ course.course_description.content }}
1313
</p>
1414
<div class="course-link">
15-
<a md-button [routerLink]="['/course']">Course Page</a>
15+
<a md-button [routerLink]="['/course/' + course._id]">Enroll</a>
1616
</div>
1717
</md-content>
1818
</template>
@@ -30,4 +30,4 @@ <h2>Syllabus</h2>
3030
</template>
3131
</md-tab>
3232
</md-tab-group>
33-
</div>
33+
</div>

client/imports/ui/components/explore/search.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ <h2 id="search-string">Search Results for '{{ searchQuery }}'</h2>
2828
<td class="md-text-cell">{{ course.course_name }}</td>
2929
<td>{{ course.instructor_ids }}</td>
3030
<td>
31-
<a md-button [routerLink]="['/course']">Course Page</a>
31+
<a md-button [routerLink]="['/course/' + course._id]">Enroll</a>
3232
</td>
3333
</tr>
3434
</tbody>
Lines changed: 4 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,6 @@
11
<div class="tuxlab-markdown">
2-
<!-- Toolbar -->
3-
<div class="markdown-toolbar">
4-
<md-toolbar>
5-
<div class="wrapper">
6-
<!-- Navigation -->
7-
<div class="markdown-toolbar-nav">
8-
<a class="markdown-back-link">
9-
<md-icon fontIcon="tuxicon-left"></md-icon>
10-
</a>
11-
</div>
12-
<p class="text-center markdown-task-name">{{ labName }}</p>
13-
<div>
14-
<p>{{ labProgress }}</p>
15-
</div>
16-
</div>
17-
</md-toolbar>
18-
</div>
19-
20-
<!--Markdown-->
21-
<div class="markdown-content">
22-
<div id="task-markdown" [innerHTML]="convertedData">Task loading...</div>
23-
</div>
2+
<!-- Task Markdown -->
3+
<div class="markdown-content">
4+
<div id="task-markdown" [innerHTML]="convert(mdData)"></div>
5+
</div>
246
</div>

client/imports/ui/components/markdown/markdown.ts

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -16,15 +16,14 @@
1616
import { MeteorComponent } from 'angular2-meteor';
1717
import { OVERLAY_PROVIDERS } from '@angular2-material/core/overlay/overlay';
1818
import { MD_INPUT_DIRECTIVES } from '@angular2-material/input';
19+
import { MD_SIDENAV_DIRECTIVES } from '@angular2-material/sidenav';
1920

2021
// Toolbar
2122
import { MD_TOOLBAR_DIRECTIVES } from '@angular2-material/toolbar';
2223

2324
// Icon
2425
import { MD_ICON_DIRECTIVES, MdIconRegistry } from '@angular2-material/icon';
2526

26-
import TaskView from '../../pages/lab/taskview.ts';
27-
2827
// Markdown Imports
2928
/// <reference path="./marked.d.ts" />
3029
import * as marked from 'marked';
@@ -37,7 +36,8 @@
3736
MATERIAL_DIRECTIVES,
3837
MD_TOOLBAR_DIRECTIVES,
3938
MD_ICON_DIRECTIVES,
40-
MD_INPUT_DIRECTIVES
39+
MD_INPUT_DIRECTIVES,
40+
MD_SIDENAV_DIRECTIVES
4141
],
4242

4343
viewProviders: [ MdIconRegistry ],
@@ -48,8 +48,6 @@
4848
// Export MarkdownView Class
4949
export class MarkdownView extends MeteorComponent{
5050
@Input() mdData = "";
51-
labName = "Lab Name Here";
52-
labProgress = "3/10";
5351

5452
constructor(mdIconRegistry: MdIconRegistry) {
5553
super();

client/imports/ui/pages/course/course.html

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -5,19 +5,19 @@
55
<div class="wrapper">
66
<!-- Navigation -->
77
<div class="course-toolbar-nav">
8-
<a md-button [routerLink]="['/course']" class="home-button" id="toolbar-course">Home</a>
9-
<a md-button [routerLink]="['/course/labs']" id="toolbar-labs">Labs</a>
10-
<a md-button [routerLink]="['/course/grades']" id="toolbar-grades">Grades</a>
8+
<a md-button [routerLink]="['/course/' + courseId]" class="home-button" id="toolbar-course">Home</a>
9+
<a md-button [routerLink]="['/course/' + courseId + '/labs']" id="toolbar-labs">Labs</a>
10+
<a md-button [routerLink]="['/course/' + courseId + '/grades']" id="toolbar-grades">Grades</a>
1111
</div>
1212
</div>
1313
</md-toolbar>
1414
<md-toolbar class="small" *showItBootstrap="['xs']">
1515
<div>
16-
<a md-button [routerLink]="['/course']" id="toolbar-course">Home</a>
17-
<a md-button [routerLink]="['/course/labs']" id="toolbar-labs">Labs</a>
18-
<a md-button [routerLink]="['/course/grades']" id="toolbar-grades">Grades</a>
19-
<a md-button [routerLink]="['/course']">More</a>
20-
<a md-button [routerLink]="['/course']">More</a>
16+
<a md-button [routerLink]="['/course/' + courseId]" id="toolbar-course">Home</a>
17+
<a md-button [routerLink]="['/course/' + courseId + '/labs']" id="toolbar-labs">Labs</a>
18+
<a md-button [routerLink]="['/course/' + courseId + '/grades']" id="toolbar-grades">Grades</a>
19+
<a md-button [routerLink]="['/course/' + courseId]">More</a>
20+
<a md-button [routerLink]="['/course/' + courseId]">More</a>
2121
</div>
2222
<md-icon fontIcon="tuxicon-right"></md-icon>
2323
</md-toolbar>
Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,26 @@
11
import { RouterConfig } from '@angular/router';
22
import CourseView from './course.ts';
3-
import { CourseGradeList } from './course_gradelist.ts';
4-
import { CourseLabList } from './course_lablist.ts';
3+
import { GradeList } from './gradelist.ts';
4+
import { LabList } from './lablist.ts';
55
import { CourseDashboard } from './course_dashboard.ts';
66
import { LabView } from './labview.ts';
7+
import { GradeView } from './gradeview.ts';
78

89
export const courseRoutes: RouterConfig = [
910
{
1011
path: 'course',
1112
component: CourseView,
1213
children: [
13-
{ path: '', component: CourseDashboard },
14-
{ path: 'grades', component: CourseGradeList },
15-
{ path: 'labs', component: CourseLabList },
16-
{ path: 'labs/lab', component: LabView }
14+
{ path: ':courseid', component: CourseDashboard },
15+
{ path: ':courseid/grades', component: GradeList },
16+
{ path: ':courseid/labs', component: LabList },
17+
{ path: ':courseid/labs/lab', component: LabView },
18+
{ path: ':courseid/grades/grade', component: GradeView }
1719
// { path: '/:courseid', as: 'CourseView', component: CourseView },
1820
// { path: '/:courseid/users', as: 'UserList', component: UserList },
1921
// { path: '/:courseid/user/:userid', as: 'UserView', component: UserView },
2022
// { path: '/:courseid/labs', as: 'LabList', component: LabList },
2123
// { path: '/:courseid/lab/:labid', as: 'LabView', component: LabView },
2224
]
2325
}
24-
];
26+
];
Lines changed: 27 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,28 +1,31 @@
11
// Meteor Imports
2-
import { Meteor } from 'meteor/meteor';
3-
import { Mongo } from 'meteor/mongo';
4-
import 'reflect-metadata';
5-
import 'zone.js/dist/zone';
2+
import { Meteor } from 'meteor/meteor';
3+
import { Mongo } from 'meteor/mongo';
4+
import 'reflect-metadata';
5+
import 'zone.js/dist/zone';
66

77
// Angular Imports
8-
import { Component, ViewEncapsulation, provide } from '@angular/core';
9-
import { bootstrap } from 'angular2-meteor-auto-bootstrap';
10-
import { APP_BASE_HREF } from '@angular/common';
11-
import { HTTP_PROVIDERS } from '@angular/http';
12-
import { InjectUser } from 'angular2-meteor-accounts-ui';
13-
import { ROUTER_DIRECTIVES } from '@angular/router';
8+
import { Component, ViewEncapsulation, provide } from '@angular/core';
9+
import { bootstrap } from 'angular2-meteor-auto-bootstrap';
10+
import { APP_BASE_HREF } from '@angular/common';
11+
import { HTTP_PROVIDERS } from '@angular/http';
12+
import { InjectUser } from 'angular2-meteor-accounts-ui';
13+
import { ROUTER_DIRECTIVES } from '@angular/router';
14+
import { ActivatedRoute } from '@angular/router';
1415

1516
// Angular Material Imports
16-
import { MATERIAL_PROVIDERS, MATERIAL_DIRECTIVES } from 'ng2-material';
17-
import { MeteorComponent } from 'angular2-meteor';
18-
import { OVERLAY_PROVIDERS } from '@angular2-material/core/overlay/overlay';
17+
import { MATERIAL_PROVIDERS, MATERIAL_DIRECTIVES } from 'ng2-material';
18+
import { MeteorComponent } from 'angular2-meteor';
19+
import { OVERLAY_PROVIDERS } from '@angular2-material/core/overlay/overlay';
1920

2021
// Icon
21-
import { MD_ICON_DIRECTIVES, MdIconRegistry } from '@angular2-material/icon';
22+
import { MD_ICON_DIRECTIVES, MdIconRegistry } from '@angular2-material/icon';
2223

2324
// Courses and Course Record Imports
24-
import { courses } from "../../../../../collections/courses.ts";
25-
import { course_records } from "../../../../../collections/course_records.ts";
25+
import { courses } from "../../../../../collections/courses.ts";
26+
import { course_records } from "../../../../../collections/course_records.ts";
27+
28+
declare var Collections: any;
2629

2730
// Define CourseView Component
2831
@Component({
@@ -38,12 +41,19 @@
3841
encapsulation: ViewEncapsulation.None
3942
})
4043

44+
@InjectUser('user')
4145
// Export CourseView Class
4246
export default class CourseView extends MeteorComponent {
43-
constructor(mdIconRegistry: MdIconRegistry) {
47+
courseId: string;
48+
constructor(mdIconRegistry: MdIconRegistry, private route: ActivatedRoute) {
4449
super();
4550
// Create Icon Font
4651
mdIconRegistry.registerFontClassAlias('tux', 'tuxicon');
4752
mdIconRegistry.setDefaultFontSetClass('tuxicon');
4853
}
54+
55+
ngOnInit() {
56+
this.courseId = this.route.snapshot.params['courseid'];
57+
}
58+
4959
}

client/imports/ui/pages/course/course_dashboard.html

Lines changed: 24 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
<div class="tuxlab-course-dashboard">
22
<!--Course Description Card-->
3-
<a name="description"></a>
43
<md-card>
54
<md-card-title>
65
<md-card-title-text>
@@ -14,15 +13,17 @@
1413
<a md-button href="https://www.cs.cmu.edu/~15131/f15/">Course Website</a>
1514
</md-card-actions>
1615
</md-card>
17-
<!--Responsive Section for Lectures and Assignments-->
16+
17+
<!-- Responsive Section for Grades and Assignments -->
1818
<div layout="row" layout-xs="column">
19+
20+
<!-- Grade List -->
1921
<div flex>
20-
<!--Grade Card-->
2122
<tuxlab-gradelist></tuxlab-gradelist>
2223
</div>
24+
25+
<!-- Announcements -->
2326
<div flex>
24-
<!--Assignments Card-->
25-
<a name="assignments"></a>
2627
<md-card>
2728
<md-card-title>
2829
<md-card-title-text>
@@ -55,7 +56,25 @@
5556
</md-card-content>
5657
</md-card>
5758
</div>
59+
5860
</div>
61+
5962
<!--Lab List Card-->
6063
<tuxlab-lablist></tuxlab-lablist>
64+
65+
<md-card>
66+
<md-card-title>
67+
<md-card-title-text>
68+
<span class="md-headline">Edit Course</span>
69+
</md-card-title-text>
70+
</md-card-title>
71+
<md-card-content>
72+
<form>
73+
<input [(ngModel)]="courseName" name="course-name"/>
74+
<textarea [(ngModel)]="courseDescription" name="course-description"></textarea>
75+
76+
</form>
77+
</md-card-content>
78+
</md-card>
79+
6180
</div>

client/imports/ui/pages/course/course_dashboard.ts

Lines changed: 34 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -1,48 +1,52 @@
11
// Meteor Imports
2-
import { Meteor } from 'meteor/meteor';
3-
import { Mongo } from 'meteor/mongo';
4-
import 'reflect-metadata';
5-
import 'zone.js/dist/zone';
2+
import { Meteor } from 'meteor/meteor';
3+
import { Mongo } from 'meteor/mongo';
4+
import 'reflect-metadata';
5+
import 'zone.js/dist/zone';
66

77
// Angular Imports
8-
import { Component, ViewEncapsulation, provide } from '@angular/core';
9-
import { bootstrap } from 'angular2-meteor-auto-bootstrap';
10-
import { APP_BASE_HREF } from '@angular/common';
11-
import { HTTP_PROVIDERS } from '@angular/http';
12-
import { InjectUser } from 'angular2-meteor-accounts-ui';
13-
import { ROUTER_DIRECTIVES } from '@angular/router';
8+
import { Component, ViewEncapsulation, provide } from '@angular/core';
9+
import { bootstrap } from 'angular2-meteor-auto-bootstrap';
10+
import { APP_BASE_HREF, FORM_DIRECTIVES } from '@angular/common';
11+
import { HTTP_PROVIDERS } from '@angular/http';
12+
import { InjectUser } from 'angular2-meteor-accounts-ui';
13+
import { ROUTER_DIRECTIVES } from '@angular/router';
1414

1515
// Angular Material Imports
16-
import { MATERIAL_PROVIDERS, MATERIAL_DIRECTIVES } from 'ng2-material';
17-
import { MeteorComponent } from 'angular2-meteor';
18-
import {OVERLAY_PROVIDERS} from '@angular2-material/core/overlay/overlay';
16+
import { MATERIAL_PROVIDERS, MATERIAL_DIRECTIVES } from 'ng2-material';
17+
import { MeteorComponent } from 'angular2-meteor';
18+
import { OVERLAY_PROVIDERS } from '@angular2-material/core/overlay/overlay';
19+
import { MD_INPUT_DIRECTIVES } from '@angular2-material/input';
20+
1921

2022
// Icon
21-
import { MD_ICON_DIRECTIVES, MdIconRegistry } from '@angular2-material/icon';
23+
import { MD_ICON_DIRECTIVES, MdIconRegistry } from '@angular2-material/icon';
2224

2325
// LabList and Grades import
2426
import { GradeList } from './gradelist.ts';
2527
import { LabList } from './lablist.ts';
26-
28+
2729
// Courses and Course Record Imports
28-
import { courses } from "../../../../../collections/courses.ts";
29-
import { course_records } from "../../../../../collections/course_records.ts";
30+
import { courses } from "../../../../../collections/courses.ts";
31+
import { course_records } from "../../../../../collections/course_records.ts";
3032

3133
// Define CourseDashboard Component
32-
@Component({
33-
selector: 'tuxlab-course-dashboard',
34-
templateUrl: '/client/imports/ui/pages/course/course_dashboard.html',
35-
directives: [
36-
MATERIAL_DIRECTIVES,
37-
MD_ICON_DIRECTIVES,
38-
ROUTER_DIRECTIVES,
39-
LabList,
34+
@Component({
35+
selector: 'tuxlab-course-dashboard',
36+
templateUrl: '/client/imports/ui/pages/course/course_dashboard.html',
37+
directives: [
38+
MATERIAL_DIRECTIVES,
39+
MD_ICON_DIRECTIVES,
40+
ROUTER_DIRECTIVES,
41+
FORM_DIRECTIVES,
42+
MD_INPUT_DIRECTIVES,
43+
LabList,
4044
GradeList
41-
],
42-
viewProviders: [MdIconRegistry],
43-
providers: [OVERLAY_PROVIDERS],
44-
encapsulation: ViewEncapsulation.None
45-
})
45+
],
46+
viewProviders: [MdIconRegistry],
47+
providers: [OVERLAY_PROVIDERS],
48+
encapsulation: ViewEncapsulation.None
49+
})
4650

4751
// Export CourseDashboard Class
4852
export class CourseDashboard extends MeteorComponent {

client/imports/ui/pages/course/course_gradelist.ts

Lines changed: 0 additions & 31 deletions
This file was deleted.

0 commit comments

Comments
 (0)