From 8695be184a7d96af6d23631b6999e3c0c68fb6dc Mon Sep 17 00:00:00 2001 From: Vincent Widmer Date: Wed, 22 Aug 2018 17:31:05 +0200 Subject: [PATCH 1/4] Fix isBox bug --- src/client/templates/index/index_student.html | 2 -- 1 file changed, 2 deletions(-) diff --git a/src/client/templates/index/index_student.html b/src/client/templates/index/index_student.html index 8367531..5c4a87f 100644 --- a/src/client/templates/index/index_student.html +++ b/src/client/templates/index/index_student.html @@ -4,7 +4,6 @@
- {{#if isBox}} {{#if publicSpaces.count}}
@@ -19,7 +18,6 @@
{{_ 'index-student--public-spaces-title'}}
{{/if}} - {{/if}}
{{_ 'index-student--code'}}
From 4d5c425a65cf7324937762e448253dad3a0dec69 Mon Sep 17 00:00:00 2001 From: Vincent Widmer Date: Wed, 22 Aug 2018 17:43:28 +0200 Subject: [PATCH 2/4] Fix isBox bug with public spaces --- src/client/templates/index/index_student.html | 2 ++ src/client/templates/index/index_student.js | 5 ++++- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/src/client/templates/index/index_student.html b/src/client/templates/index/index_student.html index 5c4a87f..8367531 100644 --- a/src/client/templates/index/index_student.html +++ b/src/client/templates/index/index_student.html @@ -4,6 +4,7 @@
+ {{#if isBox}} {{#if publicSpaces.count}}
@@ -18,6 +19,7 @@
{{_ 'index-student--public-spaces-title'}}
{{/if}} + {{/if}}
{{_ 'index-student--code'}}
diff --git a/src/client/templates/index/index_student.js b/src/client/templates/index/index_student.js index 07ca3db..8aa4c7b 100644 --- a/src/client/templates/index/index_student.js +++ b/src/client/templates/index/index_student.js @@ -109,7 +109,10 @@ Template.indexStudent.helpers({ if (lang == langSelected) return 'selected'; } - } + }, + isBox: function() { + return (Meteor.settings.public.isBox === "true") + } }); From 60439d4de3b649afa6fb43ba5408ebca6a443d74 Mon Sep 17 00:00:00 2001 From: Vincent Widmer Date: Wed, 22 Aug 2018 18:13:07 +0200 Subject: [PATCH 3/4] Fix public permission bug --- src/client/templates/index/index_student.js | 2 +- src/client/templates/index/index_teacher.js | 2 +- src/private/version.json | 2 +- src/server/publications.js | 2 +- src/settings.json | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/client/templates/index/index_student.js b/src/client/templates/index/index_student.js index 8aa4c7b..ce5b09e 100644 --- a/src/client/templates/index/index_student.js +++ b/src/client/templates/index/index_student.js @@ -99,7 +99,7 @@ Template.indexStudent.helpers({ } }, publicSpaces: function() { - return Spaces.find({permissions:{public:true}}); + return Spaces.find({"permissions.public":true}); }, isLangSelected: function(lang) { if (Session.get('lang')) { diff --git a/src/client/templates/index/index_teacher.js b/src/client/templates/index/index_teacher.js index 52a2bc8..64a2f6a 100644 --- a/src/client/templates/index/index_teacher.js +++ b/src/client/templates/index/index_teacher.js @@ -118,7 +118,7 @@ Template.indexTeacher.helpers({ return Spaces.find({userId:Meteor.userId()}, {sort: {submitted: -1}}); }, publicSpaces: function() { - return Spaces.find({permissions:{public:true}}); + return Spaces.find({"permissions.public":true}); }, isLangSelected: function(lang) { if (Session.get('lang')) { diff --git a/src/private/version.json b/src/private/version.json index f36aa22..955ddd1 100644 --- a/src/private/version.json +++ b/src/private/version.json @@ -1,3 +1,3 @@ { - "version": "1.26c" + "version": "1.26d" } diff --git a/src/server/publications.js b/src/server/publications.js index 90ee034..3cc043a 100644 --- a/src/server/publications.js +++ b/src/server/publications.js @@ -8,7 +8,7 @@ Meteor.publish('allSpaces', function() { }); Meteor.publish('publicSpaces', function(userId) { - return Spaces.find({permissions:{public:true}}); + return Spaces.find({"permissions.public":true}); }); Meteor.publish('ownSpaces', function(userId) { diff --git a/src/settings.json b/src/settings.json index 2a74855..589b745 100644 --- a/src/settings.json +++ b/src/settings.json @@ -8,7 +8,7 @@ "mailPassword": "", "mailServer": "", "public" : { - "isBox": "false", + "isBox": "true", "prefix": "XX", "ga": { "id": "" From 0d73e8679a4a73e35bfd86e7ca0e4483c3db9d97 Mon Sep 17 00:00:00 2001 From: Vincent Widmer Date: Wed, 22 Aug 2018 18:39:21 +0200 Subject: [PATCH 4/4] Update version --- src/private/version.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/private/version.json b/src/private/version.json index 955ddd1..cc8a023 100644 --- a/src/private/version.json +++ b/src/private/version.json @@ -1,3 +1,3 @@ { - "version": "1.26d" + "version": "1.26e" }