474c69d6d292bc22cd9b226aed112ead1e71d7b1 — Timur Ismagilov 1 year, 1 month ago dea9d64
Editor: Change the title for new hyphae

Now: Create <hypha name>

Before: Edit <hypha name>; and a warning below
2 files changed, 9 insertions(+), 7 deletions(-)

M hypview/hypview.go
M hypview/view_edit.html
M hypview/hypview.go => hypview/hypview.go +1 -0
@@ 17,6 17,7 @@ var (
	ruTranslation = `
{{define "editing hypha"}}Редактирование {{beautifulName .}}{{end}}
{{define "editing [[hypha]]"}}Редактирование <a href="/hypha/{{.}}">{{beautifulName .}}</a>{{end}}
{{define "creating [[hypha]]"}}Создание <a href="/hypha/{{.}}">{{beautifulName .}}</a>{{end}}
{{define "you're creating a new hypha"}}Вы создаёте новую гифу.{{end}}
{{define "describe your changes"}}Опишите ваши правки{{end}}
{{define "save"}}Сохранить{{end}}

M hypview/view_edit.html => hypview/view_edit.html +8 -7
@@ 55,15 55,16 @@
<main class="main-width edit {{if .Preview}}edit_with-preview{{else}}edit_no-preview{{end}}">
    <form method="post" class="edit-form" action="/upload-text/{{.HyphaName}}">
        <h1 class="edit__title">
            {{block "editing [[hypha]]" .HyphaName}}
                Edit <a href="/hypha/{{.}}">{{beautifulName .}}</a>
            {{if .IsNew}}
                {{block "creating [[hypha]]" .HyphaName}}
                    Create <a href="/hypha/{{.}}">{{beautifulName .}}</a>
                {{block "editing [[hypha]]" .HyphaName}}
                    Edit <a href="/hypha/{{.}}">{{beautifulName .}}</a>
        {{if .IsNew}}
            <p class="warning warning_new-hypha">
                {{block "you're creating a new hypha" .}}You are creating a new hypha.{{end}}
        <textarea name="text" class="edit-form__textarea" autofocus>{{.Content}}</textarea>
        <p class="edit-form__message-zone">