-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Performance improvement for mini details page.
- Loading branch information
1 parent
81be349
commit 288328f
Showing
2 changed files
with
14 additions
and
38 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,5 @@ | ||
@page | ||
@using MiniIndex.Models; | ||
@model MiniIndex.Pages.Minis.DetailsModel | ||
@inject SignInManager<IdentityUser> SignInManager | ||
@{ | ||
|
@@ -42,8 +43,6 @@ | |
<h2>@Html.DisplayFor(model => model.Mini.Name) by <a href="/Creators/[email protected]">@Html.DisplayFor(model => model.Mini.Creator.Name)</a></h2> | ||
<hr /> | ||
|
||
|
||
|
||
<div class="row"> | ||
<div class="col-md-4" align="center"> | ||
<div class="row"> | ||
|
@@ -127,7 +126,6 @@ | |
} | ||
</div> | ||
<div id="AddedTags"> | ||
|
||
</div> | ||
</div> | ||
</div> | ||
|
@@ -147,19 +145,18 @@ | |
|
||
<div id="UnusedTags"> | ||
|
||
@if (User.IsInRole("Moderator") && Model.SimilarTags.Count > 0) | ||
@if (User.IsInRole("Moderator") && Model.RecommendedTags.Any()) | ||
{ | ||
<div class="add-tag-div"> | ||
<h3 class="add-tag-header">Recommended Tags</h3> | ||
@foreach (var Tag in Model.SimilarTags) | ||
@foreach (var Tag in Model.RecommendedTags) | ||
{ | ||
<a href="#" id="@Tag.ID" class="btn btn-outline-success add-tag" style="margin-top:5px;">+ @Tag.TagName</a> | ||
} | ||
</div> | ||
<hr/> | ||
<hr /> | ||
} | ||
|
||
|
||
<div class="add-tag-div"> | ||
<h3 class="add-tag-header">Genre</h3> | ||
@foreach (var Tag in Model.UnusedTags.Where(m => m.Category.ToString() == "Genre")) | ||
|
@@ -179,12 +176,12 @@ | |
@{var PreviousCategory = "";} | ||
<div class="add-tag-div"> | ||
|
||
|
||
@foreach (var Tag in Model.UnusedTags.Where(m => !string.IsNullOrEmpty(m.Category.ToString()) | ||
&& m.Category.ToString() != "Genre" | ||
&& m.Category.ToString() != "OtherDescription" | ||
&& m.Category.ToString() != "CreatureName" | ||
&& m.Category.ToString() != "Use")) | ||
@foreach (var Tag in Model.UnusedTags | ||
.Where(m => !string.IsNullOrEmpty(m.Category.ToString()) | ||
&& m.Category != TagCategory.Genre | ||
&& m.Category != TagCategory.OtherDescription | ||
&& m.Category != TagCategory.CreatureName | ||
&& m.Category != TagCategory.Use)) | ||
{ | ||
@if (Tag.Category.ToString() != PreviousCategory) | ||
{ | ||
|
@@ -219,10 +216,7 @@ | |
} | ||
</div> | ||
<a href="#" id="AddNewTag" class="btn btn-success" style="margin-top:5px;">+ Add as new tag</a> | ||
|
||
</div> | ||
</div> | ||
} | ||
|
||
|
||
</div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters