mirror of
https://github.com/osmarks/mycorrhiza.git
synced 2025-01-06 10:00:26 +00:00
Always show "Manage attachment", fix Firefox bug
This commit is contained in:
parent
e660d2f1dd
commit
19019a0d13
@ -786,20 +786,16 @@ kbd {
|
||||
display: inline;
|
||||
}
|
||||
.hypha-info__link {
|
||||
display: inline-block;
|
||||
color: #999;
|
||||
}
|
||||
.hypha-info__link:hover {
|
||||
color: inherit;
|
||||
}
|
||||
.hypha-info__link:after {
|
||||
.hypha-info__entry + .hypha-info__entry {
|
||||
text-transform: lowercase;
|
||||
}
|
||||
.hypha-info__entry:not(:last-child) a::after {
|
||||
content: ", ";
|
||||
text-decoration: none;
|
||||
display: inline-block;
|
||||
text-decoration: none;
|
||||
}
|
||||
.hypha-info__entry:last-of-type a:after {
|
||||
content: none;
|
||||
}
|
||||
.hypha-info__entry:first-of-type a:first-letter {
|
||||
text-transform: uppercase;
|
||||
}
|
@ -17,11 +17,11 @@
|
||||
%}
|
||||
<nav class="hypha-info">
|
||||
<ul class="hypha-info__list">
|
||||
{% if h.HasAttachment() %}{%= hyphaInfoEntry(h, u, "attachment", "manage the attachment") %}{% endif %}
|
||||
{%= hyphaInfoEntry(h, u, "history", "view history") %}
|
||||
{%= hyphaInfoEntry(h, u, "rename-ask", "rename") %}
|
||||
{%= hyphaInfoEntry(h, u, "delete-ask", "delete") %}
|
||||
{%= hyphaInfoEntry(h, u, "text", "view markup") %}
|
||||
{%= hyphaInfoEntry(h, u, "history", "View history") %}
|
||||
{%= hyphaInfoEntry(h, u, "rename-ask", "Rename") %}
|
||||
{%= hyphaInfoEntry(h, u, "delete-ask", "Delete") %}
|
||||
{%= hyphaInfoEntry(h, u, "text", "View markup") %}
|
||||
{%= hyphaInfoEntry(h, u, "attachment", "Manage attachment") %}
|
||||
</ul>
|
||||
</nav>
|
||||
{% endfunc %}
|
||||
|
@ -106,31 +106,27 @@ func streamhyphaInfo(qw422016 *qt422016.Writer, rq *http.Request, h *hyphae.Hyph
|
||||
<ul class="hypha-info__list">
|
||||
`)
|
||||
//line views/nav.qtpl:20
|
||||
if h.HasAttachment() {
|
||||
//line views/nav.qtpl:20
|
||||
streamhyphaInfoEntry(qw422016, h, u, "attachment", "manage the attachment")
|
||||
//line views/nav.qtpl:20
|
||||
}
|
||||
streamhyphaInfoEntry(qw422016, h, u, "history", "View history")
|
||||
//line views/nav.qtpl:20
|
||||
qw422016.N().S(`
|
||||
`)
|
||||
//line views/nav.qtpl:21
|
||||
streamhyphaInfoEntry(qw422016, h, u, "history", "view history")
|
||||
streamhyphaInfoEntry(qw422016, h, u, "rename-ask", "Rename")
|
||||
//line views/nav.qtpl:21
|
||||
qw422016.N().S(`
|
||||
`)
|
||||
//line views/nav.qtpl:22
|
||||
streamhyphaInfoEntry(qw422016, h, u, "rename-ask", "rename")
|
||||
streamhyphaInfoEntry(qw422016, h, u, "delete-ask", "Delete")
|
||||
//line views/nav.qtpl:22
|
||||
qw422016.N().S(`
|
||||
`)
|
||||
//line views/nav.qtpl:23
|
||||
streamhyphaInfoEntry(qw422016, h, u, "delete-ask", "delete")
|
||||
streamhyphaInfoEntry(qw422016, h, u, "text", "View markup")
|
||||
//line views/nav.qtpl:23
|
||||
qw422016.N().S(`
|
||||
`)
|
||||
//line views/nav.qtpl:24
|
||||
streamhyphaInfoEntry(qw422016, h, u, "text", "view markup")
|
||||
streamhyphaInfoEntry(qw422016, h, u, "attachment", "Manage attachment")
|
||||
//line views/nav.qtpl:24
|
||||
qw422016.N().S(`
|
||||
</ul>
|
||||
|
@ -39,8 +39,10 @@ func handlerHistory(w http.ResponseWriter, rq *http.Request) {
|
||||
}
|
||||
log.Println("Found", len(revs), "revisions for", hyphaName)
|
||||
|
||||
util.HTTP200Page(w,
|
||||
views.BaseHTML(hyphaName, views.HistoryHTML(rq, hyphaName, list), user.FromRequest(rq)))
|
||||
util.HTTP200Page(w, views.BaseHTML(
|
||||
fmt.Sprintf("History of \"%s\"", util.BeautifulName(hyphaName)),
|
||||
views.HistoryHTML(rq, hyphaName, list),
|
||||
user.FromRequest(rq)))
|
||||
}
|
||||
|
||||
// handlerRecentChanges displays the /recent-changes/ page.
|
||||
|
@ -2,11 +2,12 @@ package web
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"github.com/bouncepaw/mycomarkup"
|
||||
"github.com/bouncepaw/mycomarkup/mycocontext"
|
||||
"log"
|
||||
"net/http"
|
||||
|
||||
"github.com/bouncepaw/mycomarkup"
|
||||
"github.com/bouncepaw/mycomarkup/mycocontext"
|
||||
|
||||
"github.com/gorilla/mux"
|
||||
|
||||
"github.com/bouncepaw/mycorrhiza/history"
|
||||
@ -162,7 +163,7 @@ func handlerEdit(w http.ResponseWriter, rq *http.Request) {
|
||||
util.HTTP200Page(
|
||||
w,
|
||||
views.BaseHTML(
|
||||
"Edit "+hyphaName,
|
||||
fmt.Sprintf("Edit \"%s\"", util.BeautifulName(hyphaName)),
|
||||
views.EditHTML(rq, hyphaName, textAreaFill, warning),
|
||||
u))
|
||||
}
|
||||
@ -197,7 +198,7 @@ func handlerUploadText(w http.ResponseWriter, rq *http.Request) {
|
||||
util.HTTP200Page(
|
||||
w,
|
||||
views.BaseHTML(
|
||||
"Preview "+hyphaName,
|
||||
fmt.Sprintf("Preview of \"%s\"", util.BeautifulName(hyphaName)),
|
||||
views.PreviewHTML(
|
||||
rq,
|
||||
hyphaName,
|
||||
|
@ -41,7 +41,7 @@ func handlerAttachment(w http.ResponseWriter, rq *http.Request) {
|
||||
)
|
||||
util.HTTP200Page(w,
|
||||
views.BaseHTML(
|
||||
fmt.Sprintf("Attachment of %s", util.BeautifulName(hyphaName)),
|
||||
fmt.Sprintf("Attachment of \"%s\"", util.BeautifulName(hyphaName)),
|
||||
views.AttachmentMenuHTML(rq, h, u),
|
||||
u))
|
||||
}
|
||||
@ -58,7 +58,7 @@ func handlerPrimitiveDiff(w http.ResponseWriter, rq *http.Request) {
|
||||
)
|
||||
util.HTTP200Page(w,
|
||||
views.BaseHTML(
|
||||
fmt.Sprintf("Diff of %s at %s", hyphaName, revHash),
|
||||
fmt.Sprintf("Diff of \"%s\" at %s", util.BeautifulName(hyphaName), revHash),
|
||||
views.PrimitiveDiffHTML(rq, h, u, revHash),
|
||||
u))
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user