71 lines
3.3 KiB
HTML
71 lines
3.3 KiB
HTML
<header class="navbar navbar-dark sticky-top bg-dark flex-md-nowrap p-0 shadow">
|
|
<a class="navbar-brand col-md-3 col-lg-2 me-0 px-3" href="#">Рабочие программы</a>
|
|
<button class="navbar-toggler position-absolute d-md-none collapsed" type="button" data-bs-toggle="collapse" data-bs-target="#sidebarMenu" aria-controls="sidebarMenu" aria-expanded="false" aria-label="Toggle navigation">
|
|
<span class="navbar-toggler-icon"></span>
|
|
</button>
|
|
<div class="container-fluid">
|
|
<div class="row w-100">
|
|
<div class="col-md-4">
|
|
<input class="form-control form-control-dark w-100" type="text" placeholder="Добро пожаловать" aria-label="Search" id="search_input">
|
|
</div>
|
|
<div class="col-md-4">
|
|
<a href="#" class="btn {if $year_cur==2022}btn-success{else}btn-secondary{/if} year_chng" data-year="2022">2022</a>
|
|
<a href="#" class="btn {if $year_cur==2023}btn-success{else}btn-secondary{/if} year_chng" data-year="2023">2023</a>
|
|
</div>
|
|
<div class="col-md-4">
|
|
{if isset($PREPOD_ALL)}
|
|
<select class="form-control form-select prepod_chenge_ADM">
|
|
{foreach from=$PREPOD_ALL item=prepod}
|
|
{if $prepod.fio!=''}<option value="{$prepod.id}" {if $aUSER.id==$prepod.id}SELECTED{/if}>{$prepod.fio}</option>{/if}
|
|
{/foreach}
|
|
</select>
|
|
{literal}
|
|
<script>$(document).ready(function(){
|
|
$(".prepod_chenge_ADM").change(function(){
|
|
let id = $('option:selected',this).val();
|
|
$.ajax({url: '/rabprog/index.php',cache:false,datatype:'json',method:'post',
|
|
data: 'prepod_chenge_ADM='+id,
|
|
success:function(data){
|
|
//window.location.reload();
|
|
window.location.href = 'https://eios.mkgtu.ru/rabprog/';
|
|
}
|
|
});
|
|
})
|
|
})</script>
|
|
{/literal}
|
|
{/if}
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div class="navbar-nav">
|
|
<div class="nav-item text-nowrap">
|
|
<a class="nav-link px-3" href="#">Помощь</a>
|
|
</div>
|
|
</div>
|
|
</header>
|
|
{literal}<script>$(document).ready(function(){
|
|
$(".year_chng").click(function(e){
|
|
let year = $(this).data('year');
|
|
$.ajax({url: '/rabprog/',cache:false,datatype:'json',method:'post',
|
|
data: 'year_change='+year,
|
|
success:function(data){
|
|
window.location.reload();
|
|
}
|
|
});
|
|
return false;
|
|
});
|
|
$("#search_input").keyup(function(e){
|
|
let word = $(this).val();
|
|
if(e.keyCode == 13){
|
|
$(this).trigger("enterKey");
|
|
window.ToastShow1("Поиск",'ищем...',0);
|
|
$("#main_body").html('ищем...');
|
|
$.ajax({url: '/rabprog/search/',cache:false,datatype:'json',method:'post',
|
|
data: 'ajdes=SEASRCH&word='+word,
|
|
success:function(data){
|
|
$("#main_body").html(data.html);
|
|
}
|
|
});
|
|
}
|
|
});
|
|
})</script>{/literal} |