Merge branch 'master' of github.com:doubaniux/boofilsic

This commit is contained in:
doubaniux 2020-10-04 19:46:53 +02:00
commit 1ecb9d08c7

View file

@ -97,26 +97,28 @@
{% endfor %}
{% endif %}</div>
<div>{% if movie.actor %}{% trans '主演:' %}
{% for actor in movie.actor %}
<span {% if forloop.counter > 5 %}style="display: none;" {% endif %}>{{ actor }}</span>
{% if forloop.counter <= 5 %}
{% for actor in movie.actor %}
<span {% if forloop.counter > 5 %}style="display: none;"{% endif %}>
<span class="actor">{{ actor }}</span>
{% if not forloop.last %} / {% endif %}
</span>
{% if forloop.counter <= 5 %}
{% endif %}
{% endfor %}
{% endfor %}
{% if movie.actor|length > 5 %}
{% if movie.actor|length > 5 %}
<a href="javascript:void(0);" id="actorMore">{% trans '更多' %}</a>
<script>
$("#actorMore").click(function (e) {
$(this).siblings("span:not(:visible)").each(function (e) {
$(this).removeAttr('style');
$("#actorMore").click(function(e) {
$("span.actor:not(:visible)").each(function(e){
$(this).parent().removeAttr('style');
});
$(this).remove();
})
</script>
{% endif %}
{% endif %}</div>
{% endif %}
{% endif %}</div>
<div>{% if movie.genre %}{% trans '类型:' %}
{% for genre in movie.get_genre_display %}
<span>{{ genre }}</span>{% if not forloop.last %} / {% endif %}