Done resume management pages 1
This commit is contained in:
@@ -14,7 +14,6 @@
|
||||
<div>
|
||||
<label asp-for="Name"></label>
|
||||
<input asp-for="Name" type="text" class="readonly" readonly />
|
||||
<span asp-validation-for="Name" class="text-danger"></span>
|
||||
</div>
|
||||
<div>
|
||||
<label asp-for="Order"></label>
|
||||
|
||||
@@ -0,0 +1,39 @@
|
||||
@model MyWebsite.Models.Resume
|
||||
|
||||
@{
|
||||
ViewData["Title"] = "Create resume";
|
||||
}
|
||||
|
||||
<header>
|
||||
<p> <a asp-action="Index">Back to the list</a></p>
|
||||
<h1>Create resume</h1>
|
||||
</header>
|
||||
|
||||
<article>
|
||||
<form asp-action="Create">
|
||||
<div asp-validation-summary="ModelOnly" class="text-danger"></div>
|
||||
<div>
|
||||
<label asp-for="Language"></label>
|
||||
<input type="text" asp-for="Language"/>
|
||||
<span asp-validation-for="Language" class="text-danger"></span>
|
||||
</div>
|
||||
<div>
|
||||
<label asp-for="Content"></label>
|
||||
<textarea asp-for="Content" spellcheck="false"></textarea>
|
||||
<span asp-validation-for="Content" class="text-danger"></span>
|
||||
</div>
|
||||
<br />
|
||||
<input type="submit" value="Save" />
|
||||
</form>
|
||||
</article>
|
||||
|
||||
<link type="text/css" rel="stylesheet" href="~/css/Admin.css" />
|
||||
<style type="text/css">
|
||||
form {
|
||||
max-width: initial;
|
||||
}
|
||||
|
||||
textarea {
|
||||
min-height: 500px;
|
||||
}
|
||||
</style>
|
||||
@@ -0,0 +1,24 @@
|
||||
@model MyWebsite.Models.Resume
|
||||
@{
|
||||
ViewData["Title"] = "Delete resume";
|
||||
}
|
||||
|
||||
<header>
|
||||
<p> <a asp-action="Index">Back to the list</a></p>
|
||||
<h1>Delete resume</h1>
|
||||
<h3>Are you sure you want to delete this?</h3>
|
||||
</header>
|
||||
|
||||
<article>
|
||||
<p class="form-group">
|
||||
<b>@Html.DisplayNameFor(model => model.Language):</b> @Model.Language<br />
|
||||
<b>@Html.DisplayNameFor(model => model.LastUpdate):</b> @Model.LastUpdate<br />
|
||||
</p>
|
||||
|
||||
<form asp-action="Delete">
|
||||
<input hidden asp-for="Language" />
|
||||
<input type="submit" value="Delete" class="btn-danger" />
|
||||
</form>
|
||||
</article>
|
||||
|
||||
<link type="text/css" rel="stylesheet" href="~/css/Admin.css" />
|
||||
@@ -0,0 +1,37 @@
|
||||
@model MyWebsite.Models.Resume
|
||||
|
||||
@{
|
||||
ViewData["Title"] = "Edit resume";
|
||||
}
|
||||
|
||||
<header>
|
||||
<p> <a asp-action="Index">Back to the list</a></p>
|
||||
<h1>Edit resume</h1>
|
||||
</header>
|
||||
|
||||
<article>
|
||||
<form asp-action="Edit">
|
||||
<div asp-validation-summary="ModelOnly" class="text-danger"></div>
|
||||
<div>
|
||||
<label asp-for="Language"></label>
|
||||
<input type="text" asp-for="Language" readonly class="readonly" />
|
||||
</div>
|
||||
<div>
|
||||
<label asp-for="Content"></label>
|
||||
<textarea asp-for="Content" spellcheck="false"></textarea>
|
||||
<span asp-validation-for="Content" class="text-danger"></span>
|
||||
</div>
|
||||
<br />
|
||||
<input type="submit" value="Save" />
|
||||
</form>
|
||||
</article>
|
||||
|
||||
<link type="text/css" rel="stylesheet" href="~/css/Admin.css" />
|
||||
<style type="text/css">
|
||||
form {
|
||||
max-width: initial;
|
||||
}
|
||||
textarea {
|
||||
min-height: 500px;
|
||||
}
|
||||
</style>
|
||||
@@ -1,6 +1,7 @@
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
using MyWebsite.Models;
|
||||
using SelectPdf;
|
||||
using System.Globalization;
|
||||
|
||||
namespace MyWebsite.Controllers
|
||||
{
|
||||
@@ -10,10 +11,10 @@ namespace MyWebsite.Controllers
|
||||
Startup.Database = context;
|
||||
|
||||
public IActionResult Index() =>
|
||||
View(Startup.Database.Resume.Find("en-US"));
|
||||
View(Startup.Database.Resume.Find(CultureInfo.CurrentUICulture.Name));
|
||||
|
||||
public IActionResult Print() =>
|
||||
View(Startup.Database.Resume.Find("en-US"));
|
||||
View(Startup.Database.Resume.Find(CultureInfo.CurrentUICulture.Name));
|
||||
|
||||
public IActionResult Download()
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user