mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-06-07 18:44:08 +00:00
sf4, adding workflow and fix errors for task bundle
This commit is contained in:
parent
f7b5e37079
commit
5292f319be
@ -75,7 +75,9 @@ class SingleTaskController extends Controller
|
||||
;
|
||||
|
||||
if ($request->query->has('person_id')) {
|
||||
$personId = $request->query->getInt('person_id', null);
|
||||
|
||||
$personId = $request->query->getInt('person_id', 0); // sf4 check:
|
||||
// prevent error: `Argument 2 passed to ::getInt() must be of the type int, null given`
|
||||
|
||||
if ($personId === null) {
|
||||
return new Response("You must provide a person_id", Response::HTTP_BAD_REQUEST);
|
||||
@ -454,7 +456,9 @@ class SingleTaskController extends Controller
|
||||
if ($request->query->get('user_id') === '_unassigned') {
|
||||
$params['unassigned'] = true;
|
||||
} else {
|
||||
$userId = $request->query->getInt('user_id', null);
|
||||
$userId = $request->query->getInt('user_id', 0); // sf4 check:
|
||||
// prevent error: `Argument 2 passed to ::getInt() must be of the type int, null given`
|
||||
|
||||
$user = $this->getDoctrine()->getManager()
|
||||
->getRepository('ChillMainBundle:User')
|
||||
->find($userId);
|
||||
@ -470,7 +474,9 @@ class SingleTaskController extends Controller
|
||||
|
||||
if (!empty($request->query->get('scope_id'))) {
|
||||
|
||||
$scopeId = $request->query->getInt('scope_id', null);
|
||||
$scopeId = $request->query->getInt('scope_id', 0); // sf4 check:
|
||||
// prevent error: `Argument 2 passed to ::getInt() must be of the type int, null given`
|
||||
|
||||
$scope = $this->getDoctrine()->getManager()
|
||||
->getRepository('ChillMainBundle:Scope')
|
||||
->find($scopeId);
|
||||
|
@ -17,8 +17,8 @@ class Configuration implements ConfigurationInterface
|
||||
*/
|
||||
public function getConfigTreeBuilder()
|
||||
{
|
||||
$treeBuilder = new TreeBuilder();
|
||||
$rootNode = $treeBuilder->root('chill_task');
|
||||
$treeBuilder = new TreeBuilder('chill_task');
|
||||
$rootNode = $treeBuilder->getRootNode('chill_task');
|
||||
|
||||
// Here you should define the parameters that are allowed to
|
||||
// configure your bundle. See the documentation linked above for
|
||||
|
@ -15,7 +15,6 @@ Scope: Cercle
|
||||
Task: Tâche
|
||||
Details: Détails
|
||||
Person: Personne
|
||||
Scope: Cercle
|
||||
Date: Date
|
||||
Dates: Dates
|
||||
User: Utilisateur
|
||||
@ -74,10 +73,10 @@ cancel: annuler
|
||||
Start_verb: Démarrer
|
||||
Close_verb: Clotûrer
|
||||
Set this task to cancel state: Marquer cette tâche comme annulée
|
||||
'%user% has closed the task': %user% a fermé la tâche
|
||||
'%user% has canceled the task': %user% a annulé la tâche
|
||||
'%user% has started the task': %user% a commencé la tâche
|
||||
'%user% has created the task': %user% a introduit la tâche
|
||||
'%user% has closed the task': '%user% a fermé la tâche'
|
||||
'%user% has canceled the task': '%user% a annulé la tâche'
|
||||
'%user% has started the task': '%user% a commencé la tâche'
|
||||
'%user% has created the task': '%user% a introduit la tâche'
|
||||
Are you sure you want to close this task ?: Êtes-vous sûrs de vouloir clotûrer cette tâche ?
|
||||
Are you sure you want to cancel this task ?: Êtes-vous sûrs de vouloir annuler cette tâche ?
|
||||
Are you sure you want to start this task ?: Êtes-vous sûrs de vouloir démarrer cette tâche ?
|
||||
|
@ -31,7 +31,8 @@
|
||||
|
||||
|
||||
{# filter tasks #}
|
||||
|
||||
{% block filtertasks %}{#
|
||||
sf4 check: prevent error message: `A block definition cannot be nested under non-capturing nodes.` #}
|
||||
{% if person is not null %}
|
||||
{% block personcontent %}
|
||||
{% include 'ChillTaskBundle:SingleTask:_list.html.twig' %}
|
||||
@ -43,3 +44,4 @@
|
||||
</div>
|
||||
{% endblock %}
|
||||
{% endif %}
|
||||
{% endblock %}
|
||||
|
Loading…
x
Reference in New Issue
Block a user