wikijs-fork/server/views/pages/source.pug
2017-07-09 00:01:34 -04:00

33 lines
1.0 KiB
Plaintext

extends ../layout.pug
block rootNavCenter
h2.nav-item= pageData.meta.title
block rootNavRight
loading-spinner
span.nav-item
if rights.write && pageData.meta.path !== 'home'
a.button.is-outlined(v-on:click='$store.dispatch("modalMovePage/open")')
i.nc-icon-outline.arrows-1_shuffle-98
span= t('nav.move')
a.button.is-outlined(href='/' + pageData.meta.path)
i.nc-icon-outline.ui-2_book
span= t('nav.normalview')
if rights.write
a.button.is-orange(href='/edit/' + pageData.meta.path)
i.nc-icon-outline.ui-1_edit-76
span= t('nav.edit')
a.button(v-on:click='$store.dispatch("modalCreatePage/open")')
i.nc-icon-outline.ui-1_simple-add
span= t('nav.create')
block content
source-view(inline-template, entrypath=pageData.meta.path, v-cloak)
.ace-container
#source-display(v-pre)= pageData.markdown
modal-create-page(basepath=pageData.meta.path)
modal-move-page(current-path=pageData.meta.path)
page-loader(text=t('loading.source'))