Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
M
madis
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Soluris
madis
Commits
131ccdca
Commit
131ccdca
authored
4 years ago
by
Alexis Thinardon
Browse files
Options
Downloads
Patches
Plain Diff
Add filter in list,
#286
parent
009df2f4
No related branches found
No related tags found
1 merge request
!166
Develop
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
templates/Reporting/Journalisation/list.html.twig
+58
-0
58 additions, 0 deletions
templates/Reporting/Journalisation/list.html.twig
templates/_Utils/_serverside_datatable.html.twig
+1
-1
1 addition, 1 deletion
templates/_Utils/_serverside_datatable.html.twig
with
59 additions
and
1 deletion
templates/Reporting/Journalisation/list.html.twig
+
58
−
0
View file @
131ccdca
...
@@ -22,6 +22,37 @@
...
@@ -22,6 +22,37 @@
<div
class=
"box-body"
>
<div
class=
"box-body"
>
<table
id=
"table"
class=
"table table-bordered table-hover"
>
<table
id=
"table"
class=
"table table-bordered table-hover"
>
<thead>
<thead>
<tr>
<th>
<input
class=
"form-control"
type=
"text"
id=
"search_utilisateur"
placeholder=
"Utilisateur"
style=
"width: 100%;"
>
</th>
<th>
<input
class=
"form-control"
type=
"text"
id=
"search_collectivite"
placeholder=
"Collectivité"
style=
"width: 100%;"
>
</th>
<th>
<input
class=
"datepicker form-control"
type=
"text"
id=
"search_date"
placeholder=
"Date"
style=
"width: 100%;"
>
</th>
<th>
<select
class=
"form-control"
id=
"search_sujet"
style=
"width: 100%;"
>
<option
value=
""
>
Sujet
</option>
{%
for
key
,
priority
in
dictionary
(
'reporting_log_journal_subject'
)
%}
<option
value=
"
{{
key
}}
"
>
{{
priority
}}
</option>
{%
endfor
%}
</select>
</th>
<th>
<select
class=
"form-control"
id=
"search_action"
style=
"width: 100%;"
>
<option
value=
""
>
Action
</option>
{%
for
key
,
priority
in
dictionary
(
'reporting_log_journal_action'
)
%}
<option
value=
"
{{
key
}}
"
>
{{
priority
}}
</option>
{%
endfor
%}
</select>
</th>
<th>
<input
class=
"form-control"
type=
"text"
id=
"search_last_know_name"
placeholder=
"Nom"
style=
"width: 100%;"
>
</th>
<th></th>
</tr>
<tr>
<tr>
<th>
Utilisateur
</th>
<th>
Utilisateur
</th>
<th>
Collectivité
</th>
<th>
Collectivité
</th>
...
@@ -41,6 +72,33 @@
...
@@ -41,6 +72,33 @@
{%
endblock
%}
{%
endblock
%}
{%
block
javascripts
%}
{%
block
javascripts
%}
<script
src=
"//cdnjs.cloudflare.com/ajax/libs/jquery-throttle-debounce/1.1/jquery.ba-throttle-debounce.js"
></script>
{{
include
(
'_Utils/_serverside_datatable.html.twig'
)
}}
{{
include
(
'_Utils/_serverside_datatable.html.twig'
)
}}
<script>
$
(
document
).
ready
(
function
()
{
$
(
'
#table_filter
'
).
hide
();
var
oTable
=
$
(
'
#table
'
).
DataTable
();
$
(
'
#search_utilisateur
'
).
keyup
(
$
.
debounce
(
250
,
function
(){
oTable
.
column
(
'
0
'
).
search
(
$
(
this
).
val
()).
draw
()
;
}));
$
(
'
#search_collectivite
'
).
keyup
(
$
.
debounce
(
250
,
function
(){
oTable
.
column
(
'
1
'
).
search
(
$
(
this
).
val
()).
draw
()
;
}));
$
(
'
#search_date
'
).
change
(
function
(){
oTable
.
column
(
'
2
'
).
search
(
$
(
this
).
val
()).
draw
()
;
});
$
(
'
#search_sujet
'
).
change
(
function
(){
oTable
.
column
(
'
3
'
).
search
(
$
(
this
).
val
()).
draw
()
;
});
$
(
'
#search_action
'
).
change
(
function
(){
oTable
.
column
(
'
4
'
).
search
(
$
(
this
).
val
()).
draw
()
;
});
$
(
'
#search_last_know_name
'
).
keyup
(
$
.
debounce
(
250
,
function
(){
oTable
.
column
(
'
5
'
).
search
(
$
(
this
).
val
()).
draw
()
;
}));
}
);
</script>
{%
endblock
%}
{%
endblock
%}
This diff is collapsed.
Click to expand it.
templates/_Utils/_serverside_datatable.html.twig
+
1
−
1
View file @
131ccdca
...
@@ -81,4 +81,4 @@
...
@@ -81,4 +81,4 @@
"
recordsTotal
"
:
{{
totalLogs
}}
"
recordsTotal
"
:
{{
totalLogs
}}
});
});
});
});
</script>
</script>
\ No newline at end of file
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment