init
This commit is contained in:
commit
e124a47765
19374 changed files with 9806149 additions and 0 deletions
|
@ -0,0 +1,41 @@
|
|||
using System.Net;
|
||||
using System.Net.Http;
|
||||
using System.Web.Http;
|
||||
using Kreta.BusinessLogic.Helpers;
|
||||
using Kreta.BusinessLogic.Security;
|
||||
using Kreta.Web.Areas.Kerdoiv.Models;
|
||||
using Kreta.Web.Helpers;
|
||||
using Kreta.Web.Security;
|
||||
|
||||
namespace Kreta.Web.Areas.Kerdoiv.ApiControllers
|
||||
{
|
||||
[ApiRoleClaimsAuthorize(true)]
|
||||
[ApiRolePackageAuthorize(KretaClaimPackages.Tanar.ClaimValue, KretaClaimPackages.Osztalyfonok.ClaimValue, KretaClaimPackages.SzuperOsztalyfonok.ClaimValue)]
|
||||
public class NatKerdoivApiController : ApiController
|
||||
{
|
||||
|
||||
[HttpPost]
|
||||
[ApiValidateAjaxAntiForgeryToken]
|
||||
public HttpResponseMessage Save(NatKerdoivModel model)
|
||||
{
|
||||
ModelState.Merge(model.Validate());
|
||||
|
||||
if (ModelState.IsValid)
|
||||
{
|
||||
var helper = new KerdoivHelper(ConnectionTypeExtensions.GetActiveSessionConnectionType());
|
||||
helper.Save(model.ToCo());
|
||||
return new HttpResponseMessage(HttpStatusCode.OK);
|
||||
}
|
||||
return Request.CreateErrorResponse(HttpStatusCode.BadRequest, ModelState);
|
||||
}
|
||||
|
||||
[HttpPost]
|
||||
[ApiValidateAjaxAntiForgeryToken]
|
||||
public HttpResponseMessage SetNatKerdoivIsLattamTrue()
|
||||
{
|
||||
var helper = new KerdoivHelper(ConnectionTypeExtensions.GetActiveSessionConnectionType());
|
||||
helper.SetNatKerdoivIsLattamTrue();
|
||||
return new HttpResponseMessage(HttpStatusCode.OK);
|
||||
}
|
||||
}
|
||||
}
|
62
KretaWeb/Areas/Kerdoiv/Controllers/NatKerdoivController.cs
Normal file
62
KretaWeb/Areas/Kerdoiv/Controllers/NatKerdoivController.cs
Normal file
|
@ -0,0 +1,62 @@
|
|||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Web.Mvc;
|
||||
using Kreta.BusinessLogic.HelperClasses;
|
||||
using Kreta.BusinessLogic.Helpers;
|
||||
using Kreta.BusinessLogic.Security;
|
||||
using Kreta.Enums.ManualEnums;
|
||||
using Kreta.Framework.Util;
|
||||
using Kreta.Resources;
|
||||
using Kreta.Web.Areas.Kerdoiv.Models;
|
||||
using Kreta.Web.Helpers;
|
||||
using Kreta.Web.Models.EditorTemplates;
|
||||
using Kreta.Web.Security;
|
||||
|
||||
namespace Kreta.Web.Areas.Kerdoiv.Controllers
|
||||
{
|
||||
[MvcRoleClaimsAuthorize(true)]
|
||||
[MvcRolePackageDenyAuthorize(KretaClaimPackages.IsOnlyAlkalmozott.ClaimValue)]
|
||||
[MvcRolePackageAuthorize(KretaClaimPackages.Tanar.ClaimValue, KretaClaimPackages.Osztalyfonok.ClaimValue, KretaClaimPackages.SzuperOsztalyfonok.ClaimValue)]
|
||||
public class NatKerdoivController : Controller
|
||||
{
|
||||
#region Properties
|
||||
|
||||
public static string FormName => "NatKerdoivForm";
|
||||
|
||||
public static string PopupName => "NatKerdoiv_Popup";
|
||||
|
||||
#endregion Properties
|
||||
|
||||
[HttpGet]
|
||||
public ActionResult Index()
|
||||
{
|
||||
|
||||
NatKerdoivCo co = new KerdoivHelper(ConnectionTypeExtensions.GetActiveSessionConnectionType()).GetNatKerdoivCo();
|
||||
var model = new NatKerdoivModel(co)
|
||||
{
|
||||
EgyToOtWithNemTudomSelectList = GetEgyToOtWithNemTudomList()
|
||||
};
|
||||
return View(model);
|
||||
}
|
||||
|
||||
[HttpGet]
|
||||
[MvcValidateAjaxAntiForgeryToken]
|
||||
public ActionResult OpenNatKerdoivPopup()
|
||||
{
|
||||
PopUpModel popUpModel = new PopUpModel(null, PopupName);
|
||||
popUpModel.AddBtn(popUpModel, "NemToltomKiButton", KerdoivResource.MostNemToltomKi, "NatKerdoivPopupHelper.nemToltomKi", "BtnDelete");
|
||||
popUpModel.AddBtn(popUpModel, "KitioltomButton", KerdoivResource.Kitoltom, "NatKerdoivPopupHelper.kitoltom", "BtnOk");
|
||||
return PartialView(Constants.General.PopupView, popUpModel);
|
||||
}
|
||||
|
||||
private List<SelectListItem> GetEgyToOtWithNemTudomList()
|
||||
{
|
||||
var result = FrameworkEnumExtensions.EnumToListManual<EgyToOtWithNemTudomEnum>().ToSelectListItemList();
|
||||
//NOTE: A "Nem tudom" elemet a végére tesszük az elejéről a listának.
|
||||
var nemTudomItem = result.First();
|
||||
result.Remove(nemTudomItem);
|
||||
result.Add(nemTudomItem);
|
||||
return result;
|
||||
}
|
||||
}
|
||||
}
|
18
KretaWeb/Areas/Kerdoiv/KerdoivAreaRegistration.cs
Normal file
18
KretaWeb/Areas/Kerdoiv/KerdoivAreaRegistration.cs
Normal file
|
@ -0,0 +1,18 @@
|
|||
using System.Web.Mvc;
|
||||
|
||||
namespace Kreta.Web.Areas.Kerdoiv
|
||||
{
|
||||
public class KerdoivAreaRegistration : AreaRegistration
|
||||
{
|
||||
public override string AreaName => "Kerdoiv";
|
||||
|
||||
public override void RegisterArea(AreaRegistrationContext context)
|
||||
{
|
||||
context.MapRoute(
|
||||
"Kerdoiv_default",
|
||||
"Kerdoiv/{controller}/{action}/{id}",
|
||||
new { action = "Index", id = UrlParameter.Optional }
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
93
KretaWeb/Areas/Kerdoiv/Models/NatKerdoivModel.cs
Normal file
93
KretaWeb/Areas/Kerdoiv/Models/NatKerdoivModel.cs
Normal file
|
@ -0,0 +1,93 @@
|
|||
using System.Collections.Generic;
|
||||
using System.Web.Mvc;
|
||||
using Kreta.BusinessLogic.HelperClasses;
|
||||
using Kreta.Resources;
|
||||
using Microsoft.Ajax.Utilities;
|
||||
using ModelStateDictionary = System.Web.Http.ModelBinding.ModelStateDictionary;
|
||||
|
||||
namespace Kreta.Web.Areas.Kerdoiv.Models
|
||||
{
|
||||
public class NatKerdoivModel
|
||||
{
|
||||
#region Constructors
|
||||
|
||||
public NatKerdoivModel()
|
||||
{
|
||||
}
|
||||
|
||||
public NatKerdoivModel(NatKerdoivCo co)
|
||||
{
|
||||
Id = co.Id;
|
||||
Kerdes01 = co.Kerdes01;
|
||||
Kerdes02 = co.Kerdes02;
|
||||
Kerdes03 = co.Kerdes03;
|
||||
Kerdes04 = co.Kerdes04;
|
||||
Kerdes05 = co.Kerdes05;
|
||||
Kerdes06 = co.Kerdes06;
|
||||
Kerdes07 = co.Kerdes07;
|
||||
Kerdes08 = co.Kerdes08;
|
||||
Kerdes09 = co.Kerdes09;
|
||||
Kerdes10 = co.Kerdes10;
|
||||
Kerdes11 = co.Kerdes11;
|
||||
Kerdes12 = co.Kerdes12;
|
||||
}
|
||||
|
||||
#endregion Constructors
|
||||
|
||||
#region Properties
|
||||
|
||||
public int? Id { get; set; }
|
||||
public int? Kerdes01 { get; set; }
|
||||
public int? Kerdes02 { get; set; }
|
||||
public int? Kerdes03 { get; set; }
|
||||
public int? Kerdes04 { get; set; }
|
||||
public int? Kerdes05 { get; set; }
|
||||
public int? Kerdes06 { get; set; }
|
||||
public int? Kerdes07 { get; set; }
|
||||
public int? Kerdes08 { get; set; }
|
||||
public int? Kerdes09 { get; set; }
|
||||
public int? Kerdes10 { get; set; }
|
||||
public string Kerdes11 { get; set; }
|
||||
public string Kerdes12 { get; set; }
|
||||
public List<SelectListItem> EgyToOtWithNemTudomSelectList { get; set; }
|
||||
|
||||
#endregion Properties
|
||||
|
||||
public NatKerdoivCo ToCo()
|
||||
{
|
||||
var result = new NatKerdoivCo
|
||||
{
|
||||
Id = Id,
|
||||
Kerdes01 = Kerdes01,
|
||||
Kerdes02 = Kerdes02,
|
||||
Kerdes03 = Kerdes03,
|
||||
Kerdes04 = Kerdes04,
|
||||
Kerdes05 = Kerdes05,
|
||||
Kerdes06 = Kerdes06,
|
||||
Kerdes07 = Kerdes07,
|
||||
Kerdes08 = Kerdes08,
|
||||
Kerdes09 = Kerdes09,
|
||||
Kerdes10 = Kerdes10,
|
||||
Kerdes11 = string.IsNullOrWhiteSpace(Kerdes11) ? null : Kerdes11,
|
||||
Kerdes12 = string.IsNullOrWhiteSpace(Kerdes12) ? null : Kerdes12
|
||||
};
|
||||
return result;
|
||||
}
|
||||
|
||||
public ModelStateDictionary Validate()
|
||||
{
|
||||
var modelStateDictionary = new ModelStateDictionary();
|
||||
|
||||
if (!Kerdes11.IsNullOrWhiteSpace() && Kerdes11.Length > 1000)
|
||||
{
|
||||
modelStateDictionary.AddModelError(nameof(Kerdes11), string.Format(KerdoivResource.AKerdesValaszaNemLehetHosszabbMint1000Karakter, "11"));
|
||||
}
|
||||
if (!Kerdes12.IsNullOrWhiteSpace() && Kerdes12.Length > 1000)
|
||||
{
|
||||
modelStateDictionary.AddModelError(nameof(Kerdes12), string.Format(KerdoivResource.AKerdesValaszaNemLehetHosszabbMint1000Karakter, "12"));
|
||||
}
|
||||
|
||||
return modelStateDictionary;
|
||||
}
|
||||
}
|
||||
}
|
195
KretaWeb/Areas/Kerdoiv/Views/NatKerdoiv/Index.cshtml
Normal file
195
KretaWeb/Areas/Kerdoiv/Views/NatKerdoiv/Index.cshtml
Normal file
|
@ -0,0 +1,195 @@
|
|||
@using Kreta.Resources
|
||||
@using Kreta.Web.Areas.Kerdoiv.Controllers
|
||||
@using Kreta.Web.Helpers
|
||||
@using Kreta.Web.Areas.Kerdoiv.Models
|
||||
|
||||
@model NatKerdoivModel
|
||||
|
||||
@{
|
||||
var formName = NatKerdoivController.FormName;
|
||||
}
|
||||
|
||||
@using (Html.KretaForm(formName))
|
||||
{
|
||||
@Html.HiddenFor(x => x.Id)
|
||||
|
||||
@Html.KretaValidationSummary()
|
||||
|
||||
<div class="kerdoivWrapper container-fluid">
|
||||
<div class="row kerdoivTitle">
|
||||
<div class="col-xs-12">
|
||||
<a class='redirectionLink' href='https://tudasbazis.ekreta.hu/pages/viewpage.action?pageId=6717625' target='_blank'>@(CommonResource.KattintsonIdeAKitoltesiUtmutatohoz)</a>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row kerdoivTitle">
|
||||
<div class="col-xs-12">
|
||||
@KerdoivResource.Kerdes1Tol10IgSzoveg
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-sm-12 col-md-8">
|
||||
@KerdoivResource.Kerdes01
|
||||
</div>
|
||||
<div class="col-sm-12 col-md-4">
|
||||
@Html.KretaSelectorFor(m => m.Kerdes01, Model.EgyToOtWithNemTudomSelectList)
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-sm-12 col-md-8">
|
||||
@KerdoivResource.Kerdes02
|
||||
</div>
|
||||
<div class="col-sm-12 col-md-4">
|
||||
@Html.KretaSelectorFor(m => m.Kerdes02, Model.EgyToOtWithNemTudomSelectList)
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-sm-12 col-md-8">
|
||||
@KerdoivResource.Kerdes03
|
||||
</div>
|
||||
<div class="col-sm-12 col-md-4">
|
||||
@Html.KretaSelectorFor(m => m.Kerdes03, Model.EgyToOtWithNemTudomSelectList)
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-sm-12 col-md-8">
|
||||
@KerdoivResource.Kerdes04
|
||||
</div>
|
||||
<div class="col-sm-12 col-md-4">
|
||||
@Html.KretaSelectorFor(m => m.Kerdes04, Model.EgyToOtWithNemTudomSelectList)
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-sm-12 col-md-8">
|
||||
@KerdoivResource.Kerdes05
|
||||
</div>
|
||||
<div class="col-sm-12 col-md-4">
|
||||
@Html.KretaSelectorFor(m => m.Kerdes05, Model.EgyToOtWithNemTudomSelectList)
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-sm-12 col-md-8">
|
||||
@KerdoivResource.Kerdes06
|
||||
</div>
|
||||
<div class="col-sm-12 col-md-4">
|
||||
@Html.KretaSelectorFor(m => m.Kerdes06, Model.EgyToOtWithNemTudomSelectList)
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-sm-12 col-md-8">
|
||||
@KerdoivResource.Kerdes07
|
||||
</div>
|
||||
<div class="col-sm-12 col-md-4">
|
||||
@Html.KretaSelectorFor(m => m.Kerdes07, Model.EgyToOtWithNemTudomSelectList)
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-sm-12 col-md-8">
|
||||
@KerdoivResource.Kerdes08
|
||||
</div>
|
||||
<div class="col-sm-12 col-md-4">
|
||||
@Html.KretaSelectorFor(m => m.Kerdes08, Model.EgyToOtWithNemTudomSelectList)
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-sm-12 col-md-8">
|
||||
@KerdoivResource.Kerdes09
|
||||
</div>
|
||||
<div class="col-sm-12 col-md-4">
|
||||
@Html.KretaSelectorFor(m => m.Kerdes09, Model.EgyToOtWithNemTudomSelectList)
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-sm-12 col-md-8">
|
||||
@KerdoivResource.Kerdes10
|
||||
</div>
|
||||
<div class="col-sm-12 col-md-4">
|
||||
@Html.KretaSelectorFor(m => m.Kerdes10, Model.EgyToOtWithNemTudomSelectList)
|
||||
</div>
|
||||
</div>
|
||||
<div class="row kerdoivTitle">
|
||||
<div class="col-xs-12">
|
||||
@KerdoivResource.Kerdes11Tol12IgSzoveg
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-sm-12 col-md-8">
|
||||
@KerdoivResource.Kerdes11
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-sm-12 col-md-8">
|
||||
@Html.KretaTextAreaFor(m => m.Kerdes11, 1)
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-sm-12 col-md-8">
|
||||
@KerdoivResource.Kerdes12
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-sm-12 col-md-8">
|
||||
@Html.KretaTextAreaFor(m => m.Kerdes12, 1)
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="BtnOk" style="float: right; padding-left: 5px;">
|
||||
@Html.KretaButton("SaveNatKerdoiv", KerdoivResource.AKerdoivBekuldese, clickEventName: "NatKerdoivHelper.save")
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
}
|
||||
|
||||
<script type="text/javascript">
|
||||
|
||||
var NatKerdoivHelper = (function() {
|
||||
var natKerdoivHelper = function () { };
|
||||
|
||||
var url = {
|
||||
Save: "@Url.HttpRouteUrl(Constants.RouteKey.ActionApi, new { controller = "NatKerdoivApi", action = "Save" })"
|
||||
};
|
||||
|
||||
var formName = "@formName";
|
||||
|
||||
natKerdoivHelper.save = function () {
|
||||
var form = $("#" + formName);
|
||||
if (form.valid()) {
|
||||
var formData = $("#" + formName).toObject();
|
||||
|
||||
AjaxHelper.DoValidationPost(url.Save,
|
||||
formName,
|
||||
formData,
|
||||
saveResponseOk);
|
||||
}
|
||||
}
|
||||
|
||||
function saveResponseOk() {
|
||||
KretaWindowHelper.feedbackWindow("@(CommonResource.Siker)", "@(KerdoivResource.AKerdoivBekuldeseSikeresenMegtortent)", false);
|
||||
}
|
||||
|
||||
return natKerdoivHelper;
|
||||
})();
|
||||
|
||||
</script>
|
||||
|
||||
<style>
|
||||
|
||||
.kerdoivWrapper .kerdoivTitle {
|
||||
font-weight: bold;
|
||||
padding-top: 20px;
|
||||
}
|
||||
|
||||
.kerdoivWrapper .redirectionLink {
|
||||
font-weight: 600;
|
||||
}
|
||||
|
||||
.redirectionLink:hover {
|
||||
color: #337AB7;
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
.redirectionLink:after {
|
||||
color: #5C6A79;
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
</style>
|
|
@ -0,0 +1,17 @@
|
|||
<div class="container-fluid details">
|
||||
<div>
|
||||
Kedves Kolléganő! Kedves Kolléga!<br />
|
||||
Az Eszterházy Károly Egyetemen működő Oktatás 2030 Tanulástudományi Kutatóközpont a jelenleg érvényes tantervi-tartalmi szabályozók (Nemzeti alaptanterv, kerettantervek) megújítására kíván javaslatot tenni.<br />
|
||||
A kérdőív kitöltése nem kötelező, önkéntes!<br />
|
||||
Rövid kérdőívünk kitöltésével kérjük, segítse kutató-fejlesztő munkánkat!<br />
|
||||
<br />
|
||||
Támogató együttműködésében bízva,<br />
|
||||
Tisztelettel,<br />
|
||||
<p style="margin-left: 100px;">
|
||||
Dr. Pupek Emese PhD<br />
|
||||
mb. főigazgató<br />
|
||||
Oktatás 2030 Tanulástudományi Kutatóközpont<br />
|
||||
Eszterházy Károly Egyetem<br />
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
3
KretaWeb/Areas/Kerdoiv/Views/_ViewStart.cshtml
Normal file
3
KretaWeb/Areas/Kerdoiv/Views/_ViewStart.cshtml
Normal file
|
@ -0,0 +1,3 @@
|
|||
@{
|
||||
Layout = "~/Views/Shared/_MasterLayout.cshtml";
|
||||
}
|
38
KretaWeb/Areas/Kerdoiv/Views/web.config
Normal file
38
KretaWeb/Areas/Kerdoiv/Views/web.config
Normal file
|
@ -0,0 +1,38 @@
|
|||
<?xml version="1.0"?>
|
||||
|
||||
<configuration>
|
||||
<configSections>
|
||||
<sectionGroup name="system.web.webPages.razor" type="System.Web.WebPages.Razor.Configuration.RazorWebSectionGroup, System.Web.WebPages.Razor, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35">
|
||||
<section name="host" type="System.Web.WebPages.Razor.Configuration.HostSection, System.Web.WebPages.Razor, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" requirePermission="false" />
|
||||
<section name="pages" type="System.Web.WebPages.Razor.Configuration.RazorPagesSection, System.Web.WebPages.Razor, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" requirePermission="false" />
|
||||
</sectionGroup>
|
||||
</configSections>
|
||||
|
||||
<system.web.webPages.razor>
|
||||
<host factoryType="System.Web.Mvc.MvcWebRazorHostFactory, System.Web.Mvc, Version=5.2.3.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" />
|
||||
<pages pageBaseType="System.Web.Mvc.WebViewPage">
|
||||
<namespaces>
|
||||
<add namespace="System.Web.Mvc" />
|
||||
<add namespace="System.Web.Mvc.Ajax" />
|
||||
<add namespace="System.Web.Mvc.Html" />
|
||||
<add namespace="System.Web.Routing" />
|
||||
<add namespace="Kreta.Web" />
|
||||
<add namespace="Kreta.BusinessLogic.Utils" />
|
||||
<add namespace="Kendo.Mvc.UI" />
|
||||
<add namespace="Kreta.Web.Helpers" />
|
||||
<add namespace="System.Web.Optimization" />
|
||||
</namespaces>
|
||||
</pages>
|
||||
</system.web.webPages.razor>
|
||||
|
||||
<appSettings>
|
||||
<add key="webpages:Enabled" value="false" />
|
||||
</appSettings>
|
||||
|
||||
<system.webServer>
|
||||
<handlers>
|
||||
<remove name="BlockViewHandler"/>
|
||||
<add name="BlockViewHandler" path="*" verb="*" preCondition="integratedMode" type="System.Web.HttpNotFoundHandler" />
|
||||
</handlers>
|
||||
</system.webServer>
|
||||
</configuration>
|
Loading…
Add table
Add a link
Reference in a new issue