|
1 | 1 | <div *ngIf='!fetchingMovie' class="col-sm-9 col-sm-offset-3 col-md-10 col-md-offset-2"> |
2 | | - <h1 class="movie-title">{{omdbMovie.title}}</h1> |
3 | | - <div class="col-xs-6 col-sm-6 col-md-4 col-lg-4 xxs"> |
4 | | - <img *ngIf="movie.image" class="movie-image" src={{movie.image}}> |
5 | | - <div *ngIf="userService.getActiveUser()"> |
6 | | - <div *ngIf="possibleLibs.length > 0"> |
7 | | - <select [(ngModel)]="libraryId"> |
8 | | - <option *ngFor="#library of possibleLibs" value={{library._id}}>{{library.name}}</option> |
9 | | - </select> |
10 | | - <button class="btn btn-small" (click)="addMovie()">+</button> |
11 | | - </div> |
12 | | - <label for="my-rating">My Rating:</label> |
13 | | - <div class="my-rating" (mouseleave)="clearPreview()" (mouseenter)="storeRating()"> |
14 | | - <span class="glyphicon clickable {{ myRating < 1 ? 'glyphicon-star-empty': 'glyphicon-star' }}" |
15 | | - (mouseenter)="ratePreview(1)" (click)="rate(1)"></span> |
16 | | - <span class="glyphicon clickable {{ myRating < 2 ? 'glyphicon-star-empty': 'glyphicon-star' }}" |
17 | | - (mouseenter)="ratePreview(2)" (click)="rate(2)"></span> |
18 | | - <span class="glyphicon clickable {{ myRating < 3 ? 'glyphicon-star-empty': 'glyphicon-star' }}" |
19 | | - (mouseenter)="ratePreview(3)" (click)="rate(3)"></span> |
20 | | - <span class="glyphicon clickable {{ myRating < 4 ? 'glyphicon-star-empty': 'glyphicon-star' }}" |
21 | | - (mouseenter)="ratePreview(4)" (click)="rate(4)"></span> |
22 | | - <span class="glyphicon clickable {{ myRating < 5 ? 'glyphicon-star-empty': 'glyphicon-star' }}" |
23 | | - (mouseenter)="ratePreview(5)" (click)="rate(5)"></span> |
24 | | - <button class="btn btn-default" (click)="unrate()">Clear</button> |
| 2 | + <div class="row"> |
| 3 | + <h1 class="movie-title">{{omdbMovie.title}}</h1> |
| 4 | + <div class="col-xs-6 col-sm-6 col-md-4 col-lg-4 xxs"> |
| 5 | + <img *ngIf="movie.image" class="movie-image" src={{movie.image}}> |
| 6 | + <div *ngIf="userService.getActiveUser()"> |
| 7 | + <div *ngIf="possibleLibs.length > 0"> |
| 8 | + <select [(ngModel)]="libraryId"> |
| 9 | + <option *ngFor="#library of possibleLibs" value={{library._id}}>{{library.name}}</option> |
| 10 | + </select> |
| 11 | + <button class="btn btn-small" (click)="addMovie()">+</button> |
| 12 | + </div> |
| 13 | + <label for="my-rating">My Rating:</label> |
| 14 | + <div class="my-rating" (mouseleave)="clearPreview()" (mouseenter)="storeRating()"> |
| 15 | + <span class="glyphicon clickable {{ myRating < 1 ? 'glyphicon-star-empty': 'glyphicon-star' }}" |
| 16 | + (mouseenter)="ratePreview(1)" (click)="rate(1)"></span> |
| 17 | + <span class="glyphicon clickable {{ myRating < 2 ? 'glyphicon-star-empty': 'glyphicon-star' }}" |
| 18 | + (mouseenter)="ratePreview(2)" (click)="rate(2)"></span> |
| 19 | + <span class="glyphicon clickable {{ myRating < 3 ? 'glyphicon-star-empty': 'glyphicon-star' }}" |
| 20 | + (mouseenter)="ratePreview(3)" (click)="rate(3)"></span> |
| 21 | + <span class="glyphicon clickable {{ myRating < 4 ? 'glyphicon-star-empty': 'glyphicon-star' }}" |
| 22 | + (mouseenter)="ratePreview(4)" (click)="rate(4)"></span> |
| 23 | + <span class="glyphicon clickable {{ myRating < 5 ? 'glyphicon-star-empty': 'glyphicon-star' }}" |
| 24 | + (mouseenter)="ratePreview(5)" (click)="rate(5)"></span> |
| 25 | + <button class="btn btn-default" (click)="unrate()">Clear</button> |
| 26 | + </div> |
25 | 27 | </div> |
26 | 28 | </div> |
27 | | - </div> |
28 | | - <div class="col-xs-6 col-sm-6 col-md-8 col-lg-8 xxs"> |
29 | | - <div class="actors-container"> |
30 | | - <label for="actors">Actors:</label> |
31 | | - <ul class="actors"> |
32 | | - <li *ngFor="#actor of omdbMovie.actors">{{actor}}</li> |
33 | | - </ul> |
34 | | - </div> |
35 | | - <div> |
36 | | - <label for="director">Directed By:</label> |
37 | | - <span class="director">{{omdbMovie.directors}}</span> |
38 | | - </div> |
39 | | - <div> |
40 | | - <label for="summary">Plot Summary:</label> |
41 | | - <p class="summary">{{omdbMovie.plot}}</p> |
42 | | - </div> |
43 | | - <div> |
44 | | - <label for="rating">Rated:</label> |
45 | | - <span class="rating">{{omdbMovie.rating}}</span> |
46 | | - </div> |
47 | | - <div> |
48 | | - <label for="released">Released on:</label> |
49 | | - <span class="released">{{omdbMovie.releaseDate}}</span> |
50 | | - </div> |
51 | | - <div class="ratings-container"> |
52 | | - <label for="ratings">Average Rating:</label> |
53 | | - <div class="ratings"> |
54 | | - <span class="glyphicon {{ avgRating < 1 ? 'glyphicon-star-empty': 'glyphicon-star' }}"></span> |
55 | | - <span class="glyphicon {{ avgRating < 2 ? 'glyphicon-star-empty': 'glyphicon-star' }}"></span> |
56 | | - <span class="glyphicon {{ avgRating < 3 ? 'glyphicon-star-empty': 'glyphicon-star' }}"></span> |
57 | | - <span class="glyphicon {{ avgRating < 4 ? 'glyphicon-star-empty': 'glyphicon-star' }}"></span> |
58 | | - <span class="glyphicon {{ avgRating < 5 ? 'glyphicon-star-empty': 'glyphicon-star' }}"></span> |
59 | | - <span *ngIf="omdbMovie.tomatoMeter !== 'N/A'" class="rating-rt"> |
60 | | - <a href={{omdbMovie.tomatoUrl}}>{{omdbMovie.tomatoMeter}}% on rotton tomatoes</a> |
61 | | - </span> |
| 29 | + <div class="col-xs-6 col-sm-6 col-md-8 col-lg-8 xxs"> |
| 30 | + <div class="actors-container"> |
| 31 | + <label for="actors">Actors:</label> |
| 32 | + <ul class="actors"> |
| 33 | + <li *ngFor="#actor of omdbMovie.actors">{{actor}}</li> |
| 34 | + </ul> |
| 35 | + </div> |
| 36 | + <div> |
| 37 | + <label for="director">Directed By:</label> |
| 38 | + <span class="director">{{omdbMovie.directors}}</span> |
| 39 | + </div> |
| 40 | + <div> |
| 41 | + <label for="summary">Plot Summary:</label> |
| 42 | + <p class="summary">{{omdbMovie.plot}}</p> |
| 43 | + </div> |
| 44 | + <div> |
| 45 | + <label for="rating">Rated:</label> |
| 46 | + <span class="rating">{{omdbMovie.rating}}</span> |
| 47 | + </div> |
| 48 | + <div> |
| 49 | + <label for="released">Released on:</label> |
| 50 | + <span class="released">{{omdbMovie.releaseDate}}</span> |
| 51 | + </div> |
| 52 | + <div class="ratings-container"> |
| 53 | + <label for="ratings">Average Rating:</label> |
| 54 | + <div class="ratings"> |
| 55 | + <span class="glyphicon {{ avgRating < 1 ? 'glyphicon-star-empty': 'glyphicon-star' }}"></span> |
| 56 | + <span class="glyphicon {{ avgRating < 2 ? 'glyphicon-star-empty': 'glyphicon-star' }}"></span> |
| 57 | + <span class="glyphicon {{ avgRating < 3 ? 'glyphicon-star-empty': 'glyphicon-star' }}"></span> |
| 58 | + <span class="glyphicon {{ avgRating < 4 ? 'glyphicon-star-empty': 'glyphicon-star' }}"></span> |
| 59 | + <span class="glyphicon {{ avgRating < 5 ? 'glyphicon-star-empty': 'glyphicon-star' }}"></span> |
| 60 | + <span *ngIf="omdbMovie.tomatoMeter !== 'N/A'" class="rating-rt"> |
| 61 | + <a href={{omdbMovie.tomatoUrl}}>{{omdbMovie.tomatoMeter}}% on rotton tomatoes</a> |
| 62 | + </span> |
| 63 | + </div> |
62 | 64 | </div> |
63 | 65 | </div> |
64 | 66 | </div> |
| 67 | + <div class="col-xs-12 col-sm-12 col-md-12 col-lg-12 comments"> |
| 68 | + <h3 class="h4-margins">Comments</h3> |
| 69 | + <div class="results-row"> |
| 70 | + <span class="no-results" *ngIf="movie.comments.length ===0">No comments</span> |
| 71 | + <table> |
| 72 | + <tr *ngFor="#comment of movie.comments"> |
| 73 | + <td><a [routerLink]='["/User", { user: comment.userId }]'>{{comment.username}}</a></td> |
| 74 | + <td> |
| 75 | + <div *ngIf="isEditingComment(comment._id)"> |
| 76 | + <input type="text" [(ngModel)]="editCommentText"> |
| 77 | + <span class="glyphicon glyphicon-check" (click)="saveEditComment()"></span> |
| 78 | + <button class="btn btn-default" (click)="cancelEditComment()">Cancel</button> |
| 79 | + </div> |
| 80 | + <div *ngIf="!isEditingComment(comment._id)" (click)="editComment(comment)"> |
| 81 | + {{comment.comment}} |
| 82 | + </div> |
| 83 | + </td> |
| 84 | + </tr> |
| 85 | + </table> |
| 86 | + <div *ngIf="userService.getActiveUser()"> |
| 87 | + <input type="text" class="comment-input" [(ngModel)]="newComment" (keyup.enter)="addComment()"> |
| 88 | + <button class="btn" (click)="addComment()">Comment!</button> |
| 89 | + </div> |
| 90 | + </div> |
| 91 | + </div> |
65 | 92 | <div class="col-xs-12 col-sm-12 col-md-12 col-lg-12" *ngIf="!fetchingLibraries"> |
66 | 93 | <h3 class="h4-margins">Libraries With This Title</h3> |
67 | | - <div class="sample-libraries row"> |
| 94 | + <div class="sample-libraries row results-row"> |
68 | 95 | <span class="no-results" *ngIf="movie.libraries.length ===0">No libraries with this title</span> |
69 | 96 | <div *ngFor="#library of movie.libraries" class="library-movie col-xs-6 col-sm-4 col-md-3 col-lg-2"> |
70 | 97 | <div class="movie-poster-container"> |
|
0 commit comments