From fd836b41b5c07ec0a95b2b34839baf3f417b196c Mon Sep 17 00:00:00 2001 From: Damian Lasecki Date: Wed, 19 Dec 2018 21:12:04 +0100 Subject: [PATCH] Add style to edit and delete in category view --- Trunk/Server/Forum/Forum/Content/Site.css | 144 ++++++++++-------- .../Forum/Views/Categories/Delete.cshtml | 54 +++---- .../Forum/Forum/Views/Categories/Edit.cshtml | 72 ++++----- .../Forum/Forum/Views/Categories/Index.cshtml | 12 +- 4 files changed, 147 insertions(+), 135 deletions(-) diff --git a/Trunk/Server/Forum/Forum/Content/Site.css b/Trunk/Server/Forum/Forum/Content/Site.css index f96c51f..2405fa1 100644 --- a/Trunk/Server/Forum/Forum/Content/Site.css +++ b/Trunk/Server/Forum/Forum/Content/Site.css @@ -302,75 +302,85 @@ textarea { background-color: #f2f2f2; } +.delete-category__span{ + font-size:2rem; + font-weight:400; + margin-bottom:10rem; +} - - -@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; - } - +.delete-category__dl { + height: 3rem; + margin-bottom: 3rem; } + @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; + } + } + + + diff --git a/Trunk/Server/Forum/Forum/Views/Categories/Delete.cshtml b/Trunk/Server/Forum/Forum/Views/Categories/Delete.cshtml index 720b447..2b1bc48 100644 --- a/Trunk/Server/Forum/Forum/Views/Categories/Delete.cshtml +++ b/Trunk/Server/Forum/Forum/Views/Categories/Delete.cshtml @@ -4,29 +4,31 @@ ViewBag.Title = "Delete"; } -

Delete

- -

Are you sure you want to delete this?

-
-

Category

-
-
-
- @Html.DisplayNameFor(model => model.CategoryName) -
- -
- @Html.DisplayFor(model => model.CategoryName) -
- -
- - @using (Html.BeginForm()) { - @Html.AntiForgeryToken() - -
- | - @Html.ActionLink("Back to List", "Index") -
- } -
+
+

Usuwanie ketegorii

+
+ + Jesteś pewien, że chcesz usunąć kategorię? +
+ +
+
+ @Html.DisplayNameFor(model => model.CategoryName) +
+
+ @Html.DisplayFor(model => model.CategoryName) +
+
+ + @using (Html.BeginForm()) + { + @Html.AntiForgeryToken() + +
+ +
+
@Html.ActionLink("Powrót do listy kategorii", "Index") +
+ } +
+
diff --git a/Trunk/Server/Forum/Forum/Views/Categories/Edit.cshtml b/Trunk/Server/Forum/Forum/Views/Categories/Edit.cshtml index e21ea07..b9fb92d 100644 --- a/Trunk/Server/Forum/Forum/Views/Categories/Edit.cshtml +++ b/Trunk/Server/Forum/Forum/Views/Categories/Edit.cshtml @@ -4,39 +4,39 @@ ViewBag.Title = "Edit"; } -

Edit

- - -@using (Html.BeginForm()) -{ - @Html.AntiForgeryToken() - -
-

Category

-
- @Html.ValidationSummary(true, "", new { @class = "text-danger" }) - @Html.HiddenFor(model => model.Id) - -
- @Html.LabelFor(model => model.CategoryName, htmlAttributes: new { @class = "control-label col-md-2" }) -
- @Html.EditorFor(model => model.CategoryName, new { htmlAttributes = new { @class = "form-control" } }) - @Html.ValidationMessageFor(model => model.CategoryName, "", new { @class = "text-danger" }) -
-
- -
-
- -
-
-
-} - -
- @Html.ActionLink("Back to List", "Index") -
- -@section Scripts { - @Scripts.Render("~/bundles/jqueryval") -} +
+ +

Edytuj nazwię kategorii

+
+ + + + @using (Html.BeginForm()) + { + @Html.AntiForgeryToken() + +
+ + @Html.ValidationSummary(true, "", new { @class = "text-danger" }) + @Html.HiddenFor(model => model.Id) +
+ @Html.LabelFor(model => model.CategoryName, htmlAttributes: new { @class = "control-label col-md-2" }) +
+ @Html.EditorFor(model => model.CategoryName, new { htmlAttributes = new { @class = "form-control" } }) + @Html.ValidationMessageFor(model => model.CategoryName, "", new { @class = "text-danger" }) +
+
+
+
+ +
+
+
+ } +
+ @Html.ActionLink("Powrót do listy kategorii", "Index") +
+
+ @section Scripts { + @Scripts.Render("~/bundles/jqueryval") + } diff --git a/Trunk/Server/Forum/Forum/Views/Categories/Index.cshtml b/Trunk/Server/Forum/Forum/Views/Categories/Index.cshtml index a05b249..9d822a5 100644 --- a/Trunk/Server/Forum/Forum/Views/Categories/Index.cshtml +++ b/Trunk/Server/Forum/Forum/Views/Categories/Index.cshtml @@ -1,9 +1,9 @@ -@model IEnumerable - -@{ - ViewBag.Title = "Index"; -} - +@model IEnumerable + +@{ + ViewBag.Title = "Index"; +} +

Kategorie