From 1578cd2d1eece427816b8b43ac5e8b7052020096 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: Tue, 30 Dec 2014 00:31:31 +0300
Subject: [PATCH] =?UTF-8?q?1.=20=D0=A6=D0=B2=D0=B5=D1=82=D0=B0=20=D0=BA?=
 =?UTF-8?q?=D1=80=D1=83=D0=B6=D0=BE=D1=87=D0=BA=D0=BE=D0=B2=202.=20=D0=A1?=
 =?UTF-8?q?=D1=81=D1=8B=D0=BB=D0=BA=D0=B0=20=D0=B2=20Base?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

---
 .../classes/Controller/Student/Index.php      |  3 +-
 ~dev_rating/application/views/base.twig       |  9 ++-
 .../application/views/student/index.twig      | 64 +++++++++----------
 ~dev_rating/media/css/student/index.css       | 14 ++--
 4 files changed, 46 insertions(+), 44 deletions(-)

diff --git a/~dev_rating/application/classes/Controller/Student/Index.php b/~dev_rating/application/classes/Controller/Student/Index.php
index c3ba87ecf..aa7fb553d 100644
--- a/~dev_rating/application/classes/Controller/Student/Index.php
+++ b/~dev_rating/application/classes/Controller/Student/Index.php
@@ -13,7 +13,6 @@ class Controller_Student_Index extends Controller_UserEnvi {
         foreach($disciplines as $row)
         {
             $i++;
-            $color = 0;
             $disciplinesHandled[$i]['ID'] = $row['ID'];
             if($row['ExamType'] == 'exam')
             {
@@ -73,7 +72,7 @@ class Controller_Student_Index extends Controller_UserEnvi {
                 $color = 5;
             elseif($percent >= 0.85 AND $percent <= 0.94)
                 $color = 6;
-            elseif($percent >= 0.95 AND $percent <= 1)
+            elseif($percent >= 0.95)
                 $color = 7;
             if($examRate !== NULL AND $examRate < 22)
                 $color = 2;
diff --git a/~dev_rating/application/views/base.twig b/~dev_rating/application/views/base.twig
index 227a5571e..7226faaaf 100644
--- a/~dev_rating/application/views/base.twig
+++ b/~dev_rating/application/views/base.twig
@@ -70,9 +70,12 @@
                                     {{ User.First }} {{ User.Last }}
 					</div>
 					| 
-                                {% if User.RoleMark == 4 %}
-                                {{ HTML.anchor('admin', 'Администрирование', {'title': 'Перейти в панель управления системой'})|raw }}
-                                {% endif %}
+					{% if User.RoleMark == 16 %}
+					{{ HTML.anchor('dean_office', 'Деканат')|raw }}
+					{% endif %}
+					{% if User.RoleMark == 4 %}
+						{{ HTML.anchor('admin', 'Администрирование', {'title': 'Перейти в панель управления системой'})|raw }}
+					{% endif %}
 				{{ HTML.anchor('/', 'Главная страница', {'title': 'Перейти на главную страницу'})|raw }}
 				{{ HTML.anchor('settings', 'Настройки', {'title': 'Настроить аккаунт'})|raw }}
 				{{ HTML.anchor('sign/out', 'Выход', {'title': 'Выйти из системы'})|raw }}
diff --git a/~dev_rating/application/views/student/index.twig b/~dev_rating/application/views/student/index.twig
index c06909673..90d0fc25f 100644
--- a/~dev_rating/application/views/student/index.twig
+++ b/~dev_rating/application/views/student/index.twig
@@ -1,42 +1,42 @@
 {% extends 'base' %} 
  
 {% macro subject(i, HTML) %}
-	<tr class="course_content">
-                <td class="{{ i.ColorScheme }}">
-                    <div class='Circle'></div>
-                </td>
-		<td class = "course_name">
-                    {{ HTML.anchor('subject/' ~ i.ID, i.Title)|raw }}
-		</td>
+<tr class="course_content">
+    <td class="{{ i.ColorScheme }}">
+        <div class='Circle'></div>
+    </td>
+    <td class = "course_name">
+        {{ HTML.anchor('subject/' ~ i.ID, i.Title)|raw }}
+    </td>
 
-		<td class="course_teacher">
-                    {% for teacher in i.Teachers %}
-                        <div>{{ teacher }}</div>
-                    {% else %}
-                        ---
-                    {% endfor %}
-		</td>
+    <td class="course_teacher">
+        {% for teacher in i.Teachers %}
+            <div>{{ teacher }}</div>
+        {% else %}
+            ---
+        {% endfor %}
+    </td>
 
-		<td  class="course_form_control">
-                    {{ i.Control }}
-		</td>	
+    <td  class="course_form_control">
+        {{ i.Control }}
+    </td>
 
-		<td class="course_rating_value">
-                    {{ i.Rate|default('0') }} / {{ i.MaxCurrentRate|default('0') }} / {{ i.MaxRate }}
-		</td>
+    <td class="course_rating_value">
+        {{ i.Rate|default('0') }} / {{ i.MaxCurrentRate|default('0') }} / {{ i.MaxRate }}
+    </td>
 
-		<td class="course_rating_percent">
-                    {% if i.MaxCurrentRate != 0 %}
-						{% if i.Rate > i.MaxCurrentRate %}
-							100%
-						{% else %}
-							{{ (100 * i.Rate) // i.MaxCurrentRate }} %
-						{% endif %}
-                    {% else %}
-                        ---
-                    {% endif %}
-		</td>
-	</tr>	
+    <td class="course_rating_percent">
+        {% if i.MaxCurrentRate != 0 %}
+            {% if i.Rate > i.MaxCurrentRate %}
+                100%
+            {% else %}
+                {{ (100 * i.Rate) // i.MaxCurrentRate }} %
+            {% endif %}
+        {% else %}
+            ---
+        {% endif %}
+    </td>
+</tr>
 {% endmacro %}
 {% import 'student/index' as res %}
 
diff --git a/~dev_rating/media/css/student/index.css b/~dev_rating/media/css/student/index.css
index cb1ef170e..100072dad 100644
--- a/~dev_rating/media/css/student/index.css
+++ b/~dev_rating/media/css/student/index.css
@@ -96,27 +96,27 @@ tr.course_content td {
 }
 
 .ECTS-F > .Circle { 
-    background: #f60;
+    background: #8A2E15;
 }
 
 .ECTS-FX > .Circle { 
-    background: #e56800;
+    background: #D46141;
 }
 
 .ECTS-E > .Circle { 
-    background: #ffb100;
+    background: #EDEC51;
 }
 .ECTS-D > .Circle {
-    background: #ffd000;
+    background: #7EBA3C;
 }
 .ECTS-C > .Circle { 
-    background: #70c300;
+    background: #28AE57;
 }
 .ECTS-B > .Circle { 
-    background: #059e00;
+    background: #349920;
 }
 .ECTS-A > .Circle {
-    background: #009404;
+    background: #367F27;
 }
 
 .course_rating_percent > div 
-- 
GitLab