aboutsummaryrefslogtreecommitdiff
path: root/templates/user.html
blob: 41804079478790377f6c876c561ccd890cb49309 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
{{define "title"}}Acceuil{{end}}
{{define "content"}}
	<h1>Espace utilisateur</h1>
	<h2>Documents</h2>
	{{if .Error}}
	<p class="error">{{.Error}}</p>
	{{end}}
	{{if ne .UserImpersonation ""}}
	<form action="/upload?user={{.UserImpersonation}}" method="POST" enctype="multipart/form-data">
	{{else}}
	<form action="/upload" method="POST" enctype="multipart/form-data">
	{{end}}
		<input type="file" name="files" multiple />
		<input type="submit" value="Upload" />
	</form>
	{{if ne .UserImpersonation ""}}
	<form action="/download?user={{.UserImpersonation}}" method="POST" class="inline">
	{{else}}
	<form action="/download" method="POST" class="inline">
	{{end}}
		<div class="docs">
		<table>
			<tr>
				<th></th>
				<th>Nom du fichier</th>
				<th>Date de modification</th>
				<th>Taille</th>
			</tr>
			{{range .Docs}}
			<tr>
				<td>
					<input type="checkbox" name="selection" value="{{.Link}}">
				</td>
				<td class="filename">
					<a href="{{.Link}}">{{.Name}}</a>
				</td>
				<td>
					{{formatmodtime .ModTime}}
				</td>
				<td>
					{{.Size}}
				</td>
			</tr>
			{{end}}
		</table>
		</div>
		<br/>
		<input type="submit" value="Télécharger les fichiers sélectionnés">
	</form>
	<form action="/download" method="GET" class="inlineblk">
		<input type="hidden" name="user" id="userAll" value="{{.UserImpersonation}}">
		<input type="submit" value="Télécharger tous les fichiers">
	</form>
{{end}}