68 lines
3.1 KiB
Plaintext
68 lines
3.1 KiB
Plaintext
<%@ Control Language="C#" Inherits="System.Web.Mvc.ViewUserControl<VideoGameQuotes.Web.Models.QuoteModel>" %>
|
|
<%@ Import Namespace="VideoGameQuotes.Api" %>
|
|
|
|
<div class="quote-container">
|
|
<input type="hidden" class="quote-id" value="<%= Model.Quote.Id %>" />
|
|
<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>
|
|
<div class="quote-score" title="+<%= Model.Quote.UpVotes %>, -<%= Model.Quote.DownVotes %>"><%= Model.Quote.Score %></div>
|
|
<div class="vote-container">
|
|
<span class="vote-against" title="I hate this quote">▼</span>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="quote-text">
|
|
<%= Model.Quote.FormatTextForHtml() %>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="clearfix">
|
|
<p class="quote-details-created">
|
|
<span title="<%: Model.Quote.Created %>">added <%: Model.Quote.GetHumanReadableTimeSinceCreated() %></span>
|
|
<% if (Model.User != null && Model.User.Group >= UserGroup.Admin) { %>
|
|
by <%= Html.ActionLink(Model.Quote.Creator.GetUsernameOrIp(), "edit", "user", new { usernameOrIp = Model.Quote.Creator.GetUsernameOrIp()}, null) %>
|
|
<% } %>
|
|
</p>
|
|
|
|
<p class="quote-links">
|
|
<a class="quote-flag-icon" href="#" title="flag this quote as inaccurate, fake, spam, duplicate, etc."></a>
|
|
<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>
|
|
<% if (Model.User != null && Model.User.Group >= UserGroup.Admin) { %>
|
|
<a class="edit-icon" href="<%= Url.Action("edit", "quote", new { id = Model.Quote.Id }) %>" title="edit this quote"></a>
|
|
<small>(<%= Model.Quote.FlagCount %>)</small>
|
|
<% } %>
|
|
</p>
|
|
</div>
|
|
|
|
<div class="quote-categories">
|
|
<ul class="menu clearfix">
|
|
<li>
|
|
<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 %>"">
|
|
<% if (Model.Quote.Game.Icon != null) { %>
|
|
<img src="data:image/png;base64,<%= Model.Quote.Game.GetBase64EncodedIcon() %>" alt="icon" />
|
|
<% } %>
|
|
<%: Model.Quote.Game.Name %>
|
|
</a>
|
|
</li>
|
|
|
|
<% foreach (var system in Model.Quote.Game.Systems.OrderBy(system => system.ReleaseDate)) { %>
|
|
<li>
|
|
<a class="system-link" href="<%= Url.Action("browse", "quote", new { qualifiers = "system/" + system.Id }) %>" title="browse quotes from the system "<%: system.Name %>"">
|
|
<% if (system.Icon != null) { %>
|
|
<img src="data:image/png;base64,<%= system.GetBase64EncodedIcon() %>" alt="icon" />
|
|
<% } %>
|
|
<%: system.Abbreviation %>
|
|
</a>
|
|
</li>
|
|
<% } %>
|
|
|
|
<% foreach (var category in Model.Quote.Categories.OrderBy(category => category.Name)) { %>
|
|
<li><%= Html.ActionLink(category.Name, "browse", "Quote", new { qualifiers = "category/" + category.Id }, new { title = string.Format("browse quotes categorized as \"{0}\"", category.Name) })%></li>
|
|
<% } %>
|
|
</ul>
|
|
</div>
|
|
</div>
|