Merge branch 'master' of https://github.com/ksjdragon/hourglass
This commit is contained in:
commit
ae1c9ea1d1
@ -129,6 +129,7 @@ p.text {
|
||||
|
||||
#github {
|
||||
font-size: 150%;
|
||||
color: #000 !important;
|
||||
margin: 0;
|
||||
padding: 1%;
|
||||
|
||||
|
||||
@ -157,6 +157,7 @@ Template.registerHelper('myClasses', () => { // Gets all classes and respective
|
||||
});
|
||||
|
||||
Template.registerHelper('pref', (val) => { // Obtains all user preferences.
|
||||
if(Meteor.user() === null) return;
|
||||
var preferences = Meteor.user().profile.preferences;
|
||||
if(val === 'timeHide' || val === 'done') {
|
||||
var invert = _.invert(ref);
|
||||
|
||||
@ -68,7 +68,7 @@ Template.profile.helpers({
|
||||
banner() { // Styles the banner
|
||||
var width = window.innerWidth * 1600 / 1920;
|
||||
var height = width * 615 / 1600;
|
||||
if (Meteor.user().profile.banner !== undefined) {
|
||||
if (Meteor.user().profile.banner !== undefined || Meteor.user().profile.banner !== null) {
|
||||
var banner = Meteor.user().profile.banner;
|
||||
} else {
|
||||
var banner = "Banners/defaultcover.jpg";
|
||||
@ -147,8 +147,7 @@ Template.profile.helpers({
|
||||
classHolderHeight() { // Dimensions the container for the classes
|
||||
return 0.26 * window.innerHeight.toString() + "px";
|
||||
},
|
||||
profClassTabColor(status) { // Change this [Supposed to show the current mode that's selected via color]
|
||||
|
||||
profClassTabColor(status) { // Change this [Supposed to show the current mode that's selected via color]
|
||||
if (Session.equals("profClassTab",status)) {
|
||||
return themeColors[Meteor.user().profile.preferences.theme].highlightText;
|
||||
} else {
|
||||
@ -156,7 +155,7 @@ Template.profile.helpers({
|
||||
}
|
||||
},
|
||||
profClassTab(tab) { // Tells current class
|
||||
if (Session.get("profClassTab",tab)) {
|
||||
if (Session.equals("profClassTab",tab)) {
|
||||
return true;
|
||||
} else {
|
||||
return false;
|
||||
|
||||
@ -37,7 +37,7 @@ Meteor.publish('schools', function() {
|
||||
Meteor.publish('classes', function() {
|
||||
if (Roles.userIsInRole(this.userId, ['superadmin', 'admin'])) {
|
||||
return classes.find();
|
||||
} else {
|
||||
} else if(this.userId !== null) {
|
||||
// Return user classes and all _public_ classes.
|
||||
var userprofile = Meteor.users.findOne(this.userId);
|
||||
if (userprofile !== undefined && userprofile.profile.classes !== undefined) {
|
||||
@ -79,7 +79,7 @@ Meteor.publish('classes', function() {
|
||||
Meteor.publish('work', function() {
|
||||
if (Roles.userIsInRole(this.userId, ['superadmin', 'admin'])) {
|
||||
return work.find();
|
||||
} else {
|
||||
} else if(this.userId !== null) {
|
||||
var userprofile = Meteor.users.findOne(this.userId);
|
||||
if (userprofile !== undefined && userprofile.profile.classes !== undefined) {
|
||||
return work.find({
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user