Automatically update creation and modification date
[wsti_pai.git] / Projects / Views / ProjectTasks / Edit.cshtml
index 8aad30484690682e67b9c66f7b3046d71c7c5d24..4a934bf609f6d55f4f39dc1af60be72054e26c4a 100644 (file)
@@ -1,10 +1,10 @@
 @model Projects.Models.ProjectTask
 
 @{
-    ViewBag.Title = "Edit";
+    ViewBag.Title = "Edycja zadania";
 }
 
-<h2>Edit</h2>
+<h2>@ViewBag.Title</h2>
 
 
 @using (Html.BeginForm())
     @Html.AntiForgeryToken()
     
     <div class="form-horizontal">
-        <h4>ProjectTask</h4>
+        <h4>Zadanie</h4>
         <hr />
         @Html.ValidationSummary(true, "", new { @class = "text-danger" })
         @Html.HiddenFor(model => model.id)
+        <div class="form-group">
+            <label class="control-label col-sm-2" for="createdAt">Wpis utworzony:</label>
+            <div class="col-sm-10">
+                <p class="form-control-static">@Html.DisplayFor(model => model.created_at)</p>
+                @Html.EditorFor(model => model.created_at, new { htmlAttributes = new { @class = "form-control", @type = "hidden" } })
+            </div>
+        </div>
+        <div class="form-group">
+            <label class="control-label col-sm-2" for="updatedAt">Ostatnio modyfikowany:</label>
+            <div class="col-sm-10">
+                <input type="text" class="form-control" id="updatedAt" placeholder="@Html.DisplayFor(model => model.updated_at)" readonly>
+            </div>
+        </div>
 
         <div class="form-group">
             @Html.LabelFor(model => model.project_id, "project_id", htmlAttributes: new { @class = "control-label col-md-2" })
             </div>
         </div>
 
-        <div class="form-group">
-            @Html.LabelFor(model => model.created_at, htmlAttributes: new { @class = "control-label col-md-2" })
-            <div class="col-md-10">
-                @Html.EditorFor(model => model.created_at, new { htmlAttributes = new { @class = "form-control" } })
-                @Html.ValidationMessageFor(model => model.created_at, "", new { @class = "text-danger" })
-            </div>
-        </div>
-
-        <div class="form-group">
-            @Html.LabelFor(model => model.updated_at, htmlAttributes: new { @class = "control-label col-md-2" })
-            <div class="col-md-10">
-                @Html.EditorFor(model => model.updated_at, new { htmlAttributes = new { @class = "form-control" } })
-                @Html.ValidationMessageFor(model => model.updated_at, "", new { @class = "text-danger" })
-            </div>
-        </div>
-
         <div class="form-group">
             @Html.LabelFor(model => model.task_status_id, "task_status_id", htmlAttributes: new { @class = "control-label col-md-2" })
             <div class="col-md-10">
 
         <div class="form-group">
             <div class="col-md-offset-2 col-md-10">
-                <input type="submit" value="Save" class="btn btn-default" />
+                <input type="submit" value="Zapisz" class="btn btn-default" />
             </div>
         </div>
     </div>
 }
 
 <div>
-    @Html.ActionLink("Back to List", "Index")
+    @Html.ActionLink("Powrót do listy", "Index")
 </div>
 
 @section Scripts {