summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAkshen2019-05-16 16:32:07 +0530
committerAkshen2019-05-16 16:32:07 +0530
commit54bc2c41eca86b28c48bc12cdf5da1757beadc02 (patch)
tree11aa6c3516f1f9f6a953c6755fdfeca05cdcf18d
parent03a913565b72ff950b2d7eb21bbf25864740dce4 (diff)
downloadFOSSEE_animations-54bc2c41eca86b28c48bc12cdf5da1757beadc02.tar.gz
FOSSEE_animations-54bc2c41eca86b28c48bc12cdf5da1757beadc02.tar.bz2
FOSSEE_animations-54bc2c41eca86b28c48bc12cdf5da1757beadc02.zip
add outline to videos
- improve search results - add color schemes to status
-rw-r--r--fossee_manim/templates/fossee_manim/proposal_status.html18
-rw-r--r--fossee_manim/templates/fossee_manim/search_results.html4
-rw-r--r--fossee_manim/templates/fossee_manim/video.html6
-rw-r--r--fossee_manim/views.py3
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 @@
<tr>
<th>Title</th>
<th>Status</th>
+ <th>Created Date</th>
</tr>
</thead>
{% for an in anime %}
<tbody>
<tr>
<td>{{ an.title }}</td>
- <td><span class="badge">{{ an.status }}</span></td>
+ {% if an.status == 'rejected' %}
+ <td><span class="text-danger">{{ an.status }}</span></td>
+ {% elif an.status == 'released' %}
+ <td><span class="text-success">{{ an.status }}</span></td>
+ {% else %}
+ <td><span class="text-info">{{ an.status }}</span></td>
+ {% endif %}
+ <td><span class="badge">{{ an.created }}</span></td>
<td><a href="{% url 'edit_proposal' an.id %}"><button type="button" class="btn btn-info">Edit</button></a></td>
</tr>
</tbody>
@@ -41,7 +49,13 @@
<tr>
<td>{{ an.title }}</td>
<td>{{ an.contributor.get_full_name }}</td>
- <td><span class="badge">{{ an.status }}</span></td>
+ {% if an.status == 'rejected' %}
+ <td><span class="text-danger">{{ an.status }}</span></td>
+ {% elif an.status == 'released' %}
+ <td><span class="text-success">{{ an.status }}</span></td>
+ {% else %}
+ <td><span class="text-info">{{ an.status }}</span></td>
+ {% endif %}
<td><span class="badge">{{ an.created }}</span></td>
<td><a href="{% url 'edit_proposal' an.id %}"><button type="button" class="btn btn-info">View</button></a></td>
</tr>
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 @@
<hr>
<br>
- {%if s_result %}
+ {% if s_result %}
{% for anime in s_result %}
<div class="row">
<div class="col-md-4" >
@@ -35,4 +35,4 @@
</div>
<br>
- {% 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 @@
<p style="color:#26A669; font-size: 200%; float: left;"> {{ video.0.animation.title }} </p>
</div>
<div class="col-md-4">
- <a target="_blank" href="{{ video.animation.github }}"><p style="font-size: 70%; float: right;"> {{ video.0.animation.github }} </p></a>
+ <p style="font-size: 70%; float: right;"> {{ video.0.animation.subcategory }} </p>
</div>
</div>
<br>
@@ -29,7 +29,7 @@
<hr>
<br>
<p style="color:#26A669; font-size: 100%; float: left;">
- {{ video.0.animation.description }}
+ {{ video.0.animation.outline }}
</p>
<br>
</div>
@@ -63,7 +63,7 @@
<br>
{% csrf_token %}
{{ comment_form.as_p }}
- <button type="submit" class="btn btn-default">Post</button>
+ <button type="submit" class="btn btn-success">Post</button>
</form>
</div>
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})