341 lines
11 KiB
Text
341 lines
11 KiB
Text
@using Kreta.Framework
|
|
@using Kreta.Enums
|
|
@using Kreta.Web.Configuration
|
|
@model Kreta.Web.Areas.Adminisztracio.Models.BelepesKezeloModel
|
|
@{
|
|
ViewBag.Title = StringResourcesUtil.GetString(3675); /*Szerepkör választó*/
|
|
Layout = null;
|
|
var idpConfiguration = DependencyResolver.Current.GetService<IIdpConfiguration>();
|
|
string logOutPath = idpConfiguration.LoginEnabled ? Url.Action("LogOut", "Home", new { area = string.Empty }) : Url.Action("LogOut", "Layout", new { area = string.Empty });
|
|
}
|
|
|
|
<!DOCTYPE html>
|
|
<html lang="hu">
|
|
<head>
|
|
<meta charset="utf-8" />
|
|
<meta name="format-detection" content="telephone=no" />
|
|
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
|
<meta http-equiv="X-UA-Compatible" content="IE=Edge" />
|
|
<title>@ViewBag.Title</title>
|
|
<link rel="preconnect" href="https://fonts.googleapis.com" crossorigin>
|
|
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
|
|
<link href="https://fonts.googleapis.com/css2?family=Open+Sans:ital,wght@0,300;0,400;0,600;0,700;1,300;1,400;1,600&family=Roboto+Condensed:wght@300;400;700&display=swap" rel="stylesheet">
|
|
<link rel="icon" href="../../favicon.ico" type="image/x-icon" />
|
|
@Styles.Render("~/App_Themes/css", "~/Content/css", "~/Content/kretaControls")
|
|
@Styles.Render(Request.Browser.IsMobileDevice ? "~/Content/kretaMobileCss" : "~/Content/kretaCss")
|
|
@Scripts.Render("~/bundles/jquery")
|
|
@Scripts.Render("~/bundles/ErrorHandler")
|
|
@Scripts.Render("~/bundles/js")
|
|
@Html.Raw(Kreta.Core.Analytics.Client.Factory.GetInstance())
|
|
<script type="text/javascript">
|
|
GlobalErrorHandler('@Url.Action("ClientError", "Layout", new { area = string.Empty })');
|
|
</script>
|
|
<style>
|
|
html {
|
|
height: 100%;
|
|
}
|
|
|
|
body {
|
|
margin: 0;
|
|
padding: 0;
|
|
height: 100%;
|
|
font-family: "Open Sans";
|
|
font-size: 14px;
|
|
font-weight: 400;
|
|
color: #445261;
|
|
background-color: #385765;
|
|
}
|
|
|
|
.Box-Container {
|
|
display: flex;
|
|
flex-wrap: wrap;
|
|
justify-content: center;
|
|
align-items: center;
|
|
align-content: center;
|
|
flex-grow: 1;
|
|
}
|
|
|
|
.Box-Item {
|
|
cursor: pointer;
|
|
margin: 3em;
|
|
max-height: 400px;
|
|
max-width: 400px;
|
|
min-height: 200px;
|
|
min-width: 200px;
|
|
display: flex;
|
|
flex-direction: column;
|
|
flex-grow: 1;
|
|
-webkit-box-shadow: 10px 10px 5px -2px rgba(56,56,56,1);
|
|
-moz-box-shadow: 10px 10px 5px -2px rgba(56,56,56,1);
|
|
box-shadow: 10px 10px 5px -2px rgba(56,56,56,1);
|
|
}
|
|
|
|
.Box-Item:hover {
|
|
background-color: #DAE5ED;
|
|
text-decoration: none;
|
|
color: #445261;
|
|
}
|
|
|
|
.Box-Icon {
|
|
color: white;
|
|
background-color: #30a8cb;
|
|
padding: 20px 20px 10px 20px;
|
|
display: flex;
|
|
justify-content: center;
|
|
align-content: center;
|
|
align-items: center;
|
|
flex-grow: 1;
|
|
}
|
|
|
|
.Box-Icon.DktIcon {
|
|
background-color: rgb(139,0,139);
|
|
/*background-color: rgb(0,139,139);*/
|
|
}
|
|
|
|
.Box-Icon.KijelentkezesIcon {
|
|
background-color: rgb(233,150,122);
|
|
}
|
|
|
|
.Box-Icon.EugyIcon {
|
|
background-color: rgb(139,0,139);
|
|
}
|
|
|
|
.Box-Icon.ESLIcon {
|
|
background-color: rgb(139,0,139);
|
|
}
|
|
|
|
.Box-Icon.FokuszIcon {
|
|
background-color: rgb(139,0,139);
|
|
}
|
|
|
|
.Box-Icon.EJelentkezesIcon {
|
|
background-color: rgb(139,0,139);
|
|
}
|
|
|
|
.Box-Icon.KonyvtarIcon {
|
|
background-color: rgb(139,0,139);
|
|
}
|
|
|
|
.Box-Text {
|
|
background-color: #F5F5F5;
|
|
text-align: center;
|
|
font-size: 18px;
|
|
padding: 5px;
|
|
}
|
|
|
|
.Page {
|
|
height: 100%;
|
|
display: flex;
|
|
flex-direction: column;
|
|
justify-content: stretch;
|
|
}
|
|
|
|
.Page-Header {
|
|
flex-shrink: 0;
|
|
height: 50px;
|
|
background-color: white;
|
|
display: flex;
|
|
flex-wrap: wrap;
|
|
align-items: center;
|
|
}
|
|
|
|
.IntezmenyNev {
|
|
color: #406a7c;
|
|
font-weight: 500;
|
|
line-height: 1.1;
|
|
font-size: 24px;
|
|
flex-grow: 1;
|
|
padding-left: 10px;
|
|
}
|
|
|
|
.UserInfo {
|
|
line-height: 20px;
|
|
display: flex;
|
|
padding: 5px 10px;
|
|
align-items: center;
|
|
}
|
|
|
|
.UserImg {
|
|
border-width: 0px;
|
|
width: 40px;
|
|
height: 40px;
|
|
border-radius: 50%;
|
|
background-size: cover;
|
|
background-position: center center;
|
|
background-repeat: no-repeat;
|
|
}
|
|
|
|
.UserName {
|
|
margin-right: 3px;
|
|
}
|
|
</style>
|
|
</head>
|
|
<body>
|
|
<div class="Page">
|
|
<div class="Page-Header">
|
|
<div class="IntezmenyNev">
|
|
@Model.OrganizationName
|
|
</div>
|
|
<div class="UserInfo">
|
|
<div class="UserName">
|
|
@Model.UserName
|
|
</div>
|
|
<div>
|
|
<img class="UserImg" src="@Model.ProfilImgSrc">
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div class="Box-Container">
|
|
@foreach (var item in Model.Lehetosegek)
|
|
{
|
|
if (item.Tipus == Kreta.Web.Areas.Adminisztracio.Models.BelepesKezeloModel.LehetosegTipus.Kreta)
|
|
{
|
|
<div class="Box-Item" onclick="BelepesKezelo.changeRole('@item.Szerepkor')">
|
|
<div class="Box-Icon">
|
|
<img src="../../../../App_Themes/Skin_Kreta_Gfx/content/images/kreta_feher_innerpages.png" />
|
|
</div>
|
|
<div class="Box-Text">
|
|
@item.Name
|
|
</div>
|
|
</div>
|
|
}
|
|
|
|
if (item.Tipus == Kreta.Web.Areas.Adminisztracio.Models.BelepesKezeloModel.LehetosegTipus.DKT)
|
|
{
|
|
<a class="Box-Item" href="@(item.Szerepkor == SzerepkorTipusEnum.Naplo ? "BelepesKezelo/DKTTanar" : "BelepesKezelo/DKTDiak") ">
|
|
<div class="Box-Icon DktIcon">
|
|
<i class="fa fa-table fa-4x"></i>
|
|
</div>
|
|
<div class="Box-Text">
|
|
@item.Name
|
|
</div>
|
|
</a>
|
|
}
|
|
|
|
if (item.Tipus == Kreta.Web.Areas.Adminisztracio.Models.BelepesKezeloModel.LehetosegTipus.Eugy)
|
|
{
|
|
<a class="Box-Item" href="BelepesKezelo/Eugyintezes">
|
|
<div class="Box-Icon EugyIcon">
|
|
<i class="fa fa-at fa-4x"></i>
|
|
</div>
|
|
<div class="Box-Text">
|
|
@item.Name
|
|
</div>
|
|
</a>
|
|
}
|
|
|
|
if (item.Tipus == Kreta.Web.Areas.Adminisztracio.Models.BelepesKezeloModel.LehetosegTipus.ESL)
|
|
{
|
|
<a class="Box-Item" href="BelepesKezelo/ESL">
|
|
<div class="Box-Icon ESLIcon">
|
|
<i class="fa fa-pie-chart fa-4x"></i>
|
|
</div>
|
|
<div class="Box-Text">
|
|
@item.Name
|
|
</div>
|
|
</a>
|
|
}
|
|
|
|
if (item.Tipus == Kreta.Web.Areas.Adminisztracio.Models.BelepesKezeloModel.LehetosegTipus.Fokusz)
|
|
{
|
|
<a class="Box-Item" href="BelepesKezelo/Fokusz">
|
|
<div class="Box-Icon FokuszIcon">
|
|
<i class="fa fa-pie-chart fa-4x"></i>
|
|
</div>
|
|
<div class="Box-Text">
|
|
@item.Name
|
|
</div>
|
|
</a>
|
|
}
|
|
|
|
if (item.Tipus == Kreta.Web.Areas.Adminisztracio.Models.BelepesKezeloModel.LehetosegTipus.Konyvtar)
|
|
{
|
|
<a class="Box-Item" href="BelepesKezelo/Konyvtar">
|
|
<div class="Box-Icon KonyvtarIcon">
|
|
<i class="fa fa-book fa-4x"></i>
|
|
</div>
|
|
<div class="Box-Text">
|
|
@item.Name
|
|
</div>
|
|
</a>
|
|
}
|
|
|
|
if (item.Tipus == Kreta.Web.Areas.Adminisztracio.Models.BelepesKezeloModel.LehetosegTipus.EJelentkezes)
|
|
{
|
|
<a class="Box-Item" href="BelepesKezelo/EJelentkezes">
|
|
<div class="Box-Icon EJelentkezesIcon">
|
|
<i class="fa fa-check-square-o fa-4x"></i>
|
|
</div>
|
|
<div class="Box-Text">
|
|
@item.Name
|
|
</div>
|
|
</a>
|
|
}
|
|
|
|
}
|
|
|
|
<div class="Box-Item" onclick='@Model.CancelLinkAction'>
|
|
<div class="Box-Icon KijelentkezesIcon">
|
|
<i class="fa fa-sign-out fa-4x"></i>
|
|
</div>
|
|
<div class="Box-Text">
|
|
@Model.CancelLinkText
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<script type="text/javascript">
|
|
var GlobalSystemParams = {};
|
|
GlobalSystemParams.IdpLoginEnabled = CommonUtils.parseBool("@(idpConfiguration.LoginEnabled.ToString())");
|
|
</script>
|
|
|
|
<script type="text/javascript">
|
|
var BelepesKezelo = (function () {
|
|
var helper = function () { };
|
|
|
|
helper.logout = function () { logOut(); };
|
|
helper.changeRole = function (szerepkor) { changeRole(szerepkor); };
|
|
|
|
function logOut() {
|
|
if (GlobalSystemParams.IdpLoginEnabled) {
|
|
location.href = '@logOutPath';
|
|
} else {
|
|
AjaxHelper.DoPost('@logOutPath', undefined, logOutCallBack);
|
|
}
|
|
}
|
|
|
|
function logOutCallBack(data) {
|
|
window.location.assign(data.Url);
|
|
}
|
|
|
|
function changeRole(szerepkor){
|
|
AjaxHelper.DoPost('@Url.Action("ChangeRole", "SzerepkorValaszto", new { area = "Adminisztracio" })', { Role: szerepkor }, changeRoleCallBack);
|
|
}
|
|
|
|
function changeRoleCallBack(data) {
|
|
if (data.Success) {
|
|
window.location.assign(data.Url);
|
|
}
|
|
}
|
|
|
|
function timeOut() {
|
|
logOut();
|
|
}
|
|
|
|
function initCountDown() {
|
|
SessionHandler.Url('@Url.Action("GetRemainingTime", "Layout", new { area = string.Empty })');
|
|
SessionHandler.EndMethod(timeOut);
|
|
SessionHandler.Start();
|
|
}
|
|
|
|
$(document).ready(function () {
|
|
initCountDown();
|
|
});
|
|
|
|
return helper;
|
|
})();
|
|
</script>
|
|
|
|
</body>
|
|
</html>
|