2011-02-19 09:41:09 +00:00
|
|
|
<%@ Control Language="C#" Inherits="System.Web.Mvc.ViewUserControl<VideoGameQuotes.Web.Models.EditQuoteModel>" %>
|
|
|
|
<%@ Import Namespace="Portoa.Web.Util" %>
|
2011-02-23 09:19:32 +00:00
|
|
|
<%@ Import Namespace="VideoGameQuotes.Api" %>
|
2011-02-19 09:41:09 +00:00
|
|
|
|
|
|
|
<div id="edit-quote-form">
|
|
|
|
<% using (Html.BeginForm(Model.ActionName, Model.ControllerName)) { %>
|
2011-02-24 20:28:35 +00:00
|
|
|
<div><%= Html.HiddenFor(model => model.QuoteId, new { id = "quote-id" })%></div>
|
2011-02-19 09:41:09 +00:00
|
|
|
|
2011-02-22 09:39:59 +00:00
|
|
|
<p id="game-select">
|
2011-02-23 01:30:53 +00:00
|
|
|
<%= Html.LabelFor(model => model.GameId, new { @class = "label" })%>
|
2011-02-22 09:39:59 +00:00
|
|
|
<br />
|
|
|
|
<%= Html.DropDownListFor(model => model.GameId, Model.GetGameList()) %>
|
2011-02-19 09:41:09 +00:00
|
|
|
|
2011-02-23 09:19:32 +00:00
|
|
|
<a href="#" id="create-game-link" class="create-new-link" title="create new game"></a>
|
|
|
|
<% if (Model.CurrentUser != null && Model.CurrentUser.Group >= UserGroup.Admin) { %>
|
|
|
|
<a href="#" id="edit-game-link" class="edit-link" title="edit currently selected game"></a>
|
2011-02-24 01:23:53 +00:00
|
|
|
<a href="#" id="delete-game-link" class="delete-link" title="delete currently selected game"></a>
|
2011-02-23 09:19:32 +00:00
|
|
|
<% } %>
|
2011-02-19 09:41:09 +00:00
|
|
|
</p>
|
|
|
|
|
2011-02-23 09:19:32 +00:00
|
|
|
<div id="create-game-form" class="subform">
|
|
|
|
<input type="hidden" value="0" class="edit-mode" />
|
2011-02-23 21:53:51 +00:00
|
|
|
<input type="hidden" value="0" id="SystemId" />
|
2011-02-19 09:41:09 +00:00
|
|
|
<fieldset>
|
|
|
|
<legend>Create new game</legend>
|
2011-02-23 09:19:32 +00:00
|
|
|
|
2011-02-24 20:28:35 +00:00
|
|
|
<p class="error-summary"></p>
|
2011-02-19 09:41:09 +00:00
|
|
|
|
|
|
|
<p>
|
2011-02-23 01:30:53 +00:00
|
|
|
<%= Html.Label("Name", "GameName", new { @class = "label" })%>
|
2011-02-19 09:41:09 +00:00
|
|
|
<br />
|
2011-02-22 09:39:59 +00:00
|
|
|
<%= Html.TextBox("GameName") %>
|
2011-02-19 09:41:09 +00:00
|
|
|
</p>
|
|
|
|
|
|
|
|
<p>
|
2011-02-23 01:30:53 +00:00
|
|
|
<%= Html.Label("Website", "GameWebsite", new { @class = "label" })%> <small>(link to Wikipedia page or something)</small>
|
2011-02-19 09:41:09 +00:00
|
|
|
<br />
|
2011-02-22 09:39:59 +00:00
|
|
|
<%= Html.TextBox("GameWebsite") %>
|
2011-02-19 09:41:09 +00:00
|
|
|
</p>
|
|
|
|
|
2011-02-24 10:55:08 +00:00
|
|
|
<% if (Model.CurrentUser != null && Model.CurrentUser.Group >= UserGroup.Admin) { %>
|
|
|
|
<p>
|
|
|
|
<%= Html.Label("Icon", "GameIcon", new { @class = "label" })%>
|
|
|
|
<br />
|
|
|
|
<%= Html.TextBox("GameIcon") %>
|
|
|
|
</p>
|
|
|
|
<% } %>
|
|
|
|
|
2011-02-24 20:28:35 +00:00
|
|
|
<p><span id="GameRegions" class="label">Regions</span></p>
|
|
|
|
<%= Model.MakeRegionTable() %>
|
2011-02-19 09:41:09 +00:00
|
|
|
|
2011-02-22 09:39:59 +00:00
|
|
|
<div id="system-select">
|
2011-02-24 20:28:35 +00:00
|
|
|
<p><span id="SystemIds" class="label">Systems</span></p>
|
2011-02-22 09:39:59 +00:00
|
|
|
<%= Model.MakeSystemTable(Html) %>
|
2011-02-24 20:28:35 +00:00
|
|
|
<p><a href="#" id="create-system-link" class="create-new-link" title="create new system"></a></p>
|
2011-02-22 09:39:59 +00:00
|
|
|
</div>
|
2011-02-19 09:41:09 +00:00
|
|
|
|
2011-02-23 09:19:32 +00:00
|
|
|
<div id="create-system-form" class="subform">
|
|
|
|
<input type="hidden" value="0" class="edit-mode" />
|
2011-02-19 09:41:09 +00:00
|
|
|
<fieldset>
|
|
|
|
<legend>Create new system</legend>
|
|
|
|
|
2011-02-24 21:00:22 +00:00
|
|
|
<p class="error-summary"></p>
|
2011-02-23 01:30:53 +00:00
|
|
|
|
2011-02-19 09:41:09 +00:00
|
|
|
<p>
|
2011-02-23 01:30:53 +00:00
|
|
|
<%= Html.Label("Name", "SystemName", new { @class = "label" })%>
|
2011-02-19 09:41:09 +00:00
|
|
|
<br />
|
2011-02-22 09:39:59 +00:00
|
|
|
<%= Html.TextBox("SystemName") %>
|
2011-02-19 09:41:09 +00:00
|
|
|
</p>
|
|
|
|
|
|
|
|
<p>
|
2011-02-23 01:30:53 +00:00
|
|
|
<%= Html.Label("Abbreviation", "SystemAbbreviation", new { @class = "label" })%>
|
2011-02-19 09:41:09 +00:00
|
|
|
<br />
|
2011-02-22 09:39:59 +00:00
|
|
|
<%= Html.TextBox("SystemAbbreviation")%>
|
2011-02-19 09:41:09 +00:00
|
|
|
</p>
|
|
|
|
|
|
|
|
<p>
|
2011-02-23 01:30:53 +00:00
|
|
|
<%= Html.Label("Release Date", "SystemReleaseDate", new { @class = "label" })%>
|
2011-02-19 09:41:09 +00:00
|
|
|
<br />
|
2011-02-22 09:39:59 +00:00
|
|
|
<%= Html.TextBox("SystemReleaseDate", null) %>
|
2011-02-19 09:41:09 +00:00
|
|
|
</p>
|
2011-02-22 09:39:59 +00:00
|
|
|
|
2011-02-24 21:00:22 +00:00
|
|
|
<p>
|
2011-02-24 22:50:37 +00:00
|
|
|
<a href="#" class="submit-link button-link" id="create-system-submit" title="save system">Save System</a>
|
2011-02-24 21:00:22 +00:00
|
|
|
<a href="#" class="cancel-link button-link" id="create-system-cancel" title="cancel">Cancel</a>
|
|
|
|
</p>
|
2011-02-19 09:41:09 +00:00
|
|
|
</fieldset>
|
|
|
|
</div>
|
|
|
|
|
2011-02-22 09:39:59 +00:00
|
|
|
<div id="publisher-select">
|
2011-02-24 20:28:35 +00:00
|
|
|
<p><span class="label">Publishers</span></p>
|
2011-02-22 09:39:59 +00:00
|
|
|
<%= Model.MakePublisherTable(Html) %>
|
2011-02-24 20:28:35 +00:00
|
|
|
<p><a href="#" id="create-publisher-link" class="create-new-link" title="create new publisher"></a></p>
|
2011-02-22 09:39:59 +00:00
|
|
|
</div>
|
2011-02-19 09:41:09 +00:00
|
|
|
|
2011-02-23 09:19:32 +00:00
|
|
|
<div id="create-publisher-form" class="subform">
|
|
|
|
<input type="hidden" value="0" class="edit-mode" />
|
2011-02-19 09:41:09 +00:00
|
|
|
<fieldset>
|
|
|
|
<legend>Create new publisher</legend>
|
|
|
|
|
2011-02-24 21:00:22 +00:00
|
|
|
<p class="error-summary"></p>
|
2011-02-23 01:30:53 +00:00
|
|
|
|
2011-02-19 09:41:09 +00:00
|
|
|
<p>
|
2011-02-23 01:30:53 +00:00
|
|
|
<%= Html.Label("Name", "PublisherName", new { @class = "label" })%>
|
2011-02-19 09:41:09 +00:00
|
|
|
<br />
|
2011-02-22 09:39:59 +00:00
|
|
|
<%= Html.TextBox("PublisherName") %>
|
2011-02-19 09:41:09 +00:00
|
|
|
</p>
|
|
|
|
|
|
|
|
<p>
|
2011-02-23 01:30:53 +00:00
|
|
|
<%= Html.Label("Website", "PublisherWebsite", new { @class = "label" }) %>
|
2011-02-19 09:41:09 +00:00
|
|
|
<br />
|
2011-02-22 09:39:59 +00:00
|
|
|
<%= Html.TextBox("PublisherWebsite") %>
|
2011-02-19 09:41:09 +00:00
|
|
|
</p>
|
2011-02-22 09:39:59 +00:00
|
|
|
|
2011-02-24 22:50:37 +00:00
|
|
|
<p>
|
|
|
|
<a href="#" class="submit-link button-link" id="create-publisher-submit" title="save publisher">Save Publisher</a>
|
|
|
|
<a href="#" class="cancel-link button-link" id="create-publisher-cancel" title="cancel">Cancel</a>
|
|
|
|
</p>
|
2011-02-19 09:41:09 +00:00
|
|
|
</fieldset>
|
|
|
|
</div>
|
2011-02-22 09:39:59 +00:00
|
|
|
|
2011-02-24 21:00:22 +00:00
|
|
|
<p>
|
|
|
|
<a href="#" class="submit-link button-link" id="create-game-submit" title="save game">Save Game</a>
|
|
|
|
<a href="#" class="cancel-link button-link" id="create-game-cancel" title="cancel">Cancel</a>
|
|
|
|
</p>
|
2011-02-19 09:41:09 +00:00
|
|
|
</fieldset>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<p>
|
2011-02-23 01:30:53 +00:00
|
|
|
<%= Html.LabelFor(model => model.QuoteText, new { @class = "label" })%>
|
2011-02-19 09:41:09 +00:00
|
|
|
<br />
|
|
|
|
<%= Html.TextAreaFor(model => model.QuoteText) %>
|
|
|
|
</p>
|
|
|
|
|
|
|
|
<div>
|
2011-02-24 20:28:35 +00:00
|
|
|
<p><span class="label">Categories</span></p>
|
2011-02-19 09:41:09 +00:00
|
|
|
<%= Model.MakeCategoryTable(Html) %>
|
2011-02-24 20:28:35 +00:00
|
|
|
<p><a href="#" id="create-category-link" class="create-new-link" title="create new category"></a></p>
|
2011-02-19 09:41:09 +00:00
|
|
|
</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 />
|
|
|
|
|
2011-02-24 20:28:35 +00:00
|
|
|
<p><%= Html.Submit(Model.QuoteId > 0 ? "Save" : "Submit Quote") %></p>
|
2011-02-19 09:41:09 +00:00
|
|
|
<% } %>
|
|
|
|
</div>
|