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