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

Do not show the edit button for anons

This commit is contained in:
Timur Ismagilov 2021-08-09 00:59:44 +05:00
parent e47b297410
commit 9d989db77d
2 changed files with 14 additions and 6 deletions

View File

@ -85,9 +85,9 @@ If `contents` == "", a helpful message is shown instead.
<div class="jump-btn">
<a class="jump-btn__link" href="#hypha-bottom">↓</a>
</div>
<div class="btn edit-btn">
{% if u.CanProceed("edit") %}<div class="btn edit-btn">
<a class="edit-btn__link" href="/edit/{%s h.Name %}">Edit text</a>
</div>
</div>{% endif %}
{%s= NaviTitleHTML(h) %}
{% if h.Exists %}
{%s= contents %}

View File

@ -240,13 +240,21 @@ func StreamHyphaHTML(qw422016 *qt422016.Writer, rq *http.Request, h *hyphae.Hyph
<div class="jump-btn">
<a class="jump-btn__link" href="#hypha-bottom"></a>
</div>
<div class="btn edit-btn">
`)
//line views/readers.qtpl:88
if u.CanProceed("edit") {
//line views/readers.qtpl:88
qw422016.N().S(`<div class="btn edit-btn">
<a class="edit-btn__link" href="/edit/`)
//line views/readers.qtpl:89
qw422016.E().S(h.Name)
qw422016.E().S(h.Name)
//line views/readers.qtpl:89
qw422016.N().S(`">Edit text</a>
</div>
qw422016.N().S(`">Edit text</a>
</div>`)
//line views/readers.qtpl:90
}
//line views/readers.qtpl:90
qw422016.N().S(`
`)
//line views/readers.qtpl:91
qw422016.N().S(NaviTitleHTML(h))