-
Notifications
You must be signed in to change notification settings - Fork 7
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
794b83d
commit a5b176a
Showing
15 changed files
with
340 additions
and
7 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
<?php | ||
|
||
namespace ShopBundle\Controller\Admin; | ||
|
||
use Laminas\View\Model\ViewModel; | ||
|
||
class BanController extends \CommonBundle\Component\Controller\ActionController\AdminController | ||
{ | ||
public function manageAction() | ||
{ | ||
$paginator = $this->paginator()->createFromQuery( | ||
$this->getEntityManager() | ||
->getRepository('ShopBundle\Entity\Reservation\Ban') | ||
->findActiveQuery(), | ||
$this->getParam('page') | ||
); | ||
|
||
return new ViewModel( | ||
array( | ||
'paginator' => $paginator, | ||
'paginationControl' => $this->paginator()->createControl(true), | ||
) | ||
); | ||
} | ||
|
||
public function oldAction() | ||
{ | ||
$paginator = $this->paginator()->createFromQuery( | ||
$this->getEntityManager() | ||
->getRepository('ShopBundle\Entity\Reservation\Ban') | ||
->findOldQuery(), | ||
$this->getParam('page') | ||
); | ||
|
||
return new ViewModel( | ||
array( | ||
'paginator' => $paginator, | ||
'paginationControl' => $this->paginator()->createControl(true), | ||
) | ||
); | ||
} | ||
} |
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
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
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,32 @@ | ||
{% extends 'admin/base.twig' %} | ||
|
||
{% block content %} | ||
{% include 'shop/admin/reservation-permission/partials/navigation.twig' %} | ||
|
||
{% include 'admin/partials/flashMessenger.twig' %} | ||
|
||
<div id="controller_action"> | ||
{% import 'admin/partials/form.twig' as forms %} | ||
{{ forms.renderForm(form) }} | ||
</div> | ||
{% endblock %} | ||
|
||
{% block content_script %} | ||
<script type="text/javascript"> | ||
$(document).ready(function () { | ||
$('#person').typeaheadRemote( | ||
{ | ||
source: '{{ url('common_admin_academic_typeahead', {})}}', | ||
items: 20, | ||
} | ||
).change(function (e) { | ||
if ($(this).data('value')) { | ||
$('[name="person[id]"]').val($(this).data('value').id); | ||
} else { | ||
$('[name="person[id]"]').val(''); | ||
} | ||
}); | ||
$('.item .delete').click(openModal); | ||
}); | ||
</script> | ||
{% endblock %} |
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,3 @@ | ||
{% autoescape false %} | ||
{{ result|json_encode }} | ||
{% endautoescape %} |
Oops, something went wrong.