Skip to content
Snippets Groups Projects
Commit 0215f796 authored by Andrew Rudenets's avatar Andrew Rudenets
Browse files

Merge branch 'SemesterSwitcher'

parents 3e02da6b 4b7d6a15
Branches
Tags
No related merge requests found
...@@ -334,10 +334,11 @@ input[type="checkbox"] { ...@@ -334,10 +334,11 @@ input[type="checkbox"] {
.semesterLayer { .semesterLayer {
display: inline-block; display: inline-block;
width: 70%; width: auto;
.semesterName, .semesterSwitcherBtn { .semesterChanger, .semesterSwitcherBtn {
display: inline-block; //margin-left: 0px;
vertical-align: middle; font-family: @FontFamily;
font-size: 1em;
} }
.semesterSwitcher { .semesterSwitcher {
display: block; display: block;
...@@ -350,13 +351,14 @@ input[type="checkbox"] { ...@@ -350,13 +351,14 @@ input[type="checkbox"] {
.box-shadow(0 0 5px, @ColorGrey); .box-shadow(0 0 5px, @ColorGrey);
.radius(5px); .radius(5px);
li { li {
padding: 5px; margin-bottom: 5px;
&:last-child { margin-bottom: 0; }
} }
} }
} }
.helpLink { .helpLink {
width: 29%; width: 100%;
display: inline-block; display: inline-block;
text-align: right; text-align: right;
} }
......
...@@ -17,7 +17,7 @@ ...@@ -17,7 +17,7 @@
.discipline_groups .grade_title .discipline_groups .grade_title
{ {
color: @ColorBlue; color: @ColorBlue;
padding: 5px 0; padding: 8px 0;
text-align: left; text-align: left;
} }
......
...@@ -41,7 +41,6 @@ class Controller_Teacher_Index extends Controller_Environment_Teacher ...@@ -41,7 +41,6 @@ class Controller_Teacher_Index extends Controller_Environment_Teacher
'Subjects' => $subjects, 'Subjects' => $subjects,
'Teachers' => $teachers, 'Teachers' => $teachers,
'Groups' => $groups, 'Groups' => $groups,
'SemesterList' => Model_Semesters::loadAll(),
])->set_filename('teacher/index'); ])->set_filename('teacher/index');
} }
......
...@@ -27,6 +27,7 @@ class Twig extends Kohana_Twig ...@@ -27,6 +27,7 @@ class Twig extends Kohana_Twig
'Arr' => new Arr, 'Arr' => new Arr,
'Inflector' => new Inflector, 'Inflector' => new Inflector,
'System' => array('Title' => ASSEMBLY_SYSTEM_NAME, 'Version' => ASSEMBLY_VERSION), 'System' => array('Title' => ASSEMBLY_SYSTEM_NAME, 'Version' => ASSEMBLY_VERSION),
'SemesterList' => Model_Semesters::loadAll()
]); ]);
return $twig; return $twig;
} }
......
...@@ -15,14 +15,12 @@ ...@@ -15,14 +15,12 @@
{% endmacro %} {% endmacro %}
{% macro SemesterSwitcher(SemesterList) %} {% macro SemesterSwitcher(SemesterList) %}
<div class="semesterName"> <a href="#" id="changeSemester" class="semesterChanger" title="Сменить семестр">
<h2 class="Blue"> {% set Semester = SemesterList[User.SemesterID] %}
{% set Semester = SemesterList[User.SemesterID] %} Семестр: {{ Rus[Semester.Season] }} {{ Semester.Num == 1 ? Semester.Year : (Semester.Year + 1) }}
Семестр: {{ Rus[Semester.Season] }} {{ Semester.Num == 1 ? Semester.Year : (Semester.Year + 1) }} <i class="fa fa-angle-down"></i>
</h2> </a>
</div>
<div class="semesterSwitcherBtn"> <div class="semesterSwitcherBtn">
<a href="#" id="changeSemester" title="Сменить семестр">&#x25BC;</a>
<div class="semesterSwitcher" style="display: none;"> <div class="semesterSwitcher" style="display: none;">
<ul> <ul>
{% for i in SemesterList %} {% for i in SemesterList %}
...@@ -98,6 +96,9 @@ ...@@ -98,6 +96,9 @@
<div class="logotype alignLeft"> <div class="logotype alignLeft">
{{ HTML.anchor('/', '<i class="fa fa-home fa-bg fa-fw"></i>&nbsp;' ~ System.Title, {'title': 'Перейти на главную'})|raw }} {{ HTML.anchor('/', '<i class="fa fa-home fa-bg fa-fw"></i>&nbsp;' ~ System.Title, {'title': 'Перейти на главную'})|raw }}
</div> </div>
<div class="semesterLayer">
{{ base.SemesterSwitcher(SemesterList) }}
</div>
<div class="navigation"> <div class="navigation">
{# todo: internal messages #} {# todo: internal messages #}
{# <div id = "top_user_messages"> {# <div id = "top_user_messages">
......
...@@ -62,13 +62,8 @@ ...@@ -62,13 +62,8 @@
{% block main_content_classes %}sidePadding{% endblock %} {% block main_content_classes %}sidePadding{% endblock %}
{% block main_top_title %}Дисциплины{% endblock %} {% block main_top_title %}Дисциплины{% endblock %}
{% block main_content %} {% block main_content %}
<div> <div class="helpLink">
<div class="semesterLayer"> <a href="#" id="openHelp">Справка</a>
{{ base.SemesterSwitcher(SemesterList) }}
</div>
<div class="helpLink">
<a href="#" id="openHelp">Справка</a>
</div>
</div> </div>
<table class="disciplinesList"> <table class="disciplinesList">
<tr class="tableHeader"> <tr class="tableHeader">
......
...@@ -87,15 +87,9 @@ ...@@ -87,15 +87,9 @@
'Создать курсовую работу', 'Создать курсовую работу',
'Добавить в систему '~System.Title~' дисциплину типа курсовая научная работа '~ 'Добавить в систему '~System.Title~' дисциплину типа курсовая научная работа '~
'или курсовая работа по дисциплине.') }} 'или курсовая работа по дисциплине.') }}
<div class="semesterMargin">
<div class="semesterLayer">
{{ base.SemesterSwitcher(SemesterList) }}
</div>
{#<div class="helpLink"> {#<div class="helpLink">
<a href="#">Справка</a> <a href="#">Справка</a>
</div>#} </div>#}
</div>
{#<table cellspacing="0" border="0" width="100%"> {#<table cellspacing="0" border="0" width="100%">
<tr class="header_block"> <tr class="header_block">
<td class='info_cell'>Учебные группы</td> <td class='info_cell'>Учебные группы</td>
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment