Добавил обработку пустых запросов
All checks were successful
Create and publish a Docker image / build-and-push-image (push) Successful in 24s
All checks were successful
Create and publish a Docker image / build-and-push-image (push) Successful in 24s
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
@model List<University>
|
||||
@model UniversityViewModel
|
||||
|
||||
|
||||
@{
|
||||
ViewData["Title"] = "Доступное образование";
|
||||
@@ -6,13 +7,13 @@
|
||||
|
||||
<section class="universe">
|
||||
<div class="container container_flex">
|
||||
<div class="row row_flex">
|
||||
<div id="listUniversity" class="row row_flex">
|
||||
<form class="universe_input_block col-md-12">
|
||||
<input type="text" class="universe_input" name="searchString" placeholder="Введите название вуза или суза...">
|
||||
<input type="text" class="universe_input" name="searchString" placeholder="Введите название вуза или суза..." value="@Model.SearchString">
|
||||
<input type="image" src="/img/logo/search.svg" alt="search" class="universe_search">
|
||||
</form>
|
||||
@{
|
||||
foreach (var university in Model)
|
||||
foreach (var university in Model.Directions)
|
||||
{
|
||||
<a href="Directions?UniversityId=@university.Id" class="col-2 universe_card universe_card_text">
|
||||
<img src="@university.ImageUrl" alt="universe" class="universe_icon">
|
||||
@@ -25,8 +26,21 @@
|
||||
}
|
||||
}
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<script>
|
||||
var element = document.getElementById("listUniversity");
|
||||
var numberOfChildren = element.childElementCount;
|
||||
if (numberOfChildren <= 1) {
|
||||
Swal.fire(
|
||||
'Ничего не найдено!',
|
||||
"По вашему запросу ничего не найдено",
|
||||
'warning'
|
||||
).then((result) => {
|
||||
window.location.replace("/");
|
||||
})
|
||||
}
|
||||
</script>
|
||||
|
||||
<div class="navigation_choise">
|
||||
<div class="navigation_slid">
|
||||
<span class="navigation_slid_active"></span>
|
||||
|
||||
Reference in New Issue
Block a user