Skip to content

Commit

Permalink
Fixed "Request Status" evaluation in the "left-panel-details" div cla…
Browse files Browse the repository at this point in the history
…ss. Now it shows the appropriate status instead of an empty spot. "Request Status" displays both regular and 4K statuses at the same time if needed. Added a comma to the end of the "RequestStatus" label to maintain design consistency with the other labels. Also added a "Denied Reason" element for 4K requests.
  • Loading branch information
Lucane committed Jul 27, 2022
1 parent 2c57b30 commit da1cfa2
Show file tree
Hide file tree
Showing 2 changed files with 64 additions and 49 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -30,23 +30,29 @@
<span id="status"> {{ this.movie.status | translateStatus }}</span>
</div>
<div>
<span class="label">{{'MediaDetails.Availability' | translate }}</span>
<span *ngIf="movie.available"> {{'Common.Available' | translate}}</span>
<span *ngIf="!movie.available"> {{'Common.NotAvailable' | translate}}</span>
</div>
<div *ngIf="!movie.available">
<span class="label">{{'MediaDetails.RequestStatus' | translate }}</span>
<div *ngIf="movie.denied">{{'Common.Denied' | translate}}</div>
<div *ngElseIf="movie.approved && !movie.available">{{'Common.ProcessingRequest' | translate}}</div>
<div *ngElseIf="movie.requested && !movie.approved && !movie.available">{{'Common.PendingApproval' | translate}}
</div>
<div *ngElseIf="!movie.requested && !movie.available && !movie.approved">{{'Common.NotRequested' | translate}}
</div>
<span class="label">{{'MediaDetails.Availability' | translate }}</span>
<span *ngIf="movie.available || movie.available4K"> {{'Common.Available' | translate}}</span>
<span *ngIf="!movie.available && !movie.available4K"> {{'Common.NotAvailable' | translate}}</span>
</div>
<div *ngIf="(!movie.available && movie.requested) || (!movie.available4K && movie.has4KRequest)">
<span class="label">{{'MediaDetails.RequestStatus' | translate }}</span>
<div *ngIf="!movie.available && movie.requested">
<div *ngIf="movie.denied">{{'Common.RequestDenied' | translate}}</div>
<div *ngIf="movie.approved && !movie.available">{{'Common.ProcessingRequest' | translate}}</div>
<div *ngIf="movie.requested && !movie.approved">{{'Common.PendingApproval' | translate}}</div>
<!--<div *ngIf="!movie.requested && !movie.available && !movie.approved">{{'Common.NotRequested' | translate}}</div>-->
</div>
<div *ngIf="!movie.available4K && movie.has4KRequest">
<div *ngIf="movie.denied4K">{{'Common.RequestDenied4K' | translate}}</div>
<div *ngIf="movie.approved4K && !movie.available4K">{{'Common.ProcessingRequest4K' | translate}}</div>
<div *ngIf="movie.requested4K && !movie.approved4K && !movie.available4K">{{'Common.PendingApproval4K' | translate}}</div>
<!--<div *ngIf="!movie.requested4K && !movie.available4K && !movie.approved4K">{{'Common.NotRequested4K' | translate}}</div>-->
</div>
</div>

<div *ngIf="request">
<span class="label">{{'MediaDetails.RequestedBy' | translate }}</span>
<span id="requestedByInfo"> {{request.requestedUser.userAlias}}</span>
<span class="label">{{'MediaDetails.RequestedBy' | translate }}</span>
<span id="requestedByInfo"> {{request.requestedUser.userAlias}}</span>
</div>

<div *ngIf="request">
Expand All @@ -60,9 +66,14 @@
{{RequestSource[request.source]}}
</div>

<div *ngIf="request && request.denied">
<span class="label">{{'MediaDetails.DeniedReason' | translate }}</span>
<div *ngIf="request">
<span class="label">{{'MediaDetails.DeniedReason' | translate }}</span>
<div *ngIf="request.denied">
<span id="deniedReasonInfo">{{request.deniedReason}}</span>
</div>
<div *ngIf="request.denied4K">
<span id="deniedReasonInfo4K">{{request.deniedReason4K}}</span>
</div>
</div>


Expand All @@ -73,7 +84,7 @@

<div *ngIf="movie.available4K">
<span class="label">{{'MediaDetails.Quality' | translate }}&nbsp;</span>
<span >{{"4K" | quality}}</span>
<span>{{"4K" | quality}}</span>
</div>

<div *ngIf="advancedOptions && request && request.rootPathOverrideTitle">
Expand Down
68 changes: 36 additions & 32 deletions src/Ombi/wwwroot/translations/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,37 +12,41 @@
}
},
"Common": {
"ContinueButton": "Continue",
"Available": "Available",
"Available4K": "Available 4K",
"Approved": "Approved",
"Approve4K": "Approve 4K",
"Pending": "Pending",
"PartiallyAvailable": "Partially Available",
"Monitored": "Monitored",
"NotAvailable": "Not Available",
"ProcessingRequest": "Processing Request",
"PendingApproval": "Pending Approval",
"RequestDenied": "Request Denied",
"NotRequested": "Not Requested",
"Requested": "Requested",
"Requested4K": "Requested 4K",
"Search":"Search",
"Request": "Request",
"Request4K": "Request 4K",
"Denied": "Denied",
"Approve": "Approve",
"PartlyAvailable": "Partly Available",
"ViewDetails": "View Details",
"Errors": {
"Validation": "Please check your entered values"
},
"Cancel": "Cancel",
"Submit": "Submit",
"Update": "Update",
"tvShow": "TV Show",
"movie": "Movie",
"album": "Album"
"ContinueButton": "Continue",
"Available": "Available",
"Available4K": "Available 4K",
"Approved": "Approved",
"Approve4K": "Approve 4K",
"Pending": "Pending",
"PartiallyAvailable": "Partially Available",
"Monitored": "Monitored",
"NotAvailable": "Not Available",
"ProcessingRequest": "Processing Request",
"ProcessingRequest4K": "Processing Request 4K",
"PendingApproval": "Pending Approval",
"PendingApproval4K": "Pending Approval 4K",
"RequestDenied": "Request Denied",
"RequestDenied4K": "Request Denied 4K",
"NotRequested": "Not Requested",
"NotRequested4K": "Not Requested 4K",
"Requested": "Requested",
"Requested4K": "Requested 4K",
"Search": "Search",
"Request": "Request",
"Request4K": "Request 4K",
"Denied": "Denied",
"Approve": "Approve",
"PartlyAvailable": "Partly Available",
"ViewDetails": "View Details",
"Errors": {
"Validation": "Please check your entered values"
},
"Cancel": "Cancel",
"Submit": "Submit",
"Update": "Update",
"tvShow": "TV Show",
"movie": "Movie",
"album": "Album"
},
"PasswordReset": {
"EmailAddressPlaceholder": "Email Address",
Expand Down Expand Up @@ -341,7 +345,7 @@
"Seasons": "Seasons:",
"Episodes": "Episodes:",
"Availability":"Availability:",
"RequestStatus":"Request Status",
"RequestStatus":"Request Status:",
"Quality":"Quality:",
"RootFolderOverride":"Root Folder Override:",
"QualityOverride":"Quality Override:",
Expand Down

0 comments on commit da1cfa2

Please sign in to comment.