Skip to content

Commit

Permalink
feat: add template-edit button to topbar
Browse files Browse the repository at this point in the history
  • Loading branch information
BernhardBaumrock committed Jan 26, 2023
1 parent dc9ad8e commit fec8447
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 1 deletion.
2 changes: 1 addition & 1 deletion RockFrontend.module.php
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ public static function getModuleInfo()
{
return [
'title' => 'RockFrontend',
'version' => '2.18.0',
'version' => '2.19.0',
'summary' => 'Module for easy frontend development',
'autoload' => true,
'singular' => true,
Expand Down
12 changes: 12 additions & 0 deletions bar/topbar.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,18 @@
</svg>
</a>

<?php if ($user->isSuperuser()) : ?>
<a href="<?= $pages->get(2)->url . "setup/template/edit?id=" . $page->template->id ?>">
<svg xmlns="http://www.w3.org/2000/svg" width="32" height="32" viewBox="0 0 24 24">
<g fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2">
<rect width="16" height="4" x="4" y="4" rx="1" />
<rect width="6" height="8" x="4" y="12" rx="1" />
<path d="M14 12h6m-6 4h6m-6 4h6" />
</g>
</svg>
</a>
<?php endif; ?>

<a href=/ class="rpb-device-preview">
<svg width="100%" height="100%" viewBox="0 0 32 32" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" xml:space="preserve" xmlns:serif="http://www.serif.com/" style="fill-rule:evenodd;clip-rule:evenodd;stroke-linecap:round;stroke-linejoin:round;">
<g>
Expand Down

0 comments on commit fec8447

Please sign in to comment.