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

<%= Html.LabelFor(model => model.GameId, new { @class = "label" })%>
<%= Html.DropDownListFor(model => model.GameId, Model.GetGameList()) %> <% if (Model.CurrentUser != null && Model.CurrentUser.Group >= UserGroup.Admin) { %> <% } %>

Create new game

<%= Html.Label("Name", "GameName", new { @class = "label" })%>
<%= Html.TextBox("GameName") %>

<%= Html.Label("Website", "GameWebsite", new { @class = "label" })%> (link to Wikipedia page or something)
<%= Html.TextBox("GameWebsite") %>

<% if (Model.CurrentUser != null && Model.CurrentUser.Group >= UserGroup.Admin) { %>

<%= Html.Label("Icon", "GameIcon", new { @class = "label" })%>
<%= Html.TextBox("GameIcon") %>

<% } %>

Regions

<%= Model.MakeRegionTable() %>

Systems

<%= Model.MakeSystemTable(Html) %>

Create new system

<%= Html.Label("Name", "SystemName", new { @class = "label" })%>
<%= Html.TextBox("SystemName") %>

<%= Html.Label("Abbreviation", "SystemAbbreviation", new { @class = "label" })%>
<%= Html.TextBox("SystemAbbreviation")%>

<%= Html.Label("Release Date", "SystemReleaseDate", new { @class = "label" })%>
<%= Html.TextBox("SystemReleaseDate") %>

<% if (Model.CurrentUser != null && Model.CurrentUser.Group >= UserGroup.Admin) { %>

<%= Html.Label("Icon", "SystemIcon", new { @class = "label" })%>
<%= Html.TextBox("SystemIcon")%>

<% } %>

Save System Cancel

Publishers

<%= Model.MakePublisherTable(Html) %>

Create new publisher

<%= Html.Label("Name", "PublisherName", new { @class = "label" })%>
<%= Html.TextBox("PublisherName") %>

<%= Html.Label("Website", "PublisherWebsite", new { @class = "label" }) %>
<%= Html.TextBox("PublisherWebsite") %>

Save Publisher Cancel

Save Game Cancel

<%= Html.LabelFor(model => model.QuoteText, new { @class = "label" })%>
<%= Html.TextAreaFor(model => model.QuoteText) %>

Categories

<%= Model.MakeCategoryTable(Html) %>

<% 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") %>

<% } %>