1
0
mirror of https://github.com/osmarks/mycorrhiza.git synced 2025-01-31 19:39:09 +00:00

Do not show siblings and subhyphae on revision pages

It didn't really make sense before
This commit is contained in:
Timur Ismagilov 2022-02-19 11:30:23 +03:00 committed by Timur Ismagilov
parent 7b51467495
commit 0eb3ba9b45
2 changed files with 48 additions and 69 deletions

View File

@ -137,9 +137,6 @@ If you rename .prevnext, change the docs too.
{% endfunc %} {% endfunc %}
{% func RevisionHTML(rq *http.Request, lc *l18n.Localizer, h hyphae.Hypha, contents, revHash string) %} {% func RevisionHTML(rq *http.Request, lc *l18n.Localizer, h hyphae.Hypha, contents, revHash string) %}
{% code
siblings, subhyphae, _, _ := tree.Tree(h.CanonicalName())
%}
<div class="layout"> <div class="layout">
<main class="main-width"> <main class="main-width">
<section> <section>
@ -147,9 +144,7 @@ If you rename .prevnext, change the docs too.
{%s= NaviTitleHTML(h) %} {%s= NaviTitleHTML(h) %}
{%s= contents %} {%s= contents %}
</section> </section>
{%= SubhyphaeHTML(subhyphae, lc) %}
</main> </main>
{%= siblingHyphaeHTML(siblings, lc) %}
</div> </div>
{%= viewScripts() %} {%= viewScripts() %}
{% endfunc %} {% endfunc %}

View File

@ -512,135 +512,119 @@ func HyphaHTML(rq *http.Request, lc *l18n.Localizer, h hyphae.Hypha, contents st
func StreamRevisionHTML(qw422016 *qt422016.Writer, rq *http.Request, lc *l18n.Localizer, h hyphae.Hypha, contents, revHash string) { func StreamRevisionHTML(qw422016 *qt422016.Writer, rq *http.Request, lc *l18n.Localizer, h hyphae.Hypha, contents, revHash string) {
//line views/readers.qtpl:139 //line views/readers.qtpl:139
qw422016.N().S(` qw422016.N().S(`
`)
//line views/readers.qtpl:141
siblings, subhyphae, _, _ := tree.Tree(h.CanonicalName())
//line views/readers.qtpl:142
qw422016.N().S(`
<div class="layout"> <div class="layout">
<main class="main-width"> <main class="main-width">
<section> <section>
<p>`) <p>`)
//line views/readers.qtpl:146 //line views/readers.qtpl:143
qw422016.E().S(lc.Get("ui.revision_warning")) qw422016.E().S(lc.Get("ui.revision_warning"))
//line views/readers.qtpl:146 //line views/readers.qtpl:143
qw422016.N().S(` <a href="/rev-text/`) qw422016.N().S(` <a href="/rev-text/`)
//line views/readers.qtpl:146 //line views/readers.qtpl:143
qw422016.E().S(revHash) qw422016.E().S(revHash)
//line views/readers.qtpl:146 //line views/readers.qtpl:143
qw422016.N().S(`/`) qw422016.N().S(`/`)
//line views/readers.qtpl:146 //line views/readers.qtpl:143
qw422016.E().S(h.CanonicalName()) qw422016.E().S(h.CanonicalName())
//line views/readers.qtpl:146 //line views/readers.qtpl:143
qw422016.N().S(`">`) qw422016.N().S(`">`)
//line views/readers.qtpl:146 //line views/readers.qtpl:143
qw422016.E().S(lc.Get("ui.revision_link")) qw422016.E().S(lc.Get("ui.revision_link"))
//line views/readers.qtpl:146 //line views/readers.qtpl:143
qw422016.N().S(`</a></p> qw422016.N().S(`</a></p>
`) `)
//line views/readers.qtpl:147 //line views/readers.qtpl:144
qw422016.N().S(NaviTitleHTML(h)) qw422016.N().S(NaviTitleHTML(h))
//line views/readers.qtpl:147 //line views/readers.qtpl:144
qw422016.N().S(` qw422016.N().S(`
`) `)
//line views/readers.qtpl:148 //line views/readers.qtpl:145
qw422016.N().S(contents) qw422016.N().S(contents)
//line views/readers.qtpl:148 //line views/readers.qtpl:145
qw422016.N().S(` qw422016.N().S(`
</section> </section>
`)
//line views/readers.qtpl:150
StreamSubhyphaeHTML(qw422016, subhyphae, lc)
//line views/readers.qtpl:150
qw422016.N().S(`
</main> </main>
`)
//line views/readers.qtpl:152
streamsiblingHyphaeHTML(qw422016, siblings, lc)
//line views/readers.qtpl:152
qw422016.N().S(`
</div> </div>
`) `)
//line views/readers.qtpl:154 //line views/readers.qtpl:149
streamviewScripts(qw422016) streamviewScripts(qw422016)
//line views/readers.qtpl:154 //line views/readers.qtpl:149
qw422016.N().S(` qw422016.N().S(`
`) `)
//line views/readers.qtpl:155 //line views/readers.qtpl:150
} }
//line views/readers.qtpl:155 //line views/readers.qtpl:150
func WriteRevisionHTML(qq422016 qtio422016.Writer, rq *http.Request, lc *l18n.Localizer, h hyphae.Hypha, contents, revHash string) { func WriteRevisionHTML(qq422016 qtio422016.Writer, rq *http.Request, lc *l18n.Localizer, h hyphae.Hypha, contents, revHash string) {
//line views/readers.qtpl:155 //line views/readers.qtpl:150
qw422016 := qt422016.AcquireWriter(qq422016) qw422016 := qt422016.AcquireWriter(qq422016)
//line views/readers.qtpl:155 //line views/readers.qtpl:150
StreamRevisionHTML(qw422016, rq, lc, h, contents, revHash) StreamRevisionHTML(qw422016, rq, lc, h, contents, revHash)
//line views/readers.qtpl:155 //line views/readers.qtpl:150
qt422016.ReleaseWriter(qw422016) qt422016.ReleaseWriter(qw422016)
//line views/readers.qtpl:155 //line views/readers.qtpl:150
} }
//line views/readers.qtpl:155 //line views/readers.qtpl:150
func RevisionHTML(rq *http.Request, lc *l18n.Localizer, h hyphae.Hypha, contents, revHash string) string { func RevisionHTML(rq *http.Request, lc *l18n.Localizer, h hyphae.Hypha, contents, revHash string) string {
//line views/readers.qtpl:155 //line views/readers.qtpl:150
qb422016 := qt422016.AcquireByteBuffer() qb422016 := qt422016.AcquireByteBuffer()
//line views/readers.qtpl:155 //line views/readers.qtpl:150
WriteRevisionHTML(qb422016, rq, lc, h, contents, revHash) WriteRevisionHTML(qb422016, rq, lc, h, contents, revHash)
//line views/readers.qtpl:155 //line views/readers.qtpl:150
qs422016 := string(qb422016.B) qs422016 := string(qb422016.B)
//line views/readers.qtpl:155 //line views/readers.qtpl:150
qt422016.ReleaseByteBuffer(qb422016) qt422016.ReleaseByteBuffer(qb422016)
//line views/readers.qtpl:155 //line views/readers.qtpl:150
return qs422016 return qs422016
//line views/readers.qtpl:155 //line views/readers.qtpl:150
} }
//line views/readers.qtpl:157 //line views/readers.qtpl:152
func streamviewScripts(qw422016 *qt422016.Writer) { func streamviewScripts(qw422016 *qt422016.Writer) {
//line views/readers.qtpl:157 //line views/readers.qtpl:152
qw422016.N().S(` qw422016.N().S(`
`) `)
//line views/readers.qtpl:158 //line views/readers.qtpl:153
for _, scriptPath := range cfg.ViewScripts { for _, scriptPath := range cfg.ViewScripts {
//line views/readers.qtpl:158 //line views/readers.qtpl:153
qw422016.N().S(` qw422016.N().S(`
<script src="`) <script src="`)
//line views/readers.qtpl:159 //line views/readers.qtpl:154
qw422016.E().S(scriptPath) qw422016.E().S(scriptPath)
//line views/readers.qtpl:159 //line views/readers.qtpl:154
qw422016.N().S(`"></script> qw422016.N().S(`"></script>
`) `)
//line views/readers.qtpl:160 //line views/readers.qtpl:155
} }
//line views/readers.qtpl:160 //line views/readers.qtpl:155
qw422016.N().S(` qw422016.N().S(`
`) `)
//line views/readers.qtpl:161 //line views/readers.qtpl:156
} }
//line views/readers.qtpl:161 //line views/readers.qtpl:156
func writeviewScripts(qq422016 qtio422016.Writer) { func writeviewScripts(qq422016 qtio422016.Writer) {
//line views/readers.qtpl:161 //line views/readers.qtpl:156
qw422016 := qt422016.AcquireWriter(qq422016) qw422016 := qt422016.AcquireWriter(qq422016)
//line views/readers.qtpl:161 //line views/readers.qtpl:156
streamviewScripts(qw422016) streamviewScripts(qw422016)
//line views/readers.qtpl:161 //line views/readers.qtpl:156
qt422016.ReleaseWriter(qw422016) qt422016.ReleaseWriter(qw422016)
//line views/readers.qtpl:161 //line views/readers.qtpl:156
} }
//line views/readers.qtpl:161 //line views/readers.qtpl:156
func viewScripts() string { func viewScripts() string {
//line views/readers.qtpl:161 //line views/readers.qtpl:156
qb422016 := qt422016.AcquireByteBuffer() qb422016 := qt422016.AcquireByteBuffer()
//line views/readers.qtpl:161 //line views/readers.qtpl:156
writeviewScripts(qb422016) writeviewScripts(qb422016)
//line views/readers.qtpl:161 //line views/readers.qtpl:156
qs422016 := string(qb422016.B) qs422016 := string(qb422016.B)
//line views/readers.qtpl:161 //line views/readers.qtpl:156
qt422016.ReleaseByteBuffer(qb422016) qt422016.ReleaseByteBuffer(qb422016)
//line views/readers.qtpl:161 //line views/readers.qtpl:156
return qs422016 return qs422016
//line views/readers.qtpl:161 //line views/readers.qtpl:156
} }