<%@ Control Language="C#" Inherits="System.Web.Mvc.ViewUserControl" %> <%@ Import Namespace="Portoa.Web.Util" %>
<% using (Html.BeginForm(Model.ActionName, Model.ControllerName)) { %> <%= Html.HiddenFor(model => model.QuoteId, new { id = "quote-id" })%>

<%= Html.Label("Game", "GameId") %>
<%= Html.DropDownListFor(model => model.GameId, Model.GetGameList()) %>
Create new game

Create new game

<%= Html.LabelFor(model => model.GameName) %>
<%= Html.TextBoxFor(model => model.GameName) %>

<%= Html.LabelFor(model => model.GameWebsite) %> (link to Wikipedia page or something)
<%= Html.TextBoxFor(model => model.GameWebsite) %>

<%= Html.LabelFor(model => model.GameRegions) %>
<%= Model.MakeRegionTable() %>

<%= Html.LabelFor(model => model.SystemIds) %>
<%= Model.MakeSystemTable(Html) %>
Create new system

Create new system

<%= Html.LabelFor(model => model.SystemName) %>
<%= Html.TextBoxFor(model => model.SystemName) %>

<%= Html.LabelFor(model => model.SystemAbbreviation) %>
<%= Html.TextBoxFor(model => model.SystemAbbreviation) %>

<%= Html.LabelFor(model => model.SystemReleaseDate) %>
<%= Html.TextBox("SystemReleaseDate", DateTime.UtcNow.ToString("yyyy-MM-dd")) %>

<%= Html.LabelFor(model => model.PublisherIds) %>
<%= Model.MakePublisherTable(Html) %>
Create new publisher

Create new publisher

<%= Html.LabelFor(model => model.PublisherName) %>
<%= Html.TextBoxFor(model => model.PublisherName) %>

<%= Html.LabelFor(model => model.PublisherWebsite) %>
<%= Html.TextBoxFor(model => model.PublisherWebsite) %>

<%= Html.LabelFor(model => model.QuoteText) %>
<%= Html.TextAreaFor(model => model.QuoteText) %>

<%= Html.LabelFor(model => model.CategoryIds) %>

<%= Model.MakeCategoryTable(Html) %> Create new category
<% if (Model.QuoteId > 0) { %>
<% foreach (var flag in Model.Flags) { %>

Flagged as <%: flag.Type %> on <%= flag.Created %> by <%: flag.User.Username ?? flag.User.IpAddress %>.

<%: flag.Comment %>

dismiss

<% } %>
<% } %>
<%= Html.Submit(Model.QuoteId > 0 ? "Save" : "Submit Quote") %> <% } %>