From 4556393a5323efe9fdc76a9d21bcb53e60bd465b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=90=D0=BD=D1=82=D0=BE=D0=BD=20=D0=A8=D0=B0=D0=BB=D0=B8?= =?UTF-8?q?=D0=BC=D0=BE=D0=B2?= <solidovic@gmail.com> Date: Sun, 19 Oct 2014 16:09:53 +0400 Subject: [PATCH] ... --- .../views/teacher/discipline/EditStudents.twig | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/~dev_rating/application/views/teacher/discipline/EditStudents.twig b/~dev_rating/application/views/teacher/discipline/EditStudents.twig index a82a80234..1b453b0b3 100644 --- a/~dev_rating/application/views/teacher/discipline/EditStudents.twig +++ b/~dev_rating/application/views/teacher/discipline/EditStudents.twig @@ -6,7 +6,7 @@ {{ HTML.script('media/js/discipline/EditStudents.js')|raw }} {% endblock %} -{% macro outputStudent(Student, HTML) %} +{% macro outputStudent(Student) %} <div id="{{ Student.ID }}" class="Student {% if Student.Type == 'detach' %}StatusUnbind{% else %}StatusBind{% endif %}"> <span class="Name">{{ Student.LastName }} {{ Student.FirstName }} {{ Student.SecondName }}</span> {% if Student.Type == 'detach' %} @@ -17,7 +17,10 @@ </div> {% endmacro %} -{% macro outputGroups(Groups, HTML) %} +{% macro outputGroups(Groups) %} + + {% import _self as me %} + {% for group in Groups %} <div> <div class="GradeAndGroupTitle ActionShowHideGroupContainer" id="{{ group.GroupID }}"> @@ -28,8 +31,9 @@ <div class="GroupContainer"> <div class="hideListAction"></div> {% for student in group.students %} -{# {{ idx.outputStudent(student, HTML) }} #} + {{ me.outputStudent(student) }} + {# <div id="{{ student.ID }}" class="Student {% if student.Type == 'detach' %}StatusUnbind{% else %}StatusBind{% endif %}"> <span class="Name">{{ student.LastName }} {{ student.FirstName }} {{ student.SecondName }}</span> {% if student.Type == 'detach' %} @@ -38,6 +42,7 @@ <button class="action Action_UnbindStudent">Отсоединить студента</button> {% endif %} </div> + #} {% endfor %} </div> </div> @@ -83,12 +88,12 @@ <input type="hidden" class="HiddenInputFacultyID" value="{{ Discipline.FacultyID }}"> <div class="GeneralStudentsList"> <h2 class="BlueTitle">Прикрепленные студенты</h2> - {{ idx.outputGroups(Students, HTML) }} + {{ idx.outputGroups(Students) }} </div> <br> <div class="AttachedStudentsList"> <h2 class="BlueTitle">Еще студенты</h2> - {{ idx.outputGroups(AttachStudents, HTML) }} + {{ idx.outputGroups(AttachStudents) }} </div> -- GitLab