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

ejs.rr & open folder button

This commit is contained in:
s2
2019-06-20 10:17:28 +02:00
parent f69e80e306
commit 28acea0c74
8 changed files with 77 additions and 4 deletions

40
app/templates/files.ejs Normal file
View File

@@ -0,0 +1,40 @@
<table class="table table-striped sortable js-filestable">
<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 btn-sm js-refresh" href="javascript:///">
Refresh
</a>
</div>

View File

@@ -0,0 +1,7 @@
<div class="alert alert-danger">
<%= repoDir %> is not a git lfs repo.
</div>
<div class="text-center">
<a class="btn btn-primary js-open-folder" href="javascript:///">Open an other folder</a>
<input type="file" style="display: none" class="js-open-folder-input" webkitdirectory />
</div>

6
app/templates/main.ejs Normal file
View File

@@ -0,0 +1,6 @@
<div class="alert alert-success js-repo-dir" style="display:none;"></div>
<div class="files-table-container">
<div class="alert alert-primary" role="alert">
Getting file list...
</div>
</div>

View File

@@ -0,0 +1,3 @@
<div class="alert alert-info">
no files tracked with lfs here.
</div>