mirror of
https://github.com/Karaka-Management/oms-OnlineResourceWatcher.git
synced 2026-02-04 18:48:40 +00:00
started with template fixes
This commit is contained in:
parent
7fce97bb19
commit
e9e4f5c0fb
|
|
@ -22,6 +22,7 @@ return [
|
|||
[
|
||||
'dest' => '\Modules\OnlineResourceWatcher\Controller\ApiController:apiResourceCreate',
|
||||
'verb' => RouteVerb::PUT,
|
||||
'csrf' => true,
|
||||
'permission' => [
|
||||
'module' => ApiController::NAME,
|
||||
'type' => PermissionType::CREATE,
|
||||
|
|
@ -31,6 +32,7 @@ return [
|
|||
[
|
||||
'dest' => '\Modules\OnlineResourceWatcher\Controller\ApiController:apiResourceUpdate',
|
||||
'verb' => RouteVerb::SET,
|
||||
'csrf' => true,
|
||||
'permission' => [
|
||||
'module' => ApiController::NAME,
|
||||
'type' => PermissionType::MODIFY,
|
||||
|
|
@ -40,6 +42,7 @@ return [
|
|||
[
|
||||
'dest' => '\Modules\OnlineResourceWatcher\Controller\ApiController:apiResourceGet',
|
||||
'verb' => RouteVerb::GET,
|
||||
'csrf' => true,
|
||||
'permission' => [
|
||||
'module' => ApiController::NAME,
|
||||
'type' => PermissionType::READ,
|
||||
|
|
@ -49,6 +52,7 @@ return [
|
|||
[
|
||||
'dest' => '\Modules\OnlineResourceWatcher\Controller\ApiController:apiResourceDelete',
|
||||
'verb' => RouteVerb::DELETE,
|
||||
'csrf' => true,
|
||||
'permission' => [
|
||||
'module' => ApiController::NAME,
|
||||
'type' => PermissionType::DELETE,
|
||||
|
|
@ -61,6 +65,7 @@ return [
|
|||
[
|
||||
'dest' => '\Modules\OnlineResourceWatcher\Controller\ApiController:apiInformCreate',
|
||||
'verb' => RouteVerb::PUT,
|
||||
'csrf' => true,
|
||||
'permission' => [
|
||||
'module' => ApiController::NAME,
|
||||
'type' => PermissionType::READ,
|
||||
|
|
@ -70,6 +75,7 @@ return [
|
|||
[
|
||||
'dest' => '\Modules\OnlineResourceWatcher\Controller\ApiController:apiInformDelete',
|
||||
'verb' => RouteVerb::DELETE,
|
||||
'csrf' => true,
|
||||
'permission' => [
|
||||
'module' => ApiController::NAME,
|
||||
'type' => PermissionType::READ,
|
||||
|
|
@ -82,6 +88,7 @@ return [
|
|||
[
|
||||
'dest' => '\Modules\OnlineResourceWatcher\Controller\ApiController:apiResourceRender',
|
||||
'verb' => RouteVerb::GET,
|
||||
'csrf' => true,
|
||||
'permission' => [
|
||||
'module' => ApiController::NAME,
|
||||
'type' => PermissionType::READ,
|
||||
|
|
|
|||
|
|
@ -158,7 +158,10 @@ final class BackendController extends Controller
|
|||
*/
|
||||
public function viewResourceCreate(RequestAbstract $request, ResponseAbstract $response, array $data = []) : RenderableInterface
|
||||
{
|
||||
return new View($this->app->l11nManager, $request, $response);
|
||||
$view = new View($this->app->l11nManager, $request, $response);
|
||||
$view->setTemplate('/Modules/OnlineResourceWatcher/Theme/Backend/resource-create');
|
||||
|
||||
return $view;
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -93,4 +93,6 @@ return ['OnlineResourceWatcher' => [
|
|||
'rstatus-1' => 'Quelle hinzugefügt',
|
||||
'rstatus-2' => 'Keine Änderung',
|
||||
'rstatus-3' => 'Änderung',
|
||||
':status-1' => 'Aktiv',
|
||||
':status-2' => 'Inaktiv',
|
||||
]];
|
||||
|
|
|
|||
|
|
@ -93,4 +93,6 @@ return ['OnlineResourceWatcher' => [
|
|||
'rstatus-1' => 'Resource added',
|
||||
'rstatus-2' => 'No change',
|
||||
'rstatus-3' => 'Changed',
|
||||
':status-1' => 'Active',
|
||||
':status-2' => 'Inactive',
|
||||
]];
|
||||
|
|
|
|||
|
|
@ -18,23 +18,25 @@ use phpOMS\Uri\UriFactory;
|
|||
<div class="row">
|
||||
<div class="col-xs-12 col-md-6">
|
||||
<div class="portlet">
|
||||
<form id="iUserSettings" action="<?= UriFactory::build('{/api}user/settings'); ?>" method="post">
|
||||
<div class="portlet-head"><?= $this->getHtml('CreateResource', '0', '0'); ?></div>
|
||||
<form id="iResource" action="<?= UriFactory::build('{/api}orw/resource?csrf={$CSRF}'); ?>" method="put">
|
||||
<div class="portlet-head"><?= $this->getHtml('CreateResource', 'OnlineResourceWatcher', 'Backend'); ?></div>
|
||||
<div class="portlet-body">
|
||||
<div class="form-group">
|
||||
<label for="iLogin"><?= $this->getHtml('Url', '0', '0'); ?></label>
|
||||
<input id="iLogin" name="rul" type="text" required>
|
||||
<div class="form-group">
|
||||
<label for="iName"><?= $this->getHtml('Name'); ?></label>
|
||||
<input id="iName" name="name" type="text">
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label for="iElement"><?= $this->getHtml('Element', '0', '0'); ?></label>
|
||||
<input id="iElement" name="element" type="text">
|
||||
<label for="iUrl"><?= $this->getHtml('Url'); ?></label>
|
||||
<input id="iUrl" name="uri" type="text" required>
|
||||
</div>
|
||||
|
||||
<!--
|
||||
<div class="form-group">
|
||||
<label for="iHeader"><?= $this->getHtml('Header', '0', '0'); ?></label>
|
||||
<textarea id="iHeader" name="header"></textarea>
|
||||
<label for="iXPath"><?= $this->getHtml('XPath'); ?></label>
|
||||
<input id="iXPath" name="xpath" type="text">
|
||||
</div>
|
||||
-->
|
||||
</div>
|
||||
<div class="portlet-foot">
|
||||
<input id="iSubmitUser" name="submitUser" type="submit" value="<?= $this->getHtml('Create', '0', '0'); ?>">
|
||||
|
|
@ -42,52 +44,4 @@ use phpOMS\Uri\UriFactory;
|
|||
</form>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-xs-12 col-md-6">
|
||||
<div class="portlet">
|
||||
<form id="iAddAccountToGroup" action="<?= UriFactory::build('{/api}admin/group/account'); ?>" method="put">
|
||||
<div class="portlet-head"><?= $this->getHtml('Inform', '0', '0'); ?></div>
|
||||
<div class="portlet-body">
|
||||
<div class="form-group">
|
||||
<label for="iAccount"><?= $this->getHtml('Name', '0', '0'); ?></label>
|
||||
<input id="iAccount" name="account" type="text">
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label for="iAccount"><?= $this->getHtml('Email', '0', '0'); ?></label>
|
||||
<input id="iAccount" name="email" type="email">
|
||||
</div>
|
||||
</div>
|
||||
<div class="portlet-foot">
|
||||
<input type="submit" value="<?= $this->getHtml('Add', '0', '0'); ?>">
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-xs-12">
|
||||
<div class="portlet">
|
||||
<div class="portlet-head"><?= $this->getHtml('Inform', '0', '0'); ?></div>
|
||||
<table class="default sticky">
|
||||
<thead>
|
||||
<tr>
|
||||
<td><?= $this->getHtml('ID', '0', '0'); ?><i class="sort-asc g-icon">expand_less</i><i class="sort-desc g-icon">expand_more</i>
|
||||
<td><?= $this->getHtml('User', '0', '0'); ?><i class="sort-asc g-icon">expand_less</i><i class="sort-desc g-icon">expand_more</i>
|
||||
<td><?= $this->getHtml('Email', '0', '0'); ?><i class="sort-asc g-icon">expand_less</i><i class="sort-desc g-icon">expand_more</i>
|
||||
<tbody>
|
||||
<?php $c = 0; foreach ([] as $key => $value) : ++$c; $url = UriFactory::build('{/base}/admin/account/settings?{?}&id=' . $value->id); ?>
|
||||
<tr data-href="<?= $url; ?>">
|
||||
<td>
|
||||
<td>
|
||||
<td>
|
||||
<?php endforeach; ?>
|
||||
<?php if ($c === 0) : ?>
|
||||
<tr><td colspan="3" class="empty"><?= $this->getHtml('Empty', '0', '0'); ?>
|
||||
<?php endif; ?>
|
||||
</table>
|
||||
<div class="portlet-foot"></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
|
@ -44,7 +44,7 @@ $next = $tableView->getNextLink(
|
|||
<?= $tableView->renderTitle(
|
||||
$this->getHtml('Resources')
|
||||
); ?>
|
||||
<a class="button end-xs save" href="<?= UriFactory::build('{/base}/'); ?>orw/resources/create"><?= $this->getHtml('New', '0', '0'); ?></a>
|
||||
<a class="button end-xs save" href="<?= UriFactory::build('{/base}/'); ?>orw/resource/create"><?= $this->getHtml('New', '0', '0'); ?></a>
|
||||
</div>
|
||||
<div class="slider">
|
||||
<table id="<?= $tableView->id; ?>" class="default sticky">
|
||||
|
|
@ -91,6 +91,7 @@ $next = $tableView->getNextLink(
|
|||
<?php endif; ?>
|
||||
</table>
|
||||
</div>
|
||||
<!--
|
||||
<?php if ($this->getData('hasPrevious') || $this->getData('hasNext')) : ?>
|
||||
<div class="portlet-foot">
|
||||
<?php if ($this->getData('hasPrevious')) : ?>
|
||||
|
|
@ -101,6 +102,7 @@ $next = $tableView->getNextLink(
|
|||
<?php endif; ?>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
-->
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -21,7 +21,7 @@ $reports = $resource->reports;
|
|||
<div class="row">
|
||||
<div class="col-xs-12 col-sm-8">
|
||||
<div class="portlet">
|
||||
<form id="iResource" action="<?= UriFactory::build('{/api}resource'); ?>" method="post">
|
||||
<form id="iResource" action="<?= UriFactory::build('{/api}orw/resource?csrf={$CSRF}'); ?>" method="post">
|
||||
<div class="portlet-head"><?= $this->getHtml('Resource'); ?></div>
|
||||
<div class="portlet-body">
|
||||
<div class="form-group">
|
||||
|
|
@ -32,8 +32,8 @@ $reports = $resource->reports;
|
|||
<div class="form-group">
|
||||
<label for="iStatus"><?= $this->getHtml('Status'); ?></label>
|
||||
<select id="iStatus" name="status">
|
||||
<option value="1"<?= $resource->status === 1 ? ' selected' : ''; ?>>Active</option>
|
||||
<option value="2"<?= $resource->status === 2 ? ' selected' : ''; ?>>Inactive</option>
|
||||
<option value="1"<?= $resource->status === 1 ? ' selected' : ''; ?>><?= $this->getHtml(':status-1'); ?></option>
|
||||
<option value="2"<?= $resource->status === 2 ? ' selected' : ''; ?>><?= $this->getHtml(':status-2'); ?></option>
|
||||
</select>
|
||||
</div>
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user