diff --git a/app/static/app/css/customCSS.css b/app/static/app/css/customCSS.css
index 0dfb137..c882a1e 100644
--- a/app/static/app/css/customCSS.css
+++ b/app/static/app/css/customCSS.css
@@ -31,3 +31,11 @@ summary.title {
summary.title + .table-container {
clear: both;
}
+
+.disabled-grey {
+ background-color: #cccccc;
+}
+
+.disabled-grey a {
+ cursor: default;
+}
\ No newline at end of file
diff --git a/app/templates/tags.html b/app/templates/tags.html
index 142bba2..72ed8a5 100644
--- a/app/templates/tags.html
+++ b/app/templates/tags.html
@@ -4,12 +4,19 @@
Tags
- {% if tags %}
- {% for tag in tags %}
-
- 📌 {{ tag.name }}
-
- {% endfor %}
+ {% if active_tags %}
+ {% for tag in active_tags %}
+
+ 📌 {{ tag.name }}
+
+ {% endfor %}
+ {% endif %}
+ {% if inactive_tags %}
+ {% for tag in inactive_tags %}
+
+ 📌 {{ tag.name }}
+
+ {% endfor %}
{% endif %}
diff --git a/app/views.py b/app/views.py
index 485fa15..71a756d 100644
--- a/app/views.py
+++ b/app/views.py
@@ -75,8 +75,11 @@ def latest(request):
def tags(request):
"""view for the tags"""
tags = Tag.objects.all()
+ active_tags = tags.filter(tutorial__in=Tutorial.objects.filter(publish=True)).distinct()
+ inactive_tags = tags.exclude(id__in=active_tags.values_list('id', flat=True))
context = {
- 'tags': tags,
+ 'active_tags': active_tags,
+ 'inactive_tags': inactive_tags,
'title': 'Tags'
}
return render(request, 'tags.html', context)