Edit any files in user dir
This commit is contained in:
@@ -1,8 +1,18 @@
|
||||
{{ define "title" }}編輯{{ end }}
|
||||
{{ define "main" }}
|
||||
<h1>編輯帳本</h1>
|
||||
<form action="/edit" method="POST">
|
||||
<textarea name="data" rows="15" cols="40">{{ . }}</textarea><br>
|
||||
<aside>
|
||||
<ul>
|
||||
{{ range .FileList }}
|
||||
<li><a href="/edit/{{ . }}">{{ . }}</a></li>
|
||||
{{ end }}
|
||||
</ul>
|
||||
</aside>
|
||||
|
||||
<p>{{ .FileName }}{{ if not .Exists }} - New file{{ end }}</p>
|
||||
|
||||
<form action="/edit/{{ .FileName }}" method="POST">
|
||||
<textarea name="data" rows="15" cols="40">{{ .Data }}</textarea><br>
|
||||
<input type="submit" value="儲存">
|
||||
</form>
|
||||
{{ end }}
|
||||
|
||||
Reference in New Issue
Block a user