From 56ef878dc2e8c190b0d7471d4b5f4ab2f8bc3340 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=D0=90=D0=BD=D0=B4=D1=80=D0=B5=D0=B9=20=D0=A0=D1=83=D0=B4?=
 =?UTF-8?q?=D0=B5=D0=BD=D0=B5=D1=86?= <andrey.rudenets@gmail.com>
Date: Mon, 15 Sep 2014 23:53:11 +0400
Subject: [PATCH] =?UTF-8?q?=D0=98=D0=BD=D1=82=D0=B5=D1=80=D1=84=D0=B5?=
 =?UTF-8?q?=D0=B9=D1=81=20=D0=BF=D1=80=D0=B5=D0=B4=D0=BC=D0=B5=D1=82=D0=B0?=
 =?UTF-8?q?=20=D0=B4=D0=BB=D1=8F=20=D1=81=D1=82=D1=83=D0=B4=D0=B5=D0=BD?=
 =?UTF-8?q?=D1=82=D0=B0?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

---
 .../application/views/student/subject.twig    | 30 ++++++-------
 ~dev_rating/media/css/student/subject.css     | 42 +++++++++++++++++--
 2 files changed, 53 insertions(+), 19 deletions(-)

diff --git a/~dev_rating/application/views/student/subject.twig b/~dev_rating/application/views/student/subject.twig
index 8eece73b7..5a2a69b31 100644
--- a/~dev_rating/application/views/student/subject.twig
+++ b/~dev_rating/application/views/student/subject.twig
@@ -74,22 +74,18 @@
                         </div>
                     {% endif %}
                 {% endfor %}
-            {% if loop.last %}
-                <div class="disciplineResult">
-                    Итого: {{ DisciplineMap.Rate }} / {{ DisciplineMap.MaxRate }}
-                </div>
-            {% endif %}
         {% endfor %}
-        {% if Discipline.Bonus is not empty %}
+        
+        {% if DisciplineMap.Bonus is not empty %}
             <div class="bonusBlock">
                 <div class="bonusTitle">Бонусные баллы</div>
-                <div class="bonusRate">{{ Discipline.Bonus.Rate }} / {{ Discipline.Bonus.MaxRate }}</div>
+                <div class="bonusRate">{{ DisciplineMap.Bonus.Rate }} / {{ DisciplineMap.Bonus.MaxRate }}</div>
                 <div class="bonusPercent">
-                    {{ (Discipline.Bonus.Rate  * 100) // Discipline.Bonus.MaxRate }} %
+                    {{ (DisciplineMap.Bonus.Rate  * 100) // DisciplineMap.Bonus.MaxRate }} %
                 </div>
                 <div class="bonusDate">
-                    {% if Discipline.Bonus.Date != 0 %}
-                        {{ Discipline.Bonus.Date|date('d.m.Y') }}
+                    {% if DisciplineMap.Bonus.Date != 0 %}
+                        {{ DisciplineMap.Bonus.Date|date('d.m.Y') }}
                     {% else %}
                         ---
                     {% endif %}
@@ -97,21 +93,25 @@
             </div>
         {% endif %}
             
-        {% if Discipline.Exam is not empty %}
+        {% if DisciplineMap.Exam is not empty %}
             <div class="examBlock">
                 <div class="examTitle">Экзамен по курсу &laquo;{{ Discipline.Title|default('---') }}&raquo;</div>
-                <div class="examRate">{{ Discipline.Exam.Rate }} / {{ Discipline.Exam.MaxRate }}</div>
+                <div class="examRate">{{ DisciplineMap.Exam.Rate }} / {{ DisciplineMap.Exam.MaxRate }}</div>
                 <div class="examPercent">
-                    {{ (Discipline.Exam.Rate  * 100) // Discipline.Exam.MaxRate }} %
+                    {{ (DisciplineMap.Exam.Rate  * 100) // DisciplineMap.Exam.MaxRate }} %
                 </div>
                 <div class="examDate">
-                    {% if Discipline.Exam.Date != 0 %}
-                        {{ Discipline.Exam.Date|date('d.m.Y') }}
+                    {% if DisciplineMap.Exam.Date != 0 %}
+                        {{ DisciplineMap.Exam.Date|date('d.m.Y') }}
                     {% else %}
                         ---
                     {% endif %}
                 </div>
             </div>
         {% endif %}
+        
+        <div class="disciplineResult">
+            Итого: {{ DisciplineMap.Rate }} / {{ DisciplineMap.MaxRate }}
+        </div>
     </div>
 {% endblock %}
\ No newline at end of file
diff --git a/~dev_rating/media/css/student/subject.css b/~dev_rating/media/css/student/subject.css
index 329aca191..f9093773f 100644
--- a/~dev_rating/media/css/student/subject.css
+++ b/~dev_rating/media/css/student/subject.css
@@ -53,9 +53,16 @@
 {
     margin-top: 10px;
     padding: 5px;
-    background: #edeaff;
-    border-top: 1px solid #ccc;
-    border-bottom: 1px solid #ccc;
+    background: #fff;
+    border: 3px solid #ffb100;
+}
+
+.bonusBlock
+{
+    margin-top: 10px;
+    padding: 5px;
+    background: #fff;
+    border: 3px solid #3399cc;
 }
 
 .disciplineResult
@@ -120,7 +127,6 @@
 .examBlock .examTitle
 {
     width: 65%;
-    color: #000;
 }
 
 .examBlock .examRate
@@ -134,6 +140,34 @@
     text-align: center;
 }
 .examBlock .examDate
+{
+    width: 18%;
+    text-align: center;
+}
+
+
+.bonusBlock > div
+{
+    display: inline-block;
+    vertical-align: middle;
+}
+
+.bonusBlock .examTitle
+{
+    width: 65%;
+}
+
+.bonusBlock .examRate
+{
+    width: 10%;
+    text-align: center;
+}
+.bonusBlock .examPercent
+{
+    width: 5%;
+    text-align: center;
+}
+.bonusBlock .examDate
 {
     width: 18%;
     text-align: center;
-- 
GitLab