mirror of
https://github.com/Karaka-Management/oms-Profile.git
synced 2026-01-11 15:28:40 +00:00
fix templates
This commit is contained in:
parent
19d9fe5089
commit
af4ff6668f
|
|
@ -68,28 +68,18 @@ final class BackendController extends Controller
|
|||
public function viewProfileList(RequestAbstract $request, ResponseAbstract $response, array $data = []) : RenderableInterface
|
||||
{
|
||||
$view = new View($this->app->l11nManager, $request, $response);
|
||||
|
||||
$view->setTemplate('/Modules/Profile/Theme/Backend/profile-list');
|
||||
|
||||
if ($request->getData('ptype') === 'p') {
|
||||
$view->data['accounts'] = ProfileMapper::getAll()
|
||||
->with('account')
|
||||
->with('image')
|
||||
->where('id', $request->getDataInt('offset') ?? 0, '<')
|
||||
->limit(25)->execute();
|
||||
} elseif ($request->getData('ptype') === 'n') {
|
||||
$view->data['accounts'] = ProfileMapper::getAll()
|
||||
->with('account')
|
||||
->with('image')
|
||||
->where('id', $request->getDataInt('offset') ?? 0, '>')
|
||||
->limit(25)->execute();
|
||||
} else {
|
||||
$view->data['accounts'] = ProfileMapper::getAll()
|
||||
->with('account')
|
||||
->with('image')
|
||||
->where('id', 0, '>')
|
||||
->limit(25)->executeGetArray();
|
||||
}
|
||||
$view->data['accounts'] = ProfileMapper::getAll()
|
||||
->with('account')
|
||||
->with('image')
|
||||
->paginate(
|
||||
'id',
|
||||
$request->getData('ptype'),
|
||||
$request->getDataInt('offset')
|
||||
)
|
||||
->limit(25)
|
||||
->executeGetArray();
|
||||
|
||||
/** @var \Model\Setting $profileImage */
|
||||
$profileImage = $this->app->appSettings->get(names: SettingsEnum::DEFAULT_PROFILE_IMAGE, module: 'Profile');
|
||||
|
|
|
|||
|
|
@ -17,19 +17,19 @@ echo $this->data['nav']->render();
|
|||
|
||||
<div class="row">
|
||||
<div class="col-xs-12 col-md-6">
|
||||
<section class="box wf-100">
|
||||
<header><h1><?= $this->getHtml('CreateProfile'); ?></h1></header>
|
||||
|
||||
<div class="inner">
|
||||
<form id="fProfileCreate" method="PUT" action="<?= \phpOMS\Uri\UriFactory::build('{/api}profile?{?}&csrf={$CSRF}'); ?>">
|
||||
<table class="layout wf-100" style="table-layout: fixed">
|
||||
<tbody>
|
||||
<tr><td><label for="iAccount"><?= $this->getHtml('Account'); ?></label>
|
||||
<tr><td><?= $this->getData('accGrpSelector')->render('iAccount', ''); ?>
|
||||
<tr><td><input type="submit" value="<?= $this->getHtml('Create', '0', '0'); ?>" name="create-module">
|
||||
</table>
|
||||
</form>
|
||||
</div>
|
||||
<section class="portlet">
|
||||
<form id="fProfileCreate" method="PUT" action="<?= \phpOMS\Uri\UriFactory::build('{/api}profile?{?}&csrf={$CSRF}'); ?>">
|
||||
<div class="portlet-head"><?= $this->getHtml('CreateProfile'); ?></div>
|
||||
<div class="portlet-body">
|
||||
<div class="form-group">
|
||||
<label for="iAccount"><?= $this->getHtml('Account'); ?></label>
|
||||
<?= $this->getData('accGrpSelector')->render('iAccount', ''); ?>
|
||||
</div>
|
||||
</div>
|
||||
<div class="portlet-foot">
|
||||
<input type="submit" value="<?= $this->getHtml('Create', '0', '0'); ?>" name="create-module">
|
||||
</div>
|
||||
</form>
|
||||
</section>
|
||||
</div>
|
||||
</div>
|
||||
Loading…
Reference in New Issue
Block a user