This repository has been archived by the owner on May 9, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
51e540e
commit 47a97ac
Showing
6 changed files
with
42 additions
and
21 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,19 +1,18 @@ | ||
<?php | ||
|
||
// ACL | ||
// ACL. | ||
$this("acl")->addResource('EmailOnSave', ['manage.emailonsave']); | ||
|
||
$app->on('admin.init', function() { | ||
/* | ||
* add menu entry if the user has access to group stuff | ||
*/ | ||
$this->on('cockpit.view.settings.item', function () { | ||
if ($this->module('cockpit')->hasaccess('EmailOnSave', 'manage.emailonsave')) { | ||
$this->renderView("emailonsave:views/partials/settings.php"); | ||
} | ||
}); | ||
|
||
// bind admin routes /emailonsave | ||
$this->bindClass('EmailOnSave\\Controller\\Admin', 'emailonsave'); | ||
|
||
// add to modules menu | ||
$this('admin')->addMenuItem('modules', [ | ||
'label' => 'Email On Save', | ||
'icon' => 'assets:app/media/icons/email.svg', | ||
'route' => '/emailonsave', | ||
'active' => strpos($this['route'], '/emailonsave') === 0 | ||
]); | ||
|
||
}); | ||
$app->on('admin.init', function () use ($app) { | ||
// Bind admin routes /settings/email-on-save. | ||
$this->bindClass('EmailOnSave\\Controller\\Admin', 'settings/email-on-save'); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,9 @@ | ||
<?php | ||
|
||
// ADMIN | ||
// ADMIN. | ||
if (COCKPIT_ADMIN && !COCKPIT_API_REQUEST) { | ||
include_once(__DIR__ . '/admin.php'); | ||
include_once __DIR__ . '/admin.php'; | ||
} | ||
|
||
// ACTIONS | ||
include_once(__DIR__ . '/actions.php'); | ||
// ACTIONS. | ||
include_once __DIR__ . '/actions.php'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
<?php | ||
|
||
/** | ||
* @file | ||
* Logger settings entry view. | ||
*/ | ||
?> | ||
|
||
<div> | ||
<div class="uk-panel uk-panel-space uk-panel-box uk-panel-card"> | ||
|
||
<img src="@url('assets:app/media/icons/email.svg')" width="50" height="50" alt="@lang('Email on Save')" /> | ||
|
||
<div class="uk-text-truncate uk-margin"> | ||
@lang('Email on Save') | ||
</div> | ||
<a class="uk-position-cover" href="@route('/settings/email-on-save')"></a> | ||
</div> | ||
</div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters