Moved the buttons around on the movie details

pull/3895/head
TidusJar 6 years ago
parent dc570d2e2c
commit f1877efe02

@ -1,4 +1,4 @@
namespace Ombi.Api.TheMovieDb.Models namespace Ombi.Api.TheMovieDb.Models {
public class DiscoverMovies public class DiscoverMovies
{ {

@ -36,7 +36,7 @@
</div> </div>
<!--Next to poster--> <!--Next to poster-->
<div class="col-lg-12 col-xl-6 media-row"> <div class="col-10 col-lg-5 col-xl-5 media-row">
<a *ngIf="movie.homepage" class="media-icons" h href="{{movie.homepage}}" target="_blank"> <a *ngIf="movie.homepage" class="media-icons" h href="{{movie.homepage}}" target="_blank">
<i matTooltip="Homepage" class="fa fa-home fa-2x grow"></i> <i matTooltip="Homepage" class="fa fa-home fa-2x grow"></i>
@ -68,6 +68,37 @@
</div> </div>
<div class="col-12 col-lg-3 col-xl-3 media-row">
<button mat-raised-button class="btn-green btn-spacing" *ngIf="movie.available"> {{
'Common.Available' | translate }}</button>
<span *ngIf="!movie.available">
<span *ngIf="movie.requested || movie.approved; then requestedBtn else notRequestedBtn"></span>
<ng-template #requestedBtn>
<button mat-raised-button class="btn-spacing btn-orange" [disabled]><i
class="fa fa-check"></i>
{{ 'Common.Requested' | translate }}</button>
</ng-template>
<ng-template #notRequestedBtn>
<button mat-raised-button class="btn-spacing" (click)="request()">
<i *ngIf="movie.requestProcessing" class="fa fa-circle-o-notch fa-spin fa-fw"></i> <i
*ngIf="!movie.requestProcessing && !movie.processed" class="fa fa-plus"></i>
<i *ngIf="movie.processed && !movie.requestProcessing" class="fa fa-check"></i> {{
'Common.Request' | translate }}</button>
</ng-template>
</span>
<span><button mat-raised-button class="btn-spacing" color="warn">Deny</button></span>
<span *ngIf="movie.available">
<a *ngIf="movie.plexUrl" mat-raised-button style="text-align: right"
class="btn-spacing btn-greem" href="{{movie.plexUrl}}" target="_blank"><i
class="fa fa-eye"></i> {{'Search.ViewOnPlex' |
translate}}</a>
<a *ngIf="movie.embyUrl" mat-raised-button class="btn-green btn-spacing"
href="{{movie.embyUrl}}" target="_blank"><i class="fa fa-eye"></i> {{'Search.ViewOnEmby' |
translate}}</a>
</span>
</div>
</div> </div>
<div class="row"> <div class="row">
@ -126,36 +157,7 @@
</mat-card-content> </mat-card-content>
</mat-card> </mat-card>
</div> </div>
<!-- <div class="col-12 col-md-2 card-full">
<div><button mat-raised-button class="btn-green btn-spacing" *ngIf="movie.available"> {{
'Common.Available' | translate }}</button></div>
<div *ngIf="!movie.available">
<div *ngIf="movie.requested || movie.approved; then requestedBtn else notRequestedBtn"></div>
<ng-template #requestedBtn>
<button mat-raised-button class="btn-spacing btn-orange" [disabled]><i
class="fa fa-check"></i>
{{ 'Common.Requested' | translate }}</button>
</ng-template>
<ng-template #notRequestedBtn>
<button mat-raised-button class="btn-spacing" (click)="request()">
<i *ngIf="movie.requestProcessing" class="fa fa-circle-o-notch fa-spin fa-fw"></i> <i
*ngIf="!movie.requestProcessing && !movie.processed" class="fa fa-plus"></i>
<i *ngIf="movie.processed && !movie.requestProcessing" class="fa fa-check"></i> {{
'Common.Request' | translate }}</button>
</ng-template>
</div>
<div><button mat-raised-button class="btn-spacing" color="warn">Deny</button></div>
<div *ngIf="movie.available">
<a *ngIf="movie.plexUrl" mat-raised-button style="text-align: right"
class="btn-spacing btn-greem" href="{{movie.plexUrl}}" target="_blank"><i
class="fa fa-eye"></i> {{'Search.ViewOnPlex' |
translate}}</a>
<a *ngIf="movie.embyUrl" mat-raised-button class="btn-green btn-spacing"
href="{{movie.embyUrl}}" target="_blank"><i class="fa fa-eye"></i> {{'Search.ViewOnEmby' |
translate}}</a>
</div>
</div> -->
</div> </div>

@ -151,7 +151,7 @@ section {
} }
.btn-spacing { .btn-spacing {
margin-top:10px; margin-right:10px;
} }
.tagline { .tagline {

@ -5,10 +5,15 @@
<script> <script>
const existingBaseUrl = window.localStorage.getItem("baseUrl"); const existingBaseUrl = window.localStorage.getItem("baseUrl");
if (existingBaseUrl) { if (existingBaseUrl === null || existingBaseUrl || existingBaseUrl.length === 0) {
document.write('<base href="/' + existingBaseUrl + '" />'); document.write('<base href="/' + existingBaseUrl + '" />');
if(existingBaseUrl.length === 0)
{
document.write(" <link rel=\"stylesheet\" href='/loading.css'/>")
} else {
document.write(" <link rel=\"stylesheet\" href='" + existingBaseUrl + "/loading.css'/>") document.write(" <link rel=\"stylesheet\" href='" + existingBaseUrl + "/loading.css'/>")
}
} else { } else {
// Work out the base URL // Work out the base URL
// Need to find the baseUrl.txt file // Need to find the baseUrl.txt file
@ -32,9 +37,18 @@ const existingBaseUrl = window.localStorage.getItem("baseUrl");
window.localStorage.setItem("baseUrl", data); window.localStorage.setItem("baseUrl", data);
function tryGetBaseUrl(xmlhttp, url) { function tryGetBaseUrl(xmlhttp, url) {
if (endsWith(url, "/")) {
xmlhttp.open("GET", url + "api/v1/Settings/baseurl", false); xmlhttp.open("GET", url + "api/v1/Settings/baseurl", false);
} else {
xmlhttp.open("GET", url + "/api/v1/Settings/baseurl", false);
}
xmlhttp.send(); xmlhttp.send();
} }
function endsWith(str, suffix) {
return str.indexOf(suffix, str.length - suffix.length) !== -1;
}
} }
</script> </script>
<link href="https://fonts.googleapis.com/icon?family=Material+Icons" rel="stylesheet"> <link href="https://fonts.googleapis.com/icon?family=Material+Icons" rel="stylesheet">

Loading…
Cancel
Save