Skip to content
This repository has been archived by the owner on Jan 24, 2024. It is now read-only.

Commit

Permalink
Merge pull request #40 from spiral-modules/develop
Browse files Browse the repository at this point in the history
Develop
  • Loading branch information
wolfy-j authored Mar 22, 2017
2 parents e8834ab + c85fd2c commit f6f62fb
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 3 deletions.
13 changes: 13 additions & 0 deletions source/views/elements/allowed.dark.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
<?php #compile
$this->runtimeVariable('permission', '${permission}');
?><?php
/**
* @var string $permission
* @var \Spiral\Security\GuardInterface $guard
*/
$guard = spiral(\Spiral\Security\GuardInterface::class);
if ($guard->allows($permission)) {
ob_start(); ?>${context}<?php
echo ob_get_clean();
}
?>
2 changes: 1 addition & 1 deletion source/views/layout.dark.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<dark:extends path="vault:layouts/root"/>
<dark:extends path="vault:layouts/vault"/>
<dark:use path="vault:layouts/navigation" as="vault:navigation"/>

<define:brand>
Expand Down
11 changes: 9 additions & 2 deletions source/views/layouts/root.dark.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,15 +8,22 @@
<block:styles>
<asset:style href="https://fonts.googleapis.com/icon?family=Material+Icons"/>
<toolkit:styles/>
<asset:style src="/resources/styles/spiral/spiral.css"/>
<asset:style href="/resources/styles/spiral/vault/vault.css"/>
</block:styles>

<block:scripts>
<asset:script href="/resources/vendor/jquery-2.2.0.min.js"/>
<asset:script href="/resources/vendor/materialize.min.js"/>
<toolkit:scripts/>
<asset:script href="/resources/scripts/spiral/sf.js"/>
<asset:script href="/resources/scripts/spiral/sf.locker.js"/>
<asset:script href="/resources/scripts/spiral/sf.form.js"/>
<asset:script href="/resources/scripts/spiral/sf.input.js"/>
<asset:script href="/resources/scripts/spiral/sf.date.js"/>
<asset:script href="/resources/scripts/spiral/sf.datetime.js"/>
<asset:script href="/resources/scripts/spiral/sf.fileinput.js"/>
<asset:script href="/resources/scripts/spiral/vault.js"/>
</block:scripts>

Expand Down

0 comments on commit f6f62fb

Please sign in to comment.