|
|
|
@ -1,19 +1,22 @@
|
|
|
|
|
@using Nancy.Security
|
|
|
|
|
@using Nancy.Security
|
|
|
|
|
@using PlexRequests.Helpers.Permissions
|
|
|
|
|
@using PlexRequests.UI.Helpers
|
|
|
|
|
@using PlexRequests.UI.Resources
|
|
|
|
|
@{
|
|
|
|
|
var baseUrl = Html.GetBaseUrl();
|
|
|
|
|
var formAction = string.Empty;
|
|
|
|
|
var isAdmin = Html.HasAnyPermission(true, Permissions.Administrator, Permissions.ManageRequests);
|
|
|
|
|
if (!string.IsNullOrEmpty(baseUrl.ToHtmlString()))
|
|
|
|
|
{
|
|
|
|
|
formAction = "/" + baseUrl.ToHtmlString();
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
<div>
|
|
|
|
|
<div hidden="hidden" id="isAdmin" value="@isAdmin"></div>
|
|
|
|
|
<h1>@UI.Requests_Title</h1>
|
|
|
|
|
<h4>@UI.Requests_Paragraph</h4>
|
|
|
|
|
<br />
|
|
|
|
|
<br/>
|
|
|
|
|
|
|
|
|
|
<!-- Nav tabs -->
|
|
|
|
|
<ul id="nav-tabs" class="nav nav-tabs" role="tablist">
|
|
|
|
@ -30,7 +33,7 @@
|
|
|
|
|
<li role="presentation"><a href="#MusicTab" aria-controls="profile" role="tab" data-toggle="tab"><i class="fa fa-music"></i> @UI.Requests_AlbumsTabTitle</a></li>
|
|
|
|
|
}
|
|
|
|
|
</ul>
|
|
|
|
|
<br />
|
|
|
|
|
<br/>
|
|
|
|
|
|
|
|
|
|
<!-- Tab panes -->
|
|
|
|
|
<div class="tab-content contentList">
|
|
|
|
@ -38,38 +41,59 @@
|
|
|
|
|
<div class="col-sm-12">
|
|
|
|
|
<div class="pull-right">
|
|
|
|
|
<div class="btn-group btn-group-separated">
|
|
|
|
|
@if (Context.CurrentUser.IsAuthenticated()) //TODO replace with IsAdmin
|
|
|
|
|
@if (isAdmin)
|
|
|
|
|
{
|
|
|
|
|
@if (Model.SearchForMovies)
|
|
|
|
|
{
|
|
|
|
|
<button id="deleteMovies" class="btn btn-warning-outline delete-category" type="submit"><i class="fa fa-trash"></i> @UI.Requests_DeleteMovies</button>
|
|
|
|
|
<button id="approveMovies" class="btn btn-success-outline approve-category" type="submit"><i class="fa fa-plus"></i> @UI.Requests_ApproveMovies</button>
|
|
|
|
|
}
|
|
|
|
|
{
|
|
|
|
|
<button id="deleteMovies" class="btn btn-warning-outline delete-category" type="submit"><i class="fa fa-trash"></i> @UI.Requests_DeleteMovies</button>
|
|
|
|
|
<button id="approveMovies" class="btn btn-success-outline approve-category" type="submit"><i class="fa fa-plus"></i> @UI.Requests_ApproveMovies</button>
|
|
|
|
|
}
|
|
|
|
|
@if (Model.SearchForTvShows)
|
|
|
|
|
{
|
|
|
|
|
<button id="deleteTVShows" class="btn btn-warning-outline delete-category" type="submit" style="display: none;"><i class="fa fa-trash"></i> @UI.Requests_DeleteTVShows</button>
|
|
|
|
|
<button id="approveTVShows" class="btn btn-success-outline approve-category" type="submit" style="display: none;"><i class="fa fa-plus"></i> @UI.Requests_ApproveTvShows</button>
|
|
|
|
|
}
|
|
|
|
|
{
|
|
|
|
|
<button id="deleteTVShows" class="btn btn-warning-outline delete-category" type="submit" style="display: none;"><i class="fa fa-trash"></i> @UI.Requests_DeleteTVShows</button>
|
|
|
|
|
<button id="approveTVShows" class="btn btn-success-outline approve-category" type="submit" style="display: none;"><i class="fa fa-plus"></i> @UI.Requests_ApproveTvShows</button>
|
|
|
|
|
}
|
|
|
|
|
@if (Model.SearchForMusic)
|
|
|
|
|
{
|
|
|
|
|
<button id="deleteMusic" class="btn btn-warning-outline delete-category" type="submit" style="display: none;"><i class="fa fa-trash"></i> @UI.Requests_DeleteMusic</button>
|
|
|
|
|
<button id="approveMusic" class="btn btn-success-outline approve-category" type="submit" style="display: none;"><i class="fa fa-plus"></i> @UI.Requests_ApproveMusic</button>
|
|
|
|
|
}
|
|
|
|
|
{
|
|
|
|
|
<button id="deleteMusic" class="btn btn-warning-outline delete-category" type="submit" style="display: none;"><i class="fa fa-trash"></i> @UI.Requests_DeleteMusic</button>
|
|
|
|
|
<button id="approveMusic" class="btn btn-success-outline approve-category" type="submit" style="display: none;"><i class="fa fa-plus"></i> @UI.Requests_ApproveMusic</button>
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
</div>
|
|
|
|
|
<div class="btn-group">
|
|
|
|
|
<a href="#" class="btn btn-primary-outline dropdown-toggle" data-toggle="dropdown" aria-expanded="false">
|
|
|
|
|
<span id="filterText">@UI.Requests_Filter_NotApproved</span>
|
|
|
|
|
@if (isAdmin)
|
|
|
|
|
{
|
|
|
|
|
<span id="filterText">@UI.Requests_Filter_NotApproved</span>
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|
<span id="filterText">@UI.Requests_Filter_All</span>
|
|
|
|
|
}
|
|
|
|
|
<i class="fa fa-filter"></i>
|
|
|
|
|
</a>
|
|
|
|
|
<ul class="dropdown-menu">
|
|
|
|
|
<li><a href="#" class="filter" data-filter="all"><i class="fa fa-square-o"></i> @UI.Requests_Filter_All</a></li>
|
|
|
|
|
<li><a href="#" class="filter" data-filter=".approved-true"><i class="fa fa-square-o"></i> @UI.Requests_Filter_Approved</a></li>
|
|
|
|
|
<li><a href="#" class="filter" data-filter=".approved-false"><i class="fa fa-check-square"></i> @UI.Requests_Filter_NotApproved</a></li>
|
|
|
|
|
<li><a href="#" class="filter" data-filter=".available-true"><i class="fa fa-square-o"></i> @UI.Requests_Filter_Available</a></li>
|
|
|
|
|
@if (!isAdmin)
|
|
|
|
|
{
|
|
|
|
|
<li><a href="#" class="filter" data-filter="all"><i class="fa fa-check-square"></i> @UI.Requests_Filter_All</a></li>
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|
<li><a href="#" class="filter" data-filter="all"><i class="fa fa-square-o"></i> @UI.Requests_Filter_All</a></li>
|
|
|
|
|
}
|
|
|
|
|
<li><a href="#" class="filter" data-filter=".approved-true"><i class="fa fa-square-o"></i> @UI.Requests_Filter_Approved</a></li>
|
|
|
|
|
@if (isAdmin)
|
|
|
|
|
{
|
|
|
|
|
<li><a href="#" class="filter" data-filter=".approved-false"><i class="fa fa-check-square"></i> @UI.Requests_Filter_NotApproved</a></li>
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|
<li><a href="#" class="filter" data-filter=".approved-false"><i class="fa fa-square-o"></i> @UI.Requests_Filter_NotApproved</a></li>
|
|
|
|
|
}
|
|
|
|
|
<li><a href="#" class="filter" data-filter=".available-true"><i class="fa fa-square-o"></i> @UI.Requests_Filter_Available</a></li>
|
|
|
|
|
<li><a href="#" class="filter" data-filter=".available-false"><i class="fa fa-square-o"></i> @UI.Requests_Filter_NotAvailable</a></li>
|
|
|
|
|
<li><a href="#" class="filter" data-filter=".released-true"><i class="fa fa-square-o"></i> @UI.Requests_Filter_Released</a></li>
|
|
|
|
|
<li><a href="#" class="filter" data-filter=".released-false"><i class="fa fa-square-o"></i> @UI.Requests_Filter_NotReleased</a></li>
|
|
|
|
|
<li><a href="#" class="filter" data-filter=".released-true"><i class="fa fa-square-o"></i> @UI.Requests_Filter_Released</a></li>
|
|
|
|
|
<li><a href="#" class="filter" data-filter=".released-false"><i class="fa fa-square-o"></i> @UI.Requests_Filter_NotReleased</a></li>
|
|
|
|
|
</ul>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="btn-group">
|
|
|
|
@ -78,23 +102,23 @@
|
|
|
|
|
<i class="fa fa-sort"></i>
|
|
|
|
|
</a>
|
|
|
|
|
<ul class="dropdown-menu">
|
|
|
|
|
<li><a href="#" class="sort" data-sort="requestorder:desc"><i class="fa fa-check-square"></i> @UI.Requests_Order_LatestRequests</a></li>
|
|
|
|
|
<li><a href="#" class="sort" data-sort="requestorder:asc"><i class="fa fa-square-o"></i> @UI.Requests_Order_OldestRequests</a></li>
|
|
|
|
|
<li><a href="#" class="sort" data-sort="releaseorder:desc"><i class="fa fa-square-o"></i> @UI.Requests_Order_LatestReleases</a></li>
|
|
|
|
|
<li><a href="#" class="sort" data-sort="releaseorder:asc"><i class="fa fa-square-o"></i> @UI.Requests_Order_OldestReleases</a></li>
|
|
|
|
|
<li><a href="#" class="sort" data-sort="requestorder:desc"><i class="fa fa-check-square"></i> @UI.Requests_Order_LatestRequests</a></li>
|
|
|
|
|
<li><a href="#" class="sort" data-sort="requestorder:asc"><i class="fa fa-square-o"></i> @UI.Requests_Order_OldestRequests</a></li>
|
|
|
|
|
<li><a href="#" class="sort" data-sort="releaseorder:desc"><i class="fa fa-square-o"></i> @UI.Requests_Order_LatestReleases</a></li>
|
|
|
|
|
<li><a href="#" class="sort" data-sort="releaseorder:asc"><i class="fa fa-square-o"></i> @UI.Requests_Order_OldestReleases</a></li>
|
|
|
|
|
</ul>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
@if (Model.SearchForMovies)
|
|
|
|
|
{
|
|
|
|
|
{
|
|
|
|
|
|
|
|
|
|
<!-- Movie tab -->
|
|
|
|
|
<div role="tabpanel" class="tab-pane active" id="MoviesTab">
|
|
|
|
|
|
|
|
|
|
<br />
|
|
|
|
|
<br />
|
|
|
|
|
<br/>
|
|
|
|
|
<br/>
|
|
|
|
|
<!-- Movie content -->
|
|
|
|
|
<div id="movieList">
|
|
|
|
|
</div>
|
|
|
|
@ -102,12 +126,12 @@
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@if (Model.SearchForTvShows)
|
|
|
|
|
{
|
|
|
|
|
{
|
|
|
|
|
<!-- TV tab -->
|
|
|
|
|
<div role="tabpanel" class="tab-pane" id="TvShowTab">
|
|
|
|
|
|
|
|
|
|
<br />
|
|
|
|
|
<br />
|
|
|
|
|
<br/>
|
|
|
|
|
<br/>
|
|
|
|
|
<!-- TV content -->
|
|
|
|
|
<div id="tvList">
|
|
|
|
|
</div>
|
|
|
|
@ -115,12 +139,12 @@
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@if (Model.SearchForMusic)
|
|
|
|
|
{
|
|
|
|
|
{
|
|
|
|
|
<!-- Music tab -->
|
|
|
|
|
<div role="tabpanel" class="tab-pane" id="MusicTab">
|
|
|
|
|
|
|
|
|
|
<br />
|
|
|
|
|
<br />
|
|
|
|
|
<br/>
|
|
|
|
|
<br/>
|
|
|
|
|
<!-- TV content -->
|
|
|
|
|
<div id="musicList">
|
|
|
|
|
</div>
|
|
|
|
@ -168,9 +192,14 @@
|
|
|
|
|
<a href="http://www.imdb.com/title/{{imdb}}/" target="_blank">
|
|
|
|
|
<h4 class="request-title">{{title}} ({{year}})</h4>
|
|
|
|
|
</a>
|
|
|
|
|
<span class="label label-success">{{status}}</span>
|
|
|
|
|
</div>
|
|
|
|
|
<br />
|
|
|
|
|
{{#if_eq type "tv"}}
|
|
|
|
|
<span>@UI.Search_TV_Show_Status: </span>
|
|
|
|
|
{{else}}
|
|
|
|
|
<span>@UI.Search_Movie_Status: </span>
|
|
|
|
|
{{/if_eq}}
|
|
|
|
|
<span class="label label-success">{{status}}</span>
|
|
|
|
|
{{#if denied}}
|
|
|
|
|
<div>
|
|
|
|
|
Denied: <i style="color:red;" class="fa fa-check"></i>
|
|
|
|
|