142 lines
4.2 KiB
Plaintext
142 lines
4.2 KiB
Plaintext
<%@ Control Language="C#" Inherits="System.Web.Mvc.ViewUserControl<VideoGameQuotes.Web.Models.EditQuoteModel>" %>
|
|
<%@ Import Namespace="Portoa.Web.Util" %>
|
|
|
|
<div id="edit-quote-form">
|
|
<% using (Html.BeginForm(Model.ActionName, Model.ControllerName)) { %>
|
|
<%= Html.HiddenFor(model => model.QuoteId, new { id = "quote-id" })%>
|
|
|
|
<p id="game-select">
|
|
<%= Html.Label("Game", "GameId") %>
|
|
<br />
|
|
<%= Html.DropDownListFor(model => model.GameId, Model.GetGameList()) %>
|
|
|
|
<a href="#" id="create-game-link">Create new game</a>
|
|
</p>
|
|
|
|
<div id="create-game-form">
|
|
<fieldset>
|
|
<legend>Create new game</legend>
|
|
|
|
<p>
|
|
<%= Html.Label("Name", "GameName") %>
|
|
<br />
|
|
<%= Html.TextBox("GameName") %>
|
|
</p>
|
|
|
|
<p>
|
|
<%= Html.Label("Website", "GameWebsite") %> <small>(link to Wikipedia page or something)</small>
|
|
<br />
|
|
<%= Html.TextBox("GameWebsite") %>
|
|
</p>
|
|
|
|
<p>
|
|
Regions
|
|
<br />
|
|
<%= Model.MakeRegionTable() %>
|
|
</p>
|
|
|
|
<div id="system-select">
|
|
Systems
|
|
<br />
|
|
<%= Model.MakeSystemTable(Html) %>
|
|
<a href="#" id="create-system-link">Create new system</a>
|
|
</div>
|
|
|
|
<div id="create-system-form">
|
|
<fieldset>
|
|
<legend>Create new system</legend>
|
|
|
|
<p>
|
|
<%= Html.Label("Name", "SystemName") %>
|
|
<br />
|
|
<%= Html.TextBox("SystemName") %>
|
|
</p>
|
|
|
|
<p>
|
|
<%= Html.Label("Abbreviation", "SystemAbbreviation") %>
|
|
<br />
|
|
<%= Html.TextBox("SystemAbbreviation")%>
|
|
</p>
|
|
|
|
<p>
|
|
<%= Html.Label("Release Date", "SystemReleaseDate") %>
|
|
<br />
|
|
<%= Html.TextBox("SystemReleaseDate", null) %>
|
|
</p>
|
|
|
|
<%= Html.Button("Create System", new { id = "create-system-submit" })%>
|
|
<%= Html.Button("Cancel", new { id = "create-system-cancel" })%>
|
|
</fieldset>
|
|
</div>
|
|
|
|
<div id="publisher-select">
|
|
Publishers
|
|
<br />
|
|
<%= Model.MakePublisherTable(Html) %>
|
|
<a href="#" id="create-publisher-link">Create new publisher</a>
|
|
</div>
|
|
|
|
<div id="create-publisher-form">
|
|
<fieldset>
|
|
<legend>Create new publisher</legend>
|
|
|
|
<p>
|
|
<%= Html.Label("Name", "PublisherName") %>
|
|
<br />
|
|
<%= Html.TextBox("PublisherName") %>
|
|
</p>
|
|
|
|
<p>
|
|
<%= Html.Label("Website", "PublisherWebsite") %>
|
|
<br />
|
|
<%= Html.TextBox("PublisherWebsite") %>
|
|
</p>
|
|
|
|
<%= Html.Button("Create Publisher", new { id = "create-publisher-submit" })%>
|
|
<%= Html.Button("Cancel", new { id = "create-publisher-cancel" })%>
|
|
</fieldset>
|
|
</div>
|
|
|
|
<%= Html.Button("Create Game", new { id = "create-game-submit" })%>
|
|
<%= Html.Button("Cancel", new { id = "create-game-cancel" })%>
|
|
</fieldset>
|
|
</div>
|
|
|
|
<p>
|
|
<%= Html.LabelFor(model => model.QuoteText) %>
|
|
<br />
|
|
<%= Html.TextAreaFor(model => model.QuoteText) %>
|
|
</p>
|
|
|
|
<div>
|
|
<p>
|
|
<%= Html.LabelFor(model => model.CategoryIds) %>
|
|
</p>
|
|
<%= Model.MakeCategoryTable(Html) %>
|
|
|
|
<a href="#" id="create-category-link">Create new category</a>
|
|
</div>
|
|
|
|
<% if (Model.QuoteId > 0) { %>
|
|
<div id="quote-flags-container">
|
|
<% foreach (var flag in Model.Flags) { %>
|
|
<div class="quote-flag">
|
|
<input type="hidden" class="quote-flag-id" value="<%= flag.Id %>" />
|
|
<p>
|
|
Flagged as <strong><%: flag.Type %></strong> on <em><%= flag.Created %></em> by
|
|
<strong><%: flag.User.Username ?? flag.User.IpAddress %></strong>.
|
|
</p>
|
|
|
|
<p><%: flag.Comment %></p>
|
|
|
|
<p><a href="#" class="dismiss-flag-link">dismiss</a></p>
|
|
</div>
|
|
<% } %>
|
|
</div>
|
|
<% } %>
|
|
|
|
<hr />
|
|
|
|
<%= Html.Submit(Model.QuoteId > 0 ? "Save" : "Submit Quote") %>
|
|
<% } %>
|
|
</div> |