fix more actor separator display issue
This commit is contained in:
parent
270ddc240d
commit
d2f501d4f2
3 changed files with 28 additions and 23 deletions
|
@ -87,6 +87,9 @@ def home(request):
|
|||
def search(request):
|
||||
if request.method == 'GET':
|
||||
|
||||
if not request.GET.get("q"):
|
||||
return HttpResponseBadRequest()
|
||||
|
||||
# category, book/movie/record etc
|
||||
category = request.GET.get("c", default='').strip().lower()
|
||||
|
||||
|
|
|
@ -62,26 +62,28 @@
|
|||
{% 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 %}
|
||||
{% if not forloop.last %} / {% endif %}
|
||||
{% 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 %}
|
||||
|
||||
{% if movie.actor|length > 5 %}
|
||||
{% endfor %}
|
||||
|
||||
{% 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.showtime %}{% trans '上映时间:' %}
|
||||
{% for showtime in movie.showtime %}
|
||||
{% for time, region in showtime.items %}
|
||||
|
|
|
@ -97,26 +97,26 @@
|
|||
{% 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 %}>{{ actor }}</span>
|
||||
{% if forloop.counter <= 5 %}
|
||||
{% if not forloop.last %} / {% endif %}
|
||||
{% 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){
|
||||
$("#actorMore").click(function (e) {
|
||||
$(this).siblings("span:not(:visible)").each(function (e) {
|
||||
$(this).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 %}
|
||||
|
|
Loading…
Add table
Reference in a new issue