Created
January 25, 2012 17:17
-
-
Save danieleli/1677394 to your computer and use it in GitHub Desktop.
Mvc Views
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| @using Kariakoo.Mvc4.Views.Helpers | |
| @model Kariakoo.Mvc4.Models.Commodity | |
| @Html.EditorCompleteFor(model => model.Title) | |
| @Html.EditorCompleteFor(model => model.Swahili) | |
| @Html.EditorCompleteFor(model => model.WholesaleUnitId, Html.DropDownListFor(model => model.WholesaleUnitId, ((IEnumerable<SelectListItem>)ViewBag.PossibleWholesaleUnits), "Choose..."), "Wholesale Unit") | |
| @Html.EditorCompleteFor(model => model.RetailUnitId, Html.DropDownListFor(model => model.RetailUnitId, ((IEnumerable<SelectListItem>)ViewBag.PossibleRetailUnits), "Choose..."), "Retail Unit") | |
| @Html.EditorCompleteFor(model => model.DeliveredUnitId, Html.DropDownListFor(model => model.DeliveredUnitId, ((IEnumerable<SelectListItem>)ViewBag.PossibleDeliveredUnits), "Choose..."), "Delivered Unit") |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| @model MaidBrigade.Web.Models.Foo | |
| @using (Html.BeginForm()) | |
| { | |
| @Html.ValidationSummary(true) | |
| <fieldset><legend>Create @(ViewBag.Title)</legend> | |
| @Html.Partial("_CreateOrEdit", Model) | |
| <p> | |
| @Html.ActionLink("Back to List", "Index") | |
| <input type="submit" value="Create" class="btn primary" /> | |
| </p> | |
| </fieldset> | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| @model MaidBrigade.Web.Models.Foo | |
| <h3>Are you sure you want to delete this?</h3> | |
| <fieldset><legend>Delete @(ViewBag.Title)</legend> | |
| <div class="display-group"> | |
| <div class="display-label">Title</div> | |
| <div class="display-field">@Model.Title</div> | |
| </div> | |
| <div class="display-group"> | |
| <div class="display-label">FooCode</div> | |
| <div class="display-field">@Model.FooCode</div> | |
| </div> | |
| <div class="display-group"> | |
| <div class="display-label">Bar</div> | |
| <div class="display-field">@(Model.Bar == null ? "None" : Model.Bar.Count.ToString())</div> | |
| </div> | |
| @using (Html.BeginForm()) | |
| { | |
| <p> | |
| <input type="submit" value="Delete" class="btn danger" /> | |
| @Html.ActionLink("Back to List", "Index") | |
| </p> | |
| } | |
| </fieldset> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| @model MaidBrigade.Web.Models.Foo | |
| <fieldset><legend>@(ViewBag.Title + " Detail")</legend> | |
| <div class="display-group"> | |
| <div class="display-label">Title</div> | |
| <div class="display-field">@Model.Title</div> | |
| </div> | |
| <div class="display-group"> | |
| <div class="display-label">FooCode</div> | |
| <div class="display-field">@Model.FooCode</div> | |
| </div> | |
| <div class="display-group"> | |
| <div class="display-label">Bar Count</div> | |
| <div class="display-field">@(Model.Bar == null ? "None" : Model.Bar.Count.ToString())</div> | |
| </div> | |
| </fieldset> | |
| <p> | |
| @Html.ActionLink("Edit", "Edit", new { id = Model.Id }, new { Class = "primary btn" }) | |
| @Html.ActionLink("Back to List", "Index") | |
| </p> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| @model MaidBrigade.Web.Models.Foo | |
| @using (Html.BeginForm()) { | |
| @Html.ValidationSummary(true) | |
| <fieldset><legend>Edit @(ViewBag.Title)</legend> | |
| @Html.HiddenFor(model => model.Id) | |
| @Html.Partial("_CreateOrEdit", Model) | |
| <p> | |
| @Html.ActionLink("Back to List", "Index") | |
| <input type="submit" value="Save" class="btn primary" /> | |
| </p> | |
| </fieldset> | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| @model IEnumerable<MaidBrigade.Web.Models.Foo> | |
| @Html.Partial("_IndexViewHeader") | |
| <table> | |
| <tr> | |
| <th> | |
| Title | |
| </th> | |
| <th> | |
| FooCode | |
| </th> | |
| <th> | |
| Bar Count | |
| </th> | |
| <th></th> | |
| </tr> | |
| @foreach (var item in Model) { | |
| <tr> | |
| <td> | |
| @item.Title | |
| </td> | |
| <td> | |
| @item.FooCode | |
| </td> | |
| <td> | |
| @(item.Bar == null ? "None" : item.Bar.Count.ToString()) | |
| </td> | |
| <td> | |
| @Html.Partial("_ModelRowButtons", item) | |
| </td> | |
| </tr> | |
| } | |
| </table> | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment