Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
aa.gusti
/
opensipkd-base
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Settings
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit 24bcccee
authored
Jul 07, 2026
by
aa.gustiana@gmail.com
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
fix: add global_search attribute to BaseView for improved search functionality
1 parent
eff7d547
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
3 deletions
opensipkd/base/views/base_views.py
opensipkd/base/views/base_views.py
View file @
24bccce
...
@@ -143,7 +143,7 @@ class BaseView(object):
...
@@ -143,7 +143,7 @@ class BaseView(object):
self
.
list_form
=
None
# List dam Form
self
.
list_form
=
None
# List dam Form
self
.
form_list
=
None
# Form kemudian detail list
self
.
form_list
=
None
# Form kemudian detail list
self
.
global_search
=
False
self
.
form_scripts
=
"""
self
.
form_scripts
=
"""
$('#parent_nm').bind('typeahead:selected', function(obj, datum) {
$('#parent_nm').bind('typeahead:selected', function(obj, datum) {
$('#parent_id').val(datum.id);
$('#parent_id').val(datum.id);
...
@@ -590,9 +590,10 @@ class BaseView(object):
...
@@ -590,9 +590,10 @@ class BaseView(object):
if
not
self
.
columns
:
if
not
self
.
columns
:
columns
=
[]
columns
=
[]
for
d
in
list_schema
():
for
d
in
list_schema
():
global_search
=
getattr
(
d
,
"global_search"
,
False
)
global_search
=
hasattr
(
d
,
"global_search"
)
\
and
getattr
(
d
,
"global_search"
,
self
.
global_search
)
or
self
.
global_search
search_method
=
hasattr
(
d
,
"search_method"
)
\
search_method
=
hasattr
(
d
,
"search_method"
)
\
and
getattr
(
d
,
"search_method"
)
or
"string_contains"
and
getattr
(
d
,
"search_method"
,
"string_contains"
)
or
"string_contains"
if
hasattr
(
d
,
"field"
):
if
hasattr
(
d
,
"field"
):
if
isinstance
(
d
.
field
,
str
):
if
isinstance
(
d
.
field
,
str
):
columns
.
append
(
columns
.
append
(
...
...
Write
Preview
Markdown
is supported
Attach a file
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to post a comment