diff --git a/Areas/Identity/Pages/Account/Register.cshtml b/Areas/Identity/Pages/Account/Register.cshtml index a26269a..de7fa73 100644 --- a/Areas/Identity/Pages/Account/Register.cshtml +++ b/Areas/Identity/Pages/Account/Register.cshtml @@ -32,6 +32,11 @@ +
+ + + +
-

-

- - -

-

- diff --git a/Views/Posting/Created.cshtml b/Views/Posting/Created.cshtml deleted file mode 100644 index 6a20f2d..0000000 --- a/Views/Posting/Created.cshtml +++ /dev/null @@ -1,7 +0,0 @@ -@model Posts -@* - For more information on enabling MVC for empty projects, visit https://go.microsoft.com/fwlink/?LinkID=397860 -*@ -@{ -} -

Post @Model.Title Created

diff --git a/Views/Posting/Index.cshtml b/Views/Posting/Index.cshtml deleted file mode 100644 index 50ae8df..0000000 --- a/Views/Posting/Index.cshtml +++ /dev/null @@ -1,18 +0,0 @@ -@* - For more information on enabling MVC for empty projects, visit https://go.microsoft.com/fwlink/?LinkID=397860 -*@ -@{ - ViewData["Title"] = "All posts"; -} -

@ViewData["Title"]

- - - - - - - - - - - diff --git a/Views/Posts/Create.cshtml b/Views/Posts/Create.cshtml index 1b16c38..cf72ac5 100644 --- a/Views/Posts/Create.cshtml +++ b/Views/Posts/Create.cshtml @@ -5,13 +5,15 @@ Layout = "~/Views/Shared/_Layout.cshtml"; } +

Create

-

Post

+

Post


+
-
+
@@ -23,6 +25,13 @@
+
+ + + +
diff --git a/Views/Posts/Delete.cshtml b/Views/Posts/Delete.cshtml index 3659880..fc289ef 100644 --- a/Views/Posts/Delete.cshtml +++ b/Views/Posts/Delete.cshtml @@ -4,14 +4,15 @@ ViewData["Title"] = "Delete"; Layout = "~/Views/Shared/_Layout.cshtml"; } - +

Delete

Are you sure you want to delete this?

-
+
+

Post


-
+
@Html.DisplayNameFor(model => model.Title)
@@ -35,6 +36,6 @@ | - Back to List + Back to List
diff --git a/Views/Posts/DeleteComment.cshtml b/Views/Posts/DeleteComment.cshtml new file mode 100644 index 0000000..d933c66 --- /dev/null +++ b/Views/Posts/DeleteComment.cshtml @@ -0,0 +1,40 @@ +@model DoctorSystem.Models.Comment + +@{ + ViewData["Title"] = "Delete"; + Layout = "~/Views/Shared/_Layout.cshtml"; +} +
+

Delete

+ +

Are you sure you want to delete this comment?

+
+
+

Comment

+
+
+
+ @Html.DisplayNameFor(model => model.CreatedAt) +
+
+ @Html.DisplayFor(model => model.CreatedAt) +
+
+ @Html.DisplayNameFor(model => model.Text) +
+
+ @Html.DisplayFor(model => model.Text) +
+
+ @Html.DisplayNameFor(model => model.Post) +
+
+ @Html.DisplayFor(model => model.Post.Description) +
+
+ +
+ + | +
+
diff --git a/Views/Posts/Details.cshtml b/Views/Posts/Details.cshtml index 40e3db9..bebab8d 100644 --- a/Views/Posts/Details.cshtml +++ b/Views/Posts/Details.cshtml @@ -1,34 +1,93 @@ -@model DoctorSystem.Models.Post +@model DoctorSystem.Models.PostDetailViewModel @{ ViewData["Title"] = "Details"; Layout = "~/Views/Shared/_Layout.cshtml"; } - +

Details

- +
-

Post

+

Post


+
+ @Html.DisplayNameFor(model => model.Post.Creator) +
+
+ @Html.DisplayFor(model => model.Post.Creator.FullName) +
- @Html.DisplayNameFor(model => model.Title) + @Html.DisplayNameFor(model => model.Post.Title)
- @Html.DisplayFor(model => model.Title) + @Html.DisplayFor(model => model.Post.Title)
- @Html.DisplayNameFor(model => model.Description) + @Html.DisplayNameFor(model => model.Post.Description)
- @Html.DisplayFor(model => model.Description) + @Html.DisplayFor(model => model.Post.Description)
- @Html.DisplayNameFor(model => model.DateCreated) + @Html.DisplayNameFor(model => model.Post.DateCreated)
- @Html.DisplayFor(model => model.DateCreated) + @Html.DisplayFor(model => model.Post.DateCreated)
+ + + + + + + + + + + @foreach (var item in Model.Post.Comments) + { + + + + + + + } + +
+ @Html.DisplayNameFor(model => model.Post.Creator) + + @Html.DisplayNameFor(model => model.Text) + + Date Created +
+ @Html.DisplayFor(modelItem => item.Creator.FullName) + + @Html.DisplayFor(modelItem => item.Text) + + @Html.DisplayFor(modelItem => item.CreatedAt) + + @if (item.Creator.Email == User.Identity.Name) + { + EditComment| + DeleteComment + } +
+
+
+
+ +
+ + + +
+
+ +
+
+
diff --git a/Views/Posts/Edit.cshtml b/Views/Posts/Edit.cshtml index af049f1..479c188 100644 --- a/Views/Posts/Edit.cshtml +++ b/Views/Posts/Edit.cshtml @@ -4,14 +4,15 @@ ViewData["Title"] = "Edit"; Layout = "~/Views/Shared/_Layout.cshtml"; } - +

Edit

-

Post

+

Post


+
-
+
@@ -24,12 +25,6 @@
- @*ToDo-да махна възможността за редактиране на дата*@ -
- - - -
diff --git a/Views/Posts/EditComment.cshtml b/Views/Posts/EditComment.cshtml new file mode 100644 index 0000000..25902d9 --- /dev/null +++ b/Views/Posts/EditComment.cshtml @@ -0,0 +1,41 @@ +@model DoctorSystem.Models.Comment + +@{ + ViewData["Title"] = "Edit"; + Layout = "~/Views/Shared/_Layout.cshtml"; +} +
+

Edit

+ +

Comment

+
+
+
+
+ +
+ + @**@ + @*
+ + + +
*@ +
+ + + +
+
+ +
+ +
+
+ + +@section Scripts { + @{ + await Html.RenderPartialAsync("_ValidationScriptsPartial"); + } + } diff --git a/Views/Posts/Index.cshtml b/Views/Posts/Index.cshtml index 723089b..0fedd5b 100644 --- a/Views/Posts/Index.cshtml +++ b/Views/Posts/Index.cshtml @@ -4,12 +4,19 @@ ViewData["Title"] = "Index"; Layout = "~/Views/Shared/_Layout.cshtml"; } - +

Posts

-

Create New

+
+@using (Html.BeginForm()) +{ +

+ Find by Category: @Html.TextBox("SearchString") + +

+} @@ -19,9 +26,15 @@ + + @@ -34,13 +47,22 @@ + + } diff --git a/Views/Shared/_Layout.cshtml b/Views/Shared/_Layout.cshtml index 5824bf7..1eea4eb 100644 --- a/Views/Shared/_Layout.cshtml +++ b/Views/Shared/_Layout.cshtml @@ -23,7 +23,6 @@
-
@@ -38,7 +37,9 @@ - + + + -
-
-
- -
-
- -
-
-
- - + + --> + diff --git a/wwwroot/css/style.css b/wwwroot/css/style.css index 1d0b13a..7456388 100644 --- a/wwwroot/css/style.css +++ b/wwwroot/css/style.css @@ -13,8 +13,25 @@ Note: Licence under Creative Commons Attribution 3.0 #AboutUs { margin-top: -150px; + font-size: 20px; } +#AboutImg { + position: relative; + left: 470px; + top: -125px; +} +#createPost { + width: 100%; + border: 1px solid #f5f5f5; + min-height: 40px; + padding-left: 20px; + font-size: 13px; + padding-right: 80px; + -webkit-box-sizing: border-box; + -moz-box-sizing: border-box; + box-sizing: border-box; +} #registerForm { width: 100%; border: 1px solid #f5f5f5; @@ -31,7 +48,7 @@ Note: Licence under Creative Commons Attribution 3.0 width: 100%; border: 1px solid #f5f5f5; min-height: 40px; - padding-left: 20px; + padding-left: 14px; font-size: 13px; padding-right: 20px; -webkit-box-sizing: border-box; diff --git a/wwwroot/img/about.jpg b/wwwroot/img/about.jpg deleted file mode 100644 index 3069746..0000000 Binary files a/wwwroot/img/about.jpg and /dev/null differ
@Html.DisplayNameFor(model => model.Description) + @Html.DisplayNameFor(model => model.Creator) + @Html.DisplayNameFor(model => model.DateCreated) + @Html.DisplayNameFor(model => model.Category) +
@Html.DisplayFor(modelItem => item.Description) + @Html.DisplayFor(model => item.Creator.FullName) + @Html.DisplayFor(modelItem => item.DateCreated) - Edit | - Details | - Delete + @Html.DisplayFor(modelItem => item.Category.Name) + + @if (item.Creator.Email == User.Identity.Name) + { + Delete| + Edit| + } + Details