2011-02-14 11:01:31 +00:00
<%@ Control Language="C#" Inherits="System.Web.Mvc.ViewUserControl<VideoGameQuotes.Web.Models.QuoteModel>" %>
<%@ Import Namespace="VideoGameQuotes.Api" %>
<div class="quote-container">
2011-02-15 00:14:24 +00:00
<input type="hidden" class="quote-id" value="<%= Model.Quote.Id %>" />
2011-02-14 11:01:31 +00:00
<div class="quote-data clearfix">
<div class="quote-score-container">
<div class="vote-container">
<span class="vote-for" title="I like this quote">▲</span>
</div>
2011-02-16 02:48:58 +00:00
<div class="quote-score" title="+<%= Model.Quote.UpVotes %>, -<%= Model.Quote.DownVotes %>"><%= Model.Quote.Score %></div>
2011-02-14 11:01:31 +00:00
<div class="vote-container">
<span class="vote-against" title="I hate this quote">▼</span>
</div>
</div>
2011-02-21 23:59:06 +00:00
<div class="quote-text">
2011-02-27 04:20:59 +00:00
<%= Model.Quote.FormatTextForHtml() %>
2011-02-21 23:59:06 +00:00
</div>
2011-02-14 11:01:31 +00:00
</div>
<div class="clearfix">
2011-02-21 23:59:06 +00:00
<p class="quote-details-created">
<span title="<%: Model.Quote.Created %>">added <%: Model.Quote.GetHumanReadableTimeSinceCreated() %></span>
<% if (Model.User != null && Model.User.Group >= UserGroup.Admin) { %>
2011-03-02 20:18:33 +00:00
by <%= Html.ActionLink(Model.Quote.Creator.GetUsernameOrIp(), "Edit", "User", new { usernameOrIp = Model.Quote.Creator.GetUsernameOrIp()}, null) %>
2011-02-21 23:59:06 +00:00
<% } %>
</p>
<p class="quote-links">
2011-03-04 08:20:20 +00:00
<a class="quote-flag-icon quote-flag-link" href="#" title="flag this quote as inaccurate, fake, spam, duplicate, etc."></a>
2011-03-02 20:18:33 +00:00
<a class="quote-permalink" href="<%= Url.Action("Quote", "Quote", new { id = Model.Quote.Id, text = Model.Quote.GetUrlFriendlyText() }) %>" title="permanent link to this quote"></a>
2011-02-19 09:41:09 +00:00
<% if (Model.User != null && Model.User.Group >= UserGroup.Admin) { %>
2011-03-02 20:18:33 +00:00
<a class="edit-icon" href="<%= Url.Action("Edit", "Quote", new { id = Model.Quote.Id }) %>" title="edit this quote"></a>
2011-03-04 08:20:20 +00:00
<a class="delete-icon delete-quote-link" href="#" title="delete this quote and all its flags and votes"></a>
<strong>[<%= Model.Quote.FlagCount %>]</strong>
2011-02-19 09:41:09 +00:00
<% } %>
2011-02-21 23:59:06 +00:00
</p>
2011-02-14 11:01:31 +00:00
</div>
2011-02-21 23:59:06 +00:00
<div class="quote-categories">
<ul class="menu clearfix">
2011-02-24 10:55:08 +00:00
<li>
2011-03-02 20:18:33 +00:00
<a class="game-link" href="<%= Url.Action("Browse", "Quote", new { qualifiers = "game/" + Model.Quote.Game.Id }) %>" title="browse quotes from the game "<%: Model.Quote.Game.Name %>"">
2011-02-27 08:47:16 +00:00
<% if (Model.Quote.Game.Icon != null) { %>
2011-03-02 20:18:33 +00:00
<img src="data:image/png;base64,<%= Model.Quote.Game.GetBase64EncodedIcon() %>" alt="" />
2011-02-27 08:47:16 +00:00
<% } %>
2011-02-24 10:55:08 +00:00
<%: Model.Quote.Game.Name %>
</a>
</li>
2011-02-27 08:47:16 +00:00
<% foreach (var system in Model.Quote.Game.Systems.OrderBy(system => system.ReleaseDate)) { %>
<li>
2011-03-02 20:18:33 +00:00
<a class="system-link" href="<%= Url.Action("Browse", "Quote", new { qualifiers = "system/" + system.Id }) %>" title="browse quotes from the system "<%: system.Name %>"">
2011-02-27 08:47:16 +00:00
<% if (system.Icon != null) { %>
2011-03-02 20:18:33 +00:00
<img src="data:image/png;base64,<%= system.GetBase64EncodedIcon() %>" alt="" />
2011-02-27 08:47:16 +00:00
<% } %>
<%: system.Abbreviation %>
</a>
</li>
<% } %>
<% foreach (var category in Model.Quote.Categories.OrderBy(category => category.Name)) { %>
2011-03-02 20:18:33 +00:00
<li><%= Html.ActionLink(category.Name, "Browse", "Quote", new { qualifiers = "category/" + category.Id }, new { title = string.Format("browse quotes categorized as \"{0}\"", category.Name) })%></li>
2011-02-27 08:47:16 +00:00
<% } %>
2011-02-21 23:59:06 +00:00
</ul>
2011-02-14 11:01:31 +00:00
</div>
</div>