From a3382643458118200329ec801e3b313007e89fd7 Mon Sep 17 00:00:00 2001 From: Milad Karbasizadeh Date: Sun, 30 Mar 2014 16:21:41 +0430 Subject: [PATCH] dovomin profile editor nearly done --- Sevomin.Models/DovominViewModel.cs | 8 ++ Sevomin.WebFrontend/App_Start/RouteConfig.cs | 5 ++ Sevomin.WebFrontend/Content/common.css | 27 +++++- .../Content/images/revert-logo.png | Bin 0 -> 4760 bytes .../Sevomin.WebFrontend.csproj | 2 + .../Views/Account/ProfileDovomin.cshtml | 84 +++++++++++++++++- .../Shared/DovominParameterViewModel.cshtml | 34 +++++++ Sevomin.WebFrontend/Views/Shared/Intro.cshtml | 1 + .../Views/Shared/Navbar.cshtml | 30 +++++++ .../Views/Shared/_Layout.cshtml | 1 + 10 files changed, 189 insertions(+), 3 deletions(-) create mode 100644 Sevomin.WebFrontend/Content/images/revert-logo.png create mode 100644 Sevomin.WebFrontend/Views/Shared/DovominParameterViewModel.cshtml create mode 100644 Sevomin.WebFrontend/Views/Shared/Navbar.cshtml diff --git a/Sevomin.Models/DovominViewModel.cs b/Sevomin.Models/DovominViewModel.cs index e73088c..aa54e0d 100644 --- a/Sevomin.Models/DovominViewModel.cs +++ b/Sevomin.Models/DovominViewModel.cs @@ -16,6 +16,14 @@ namespace Sevomin.Models [StringLength(128)] public string Id { get; set; } + public string DisplayName + { + get + { + return string.Format("{0} {1}", this.FirstName, this.LastName); + } + } + [DisplayName("نام")] public string FirstName { get; set; } diff --git a/Sevomin.WebFrontend/App_Start/RouteConfig.cs b/Sevomin.WebFrontend/App_Start/RouteConfig.cs index a97f30a..9dd9e93 100644 --- a/Sevomin.WebFrontend/App_Start/RouteConfig.cs +++ b/Sevomin.WebFrontend/App_Start/RouteConfig.cs @@ -30,6 +30,11 @@ namespace Sevomin.WebFrontend url: "check-username", defaults: new { controller = "Account", action = "CheckUsername" } ); + routes.MapRoute( + name: "ProfileEditor", + url: "my-profile", + defaults: new { controller = "Account", action = "MyProfile" } + ); #endregion #region For Jobs diff --git a/Sevomin.WebFrontend/Content/common.css b/Sevomin.WebFrontend/Content/common.css index 3185960..124e8fb 100644 --- a/Sevomin.WebFrontend/Content/common.css +++ b/Sevomin.WebFrontend/Content/common.css @@ -13,9 +13,10 @@ body{ font-family: Yekan, "Helvetica Neue",Helvetica,Arial,sans-serif; + padding: 70px; } -h1, h2, h3, h4, h5, h6, .h1, .h2, .h3, .h4, .h5, .h6{ +.h1, .h2, .h3, .h4, .h5, .h6{ font-family: Koodak, "Helvetica Neue",Helvetica,Arial,sans-serif; } @@ -27,4 +28,28 @@ h1, h2, h3, h4, h5, h6, .h1, .h2, .h3, .h4, .h5, .h6{ .ltr{ direction: ltr; text-align: left; +} + +.navbar{ + height: 30px; + background: #5B9BD5; + height: 30px; + border-radius: 0px !important; +} + +.navbar .navbar-nav>li>a{ + color: white; +} + +.navbar .navbar-nav>li>a:hover{ + color: #E0E0E0; + background: #69B0EA; +} + +.navbar-brand{ + padding: 10px 15px 0px 15px !important; +} + +.navbar-brand img{ + height: 25px; } \ No newline at end of file diff --git a/Sevomin.WebFrontend/Content/images/revert-logo.png b/Sevomin.WebFrontend/Content/images/revert-logo.png new file mode 100644 index 0000000000000000000000000000000000000000..fee7747e1009a3e17c067a2fec7fec3b5d7a0dc2 GIT binary patch literal 4760 zcmZA3XH*kS+XwJPdPk%Ph|&b4gbsrA(5sY~0704%gqtb~1VM^)q)Io4N-vQbLsL3R z6_gq}0R#kYDT34opZ7c;_WhkRJ3H5howNU$-7~RwO?2sLIB5U?px4*aG6w(>$lpdq zdQqXwWAwS`sJ->99svODmA{Py$a!@Y0BB4fLZNr>x_bF}J#zK(=Fx{jdAxnSTps@8 z3;+RB7z>o8#TuK+!R(%tLoahyDjsvq_)wMHUKGuA&GH_NuuDV*Wi>V!=Y^9>h(33Hf z3#BX7yncB;qNlTafe29#qY>~1n5b$W@IE@_Cjkyal$AyKS}8vQBmv)Oseo4F+*ZkJ z(dUfon%PK_(B~wrekr#NsX|!*b#$U;5umO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zGi^-BE8K#*O>;6sq~n>y@YBC5!eNS#-~+Pcj>#e-O)PhWfmK5BxRJLzDddw6rO8>f z!`~D{A8oHsH7EFO3hQ)4`-y+&L*Bq0Wem)+#ieX%OF_tpXLGMbtqb}}NB!f+&(U&g zN4IS;i_SN^_kYz$jEr{oVZHF^fEU+NlYAck%c&H`K`h&rd(x=T3!8EOml%*$jvN0` z_}mBEd%uJIz94=b{lc!Ov3O;47Ey~NZ(D(c4*J4&bDEJ)hdzbly3k!Pou6GVVvd&$ zA41E?vELtTZ+p$$Xl~3y?;b}JPYbwwotrjA?LD?^r*t>$8_gk~n5q^Z71~bJ&NkIC zj>Y;F-j^1%?^-tabk(Q9{~><`W=*8JAJ!Vz19KtSciSE@LEIUExjp + @@ -241,6 +242,7 @@ + Web.config diff --git a/Sevomin.WebFrontend/Views/Account/ProfileDovomin.cshtml b/Sevomin.WebFrontend/Views/Account/ProfileDovomin.cshtml index 3fc5632..2e82bcf 100644 --- a/Sevomin.WebFrontend/Views/Account/ProfileDovomin.cshtml +++ b/Sevomin.WebFrontend/Views/Account/ProfileDovomin.cshtml @@ -1,5 +1,85 @@ -@{ +@model Sevomin.Models.DovominViewModel +@{ ViewBag.Title = "ProfileDovomin"; } -

ProfileDovomin

\ No newline at end of file + +@using (Html.BeginForm("ProfileDovomin", "Account", FormMethod.Post, new { role = "form", @class = "assess-inputs" })) +{ +
+
+ +
+
+
+
+
+
+
+ @Html.LabelFor(model => model.EnglishResume) + +
+
+ @Html.LabelFor(model => model.PersianResume) + +
+
+ @Html.LabelFor(model => model.Description) + @Html.TextAreaFor(model => model.Description, new { @class = "form-control" }) +
+
+
+
+ @Html.LabelFor(model => model.FirstName) + @Html.TextBoxFor(model => model.FirstName, new { @class = "form-control" }) +
+
+ @Html.LabelFor(model => model.LastName) + @Html.TextBoxFor(model => model.LastName, new { @class = "form-control" }) +
+
+ @Html.LabelFor(model => model.JalaliBirthDate) + @Html.TextBoxFor(model => model.JalaliBirthDate, new { @class = "form-control datepickerify" }) +
+
+ +
+
+ +
+
+
+
+
+
+
+
+
سلام چطورین؟
+
+ @foreach (var category in Model.Parameters.GroupBy(m => m.GroupName)) + { +
+
+

@category.Key

+ @foreach (var item in category) + { + @Html.Partial("DovominParameterViewModel", item) + } +
+
+ + } +
+
+
+
+
+ +
+} \ No newline at end of file diff --git a/Sevomin.WebFrontend/Views/Shared/DovominParameterViewModel.cshtml b/Sevomin.WebFrontend/Views/Shared/DovominParameterViewModel.cshtml new file mode 100644 index 0000000..014f942 --- /dev/null +++ b/Sevomin.WebFrontend/Views/Shared/DovominParameterViewModel.cshtml @@ -0,0 +1,34 @@ +@model Sevomin.Models.DovominParameterViewModel +@{ string paramId = string.Format("value-{0}", Model.ParameterId.ToString()); } +
+
+
+ @Html.Label(Model.ParameterName) + @if (!string.IsNullOrWhiteSpace(Model.CommentDovomin)) + { + + } +
+
+ @switch (Model.DisplayMethod) + { + case 1: + @Html.TextBox(paramId, string.Empty, new { @class = "form-control" }) + break; + case 2: + @Html.TextArea(paramId) + break; + case 3: + /* validator bezar baraye numeric gereftan */ + @Html.TextBox(paramId, string.Empty, new { @class = "form-control" }) + break; + case 4: + @Html.DropDownList(paramId, new SelectList(Model.ParameterValues, "item1", "item2"), Model.ParameterName, new { @class = "form-control" }) + break; + default: + @MvcHtmlString.Empty + break; + } +
+
+
\ No newline at end of file diff --git a/Sevomin.WebFrontend/Views/Shared/Intro.cshtml b/Sevomin.WebFrontend/Views/Shared/Intro.cshtml index 4c6218a..129f4a8 100644 --- a/Sevomin.WebFrontend/Views/Shared/Intro.cshtml +++ b/Sevomin.WebFrontend/Views/Shared/Intro.cshtml @@ -14,6 +14,7 @@
+ @Html.Partial("Navbar") @Html.Partial("IntroSignup")
diff --git a/Sevomin.WebFrontend/Views/Shared/Navbar.cshtml b/Sevomin.WebFrontend/Views/Shared/Navbar.cshtml new file mode 100644 index 0000000..ed92b47 --- /dev/null +++ b/Sevomin.WebFrontend/Views/Shared/Navbar.cshtml @@ -0,0 +1,30 @@ + diff --git a/Sevomin.WebFrontend/Views/Shared/_Layout.cshtml b/Sevomin.WebFrontend/Views/Shared/_Layout.cshtml index 2d12e78..2b1330d 100644 --- a/Sevomin.WebFrontend/Views/Shared/_Layout.cshtml +++ b/Sevomin.WebFrontend/Views/Shared/_Layout.cshtml @@ -12,6 +12,7 @@
+ @Html.Partial("Navbar") @RenderBody()