You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

136 lines
4.7 KiB

{% extends 'movie/base.html' %}
{% block content %}
<link href="http://netdna.bootstrapcdn.com/bootstrap/3.1.0/css/bootstrap.min.css" rel="stylesheet">
<script src="http://libs.baidu.com/jquery/1.10.2/jquery.min.js"></script>
<link href="{% static 'css/star-rating.css' %}" media="all" rel="stylesheet" type="text/css"/>
<script src="{% static 'js/star-rating.js' %}" type="text/javascript"></script>
<style>
.poster {
float: left;
margin: 3px 12px 0 0;
overflow: hidden;
text-align: center;
}
.info {
max-width: 800px;
margin-top: 15px;
float: left;
word-wrap: break-word;
}
.smovie {
display: block;
float: left;
font-size: 15px;
text-align: center;
margin: 0 25px 10px 0;
width: 200px;
}
hr {
-moz-border-bottom-colors: none;
-moz-border-image: none;
-moz-border-left-colors: none;
-moz-border-right-colors: none;
-moz-border-top-colors: none;
border-color: #c9302c;
border-style: solid none;
border-width: 1px 0;
margin: 18px 0;
}
</style>
<!--展示电影信息-->
<div class="container">
<div class="poster">
<a href="{% url 'movie:detail' movie.pk %}" class="item">
<div class="poster_div">
<img src="/static/movie/poster/{{ movie.imdb_id }}.jpg" alt="">
</div>
</a>
</div>
<div class="info">
<p>
电影名:
{{ movie.name }}
<span>
{% for foo in movie.get_score_int_range %}
{% endfor %}
</span>
<strong style="color:#e09015">{{ movie.get_score }}</strong>
</p>
<p>简介:{{ movie.intro }}</p>
<p>导演:{{ movie.director }}</p>
<p>编剧:{{ movie.writers }}</p>
<p>主演:{{ movie.actors }}</p>
<p>
类型:
{% for genre in movie.get_genre %}
<a href="{% url 'movie:tag' %}?genre={{ genre }}">{{ genre }}</a>
{% if not forloop.last %}
<span>|</span>
{% endif %}
{% endfor %}
</p>
<p>时长:{{ movie.time }}</p>
<p>发行时间:{{ movie.release_time }}</p>
</div>
</div>
<div class="container similarity_movie">
<br>
<div class="alert alert-warning" role="alert">喜欢这部电影的人也喜欢...</div>
{% for movie in similarity_movies %}
<div class="smovie" {% if forloop.first %} style="margin-left: -6px" {% endif %}>
<a href="{% url 'movie:detail' movie.pk %}" class="item">
<div class="poster_div">
<img src="/static/movie/poster/{{ movie.imdb_id }}.jpg" alt="">
<p>{{ movie.name }}
<strong style="color:#e09015">{{ movie.get_score }}</strong>
</p>
</div>
</a>
</div>
{% endfor %}
</div>
<div class="container">
<br>
{% for message in messages %}
{% if message.tags == 'info' %}
<div class="alert alert-info" role="alert">{{ message }}</div>
{% endif %}
{% endfor %}
</div>
{% if login %}
<div class="container">
<hr>
<form class="star" action="" method="post">
<input id="input-2ba" name="score" value="{{ score }}" type="number" class="rating" min="0" max="5"
step="0.5"
data-stars=5
data-symbol="&#xe005;" data-default-caption="{rating} 颗心" data-star-captions="{}">
<label for="comment">评论:</label>
<textarea class="form-control" name="comment" rows="5" id="comment">{{ comment }}</textarea>
<br>
<div class="form-group">
<button type="submit" class="btn btn-primary" style="margin-right: 10px">提交</button>
<button type="reset" class="btn btn-default">清空</button>
</div>
</form>
<br>
<script>
jQuery(document).ready(function () {
$(".rating-kv").rating();
});
</script>
</div>
{% endif %}
{% endblock %}