From efdd08fe58558288a86e2f8d28ec56de4c425c7d Mon Sep 17 00:00:00 2001 From: Adil Mohak Date: Sat, 5 Oct 2024 17:57:45 +0300 Subject: [PATCH] fix: search result cards --- result/views.py | 6 +++--- templates/search/search_view.html | 18 ++++++------------ 2 files changed, 9 insertions(+), 15 deletions(-) diff --git a/result/views.py b/result/views.py index edb29af..e948061 100644 --- a/result/views.py +++ b/result/views.py @@ -25,7 +25,7 @@ from accounts.models import Student from core.models import Session, Semester from course.models import Course from accounts.decorators import lecturer_required, student_required -from .models import TakenCourse, Result, FIRST, SECOND +from .models import TakenCourse, Result cm = 2.54 @@ -583,7 +583,7 @@ def course_registration_form(request): first_semester_unit = 0 for course in courses: - if course.course.semester == FIRST: + if course.course.semester == settings.FIRST: first_semester_unit += int(course.course.credit) data = [ ( @@ -672,7 +672,7 @@ def course_registration_form(request): second_semester_unit = 0 for course in courses: - if course.course.semester == SECOND: + if course.course.semester == settings.SECOND: second_semester_unit += int(course.course.credit) data = [ ( diff --git a/templates/search/search_view.html b/templates/search/search_view.html index a8885d6..271ca8b 100644 --- a/templates/search/search_view.html +++ b/templates/search/search_view.html @@ -30,12 +30,6 @@ .class-item a{padding: 2px; color: #343a40; text-decoration: none; transition: .5s;} .class-item:hover{ transform: translateX(15px); - background: #6cbd45; - } - .class-item:hover h4 a { - color: #fff; } - .class-item:hover p, .class-item:hover span { - color: rgb(158, 239, 119); } @@ -46,7 +40,7 @@ {% with object|class_name as klass %} {% if klass == "Program" %}
-
{% trans 'Program' %}
+
{% trans 'Program' %}
@@ -56,7 +50,7 @@ {% elif klass == "Course" %}
-
{% trans 'Course' %}
+
{% trans 'Course' %}

{% trans 'Program of' %} {{ object.program }}

@@ -66,7 +60,7 @@ {% elif klass == "NewsAndEvents" %}
-
{% trans 'News And Events' %}
+
{% trans 'News And Events' %}

{% trans 'Date:' %} {{ object.updated_date|timesince }} ago

@@ -76,7 +70,7 @@ {% elif klass == "Quiz" %}
-
{% trans 'Quiz' %}
+
{% trans 'Quiz' %}

{{ object.category }} {% trans 'quiz' %}, {% trans 'Course:' %} {{ object.course }}

@@ -86,7 +80,7 @@ {% else %}
-
{% trans 'Program' %}
+
{% trans 'Program' %}
{{ object }} | {{ object|class_name }} @@ -123,7 +117,7 @@
  • {% trans 'Program' %} > {% trans 'Title or Description' %}
  • {% trans 'Course' %} >{% trans 'Title, Code or Description' %}
  • -
  • {% trans 'News And Events' %} > {% trans 'Title, Description or just by typing "news" or "event %}li> +
  • {% trans 'News And Events' %} > {% trans 'Title, Description or just by typing news or event' %}li>
  • {% trans 'Quiz' %} >{% trans 'Title, Description or Category(practice, assignment and exam)' %}