Files
meanTorrent/modules/torrents/client/views/uploads-torrents.client.view.html
2017-04-25 10:33:03 +08:00

249 lines
14 KiB
HTML
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
<section class="container" ng-controller="TorrentsUploadController as vm">
<div class="jumbotron">
<div class="row">
<div class="col-md-11 col-md-offset-1 col-sm-11 col-sm-offset-1 col-xs-12">
<h4 translate="UPLOAD_RULES"></h4>
<ol>
<li ng-repeat="r in vm.rule_items" translate="UPLOAD_RULES_CONTENT.{{r}}"
translate-values='{ url: vm.announce.url, admin: vm.announce.admin}' style="line-height: 1.6;"></li>
</ol>
</div>
</div>
</div>
<div class="row">
<div class="col-md-12 col-sm-12 col-xs-12">
<legend class="small-legend" translate="SELECT_TORRENT_FILE"></legend>
<div class="col-sm-7">
<div class="input-group">
<input type="text" class="form-control" ng-model="vm.tFile.name" disabled>
<div class="input-group-btn">
<button class="btn btn-primary btn-file" ngf-select="vm.fileSelected = true; vm.successfully = undefined; vm.progress = 0;"
ng-model="vm.tFile"
accept="application/x-bittorrent"
ngf-resize="{width: 400}"
ngf-resize-if="$width > 400 || $height > 400"
ng-disabled="vm.successfully">{{ 'SELECT_FILE' | translate}}
</button>
</div>
</div>
</div>
<div ng-show="vm.fileSelected" class="col-sm-5">
<button class="btn btn-success" ng-click="vm.upload(vm.tFile)">{{ 'DO_UPLOAD' | translate}} ({{vm.progress}}%)</button>
</div>
<div ng-show="vm.successfully == true" class="col-sm-5" style="margin-top: 7px">
<label class="text-success control-label" translate="TORRENTS_UPLOAD_SUCCESSFULLY"></label>
</div>
<div ng-show="vm.successfully == false" class="col-sm-5" style="margin-top: 7px">
<label class="text-danger control-label" translate="TORRENTS_UPLOAD_FAILED"></label>
</div>
</div>
</div>
<div ng-show="vm.successfully == true" class="row" style="margin-top: 40px;">
<div class="col-md-12 col-sm-12 col-xs-12">
<legend class="small-legend" translate="ENTER_TMDB_ID"></legend>
<div class="col-lg-3 col-md-4 col-sm-5 col-xs-6">
<div class="input-group">
<input type="text" class="form-control" ng-ac ng-model="vm.tmdb_id"
id="tmdbid"
ng-change="vm.tmdb_info_ok = undefined"
ng-disabled="vm.tmdb_info_ok"
ng-focus="vm.onTextClick($event)"
ng-keydown="vm.onTMDBIDKeyDown($event);"
placeholder="{{ 'TMDB_ID' | translate}}" autofocus>
<div class="input-group-btn">
<button class="btn btn-primary" ng-click="vm.getInfo(vm.tmdb_id)"
ng-disabled="vm.tmdb_info_ok">{{ 'LOAD_TMDB_INFO' | translate}}
</button>
</div>
</div>
</div>
<div ng-show="vm.tmdb_info_ok == true" class="col-lg-9 col-md-8 col-sm-7 col-xs-6" style="margin-top: 7px">
<label class="text-success control-label" translate="TMDB_ID_OK"></label>
</div>
<div ng-show="vm.tmdb_info_ok == false" class="col-lg-9 col-md-8 col-sm-7 col-xs-6" style="margin-top: 7px">
<label class="text-danger control-label" translate="TMDB_ID_ERROR"></label>
</div>
<div ng-show="vm.tmdb_isloading" class="col-lg-9 col-md-8 col-sm-7 col-xs-6" style="margin-top: 7px">
<label class="text-danger control-label" translate="TMDB_IS_LOADING"></label>
</div>
</div>
</div>
<div class="row" ng-show="vm.tmdb_info_ok == true" style="margin-top: 40px;">
<div class="col-md-12 col-sm-12 col-xs-12">
<legend class="small-legend" translate="TMDB_MOVIE_INFO"></legend>
<div class="col-md-4 col-sm-4 col-xs-12">
<img ng-src="{{vm.tmdbConfig.poster_img_base_url}}{{vm.movieinfo.poster_path}}" class="img-thumbnail">
</div>
<div class="col-md-8 col-sm-8 col-xs-12">
<dl class="dl-horizontal">
<dt class="h-line">{{ 'TMDB_FIELDS.ORIGINAL_TITLE' | translate}}</dt>
<dd class="h-line">{{vm.movieinfo.original_title}}</dd>
<dt class="h-line">{{ 'TMDB_FIELDS.TITLE' | translate}}</dt>
<dd class="h-line">{{vm.movieinfo.title}}</dd>
<dt class="h-line">{{ 'TMDB_FIELDS.ORIGINAL_LANGUAGE' | translate}}</dt>
<dd class="h-line">{{vm.movieinfo.original_language}}</dd>
<dt class="h-line">{{ 'TMDB_FIELDS.GENRES' | translate}}</dt>
<dd class="h-line list-all-genres">
<span class="genres-item" ng-repeat="item in vm.movieinfo.genres">{{item.name}}</span>
</dd>
<dt class="h-line">{{ 'TMDB_FIELDS.PRODUCTION_COUNTRIES' | translate}}</dt>
<dd class="h-line list-all-countries">
<span class="country-item" ng-repeat="item in vm.movieinfo.production_countries">{{item.iso_3166_1}}</span>
</dd>
<dt class="h-line">{{ 'TMDB_FIELDS.RELEASE_DATE' | translate}}</dt>
<dd class="h-line">{{vm.movieinfo.release_date}}</dd>
<dt class="h-line">{{ 'TMDB_FIELDS.RUNTIME' | translate}}</dt>
<dd class="h-line">{{vm.movieinfo.runtime | runtime}}</dd>
<dt class="h-line">{{ 'TMDB_FIELDS.BUDGET' | translate}}</dt>
<dd class="h-line">{{vm.movieinfo.budget | dollar:2}}</dd>
<dt class="h-line">{{ 'TMDB_FIELDS.REVENUE' | translate}}</dt>
<dd class="h-line">{{vm.movieinfo.revenue | dollar:2}}</dd>
<dt class="h-line">{{ 'TMDB_FIELDS.VOTE_AVERAGE' | translate}}</dt>
<dd class="h-line">{{vm.movieinfo.vote_average}} / {{vm.movieinfo.vote_count}} {{ 'TMDB_FIELDS.VOTE_UNIT' | translate}}</dd>
<dt class="h-line">{{ 'TMDB_FIELDS.IMDB_LINK' | translate}}</dt>
<dd class="h-line"><a href="{{vm.imdbConfig.imdb_link_url}}{{vm.movieinfo.imdb_id}}"
target="_blank">{{vm.imdbConfig.imdb_link_url}}{{vm.movieinfo.imdb_id}}</a></dd>
<dt class="h-line">{{ 'TMDB_FIELDS.TMDB_LINK' | translate}}</dt>
<dd class="h-line"><a href="{{vm.tmdbConfig.tmdb_link_url}}{{vm.movieinfo.id}}"
target="_blank">{{vm.tmdbConfig.tmdb_link_url}}{{vm.movieinfo.id}}</a></dd>
<dt class="h-line">{{ 'TMDB_FIELDS.OVERVIEW' | translate}}</dt>
<dd class="h-line">{{vm.movieinfo.overview}}</dd>
</dl>
<legend class="xsmall-legend strong-legend" translate="TMDB_FIELDS.CAST"></legend>
<div class="row cast-list">
<div class="col-xs-4 col-md-2 text-center">
<img ng-src="{{vm.tmdbConfig.cast_img_base_url}}{{vm.movieinfo.credits.cast[0].profile_path}}"
on-error-src="/./modules/core/client/img/default_face.jpg"
class="img-circle img-thumbnail img-responsive center-block">
<span class="cast-xs-info"><strong>{{vm.movieinfo.credits.cast[0].name}}</strong></span>
<p class="cast-xs-info">{{vm.movieinfo.credits.cast[0].character}}</p>
</div>
<div class="col-xs-4 col-md-2 text-center">
<img ng-src="{{vm.tmdbConfig.cast_img_base_url}}{{vm.movieinfo.credits.cast[1].profile_path}}"
on-error-src="/./modules/core/client/img/default_face.jpg"
class="img-circle img-thumbnail img-responsive center-block">
<span class="cast-xs-info"><strong>{{vm.movieinfo.credits.cast[1].name}}</strong></span>
<p class="cast-xs-info">{{vm.movieinfo.credits.cast[1].character}}</p>
</div>
<div class="col-xs-4 col-md-2 text-center">
<img ng-src="{{vm.tmdbConfig.cast_img_base_url}}{{vm.movieinfo.credits.cast[2].profile_path}}"
on-error-src="/./modules/core/client/img/default_face.jpg"
class="img-circle img-thumbnail img-responsive center-block">
<span class="cast-xs-info"><strong>{{vm.movieinfo.credits.cast[2].name}}</strong></span>
<p class="cast-xs-info">{{vm.movieinfo.credits.cast[2].character}}</p>
</div>
<div class="clearfix visible-xs-block visible-sm-block"></div>
<div class="col-xs-4 col-md-2 text-center">
<img ng-src="{{vm.tmdbConfig.cast_img_base_url}}{{vm.movieinfo.credits.cast[3].profile_path}}"
on-error-src="/./modules/core/client/img/default_face.jpg"
class="img-circle img-thumbnail img-responsive center-block">
<span class="cast-xs-info"><strong>{{vm.movieinfo.credits.cast[3].name}}</strong></span>
<p class="cast-xs-info">{{vm.movieinfo.credits.cast[3].character}}</p>
</div>
<div class="col-xs-4 col-md-2 text-center">
<img ng-src="{{vm.tmdbConfig.cast_img_base_url}}{{vm.movieinfo.credits.cast[4].profile_path}}"
on-error-src="/./modules/core/client/img/default_face.jpg"
class="img-circle img-thumbnail img-responsive center-block">
<span class="cast-xs-info"><strong>{{vm.movieinfo.credits.cast[4].name}}</strong></span>
<p class="cast-xs-info">{{vm.movieinfo.credits.cast[4].character}}</p>
</div>
<div class="col-xs-4 col-md-2 text-center">
<img ng-src="{{vm.tmdbConfig.cast_img_base_url}}{{vm.movieinfo.credits.cast[5].profile_path}}"
on-error-src="/./modules/core/client/img/default_face.jpg"
class="img-circle img-thumbnail img-responsive center-block">
<span class="cast-xs-info"><strong>{{vm.movieinfo.credits.cast[5].name}}</strong></span>
<p class="cast-xs-info">{{vm.movieinfo.credits.cast[5].character}}</p>
</div>
</div>
</div>
</div>
</div>
<div class="row" ng-show="vm.tmdb_info_ok == true" style="margin-top: 40px;">
<div class="col-md-12 col-sm-12 col-xs-12">
<legend class="small-legend" translate="SELECT_TAGS"></legend>
<dl class="dl-horizontal">
<div ng-repeat="item in vm.resourcesTags.movie.radio">
<dt class="h-line">{{ 'RESOURCESTAGS.'+item.name+'.SELF' | translate}}</dt>
<dd class="h-line">
<label class="radio-inline" ng-repeat="sitem in item.value">
<input type="radio" class="tradio" name="tag_{{item.name}}" ng-model="vm.tags['tag_'+item.name]"
id="radio_{{item.name}}{{$index}}"
value="{{sitem.name}}"> {{ 'RESOURCESTAGS.' + item.name + '.' + sitem.name | translate}}
</label>
</dd>
</div>
<div style="margin-top: 30px;"></div>
<div ng-repeat="item in vm.resourcesTags.movie.checkbox">
<dt class="h-line">{{ 'RESOURCESTAGS.'+item.name+'.SELF' | translate}}</dt>
<dd class="h-line">
<label class="checkbox-inline" ng-repeat="sitem in item.value">
<input type="checkbox" class="tcheckbox" ng-model="vm.tags['tag_'+item.name+'_'+sitem.name]"
id="checkbox_{{item.name}}_{{sitem.name}}"
value="{{sitem.name}}"> {{ 'RESOURCESTAGS.' + item.name + '.' + sitem.name | translate}}
</label>
</dd>
</div>
<div class="margin-top-10">
<dt class="h-line"></dt>
<dd class="h-line"><span class="label label-tag text-uppercase"
ng-click="vm.clearAllCondition();">{{ 'CLEAR_ALL_CONDITION' | translate}}</span></dd>
</div>
</dl>
</div>
</div>
<div class="row" ng-show="vm.tmdb_info_ok == true" style="margin-top: 40px;">
<div class="col-md-12 col-sm-12 col-xs-12">
<legend class="small-legend" translate="ENTER_VIDEO_NFO"></legend>
<textarea class="form-control" rows="10" ng-model="vm.videoNfo"></textarea>
</div>
</div>
<div class="row" ng-show="vm.tmdb_info_ok == true" style="margin-top: 60px;">
<div class="col-md-12 col-sm-12 col-xs-12">
<legend class="small-legend" translate="TORRENTS_SUBMIT_UPLOAD"></legend>
<div class="col-sm-6 col-sm-offset-3 text-center">
<label class="checkbox text-uppercase">
<input type="checkbox" id="agreeCheckbox" ng-model="vm.agreeRules">
<span translate="AGREE_RULES"></span>
</label>
</div>
<div class="col-sm-4 col-sm-offset-4">
<button class="btn btn-lg btn-block btn-success" ng-click="vm.create()"
ng-disabled="!vm.agreeRules">{{ 'SUBMIT_BUTTON' | translate}}
</button>
<button class="btn btn-lg btn-block btn-warning" ng-click="vm.cancel()">{{ 'CANCEL_BUTTON' | translate}}
</button>
</div>
<div class="col-sm-10 text-center">
<span class="error-text" ng-show="vm.error_msg">{{vm.error_msg}}</span>
</div>
</div>
</div>
</section>