2021-02-20 15:48:51 +00:00
|
|
|
// Code generated by qtc from "hypha.qtpl". DO NOT EDIT.
|
|
|
|
// See https://github.com/valyala/quicktemplate for details.
|
|
|
|
|
|
|
|
//line views/hypha.qtpl:1
|
|
|
|
package views
|
|
|
|
|
|
|
|
//line views/hypha.qtpl:1
|
|
|
|
import "path/filepath"
|
|
|
|
|
|
|
|
//line views/hypha.qtpl:2
|
|
|
|
import "strings"
|
|
|
|
|
2021-05-14 09:05:07 +00:00
|
|
|
//line views/hypha.qtpl:4
|
2021-05-09 09:36:39 +00:00
|
|
|
import "github.com/bouncepaw/mycorrhiza/cfg"
|
2021-02-20 15:48:51 +00:00
|
|
|
|
2021-05-14 09:05:07 +00:00
|
|
|
//line views/hypha.qtpl:5
|
2021-05-09 09:36:39 +00:00
|
|
|
import "github.com/bouncepaw/mycorrhiza/hyphae"
|
|
|
|
|
2021-05-14 09:05:07 +00:00
|
|
|
//line views/hypha.qtpl:6
|
|
|
|
import "github.com/bouncepaw/mycorrhiza/user"
|
2021-02-20 15:48:51 +00:00
|
|
|
|
2021-05-09 09:36:39 +00:00
|
|
|
//line views/hypha.qtpl:7
|
2021-05-14 09:05:07 +00:00
|
|
|
import "github.com/bouncepaw/mycorrhiza/util"
|
|
|
|
|
|
|
|
//line views/hypha.qtpl:9
|
2021-02-20 15:48:51 +00:00
|
|
|
import (
|
|
|
|
qtio422016 "io"
|
|
|
|
|
|
|
|
qt422016 "github.com/valyala/quicktemplate"
|
|
|
|
)
|
|
|
|
|
2021-05-14 09:05:07 +00:00
|
|
|
//line views/hypha.qtpl:9
|
2021-02-20 15:48:51 +00:00
|
|
|
var (
|
|
|
|
_ = qtio422016.Copy
|
|
|
|
_ = qt422016.AcquireByteBuffer
|
|
|
|
)
|
|
|
|
|
2021-05-14 09:05:07 +00:00
|
|
|
//line views/hypha.qtpl:9
|
2021-08-08 19:38:41 +00:00
|
|
|
func streambeautifulLink(qw422016 *qt422016.Writer, hyphaName string) {
|
2021-05-14 09:05:07 +00:00
|
|
|
//line views/hypha.qtpl:9
|
|
|
|
qw422016.N().S(`
|
2021-08-08 19:38:41 +00:00
|
|
|
<a href="/hypha/`)
|
|
|
|
//line views/hypha.qtpl:10
|
|
|
|
qw422016.N().S(hyphaName)
|
|
|
|
//line views/hypha.qtpl:10
|
|
|
|
qw422016.N().S(`">`)
|
|
|
|
//line views/hypha.qtpl:10
|
|
|
|
qw422016.E().S(util.BeautifulName(hyphaName))
|
|
|
|
//line views/hypha.qtpl:10
|
|
|
|
qw422016.N().S(`</a>`)
|
|
|
|
//line views/hypha.qtpl:10
|
|
|
|
}
|
|
|
|
|
|
|
|
//line views/hypha.qtpl:10
|
|
|
|
func writebeautifulLink(qq422016 qtio422016.Writer, hyphaName string) {
|
|
|
|
//line views/hypha.qtpl:10
|
|
|
|
qw422016 := qt422016.AcquireWriter(qq422016)
|
|
|
|
//line views/hypha.qtpl:10
|
|
|
|
streambeautifulLink(qw422016, hyphaName)
|
|
|
|
//line views/hypha.qtpl:10
|
|
|
|
qt422016.ReleaseWriter(qw422016)
|
|
|
|
//line views/hypha.qtpl:10
|
|
|
|
}
|
|
|
|
|
|
|
|
//line views/hypha.qtpl:10
|
|
|
|
func beautifulLink(hyphaName string) string {
|
|
|
|
//line views/hypha.qtpl:10
|
|
|
|
qb422016 := qt422016.AcquireByteBuffer()
|
|
|
|
//line views/hypha.qtpl:10
|
|
|
|
writebeautifulLink(qb422016, hyphaName)
|
|
|
|
//line views/hypha.qtpl:10
|
|
|
|
qs422016 := string(qb422016.B)
|
|
|
|
//line views/hypha.qtpl:10
|
|
|
|
qt422016.ReleaseByteBuffer(qb422016)
|
|
|
|
//line views/hypha.qtpl:10
|
|
|
|
return qs422016
|
|
|
|
//line views/hypha.qtpl:10
|
|
|
|
}
|
|
|
|
|
|
|
|
//line views/hypha.qtpl:12
|
|
|
|
func streamnonExistentHyphaNotice(qw422016 *qt422016.Writer, h *hyphae.Hypha, u *user.User) {
|
|
|
|
//line views/hypha.qtpl:12
|
|
|
|
qw422016.N().S(`
|
2021-05-14 09:05:07 +00:00
|
|
|
<section class="non-existent-hypha">
|
|
|
|
<h2 class="non-existent-hypha__title">This hypha does not exist</h2>
|
|
|
|
`)
|
2021-08-08 19:38:41 +00:00
|
|
|
//line views/hypha.qtpl:15
|
2021-07-02 08:20:03 +00:00
|
|
|
if cfg.UseAuth && u.Group == "anon" {
|
2021-08-08 19:38:41 +00:00
|
|
|
//line views/hypha.qtpl:15
|
2021-05-14 09:05:07 +00:00
|
|
|
qw422016.N().S(`
|
|
|
|
<p>You are not authorized to create new hyphae. Here is what you can do:</p>
|
|
|
|
<ul>
|
|
|
|
<li><a href="/login">Log in to your account, if you have one</a></li>
|
|
|
|
`)
|
2021-08-08 19:38:41 +00:00
|
|
|
//line views/hypha.qtpl:19
|
2021-07-02 08:20:03 +00:00
|
|
|
if cfg.AllowRegistration {
|
2021-08-08 19:38:41 +00:00
|
|
|
//line views/hypha.qtpl:19
|
2021-05-14 09:05:07 +00:00
|
|
|
qw422016.N().S(`<li><a href="/register">Register a new account</a></li>`)
|
2021-08-08 19:38:41 +00:00
|
|
|
//line views/hypha.qtpl:19
|
2021-05-14 09:05:07 +00:00
|
|
|
}
|
2021-08-08 19:38:41 +00:00
|
|
|
//line views/hypha.qtpl:19
|
2021-05-14 09:05:07 +00:00
|
|
|
qw422016.N().S(`
|
|
|
|
</ul>
|
|
|
|
`)
|
2021-08-08 19:38:41 +00:00
|
|
|
//line views/hypha.qtpl:21
|
2021-05-14 09:05:07 +00:00
|
|
|
} else {
|
2021-08-08 19:38:41 +00:00
|
|
|
//line views/hypha.qtpl:21
|
2021-05-14 09:05:07 +00:00
|
|
|
qw422016.N().S(`
|
|
|
|
|
|
|
|
<div class="non-existent-hypha__ways">
|
|
|
|
<section class="non-existent-hypha__way">
|
|
|
|
<h3 class="non-existent-hypha__subtitle">📝 Write a text</h3>
|
2021-08-06 12:25:53 +00:00
|
|
|
<p>Write a note, a diary, an article, a story or anything textual using <a href="/help/en/mycomarkup" class="shy-link">Mycomarkup</a>. Full history of edits to the document will be saved.</p>
|
2021-05-14 09:05:07 +00:00
|
|
|
<p>Make sure to follow this wiki's writing conventions if there are any.</p>
|
2021-06-19 22:58:56 +00:00
|
|
|
<a class="btn btn_accent stick-to-bottom" href="/edit/`)
|
2021-08-08 19:38:41 +00:00
|
|
|
//line views/hypha.qtpl:28
|
2021-05-14 09:05:07 +00:00
|
|
|
qw422016.E().S(h.Name)
|
2021-08-08 19:38:41 +00:00
|
|
|
//line views/hypha.qtpl:28
|
2021-05-14 09:05:07 +00:00
|
|
|
qw422016.N().S(`">Create</a>
|
|
|
|
</section>
|
|
|
|
|
|
|
|
<section class="non-existent-hypha__way">
|
|
|
|
<h3 class="non-existent-hypha__subtitle">🖼 Upload a media</h3>
|
|
|
|
<p>Upload a picture, a video or an audio. Most common formats can be accessed from the browser, others can be only downloaded afterwards. You can write a description for the media later.</p>
|
|
|
|
<form action="/upload-binary/`)
|
2021-08-08 19:38:41 +00:00
|
|
|
//line views/hypha.qtpl:34
|
2021-05-14 09:05:07 +00:00
|
|
|
qw422016.E().S(h.Name)
|
2021-08-08 19:38:41 +00:00
|
|
|
//line views/hypha.qtpl:34
|
2021-05-14 09:05:07 +00:00
|
|
|
qw422016.N().S(`"
|
|
|
|
method="post" enctype="multipart/form-data"
|
|
|
|
class="upload-binary">
|
|
|
|
<label for="upload-binary__input"></label>
|
|
|
|
<input type="file" id="upload-binary__input" name="binary">
|
|
|
|
|
2021-05-14 09:24:31 +00:00
|
|
|
<input type="submit" class="btn stick-to-bottom" value="Upload">
|
2021-05-14 09:05:07 +00:00
|
|
|
</form>
|
|
|
|
</section>
|
|
|
|
</div>
|
|
|
|
`)
|
2021-08-08 19:38:41 +00:00
|
|
|
//line views/hypha.qtpl:44
|
2021-05-14 09:05:07 +00:00
|
|
|
}
|
2021-08-08 19:38:41 +00:00
|
|
|
//line views/hypha.qtpl:44
|
2021-05-14 09:05:07 +00:00
|
|
|
qw422016.N().S(`
|
|
|
|
</section>
|
|
|
|
`)
|
2021-08-08 19:38:41 +00:00
|
|
|
//line views/hypha.qtpl:46
|
2021-05-14 09:05:07 +00:00
|
|
|
}
|
|
|
|
|
2021-08-08 19:38:41 +00:00
|
|
|
//line views/hypha.qtpl:46
|
2021-05-14 09:05:07 +00:00
|
|
|
func writenonExistentHyphaNotice(qq422016 qtio422016.Writer, h *hyphae.Hypha, u *user.User) {
|
2021-08-08 19:38:41 +00:00
|
|
|
//line views/hypha.qtpl:46
|
2021-05-14 09:05:07 +00:00
|
|
|
qw422016 := qt422016.AcquireWriter(qq422016)
|
2021-08-08 19:38:41 +00:00
|
|
|
//line views/hypha.qtpl:46
|
2021-05-14 09:05:07 +00:00
|
|
|
streamnonExistentHyphaNotice(qw422016, h, u)
|
2021-08-08 19:38:41 +00:00
|
|
|
//line views/hypha.qtpl:46
|
2021-05-14 09:05:07 +00:00
|
|
|
qt422016.ReleaseWriter(qw422016)
|
2021-08-08 19:38:41 +00:00
|
|
|
//line views/hypha.qtpl:46
|
2021-05-14 09:05:07 +00:00
|
|
|
}
|
|
|
|
|
2021-08-08 19:38:41 +00:00
|
|
|
//line views/hypha.qtpl:46
|
2021-05-14 09:05:07 +00:00
|
|
|
func nonExistentHyphaNotice(h *hyphae.Hypha, u *user.User) string {
|
2021-08-08 19:38:41 +00:00
|
|
|
//line views/hypha.qtpl:46
|
2021-05-14 09:05:07 +00:00
|
|
|
qb422016 := qt422016.AcquireByteBuffer()
|
2021-08-08 19:38:41 +00:00
|
|
|
//line views/hypha.qtpl:46
|
2021-05-14 09:05:07 +00:00
|
|
|
writenonExistentHyphaNotice(qb422016, h, u)
|
2021-08-08 19:38:41 +00:00
|
|
|
//line views/hypha.qtpl:46
|
2021-05-14 09:05:07 +00:00
|
|
|
qs422016 := string(qb422016.B)
|
2021-08-08 19:38:41 +00:00
|
|
|
//line views/hypha.qtpl:46
|
2021-05-14 09:05:07 +00:00
|
|
|
qt422016.ReleaseByteBuffer(qb422016)
|
2021-08-08 19:38:41 +00:00
|
|
|
//line views/hypha.qtpl:46
|
2021-05-14 09:05:07 +00:00
|
|
|
return qs422016
|
2021-08-08 19:38:41 +00:00
|
|
|
//line views/hypha.qtpl:46
|
2021-05-14 09:05:07 +00:00
|
|
|
}
|
|
|
|
|
2021-08-08 19:38:41 +00:00
|
|
|
//line views/hypha.qtpl:48
|
2021-02-20 15:48:51 +00:00
|
|
|
func StreamNaviTitleHTML(qw422016 *qt422016.Writer, h *hyphae.Hypha) {
|
2021-08-08 19:38:41 +00:00
|
|
|
//line views/hypha.qtpl:48
|
2021-02-20 15:48:51 +00:00
|
|
|
qw422016.N().S(`
|
|
|
|
`)
|
2021-08-08 19:38:41 +00:00
|
|
|
//line views/hypha.qtpl:50
|
2021-02-20 15:48:51 +00:00
|
|
|
var (
|
|
|
|
prevAcc = "/hypha/"
|
|
|
|
parts = strings.Split(h.Name, "/")
|
|
|
|
)
|
|
|
|
|
2021-08-08 19:38:41 +00:00
|
|
|
//line views/hypha.qtpl:54
|
2021-02-20 15:48:51 +00:00
|
|
|
qw422016.N().S(`
|
|
|
|
<h1 class="navi-title">
|
|
|
|
`)
|
2021-08-08 19:38:41 +00:00
|
|
|
//line views/hypha.qtpl:56
|
2021-05-09 09:36:39 +00:00
|
|
|
qw422016.N().S(`<a href="/hypha/`)
|
2021-08-08 19:38:41 +00:00
|
|
|
//line views/hypha.qtpl:57
|
2021-05-09 09:36:39 +00:00
|
|
|
qw422016.E().S(cfg.HomeHypha)
|
2021-08-08 19:38:41 +00:00
|
|
|
//line views/hypha.qtpl:57
|
2021-05-09 09:36:39 +00:00
|
|
|
qw422016.N().S(`">`)
|
2021-08-08 19:38:41 +00:00
|
|
|
//line views/hypha.qtpl:58
|
2021-05-09 09:36:39 +00:00
|
|
|
qw422016.N().S(cfg.NaviTitleIcon)
|
2021-08-08 19:38:41 +00:00
|
|
|
//line views/hypha.qtpl:58
|
2021-02-20 15:48:51 +00:00
|
|
|
qw422016.N().S(`<span aria-hidden="true" class="navi-title__colon">:</span></a>`)
|
2021-08-08 19:38:41 +00:00
|
|
|
//line views/hypha.qtpl:62
|
2021-05-09 09:36:39 +00:00
|
|
|
for i, part := range parts {
|
2021-08-08 19:38:41 +00:00
|
|
|
//line views/hypha.qtpl:63
|
2021-02-20 15:48:51 +00:00
|
|
|
if i > 0 {
|
2021-08-08 19:38:41 +00:00
|
|
|
//line views/hypha.qtpl:63
|
2021-02-20 15:48:51 +00:00
|
|
|
qw422016.N().S(`<span aria-hidden="true" class="navi-title__separator">/</span>`)
|
2021-08-08 19:38:41 +00:00
|
|
|
//line views/hypha.qtpl:65
|
2021-02-20 15:48:51 +00:00
|
|
|
}
|
2021-08-08 19:38:41 +00:00
|
|
|
//line views/hypha.qtpl:65
|
2021-02-20 15:48:51 +00:00
|
|
|
qw422016.N().S(`<a href="`)
|
2021-08-08 19:38:41 +00:00
|
|
|
//line views/hypha.qtpl:67
|
2021-02-20 15:48:51 +00:00
|
|
|
qw422016.E().S(prevAcc + part)
|
2021-08-08 19:38:41 +00:00
|
|
|
//line views/hypha.qtpl:67
|
2021-04-04 17:22:14 +00:00
|
|
|
qw422016.N().S(`" rel="`)
|
2021-08-08 19:38:41 +00:00
|
|
|
//line views/hypha.qtpl:67
|
2021-02-20 15:48:51 +00:00
|
|
|
if i == len(parts)-1 {
|
2021-08-08 19:38:41 +00:00
|
|
|
//line views/hypha.qtpl:67
|
2021-02-20 15:48:51 +00:00
|
|
|
qw422016.N().S(`bookmark`)
|
2021-08-08 19:38:41 +00:00
|
|
|
//line views/hypha.qtpl:67
|
2021-02-20 15:48:51 +00:00
|
|
|
} else {
|
2021-08-08 19:38:41 +00:00
|
|
|
//line views/hypha.qtpl:67
|
2021-02-20 15:48:51 +00:00
|
|
|
qw422016.N().S(`up`)
|
2021-08-08 19:38:41 +00:00
|
|
|
//line views/hypha.qtpl:67
|
2021-02-20 15:48:51 +00:00
|
|
|
}
|
2021-08-08 19:38:41 +00:00
|
|
|
//line views/hypha.qtpl:67
|
2021-05-09 09:36:39 +00:00
|
|
|
qw422016.N().S(`">`)
|
2021-08-08 19:38:41 +00:00
|
|
|
//line views/hypha.qtpl:68
|
2021-02-20 15:48:51 +00:00
|
|
|
qw422016.N().S(util.BeautifulName(part))
|
2021-08-08 19:38:41 +00:00
|
|
|
//line views/hypha.qtpl:68
|
2021-02-20 15:48:51 +00:00
|
|
|
qw422016.N().S(`</a>`)
|
2021-08-08 19:38:41 +00:00
|
|
|
//line views/hypha.qtpl:70
|
2021-02-20 15:48:51 +00:00
|
|
|
prevAcc += part + "/"
|
|
|
|
|
2021-08-08 19:38:41 +00:00
|
|
|
//line views/hypha.qtpl:71
|
2021-05-09 09:36:39 +00:00
|
|
|
}
|
2021-08-08 19:38:41 +00:00
|
|
|
//line views/hypha.qtpl:72
|
2021-02-20 15:48:51 +00:00
|
|
|
qw422016.N().S(`
|
|
|
|
</h1>
|
|
|
|
`)
|
2021-08-08 19:38:41 +00:00
|
|
|
//line views/hypha.qtpl:74
|
2021-02-20 15:48:51 +00:00
|
|
|
}
|
|
|
|
|
2021-08-08 19:38:41 +00:00
|
|
|
//line views/hypha.qtpl:74
|
2021-02-20 15:48:51 +00:00
|
|
|
func WriteNaviTitleHTML(qq422016 qtio422016.Writer, h *hyphae.Hypha) {
|
2021-08-08 19:38:41 +00:00
|
|
|
//line views/hypha.qtpl:74
|
2021-02-20 15:48:51 +00:00
|
|
|
qw422016 := qt422016.AcquireWriter(qq422016)
|
2021-08-08 19:38:41 +00:00
|
|
|
//line views/hypha.qtpl:74
|
2021-02-20 15:48:51 +00:00
|
|
|
StreamNaviTitleHTML(qw422016, h)
|
2021-08-08 19:38:41 +00:00
|
|
|
//line views/hypha.qtpl:74
|
2021-02-20 15:48:51 +00:00
|
|
|
qt422016.ReleaseWriter(qw422016)
|
2021-08-08 19:38:41 +00:00
|
|
|
//line views/hypha.qtpl:74
|
2021-02-20 15:48:51 +00:00
|
|
|
}
|
|
|
|
|
2021-08-08 19:38:41 +00:00
|
|
|
//line views/hypha.qtpl:74
|
2021-02-20 15:48:51 +00:00
|
|
|
func NaviTitleHTML(h *hyphae.Hypha) string {
|
2021-08-08 19:38:41 +00:00
|
|
|
//line views/hypha.qtpl:74
|
2021-02-20 15:48:51 +00:00
|
|
|
qb422016 := qt422016.AcquireByteBuffer()
|
2021-08-08 19:38:41 +00:00
|
|
|
//line views/hypha.qtpl:74
|
2021-02-20 15:48:51 +00:00
|
|
|
WriteNaviTitleHTML(qb422016, h)
|
2021-08-08 19:38:41 +00:00
|
|
|
//line views/hypha.qtpl:74
|
2021-02-20 15:48:51 +00:00
|
|
|
qs422016 := string(qb422016.B)
|
2021-08-08 19:38:41 +00:00
|
|
|
//line views/hypha.qtpl:74
|
2021-02-20 15:48:51 +00:00
|
|
|
qt422016.ReleaseByteBuffer(qb422016)
|
2021-08-08 19:38:41 +00:00
|
|
|
//line views/hypha.qtpl:74
|
2021-02-20 15:48:51 +00:00
|
|
|
return qs422016
|
2021-08-08 19:38:41 +00:00
|
|
|
//line views/hypha.qtpl:74
|
2021-02-20 15:48:51 +00:00
|
|
|
}
|
|
|
|
|
2021-08-08 19:38:41 +00:00
|
|
|
//line views/hypha.qtpl:76
|
2021-02-20 15:48:51 +00:00
|
|
|
func StreamAttachmentHTML(qw422016 *qt422016.Writer, h *hyphae.Hypha) {
|
2021-08-08 19:38:41 +00:00
|
|
|
//line views/hypha.qtpl:76
|
2021-02-20 15:48:51 +00:00
|
|
|
qw422016.N().S(`
|
|
|
|
`)
|
2021-08-08 19:38:41 +00:00
|
|
|
//line views/hypha.qtpl:77
|
2021-02-20 15:48:51 +00:00
|
|
|
switch filepath.Ext(h.BinaryPath) {
|
2021-08-08 19:38:41 +00:00
|
|
|
//line views/hypha.qtpl:79
|
2021-02-20 15:48:51 +00:00
|
|
|
case ".jpg", ".gif", ".png", ".webp", ".svg", ".ico":
|
2021-08-08 19:38:41 +00:00
|
|
|
//line views/hypha.qtpl:79
|
2021-02-20 15:48:51 +00:00
|
|
|
qw422016.N().S(`
|
|
|
|
<div class="binary-container binary-container_with-img">
|
|
|
|
<a href="/binary/`)
|
2021-08-08 19:38:41 +00:00
|
|
|
//line views/hypha.qtpl:81
|
2021-02-20 15:48:51 +00:00
|
|
|
qw422016.N().S(h.Name)
|
2021-08-08 19:38:41 +00:00
|
|
|
//line views/hypha.qtpl:81
|
2021-02-20 15:48:51 +00:00
|
|
|
qw422016.N().S(`"><img src="/binary/`)
|
2021-08-08 19:38:41 +00:00
|
|
|
//line views/hypha.qtpl:81
|
2021-02-20 15:48:51 +00:00
|
|
|
qw422016.N().S(h.Name)
|
2021-08-08 19:38:41 +00:00
|
|
|
//line views/hypha.qtpl:81
|
2021-02-20 15:48:51 +00:00
|
|
|
qw422016.N().S(`"/></a>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
`)
|
2021-08-08 19:38:41 +00:00
|
|
|
//line views/hypha.qtpl:84
|
2021-02-20 15:48:51 +00:00
|
|
|
case ".ogg", ".webm", ".mp4":
|
2021-08-08 19:38:41 +00:00
|
|
|
//line views/hypha.qtpl:84
|
2021-02-20 15:48:51 +00:00
|
|
|
qw422016.N().S(`
|
|
|
|
<div class="binary-container binary-container_with-video">
|
|
|
|
<video controls>
|
|
|
|
<source src="/binary/`)
|
2021-08-08 19:38:41 +00:00
|
|
|
//line views/hypha.qtpl:87
|
2021-02-20 15:48:51 +00:00
|
|
|
qw422016.N().S(h.Name)
|
2021-08-08 19:38:41 +00:00
|
|
|
//line views/hypha.qtpl:87
|
2021-02-20 15:48:51 +00:00
|
|
|
qw422016.N().S(`"/>
|
|
|
|
<p>Your browser does not support video. <a href="/binary/`)
|
2021-08-08 19:38:41 +00:00
|
|
|
//line views/hypha.qtpl:88
|
2021-02-20 15:48:51 +00:00
|
|
|
qw422016.N().S(h.Name)
|
2021-08-08 19:38:41 +00:00
|
|
|
//line views/hypha.qtpl:88
|
2021-02-20 15:48:51 +00:00
|
|
|
qw422016.N().S(`">Download video</a></p>
|
|
|
|
</video>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
`)
|
2021-08-08 19:38:41 +00:00
|
|
|
//line views/hypha.qtpl:92
|
2021-02-20 15:48:51 +00:00
|
|
|
case ".mp3":
|
2021-08-08 19:38:41 +00:00
|
|
|
//line views/hypha.qtpl:92
|
2021-02-20 15:48:51 +00:00
|
|
|
qw422016.N().S(`
|
|
|
|
<div class="binary-container binary-container_with-audio">
|
|
|
|
<audio controls>
|
|
|
|
<source src="/binary/`)
|
2021-08-08 19:38:41 +00:00
|
|
|
//line views/hypha.qtpl:95
|
2021-02-20 15:48:51 +00:00
|
|
|
qw422016.N().S(h.Name)
|
2021-08-08 19:38:41 +00:00
|
|
|
//line views/hypha.qtpl:95
|
2021-02-20 15:48:51 +00:00
|
|
|
qw422016.N().S(`"/>
|
|
|
|
<p>Your browser does not support audio. <a href="/binary/`)
|
2021-08-08 19:38:41 +00:00
|
|
|
//line views/hypha.qtpl:96
|
2021-02-20 15:48:51 +00:00
|
|
|
qw422016.N().S(h.Name)
|
2021-08-08 19:38:41 +00:00
|
|
|
//line views/hypha.qtpl:96
|
2021-02-20 15:48:51 +00:00
|
|
|
qw422016.N().S(`">Download audio</a></p>
|
|
|
|
</audio>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
`)
|
2021-08-08 19:38:41 +00:00
|
|
|
//line views/hypha.qtpl:100
|
2021-02-20 15:48:51 +00:00
|
|
|
default:
|
2021-08-08 19:38:41 +00:00
|
|
|
//line views/hypha.qtpl:100
|
2021-02-20 15:48:51 +00:00
|
|
|
qw422016.N().S(`
|
|
|
|
<div class="binary-container binary-container_with-nothing">
|
|
|
|
<p><a href="/binary/`)
|
2021-08-08 19:38:41 +00:00
|
|
|
//line views/hypha.qtpl:102
|
2021-02-20 15:48:51 +00:00
|
|
|
qw422016.N().S(h.Name)
|
2021-08-08 19:38:41 +00:00
|
|
|
//line views/hypha.qtpl:102
|
2021-02-20 15:48:51 +00:00
|
|
|
qw422016.N().S(`">Download media</a></p>
|
|
|
|
</div>
|
|
|
|
`)
|
2021-08-08 19:38:41 +00:00
|
|
|
//line views/hypha.qtpl:104
|
2021-02-20 15:48:51 +00:00
|
|
|
}
|
2021-08-08 19:38:41 +00:00
|
|
|
//line views/hypha.qtpl:104
|
2021-02-20 15:48:51 +00:00
|
|
|
qw422016.N().S(`
|
|
|
|
`)
|
2021-08-08 19:38:41 +00:00
|
|
|
//line views/hypha.qtpl:105
|
2021-02-20 15:48:51 +00:00
|
|
|
}
|
|
|
|
|
2021-08-08 19:38:41 +00:00
|
|
|
//line views/hypha.qtpl:105
|
2021-02-20 15:48:51 +00:00
|
|
|
func WriteAttachmentHTML(qq422016 qtio422016.Writer, h *hyphae.Hypha) {
|
2021-08-08 19:38:41 +00:00
|
|
|
//line views/hypha.qtpl:105
|
2021-02-20 15:48:51 +00:00
|
|
|
qw422016 := qt422016.AcquireWriter(qq422016)
|
2021-08-08 19:38:41 +00:00
|
|
|
//line views/hypha.qtpl:105
|
2021-02-20 15:48:51 +00:00
|
|
|
StreamAttachmentHTML(qw422016, h)
|
2021-08-08 19:38:41 +00:00
|
|
|
//line views/hypha.qtpl:105
|
2021-02-20 15:48:51 +00:00
|
|
|
qt422016.ReleaseWriter(qw422016)
|
2021-08-08 19:38:41 +00:00
|
|
|
//line views/hypha.qtpl:105
|
2021-02-20 15:48:51 +00:00
|
|
|
}
|
|
|
|
|
2021-08-08 19:38:41 +00:00
|
|
|
//line views/hypha.qtpl:105
|
2021-02-20 15:48:51 +00:00
|
|
|
func AttachmentHTML(h *hyphae.Hypha) string {
|
2021-08-08 19:38:41 +00:00
|
|
|
//line views/hypha.qtpl:105
|
2021-02-20 15:48:51 +00:00
|
|
|
qb422016 := qt422016.AcquireByteBuffer()
|
2021-08-08 19:38:41 +00:00
|
|
|
//line views/hypha.qtpl:105
|
2021-02-20 15:48:51 +00:00
|
|
|
WriteAttachmentHTML(qb422016, h)
|
2021-08-08 19:38:41 +00:00
|
|
|
//line views/hypha.qtpl:105
|
2021-02-20 15:48:51 +00:00
|
|
|
qs422016 := string(qb422016.B)
|
2021-08-08 19:38:41 +00:00
|
|
|
//line views/hypha.qtpl:105
|
2021-02-20 15:48:51 +00:00
|
|
|
qt422016.ReleaseByteBuffer(qb422016)
|
2021-08-08 19:38:41 +00:00
|
|
|
//line views/hypha.qtpl:105
|
2021-02-20 15:48:51 +00:00
|
|
|
return qs422016
|
2021-08-08 19:38:41 +00:00
|
|
|
//line views/hypha.qtpl:105
|
2021-02-20 15:48:51 +00:00
|
|
|
}
|