1
0
mirror of https://github.com/S2-/gitlit synced 2025-08-02 12:20:05 +02:00

style table

This commit is contained in:
s2
2018-05-19 22:42:40 +02:00
parent bc5a494918
commit 82a592d2df
2 changed files with 32 additions and 29 deletions

View File

@@ -10,39 +10,42 @@ gitlit.templates = {
`),
files: ejs.compile(`
<table class="table table-striped sortable js-filestable">
<tr>
<th>file</th>
<th>status</th>
<th class="sorttable_nosort">action</th>
</tr>
<% files.forEach((file) => { %>
<tr>
<td><%= file.file %></td>
<td><%= file.lockedBy ? file.lockedBy + ' (id: ' + file.id + ')' : 'not locked' %></td>
<td>
<a class="btn btn-primary js-lock"
href="javascript:///"
data-file="<%= file.file %>"
style="<%= file.lockedBy ? 'display: none;' : '' %>"
>
Lock
</a>
<a class="btn btn-danger js-unlock"
href="javascript:///"
data-file="<%= file.file %>"
style="<%= file.lockedBy ? '' : 'display: none;' %>"
>
Unlock
</a>
</td>
</tr>
<% }); %>
<thead class="thead-light">
<tr>
<th>file</th>
<th>status</th>
<th class="sorttable_nosort">action</th>
</tr>
<thead>
<tbody>
<% files.forEach((file) => { %>
<tr>
<td><%= file.file %></td>
<td><%= file.lockedBy ? file.lockedBy + ' (id: ' + file.id + ')' : 'not locked' %></td>
<td>
<a class="btn btn-primary btn-sm js-lock"
href="javascript:///"
data-file="<%= file.file %>"
style="<%= file.lockedBy ? 'display: none;' : '' %>"
>
Lock
</a>
<a class="btn btn-danger btn-sm js-unlock"
href="javascript:///"
data-file="<%= file.file %>"
style="<%= file.lockedBy ? '' : 'display: none;' %>"
>
Unlock
</a>
</td>
</tr>
<% }); %>
</tbody>
</table>
<div class="float-right">
<a class="btn btn-secondary js-refresh" href="javascript:///">
<a class="btn btn-secondary btn-sm js-refresh" href="javascript:///">
Refresh
</a>
</div>

BIN
screenshot/main.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 48 KiB