Add project files.
This commit is contained in:
@@ -0,0 +1,33 @@
|
||||
@using atakanozbancom.Models.classes
|
||||
@model List<myprojects>
|
||||
|
||||
|
||||
@{
|
||||
ViewBag.Title = "index";
|
||||
Layout = "~/Views/Shared/_AdminLayout.cshtml";
|
||||
}
|
||||
|
||||
<h2 class="text-white mt-3 mb-3">Posts</h2>
|
||||
|
||||
<table class="table table-bordered mt-3">
|
||||
<tr class="bg-dark text-white">
|
||||
<th class="bg-dark text-white">ID</th>
|
||||
<th class="bg-dark text-white">Title</th>
|
||||
<th class="bg-dark text-white">Description</th>
|
||||
<th class="bg-dark text-white">Edit</th>
|
||||
<th class="bg-dark text-white">Delete</th>
|
||||
</tr>
|
||||
@foreach (var x in Model)
|
||||
{
|
||||
<tr>
|
||||
<td class="bg-dark text-white">@x.id</td>
|
||||
<td class="bg-dark text-white">@x.title</td>
|
||||
<td class="bg-dark text-white">@x.description</td>
|
||||
<td class="bg-dark text-white"><a href="/admin/myprojectsget/@x.id" class="btn btn-primary">Edit</a></td>
|
||||
<td class="bg-dark text-white"><a href="/admin/myprojectsdelete/@x.id " class="btn btn-danger">Delete</a></td>
|
||||
</tr>
|
||||
}
|
||||
|
||||
</table>
|
||||
<a href="/admin/newmppost" class="btn btn-primary">Create New Post</a>
|
||||
|
||||
@@ -0,0 +1,69 @@
|
||||
@model atakanozbancom.Models.classes.AdminMyProjectsEditVM
|
||||
|
||||
@{
|
||||
ViewBag.Title = "myprojectsget";
|
||||
Layout = "~/Views/Shared/_AdminLayout.cshtml";
|
||||
}
|
||||
|
||||
<h2 class="mt-3 text-white">My Projects Edit Post</h2>
|
||||
|
||||
@if (TempData["ok"] != null)
|
||||
{
|
||||
<div class="alert alert-success">@TempData["ok"]</div>
|
||||
}
|
||||
|
||||
<hr />
|
||||
|
||||
@using (Html.BeginForm("myprojectsget", "admin", FormMethod.Post, new { enctype = "multipart/form-data" }))
|
||||
{
|
||||
@Html.AntiForgeryToken()
|
||||
@Html.HiddenFor(m => m.id)
|
||||
|
||||
<div class="mb-3">
|
||||
@Html.LabelFor(m => m.id, new { @class = "text-white" })
|
||||
@Html.TextBoxFor(m => m.id, new { @class = "form-control bg-dark text-white", @readonly = "readonly" })
|
||||
</div>
|
||||
|
||||
<div class="mb-3">
|
||||
@Html.LabelFor(m => m.TitleEN, new { @class = "text-white" })
|
||||
@Html.TextBoxFor(m => m.TitleEN, new { @class = "form-control bg-dark text-white required" })
|
||||
</div>
|
||||
|
||||
<div class="mb-3">
|
||||
@Html.LabelFor(m => m.DescEN, new { @class = "text-white" })
|
||||
@Html.TextAreaFor(m => m.DescEN, new { @class = "form-control bg-dark text-white required", rows = "6" })
|
||||
</div>
|
||||
|
||||
if (!string.IsNullOrEmpty(Model.image))
|
||||
{
|
||||
<div class="mb-3">
|
||||
<label class="text-white">Current Image</label>
|
||||
<br />
|
||||
<img src="@Model.image" style="max-width:200px;" class="mb-2" />
|
||||
</div>
|
||||
}
|
||||
|
||||
<div class="mb-3">
|
||||
<label class="text-white">Change Image</label>
|
||||
<input type="file" name="file" class="form-control bg-dark text-white" />
|
||||
</div>
|
||||
|
||||
<div class="mb-3">
|
||||
@Html.LabelFor(m => m.iframe, new { @class = "text-white" })
|
||||
@Html.TextBoxFor(m => m.iframe, new { @class = "form-control bg-dark text-white" })
|
||||
</div>
|
||||
|
||||
<h3 class="mt-3 text-white">Translation (TR)</h3>
|
||||
|
||||
<div class="mb-3">
|
||||
@Html.LabelFor(m => m.TitleTR, new { @class = "text-white" })
|
||||
@Html.TextBoxFor(m => m.TitleTR, new { @class = "form-control bg-dark text-white required" })
|
||||
</div>
|
||||
|
||||
<div class="mb-3">
|
||||
@Html.LabelFor(m => m.DescTR, new { @class = "text-white" })
|
||||
@Html.TextAreaFor(m => m.DescTR, new { @class = "form-control bg-dark text-white required", rows = "6" })
|
||||
</div>
|
||||
|
||||
<button class="btn btn-success">Save</button>
|
||||
}
|
||||
@@ -0,0 +1,50 @@
|
||||
@model atakanozbancom.Models.classes.AdminMyProjectsEditVM
|
||||
@{
|
||||
ViewBag.Title = "Add New Project";
|
||||
Layout = "~/Views/Shared/_AdminLayout.cshtml";
|
||||
}
|
||||
|
||||
<h2 class="text-white mt-3">Add New My Projects Post</h2>
|
||||
@if (TempData["ok"] != null)
|
||||
{<div class="alert alert-success">@TempData["ok"]</div>}
|
||||
<br />
|
||||
|
||||
@using (Html.BeginForm("newmppost", "admin", FormMethod.Post,
|
||||
new { enctype = "multipart/form-data" }))
|
||||
{
|
||||
@Html.AntiForgeryToken()
|
||||
|
||||
<div class="mb-3">
|
||||
@Html.LabelFor(p => p.TitleEN, new { @class = "text-white" })
|
||||
@Html.TextBoxFor(p => p.TitleEN, new { @class = "form-control bg-dark text-white" })
|
||||
</div>
|
||||
|
||||
<div class="mb-3">
|
||||
@Html.LabelFor(p => p.DescEN, new { @class = "text-white" })
|
||||
@Html.TextAreaFor(p => p.DescEN, new { @class = "form-control bg-dark text-white" })
|
||||
</div>
|
||||
|
||||
<div class="mb-3">
|
||||
<label class="text-white">Project Image</label>
|
||||
<input type="file" name="file" class="form-control bg-dark text-white" />
|
||||
</div>
|
||||
|
||||
<div class="mb-3">
|
||||
@Html.LabelFor(p => p.iframe, new { @class = "text-white" })
|
||||
@Html.TextBoxFor(p => p.iframe, new { @class = "form-control bg-dark text-white" })
|
||||
</div>
|
||||
|
||||
<h3 class="mt-3 text-white">Translation (TR)</h3>
|
||||
|
||||
<div class="mb-3">
|
||||
@Html.LabelFor(p => p.TitleTR, new { @class = "text-white" })
|
||||
@Html.TextBoxFor(p => p.TitleTR, new { @class = "form-control bg-dark text-white" })
|
||||
</div>
|
||||
|
||||
<div class="mb-3">
|
||||
@Html.LabelFor(p => p.DescTR, new { @class = "text-white" })
|
||||
@Html.TextAreaFor(p => p.DescTR, new { @class = "form-control bg-dark text-white" })
|
||||
</div>
|
||||
|
||||
<button class="btn btn-success">Save</button>
|
||||
}
|
||||
Reference in New Issue
Block a user