From 6b91a1a7a99fb158681b1309510adc812b34139c Mon Sep 17 00:00:00 2001
From: Shalimov Anton <solidovic@yandex.ru>
Date: Sat, 23 Aug 2014 17:20:12 +0400
Subject: [PATCH] =?UTF-8?q?-=20=D0=A8=D0=B0=D0=B3=D0=BE=D0=B2=D0=B0=D1=8F?=
 =?UTF-8?q?=20=D1=81=D0=B8=D1=81=D1=82=D0=B5=D0=BC=D0=B0=20=D0=BD=D0=B0=20?=
 =?UTF-8?q?=D1=81=D1=82=D1=80=D0=B0=D0=BD=D0=B8=D1=86=D0=B5=20=D0=A3=D0=9A?=
 =?UTF-8?q?=D0=94=20-=20fix?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

---
 .../classes/Controller/Teacher/Map.php        |  4 +--
 ~dev_rating/application/views/settings.twig   |  2 +-
 .../application/views/teacher/map/create.twig |  5 ++-
 .../application/views/teacher/map/edit.twig   | 19 +++++------
 ~dev_rating/media/css/construct.css           | 32 ++++++++++++++++---
 ~dev_rating/media/js/construct/create.js      |  5 +--
 ~dev_rating/media/js/construct/edit.js        | 16 ++++++++++
 7 files changed, 64 insertions(+), 19 deletions(-)

diff --git a/~dev_rating/application/classes/Controller/Teacher/Map.php b/~dev_rating/application/classes/Controller/Teacher/Map.php
index e7e7a75fd..430f2fcd7 100644
--- a/~dev_rating/application/classes/Controller/Teacher/Map.php
+++ b/~dev_rating/application/classes/Controller/Teacher/Map.php
@@ -143,10 +143,10 @@ class Controller_Teacher_Map extends Controller_UserEnvi {
         $teachersHandled = array(); $i = 0;
         
         foreach ($teachers as $row) {
-            $teachersHandled[$i] = $row['LastName'].' '.$row['FirstName'].'';
+            $teachersHandled[$i] = $row['TeacherLast'].' '.$row['TeacherFirst'].'';
             if(!empty($row['TeacherSecond']))
             {
-                $teachersHandled[$i] .= ' '.$row['SecondName'];
+                $teachersHandled[$i] .= ' '.$row['TeacherSecond'];
             }
             $i++;
         }
diff --git a/~dev_rating/application/views/settings.twig b/~dev_rating/application/views/settings.twig
index 8a90fcf93..2a3acb93f 100644
--- a/~dev_rating/application/views/settings.twig
+++ b/~dev_rating/application/views/settings.twig
@@ -13,7 +13,7 @@
 		<p class="help">Логин может состоять из латинских букв, цифр и символа _</p>
 		<div class="itemBlock">
 			<div class="title">Логин:</div>
-			<div class="field"><input type="text" class="inputLogin inputText" value="{{ User.Login }}"></div>
+			<div class="field"><input type="text" class="inputLogin inputText" value="{{ User.AccLogin }}"></div>
 		</div>
 		<button class="changeLogin saveSettings">Изменить логин</button>
 	</div>
diff --git a/~dev_rating/application/views/teacher/map/create.twig b/~dev_rating/application/views/teacher/map/create.twig
index d954d89f8..eec186a60 100644
--- a/~dev_rating/application/views/teacher/map/create.twig
+++ b/~dev_rating/application/views/teacher/map/create.twig
@@ -4,6 +4,9 @@
 {% block media %} {# head -> css, js #}
 	{{ HTML.script('media/js/functions.js')|raw }}
 
+	{{ HTML.script('media/js/event_inspector/event_inspector.js')|raw }}
+	{{ HTML.style('media/js/event_inspector/event_inspector.css')|raw }}
+	
 	{{ HTML.style('media/css/construct.css')|raw }}
 	{{ HTML.script('media/js/construct/create.js')|raw }}
 {% endblock %}
@@ -30,7 +33,7 @@
 		</div>
 		<div class="section">
 			<select class="SelectDepartment">
-				<option value="{{ User.DepartmentID }}">{{ User.DepartmentName }}</option>
+				<option value="{{ User.DepID }}">{{ User.DepName }}</option>
 			</select>
 			<select class="SelectGrade">
 				<option value="0">Выберите курс:</option>
diff --git a/~dev_rating/application/views/teacher/map/edit.twig b/~dev_rating/application/views/teacher/map/edit.twig
index a0a384b26..06fde9fc4 100644
--- a/~dev_rating/application/views/teacher/map/edit.twig
+++ b/~dev_rating/application/views/teacher/map/edit.twig
@@ -3,9 +3,6 @@
 {% block title %}Конструктор УКД{% endblock %} {# head -> title #}
 {% block media %} {# head -> css, js #}
 	{{ HTML.script('media/js/functions.js')|raw }}
-
-	{{ HTML.style('media/js/wnd/wnd.css')|raw }}
-	{{ HTML.script('media/js/wnd/wnd.js')|raw }}
 	
 	{{ HTML.script('media/js/event_inspector/event_inspector.js')|raw }}
 	{{ HTML.style('media/js/event_inspector/event_inspector.css')|raw }}
@@ -17,10 +14,14 @@
 
 {% block main_top_title %}Редактирование УКД{% endblock %}
 {% block main_content %}
+	<div class="tabs">
+		<div class="tab step_1">Шаг 1<span class="desc">. Базоые настройки УКД</span></div>
+		<div class="tab step_2 active">Шаг 2<span class="desc">. Структура УКД</span></div>
+		<div class="tab step_3">Шаг 3<span class="desc">. Прикрепление групп</span></div>
+		<div class="tab step_4">Шаг 4<span class="desc">. Прикрепление студентов</span></div>
+	</div>
+	<p class="top_center_info" style="display: none">Учебная карта дисциплины на 1 семестр 2014 года</p>
 	<div class="discipline">
-		<p class="top_center_info">Учебная карта дисциплины на 1 семестр 2014 года</p>
-		<span class="AttachGroups">Прикрепить группы</span>
-		<span class="AttachStudents">Прикрепить студентов</span>
 		<div class="section">
 			<select class="SelectSubject">
 				<option value="0">Выберите предмет:</option>
@@ -31,7 +32,7 @@
 		</div>
 		<div class="section">
 			<select class="SelectDepartment">
-				<option value="{{ User.DepartmentID }}">{{ User.DepartmentName }}</option>
+				<option value="{{ User.DepID }}">{{ User.DepName }}</option>
 			</select>
 			<select class="SelectGrade">
 				<option value="0">Выберите курс:</option>
@@ -53,12 +54,12 @@
 		</div>
 		<button class="ChangeDiscipline">Сохранить</button>
 	</div>
-	<div class="construct">
+	<div class="structure">
 		<div class="studyMap">
 			<div class="name">Виды контрольных мероприятий</div>
 			<div class="currentControl">Текущий контроль</div>
 			<div class="landmarkControl">Рубежный контроль</div>
-			<div class="actions">Действия</div>
+			<div class="actions" style="text-align: right; padding-right: 30px;">Действия</div>
 		</div>
 		<div class="moduleList">
 		{% for i in range(1, Map.ModulesCount) if Map.ModulesCount > 0 %}
diff --git a/~dev_rating/media/css/construct.css b/~dev_rating/media/css/construct.css
index 36cbf15b0..3c01c5e60 100644
--- a/~dev_rating/media/css/construct.css
+++ b/~dev_rating/media/css/construct.css
@@ -16,8 +16,32 @@
 			margin: 15px 0px 15px 20px;
 			font-size: 15px;
 		}
+		
+/* -- Вкладки на странице -------------------- */
+.tabs {
+	margin-left: 25px;
+}
+	.tabs .tab {
+		display: inline;
+		float: left;
+		background: #EEEEEE;
+		padding: 5px 12px;
+		margin-right: 2px;
+		font-size: 13px;
+		color: #333;
+		cursor: pointer
+	}
+	.tabs .tab:hover {
+		background-color: #3399CC;
+		color: #f6f7f7;
+	}
+	.tabs .tab.active {
+		background-color: #3399CC;
+		color: #f6f7f7;
+	}
 
-.discipline {	
+.discipline {
+	display: none;
 	margin: 0px 25px;
 }
 .discipline .top_center_info {
@@ -42,11 +66,11 @@
 
 
 
-.construct { 
-	margin: 10px 25px;
+.structure { 
+	margin: 0px 25px;
 }
 	
-	.construct .empty {
+	.structure .empty {
 		display: block;
 	}
 
diff --git a/~dev_rating/media/js/construct/create.js b/~dev_rating/media/js/construct/create.js
index e7e7f882b..7f122b4cb 100644
--- a/~dev_rating/media/js/construct/create.js
+++ b/~dev_rating/media/js/construct/create.js
@@ -16,9 +16,10 @@ $(function() {
 			function(data){
 				data = $.parseJSON(data);
 				if(data.success === true) {
-					alert('РћРє, AddDiscipline');
+					$('.AddDiscipline').hide();
+					EventInspector_ShowMsg('РћРє, AddDiscipline', 'success');
 					setTimeout('location.replace("/~dev_rating/map/'+data.DisciplineID+'")',5000); 
-				} else alert('Error, AddDiscipline');
+				} else EventInspector_ShowMsg('Error, AddDiscipline', 'error');
 			}
 		);
     });
diff --git a/~dev_rating/media/js/construct/edit.js b/~dev_rating/media/js/construct/edit.js
index 6991931a4..e315dabdf 100644
--- a/~dev_rating/media/js/construct/edit.js
+++ b/~dev_rating/media/js/construct/edit.js
@@ -3,6 +3,22 @@ $(function() {
 	var URL = (window.location.href).split('/');
 	var DisciplineID = URL[URL.length - 1]
 	
+	// Вкладки
+	$('.tab').click(function(){
+		$('.tab').each(function(){
+			$(this).removeClass('active');
+		});
+		$(this).addClass('active');
+		$('.discipline').hide();
+		$('.structure').hide();
+	});
+	$('.step_1').click(function(){
+		$('.discipline').show();
+	});
+	$('.step_2').click(function(){
+		$('.structure').show();
+	});
+	
 	// Шаблон мероприятия
 	function GetSubModuleTmp(){
 		return '\
-- 
GitLab