From 0f25f9ff6b94d1b7e10fc1d4e33644c5fb35ecc7 Mon Sep 17 00:00:00 2001 From: Praburaj Date: Wed, 9 Apr 2014 12:04:53 -0700 Subject: [PATCH] Html.ActionLink helper available. Enabling music store code to use the Html.ActionLink helper. --- src/MusicStore/LKG.json | 51 ++++++++++--------- src/MusicStore/Views/Checkout/Complete.cshtml | 2 +- .../Components/GenreMenu/Default.cshtml | 13 ++--- src/MusicStore/Views/Shared/_Layout.cshtml | 13 ++--- .../Views/Shared/_LoginPartial.cshtml | 8 ++- .../Views/ShoppingCart/Index.cshtml | 6 +-- src/MusicStore/Views/Store/Details.cshtml | 5 +- src/MusicStore/Views/Store/Index.cshtml | 4 +- .../Views/StoreManager/Details.cshtml | 9 ++-- .../Views/StoreManager/Index.cshtml | 6 +-- src/MusicStore/project.json | 6 +-- 11 files changed, 56 insertions(+), 67 deletions(-) diff --git a/src/MusicStore/LKG.json b/src/MusicStore/LKG.json index 190eae2287..91848459e9 100644 --- a/src/MusicStore/LKG.json +++ b/src/MusicStore/LKG.json @@ -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" } } } diff --git a/src/MusicStore/Views/Checkout/Complete.cshtml b/src/MusicStore/Views/Checkout/Complete.cshtml index fe55e9017c..29f43138da 100644 --- a/src/MusicStore/Views/Checkout/Complete.cshtml +++ b/src/MusicStore/Views/Checkout/Complete.cshtml @@ -12,5 +12,5 @@

How about shopping for some more music in our - @*@Html.ActionLink("Store", "Index", "Home")*@ + @Html.ActionLink("Store", "Index", "Home")

\ No newline at end of file diff --git a/src/MusicStore/Views/Shared/Components/GenreMenu/Default.cshtml b/src/MusicStore/Views/Shared/Components/GenreMenu/Default.cshtml index eccde1ab40..226f7bd02a 100644 --- a/src/MusicStore/Views/Shared/Components/GenreMenu/Default.cshtml +++ b/src/MusicStore/Views/Shared/Components/GenreMenu/Default.cshtml @@ -5,21 +5,16 @@ - \ No newline at end of file + diff --git a/src/MusicStore/Views/Shared/_Layout.cshtml b/src/MusicStore/Views/Shared/_Layout.cshtml index 3ac1f2c311..46753b0527 100644 --- a/src/MusicStore/Views/Shared/_Layout.cshtml +++ b/src/MusicStore/Views/Shared/_Layout.cshtml @@ -21,16 +21,14 @@ - @*Bug: no Html helpers yet*@ - @*@Html.ActionLink("ASP.NET MVC Music Store", "Index", "Home", null, new { @class = "navbar-brand" })*@ - ASP.NET MVC Music Store + @Html.ActionLink("ASP.NET MVC Music Store", "Index", "Home", null, new { @class = "navbar-brand" }) - @*Bug: HtmlHelpers missing*@ @@ -41,8 +39,7 @@
diff --git a/src/MusicStore/Views/Shared/_LoginPartial.cshtml b/src/MusicStore/Views/Shared/_LoginPartial.cshtml index b4c16d42e4..a263e9b5e4 100644 --- a/src/MusicStore/Views/Shared/_LoginPartial.cshtml +++ b/src/MusicStore/Views/Shared/_LoginPartial.cshtml @@ -8,7 +8,7 @@ @@ -17,9 +17,7 @@ else { } \ No newline at end of file diff --git a/src/MusicStore/Views/ShoppingCart/Index.cshtml b/src/MusicStore/Views/ShoppingCart/Index.cshtml index 33aa1f1a88..be2b76472e 100644 --- a/src/MusicStore/Views/ShoppingCart/Index.cshtml +++ b/src/MusicStore/Views/ShoppingCart/Index.cshtml @@ -41,7 +41,7 @@ Review your cart:

- @*@Html.ActionLink("Checkout >>", "AddressAndPayment", "Checkout")*@ + @Html.ActionLink("Checkout >>", "AddressAndPayment", "Checkout")

@@ -62,8 +62,8 @@ { - @*@Html.ActionLink(item.Album.Title, - "Details", "Store", new { id = item.AlbumId }, null)*@ + @Html.ActionLink(item.Album.Title, + "Details", "Store", new { id = item.AlbumId }, null) @item.Album.Price diff --git a/src/MusicStore/Views/Store/Details.cshtml b/src/MusicStore/Views/Store/Details.cshtml index b349aea7b2..41035ccab7 100644 --- a/src/MusicStore/Views/Store/Details.cshtml +++ b/src/MusicStore/Views/Store/Details.cshtml @@ -26,8 +26,7 @@ @Html.ValueFor(model => model.Price)

- @*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 })

\ No newline at end of file diff --git a/src/MusicStore/Views/Store/Index.cshtml b/src/MusicStore/Views/Store/Index.cshtml index f3f72f3f51..15b44176d1 100644 --- a/src/MusicStore/Views/Store/Index.cshtml +++ b/src/MusicStore/Views/Store/Index.cshtml @@ -12,8 +12,6 @@ \ No newline at end of file diff --git a/src/MusicStore/Views/StoreManager/Details.cshtml b/src/MusicStore/Views/StoreManager/Details.cshtml index 9c32992b23..767d3e4cdb 100644 --- a/src/MusicStore/Views/StoreManager/Details.cshtml +++ b/src/MusicStore/Views/StoreManager/Details.cshtml @@ -54,8 +54,7 @@ -@*Bug: Need HtmlHelpers*@ -@*

- @Html.ActionLink("Edit", "Edit", new { id = Model.AlbumId }) | - @Html.ActionLink("Back to List", "Index") -

*@ \ No newline at end of file +

+ @Html.ActionLink("Edit", "Edit", new { id = Model.AlbumId }) | + @Html.ActionLink("Back to List", "Index") +

\ No newline at end of file diff --git a/src/MusicStore/Views/StoreManager/Index.cshtml b/src/MusicStore/Views/StoreManager/Index.cshtml index 704a610852..15177811e3 100644 --- a/src/MusicStore/Views/StoreManager/Index.cshtml +++ b/src/MusicStore/Views/StoreManager/Index.cshtml @@ -21,7 +21,7 @@

Index

- @*@Html.ActionLink("Create New", "Create")*@ + @Html.ActionLink("Create New", "Create")

@*Bug: Html.NameFor does not contain an overload taking in IEnumerable*@ @@ -60,11 +60,11 @@ - @**@ + } diff --git a/src/MusicStore/project.json b/src/MusicStore/project.json index 5bff92db79..6d3528ee24 100644 --- a/src/MusicStore/project.json +++ b/src/MusicStore/project.json @@ -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" } } }
@Html.ValueFor(modelItem => item.Price) + @Html.ActionLink("Edit", "Edit", new { id = item.AlbumId }) | @Html.ActionLink("Details", "Details", new { id = item.AlbumId }) | @Html.ActionLink("Delete", "Delete", new { id = item.AlbumId }) -