Permalink
Switch branches/tags
Nothing to show
Find file
Fetching contributors…
Cannot retrieve contributors at this time
79 lines (68 sloc) 3.03 KB
@inherits ViewPage<RockstarsResponse>
@{
ViewBag.Title = Model.Aged.HasValue
? "{0} year old rockstars".Fmt(Model.Aged) : "All Rockstars";
Layout = "HtmlReport";
}
<div style="float:right">
<strong>View this page in: </strong>
<a href="?format=json">json</a>,
<a href="?format=xml">xml</a>,
<a href="?format=jsv">jsv</a>,
<a href="?format=csv">csv</a>
<div id="swap-templates">
<a href="?View=AngularJS">View = AngularJS</a>
<a href="?Template=SimpleLayout">Template = SimpleLayout</a>
<a href="?View=AngularJS&amp;Template=SimpleLayout">AngularJS &amp; SimpleLayout</a>
</div>
<p>&nbsp;</p>
<form action="/rockstars" method="POST">
<div><b>@Html.Label("FirstName")</b> @Html.TextBox("FirstName","Amy")</div>
<div><b>@Html.Label("LastName")</b> @Html.TextBox("LastName","Winehouse")</div>
<div><b>@Html.Label("Age")</b> @Html.TextBox("Age","27")</div>
<div><b>@Html.Label("Alive")</b> @Html.CheckBox("Alive", false)</div>
<p><button type="submit">Add new Rockstar</button></p>
</form>
<h3>Other Pages</h3>
<div><a class="home" href="/">/home</a></div>
<div><a class="rzr" href="/TypedModelNoController">/TypedModelNoController</a></div>
<div><a class="rzr" href="/NoModelNoController">/NoModelNoController</a></div>
</div>
<h3>We have @Model.Total Rockstars, showing @ViewBag.Title</h3>
<table>
<thead>
<tr>
<th>Name</th>
<th>Age</th>
<th></th>
</tr>
</thead>
<tfoot>
<tr>
<td colspan="3">
<p><a href="/rockstars">Show all @Model.Total Rockstars</a></p>
<p><a href="/reset">Reset Rockstars</a></p>
</td>
</tr>
</tfoot>
<tbody>
@foreach (var rockstar in Model.Results)
{
<tr>
<td><a href="@rockstar.Url">@rockstar.FirstName @rockstar.LastName</a></td>
<td><a href="/rockstars/aged/@rockstar.Age">@rockstar.Age</a></td>
<td><a href="/rockstars/delete/@rockstar.Id">delete</a></td>
</tr>
}
</tbody>
</table>
<b class="clear"></b>
<div id="preview">
<h1>Implementation</h1>
<h3><b>Controller</b> <a href="https://github.com/ServiceStackApps/RazorRockstars/blob/master/src/RazorRockstars.WebHost/RockstarsService.cs">/RockstarsService.cs</a></h3>
<script src="https://gist.github.com/3616766.js"></script>
<h3><b>View</b> <a href="https://github.com/ServiceStackApps/RazorRockstars/blob/master/src/RazorRockstars.WebHost/Views/Rockstars.cshtml">/Views/Rockstars.cshtml</a></h3>
<script src="https://gist.github.com/3162081.js"></script>
<h3><b>Layout</b> <a href="https://github.com/ServiceStackApps/RazorRockstars/blob/master/src/RazorRockstars.WebHost/Views/Shared/HtmlReport.cshtml">/Views/Shared/HtmlReport.cshtml</a></h3>
<script src="https://gist.github.com/3616883.js"></script>
</div>