Website Summary Files Commits Branches @commit @diff @stats
path: root / ExamTemplate / Web / Views
diff options
context:
space:
mode:
Commit7470da2719a404b344fec4d6b2fefd92f4ce22a5 (patch)
Author
 Syndamia <kamen.d.mladenov@protonmail.com>
2021-05-07 14:27:43 +0300
Committer
 Syndamia <kamen.d.mladenov@protonmail.com>
2021-05-07 14:27:43 +0300
Files2fd27618625fb58c238c468139f37a43731d6ac5 /ExamTemplate/Web/Views
it-kariera-exam-template-7470da2719a404b344fec4d6b2fefd92f4ce22a5.tar
it-kariera-exam-template-7470da2719a404b344fec4d6b2fefd92f4ce22a5.tar.gz
it-kariera-exam-template-7470da2719a404b344fec4d6b2fefd92f4ce22a5.zip
Parent380f4d5d6120dcdb36e904aae98dd2e24db8a974 (diff)
Implemented user profile page
diff --git a/ExamTemplate/Web/Views/Shared/_Navbar.cshtml b/ExamTemplate/Web/Views/Shared/_Navbar.cshtml
index cde4b15..7ae8f50 100644
--- a/ExamTemplate/Web/Views/Shared/_Navbar.cshtml
+++ b/ExamTemplate/Web/Views/Shared/_Navbar.cshtml
@@ -13,7 +13,9 @@
<section>
@if (SignInManager.IsSignedIn(User))
{
- <a asp-controller="User" asp-action="">@UserManager.GetUserName(User)</a>
+ <a asp-controller="User" asp-action="Profile" asp-route-username="@UserManager.GetUserName(User)">
+ @UserManager.GetUserName(User)
+ </a>
<form asp-controller="User" asp-action="Logout" method="post">
<input type="submit" value="Logout">
diff --git a/ExamTemplate/Web/Views/User/Profile.cshtml b/ExamTemplate/Web/Views/User/Profile.cshtml
new file mode 100644
index 0000000..279de82
--- /dev/null
+++ b/ExamTemplate/Web/Views/User/Profile.cshtml
@@ -0,0 +1,13 @@
+@model UserViewModel
+@{
+ ViewData["Title"] = Model.Username + "'s Profile";
+}
+
+<p>
+ <h2>
+ @Model.FirstName @Model.LastName
+ </h2>
+ <div>
+ @Model.Username
+ </div>
+</p>
diff --git a/ExamTemplate/Web/Views/_ViewImports.cshtml b/ExamTemplate/Web/Views/_ViewImports.cshtml
index fcc5117..18502e4 100644
--- a/ExamTemplate/Web/Views/_ViewImports.cshtml
+++ b/ExamTemplate/Web/Views/_ViewImports.cshtml
@@ -1,4 +1,5 @@
@using ExamTemplate.Web
@using ExamTemplate.Web.Models
+@using ExamTemplate.Web.Models.User
@using ExamTemplate.Data.Models
@addTagHelper *, Microsoft.AspNetCore.Mvc.TagHelpers