mirror of
https://github.com/Karaka-Management/oms-Profile.git
synced 2026-02-04 10:18:41 +00:00
fix pagination and some media bugs
This commit is contained in:
parent
74ff0b6d46
commit
507c97f8f6
|
|
@ -151,7 +151,7 @@ final class ApiController extends Controller
|
|||
$request->getData('name') ?? '',
|
||||
$uploadedFiles,
|
||||
$request->getHeader()->getAccount(),
|
||||
__DIR__ . '/../../../Modules/Media/Files',
|
||||
'Modules/Media/Files',
|
||||
'/Accounts/' . $request->getHeader()->getAccount()
|
||||
);
|
||||
|
||||
|
|
|
|||
|
|
@ -75,9 +75,9 @@ final class BackendController extends Controller
|
|||
|
||||
$view->setTemplate('/Modules/Profile/Theme/Backend/profile-list');
|
||||
|
||||
if ($request->getData('ptype') === '-') {
|
||||
if ($request->getData('ptype') === 'p') {
|
||||
$view->setData('accounts', ProfileMapper::getBeforePivot((int) ($request->getData('id') ?? 0), null, 25));
|
||||
} elseif ($request->getData('ptype') === '+') {
|
||||
} elseif ($request->getData('ptype') === 'n') {
|
||||
$view->setData('accounts', ProfileMapper::getAfterPivot((int) ($request->getData('id') ?? 0), null, 25));
|
||||
} else {
|
||||
$view->setData('accounts', ProfileMapper::getAfterPivot(0, null, 25));
|
||||
|
|
|
|||
|
|
@ -11,7 +11,7 @@
|
|||
</ul>
|
||||
</div>
|
||||
<div class="tab-content">
|
||||
<input type="radio" id="c-tab-1" name="tabular-2" checked>
|
||||
<input type="radio" id="c-tab-1" name="tabular-2"<?= $this->request->getUri()->getFragment() === 'c-tab-1' ? ' checked' : '' ?>>
|
||||
<div class="tab">
|
||||
<label for="iSearchAcc">Search</label>
|
||||
<input type="text" id="iSearchAcc" name="receiver-search" data-action='[
|
||||
|
|
@ -54,7 +54,7 @@
|
|||
}
|
||||
]'><?= $this->getHtml('Close', 'Admin') ?></button>
|
||||
</div>
|
||||
<input type="radio" id="c-tab-2" name="tabular-2">
|
||||
<input type="radio" id="c-tab-2" name="tabular-2"<?= $this->request->getUri()->getFragment() === 'c-tab-2' ? ' checked' : '' ?>>
|
||||
<div class="tab">
|
||||
<label for="iSearchGrp">Search</label>
|
||||
<input type="text" id="iSearchGrp" name="receiver-search" data-action='[
|
||||
|
|
|
|||
|
|
@ -21,8 +21,8 @@ use phpOMS\Uri\UriFactory;
|
|||
*/
|
||||
$accounts = $this->getData('accounts') ?? [];
|
||||
|
||||
$previous = empty($accounts) ? '{/prefix}profile/list' : '{/prefix}profile/list?{?}&id=' . \reset($accounts)->getId() . '&ptype=-';
|
||||
$next = empty($accounts) ? '{/prefix}profile/list' : '{/prefix}profile/list?{?}&id=' . \end($accounts)->getId() . '&ptype=+';
|
||||
$previous = empty($accounts) ? '{/prefix}profile/list' : '{/prefix}profile/list?{?}&id=' . \reset($accounts)->getId() . '&ptype=p';
|
||||
$next = empty($accounts) ? '{/prefix}profile/list' : '{/prefix}profile/list?{?}&id=' . \end($accounts)->getId() . '&ptype=n';
|
||||
?>
|
||||
<div class="row">
|
||||
<div class="col-xs-12">
|
||||
|
|
|
|||
|
|
@ -50,7 +50,7 @@ echo $this->getData('nav')->render();
|
|||
</ul>
|
||||
</div>
|
||||
<div class="tab-content">
|
||||
<input type="radio" id="c-tab-1" name="tabular-2" checked>
|
||||
<input type="radio" id="c-tab-1" name="tabular-2"<?= $this->request->getUri()->getFragment() === 'c-tab-1' ? ' checked' : '' ?>>
|
||||
<div class="tab">
|
||||
<div class="row">
|
||||
<div class="col-xs-12 col-md-6">
|
||||
|
|
@ -166,7 +166,7 @@ echo $this->getData('nav')->render();
|
|||
</div>
|
||||
</div>
|
||||
<?php if ($this->request->getHeader()->getAccount() === $account->getId()) : ?>
|
||||
<input type="radio" id="c-tab-2" name="tabular-2">
|
||||
<input type="radio" id="c-tab-2" name="tabular-2"<?= $this->request->getUri()->getFragment() === 'c-tab-2' ? ' checked' : '' ?>>
|
||||
<div class="tab">
|
||||
<div class="row">
|
||||
<div class="col-xs-12 col-md-4">
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user