diff options
author | Luke Shumaker <lukeshu@sbcglobal.net> | 2016-11-02 16:09:45 -0400 |
---|---|---|
committer | Luke Shumaker <lukeshu@sbcglobal.net> | 2016-11-02 16:09:45 -0400 |
commit | ade49d8845e044292da64fcbe72a1f7ee91e66d9 (patch) | |
tree | b2030f99f28b1d9366989df3d74da5d874d6dbd9 /got/view_blob.got | |
parent | 60632ea541ac6fc57c8158bf44c625c526e1b215 (diff) |
some views
Diffstat (limited to 'got/view_blob.got')
-rw-r--r-- | got/view_blob.got | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/got/view_blob.got b/got/view_blob.got new file mode 100644 index 0000000..a1d7e2c --- /dev/null +++ b/got/view_blob.got @@ -0,0 +1,26 @@ +<!-- -*- Mode: HTML -*- --> +<h1>{{.path | html}}</h1> +<p>Content-Type: {{.ctype | html}}</p> +{{if hasprefix .ctype "text/"}} +<form method="POST" enctype="multipart/form-data"> + <input type="hidden" name="_method" value="PUT"> + <textarea name="_body">{{.content | html }}</textarea> + <label> + Description of change: + <input type="text" value="_message" /> + </label> + <input type="submit" value="Save"> +</form> +{{else}} +<p>You can't edit this type of file in your browser.</p> +{{end}} +<form method="POST" enctype="multipart/form-data"> + <input type="hidden" name="_method" value="PUT"> + <p>Instead of editing this in your browser, you can just upload a new copy.</p> + <input type="file" name="_body" required=required> + <label> + Description of change: + <input type="text" value="_message" /> + </label> + <input type="submit" value="Upload"> +</form> |