From 54bc2c41eca86b28c48bc12cdf5da1757beadc02 Mon Sep 17 00:00:00 2001 From: Akshen Date: Thu, 16 May 2019 16:32:07 +0530 Subject: add outline to videos - improve search results - add color schemes to status --- .../templates/fossee_manim/proposal_status.html | 18 ++++++++++++++++-- .../templates/fossee_manim/search_results.html | 4 ++-- fossee_manim/templates/fossee_manim/video.html | 6 +++--- fossee_manim/views.py | 3 ++- 4 files changed, 23 insertions(+), 8 deletions(-) diff --git a/fossee_manim/templates/fossee_manim/proposal_status.html b/fossee_manim/templates/fossee_manim/proposal_status.html index e9752ca..4a1b7ed 100644 --- a/fossee_manim/templates/fossee_manim/proposal_status.html +++ b/fossee_manim/templates/fossee_manim/proposal_status.html @@ -13,13 +13,21 @@ Title Status + Created Date {% for an in anime %} {{ an.title }} - {{ an.status }} + {% if an.status == 'rejected' %} + {{ an.status }} + {% elif an.status == 'released' %} + {{ an.status }} + {% else %} + {{ an.status }} + {% endif %} + {{ an.created }} @@ -41,7 +49,13 @@ {{ an.title }} {{ an.contributor.get_full_name }} - {{ an.status }} + {% if an.status == 'rejected' %} + {{ an.status }} + {% elif an.status == 'released' %} + {{ an.status }} + {% else %} + {{ an.status }} + {% endif %} {{ an.created }} diff --git a/fossee_manim/templates/fossee_manim/search_results.html b/fossee_manim/templates/fossee_manim/search_results.html index e58616b..1741123 100644 --- a/fossee_manim/templates/fossee_manim/search_results.html +++ b/fossee_manim/templates/fossee_manim/search_results.html @@ -11,7 +11,7 @@

- {%if s_result %} + {% if s_result %} {% for anime in s_result %}
@@ -35,4 +35,4 @@

- {% endblock %} \ No newline at end of file +{% endblock %} \ No newline at end of file diff --git a/fossee_manim/templates/fossee_manim/video.html b/fossee_manim/templates/fossee_manim/video.html index b94a34e..644d785 100644 --- a/fossee_manim/templates/fossee_manim/video.html +++ b/fossee_manim/templates/fossee_manim/video.html @@ -17,7 +17,7 @@

{{ video.0.animation.title }}

-

{{ video.0.animation.github }}

+

{{ video.0.animation.subcategory }}


@@ -29,7 +29,7 @@

- {{ video.0.animation.description }} + {{ video.0.animation.outline }}


@@ -63,7 +63,7 @@
{% csrf_token %} {{ comment_form.as_p }} - + diff --git a/fossee_manim/views.py b/fossee_manim/views.py index 50aa816..ae3d90a 100644 --- a/fossee_manim/views.py +++ b/fossee_manim/views.py @@ -414,7 +414,8 @@ def search(request): word = request.POST.get('sbox') anime_list = AnimationStats.objects.filter( Q(animation__title__contains=word) | Q(animation__outline__contains=word) - | Q(animation__category__name__contains=word), animation__status='released') + | Q(animation__category__name__contains=word) | Q(animation__subcategory__contains=word), + animation__status='released') return render(request, 'fossee_manim/search_results.html', {'s_result': anime_list, 'categories': categories}) -- cgit