Html.ActionLink helper available.
Enabling music store code to use the Html.ActionLink helper.
This commit is contained in:
parent
8610e016b3
commit
0f25f9ff6b
|
|
@ -1,32 +1,32 @@
|
|||
{
|
||||
"version": "0.1-alpha-*",
|
||||
"dependencies": {
|
||||
"Helios": "0.1-alpha-226",
|
||||
"Microsoft.AspNet.Abstractions": "0.1-alpha-233",
|
||||
"Microsoft.AspNet.Mvc": "0.1-alpha-544",
|
||||
"Helios": "0.1-alpha-231",
|
||||
"Microsoft.AspNet.Abstractions": "0.1-alpha-234",
|
||||
"Microsoft.AspNet.Mvc": "0.1-alpha-553",
|
||||
"Microsoft.AspNet.Razor": "0.1-alpha-181",
|
||||
"Microsoft.AspNet.ConfigurationModel": "0.1-alpha-172",
|
||||
"Microsoft.AspNet.DependencyInjection": "0.1-alpha-240",
|
||||
"Microsoft.AspNet.RequestContainer": "0.1-alpha-231",
|
||||
"Microsoft.AspNet.Routing": "0.1-alpha-212",
|
||||
"Microsoft.AspNet.Mvc.ModelBinding": "0.1-alpha-544",
|
||||
"Microsoft.AspNet.Mvc.Core": "0.1-alpha-544",
|
||||
"Microsoft.AspNet.Mvc.Razor": "0.1-alpha-544",
|
||||
"Microsoft.AspNet.StaticFiles": "0.1-alpha-174",
|
||||
"System.Security.Claims": "0.1-alpha-114",
|
||||
"Microsoft.AspNet.ConfigurationModel": "0.1-alpha-174",
|
||||
"Microsoft.AspNet.DependencyInjection": "0.1-alpha-242",
|
||||
"Microsoft.AspNet.RequestContainer": "0.1-alpha-234",
|
||||
"Microsoft.AspNet.Routing": "0.1-alpha-214",
|
||||
"Microsoft.AspNet.Mvc.ModelBinding": "0.1-alpha-553",
|
||||
"Microsoft.AspNet.Mvc.Core": "0.1-alpha-553",
|
||||
"Microsoft.AspNet.Mvc.Razor": "0.1-alpha-553",
|
||||
"Microsoft.AspNet.StaticFiles": "0.1-alpha-175",
|
||||
"System.Security.Claims": "0.1-alpha-115",
|
||||
"System.Security.Principal": "4.0.0.0",
|
||||
"Microsoft.AspNet.Security.DataProtection": "0.1-alpha-142",
|
||||
"Microsoft.AspNet.Identity": "0.1-alpha-308",
|
||||
"Microsoft.AspNet.Identity.Entity": "0.1-alpha-308",
|
||||
"Microsoft.AspNet.Identity.InMemory": "0.1-alpha-308",
|
||||
"Microsoft.Data.Entity": "0.1-alpha-411",
|
||||
"Microsoft.Data.Relational": "0.1-alpha-411",
|
||||
"Microsoft.Data.SqlServer": "0.1-pre-411",
|
||||
"Microsoft.Data.InMemory": "0.1-alpha-411",
|
||||
"Microsoft.AspNet.Diagnostics": "0.1-alpha-116",
|
||||
"Microsoft.AspNet.Hosting": "0.1-alpha-231",
|
||||
"Microsoft.AspNet.Server.WebListener": "0.1-alpha-163",
|
||||
"Microsoft.AspNet.Configuration.Json": "0.1-alpha-172"
|
||||
"Microsoft.AspNet.Identity": "0.1-alpha-315",
|
||||
"Microsoft.AspNet.Identity.Entity": "0.1-alpha-315",
|
||||
"Microsoft.AspNet.Identity.InMemory": "0.1-alpha-315",
|
||||
"Microsoft.Data.Entity": "0.1-alpha-416",
|
||||
"Microsoft.Data.Relational": "0.1-alpha-416",
|
||||
"Microsoft.Data.SqlServer": "0.1-pre-416",
|
||||
"Microsoft.Data.InMemory": "0.1-alpha-416",
|
||||
"Microsoft.AspNet.Diagnostics": "0.1-alpha-119",
|
||||
"Microsoft.AspNet.Hosting": "0.1-alpha-234",
|
||||
"Microsoft.AspNet.Server.WebListener": "0.1-alpha-168",
|
||||
"Microsoft.AspNet.Configuration.Json": "0.1-alpha-174"
|
||||
},
|
||||
"configurations": {
|
||||
"net45": {
|
||||
|
|
@ -47,7 +47,10 @@
|
|||
"System.Console": "4.0.0.0",
|
||||
"System.Diagnostics.Debug": "4.0.10.0",
|
||||
"System.Diagnostics.Tools": "4.0.0.0",
|
||||
"Microsoft.ComponentModel.DataAnnotations": "4.0.10.0"
|
||||
"Microsoft.ComponentModel.DataAnnotations": "4.0.10.0",
|
||||
"System.Reflection": "4.0.10.0",
|
||||
"System.Reflection.Extensions": "4.0.0.0",
|
||||
"System.IO": "4.0.0.0"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -12,5 +12,5 @@
|
|||
|
||||
<p>
|
||||
How about shopping for some more music in our
|
||||
@*@Html.ActionLink("Store", "Index", "Home")*@
|
||||
@Html.ActionLink("Store", "Index", "Home")
|
||||
</p>
|
||||
|
|
@ -5,21 +5,16 @@
|
|||
<ul class="dropdown-menu">
|
||||
@foreach (var genre in Model)
|
||||
{
|
||||
@*<li>
|
||||
@Html.ActionLink(genre.Name,
|
||||
<li>
|
||||
@Html.ActionLink(genre.Name,
|
||||
"Browse", "Store",
|
||||
new { Genre = genre.Name }, null)
|
||||
</li>*@
|
||||
|
||||
<li>
|
||||
<a href="@Url.Action("Browse", "Store", new { Genre = genre.Name })">@genre.Name</a>
|
||||
</li>
|
||||
}
|
||||
<li class="divider"></li>
|
||||
<li>
|
||||
@*@Html.ActionLink("More...", "Index", "Store")*@
|
||||
<a href="@Url.Action("Index", "Store")">More...</a>
|
||||
@Html.ActionLink("More...", "Index", "Store")
|
||||
</li>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
</li>
|
||||
|
|
|
|||
|
|
@ -21,16 +21,14 @@
|
|||
<span class="icon-bar"></span>
|
||||
<span class="icon-bar"></span>
|
||||
</button>
|
||||
@*Bug: no Html helpers yet*@
|
||||
@*@Html.ActionLink("ASP.NET MVC Music Store", "Index", "Home", null, new { @class = "navbar-brand" })*@
|
||||
<a class="navbar-brand" href="~/">ASP.NET MVC Music Store</a>
|
||||
@Html.ActionLink("ASP.NET MVC Music Store", "Index", "Home", null, new { @class = "navbar-brand" })
|
||||
</div>
|
||||
@*Bug: HtmlHelpers missing*@
|
||||
<div class="navbar-collapse collapse">
|
||||
<ul class="nav navbar-nav">
|
||||
@*<li>@Html.ActionLink("Home", "Index", "Home")</li>*@
|
||||
<li>@Html.ActionLink("Home", "Index", "Home")</li>
|
||||
@await Component.InvokeAsync("GenreMenu")
|
||||
@* @Html.Action("CartSummary", "ShoppingCart")*@
|
||||
@*Bug: HtmlHelper missing*@
|
||||
@*@Html.Action("CartSummary", "ShoppingCart")*@
|
||||
</ul>
|
||||
@await Html.PartialAsync("_LoginPartial")
|
||||
</div>
|
||||
|
|
@ -41,8 +39,7 @@
|
|||
<hr />
|
||||
<footer class="navbar navbar-fixed-bottom navbar-default text-center">
|
||||
<p><a href="http://mvcmusicstore.codeplex.com">mvcmusicstore.codeplex.com</a></p>
|
||||
@*Bug: No Html helpers yet*@
|
||||
@*<small>@Html.ActionLink("admin", "Index", "StoreManager")</small>*@
|
||||
<small>@Html.ActionLink("admin", "Index", "StoreManager")</small>
|
||||
</footer>
|
||||
</div>
|
||||
|
||||
|
|
|
|||
|
|
@ -8,7 +8,7 @@
|
|||
|
||||
<ul class="nav navbar-nav navbar-right">
|
||||
<li>
|
||||
@*@Html.ActionLink("Hello " + User.Identity.GetUserName() + "!", "Manage", "Account", routeValues: null, htmlAttributes: new { title = "Manage" })*@
|
||||
@Html.ActionLink("Hello " + Context.HttpContext.User.Identity.Name + "!", "Manage", "Account", routeValues: null, htmlAttributes: new { title = "Manage" })
|
||||
</li>
|
||||
<li><a href="javascript:document.getElementById('logoutForm').submit()">Log off</a></li>
|
||||
</ul>
|
||||
|
|
@ -17,9 +17,7 @@
|
|||
else
|
||||
{
|
||||
<ul class="nav navbar-nav navbar-right">
|
||||
@*<li>@Html.ActionLink("Register", "Register", "Account", routeValues: null, htmlAttributes: new { id = "registerLink" })</li>
|
||||
<li>@Html.ActionLink("Log in", "Login", "Account", routeValues: null, htmlAttributes: new { id = "loginLink" })</li>*@
|
||||
<li>Register</li>
|
||||
<li>Log in</li>
|
||||
<li>@Html.ActionLink("Register", "Register", "Account", routeValues: null, htmlAttributes: new { id = "registerLink" })</li>
|
||||
<li>@Html.ActionLink("Log in", "Login", "Account", routeValues: null, htmlAttributes: new { id = "loginLink" })</li>
|
||||
</ul>
|
||||
}
|
||||
|
|
@ -41,7 +41,7 @@
|
|||
<em>Review</em> your cart:
|
||||
</h3>
|
||||
<p class="button">
|
||||
@*@Html.ActionLink("Checkout >>", "AddressAndPayment", "Checkout")*@
|
||||
@Html.ActionLink("Checkout >>", "AddressAndPayment", "Checkout")
|
||||
</p>
|
||||
<div id="update-message">
|
||||
</div>
|
||||
|
|
@ -62,8 +62,8 @@
|
|||
{
|
||||
<tr id="row-@item.CartItemId">
|
||||
<td>
|
||||
@*@Html.ActionLink(item.Album.Title,
|
||||
"Details", "Store", new { id = item.AlbumId }, null)*@
|
||||
@Html.ActionLink(item.Album.Title,
|
||||
"Details", "Store", new { id = item.AlbumId }, null)
|
||||
</td>
|
||||
<td>
|
||||
@item.Album.Price
|
||||
|
|
|
|||
|
|
@ -26,8 +26,7 @@
|
|||
@Html.ValueFor(model => model.Price)
|
||||
</p>
|
||||
<p class="button">
|
||||
@*Bug: HTML helpers not implemented yet*@
|
||||
@*@Html.ActionLink("Add to cart", "AddToCart",
|
||||
"ShoppingCart", new { id = Model.AlbumId }, "")*@
|
||||
@Html.ActionLink("Add to cart", "AddToCart",
|
||||
"ShoppingCart", new { id = Model.AlbumId })
|
||||
</p>
|
||||
</div>
|
||||
|
|
@ -12,8 +12,6 @@
|
|||
<ul class="list-group">
|
||||
@foreach (var genre in Model)
|
||||
{
|
||||
//Bug: Html helpers ActionLink is not implemented still
|
||||
@*<li class="list-group-item">@Html.ActionLink(genre.Name, "Browse", new { genre = genre.Name })</li>*@
|
||||
<li class="list-group-item"><a href="@Url.Action("Browse", "Store", new { genre = genre.Name })">@genre.Name</a></li>
|
||||
<li class="list-group-item">@Html.ActionLink(genre.Name, "Browse", new { genre = genre.Name })</li>
|
||||
}
|
||||
</ul>
|
||||
|
|
@ -54,8 +54,7 @@
|
|||
|
||||
</dl>
|
||||
</div>
|
||||
@*Bug: Need HtmlHelpers*@
|
||||
@*<p>
|
||||
@Html.ActionLink("Edit", "Edit", new { id = Model.AlbumId }) |
|
||||
@Html.ActionLink("Back to List", "Index")
|
||||
</p>*@
|
||||
<p>
|
||||
@Html.ActionLink("Edit", "Edit", new { id = Model.AlbumId }) |
|
||||
@Html.ActionLink("Back to List", "Index")
|
||||
</p>
|
||||
|
|
@ -21,7 +21,7 @@
|
|||
<h2>Index</h2>
|
||||
|
||||
<p>
|
||||
@*@Html.ActionLink("Create New", "Create")*@
|
||||
@Html.ActionLink("Create New", "Create")
|
||||
</p>
|
||||
<table class="table">
|
||||
@*Bug: Html.NameFor does not contain an overload taking in IEnumerable<Tmodel>*@
|
||||
|
|
@ -60,11 +60,11 @@
|
|||
<td>
|
||||
@Html.ValueFor(modelItem => item.Price)
|
||||
</td>
|
||||
@*<td>
|
||||
<td>
|
||||
@Html.ActionLink("Edit", "Edit", new { id = item.AlbumId }) |
|
||||
@Html.ActionLink("Details", "Details", new { id = item.AlbumId }) |
|
||||
@Html.ActionLink("Delete", "Delete", new { id = item.AlbumId })
|
||||
</td>*@
|
||||
</td>
|
||||
</tr>
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -51,9 +51,9 @@
|
|||
"System.Diagnostics.Debug": "4.0.10.0",
|
||||
"System.Diagnostics.Tools": "4.0.0.0",
|
||||
"Microsoft.ComponentModel.DataAnnotations": "4.0.10.0",
|
||||
"System.Reflection": "4.0.10.0",
|
||||
"System.Reflection.Extensions": "4.0.0.0",
|
||||
"System.IO": "4.0.0.0"
|
||||
"System.Reflection": "4.0.10.0",
|
||||
"System.Reflection.Extensions": "4.0.0.0",
|
||||
"System.IO": "4.0.0.0"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue