use fileUri for edit page link if available
authorDan Allen <dan@opendevise.com>
Tue, 29 Oct 2019 02:04:00 +0000 (20:04 -0600)
committerDan Allen <dan@opendevise.com>
Tue, 29 Oct 2019 02:04:00 +0000 (20:04 -0600)
src/partials/toolbar.hbs

index 251a51a..a285681 100644 (file)
@@ -5,7 +5,7 @@
   {{/if}}
 {{> breadcrumbs}}
 {{> page-versions}}
-  {{#if (and page.editUrl (not page.origin.private))}}
-  <div class="edit-this-page"><a href="{{page.editUrl}}">Edit this Page</a></div>
+  {{#if (or page.fileUri (and page.editUrl (not page.origin.private)))}}
+  <div class="edit-this-page"><a href="{{or page.fileUri page.editUrl}}">Edit this Page</a></div>
   {{/if}}
 </div>