Files
meanTorrent/modules/torrents/client/views/uploads-torrents.client.view.html

401 lines
24 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 margin-top-10">
<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 marked src="'/modules/torrents/client/templates/upload-rules-'+vm.lang+'.md'" compile="true" style="line-height: 1.6;">
</div>
</div>
</div>
</div>
<div class="row margin-bottom-40">
<div class="col-xs-12">
<legend class="small-legend" translate="SELECT_RESOURCE_TYPE"></legend>
<div class="col-xs-12 col-sm-6 col-md-4">
<select class="form-control" ng-model="vm.selectedType" ng-change="vm.onTorrentTypeChanged();">
<option ng-repeat="t in vm.torrentType.value" value="{{t.value}}">{{'MENU_TORRENTS_SUB.'+t.name | translate}}</option>
</select>
</div>
</div>
</div>
<div class="row margin-bottom-40">
<div class="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 margin-bottom-40">
<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 ng-if="vm.tmdb_info_ok == true" ng-include="vm.getIncludeInfoTemplate();"></div>
<div class="row margin-bottom-40" ng-show="vm.tmdb_info_ok == true && vm.inputedEpisodesOK == true">
<div class="col-md-12 col-sm-12 col-xs-12">
<legend class="small-legend" translate="ENTER_VIDEO_NFO"></legend>
<div class="col-xs-12">
<textarea class="form-control" rows="10" ng-model="vm.videoNfo"></textarea>
</div>
</div>
</div>
<div class="row margin-bottom-40 margin-top-50" ng-show="vm.tmdb_info_ok == true && vm.inputedEpisodesOK == true">
<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>
<!--
**********************************************************************
ng-template movieinfo.html
**********************************************************************
-->
<script type="text/ng-template" id="movieinfo.html">
<div>
<div class="row margin-bottom-40">
<div class="col-md-12 col-sm-12 col-xs-12">
<legend class="small-legend" translate="TMDB_RESOURCE_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_COMPANIES' | translate}}</dt>
<dd class="h-line list-all-companies">
<span class="company-item"
ng-repeat="item in vm.movieinfo.production_companies">{{item.name}}</span>
<span ng-show="vm.movieinfo.production_companies.length ==0">-</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>
<span ng-show="vm.movieinfo.production_countries.length ==0">-</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_movie_link_url}}{{vm.movieinfo.id}}"
target="_blank">{{vm.tmdbConfig.tmdb_movie_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" ng-repeat="cast in vm.movieinfo.credits.cast | limitTo: 6">
<img ng-src="{{vm.tmdbConfig.cast_img_base_url}}{{cast.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>{{cast.name}}</strong></span>
<p class="cast-xs-info">{{cast.character}}</p>
</div>
</div>
</div>
</div>
</div>
<div class="row margin-bottom-40">
<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>
</script>
<!--
**********************************************************************
ng-template tvinfo.html
**********************************************************************
-->
<script type="text/ng-template" id="tvinfo.html">
<div>
<div class="row margin-bottom-40">
<div class="col-md-12 col-sm-12 col-xs-12">
<legend class="small-legend" translate="TMDB_RESOURCE_INFO"></legend>
<div class="col-md-4 col-sm-4 col-xs-12">
<img ng-src="{{vm.tmdbConfig.poster_img_base_url}}{{vm.tvinfo.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_NAME' | translate}}</dt>
<dd class="h-line">{{vm.tvinfo.original_name}}</dd>
<dt class="h-line">{{ 'TMDB_FIELDS.NAME' | translate}}</dt>
<dd class="h-line">{{vm.tvinfo.name}}</dd>
<dt class="h-line">{{ 'TMDB_FIELDS.ORIGINAL_LANGUAGE' | translate}}</dt>
<dd class="h-line">{{vm.tvinfo.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.tvinfo.genres">{{item.name}}</span>
</dd>
<dt class="h-line">{{ 'TMDB_FIELDS.PRODUCTION_COMPANIES' | translate}}</dt>
<dd class="h-line list-all-companies">
<span class="company-item"
ng-repeat="item in vm.tvinfo.production_companies">{{item.name}}</span>
<span ng-show="vm.tvinfo.production_companies.length ==0">-</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.tvinfo.origin_country">{{item}}</span>
<span ng-show="vm.tvinfo.origin_country.length ==0">-</span>
</dd>
<dt class="h-line">{{ 'TMDB_FIELDS.FIRST_AIR_DATE' | translate}}</dt>
<dd class="h-line">{{vm.tvinfo.first_air_date}}</dd>
<dt class="h-line">{{ 'TMDB_FIELDS.LAST_AIR_DATE' | translate}}</dt>
<dd class="h-line">{{vm.tvinfo.last_air_date}}</dd>
<dt class="h-line">{{ 'TMDB_FIELDS.NUMBER_OF_SEASONS' | translate}}</dt>
<dd class="h-line">{{vm.tvinfo.number_of_seasons}} {{ 'TMDB_FIELDS.UNIT_SEASONS' | translate}}</dd>
<dt class="h-line">{{ 'TMDB_FIELDS.NUMBER_OF_EPISODES' | translate}}</dt>
<dd class="h-line">{{vm.tvinfo.number_of_episodes}} {{ 'TMDB_FIELDS.UNIT_EPISODES' | translate}}</dd>
<dt class="h-line">{{ 'TMDB_FIELDS.VOTE_AVERAGE' | translate}}</dt>
<dd class="h-line">{{vm.tvinfo.vote_average}} / {{vm.tvinfo.vote_count}} {{ 'TMDB_FIELDS.VOTE_UNIT' | translate}}</dd>
<dt class="h-line">{{ 'TMDB_FIELDS.TMDB_LINK' | translate}}</dt>
<dd class="h-line"><a href="{{vm.tmdbConfig.tmdb_tv_link_url}}{{vm.tvinfo.id}}"
target="_blank">{{vm.tmdbConfig.tmdb_tv_link_url}}{{vm.tvinfo.id}}</a></dd>
<dt class="h-line">{{ 'TMDB_FIELDS.OVERVIEW' | translate}}</dt>
<dd class="h-line">{{vm.tvinfo.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" ng-repeat="cast in vm.tvinfo.credits.cast | limitTo: 6">
<img ng-src="{{vm.tmdbConfig.cast_img_base_url}}{{cast.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>{{cast.name}}</strong></span>
<p class="cast-xs-info">{{cast.character}}</p>
</div>
</div>
</div>
</div>
</div>
<div class="row margin-bottom-20">
<div class="col-md-12 col-sm-12 col-xs-12">
<legend class="small-legend" translate="SELECT_SE"></legend>
<dl class="dl-horizontal">
<dt class="h-line">{{ 'TMDB_FIELDS.UNIT_SEASONS' | translate}}</dt>
<dd class="h-line">
<div class="col-sm-4 col-md-3">
<select class="form-control" ng-model="vm.selectedSeasons">
<option ng-repeat="n in [] | mtRange:vm.tvinfo.number_of_seasons" value="{{n+1}}">{{n+1}}</option>
</select>
</div>
</dd>
<div class="margin-top-5">
<form name="vm.episodesForm" ng-submit="vm.tvContinue(vm.episodesForm.$valid)" novalidate>
<dt class="h-line">{{ 'TMDB_FIELDS.UNIT_EPISODES' | translate}}</dt>
<dd class="h-line">
<div class="form-group" show-errors>
<div class="col-sm-4 col-md-3">
<input class="form-control" id="inputedEpisodes" name="inputedEpisodes"
ng-pattern="/(^[0-9]{1,4}$)|(^[0-9]{1,2}[\-]{1}[0-9]{1,4}$)/"
ng-model="vm.inputedEpisodes" ng-disabled="vm.inputedEpisodesOK" required>
</div>
<div class="col-sm-4 col-md-3">
<button type="submit" class="btn btn-primary">continue</button>
</div>
<div class="col-xs-12" ng-messages="vm.episodesForm.inputedEpisodes.$error" role="alert">
<p class="help-block error-text" ng-message="required">{{'TMDB_FIELDS.EPISODES_INPUT_TIP' | translate}}</p>
<p class="help-block error-text" ng-message="pattern">{{'TMDB_FIELDS.EPISODES_INPUT_TIP' | translate}}</p>
</div>
<div class="col-xs-12" ng-hide="vm.inputedEpisodesError">
<p class="episodes_input_tip">{{ 'TMDB_FIELDS.EPISODES_INPUT_TIP' | translate}}</p>
</div>
</div>
</dd>
</form>
</div>
</dl>
</div>
</div>
<div class="row margin-bottom-40" ng-show="vm.inputedEpisodesOK">
<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.tv.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.tv.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>
</script>
</section>