mirror of
				https://github.com/osmarks/mycorrhiza.git
				synced 2025-10-30 23:23:04 +00:00 
			
		
		
		
	Move delete and rename to the modals module
This commit is contained in:
		| @@ -71,14 +71,14 @@ var handlerDeleteAsk = factoryHandlerAsker( | |||||||
| 	"delete-ask", | 	"delete-ask", | ||||||
| 	shroom.CanDelete, | 	shroom.CanDelete, | ||||||
| 	"Delete %s?", | 	"Delete %s?", | ||||||
| 	templates.DeleteAskHTML, | 	views.DeleteAskHTML, | ||||||
| ) | ) | ||||||
|  |  | ||||||
| var handlerRenameAsk = factoryHandlerAsker( | var handlerRenameAsk = factoryHandlerAsker( | ||||||
| 	"rename-ask", | 	"rename-ask", | ||||||
| 	shroom.CanRename, | 	shroom.CanRename, | ||||||
| 	"Rename %s?", | 	"Rename %s?", | ||||||
| 	templates.RenameAskHTML, | 	views.RenameAskHTML, | ||||||
| ) | ) | ||||||
|  |  | ||||||
| func factoryHandlerConfirmer( | func factoryHandlerConfirmer( | ||||||
|   | |||||||
| @@ -1,29 +0,0 @@ | |||||||
| {% import "net/http" %} |  | ||||||
|  |  | ||||||
| This dialog is to be shown to a user when they try to delete a hypha. |  | ||||||
| {% func DeleteAskHTML(rq *http.Request, hyphaName string, isOld bool) %} |  | ||||||
| {%= navHTML(rq, hyphaName, "delete-ask") %} |  | ||||||
| <div class="layout"> |  | ||||||
| <main class="main-width"> |  | ||||||
| {% if isOld %} |  | ||||||
| 	<section> |  | ||||||
| 		<h1>Delete {%s hyphaName %}?</h1> |  | ||||||
| 		<p>Do you really want to delete hypha <em>{%s hyphaName %}</em>?</p> |  | ||||||
| 		<p>In this version of MycorrhizaWiki you cannot undelete a deleted hypha but the history can still be accessed.</p> |  | ||||||
| 		<p><a href="/delete-confirm/{%s hyphaName %}"><strong>Confirm</strong></a></p> |  | ||||||
| 		<p><a href="/page/{%s hyphaName %}">Cancel</a></p> |  | ||||||
| 	</section> |  | ||||||
| {% else %} |  | ||||||
| 	{%= cannotDeleteDueToNonExistence(hyphaName) %} |  | ||||||
| {% endif %} |  | ||||||
| </main> |  | ||||||
| </div> |  | ||||||
| {% endfunc %} |  | ||||||
|  |  | ||||||
| {% func cannotDeleteDueToNonExistence(hyphaName string) %} |  | ||||||
| 	<section> |  | ||||||
| 		<h1>Cannot delete {%s hyphaName %}</h1> |  | ||||||
| 		<p>This hypha does not exist.</p> |  | ||||||
| 		<p><a href="/page/{%s hyphaName %}">Go back</a></p> |  | ||||||
| 	</section> |  | ||||||
| {% endfunc %} |  | ||||||
| @@ -1,156 +0,0 @@ | |||||||
| // Code generated by qtc from "delete.qtpl". DO NOT EDIT. |  | ||||||
| // See https://github.com/valyala/quicktemplate for details. |  | ||||||
|  |  | ||||||
| //line templates/delete.qtpl:1 |  | ||||||
| package templates |  | ||||||
|  |  | ||||||
| //line templates/delete.qtpl:1 |  | ||||||
| import "net/http" |  | ||||||
|  |  | ||||||
| // This dialog is to be shown to a user when they try to delete a hypha. |  | ||||||
|  |  | ||||||
| //line templates/delete.qtpl:4 |  | ||||||
| import ( |  | ||||||
| 	qtio422016 "io" |  | ||||||
|  |  | ||||||
| 	qt422016 "github.com/valyala/quicktemplate" |  | ||||||
| ) |  | ||||||
|  |  | ||||||
| //line templates/delete.qtpl:4 |  | ||||||
| var ( |  | ||||||
| 	_ = qtio422016.Copy |  | ||||||
| 	_ = qt422016.AcquireByteBuffer |  | ||||||
| ) |  | ||||||
|  |  | ||||||
| //line templates/delete.qtpl:4 |  | ||||||
| func StreamDeleteAskHTML(qw422016 *qt422016.Writer, rq *http.Request, hyphaName string, isOld bool) { |  | ||||||
| //line templates/delete.qtpl:4 |  | ||||||
| 	qw422016.N().S(` |  | ||||||
| `) |  | ||||||
| //line templates/delete.qtpl:5 |  | ||||||
| 	streamnavHTML(qw422016, rq, hyphaName, "delete-ask") |  | ||||||
| //line templates/delete.qtpl:5 |  | ||||||
| 	qw422016.N().S(` |  | ||||||
| <div class="layout"> |  | ||||||
| <main class="main-width"> |  | ||||||
| `) |  | ||||||
| //line templates/delete.qtpl:8 |  | ||||||
| 	if isOld { |  | ||||||
| //line templates/delete.qtpl:8 |  | ||||||
| 		qw422016.N().S(` |  | ||||||
| 	<section> |  | ||||||
| 		<h1>Delete `) |  | ||||||
| //line templates/delete.qtpl:10 |  | ||||||
| 		qw422016.E().S(hyphaName) |  | ||||||
| //line templates/delete.qtpl:10 |  | ||||||
| 		qw422016.N().S(`?</h1> |  | ||||||
| 		<p>Do you really want to delete hypha <em>`) |  | ||||||
| //line templates/delete.qtpl:11 |  | ||||||
| 		qw422016.E().S(hyphaName) |  | ||||||
| //line templates/delete.qtpl:11 |  | ||||||
| 		qw422016.N().S(`</em>?</p> |  | ||||||
| 		<p>In this version of MycorrhizaWiki you cannot undelete a deleted hypha but the history can still be accessed.</p> |  | ||||||
| 		<p><a href="/delete-confirm/`) |  | ||||||
| //line templates/delete.qtpl:13 |  | ||||||
| 		qw422016.E().S(hyphaName) |  | ||||||
| //line templates/delete.qtpl:13 |  | ||||||
| 		qw422016.N().S(`"><strong>Confirm</strong></a></p> |  | ||||||
| 		<p><a href="/page/`) |  | ||||||
| //line templates/delete.qtpl:14 |  | ||||||
| 		qw422016.E().S(hyphaName) |  | ||||||
| //line templates/delete.qtpl:14 |  | ||||||
| 		qw422016.N().S(`">Cancel</a></p> |  | ||||||
| 	</section> |  | ||||||
| `) |  | ||||||
| //line templates/delete.qtpl:16 |  | ||||||
| 	} else { |  | ||||||
| //line templates/delete.qtpl:16 |  | ||||||
| 		qw422016.N().S(` |  | ||||||
| 	`) |  | ||||||
| //line templates/delete.qtpl:17 |  | ||||||
| 		streamcannotDeleteDueToNonExistence(qw422016, hyphaName) |  | ||||||
| //line templates/delete.qtpl:17 |  | ||||||
| 		qw422016.N().S(` |  | ||||||
| `) |  | ||||||
| //line templates/delete.qtpl:18 |  | ||||||
| 	} |  | ||||||
| //line templates/delete.qtpl:18 |  | ||||||
| 	qw422016.N().S(` |  | ||||||
| </main> |  | ||||||
| </div> |  | ||||||
| `) |  | ||||||
| //line templates/delete.qtpl:21 |  | ||||||
| } |  | ||||||
|  |  | ||||||
| //line templates/delete.qtpl:21 |  | ||||||
| func WriteDeleteAskHTML(qq422016 qtio422016.Writer, rq *http.Request, hyphaName string, isOld bool) { |  | ||||||
| //line templates/delete.qtpl:21 |  | ||||||
| 	qw422016 := qt422016.AcquireWriter(qq422016) |  | ||||||
| //line templates/delete.qtpl:21 |  | ||||||
| 	StreamDeleteAskHTML(qw422016, rq, hyphaName, isOld) |  | ||||||
| //line templates/delete.qtpl:21 |  | ||||||
| 	qt422016.ReleaseWriter(qw422016) |  | ||||||
| //line templates/delete.qtpl:21 |  | ||||||
| } |  | ||||||
|  |  | ||||||
| //line templates/delete.qtpl:21 |  | ||||||
| func DeleteAskHTML(rq *http.Request, hyphaName string, isOld bool) string { |  | ||||||
| //line templates/delete.qtpl:21 |  | ||||||
| 	qb422016 := qt422016.AcquireByteBuffer() |  | ||||||
| //line templates/delete.qtpl:21 |  | ||||||
| 	WriteDeleteAskHTML(qb422016, rq, hyphaName, isOld) |  | ||||||
| //line templates/delete.qtpl:21 |  | ||||||
| 	qs422016 := string(qb422016.B) |  | ||||||
| //line templates/delete.qtpl:21 |  | ||||||
| 	qt422016.ReleaseByteBuffer(qb422016) |  | ||||||
| //line templates/delete.qtpl:21 |  | ||||||
| 	return qs422016 |  | ||||||
| //line templates/delete.qtpl:21 |  | ||||||
| } |  | ||||||
|  |  | ||||||
| //line templates/delete.qtpl:23 |  | ||||||
| func streamcannotDeleteDueToNonExistence(qw422016 *qt422016.Writer, hyphaName string) { |  | ||||||
| //line templates/delete.qtpl:23 |  | ||||||
| 	qw422016.N().S(` |  | ||||||
| 	<section> |  | ||||||
| 		<h1>Cannot delete `) |  | ||||||
| //line templates/delete.qtpl:25 |  | ||||||
| 	qw422016.E().S(hyphaName) |  | ||||||
| //line templates/delete.qtpl:25 |  | ||||||
| 	qw422016.N().S(`</h1> |  | ||||||
| 		<p>This hypha does not exist.</p> |  | ||||||
| 		<p><a href="/page/`) |  | ||||||
| //line templates/delete.qtpl:27 |  | ||||||
| 	qw422016.E().S(hyphaName) |  | ||||||
| //line templates/delete.qtpl:27 |  | ||||||
| 	qw422016.N().S(`">Go back</a></p> |  | ||||||
| 	</section> |  | ||||||
| `) |  | ||||||
| //line templates/delete.qtpl:29 |  | ||||||
| } |  | ||||||
|  |  | ||||||
| //line templates/delete.qtpl:29 |  | ||||||
| func writecannotDeleteDueToNonExistence(qq422016 qtio422016.Writer, hyphaName string) { |  | ||||||
| //line templates/delete.qtpl:29 |  | ||||||
| 	qw422016 := qt422016.AcquireWriter(qq422016) |  | ||||||
| //line templates/delete.qtpl:29 |  | ||||||
| 	streamcannotDeleteDueToNonExistence(qw422016, hyphaName) |  | ||||||
| //line templates/delete.qtpl:29 |  | ||||||
| 	qt422016.ReleaseWriter(qw422016) |  | ||||||
| //line templates/delete.qtpl:29 |  | ||||||
| } |  | ||||||
|  |  | ||||||
| //line templates/delete.qtpl:29 |  | ||||||
| func cannotDeleteDueToNonExistence(hyphaName string) string { |  | ||||||
| //line templates/delete.qtpl:29 |  | ||||||
| 	qb422016 := qt422016.AcquireByteBuffer() |  | ||||||
| //line templates/delete.qtpl:29 |  | ||||||
| 	writecannotDeleteDueToNonExistence(qb422016, hyphaName) |  | ||||||
| //line templates/delete.qtpl:29 |  | ||||||
| 	qs422016 := string(qb422016.B) |  | ||||||
| //line templates/delete.qtpl:29 |  | ||||||
| 	qt422016.ReleaseByteBuffer(qb422016) |  | ||||||
| //line templates/delete.qtpl:29 |  | ||||||
| 	return qs422016 |  | ||||||
| //line templates/delete.qtpl:29 |  | ||||||
| } |  | ||||||
| @@ -1,39 +0,0 @@ | |||||||
| {% import "net/http" %} |  | ||||||
| This dialog is to be shown to a user when they try to rename a hypha. |  | ||||||
| {% func RenameAskHTML(rq *http.Request, hyphaName string, isOld bool) %} |  | ||||||
| {%= navHTML(rq, hyphaName, "rename-ask") %} |  | ||||||
| <div class="layout"> |  | ||||||
| <main class="main-width"> |  | ||||||
| {%- if isOld -%} |  | ||||||
| 	<section> |  | ||||||
| 		<h1>Rename {%s hyphaName %}</h1> |  | ||||||
| 		<form action="/rename-confirm/{%s hyphaName %}" method="post" enctype="multipart/form-data"> |  | ||||||
| 			<fieldset> |  | ||||||
| 				<legend>New name</legend> |  | ||||||
| 				<input type="text" value="{%s hyphaName %}" required autofocus id="new-name" name="new-name"/> |  | ||||||
| 			</fieldset> |  | ||||||
|  |  | ||||||
| 			<fieldset> |  | ||||||
| 				<legend>Settings</legend> |  | ||||||
| 				<input type="checkbox" id="recursive" name="recursive" value="true" checked/> |  | ||||||
| 				<label for="recursive">Keep subhyphae</label> |  | ||||||
| 			</fieldset> |  | ||||||
|  |  | ||||||
| 			<p>If you rename this hypha, all incoming links and all relative outcoming links will break. You will also lose all history for the new name. Rename carefully.</p> |  | ||||||
| 			<input type="submit"/> |  | ||||||
| 		</form> |  | ||||||
| 	</section> |  | ||||||
| {%- else -%} |  | ||||||
| 	{%= cannotRenameDueToNonExistence(hyphaName) %} |  | ||||||
| {%- endif -%} |  | ||||||
| </main> |  | ||||||
| </div> |  | ||||||
| {% endfunc %} |  | ||||||
|  |  | ||||||
| {% func cannotRenameDueToNonExistence(hyphaName string) %} |  | ||||||
| 	<section> |  | ||||||
| 		<h1>Cannot rename {%s hyphaName %}</h1> |  | ||||||
| 		<p>This hypha does not exist.</p> |  | ||||||
| 		<p><a href="/page/{%s hyphaName %}">Go back</a></p> |  | ||||||
| 	</section> |  | ||||||
| {% endfunc %} |  | ||||||
| @@ -1,160 +0,0 @@ | |||||||
| // Code generated by qtc from "rename.qtpl". DO NOT EDIT. |  | ||||||
| // See https://github.com/valyala/quicktemplate for details. |  | ||||||
|  |  | ||||||
| //line templates/rename.qtpl:1 |  | ||||||
| package templates |  | ||||||
|  |  | ||||||
| //line templates/rename.qtpl:1 |  | ||||||
| import "net/http" |  | ||||||
|  |  | ||||||
| // This dialog is to be shown to a user when they try to rename a hypha. |  | ||||||
|  |  | ||||||
| //line templates/rename.qtpl:3 |  | ||||||
| import ( |  | ||||||
| 	qtio422016 "io" |  | ||||||
|  |  | ||||||
| 	qt422016 "github.com/valyala/quicktemplate" |  | ||||||
| ) |  | ||||||
|  |  | ||||||
| //line templates/rename.qtpl:3 |  | ||||||
| var ( |  | ||||||
| 	_ = qtio422016.Copy |  | ||||||
| 	_ = qt422016.AcquireByteBuffer |  | ||||||
| ) |  | ||||||
|  |  | ||||||
| //line templates/rename.qtpl:3 |  | ||||||
| func StreamRenameAskHTML(qw422016 *qt422016.Writer, rq *http.Request, hyphaName string, isOld bool) { |  | ||||||
| //line templates/rename.qtpl:3 |  | ||||||
| 	qw422016.N().S(` |  | ||||||
| `) |  | ||||||
| //line templates/rename.qtpl:4 |  | ||||||
| 	streamnavHTML(qw422016, rq, hyphaName, "rename-ask") |  | ||||||
| //line templates/rename.qtpl:4 |  | ||||||
| 	qw422016.N().S(` |  | ||||||
| <div class="layout"> |  | ||||||
| <main class="main-width"> |  | ||||||
| `) |  | ||||||
| //line templates/rename.qtpl:7 |  | ||||||
| 	if isOld { |  | ||||||
| //line templates/rename.qtpl:7 |  | ||||||
| 		qw422016.N().S(`	<section> |  | ||||||
| 		<h1>Rename `) |  | ||||||
| //line templates/rename.qtpl:9 |  | ||||||
| 		qw422016.E().S(hyphaName) |  | ||||||
| //line templates/rename.qtpl:9 |  | ||||||
| 		qw422016.N().S(`</h1> |  | ||||||
| 		<form action="/rename-confirm/`) |  | ||||||
| //line templates/rename.qtpl:10 |  | ||||||
| 		qw422016.E().S(hyphaName) |  | ||||||
| //line templates/rename.qtpl:10 |  | ||||||
| 		qw422016.N().S(`" method="post" enctype="multipart/form-data"> |  | ||||||
| 			<fieldset> |  | ||||||
| 				<legend>New name</legend> |  | ||||||
| 				<input type="text" value="`) |  | ||||||
| //line templates/rename.qtpl:13 |  | ||||||
| 		qw422016.E().S(hyphaName) |  | ||||||
| //line templates/rename.qtpl:13 |  | ||||||
| 		qw422016.N().S(`" required autofocus id="new-name" name="new-name"/> |  | ||||||
| 			</fieldset> |  | ||||||
|  |  | ||||||
| 			<fieldset> |  | ||||||
| 				<legend>Settings</legend> |  | ||||||
| 				<input type="checkbox" id="recursive" name="recursive" value="true" checked/> |  | ||||||
| 				<label for="recursive">Keep subhyphae</label> |  | ||||||
| 			</fieldset> |  | ||||||
|  |  | ||||||
| 			<p>If you rename this hypha, all incoming links and all relative outcoming links will break. You will also lose all history for the new name. Rename carefully.</p> |  | ||||||
| 			<input type="submit"/> |  | ||||||
| 		</form> |  | ||||||
| 	</section> |  | ||||||
| `) |  | ||||||
| //line templates/rename.qtpl:26 |  | ||||||
| 	} else { |  | ||||||
| //line templates/rename.qtpl:26 |  | ||||||
| 		qw422016.N().S(`	`) |  | ||||||
| //line templates/rename.qtpl:27 |  | ||||||
| 		streamcannotRenameDueToNonExistence(qw422016, hyphaName) |  | ||||||
| //line templates/rename.qtpl:27 |  | ||||||
| 		qw422016.N().S(` |  | ||||||
| `) |  | ||||||
| //line templates/rename.qtpl:28 |  | ||||||
| 	} |  | ||||||
| //line templates/rename.qtpl:28 |  | ||||||
| 	qw422016.N().S(`</main> |  | ||||||
| </div> |  | ||||||
| `) |  | ||||||
| //line templates/rename.qtpl:31 |  | ||||||
| } |  | ||||||
|  |  | ||||||
| //line templates/rename.qtpl:31 |  | ||||||
| func WriteRenameAskHTML(qq422016 qtio422016.Writer, rq *http.Request, hyphaName string, isOld bool) { |  | ||||||
| //line templates/rename.qtpl:31 |  | ||||||
| 	qw422016 := qt422016.AcquireWriter(qq422016) |  | ||||||
| //line templates/rename.qtpl:31 |  | ||||||
| 	StreamRenameAskHTML(qw422016, rq, hyphaName, isOld) |  | ||||||
| //line templates/rename.qtpl:31 |  | ||||||
| 	qt422016.ReleaseWriter(qw422016) |  | ||||||
| //line templates/rename.qtpl:31 |  | ||||||
| } |  | ||||||
|  |  | ||||||
| //line templates/rename.qtpl:31 |  | ||||||
| func RenameAskHTML(rq *http.Request, hyphaName string, isOld bool) string { |  | ||||||
| //line templates/rename.qtpl:31 |  | ||||||
| 	qb422016 := qt422016.AcquireByteBuffer() |  | ||||||
| //line templates/rename.qtpl:31 |  | ||||||
| 	WriteRenameAskHTML(qb422016, rq, hyphaName, isOld) |  | ||||||
| //line templates/rename.qtpl:31 |  | ||||||
| 	qs422016 := string(qb422016.B) |  | ||||||
| //line templates/rename.qtpl:31 |  | ||||||
| 	qt422016.ReleaseByteBuffer(qb422016) |  | ||||||
| //line templates/rename.qtpl:31 |  | ||||||
| 	return qs422016 |  | ||||||
| //line templates/rename.qtpl:31 |  | ||||||
| } |  | ||||||
|  |  | ||||||
| //line templates/rename.qtpl:33 |  | ||||||
| func streamcannotRenameDueToNonExistence(qw422016 *qt422016.Writer, hyphaName string) { |  | ||||||
| //line templates/rename.qtpl:33 |  | ||||||
| 	qw422016.N().S(` |  | ||||||
| 	<section> |  | ||||||
| 		<h1>Cannot rename `) |  | ||||||
| //line templates/rename.qtpl:35 |  | ||||||
| 	qw422016.E().S(hyphaName) |  | ||||||
| //line templates/rename.qtpl:35 |  | ||||||
| 	qw422016.N().S(`</h1> |  | ||||||
| 		<p>This hypha does not exist.</p> |  | ||||||
| 		<p><a href="/page/`) |  | ||||||
| //line templates/rename.qtpl:37 |  | ||||||
| 	qw422016.E().S(hyphaName) |  | ||||||
| //line templates/rename.qtpl:37 |  | ||||||
| 	qw422016.N().S(`">Go back</a></p> |  | ||||||
| 	</section> |  | ||||||
| `) |  | ||||||
| //line templates/rename.qtpl:39 |  | ||||||
| } |  | ||||||
|  |  | ||||||
| //line templates/rename.qtpl:39 |  | ||||||
| func writecannotRenameDueToNonExistence(qq422016 qtio422016.Writer, hyphaName string) { |  | ||||||
| //line templates/rename.qtpl:39 |  | ||||||
| 	qw422016 := qt422016.AcquireWriter(qq422016) |  | ||||||
| //line templates/rename.qtpl:39 |  | ||||||
| 	streamcannotRenameDueToNonExistence(qw422016, hyphaName) |  | ||||||
| //line templates/rename.qtpl:39 |  | ||||||
| 	qt422016.ReleaseWriter(qw422016) |  | ||||||
| //line templates/rename.qtpl:39 |  | ||||||
| } |  | ||||||
|  |  | ||||||
| //line templates/rename.qtpl:39 |  | ||||||
| func cannotRenameDueToNonExistence(hyphaName string) string { |  | ||||||
| //line templates/rename.qtpl:39 |  | ||||||
| 	qb422016 := qt422016.AcquireByteBuffer() |  | ||||||
| //line templates/rename.qtpl:39 |  | ||||||
| 	writecannotRenameDueToNonExistence(qb422016, hyphaName) |  | ||||||
| //line templates/rename.qtpl:39 |  | ||||||
| 	qs422016 := string(qb422016.B) |  | ||||||
| //line templates/rename.qtpl:39 |  | ||||||
| 	qt422016.ReleaseByteBuffer(qb422016) |  | ||||||
| //line templates/rename.qtpl:39 |  | ||||||
| 	return qs422016 |  | ||||||
| //line templates/rename.qtpl:39 |  | ||||||
| } |  | ||||||
							
								
								
									
										63
									
								
								views/modal.qtpl
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										63
									
								
								views/modal.qtpl
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,63 @@ | |||||||
|  | {% import "net/http" %} | ||||||
|  | {% import "github.com/bouncepaw/mycorrhiza/util" %} | ||||||
|  |  | ||||||
|  | {% func DeleteAskHTML(rq *http.Request, hyphaName string, isOld bool) %} | ||||||
|  | {%= NavHTML(rq, hyphaName, "delete-ask") %} | ||||||
|  | {%= modalBegin( | ||||||
|  | 	"delete-confirm", | ||||||
|  | 	hyphaName, | ||||||
|  | 	"", | ||||||
|  | 	"Delete "+util.BeautifulName(hyphaName)+"?") %} | ||||||
|  | {%= modalReallyWant(hyphaName, "unattach") %} | ||||||
|  | 		<p>In this version of MycorrhizaWiki you cannot undelete a deleted hypha but the history can still be accessed.</p> | ||||||
|  | {%= modalEnd(hyphaName, true) %} | ||||||
|  | {% endfunc %} | ||||||
|  |  | ||||||
|  | {% func UnattachAskHTML(rq *http.Request, hyphaName string, isOld bool) %} | ||||||
|  | {%= NavHTML(rq, hyphaName, "unattach-ask") %} | ||||||
|  | {%= modalBegin( | ||||||
|  | 	"unattach-confirm", | ||||||
|  | 	hyphaName, | ||||||
|  | 	"", | ||||||
|  | 	"Unattach "+util.BeautifulName(hyphaName)+"?") %} | ||||||
|  | {%= modalReallyWant(hyphaName, "unattach") %} | ||||||
|  | {%= modalEnd(hyphaName, true) %} | ||||||
|  | {% endfunc %} | ||||||
|  |  | ||||||
|  | {% func RenameAskHTML(rq *http.Request, hyphaName string, isOld bool) %} | ||||||
|  | {%= NavHTML(rq, hyphaName, "rename-ask") %} | ||||||
|  | {%= modalBegin( | ||||||
|  | 	"rename-confirm", | ||||||
|  | 	hyphaName, | ||||||
|  | 	` method="post" enctype="multipart/form-data"`, | ||||||
|  | 	"Rename "+util.BeautifulName(hyphaName)) %} | ||||||
|  | 			<label for="new-name">New name</label> | ||||||
|  | 			<input type="text" value="{%s hyphaName %}" required autofocus id="new-name" name="new-name"/> | ||||||
|  |  | ||||||
|  | 			<input type="checkbox" id="recursive" name="recursive" value="true" checked/> | ||||||
|  | 			<label for="recursive">Rename subhyphae too</label> | ||||||
|  |  | ||||||
|  | 			<p>If you rename this hypha, all incoming links and all relative outcoming links will break. You will also lose all history for the new name. Rename carefully.</p> | ||||||
|  | {%= modalEnd(hyphaName, false) %} | ||||||
|  | {% endfunc %} | ||||||
|  |  | ||||||
|  | {% func modalReallyWant(hyphaName, verb string) %} | ||||||
|  | 			<p class="modal__confirmation-msg">Do you really want to {%s verb %} hypha <em>{%s hyphaName %}</em>?</p> | ||||||
|  | {% endfunc %} | ||||||
|  |  | ||||||
|  | {% func modalBegin(path, hyphaName, formAttrs, legend string) %} | ||||||
|  | <div class="layout"> | ||||||
|  | <main class="main-width"> | ||||||
|  | 	<form class="modal" action="/{%s path %}/{%s hyphaName %}"{%s= formAttrs %}> | ||||||
|  | 		<fieldset class="modal__fieldset"> | ||||||
|  | 			<legend class="modal__title">{%s= legend %}</legend> | ||||||
|  | {% endfunc %} | ||||||
|  |  | ||||||
|  | {% func modalEnd(hyphaName string, shouldFocusOnConfirm bool) %} | ||||||
|  | 			<input type="submit" value="Confirm" class="modal__action modal__submit" {% if shouldFocusOnConfirm %}autofocus{% endif %}> | ||||||
|  | 			<a href="/hypha/{%s hyphaName %}" class="modal__action modal__cancel">Cancel</a> | ||||||
|  | 		</fieldset> | ||||||
|  | 	</form> | ||||||
|  | </main> | ||||||
|  | </div> | ||||||
|  | {% endfunc %} | ||||||
							
								
								
									
										355
									
								
								views/modal.qtpl.go
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										355
									
								
								views/modal.qtpl.go
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,355 @@ | |||||||
|  | // Code generated by qtc from "modal.qtpl". DO NOT EDIT. | ||||||
|  | // See https://github.com/valyala/quicktemplate for details. | ||||||
|  |  | ||||||
|  | //line views/modal.qtpl:1 | ||||||
|  | package views | ||||||
|  |  | ||||||
|  | //line views/modal.qtpl:1 | ||||||
|  | import "net/http" | ||||||
|  |  | ||||||
|  | //line views/modal.qtpl:2 | ||||||
|  | import "github.com/bouncepaw/mycorrhiza/util" | ||||||
|  |  | ||||||
|  | //line views/modal.qtpl:4 | ||||||
|  | import ( | ||||||
|  | 	qtio422016 "io" | ||||||
|  |  | ||||||
|  | 	qt422016 "github.com/valyala/quicktemplate" | ||||||
|  | ) | ||||||
|  |  | ||||||
|  | //line views/modal.qtpl:4 | ||||||
|  | var ( | ||||||
|  | 	_ = qtio422016.Copy | ||||||
|  | 	_ = qt422016.AcquireByteBuffer | ||||||
|  | ) | ||||||
|  |  | ||||||
|  | //line views/modal.qtpl:4 | ||||||
|  | func StreamDeleteAskHTML(qw422016 *qt422016.Writer, rq *http.Request, hyphaName string, isOld bool) { | ||||||
|  | //line views/modal.qtpl:4 | ||||||
|  | 	qw422016.N().S(` | ||||||
|  | `) | ||||||
|  | //line views/modal.qtpl:5 | ||||||
|  | 	StreamNavHTML(qw422016, rq, hyphaName, "delete-ask") | ||||||
|  | //line views/modal.qtpl:5 | ||||||
|  | 	qw422016.N().S(` | ||||||
|  | `) | ||||||
|  | //line views/modal.qtpl:6 | ||||||
|  | 	streammodalBegin(qw422016, | ||||||
|  | 		"delete-confirm", | ||||||
|  | 		hyphaName, | ||||||
|  | 		"", | ||||||
|  | 		"Delete "+util.BeautifulName(hyphaName)+"?") | ||||||
|  | //line views/modal.qtpl:10 | ||||||
|  | 	qw422016.N().S(` | ||||||
|  | `) | ||||||
|  | //line views/modal.qtpl:11 | ||||||
|  | 	streammodalReallyWant(qw422016, hyphaName, "unattach") | ||||||
|  | //line views/modal.qtpl:11 | ||||||
|  | 	qw422016.N().S(` | ||||||
|  | 		<p>In this version of MycorrhizaWiki you cannot undelete a deleted hypha but the history can still be accessed.</p> | ||||||
|  | `) | ||||||
|  | //line views/modal.qtpl:13 | ||||||
|  | 	streammodalEnd(qw422016, hyphaName, true) | ||||||
|  | //line views/modal.qtpl:13 | ||||||
|  | 	qw422016.N().S(` | ||||||
|  | `) | ||||||
|  | //line views/modal.qtpl:14 | ||||||
|  | } | ||||||
|  |  | ||||||
|  | //line views/modal.qtpl:14 | ||||||
|  | func WriteDeleteAskHTML(qq422016 qtio422016.Writer, rq *http.Request, hyphaName string, isOld bool) { | ||||||
|  | //line views/modal.qtpl:14 | ||||||
|  | 	qw422016 := qt422016.AcquireWriter(qq422016) | ||||||
|  | //line views/modal.qtpl:14 | ||||||
|  | 	StreamDeleteAskHTML(qw422016, rq, hyphaName, isOld) | ||||||
|  | //line views/modal.qtpl:14 | ||||||
|  | 	qt422016.ReleaseWriter(qw422016) | ||||||
|  | //line views/modal.qtpl:14 | ||||||
|  | } | ||||||
|  |  | ||||||
|  | //line views/modal.qtpl:14 | ||||||
|  | func DeleteAskHTML(rq *http.Request, hyphaName string, isOld bool) string { | ||||||
|  | //line views/modal.qtpl:14 | ||||||
|  | 	qb422016 := qt422016.AcquireByteBuffer() | ||||||
|  | //line views/modal.qtpl:14 | ||||||
|  | 	WriteDeleteAskHTML(qb422016, rq, hyphaName, isOld) | ||||||
|  | //line views/modal.qtpl:14 | ||||||
|  | 	qs422016 := string(qb422016.B) | ||||||
|  | //line views/modal.qtpl:14 | ||||||
|  | 	qt422016.ReleaseByteBuffer(qb422016) | ||||||
|  | //line views/modal.qtpl:14 | ||||||
|  | 	return qs422016 | ||||||
|  | //line views/modal.qtpl:14 | ||||||
|  | } | ||||||
|  |  | ||||||
|  | //line views/modal.qtpl:16 | ||||||
|  | func StreamUnattachAskHTML(qw422016 *qt422016.Writer, rq *http.Request, hyphaName string, isOld bool) { | ||||||
|  | //line views/modal.qtpl:16 | ||||||
|  | 	qw422016.N().S(` | ||||||
|  | `) | ||||||
|  | //line views/modal.qtpl:17 | ||||||
|  | 	StreamNavHTML(qw422016, rq, hyphaName, "unattach-ask") | ||||||
|  | //line views/modal.qtpl:17 | ||||||
|  | 	qw422016.N().S(` | ||||||
|  | `) | ||||||
|  | //line views/modal.qtpl:18 | ||||||
|  | 	streammodalBegin(qw422016, | ||||||
|  | 		"unattach-confirm", | ||||||
|  | 		hyphaName, | ||||||
|  | 		"", | ||||||
|  | 		"Unattach "+util.BeautifulName(hyphaName)+"?") | ||||||
|  | //line views/modal.qtpl:22 | ||||||
|  | 	qw422016.N().S(` | ||||||
|  | `) | ||||||
|  | //line views/modal.qtpl:23 | ||||||
|  | 	streammodalReallyWant(qw422016, hyphaName, "unattach") | ||||||
|  | //line views/modal.qtpl:23 | ||||||
|  | 	qw422016.N().S(` | ||||||
|  | `) | ||||||
|  | //line views/modal.qtpl:24 | ||||||
|  | 	streammodalEnd(qw422016, hyphaName, true) | ||||||
|  | //line views/modal.qtpl:24 | ||||||
|  | 	qw422016.N().S(` | ||||||
|  | `) | ||||||
|  | //line views/modal.qtpl:25 | ||||||
|  | } | ||||||
|  |  | ||||||
|  | //line views/modal.qtpl:25 | ||||||
|  | func WriteUnattachAskHTML(qq422016 qtio422016.Writer, rq *http.Request, hyphaName string, isOld bool) { | ||||||
|  | //line views/modal.qtpl:25 | ||||||
|  | 	qw422016 := qt422016.AcquireWriter(qq422016) | ||||||
|  | //line views/modal.qtpl:25 | ||||||
|  | 	StreamUnattachAskHTML(qw422016, rq, hyphaName, isOld) | ||||||
|  | //line views/modal.qtpl:25 | ||||||
|  | 	qt422016.ReleaseWriter(qw422016) | ||||||
|  | //line views/modal.qtpl:25 | ||||||
|  | } | ||||||
|  |  | ||||||
|  | //line views/modal.qtpl:25 | ||||||
|  | func UnattachAskHTML(rq *http.Request, hyphaName string, isOld bool) string { | ||||||
|  | //line views/modal.qtpl:25 | ||||||
|  | 	qb422016 := qt422016.AcquireByteBuffer() | ||||||
|  | //line views/modal.qtpl:25 | ||||||
|  | 	WriteUnattachAskHTML(qb422016, rq, hyphaName, isOld) | ||||||
|  | //line views/modal.qtpl:25 | ||||||
|  | 	qs422016 := string(qb422016.B) | ||||||
|  | //line views/modal.qtpl:25 | ||||||
|  | 	qt422016.ReleaseByteBuffer(qb422016) | ||||||
|  | //line views/modal.qtpl:25 | ||||||
|  | 	return qs422016 | ||||||
|  | //line views/modal.qtpl:25 | ||||||
|  | } | ||||||
|  |  | ||||||
|  | //line views/modal.qtpl:27 | ||||||
|  | func StreamRenameAskHTML(qw422016 *qt422016.Writer, rq *http.Request, hyphaName string, isOld bool) { | ||||||
|  | //line views/modal.qtpl:27 | ||||||
|  | 	qw422016.N().S(` | ||||||
|  | `) | ||||||
|  | //line views/modal.qtpl:28 | ||||||
|  | 	StreamNavHTML(qw422016, rq, hyphaName, "rename-ask") | ||||||
|  | //line views/modal.qtpl:28 | ||||||
|  | 	qw422016.N().S(` | ||||||
|  | `) | ||||||
|  | //line views/modal.qtpl:29 | ||||||
|  | 	streammodalBegin(qw422016, | ||||||
|  | 		"rename-confirm", | ||||||
|  | 		hyphaName, | ||||||
|  | 		` method="post" enctype="multipart/form-data"`, | ||||||
|  | 		"Rename "+util.BeautifulName(hyphaName)) | ||||||
|  | //line views/modal.qtpl:33 | ||||||
|  | 	qw422016.N().S(` | ||||||
|  | 			<label for="new-name">New name</label> | ||||||
|  | 			<input type="text" value="`) | ||||||
|  | //line views/modal.qtpl:35 | ||||||
|  | 	qw422016.E().S(hyphaName) | ||||||
|  | //line views/modal.qtpl:35 | ||||||
|  | 	qw422016.N().S(`" required autofocus id="new-name" name="new-name"/> | ||||||
|  |  | ||||||
|  | 			<input type="checkbox" id="recursive" name="recursive" value="true" checked/> | ||||||
|  | 			<label for="recursive">Rename subhyphae too</label> | ||||||
|  |  | ||||||
|  | 			<p>If you rename this hypha, all incoming links and all relative outcoming links will break. You will also lose all history for the new name. Rename carefully.</p> | ||||||
|  | `) | ||||||
|  | //line views/modal.qtpl:41 | ||||||
|  | 	streammodalEnd(qw422016, hyphaName, false) | ||||||
|  | //line views/modal.qtpl:41 | ||||||
|  | 	qw422016.N().S(` | ||||||
|  | `) | ||||||
|  | //line views/modal.qtpl:42 | ||||||
|  | } | ||||||
|  |  | ||||||
|  | //line views/modal.qtpl:42 | ||||||
|  | func WriteRenameAskHTML(qq422016 qtio422016.Writer, rq *http.Request, hyphaName string, isOld bool) { | ||||||
|  | //line views/modal.qtpl:42 | ||||||
|  | 	qw422016 := qt422016.AcquireWriter(qq422016) | ||||||
|  | //line views/modal.qtpl:42 | ||||||
|  | 	StreamRenameAskHTML(qw422016, rq, hyphaName, isOld) | ||||||
|  | //line views/modal.qtpl:42 | ||||||
|  | 	qt422016.ReleaseWriter(qw422016) | ||||||
|  | //line views/modal.qtpl:42 | ||||||
|  | } | ||||||
|  |  | ||||||
|  | //line views/modal.qtpl:42 | ||||||
|  | func RenameAskHTML(rq *http.Request, hyphaName string, isOld bool) string { | ||||||
|  | //line views/modal.qtpl:42 | ||||||
|  | 	qb422016 := qt422016.AcquireByteBuffer() | ||||||
|  | //line views/modal.qtpl:42 | ||||||
|  | 	WriteRenameAskHTML(qb422016, rq, hyphaName, isOld) | ||||||
|  | //line views/modal.qtpl:42 | ||||||
|  | 	qs422016 := string(qb422016.B) | ||||||
|  | //line views/modal.qtpl:42 | ||||||
|  | 	qt422016.ReleaseByteBuffer(qb422016) | ||||||
|  | //line views/modal.qtpl:42 | ||||||
|  | 	return qs422016 | ||||||
|  | //line views/modal.qtpl:42 | ||||||
|  | } | ||||||
|  |  | ||||||
|  | //line views/modal.qtpl:44 | ||||||
|  | func streammodalReallyWant(qw422016 *qt422016.Writer, hyphaName, verb string) { | ||||||
|  | //line views/modal.qtpl:44 | ||||||
|  | 	qw422016.N().S(` | ||||||
|  | 			<p class="modal__confirmation-msg">Do you really want to `) | ||||||
|  | //line views/modal.qtpl:45 | ||||||
|  | 	qw422016.E().S(verb) | ||||||
|  | //line views/modal.qtpl:45 | ||||||
|  | 	qw422016.N().S(` hypha <em>`) | ||||||
|  | //line views/modal.qtpl:45 | ||||||
|  | 	qw422016.E().S(hyphaName) | ||||||
|  | //line views/modal.qtpl:45 | ||||||
|  | 	qw422016.N().S(`</em>?</p> | ||||||
|  | `) | ||||||
|  | //line views/modal.qtpl:46 | ||||||
|  | } | ||||||
|  |  | ||||||
|  | //line views/modal.qtpl:46 | ||||||
|  | func writemodalReallyWant(qq422016 qtio422016.Writer, hyphaName, verb string) { | ||||||
|  | //line views/modal.qtpl:46 | ||||||
|  | 	qw422016 := qt422016.AcquireWriter(qq422016) | ||||||
|  | //line views/modal.qtpl:46 | ||||||
|  | 	streammodalReallyWant(qw422016, hyphaName, verb) | ||||||
|  | //line views/modal.qtpl:46 | ||||||
|  | 	qt422016.ReleaseWriter(qw422016) | ||||||
|  | //line views/modal.qtpl:46 | ||||||
|  | } | ||||||
|  |  | ||||||
|  | //line views/modal.qtpl:46 | ||||||
|  | func modalReallyWant(hyphaName, verb string) string { | ||||||
|  | //line views/modal.qtpl:46 | ||||||
|  | 	qb422016 := qt422016.AcquireByteBuffer() | ||||||
|  | //line views/modal.qtpl:46 | ||||||
|  | 	writemodalReallyWant(qb422016, hyphaName, verb) | ||||||
|  | //line views/modal.qtpl:46 | ||||||
|  | 	qs422016 := string(qb422016.B) | ||||||
|  | //line views/modal.qtpl:46 | ||||||
|  | 	qt422016.ReleaseByteBuffer(qb422016) | ||||||
|  | //line views/modal.qtpl:46 | ||||||
|  | 	return qs422016 | ||||||
|  | //line views/modal.qtpl:46 | ||||||
|  | } | ||||||
|  |  | ||||||
|  | //line views/modal.qtpl:48 | ||||||
|  | func streammodalBegin(qw422016 *qt422016.Writer, path, hyphaName, formAttrs, legend string) { | ||||||
|  | //line views/modal.qtpl:48 | ||||||
|  | 	qw422016.N().S(` | ||||||
|  | <div class="layout"> | ||||||
|  | <main class="main-width"> | ||||||
|  | 	<form class="modal" action="/`) | ||||||
|  | //line views/modal.qtpl:51 | ||||||
|  | 	qw422016.E().S(path) | ||||||
|  | //line views/modal.qtpl:51 | ||||||
|  | 	qw422016.N().S(`/`) | ||||||
|  | //line views/modal.qtpl:51 | ||||||
|  | 	qw422016.E().S(hyphaName) | ||||||
|  | //line views/modal.qtpl:51 | ||||||
|  | 	qw422016.N().S(`"`) | ||||||
|  | //line views/modal.qtpl:51 | ||||||
|  | 	qw422016.N().S(formAttrs) | ||||||
|  | //line views/modal.qtpl:51 | ||||||
|  | 	qw422016.N().S(`> | ||||||
|  | 		<fieldset class="modal__fieldset"> | ||||||
|  | 			<legend class="modal__title">`) | ||||||
|  | //line views/modal.qtpl:53 | ||||||
|  | 	qw422016.N().S(legend) | ||||||
|  | //line views/modal.qtpl:53 | ||||||
|  | 	qw422016.N().S(`</legend> | ||||||
|  | `) | ||||||
|  | //line views/modal.qtpl:54 | ||||||
|  | } | ||||||
|  |  | ||||||
|  | //line views/modal.qtpl:54 | ||||||
|  | func writemodalBegin(qq422016 qtio422016.Writer, path, hyphaName, formAttrs, legend string) { | ||||||
|  | //line views/modal.qtpl:54 | ||||||
|  | 	qw422016 := qt422016.AcquireWriter(qq422016) | ||||||
|  | //line views/modal.qtpl:54 | ||||||
|  | 	streammodalBegin(qw422016, path, hyphaName, formAttrs, legend) | ||||||
|  | //line views/modal.qtpl:54 | ||||||
|  | 	qt422016.ReleaseWriter(qw422016) | ||||||
|  | //line views/modal.qtpl:54 | ||||||
|  | } | ||||||
|  |  | ||||||
|  | //line views/modal.qtpl:54 | ||||||
|  | func modalBegin(path, hyphaName, formAttrs, legend string) string { | ||||||
|  | //line views/modal.qtpl:54 | ||||||
|  | 	qb422016 := qt422016.AcquireByteBuffer() | ||||||
|  | //line views/modal.qtpl:54 | ||||||
|  | 	writemodalBegin(qb422016, path, hyphaName, formAttrs, legend) | ||||||
|  | //line views/modal.qtpl:54 | ||||||
|  | 	qs422016 := string(qb422016.B) | ||||||
|  | //line views/modal.qtpl:54 | ||||||
|  | 	qt422016.ReleaseByteBuffer(qb422016) | ||||||
|  | //line views/modal.qtpl:54 | ||||||
|  | 	return qs422016 | ||||||
|  | //line views/modal.qtpl:54 | ||||||
|  | } | ||||||
|  |  | ||||||
|  | //line views/modal.qtpl:56 | ||||||
|  | func streammodalEnd(qw422016 *qt422016.Writer, hyphaName string, shouldFocusOnConfirm bool) { | ||||||
|  | //line views/modal.qtpl:56 | ||||||
|  | 	qw422016.N().S(` | ||||||
|  | 			<input type="submit" value="Confirm" class="modal__action modal__submit" `) | ||||||
|  | //line views/modal.qtpl:57 | ||||||
|  | 	if shouldFocusOnConfirm { | ||||||
|  | //line views/modal.qtpl:57 | ||||||
|  | 		qw422016.N().S(`autofocus`) | ||||||
|  | //line views/modal.qtpl:57 | ||||||
|  | 	} | ||||||
|  | //line views/modal.qtpl:57 | ||||||
|  | 	qw422016.N().S(`> | ||||||
|  | 			<a href="/hypha/`) | ||||||
|  | //line views/modal.qtpl:58 | ||||||
|  | 	qw422016.E().S(hyphaName) | ||||||
|  | //line views/modal.qtpl:58 | ||||||
|  | 	qw422016.N().S(`" class="modal__action modal__cancel">Cancel</a> | ||||||
|  | 		</fieldset> | ||||||
|  | 	</form> | ||||||
|  | </main> | ||||||
|  | </div> | ||||||
|  | `) | ||||||
|  | //line views/modal.qtpl:63 | ||||||
|  | } | ||||||
|  |  | ||||||
|  | //line views/modal.qtpl:63 | ||||||
|  | func writemodalEnd(qq422016 qtio422016.Writer, hyphaName string, shouldFocusOnConfirm bool) { | ||||||
|  | //line views/modal.qtpl:63 | ||||||
|  | 	qw422016 := qt422016.AcquireWriter(qq422016) | ||||||
|  | //line views/modal.qtpl:63 | ||||||
|  | 	streammodalEnd(qw422016, hyphaName, shouldFocusOnConfirm) | ||||||
|  | //line views/modal.qtpl:63 | ||||||
|  | 	qt422016.ReleaseWriter(qw422016) | ||||||
|  | //line views/modal.qtpl:63 | ||||||
|  | } | ||||||
|  |  | ||||||
|  | //line views/modal.qtpl:63 | ||||||
|  | func modalEnd(hyphaName string, shouldFocusOnConfirm bool) string { | ||||||
|  | //line views/modal.qtpl:63 | ||||||
|  | 	qb422016 := qt422016.AcquireByteBuffer() | ||||||
|  | //line views/modal.qtpl:63 | ||||||
|  | 	writemodalEnd(qb422016, hyphaName, shouldFocusOnConfirm) | ||||||
|  | //line views/modal.qtpl:63 | ||||||
|  | 	qs422016 := string(qb422016.B) | ||||||
|  | //line views/modal.qtpl:63 | ||||||
|  | 	qt422016.ReleaseByteBuffer(qb422016) | ||||||
|  | //line views/modal.qtpl:63 | ||||||
|  | 	return qs422016 | ||||||
|  | //line views/modal.qtpl:63 | ||||||
|  | } | ||||||
| @@ -1,18 +0,0 @@ | |||||||
| {% import "net/http" %} |  | ||||||
| {% import "github.com/bouncepaw/mycorrhiza/util" %} |  | ||||||
|  |  | ||||||
| {% func UnattachAskHTML(rq *http.Request, hyphaName string, isOld bool) %} |  | ||||||
| {%= NavHTML(rq, hyphaName, "unattach-ask") %} |  | ||||||
| <div class="layout"> |  | ||||||
| <main class="main-width"> |  | ||||||
| 	<form class="modal" action="/unattach-confirm/{%s hyphaName %}"> |  | ||||||
| 		<fieldset class="modal__fieldset"> |  | ||||||
| 			<legend class="modal__title">Unattach {%s util.BeautifulName(hyphaName) %}?</legend> |  | ||||||
| 			<p class="modal__confirmation-msg">Do you really want to unattach hypha <em>{%s hyphaName %}</em>?</p> |  | ||||||
| 			<input type="submit" value="Confirm" class="modal__action modal__submit" autofocus> |  | ||||||
| 			<a href="/hypha/{%s hyphaName %}" class="modal__action modal__cancel">Cancel</a> |  | ||||||
| 		</fieldset> |  | ||||||
| 	</form> |  | ||||||
| </main> |  | ||||||
| </div> |  | ||||||
| {% endfunc %} |  | ||||||
| @@ -1,91 +0,0 @@ | |||||||
| // Code generated by qtc from "unattach.qtpl". DO NOT EDIT. |  | ||||||
| // See https://github.com/valyala/quicktemplate for details. |  | ||||||
|  |  | ||||||
| //line views/unattach.qtpl:1 |  | ||||||
| package views |  | ||||||
|  |  | ||||||
| //line views/unattach.qtpl:1 |  | ||||||
| import "net/http" |  | ||||||
|  |  | ||||||
| //line views/unattach.qtpl:2 |  | ||||||
| import "github.com/bouncepaw/mycorrhiza/util" |  | ||||||
|  |  | ||||||
| //line views/unattach.qtpl:4 |  | ||||||
| import ( |  | ||||||
| 	qtio422016 "io" |  | ||||||
|  |  | ||||||
| 	qt422016 "github.com/valyala/quicktemplate" |  | ||||||
| ) |  | ||||||
|  |  | ||||||
| //line views/unattach.qtpl:4 |  | ||||||
| var ( |  | ||||||
| 	_ = qtio422016.Copy |  | ||||||
| 	_ = qt422016.AcquireByteBuffer |  | ||||||
| ) |  | ||||||
|  |  | ||||||
| //line views/unattach.qtpl:4 |  | ||||||
| func StreamUnattachAskHTML(qw422016 *qt422016.Writer, rq *http.Request, hyphaName string, isOld bool) { |  | ||||||
| //line views/unattach.qtpl:4 |  | ||||||
| 	qw422016.N().S(` |  | ||||||
| `) |  | ||||||
| //line views/unattach.qtpl:5 |  | ||||||
| 	StreamNavHTML(qw422016, rq, hyphaName, "unattach-ask") |  | ||||||
| //line views/unattach.qtpl:5 |  | ||||||
| 	qw422016.N().S(` |  | ||||||
| <div class="layout"> |  | ||||||
| <main class="main-width"> |  | ||||||
| 	<form class="modal" action="/unattach-confirm/`) |  | ||||||
| //line views/unattach.qtpl:8 |  | ||||||
| 	qw422016.E().S(hyphaName) |  | ||||||
| //line views/unattach.qtpl:8 |  | ||||||
| 	qw422016.N().S(`"> |  | ||||||
| 		<fieldset class="modal__fieldset"> |  | ||||||
| 			<legend class="modal__title">Unattach `) |  | ||||||
| //line views/unattach.qtpl:10 |  | ||||||
| 	qw422016.E().S(util.BeautifulName(hyphaName)) |  | ||||||
| //line views/unattach.qtpl:10 |  | ||||||
| 	qw422016.N().S(`?</legend> |  | ||||||
| 			<p class="modal__confirmation-msg">Do you really want to unattach hypha <em>`) |  | ||||||
| //line views/unattach.qtpl:11 |  | ||||||
| 	qw422016.E().S(hyphaName) |  | ||||||
| //line views/unattach.qtpl:11 |  | ||||||
| 	qw422016.N().S(`</em>?</p> |  | ||||||
| 			<input type="submit" value="Confirm" class="modal__action modal__submit" autofocus> |  | ||||||
| 			<a href="/hypha/`) |  | ||||||
| //line views/unattach.qtpl:13 |  | ||||||
| 	qw422016.E().S(hyphaName) |  | ||||||
| //line views/unattach.qtpl:13 |  | ||||||
| 	qw422016.N().S(`" class="modal__action modal__cancel">Cancel</a> |  | ||||||
| 		</fieldset> |  | ||||||
| 	</form> |  | ||||||
| </main> |  | ||||||
| </div> |  | ||||||
| `) |  | ||||||
| //line views/unattach.qtpl:18 |  | ||||||
| } |  | ||||||
|  |  | ||||||
| //line views/unattach.qtpl:18 |  | ||||||
| func WriteUnattachAskHTML(qq422016 qtio422016.Writer, rq *http.Request, hyphaName string, isOld bool) { |  | ||||||
| //line views/unattach.qtpl:18 |  | ||||||
| 	qw422016 := qt422016.AcquireWriter(qq422016) |  | ||||||
| //line views/unattach.qtpl:18 |  | ||||||
| 	StreamUnattachAskHTML(qw422016, rq, hyphaName, isOld) |  | ||||||
| //line views/unattach.qtpl:18 |  | ||||||
| 	qt422016.ReleaseWriter(qw422016) |  | ||||||
| //line views/unattach.qtpl:18 |  | ||||||
| } |  | ||||||
|  |  | ||||||
| //line views/unattach.qtpl:18 |  | ||||||
| func UnattachAskHTML(rq *http.Request, hyphaName string, isOld bool) string { |  | ||||||
| //line views/unattach.qtpl:18 |  | ||||||
| 	qb422016 := qt422016.AcquireByteBuffer() |  | ||||||
| //line views/unattach.qtpl:18 |  | ||||||
| 	WriteUnattachAskHTML(qb422016, rq, hyphaName, isOld) |  | ||||||
| //line views/unattach.qtpl:18 |  | ||||||
| 	qs422016 := string(qb422016.B) |  | ||||||
| //line views/unattach.qtpl:18 |  | ||||||
| 	qt422016.ReleaseByteBuffer(qb422016) |  | ||||||
| //line views/unattach.qtpl:18 |  | ||||||
| 	return qs422016 |  | ||||||
| //line views/unattach.qtpl:18 |  | ||||||
| } |  | ||||||
		Reference in New Issue
	
	Block a user
	 bouncepaw
					bouncepaw