Browse Source

job create view almost done

confirmation-email
Milad Karbasizadeh 11 years ago
parent
commit
254f618cc9
3 changed files with 39 additions and 4 deletions
  1. +2
    -0
      Sevomin.WebFrontend/Sevomin.WebFrontend.csproj
  2. +9
    -4
      Sevomin.WebFrontend/Views/Job/JobEditor.cshtml
  3. +28
    -0
      Sevomin.WebFrontend/Views/Shared/EditorTemplates/JobParameterViewModel.cshtml

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

@ -238,6 +238,8 @@
<Content Include="Views\Account\Login.cshtml" /> <Content Include="Views\Account\Login.cshtml" />
<Content Include="Views\Job\JobEditor.cshtml" /> <Content Include="Views\Job\JobEditor.cshtml" />
<Content Include="Views\Job\NewJob.cshtml" /> <Content Include="Views\Job\NewJob.cshtml" />
<Content Include="Views\Shared\EditorTemplates\JobParameterViewModel.cshtml" />
<Content Include="Views\Job\JobParametersEditor.cshtml" />
<None Include="Web.Debug.config"> <None Include="Web.Debug.config">
<DependentUpon>Web.config</DependentUpon> <DependentUpon>Web.config</DependentUpon>
</None> </None>


+ 9
- 4
Sevomin.WebFrontend/Views/Job/JobEditor.cshtml View File

@ -1,5 +1,4 @@
@model Sevomin.Models.JobViewModel @model Sevomin.Models.JobViewModel
@using (Html.BeginForm("", "", FormMethod.Post, new { role = "form" })) @using (Html.BeginForm("", "", FormMethod.Post, new { role = "form" }))
{ {
<div class="row rtl"> <div class="row rtl">
@ -56,9 +55,15 @@
<div class="panel panel-default"> <div class="panel panel-default">
<div class="panel-heading">مشخصات اضافه آگهی</div> <div class="panel-heading">مشخصات اضافه آگهی</div>
<div class="panel-body"> <div class="panel-body">
<div class="col-md-6">
</div>
<div class="col-md-6">
<div class="col-md-12">
@foreach(var category in Model.Parameters.GroupBy(m => m.GroupName)){
@category.Key
foreach (var item in category)
{
@Html.EditorFor(m => item)
}
}
</div> </div>
</div> </div>
</div> </div>


+ 28
- 0
Sevomin.WebFrontend/Views/Shared/EditorTemplates/JobParameterViewModel.cshtml View File

@ -0,0 +1,28 @@
@model Sevomin.Models.JobParameterViewModel
@{ string paramId = string.Format("value-", Model.ParameterId.ToString()); }
@Html.Label(Model.ParameterName)
<div class="form-group">
@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)
break;
case 4:
@Html.DropDownList(paramId, new SelectList(Model.ParameterValues, "item1", "item2"))
break;
default:
@MvcHtmlString.Empty
break;
}
@if (Model.HasMoscow)
{
<p>this should take moscow</p>
}
</div>

Loading…
Cancel
Save