You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
Ombi/PlexRequests.UI/Views/Requests/Index.cshtml

109 lines
3.8 KiB

<div>
<h1>Requests</h1>
<h4>Below you can see yours and all other requests, as well as their download and approval status.</h4>
<!-- Nav tabs -->
<ul id="nav-tabs" class="nav nav-tabs" role="tablist">
@if (Model.SearchForMovies)
{
<li role="presentation" class="active"><a href="#MoviesTab" aria-controls="home" role="tab" data-toggle="tab">Movies</a></li>
}
@if (Model.SearchForTvShows)
{
<li role="presentation"><a href="#TvShowTab" aria-controls="profile" role="tab" data-toggle="tab">TV Shows</a></li>
}
</ul>
<!-- Tab panes -->
<div class="tab-content">
@if (Model.SearchForMovies)
{
<!-- Movie tab -->
<div role="tabpanel" class="tab-pane active" id="MoviesTab">
<br />
<br />
<!-- Movie content -->
<div id="movieList">
</div>
</div>
}
@if (Model.SearchForTvShows)
{
<!-- TV tab -->
<div role="tabpanel" class="tab-pane" id="TvShowTab">
<br />
<br />
<!-- TV content -->
<div id="tvList">
</div>
</div>
}
</div>
</div>
<script id="search-template" type="text/x-handlebars-template">
<div id="{{id}}Template">
<div class="row">
<div class="col-sm-2">
{{#if_eq type "movie"}}
{{#if posterPath}}
<img src="http://image.tmdb.org/t/p/w150/{{posterPath}}" alt="poster">
{{/if}}
{{/if_eq}}
{{#if_eq type "tv"}}
{{#if posterPath}}
<img width="150" src="http://thetvdb.com/banners/_cache/posters/{{posterPath}}-1.jpg" alt="poster">
{{/if}}
{{/if_eq}}
</div>
<div class="col-sm-5 ">
<div>
<a href="https://www.themoviedb.org/{{type}}/{{id}}">
<h4>{{title}} ({{year}})</h4>
</a>
<span class="label label-success">{{status}}</span>
</div>
<br />
<p>Release Date: {{releaseDate}}</p>
<p>
Approved:
{{#if_eq approved false}}
<i class="fa fa-times"></i>
{{/if_eq}}
{{#if_eq approved true}}
<i class="fa fa-check"></i>
{{/if_eq}}
</p>
<p>
Available
{{#if_eq available false}}
<i class="fa fa-times"></i>
{{/if_eq}}
{{#if_eq available true}}
<i class="fa fa-check"></i>
{{/if_eq}}
</p>
<p>Requested By: {{requestedBy}}</p>
<p>Requested Date: {{requestedDate}}</p>
</div>
<div class="col-sm-2 col-sm-push-3">
<br />
<br />
<form method="POST" action="/requests/delete" id="form{{id}}">
<input name="Id" type="text" value="{{id}}" hidden="hidden" />
<input name="Type" type="text" value="{{type}}" hidden="hidden" />
<button id="{{id}}" style="text-align: right" class="btn btn-danger delete" type="submit"><i class="fa fa-plus"></i> Remove</button>
</form>
</div>
</div>
<hr />
</div>
</script>
<script src="/Content/requests.js" type="text/javascript"></script>