diff --git a/hourglass/client/profile/profile.html b/hourglass/client/profile/profile.html
index b3a4c4b..54253d6 100644
--- a/hourglass/client/profile/profile.html
+++ b/hourglass/client/profile/profile.html
@@ -32,8 +32,71 @@
Classes
-
+
+
+
+
Manage my Classes
+
+
+
+
Join a Class
+
+
+
+
Create a Class
+
+
+
+ {{#if profClassTab "manClass"}}
+
+ {{/if}}
+ {{#if profClassTab "addClass"}}
+
+ {{/if}}
+ {{#if profClassTab "creClass"}}
+ {{/if}}
+
+
diff --git a/hourglass/client/profile/profile.js b/hourglass/client/profile/profile.js
index c985b19..307f1a3 100644
--- a/hourglass/client/profile/profile.js
+++ b/hourglass/client/profile/profile.js
@@ -1,6 +1,7 @@
import { Template } from 'meteor/templating';
Session.set("profInputOpen",null);
+Session.set("profClassTab",null);
Session.set("modifying",null);
Session.set("radioDiv",null);
@@ -48,7 +49,17 @@ Template.profile.helpers({
}
},
classes() {
- return classes.find( { status: { $eq: true }, privacy: { $eq: false }}).sort({ subscribers: -1 }).fetch();
+ return classes.find( { status: { $eq: true }, privacy: { $eq: false }}, {sort: { subscribers: -1 }}).fetch();
+ },
+ profClassOpen(tab) {
+ Session.set("profClassTab",tab);
+ },
+ profClassTab(tab) {
+ if(tab === Session.get("profClassTab")) {
+ return true;
+ } else {
+ return false;
+ }
}
})
@@ -57,7 +68,7 @@ Template.profile.events({
var opened = Session.get("profradioDiv");
if(opened !== null && opened !== event.target.getAttribute("op")) {
closeDivFade(document.getElementsByClassName("creInputSel")[opened].parentNode.childNodes[4]);
- }
+ }d
},
'click .profInputSel' (event) {
Session.set("profradioDiv", event.target.getAttribute("op"));