Add style to edit and delete in category view

This commit is contained in:
Damian Lasecki 2018-12-19 21:12:04 +01:00
parent 15830cf648
commit fd836b41b5
4 changed files with 147 additions and 135 deletions

View File

@ -302,75 +302,85 @@ textarea {
background-color: #f2f2f2; background-color: #f2f2f2;
} }
.delete-category__span{
font-size:2rem;
font-weight:400;
margin-bottom:10rem;
}
.delete-category__dl {
height: 3rem;
@media (min-width: 768px) { margin-bottom: 3rem;
.navbar > .container {
height: 10rem;
}
.navbar-header {
height: 100%;
display: flex;
align-items: center;
}
.navbar-brand {
font-size: 3.5rem;
}
.navbar-nav {
height: 100px;
display: flex;
align-items: center;
}
.navbar-nav > li {
height: 50%;
}
.navbar-nav > li > a {
height: 100%;
border-radius: 0.8rem;
}
.nav > li > a:hover, .nav > li > a:focus {
transition: background-color .1s ease;
}
.category-list {
grid-template-columns: 1fr 1fr;
grid-column-gap: 2rem;
}
.single-category-wrapper {
width: 65%;
margin: 0 auto;
}
.form-AddQuestion__btn {
flex-direction: row;
margin-top: 1rem;
}
.form-personal-data{
flex-direction: row;
}
.form-personal-data .form-group {
width: 49%;
}
.form-AddQuestion input[type=submit] {
margin-top:0;
}
} }
@media (min-width: 768px) {
.navbar > .container {
height: 10rem;
}
.navbar-header {
height: 100%;
display: flex;
align-items: center;
}
.navbar-brand {
font-size: 3.5rem;
}
.navbar-nav {
height: 100px;
display: flex;
align-items: center;
}
.navbar-nav > li {
height: 50%;
}
.navbar-nav > li > a {
height: 100%;
border-radius: 0.8rem;
}
.nav > li > a:hover, .nav > li > a:focus {
transition: background-color .1s ease;
}
.category-list {
grid-template-columns: 1fr 1fr;
grid-column-gap: 2rem;
}
.single-category-wrapper {
width: 65%;
margin: 0 auto;
}
.form-AddQuestion__btn {
flex-direction: row;
margin-top: 1rem;
}
.form-personal-data {
flex-direction: row;
}
.form-personal-data .form-group {
width: 49%;
}
.form-AddQuestion input[type=submit] {
margin-top: 0;
}
}

View File

@ -4,29 +4,31 @@
ViewBag.Title = "Delete"; ViewBag.Title = "Delete";
} }
<h2>Delete</h2> <div class="single-category-wrapper">
<h2>Usuwanie ketegorii</h2>
<h3>Are you sure you want to delete this?</h3> <hr style="border-top: 1px solid #d3d3d3;" />
<div>
<h4>Category</h4> <span class="delete-category__span">Jesteś pewien, że chcesz usunąć kategorię?</span>
<hr /> <div style="margin-top: 3rem;">
<dl class="dl-horizontal">
<dt> <dl class="dl-horizontal delete-category__dl">
@Html.DisplayNameFor(model => model.CategoryName) <dt style="text-align:left">
</dt> @Html.DisplayNameFor(model => model.CategoryName)
</dt>
<dd> <dd style="margin-left:0;">
@Html.DisplayFor(model => model.CategoryName) @Html.DisplayFor(model => model.CategoryName)
</dd> </dd>
</dl>
</dl>
@using (Html.BeginForm())
@using (Html.BeginForm()) { {
@Html.AntiForgeryToken() @Html.AntiForgeryToken()
<div class="form-actions no-color"> <div class="form-actions no-color">
<input type="submit" value="Delete" class="btn btn-default" /> | <input type="submit" value="Usuń" class="answer-list__add-btn" style="height:4rem; width:17rem; background-color:#af4f4f; margin-bottom: 3rem;" />
@Html.ActionLink("Back to List", "Index") </div>
</div> <div>@Html.ActionLink("Powrót do listy kategorii", "Index")
} </div>
</div> }
</div>
</div>

View File

@ -4,39 +4,39 @@
ViewBag.Title = "Edit"; ViewBag.Title = "Edit";
} }
<h2>Edit</h2> <div class="single-category-wrapper">
<h2>Edytuj nazwię kategorii</h2>
@using (Html.BeginForm()) <hr style="border-top: 1px solid #d3d3d3; margin-bottom: 3rem;" />
{
@Html.AntiForgeryToken()
<div class="form-horizontal"> @using (Html.BeginForm())
<h4>Category</h4> {
<hr /> @Html.AntiForgeryToken()
@Html.ValidationSummary(true, "", new { @class = "text-danger" })
@Html.HiddenFor(model => model.Id) <div class="form-horizontal">
<div class="form-group"> @Html.ValidationSummary(true, "", new { @class = "text-danger" })
@Html.LabelFor(model => model.CategoryName, htmlAttributes: new { @class = "control-label col-md-2" }) @Html.HiddenFor(model => model.Id)
<div class="col-md-10"> <div class="form-group">
@Html.EditorFor(model => model.CategoryName, new { htmlAttributes = new { @class = "form-control" } }) @Html.LabelFor(model => model.CategoryName, htmlAttributes: new { @class = "control-label col-md-2" })
@Html.ValidationMessageFor(model => model.CategoryName, "", new { @class = "text-danger" }) <div class="col-md-10">
</div> @Html.EditorFor(model => model.CategoryName, new { htmlAttributes = new { @class = "form-control" } })
</div> @Html.ValidationMessageFor(model => model.CategoryName, "", new { @class = "text-danger" })
</div>
<div class="form-group"> </div>
<div class="col-md-offset-2 col-md-10"> <div class="form-group">
<input type="submit" value="Save" class="btn btn-default" /> <div class="col-md-offset-2 col-md-10">
</div> <input type="submit" value="Zapisz" class="answer-list__add-btn" style="height:4rem; width:17rem" />
</div> </div>
</div> </div>
} </div>
}
<div> <div>
@Html.ActionLink("Back to List", "Index") @Html.ActionLink("Powrót do listy kategorii", "Index")
</div> </div>
</div>
@section Scripts { @section Scripts {
@Scripts.Render("~/bundles/jqueryval") @Scripts.Render("~/bundles/jqueryval")
} }

View File

@ -1,9 +1,9 @@
@model IEnumerable<Forum.DataAccessLayer.Models.Category> @model IEnumerable<Forum.DataAccessLayer.Models.Category>
@{ @{
ViewBag.Title = "Index"; ViewBag.Title = "Index";
} }
<div class="single-category-wrapper"> <div class="single-category-wrapper">
<h2 style="margin-bottom:3rem;">Kategorie</h2> <h2 style="margin-bottom:3rem;">Kategorie</h2>