From 4f6d09b93d511d236212cc09033c46adb7f66e54 Mon Sep 17 00:00:00 2001 From: witold Date: Thu, 8 Jun 2023 09:56:27 +0200 Subject: [PATCH] feat: add search bar to project list --- euphrosyne/assets/css/base.css | 5 +++++ lab/admin/project.py | 2 ++ 2 files changed, 7 insertions(+) diff --git a/euphrosyne/assets/css/base.css b/euphrosyne/assets/css/base.css index f12fef7ef..7fb6495ed 100644 --- a/euphrosyne/assets/css/base.css +++ b/euphrosyne/assets/css/base.css @@ -170,6 +170,11 @@ ul li { list-style-type: none; } +/* purgecss ignore */ +#toolbar input#searchbar { + height: 1.93rem; +} + /* purgecss start ignore */ .fr-tag.to_schedule { background: var(--background-contrast-yellow-tournesol); diff --git a/lab/admin/project.py b/lab/admin/project.py index 7a2b7e95b..cd4826721 100644 --- a/lab/admin/project.py +++ b/lab/admin/project.py @@ -116,6 +116,8 @@ class ProjectAdmin(LabPermissionMixin, ModelAdmin): view_permission=LabRole.PROJECT_MEMBER, ) + search_fields = ("name",) + class Media: js = ("pages/project.js",) css = {"all": ("css/admin/project-admin.css",)}