mirror of
https://github.com/Ombi-app/Ombi.git
synced 2025-07-31 03:50:08 -07:00
Moved the buttons around on the movie details
This commit is contained in:
parent
dc570d2e2c
commit
f1877efe02
4 changed files with 55 additions and 39 deletions
|
@ -1,4 +1,4 @@
|
|||
namespace Ombi.Api.TheMovieDb.Models
|
||||
namespace Ombi.Api.TheMovieDb.Models {
|
||||
|
||||
public class DiscoverMovies
|
||||
{
|
||||
|
|
|
@ -36,7 +36,7 @@
|
|||
</div>
|
||||
|
||||
<!--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">
|
||||
<i matTooltip="Homepage" class="fa fa-home fa-2x grow"></i>
|
||||
|
@ -68,6 +68,37 @@
|
|||
|
||||
|
||||
</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 class="row">
|
||||
|
@ -108,9 +139,9 @@
|
|||
|
||||
<div>
|
||||
<span *ngIf="movie.genres"><strong>Genres:</strong>
|
||||
<span *ngFor="let genre of movie.genres">
|
||||
{{genre.name}} |
|
||||
</span>
|
||||
<span *ngFor="let genre of movie.genres">
|
||||
{{genre.name}} |
|
||||
</span>
|
||||
</span>
|
||||
</div>
|
||||
</mat-card-content>
|
||||
|
@ -126,36 +157,7 @@
|
|||
</mat-card-content>
|
||||
</mat-card>
|
||||
</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>
|
||||
|
||||
|
|
|
@ -151,7 +151,7 @@ section {
|
|||
}
|
||||
|
||||
.btn-spacing {
|
||||
margin-top:10px;
|
||||
margin-right:10px;
|
||||
}
|
||||
|
||||
.tagline {
|
||||
|
|
|
@ -5,10 +5,15 @@
|
|||
|
||||
<script>
|
||||
|
||||
const existingBaseUrl = window.localStorage.getItem("baseUrl");
|
||||
if (existingBaseUrl) {
|
||||
const existingBaseUrl = window.localStorage.getItem("baseUrl");
|
||||
if (existingBaseUrl === null || existingBaseUrl || existingBaseUrl.length === 0) {
|
||||
document.write('<base href="/' + existingBaseUrl + '" />');
|
||||
document.write(" <link rel=\"stylesheet\" href='" + existingBaseUrl + "/loading.css'/>")
|
||||
if(existingBaseUrl.length === 0)
|
||||
{
|
||||
document.write(" <link rel=\"stylesheet\" href='/loading.css'/>")
|
||||
} else {
|
||||
document.write(" <link rel=\"stylesheet\" href='" + existingBaseUrl + "/loading.css'/>")
|
||||
}
|
||||
} else {
|
||||
// Work out the base URL
|
||||
// Need to find the baseUrl.txt file
|
||||
|
@ -32,9 +37,18 @@ const existingBaseUrl = window.localStorage.getItem("baseUrl");
|
|||
window.localStorage.setItem("baseUrl", data);
|
||||
|
||||
function tryGetBaseUrl(xmlhttp, url) {
|
||||
xmlhttp.open("GET", url + "api/v1/Settings/baseurl", false);
|
||||
if (endsWith(url, "/")) {
|
||||
xmlhttp.open("GET", url + "api/v1/Settings/baseurl", false);
|
||||
} else {
|
||||
xmlhttp.open("GET", url + "/api/v1/Settings/baseurl", false);
|
||||
}
|
||||
|
||||
xmlhttp.send();
|
||||
}
|
||||
|
||||
function endsWith(str, suffix) {
|
||||
return str.indexOf(suffix, str.length - suffix.length) !== -1;
|
||||
}
|
||||
}
|
||||
</script>
|
||||
<link href="https://fonts.googleapis.com/icon?family=Material+Icons" rel="stylesheet">
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue