Julio Montoya vor 11 Jahren
Ursprung
Commit
b3ac164c32

+ 5 - 1
main/template/minedu/admin/administrator/branches/read.tpl

@@ -21,10 +21,14 @@
         {% endfor %}
     {% endif %}
     <hr />
+
+    <h4>{{ 'SubBranches' | trans }}</h4>
     <ul>
     {% for subitem in subitems %}
         <li>
-            <a href="{{ url(links.read_link, { id: subitem.id} ) }}">{{ subitem.branchName }}</a>
+            <a href="{{ url(links.read_link, { id: subitem.id} ) }}">
+                {{ subitem.branchName }}
+            </a>
         </li>
     {% endfor %}
     </ul>

+ 2 - 1
main/template/minedu/admin/director/branches/add_user.tpl

@@ -5,7 +5,8 @@
             <i class="icon-circle-arrow-left icon-2x"></i>
         </a>
     </div>
-    <h2>{{ 'AddUsers' | trans }}</h2>
+    <h2>{{ 'Jury' | trans }} {{ jury.name }}</h2>
+    <h3>{{ 'AddUsers' | trans }}</h3>
     <form action="{{ url('branch_director.controller:addUsersAction', {'juryId' : juryId, 'branchId':branchId}) }}" method = "post" {{ form_enctype(form) }}>
     {{ form_widget(form) }}
     </form>

+ 3 - 0
src/ChamiloLMS/Controller/Admin/Administrator/BranchController.php

@@ -151,8 +151,11 @@ class BranchController extends CommonController
     {
         $template = $this->get('template');
         $template->assign('links', $this->generateLinks());
+
+        /** @var \Entity\Repository\BranchSyncRepository $repo */
         $repo = $this->getRepository();
         $item = $this->getEntity($id);
+
         $children = $repo->children($item);
         $template->assign('item', $item);
         $template->assign('subitems', $children);

+ 3 - 4
src/ChamiloLMS/Controller/Admin/Director/BranchDirectorController.php

@@ -134,15 +134,15 @@ class BranchDirectorController extends CommonController
         $request = $this->getRequest();
 
         $type = new DirectorJuryUserType();
-
         $user = new Entity\User();
         $form = $this->createForm($type, $user);
 
+        $jury = $this->getManager()->getRepository('Entity\Jury')->find($juryId);
+
         $form->handleRequest($request);
 
         if ($form->isValid()) {
 
-            $jury = $this->getManager()->getRepository('Entity\Jury')->find($juryId);
             $urlId = api_get_current_access_url_id();
             $portal = $this->getManager()->getRepository('Entity\AccessUrl')->find($urlId);
 
@@ -182,6 +182,7 @@ class BranchDirectorController extends CommonController
             return $this->redirect($url);
         }
 
+        $template->assign('jury', $jury);
         $template->assign('form', $form->createView());
         $template->assign('juryId', $juryId);
         $template->assign('branchId', $branchId);
@@ -201,10 +202,8 @@ class BranchDirectorController extends CommonController
             'juryId' => $juryId
         );
         $users = $this->getManager()->getRepository('Entity\JuryMembers')->findBy($criteria);
-
         $jury = $this->getManager()->getRepository('Entity\Jury')->find($juryId);
 
-
         $template->assign('users', $users);
         $template->assign('jury', $jury);
         $response = $template->render_template($this->getTemplatePath().'list_users.tpl');