Merge branch 'master' into editor
This commit is contained in:
7 files changed
+13
-2
No files matched your search
@@ -1,3 +1,4 @@
|
||||
<!-- Shows user specific Dashboard -->
|
||||
<% if (user.role == "Teacher") { %>
|
||||
<% include teacherDashboard %>
|
||||
<% } %>
|
||||
|
||||
+1
-1
@@ -9,7 +9,7 @@
|
||||
rel="stylesheet"
|
||||
href="https://bootswatch.com/4/journal/bootstrap.min.css"
|
||||
/>
|
||||
<title>XP-System Mock</title>
|
||||
<title>XP-System</title>
|
||||
</head>
|
||||
<body>
|
||||
<div class="container"><%- body %></div>
|
||||
|
||||
@@ -17,6 +17,10 @@
|
||||
value="<%= typeof name != 'undefined' ? name : '' %>"
|
||||
/>
|
||||
</div>
|
||||
<div class='form-group'>
|
||||
<label for='image'>Upload Profile Picture</label>
|
||||
<input class='form-control' type="file" id="image" name="image" value="" required>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for='image'>Upload Profile Picture</label>
|
||||
<input class="form-control-file" type="file" id="image" name="image" value="">
|
||||
|
||||
@@ -34,7 +34,7 @@
|
||||
<div>
|
||||
<div id="myProgress">
|
||||
<div id="myBar"></div>
|
||||
<img id='pro-pic' src='data:image/<%= user.image.contentType %>;base64,
|
||||
<img id='pro-pic' src='data:image/<%=user.image.contentType%>;base64,
|
||||
<%=user.image.data.toString('base64')%>'>
|
||||
</div>
|
||||
<p stlye='text-align: right;' id='percent'></p>
|
||||
@@ -53,6 +53,7 @@
|
||||
<!-- Action Buttons -->
|
||||
<a href="/users/logout" class="btn btn-secondary">Logout</a>
|
||||
<button onClick='passData()' class='btn btn-secondary'>Edit</button>
|
||||
|
||||
<!-- Passing user _id to edit page script -->
|
||||
<script>
|
||||
function passData() {
|
||||
|
||||
@@ -113,6 +113,7 @@
|
||||
{"Master Digital Crafter": 800} // index 12
|
||||
]
|
||||
let indexes = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 12]
|
||||
|
||||
// Students should't be on this page sooooo...
|
||||
console.log("Students Shouldnt be here");
|
||||
</script>
|
||||
@@ -127,6 +128,7 @@
|
||||
<% if (member.role == "Student") { %>
|
||||
<!-- Creates User Button link -->
|
||||
<li><button class='btn btn-link mt-2' onclick='openProfile("<%= member.id %>")'><%= member.name %></button></li>
|
||||
|
||||
<!-- Creates hidden Div with user specific Data -->
|
||||
<div style='display: none; position: relative;' data-role='page' id='<%= member._id %>'>
|
||||
<img id='user-pro-pic' src='data:image/<%=member.image.contentType%>;base64,<%=member.image.data.toString('base64')%>'>
|
||||
@@ -139,6 +141,7 @@
|
||||
<p><%= member.role %></p>
|
||||
</div>
|
||||
<br>
|
||||
|
||||
<!-- Calculates user specific Rank -->
|
||||
<script>
|
||||
xp = <%= member.xp %>;
|
||||
@@ -163,6 +166,7 @@
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Display Rank
|
||||
document.getElementById('userRank-<%= member.id %>').innerHTML = currRank;
|
||||
</script>
|
||||
|
||||
Reference in new issue
Block a user