Merge pull request #193 from origamirobot/dev

Added Released propety to RequestViewModel. Added Released filter to …
pull/226/head
Jamie 9 years ago
commit d5128e4508

@ -540,6 +540,7 @@ function buildRequestContext(result, type) {
requestedUsers: result.requestedUsers ? result.requestedUsers.join(', ') : '',
requestedDate: Humanize(result.requestedDate),
requestedDateTicks: result.requestedDateTicks,
released: result.released,
available: result.available,
admin: result.admin,
issues: result.issues,

@ -38,7 +38,8 @@ namespace PlexRequests.UI.Models
public string Title { get; set; }
public string PosterPath { get; set; }
public DateTime ReleaseDate { get; set; }
public long ReleaseDateTicks { get; set; }
public bool Released { get; set; }
public long ReleaseDateTicks { get; set; }
public RequestType Type { get; set; }
public string Status { get; set; }
public bool Approved { get; set; }

@ -163,6 +163,7 @@ namespace PlexRequests.UI.Modules
ReleaseDate = movie.ReleaseDate,
ReleaseDateTicks = movie.ReleaseDate.Ticks,
RequestedDate = movie.RequestedDate,
Released = DateTime.Now > movie.ReleaseDate,
RequestedDateTicks = DateTimeHelper.OffsetUTCDateTime(movie.RequestedDate, DateTimeOffset).Ticks,
Approved = movie.Available || movie.Approved,
Title = movie.Title,
@ -246,6 +247,7 @@ namespace PlexRequests.UI.Modules
ReleaseDateTicks = tv.ReleaseDate.Ticks,
RequestedDate = tv.RequestedDate,
RequestedDateTicks = DateTimeHelper.OffsetUTCDateTime(tv.RequestedDate, DateTimeOffset).Ticks,
Released = DateTime.Now > tv.ReleaseDate,
Approved = tv.Available || tv.Approved,
Title = tv.Title,
Overview = tv.Overview,
@ -288,6 +290,7 @@ namespace PlexRequests.UI.Modules
ReleaseDateTicks = album.ReleaseDate.Ticks,
RequestedDate = album.RequestedDate,
RequestedDateTicks = DateTimeHelper.OffsetUTCDateTime(album.RequestedDate, DateTimeOffset).Ticks,
Released = DateTime.Now > album.ReleaseDate,
Approved = album.Available || album.Approved,
Title = album.Title,
Overview = album.Overview,

@ -62,7 +62,9 @@
<li><a href="#" class="filter" data-filter=".approved-true"><i class="fa fa-square-o"></i> Approved</a></li>
<li><a href="#" class="filter" data-filter=".approved-false"><i class="fa fa-square-o"></i> Not Approved</a></li>
<li><a href="#" class="filter" data-filter=".available-true"><i class="fa fa-square-o"></i> Available</a></li>
<li><a href="#" class="filter" data-filter=".available-false"><i class="fa fa-square-o"></i> Not Available</a></li>
<li><a href="#" class="filter" data-filter=".available-false"><i class="fa fa-square-o"></i> Not Available</a></li>
<li><a href="#" class="filter" data-filter=".released-true"><i class="fa fa-square-o"></i> Released</a></li>
<li><a href="#" class="filter" data-filter=".released-false"><i class="fa fa-square-o"></i> Not Released</a></li>
</ul>
</div>
<div class="btn-group">
@ -125,7 +127,7 @@
<script id="search-template" type="text/x-handlebars-template">
<div id="{{requestId}}Template" class="mix available-{{available}} approved-{{approved}}" data-requestorder="{{requestedDateTicks}}" data-releaseorder="{{releaseDateTicks}}">
<div id="{{requestId}}Template" class="mix available-{{available}} approved-{{approved}} released-{{released}}" data-requestorder="{{requestedDateTicks}}" data-releaseorder="{{releaseDateTicks}}">
<div class="row">
<div class="col-sm-2">
{{#if_eq type "movie"}}

Loading…
Cancel
Save