Added move document feature
This commit is contained in:
		| @@ -19,19 +19,6 @@ | ||||
| 		.nav-right.nav-menu | ||||
| 			block rootNavRight | ||||
| 				i.nav-item#notifload | ||||
| 				a.nav-item(href='/history/' + pageData.meta.path) | ||||
| 					| History | ||||
| 				a.nav-item(href='/source/' + pageData.meta.path) | ||||
| 					| Source | ||||
| 				span.nav-item | ||||
| 					a.button(href='/edit/' + pageData.meta.path) | ||||
| 						span.icon | ||||
| 							i.fa.fa-edit | ||||
| 						span Edit | ||||
| 					a.button.is-primary.btn-create-prompt | ||||
| 						span.icon | ||||
| 							i.fa.fa-plus | ||||
| 						span Create | ||||
|  | ||||
| 	.box.searchresults.animated(v-show='searchactive', transition='slide', v-cloak, style={'display':'none'}) | ||||
| 		.menu | ||||
|   | ||||
							
								
								
									
										18
									
								
								views/modals/move.pug
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										18
									
								
								views/modals/move.pug
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,18 @@ | ||||
|  | ||||
| .modal#modal-move-prompt | ||||
| 	.modal-background | ||||
| 	.modal-container | ||||
| 		.modal-content | ||||
| 			.card.is-fullwidth | ||||
| 				header.card-header.is-info | ||||
| 					p.card-header-title Move document | ||||
| 				.card-content | ||||
| 					.content | ||||
| 						label.label Enter the new document path: | ||||
| 						p.control | ||||
| 							input.input(type='text', placeholder='page-name')#txt-move-prompt | ||||
| 							span.help.is-danger.is-hidden This document path is invalid or not allowed! | ||||
| 						span Note that moving or renaming documents can lead to broken links. Make sure to edit any page that links to this document afterwards! | ||||
| 				footer.card-footer | ||||
| 					a.card-footer-item.btn-move-prompt Discard | ||||
| 					a.card-footer-item.btn-move-go Move | ||||
| @@ -5,10 +5,6 @@ block rootNavCenter | ||||
|  | ||||
| block rootNavRight | ||||
| 	i.nav-item#notifload | ||||
| 	a.nav-item(href='/history/' + pageData.meta.path, target='_blank') | ||||
| 		| History | ||||
| 	a.nav-item(href='/source/' + pageData.meta.path, target='_blank') | ||||
| 		| Source | ||||
| 	span.nav-item | ||||
| 		a.button.is-warning.btn-edit-discard | ||||
| 			span.icon | ||||
| @@ -24,4 +20,5 @@ block content | ||||
| 	#page-type-edit(data-entrypath=pageData.meta.path) | ||||
| 		textarea#mk-editor= pageData.markdown | ||||
|  | ||||
| 	include ../modals/edit.pug | ||||
| 	include ../modals/edit.pug | ||||
| 	include ../modals/move.pug | ||||
| @@ -1,9 +1,29 @@ | ||||
| extends ../layout.pug | ||||
|  | ||||
| block rootNavCenter | ||||
| 	h2.nav-item= pageData.meta.title | ||||
|  | ||||
| block rootNavRight | ||||
| 	i.nav-item#notifload | ||||
| 	a.nav-item.btn-move-prompt.is-hidden | ||||
| 		| Move | ||||
| 	a.nav-item(href='/' + pageData.meta.path) | ||||
| 		| Normal View | ||||
| 	span.nav-item | ||||
| 		a.button(href='/edit/' + pageData.meta.path) | ||||
| 			span.icon | ||||
| 				i.fa.fa-edit | ||||
| 			span Edit | ||||
| 		a.button.is-primary.btn-create-prompt | ||||
| 			span.icon | ||||
| 				i.fa.fa-plus | ||||
| 			span Create | ||||
|  | ||||
| block content | ||||
|  | ||||
| 	#page-type-source(data-entrypath=pageData.meta.path) | ||||
| 		.ace-container | ||||
| 			#source-display= pageData.markdown | ||||
|  | ||||
| 	include ../modals/create | ||||
| 	include ../modals/create.pug | ||||
| 	include ../modals/move.pug | ||||
|   | ||||
| @@ -10,8 +10,8 @@ mixin tocMenu(ti) | ||||
|  | ||||
| block rootNavRight | ||||
| 	i.nav-item#notifload | ||||
| 	a.nav-item(href='/history/' + pageData.meta.path) | ||||
| 		| History | ||||
| 	a.nav-item.btn-move-prompt.is-hidden | ||||
| 		| Move | ||||
| 	a.nav-item(href='/source/' + pageData.meta.path) | ||||
| 		| Source | ||||
| 	span.nav-item | ||||
| @@ -62,3 +62,4 @@ block content | ||||
| 							!= pageData.html | ||||
|  | ||||
| 	include ../modals/create.pug | ||||
| 	include ../modals/move.pug | ||||
|   | ||||
		Reference in New Issue
	
	Block a user