Browse Source

dovomin profile editor nearly done

confirmation-email
Milad Karbasizadeh 11 years ago
parent
commit
a338264345
10 changed files with 189 additions and 3 deletions
  1. +8
    -0
      Sevomin.Models/DovominViewModel.cs
  2. +5
    -0
      Sevomin.WebFrontend/App_Start/RouteConfig.cs
  3. +26
    -1
      Sevomin.WebFrontend/Content/common.css
  4. BIN
      Sevomin.WebFrontend/Content/images/revert-logo.png
  5. +2
    -0
      Sevomin.WebFrontend/Sevomin.WebFrontend.csproj
  6. +82
    -2
      Sevomin.WebFrontend/Views/Account/ProfileDovomin.cshtml
  7. +34
    -0
      Sevomin.WebFrontend/Views/Shared/DovominParameterViewModel.cshtml
  8. +1
    -0
      Sevomin.WebFrontend/Views/Shared/Intro.cshtml
  9. +30
    -0
      Sevomin.WebFrontend/Views/Shared/Navbar.cshtml
  10. +1
    -0
      Sevomin.WebFrontend/Views/Shared/_Layout.cshtml

+ 8
- 0
Sevomin.Models/DovominViewModel.cs View File

@ -16,6 +16,14 @@ namespace Sevomin.Models
[StringLength(128)] [StringLength(128)]
public string Id { get; set; } public string Id { get; set; }
public string DisplayName
{
get
{
return string.Format("{0} {1}", this.FirstName, this.LastName);
}
}
[DisplayName("نام")] [DisplayName("نام")]
public string FirstName { get; set; } public string FirstName { get; set; }


+ 5
- 0
Sevomin.WebFrontend/App_Start/RouteConfig.cs View File

@ -30,6 +30,11 @@ namespace Sevomin.WebFrontend
url: "check-username", url: "check-username",
defaults: new { controller = "Account", action = "CheckUsername" } defaults: new { controller = "Account", action = "CheckUsername" }
); );
routes.MapRoute(
name: "ProfileEditor",
url: "my-profile",
defaults: new { controller = "Account", action = "MyProfile" }
);
#endregion #endregion
#region For Jobs #region For Jobs


+ 26
- 1
Sevomin.WebFrontend/Content/common.css View File

@ -13,9 +13,10 @@
body{ body{
font-family: Yekan, "Helvetica Neue",Helvetica,Arial,sans-serif; 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; 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{ .ltr{
direction: ltr; direction: ltr;
text-align: left; 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;
} }

BIN
Sevomin.WebFrontend/Content/images/revert-logo.png View File

Before After
Width: 302  |  Height: 302  |  Size: 4.6 KiB

+ 2
- 0
Sevomin.WebFrontend/Sevomin.WebFrontend.csproj View File

@ -125,6 +125,7 @@
<Content Include="Content\bootstrap.min.css" /> <Content Include="Content\bootstrap.min.css" />
<Content Include="Content\common.css" /> <Content Include="Content\common.css" />
<Content Include="Content\forms.css" /> <Content Include="Content\forms.css" />
<Content Include="Content\images\revert-logo.png" />
<Content Include="Content\themes\base\images\animated-overlay.gif" /> <Content Include="Content\themes\base\images\animated-overlay.gif" />
<Content Include="Content\themes\base\images\ui-bg_flat_0_aaaaaa_40x100.png" /> <Content Include="Content\themes\base\images\ui-bg_flat_0_aaaaaa_40x100.png" />
<Content Include="Content\themes\base\images\ui-bg_flat_75_ffffff_40x100.png" /> <Content Include="Content\themes\base\images\ui-bg_flat_75_ffffff_40x100.png" />
@ -241,6 +242,7 @@
<Content Include="Views\Shared\JobParameterViewModel.cshtml" /> <Content Include="Views\Shared\JobParameterViewModel.cshtml" />
<Content Include="Views\Account\ProfileAvalin.cshtml" /> <Content Include="Views\Account\ProfileAvalin.cshtml" />
<Content Include="Views\Account\ProfileDovomin.cshtml" /> <Content Include="Views\Account\ProfileDovomin.cshtml" />
<Content Include="Views\Shared\Navbar.cshtml" />
<None Include="Web.Debug.config"> <None Include="Web.Debug.config">
<DependentUpon>Web.config</DependentUpon> <DependentUpon>Web.config</DependentUpon>
</None> </None>


+ 82
- 2
Sevomin.WebFrontend/Views/Account/ProfileDovomin.cshtml View File

@ -1,5 +1,85 @@
@{
@model Sevomin.Models.DovominViewModel
@{
ViewBag.Title = "ProfileDovomin"; ViewBag.Title = "ProfileDovomin";
} }
<h2>ProfileDovomin</h2>
<div class="page-header rtl">
<h1>ویرایش پروفایل <small>@Model.DisplayName</small></h1>
</div>
@using (Html.BeginForm("ProfileDovomin", "Account", FormMethod.Post, new { role = "form", @class = "assess-inputs" }))
{
<div class="row" style="margin-bottom: 20px">
<div class="col-md-12">
<button type="submit" class="btn btn-primary pull-left">به روز رسانی پروفایل</button>
</div>
</div>
<div class="row rtl">
<div class="panel panel-default">
<div class="panel-body">
<div class="col-md-6">
<div class="form-group">
@Html.LabelFor(model => model.EnglishResume)
<input type="file" name="EnglishResume" />
</div>
<div class="form-group">
@Html.LabelFor(model => model.PersianResume)
<input type="file" name="PersianResume" />
</div>
<div class="form-group">
@Html.LabelFor(model => model.Description)
@Html.TextAreaFor(model => model.Description, new { @class = "form-control" })
</div>
</div>
<div class="col-md-6">
<div class="form-group">
@Html.LabelFor(model => model.FirstName)
@Html.TextBoxFor(model => model.FirstName, new { @class = "form-control" })
</div>
<div class="form-group">
@Html.LabelFor(model => model.LastName)
@Html.TextBoxFor(model => model.LastName, new { @class = "form-control" })
</div>
<div class="form-group">
@Html.LabelFor(model => model.JalaliBirthDate)
@Html.TextBoxFor(model => model.JalaliBirthDate, new { @class = "form-control datepickerify" })
</div>
<div class="checkbox">
<label>
@Html.DisplayNameFor(model => model.IsFullTime) @Html.CheckBoxFor(model => model.IsFullTime)
</label>
</div>
<div class="checkbox">
<label>
@Html.DisplayNameFor(model => model.IsPartTime) @Html.CheckBoxFor(model => model.IsPartTime)
</label>
</div>
</div>
</div>
</div>
</div>
<div class="row rtl">
<div class="panel panel-default">
<div class="panel-body">
<div class="alert alert-info"><strong>سلام</strong> چطورین؟</div>
<div class="col-md-12">
@foreach (var category in Model.Parameters.GroupBy(m => m.GroupName))
{
<div class="panel panel-default">
<div class="panel-body">
<h3>@category.Key</h3>
@foreach (var item in category)
{
@Html.Partial("DovominParameterViewModel", item)
}
</div>
</div>
}
</div>
</div>
</div>
</div>
<div class="clearfix">
<button type="submit" class="btn btn-primary pull-left">به روز رسانی پروفایل</button>
</div>
}

+ 34
- 0
Sevomin.WebFrontend/Views/Shared/DovominParameterViewModel.cshtml View File

@ -0,0 +1,34 @@
@model Sevomin.Models.DovominParameterViewModel
@{ string paramId = string.Format("value-{0}", Model.ParameterId.ToString()); }
<div class="form-group">
<div class="row">
<div class="col-md-3 pull-right">
@Html.Label(Model.ParameterName)
@if (!string.IsNullOrWhiteSpace(Model.CommentDovomin))
{
<span class="glyphicon glyphicon-exclamation-sign form-help" data-toggle="tooltip" data-for="@paramId" data-placement="top" title="@Model.CommentDovomin"></span>
}
</div>
<div class="col-md-4 pull-right">
@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;
}
</div>
</div>
</div>

+ 1
- 0
Sevomin.WebFrontend/Views/Shared/Intro.cshtml View File

@ -14,6 +14,7 @@
</head> </head>
<body> <body>
<div class="container"> <div class="container">
@Html.Partial("Navbar")
@Html.Partial("IntroSignup") @Html.Partial("IntroSignup")
</div> </div>
<script src="@Url.Content("~/scripts/jquery-2.1.0.min.js")"></script> <script src="@Url.Content("~/scripts/jquery-2.1.0.min.js")"></script>


+ 30
- 0
Sevomin.WebFrontend/Views/Shared/Navbar.cshtml View File

@ -0,0 +1,30 @@
<nav class="navbar navbar-fixed-top" role="navigation">
<div class="container">
<div class="navbar-header">
<button type="button" class="navbar-toggle" data-toggle="collapse" data-target="#collapse">
<span class="sr-only">Toggle navigation</span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
<a class="navbar-brand" href="#">
<img src="@Url.Content("~/content/images/revert-logo.png")" /></a>
</div>
<div class="collapse navbar-collapse navbar-right" id="collapse">
<ul class="nav navbar-nav navbar-right">
@if (Request.IsAuthenticated) {
<li class="rtl"><a href="@Url.Action("Logout", "Account")">خروج از سایت</a></li>
<li class="rtl"><a href="@Url.Action("MyProfile", "Account")"><span class="glyphicon glyphicon-user"></span> ویرایش پروفایل</a></li>
}
else {
<li class="rtl"><a href="@Url.Action("Login", "Account")">ورود به سایت</a></li>
}
<li class="rtl"><a href="#">تماس با ما</a></li>
<li class="rtl"><a href="#">درباره ما</a></li>
<li class="rtl"><a href="#">مشخصات متخصصین</a></li>
<li class="rtl"><a href="#">آگهی های استخدام</a></li>
<li class="rtl"><a href="#"><span class="glyphicon glyphicon-home"></span> خانه</a></li>
</ul>
</div>
</div>
</nav>

+ 1
- 0
Sevomin.WebFrontend/Views/Shared/_Layout.cshtml View File

@ -12,6 +12,7 @@
</head> </head>
<body> <body>
<div class="container"> <div class="container">
@Html.Partial("Navbar")
@RenderBody() @RenderBody()
</div> </div>
<script src="@Url.Content("~/scripts/jquery-2.1.0.min.js")"></script> <script src="@Url.Content("~/scripts/jquery-2.1.0.min.js")"></script>


Loading…
Cancel
Save