Added creator for work
This commit is contained in:
parent
2908c46452
commit
725a72f21a
@ -476,6 +476,10 @@ input, textarea {
|
||||
width: 17vw;
|
||||
}
|
||||
|
||||
#workDatea {
|
||||
width: 17vw;
|
||||
}
|
||||
|
||||
#editWorkCont {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
@ -560,13 +564,13 @@ input, textarea {
|
||||
}
|
||||
|
||||
#workInfoContainer {
|
||||
width: 70%;
|
||||
width: 28vw;
|
||||
margin-right: 3%;
|
||||
float: left;
|
||||
}
|
||||
|
||||
#workToggle {
|
||||
width: 27%;
|
||||
width: 10.8vw;
|
||||
float: right;
|
||||
vertical-align: top;
|
||||
}
|
||||
@ -1034,9 +1038,9 @@ input, textarea {
|
||||
}
|
||||
|
||||
.doneUser img {
|
||||
height: 4vh;
|
||||
width: 4vh;
|
||||
margin-right: 5%;
|
||||
height: 2vw;
|
||||
width: 2vw;
|
||||
margin-right: 0.5vw;
|
||||
|
||||
-moz-border-radius: 50%;
|
||||
-webkit-border-radius: 50%;
|
||||
@ -1046,6 +1050,7 @@ input, textarea {
|
||||
.doneUser span {
|
||||
position: absolute;
|
||||
top: 32%;
|
||||
width: 7.5vw;
|
||||
}
|
||||
|
||||
#toggleButtons {
|
||||
@ -1090,6 +1095,12 @@ input, textarea {
|
||||
box-shadow: inset 0 0 0 99999px rgba(0,0,0,0.15);
|
||||
}
|
||||
|
||||
.workCreator span {
|
||||
font-weight: 400;
|
||||
font-size: 1.2vh;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
#userTab {
|
||||
width: 0;
|
||||
height: 0;
|
||||
|
||||
@ -187,6 +187,10 @@
|
||||
<i class="fa fa-thumbs-down" aria-hidden="true"></i>
|
||||
<p>{{work 'reports'}}</p>
|
||||
</div>
|
||||
<div class="workCreator doneUser" onclick="window.location='/user/{{work 'email'}}'">
|
||||
<img src="{{work 'avatar'}}">
|
||||
<span>Created by<br>{{work 'creator'}}</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{{/unless}}
|
||||
|
||||
@ -614,7 +614,6 @@ Template.main.events({
|
||||
if (event.target.id !== "workDate") input.value = ele.childNodes[0].nodeValue;
|
||||
input.className = "changeInput";
|
||||
|
||||
|
||||
input.style.padding = "0.1%";
|
||||
input.id = ele.id + "a";
|
||||
ele.parentNode.appendChild(input);
|
||||
@ -645,10 +644,10 @@ Template.main.events({
|
||||
_id: Session.get("currentWork")["class"]
|
||||
});
|
||||
if (!(Meteor.userId() === Session.get("currentWork").creator ||
|
||||
Roles.userIsInRole(Meteor.userId(), ['superadmin', 'admin']) ||
|
||||
currClass.moderators.indexOf(Meteor.userId()) !== -1 ||
|
||||
currClass.banned.indexOf(Meteor.userId()) !== -1
|
||||
)) return;
|
||||
Roles.userIsInRole(Meteor.userId(), ['superadmin', 'admin']) ||
|
||||
currClass.moderators.indexOf(Meteor.userId()) !== -1 ||
|
||||
currClass.banned.indexOf(Meteor.userId()) !== -1
|
||||
)) return;
|
||||
}
|
||||
|
||||
var op = event.target;
|
||||
@ -989,8 +988,15 @@ function formReadable(input) { // Makes work information readable by users.
|
||||
input.userReport = "";
|
||||
}
|
||||
|
||||
var thisUser = Meteor.users.findOne({
|
||||
_id: input.creator
|
||||
});
|
||||
|
||||
input.confirmations = input.confirmations.length;
|
||||
input.reports = input.reports.length;
|
||||
input.creator = thisUser.profile.name;
|
||||
input.avatar = thisUser.profile.avatar;
|
||||
input.email = thisUser.services.google.email;
|
||||
|
||||
var comments = input.comments;
|
||||
var resort = [];
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user