Styling manage category

This commit is contained in:
Damian Lasecki 2018-12-19 19:19:48 +01:00
parent df046dc2a0
commit aa4ae61818
11 changed files with 141 additions and 138 deletions

View File

@ -297,8 +297,10 @@ textarea {
border-radius: 1rem; border-radius: 1rem;
} }
.wrapper {
padding: 3rem;
background-color: #f2f2f2;
}

View File

@ -86,7 +86,7 @@ namespace Forum.Controllers
return RedirectToAction("SendCode", new { ReturnUrl = returnUrl, RememberMe = model.RememberMe }); return RedirectToAction("SendCode", new { ReturnUrl = returnUrl, RememberMe = model.RememberMe });
case SignInStatus.Failure: case SignInStatus.Failure:
default: default:
ModelState.AddModelError("", "Invalid login attempt."); ModelState.AddModelError("", "Niepoprawny login lub hasło");
return View(model); return View(model);
} }
} }

View File

@ -55,10 +55,10 @@ namespace Forum.Models
[Required] [Required]
[DataType(DataType.Password)] [DataType(DataType.Password)]
[Display(Name = "Password")] [Display(Name = "Hasło")]
public string Password { get; set; } public string Password { get; set; }
[Display(Name = "Remember me?")] [Display(Name = "Zapamiętaj mnie")]
public bool RememberMe { get; set; } public bool RememberMe { get; set; }
} }
@ -80,7 +80,7 @@ namespace Forum.Models
[Compare("Password", ErrorMessage = "The password and confirmation password do not match.")] [Compare("Password", ErrorMessage = "The password and confirmation password do not match.")]
public string ConfirmPassword { get; set; } public string ConfirmPassword { get; set; }
[Display(Name = "Imie i nazwisko")] [Display(Name = "Imię i nazwisko")]
[Required] [Required]
public string FullName { get; set; } public string FullName { get; set; }
} }

View File

@ -1,7 +1,7 @@
@using Forum.Models @using Forum.Models
@model LoginViewModel @model LoginViewModel
@{ @{
ViewBag.Title = "Log in"; ViewBag.Title = "Zaloguj się";
} }
<h2>@ViewBag.Title.</h2> <h2>@ViewBag.Title.</h2>
@ -11,7 +11,6 @@
@using (Html.BeginForm("Login", "Account", new { ReturnUrl = ViewBag.ReturnUrl }, FormMethod.Post, new { @class = "form-horizontal", role = "form" })) @using (Html.BeginForm("Login", "Account", new { ReturnUrl = ViewBag.ReturnUrl }, FormMethod.Post, new { @class = "form-horizontal", role = "form" }))
{ {
@Html.AntiForgeryToken() @Html.AntiForgeryToken()
<h4>Use a local account to log in.</h4>
<hr /> <hr />
@Html.ValidationSummary(true, "", new { @class = "text-danger" }) @Html.ValidationSummary(true, "", new { @class = "text-danger" })
<div class="form-group"> <div class="form-group">
@ -38,11 +37,11 @@
</div> </div>
<div class="form-group"> <div class="form-group">
<div class="col-md-offset-2 col-md-10"> <div class="col-md-offset-2 col-md-10">
<input type="submit" value="Log in" class="btn btn-default" /> <input type="submit" value="Zaloguj się" class="btn btn-default" />
</div> </div>
</div> </div>
<p> <p>
@Html.ActionLink("Register as a new user", "Register") @Html.ActionLink("Utwórz nowego użytkownika", "Register")
</p> </p>
@* Enable this once you have account confirmation enabled for password reset functionality @* Enable this once you have account confirmation enabled for password reset functionality
<p> <p>
@ -51,11 +50,7 @@
} }
</section> </section>
</div> </div>
<div class="col-md-4">
<section id="socialLoginForm">
@Html.Partial("_ExternalLoginsListPartial", new ExternalLoginListViewModel { ReturnUrl = ViewBag.ReturnUrl })
</section>
</div>
</div> </div>
@section Scripts { @section Scripts {

View File

@ -1,6 +1,6 @@
@model Forum.Models.RegisterViewModel @model Forum.Models.RegisterViewModel
@{ @{
ViewBag.Title = "Register"; ViewBag.Title = "Zarejestruj się";
} }
<h2>@ViewBag.Title.</h2> <h2>@ViewBag.Title.</h2>
@ -8,7 +8,6 @@
@using (Html.BeginForm("Register", "Account", FormMethod.Post, new { @class = "form-horizontal", role = "form" })) @using (Html.BeginForm("Register", "Account", FormMethod.Post, new { @class = "form-horizontal", role = "form" }))
{ {
@Html.AntiForgeryToken() @Html.AntiForgeryToken()
<h4>Create a new account.</h4>
<hr /> <hr />
@Html.ValidationSummary("", new { @class = "text-danger" }) @Html.ValidationSummary("", new { @class = "text-danger" })
<div class="form-group"> <div class="form-group">
@ -37,7 +36,7 @@
</div> </div>
<div class="form-group"> <div class="form-group">
<div class="col-md-offset-2 col-md-10"> <div class="col-md-offset-2 col-md-10">
<input type="submit" class="btn btn-default" value="Register" /> <input type="submit" class="btn btn-default" value="Zarejestruj" />
</div> </div>
</div> </div>
} }

View File

@ -4,7 +4,11 @@
ViewBag.Title = "Create"; ViewBag.Title = "Create";
} }
<h2>Create</h2>
<div class="single-category-wrapper">
<h2>Utwórz kategorie</h2>
<hr style="border-top: 1px solid #d3d3d3; margin-bottom: 3rem;" />
@using (Html.BeginForm()) @using (Html.BeginForm())
@ -12,7 +16,6 @@
@Html.AntiForgeryToken() @Html.AntiForgeryToken()
<div class="form-horizontal"> <div class="form-horizontal">
<h4>Category</h4>
<hr /> <hr />
@Html.ValidationSummary(true, "", new { @class = "text-danger" }) @Html.ValidationSummary(true, "", new { @class = "text-danger" })
<div class="form-group"> <div class="form-group">
@ -25,16 +28,17 @@
<div class="form-group"> <div class="form-group">
<div class="col-md-offset-2 col-md-10"> <div class="col-md-offset-2 col-md-10">
<input type="submit" value="Create" class="btn btn-default" /> <input type="submit" value="Utwórz kategorie" class="answer-list__add-btn" style="height:4rem; width:17rem" />
</div> </div>
</div> </div>
</div> </div>
} }
<div> <div>
@Html.ActionLink("Back to List", "Index") @Html.ActionLink("Powrót", "Index")
</div> </div>
</div>
@section Scripts { @section Scripts {
@Scripts.Render("~/bundles/jqueryval") @Scripts.Render("~/bundles/jqueryval")
} }

View File

@ -4,29 +4,32 @@
ViewBag.Title = "Index"; ViewBag.Title = "Index";
} }
<h2>Index</h2> <div class="single-category-wrapper">
<p> <h2 style="margin-bottom:3rem;">Kategorie</h2>
@Html.ActionLink("Create New", "Create")
</p>
<table class="table"> <table class="table">
<tr> <tr>
<th> <th>
@Html.DisplayNameFor(model => model.CategoryName) @Html.DisplayNameFor(model => model.CategoryName)
</th> </th>
<th></th> <th></th>
</tr> </tr>
@foreach (var item in Model)
@foreach (var item in Model) { {
<tr> <tr>
<td> <td>
@Html.DisplayFor(modelItem => item.CategoryName) @Html.DisplayFor(modelItem => item.CategoryName)
</td> </td>
<td> <td>
@Html.ActionLink("Edit", "Edit", new { id=item.Id }) | @Html.ActionLink("Edytuj", "Edit", new { id = item.Id }) |
@Html.ActionLink("Delete", "Delete", new { id=item.Id }) @Html.ActionLink("Usuń", "Delete", new { id = item.Id })
</td> </td>
</tr> </tr>
} }
</table>
</table> <p class="answer-list__add-btn">
@Html.ActionLink("Utwórz kategorie", "Create")
</p>
</div>

View File

@ -22,7 +22,7 @@
} }
else else
{ {
@Html.EditorFor(model => model.Nick, new { htmlAttributes = new { @class = "form-control", placeholder = "Nazwa użytkownika" } }) @Html.EditorFor(model => model.Nick, new { htmlAttributes = new { @class = "form-control", placeholder = "Nick" } })
} }
} }
</div> </div>

View File

@ -28,7 +28,7 @@
</div> </div>
<div class="form-personal-data"> <div class="form-personal-data">
<div class="form-group"> <div class="form-group">
@Html.EditorFor(model => model.Nick, new { htmlAttributes = new { @class = "form-control", placeholder="Nazwa użytkownika" } }) @Html.EditorFor(model => model.Nick, new { htmlAttributes = new { @class = "form-control", placeholder="Nick" } })
</div> </div>
<div class="form-group"> <div class="form-group">

View File

@ -7,16 +7,16 @@
<ul class="nav navbar-nav navbar-right"> <ul class="nav navbar-nav navbar-right">
<li> <li>
@Html.ActionLink("Hello " + User.Identity.GetUserName() + "!", "Index", "Manage", routeValues: null, htmlAttributes: new { title = "Manage" }) @Html.ActionLink("Witaj " + User.Identity.GetUserName() + "!", "Index", "Manage", routeValues: null, htmlAttributes: new { title = "Manage" })
</li> </li>
<li>@Html.ActionLink("Register", "Register", "Account", routeValues: null, htmlAttributes: new { id = "registerLink" })</li> <li>@Html.ActionLink("Zarejestruj się", "Register", "Account", routeValues: null, htmlAttributes: new { id = "registerLink" })</li>
<li><a href="javascript:document.getElementById('logoutForm').submit()">Log off</a></li> <li><a href="javascript:document.getElementById('logoutForm').submit()">Wyloguj się</a></li>
</ul> </ul>
} }
} }
else else
{ {
<ul class="nav navbar-nav navbar-right"> <ul class="nav navbar-nav navbar-right">
<li>@Html.ActionLink("Log in", "Login", "Account", routeValues: null, htmlAttributes: new {id = "loginLink"})</li> <li>@Html.ActionLink("Zaloguj się", "Login", "Account", routeValues: null, htmlAttributes: new {id = "loginLink"})</li>
</ul> </ul>
} }

View File

@ -9,7 +9,7 @@
<h3>Error: @ViewData["mailErr"]</h3> <h3>Error: @ViewData["mailErr"]</h3>
} }
@using (Html.BeginForm("Send", "Home", FormMethod.Post)) @using (Html.BeginForm("Send", "Home", FormMethod.FPost))
{ {
<div class="form-group"> <div class="form-group">
@Html.LabelFor(i => i.Subject, new { @class = "label-form" }) @Html.LabelFor(i => i.Subject, new { @class = "label-form" })