1
0
mirror of https://github.com/osmarks/mycorrhiza.git synced 2024-10-30 03:36:16 +00:00

Show a different label for the /media/ link for textual hyphae

This commit is contained in:
Timur Ismagilov 2022-09-03 16:55:14 +03:00
parent 1cd63103b6
commit b18abeba92
4 changed files with 87 additions and 58 deletions

View File

@ -30,7 +30,12 @@
{%= hyphaInfoEntry(h, u, "rename", true, lc.Get("ui.rename_link")) %}
{%= hyphaInfoEntry(h, u, "delete", true, lc.Get("ui.delete_link")) %}
{%= hyphaInfoEntry(h, u, "text", true, lc.Get("ui.text_link")) %}
{% switch h := h.(type) %}
{% case *hyphae.TextualHypha %}
{%= hyphaInfoEntry(h, u, "media", true, lc.Get("ui.media_link_for_textual")) %}
{% default %}
{%= hyphaInfoEntry(h, u, "media", true, lc.Get("ui.media_link")) %}
{% endswitch %}
{%= hyphaInfoEntry(h, u, "backlinks", false, lc.GetPlural("ui.backlinks_link", backs)) %}
</ul>
</nav>

View File

@ -156,134 +156,156 @@ func streamhyphaInfo(qw422016 *qt422016.Writer, meta viewutil.Meta, h hyphae.Hyp
streamhyphaInfoEntry(qw422016, h, u, "text", true, lc.Get("ui.text_link"))
//line hypview/nav.qtpl:32
qw422016.N().S(`
`)
//line hypview/nav.qtpl:33
switch h := h.(type) {
//line hypview/nav.qtpl:34
case *hyphae.TextualHypha:
//line hypview/nav.qtpl:34
qw422016.N().S(`
`)
//line hypview/nav.qtpl:33
streamhyphaInfoEntry(qw422016, h, u, "media", true, lc.Get("ui.media_link"))
//line hypview/nav.qtpl:33
//line hypview/nav.qtpl:35
streamhyphaInfoEntry(qw422016, h, u, "media", true, lc.Get("ui.media_link_for_textual"))
//line hypview/nav.qtpl:35
qw422016.N().S(`
`)
//line hypview/nav.qtpl:36
default:
//line hypview/nav.qtpl:36
qw422016.N().S(`
`)
//line hypview/nav.qtpl:37
streamhyphaInfoEntry(qw422016, h, u, "media", true, lc.Get("ui.media_link"))
//line hypview/nav.qtpl:37
qw422016.N().S(`
`)
//line hypview/nav.qtpl:38
}
//line hypview/nav.qtpl:38
qw422016.N().S(`
`)
//line hypview/nav.qtpl:34
//line hypview/nav.qtpl:39
streamhyphaInfoEntry(qw422016, h, u, "backlinks", false, lc.GetPlural("ui.backlinks_link", backs))
//line hypview/nav.qtpl:34
//line hypview/nav.qtpl:39
qw422016.N().S(`
</ul>
</nav>
`)
//line hypview/nav.qtpl:37
//line hypview/nav.qtpl:42
}
//line hypview/nav.qtpl:37
//line hypview/nav.qtpl:42
func writehyphaInfo(qq422016 qtio422016.Writer, meta viewutil.Meta, h hyphae.Hypha) {
//line hypview/nav.qtpl:37
//line hypview/nav.qtpl:42
qw422016 := qt422016.AcquireWriter(qq422016)
//line hypview/nav.qtpl:37
//line hypview/nav.qtpl:42
streamhyphaInfo(qw422016, meta, h)
//line hypview/nav.qtpl:37
//line hypview/nav.qtpl:42
qt422016.ReleaseWriter(qw422016)
//line hypview/nav.qtpl:37
//line hypview/nav.qtpl:42
}
//line hypview/nav.qtpl:37
//line hypview/nav.qtpl:42
func hyphaInfo(meta viewutil.Meta, h hyphae.Hypha) string {
//line hypview/nav.qtpl:37
//line hypview/nav.qtpl:42
qb422016 := qt422016.AcquireByteBuffer()
//line hypview/nav.qtpl:37
//line hypview/nav.qtpl:42
writehyphaInfo(qb422016, meta, h)
//line hypview/nav.qtpl:37
//line hypview/nav.qtpl:42
qs422016 := string(qb422016.B)
//line hypview/nav.qtpl:37
//line hypview/nav.qtpl:42
qt422016.ReleaseByteBuffer(qb422016)
//line hypview/nav.qtpl:37
//line hypview/nav.qtpl:42
return qs422016
//line hypview/nav.qtpl:37
//line hypview/nav.qtpl:42
}
//line hypview/nav.qtpl:39
//line hypview/nav.qtpl:44
func streamcommonScripts(qw422016 *qt422016.Writer) {
//line hypview/nav.qtpl:39
//line hypview/nav.qtpl:44
qw422016.N().S(`
`)
//line hypview/nav.qtpl:40
//line hypview/nav.qtpl:45
for _, scriptPath := range cfg.CommonScripts {
//line hypview/nav.qtpl:40
//line hypview/nav.qtpl:45
qw422016.N().S(`
<script src="`)
//line hypview/nav.qtpl:41
//line hypview/nav.qtpl:46
qw422016.E().S(scriptPath)
//line hypview/nav.qtpl:41
//line hypview/nav.qtpl:46
qw422016.N().S(`"></script>
`)
//line hypview/nav.qtpl:42
//line hypview/nav.qtpl:47
}
//line hypview/nav.qtpl:42
//line hypview/nav.qtpl:47
qw422016.N().S(`
`)
//line hypview/nav.qtpl:43
//line hypview/nav.qtpl:48
}
//line hypview/nav.qtpl:43
//line hypview/nav.qtpl:48
func writecommonScripts(qq422016 qtio422016.Writer) {
//line hypview/nav.qtpl:43
//line hypview/nav.qtpl:48
qw422016 := qt422016.AcquireWriter(qq422016)
//line hypview/nav.qtpl:43
//line hypview/nav.qtpl:48
streamcommonScripts(qw422016)
//line hypview/nav.qtpl:43
//line hypview/nav.qtpl:48
qt422016.ReleaseWriter(qw422016)
//line hypview/nav.qtpl:43
//line hypview/nav.qtpl:48
}
//line hypview/nav.qtpl:43
//line hypview/nav.qtpl:48
func commonScripts() string {
//line hypview/nav.qtpl:43
//line hypview/nav.qtpl:48
qb422016 := qt422016.AcquireByteBuffer()
//line hypview/nav.qtpl:43
//line hypview/nav.qtpl:48
writecommonScripts(qb422016)
//line hypview/nav.qtpl:43
//line hypview/nav.qtpl:48
qs422016 := string(qb422016.B)
//line hypview/nav.qtpl:43
//line hypview/nav.qtpl:48
qt422016.ReleaseByteBuffer(qb422016)
//line hypview/nav.qtpl:43
//line hypview/nav.qtpl:48
return qs422016
//line hypview/nav.qtpl:43
//line hypview/nav.qtpl:48
}
//line hypview/nav.qtpl:45
//line hypview/nav.qtpl:50
func streambeautifulLink(qw422016 *qt422016.Writer, hyphaName string) {
//line hypview/nav.qtpl:45
//line hypview/nav.qtpl:50
qw422016.N().S(`<a href="/hypha/`)
//line hypview/nav.qtpl:45
//line hypview/nav.qtpl:50
qw422016.N().S(hyphaName)
//line hypview/nav.qtpl:45
//line hypview/nav.qtpl:50
qw422016.N().S(`">`)
//line hypview/nav.qtpl:45
//line hypview/nav.qtpl:50
qw422016.E().S(util.BeautifulName(hyphaName))
//line hypview/nav.qtpl:45
//line hypview/nav.qtpl:50
qw422016.N().S(`</a>`)
//line hypview/nav.qtpl:45
//line hypview/nav.qtpl:50
}
//line hypview/nav.qtpl:45
//line hypview/nav.qtpl:50
func writebeautifulLink(qq422016 qtio422016.Writer, hyphaName string) {
//line hypview/nav.qtpl:45
//line hypview/nav.qtpl:50
qw422016 := qt422016.AcquireWriter(qq422016)
//line hypview/nav.qtpl:45
//line hypview/nav.qtpl:50
streambeautifulLink(qw422016, hyphaName)
//line hypview/nav.qtpl:45
//line hypview/nav.qtpl:50
qt422016.ReleaseWriter(qw422016)
//line hypview/nav.qtpl:45
//line hypview/nav.qtpl:50
}
//line hypview/nav.qtpl:45
//line hypview/nav.qtpl:50
func beautifulLink(hyphaName string) string {
//line hypview/nav.qtpl:45
//line hypview/nav.qtpl:50
qb422016 := qt422016.AcquireByteBuffer()
//line hypview/nav.qtpl:45
//line hypview/nav.qtpl:50
writebeautifulLink(qb422016, hyphaName)
//line hypview/nav.qtpl:45
//line hypview/nav.qtpl:50
qs422016 := string(qb422016.B)
//line hypview/nav.qtpl:45
//line hypview/nav.qtpl:50
qt422016.ReleaseByteBuffer(qb422016)
//line hypview/nav.qtpl:45
//line hypview/nav.qtpl:50
return qs422016
//line hypview/nav.qtpl:45
//line hypview/nav.qtpl:50
}

View File

@ -11,6 +11,7 @@
"delete_link": "Delete",
"text_link": "View markup",
"media_link": "Manage media",
"media_link_for_textual": "Turn to media hypha",
"backlinks_link": "{{.n}} backlink%s",
"backlinks_link+one": "",
"backlinks_link+other": "s",

View File

@ -15,6 +15,7 @@
"delete_link": "Удалить",
"text_link": "Посмотреть разметку",
"media_link": "Медиа",
"media_link_for_textual": "Превратить в медиа-гифу",
"backlinks_link": "{{.n}} %s сюда",
"backlinks_link+one": "ссылка",
"backlinks_link+few": "ссылки",