1
0
mirror of https://github.com/S2-/gitlit synced 2025-08-03 04:40:05 +02:00
Files
gitlit/app/js/templates.js
2018-05-18 12:57:15 +02:00

27 lines
609 B
JavaScript

window.gitlit = window.gitlit || {};
gitlit.templates = {
main: ejs.compile(`
<table class="table">
<tr>
<th>file</th>
<th>status</th>
<th>action</th>
</tr>
<% files.forEach((file) => { %>
<tr class="<%= file.lockedBy ? 'alert alert-danger' : '' %>">
<td><%= file.file %></td>
<td><%= file.lockedBy ? file.lockedBy + ' (id: ' + file.id + ')' : 'not locked' %></td>
<td>
<a class="btn btn-<%= file.lockedBy ? 'danger' : 'primary' %>"
href="javascript:///">
<%= file.lockedBy ? 'Unlock' : 'Lock' %>
</a>
</td>
</tr>
<% }); %>
</table>
`)
};