1
0
mirror of https://github.com/osmarks/mycorrhiza.git synced 2025-06-05 04:24:05 +00:00

Editor: Change the title for new hyphae

Now: Create <hypha name>

Before: Edit <hypha name>; and a warning below
This commit is contained in:
Timur Ismagilov 2022-10-23 15:29:36 +03:00
parent dea9d644c5
commit 474c69d6d2
2 changed files with 9 additions and 7 deletions

View File

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

View File

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