doctype html

div.wrapper(ng-controller="WikiDetailController as ctrl",
            ng-init="section='wiki'")
    sidebar.menu-secondary.extrabar(tg-check-permission="view_wiki_links")
        section.wiki-nav(tg-wiki-nav, ng-model="wikiLinks")
    section.main.wiki
        .header
            h1
                span(tg-bo-bind="project.name")
                span.green(translate="PROJECT.SECTION.WIKI")
                span.wiki-title(tg-bo-bind='wikiSlug|unslugify')

        div.summary.wiki-summary(tg-wiki-summary, ng-model="wiki", ng-if="wiki.id")
        section.wiki-content(tg-editable-wiki-content, ng-model="wiki")

        tg-attachments(ng-model="wiki", type="wiki_page", ng-if="wiki.id")

        a.remove(href="", ng-click="ctrl.delete()", ng-if="wiki.id", title="{{'WIKI.REMOVE' | translate}}", tg-check-permission="delete_wiki_page")
            span.icon.icon-delete
            span(translate="WIKI.REMOVE")
