Notebook

/views/vnotebook/FileEdit.html (831 B)

 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
{% import (
"path/filepath"

"{{{ .Package }}}/app"
"{{{ .Package }}}/app/controller/cutil"
"{{{ .Package }}}/views/components"
"{{{ .Package }}}/views/layout"
) %}

{% code type FileEdit struct {
layout.Basic
Path []string
Content string
} %}

{% func (p *FileEdit) Body(as *app.State, ps *cutil.PageState) %}
{%- code
pth := filepath.Join(p.Path...)
-%}
<div class="card">
<h3>{%= components.SVGRefIcon(`notebook`, ps) %}Edit Notebook File [{%s pth %}]</h3>
<form class="mt expanded" action="" method="post">
<textarea name="content" rows="{%d 32 %}">{%s p.Content %}</textarea>
<div class="mt">
<button type="submit">Save Changes</button>
<a href="/notebook/files/{%s pth %}"><button type="button">Cancel</button></a>
</div>
</form>
</div>
{% endfunc %}