|
|
|
@using PlexRequests.UI.Helpers
|
|
|
|
@using PlexRequests.UI.Resources
|
|
|
|
@{
|
|
|
|
var baseUrl = Html.GetBaseUrl();
|
|
|
|
var url = string.Empty;
|
|
|
|
if (!string.IsNullOrEmpty(baseUrl.ToHtmlString()))
|
|
|
|
{
|
|
|
|
url = "/" + baseUrl.ToHtmlString();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
<div>
|
|
|
|
<h1 id="searchTitle">@UI.Search_Title</h1>
|
|
|
|
<h4>@UI.Search_Paragraph</h4>
|
|
|
|
<br />
|
|
|
|
<!-- Nav tabs -->
|
|
|
|
|
|
|
|
|
|
|
|
<ul id="nav-tabs" class="nav nav-tabs" role="tablist">
|
|
|
|
@if (Model.SearchForMovies)
|
|
|
|
{
|
|
|
|
<li role="presentation" class="active">
|
|
|
|
<a id="movieTabButton" href="#MoviesTab" aria-controls="home" role="tab" data-toggle="tab"><i class="fa fa-film"></i> @UI.Search_Movies</a>
|
|
|
|
|
|
|
|
</li>
|
|
|
|
}
|
|
|
|
@if (Model.SearchForTvShows)
|
|
|
|
{
|
|
|
|
<li role="presentation">
|
|
|
|
<a id="tvTabButton" href="#TvShowTab" aria-controls="profile" role="tab" data-toggle="tab"><i class="fa fa-television"></i> @UI.Search_TvShows</a>
|
|
|
|
|
|
|
|
</li>
|
|
|
|
}
|
|
|
|
@if (Model.SearchForMusic)
|
|
|
|
{
|
|
|
|
<li role="presentation">
|
|
|
|
<a href="#MusicTab" aria-controls="profile" role="tab" data-toggle="tab"><i class="fa fa-music"></i>@UI.Search_Albums</a>
|
|
|
|
</li>
|
|
|
|
}
|
|
|
|
|
|
|
|
<li role="presentation" class="nav-tab-right nav-tab-icononly">
|
|
|
|
<a href="#NotificationsTab" aria-controls="profile" role="tab" data-toggle="tab"><i class="fa fa-bell"></i></a>
|
|
|
|
|
|
|
|
</li>
|
|
|
|
|
|
|
|
</ul>
|
|
|
|
|
|
|
|
<!-- Tab panes -->
|
|
|
|
<div class="tab-content">
|
|
|
|
@if (Model.SearchForMovies)
|
|
|
|
{
|
|
|
|
<!-- Movie tab -->
|
|
|
|
<div role="tabpanel" class="tab-pane active" id="MoviesTab">
|
|
|
|
<div class="input-group">
|
|
|
|
<input id="movieSearchContent" type="text" class="form-control form-control-custom form-control-search form-control-withbuttons">
|
|
|
|
<div class="input-group-addon">
|
|
|
|
<div class="btn-group">
|
|
|
|
<a href="#" class="btn btn-sm btn-primary-outline dropdown-toggle" data-toggle="dropdown" aria-expanded="false">
|
|
|
|
@UI.Search_Suggestions
|
|
|
|
<i class="fa fa-chevron-down"></i>
|
|
|
|
</a>
|
|
|
|
<ul class="dropdown-menu">
|
|
|
|
<li><a id="moviesComingSoon" href="#">@UI.Search_ComingSoon</a></li>
|
|
|
|
<li><a id="moviesInTheaters" href="#">@UI.Search_InTheaters</a></li>
|
|
|
|
</ul>
|
|
|
|
</div>
|
|
|
|
<i id="movieSearchButton" class="fa fa-search"></i>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<br />
|
|
|
|
<br />
|
|
|
|
<!-- Movie content -->
|
|
|
|
<div id="movieList">
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
@if (Model.SearchForTvShows)
|
|
|
|
{
|
|
|
|
<!-- TV tab -->
|
|
|
|
<div role="tabpanel" class="tab-pane" id="TvShowTab">
|
|
|
|
<div class="input-group">
|
|
|
|
<input id="tvSearchContent" type="text" class="form-control form-control-custom form-control-search">
|
|
|
|
<div class="input-group-addon">
|
|
|
|
<i id="tvSearchButton" class="fa fa-search"></i>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<br />
|
|
|
|
<br />
|
|
|
|
<!-- TV content -->
|
|
|
|
<div id="tvList">
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
}
|
|
|
|
|
|
|
|
@if (Model.SearchForMusic)
|
|
|
|
{
|
|
|
|
<!-- Music tab -->
|
|
|
|
<div role="tabpanel" class="tab-pane" id="MusicTab">
|
|
|
|
<div class="input-group">
|
|
|
|
<input id="musicSearchContent" type="text" class="form-control form-control-custom form-control-search">
|
|
|
|
<div class="input-group-addon">
|
|
|
|
<i id="musicSearchButton" class="fa fa-search"></i>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<br />
|
|
|
|
<br />
|
|
|
|
<!-- Music content -->
|
|
|
|
<div id="musicList">
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
}
|
|
|
|
|
|
|
|
<!-- Notification tab -->
|
|
|
|
<div role="tabpanel" class="tab-pane" id="NotificationsTab">
|
|
|
|
<div class="input-group">
|
|
|
|
<div class="input-group-addon input-group-sm"></div>
|
|
|
|
</div>
|
|
|
|
<br />
|
|
|
|
|
|
|
|
<!-- Notifications content -->
|
|
|
|
<form class="form-horizontal" method="POST" id="notificationsForm">
|
|
|
|
<fieldset>
|
|
|
|
<div class="form-group">
|
|
|
|
<div class="checkbox">
|
|
|
|
<input type="checkbox" id="notifyUser" name="Notify">
|
|
|
|
<label for="notifyUser">@UI.Search_SendNotificationText</label>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<div class="form-group">
|
|
|
|
<div>
|
|
|
|
<button id="saveNotificationSettings" class="btn btn-primary-outline">@UI.Common_Save</button>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</fieldset>
|
|
|
|
</form>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<!-- Movie and TV Results template -->
|
|
|
|
<script id="search-template" type="text/x-handlebars-template">
|
|
|
|
<div class="row">
|
|
|
|
<div class="col-sm-2">
|
|
|
|
|
|
|
|
{{#if_eq type "movie"}}
|
|
|
|
{{#if posterPath}}
|
|
|
|
<img class="img-responsive" src="https://image.tmdb.org/t/p/w150/{{posterPath}}" alt="poster">
|
|
|
|
{{/if}}
|
|
|
|
{{/if_eq}}
|
|
|
|
{{#if_eq type "tv"}}
|
|
|
|
{{#if posterPath}}
|
|
|
|
<img class="img-responsive" width="150" src="{{posterPath}}" alt="poster">
|
|
|
|
{{/if}}
|
|
|
|
{{/if_eq}}
|
|
|
|
|
|
|
|
</div>
|
|
|
|
<div class="col-sm-5 ">
|
|
|
|
<div>
|
|
|
|
{{#if_eq type "movie"}}
|
|
|
|
<a href="https://www.themoviedb.org/movie/{{id}}/" target="_blank">
|
|
|
|
<h4>{{title}} ({{year}})</h4>
|
|
|
|
</a>
|
|
|
|
{{else}}
|
|
|
|
<a href="http://www.imdb.com/title/{{imdb}}/" target="_blank">
|
|
|
|
<h4>{{title}} ({{year}})</h4>
|
|
|
|
</a>
|
|
|
|
{{/if_eq}}
|
|
|
|
</div>
|
|
|
|
<p>{{overview}}</p>
|
|
|
|
</div>
|
|
|
|
<div class="col-sm-2 col-sm-push-3">
|
|
|
|
<form method="POST" action="@url/search/request/{{type}}" id="form{{id}}">
|
|
|
|
<input name="{{type}}Id" type="text" value="{{id}}" hidden="hidden" />
|
|
|
|
{{#if_eq available true}}
|
|
|
|
<button style="text-align: right" class="btn btn-success-outline disabled" disabled><i class="fa fa-check"></i> @UI.Search_Available</button>
|
|
|
|
{{else}}
|
|
|
|
{{#if_eq requested true}}
|
|
|
|
<button style="text-align: right" class="btn btn-primary-outline disabled" disabled><i class="fa fa-check"></i> @UI.Search_Requested</button>
|
|
|
|
{{else}}
|
|
|
|
{{#if_eq type "movie"}}
|
|
|
|
<button id="{{id}}" style="text-align: right" class="btn btn-primary-outline requestMovie" type="submit"><i class="fa fa-plus"></i> @UI.Search_Request</button>
|
|
|
|
{{/if_eq}}
|
|
|
|
{{#if_eq type "tv"}}
|
|
|
|
<div class="dropdown">
|
|
|
|
<button id="{{id}}" class="btn btn-primary-outline dropdown-toggle" type="button" data-toggle="dropdown" aria-haspopup="true" aria-expanded="true">
|
|
|
|
<i class="fa fa-plus"></i> @UI.Search_Request
|
|
|
|
<span class="caret"></span>
|
|
|
|
</button>
|
|
|
|
<ul class="dropdown-menu" aria-labelledby="dropdownMenu1">
|
|
|
|
<li><a id="{{id}}" season-select="0" class="dropdownTv " href="#">@UI.Search_AllSeasons</a></li>
|
|
|
|
<li><a id="{{id}}" season-select="1" class="dropdownTv" href="#">@UI.Search_FirstSeason</a></li>
|
|
|
|
<li><a id="{{id}}" season-select="2" class="dropdownTv" href="#">@UI.Search_LatestSeason</a></li>
|
|
|
|
<li><a id="SeasonSelect" data-identifier="{{id}}" data-toggle="modal" data-target="#seasonsModal" href="#">@UI.Search_SelectSeason...</a></li>
|
|
|
|
</ul>
|
|
|
|
</div>
|
|
|
|
{{/if_eq}}
|
|
|
|
{{/if_eq}}
|
|
|
|
{{/if_eq}}
|
|
|
|
|
|
|
|
<br />
|
|
|
|
</form>
|
|
|
|
{{#if_eq available true}}
|
|
|
|
<form method="POST" action="@url/issues/nonrequestissue/" id="report{{id}}">
|
|
|
|
<input name="providerId" type="text" value="{{id}}" hidden="hidden" />
|
|
|
|
<input name="type" type="text" value="{{type}}" hidden="hidden" />
|
|
|
|
<div class="dropdown">
|
|
|
|
<button id="{{id}}" class="btn btn-sm btn-danger-outline dropdown-toggle" type="button" data-toggle="dropdown" aria-haspopup="true" aria-expanded="true">
|
|
|
|
<i class="fa fa-exclamation"></i> @UI.Search_ReportIssue
|
|
|
|
<span class="caret"></span>
|
|
|
|
</button>
|
|
|
|
<ul class="dropdown-menu" aria-labelledby="dropdownMenu1">
|
|
|
|
<li><a id="{{id}}" issue-select="0" class="dropdownIssue" href="#">@UI.Issues_WrongAudio</a></li>
|
|
|
|
<li><a id="{{id}}" issue-select="1" class="dropdownIssue" href="#">@UI.Issues_NoSubs</a></li>
|
|
|
|
<li><a id="{{id}}" issue-select="2" class="dropdownIssue" href="#">@UI.Issues_WrongContent</a></li>
|
|
|
|
<li><a id="{{id}}" issue-select="3" class="dropdownIssue" href="#">@UI.Issues_Playback</a></li>
|
|
|
|
<li><a id="{{id}}" issue-select="4" class="dropdownIssue" data-identifier="{{id}}" data-type="{{type}}" href="#" data-toggle="modal" data-target="#issuesModal">@UI.Issues_Other</a></li>
|
|
|
|
</ul>
|
|
|
|
</div>
|
|
|
|
</form>
|
|
|
|
{{/if_eq}}
|
|
|
|
</div>
|
|
|
|
|
|
|
|
</div>
|
|
|
|
<hr />
|
|
|
|
</script>
|
|
|
|
|
|
|
|
|
|
|
|
<!-- Music Results template -->
|
|
|
|
<script id="music-template" type="text/x-handlebars-template">
|
|
|
|
<div class="row">
|
|
|
|
<div id="{{id}}imageDiv" class="col-sm-2">
|
|
|
|
{{#if coverArtUrl}}
|
|
|
|
<img id="{{id}}cover" class="img-responsive" src="{{coverArtUrl}}" width="150" alt="poster">
|
|
|
|
{{/if}}
|
|
|
|
</div>
|
|
|
|
<div class="col-sm-5 ">
|
|
|
|
<div>
|
|
|
|
<a href="https://musicbrainz.org/release/{{id}}" target="_blank">
|
|
|
|
<h4>
|
|
|
|
{{artist}} - {{title}}
|
|
|
|
{{#if year}}
|
|
|
|
({{year}})
|
|
|
|
{{/if}}
|
|
|
|
</h4>
|
|
|
|
</a>
|
|
|
|
|
|
|
|
</div>
|
|
|
|
<p>{{overview}}</p>
|
|
|
|
</div>
|
|
|
|
<div class="col-sm-2 col-sm-push-3">
|
|
|
|
<form method="POST" action="@url/search/request/{{type}}" id="form{{id}}">
|
|
|
|
<input name="{{type}}Id" type="text" value="{{id}}" hidden="hidden" />
|
|
|
|
{{#if_eq available true}}
|
|
|
|
<button style="text-align: right" class="btn btn-success-outline disabled" disabled><i class="fa fa-check"></i> @UI.Search_Available</button>
|
|
|
|
{{else}}
|
|
|
|
{{#if_eq requested true}}
|
|
|
|
<button style="text-align: right" class="btn btn-success-outline disabled" disabled><i class="fa fa-check"></i> @UI.Search_Requested</button>
|
|
|
|
{{else}}
|
|
|
|
<button id="{{id}}" style="text-align: right" class="btn btn-primary-outline requestAlbum" type="submit"><i class="fa fa-plus"></i> @UI.Search_Request</button>
|
|
|
|
{{/if_eq}}
|
|
|
|
{{/if_eq}}
|
|
|
|
<br />
|
|
|
|
<small class="row">@UI.Search_TrackCount: {{trackCount}}</small>
|
|
|
|
<small class="row">@UI.Search_Country: {{country}}</small>
|
|
|
|
</form>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
</div>
|
|
|
|
<hr />
|
|
|
|
|
|
|
|
</script>
|
|
|
|
|
|
|
|
<div class="modal fade" id="seasonsModal">
|
|
|
|
<div class="modal-dialog">
|
|
|
|
<div class="modal-content">
|
|
|
|
<div class="modal-header">
|
|
|
|
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
|
|
|
|
<h4 class="modal-title">@UI.Search_Modal_SeasonsTitle</h4>
|
|
|
|
</div>
|
|
|
|
<div class="modal-body" id="seasonsBody">
|
|
|
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<div hidden="hidden" id="selectedSeasonsId"></div>
|
|
|
|
<div class="modal-footer">
|
|
|
|
<button type="button" class="btn btn-default" data-dismiss="modal">@UI.Common_Close</button>
|
|
|
|
<button type="button" id="seasonsRequest" class="btn btn-primary">@UI.Search_Request</button>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
|
|
<div class="modal fade" id="issuesModal">
|
|
|
|
<div class="modal-dialog">
|
|
|
|
<div class="modal-content">
|
|
|
|
<div class="modal-header">
|
|
|
|
<button type="button" class="close" data-dismiss="modal" aria-hidden="true"><i class="fa fa-times"></i></button>
|
|
|
|
<h4 class="modal-title">@UI.Issues_Modal_Title</h4>
|
|
|
|
</div>
|
|
|
|
<form method="POST" action="@url/issues/nonrequestissuecomment" id="commentForm">
|
|
|
|
<div class="modal-body">
|
|
|
|
<input id="providerIdModal" name="providerId" class="providerId" type="text" hidden="hidden" value="" />
|
|
|
|
<input name="issue" class="issue" type="text" hidden="hidden" value="" />
|
|
|
|
<input id="typeModal" name="type" class="type" type="text" hidden="hidden" value="" />
|
|
|
|
<textarea class="form-control form-control-custom" rows="3" id="commentArea" name="commentArea"></textarea>
|
|
|
|
</div>
|
|
|
|
<div class="modal-footer">
|
|
|
|
<button type="button" class="btn btn-danger-outline" data-dismiss="modal">@UI.Common_Close</button>
|
|
|
|
<button type="button" class="btn btn-primary-outline theSaveButton" data-dismiss="modal">@UI.Issues_Modal_Save</button>
|
|
|
|
</div>
|
|
|
|
</form>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<script id="seasons-template" type="text/x-handlebars-template">
|
|
|
|
<div class="form-group">
|
|
|
|
<div class="checkbox">
|
|
|
|
<input type="checkbox" class="selectedSeasons" id="{{id}}" name="{{id}}"><label for="{{id}}">@UI.Search_Season {{id}}</label>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
</script>
|
|
|
|
|
|
|
|
@Html.LoadSearchAssets()
|