Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Switch to GitLab Next
Sign in / Register
Toggle navigation
tiki
Project overview
Project overview
Details
Activity
Releases
Cycle Analytics
Insights
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Locked Files
Custom Issue Tracker
Custom Issue Tracker
Labels
Merge Requests
3
Merge Requests
3
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Security & Compliance
Security & Compliance
Dependency List
Packages
Packages
Container Registry
External Wiki
External Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Jobs
Commits
Open sidebar
Tiki Wiki CMS Groupware
tiki
Commits
af3691ff
Commit
af3691ff
authored
Nov 08, 2016
by
kroky6
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[ENH] add empty option to trackerfilter dropdowns
parent
cc2ba893
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
15 additions
and
0 deletions
+15
-0
lib/wiki-plugins/wikiplugin_trackerfilter.php
lib/wiki-plugins/wikiplugin_trackerfilter.php
+15
-0
No files found.
lib/wiki-plugins/wikiplugin_trackerfilter.php
View file @
af3691ff
...
...
@@ -439,6 +439,9 @@ function wikiplugin_trackerfilter_build_trackerlist_filter($input, $formats, &$f
if
(
!
is_array
(
$val
))
{
$val
=
urldecode
(
$val
);
}
if
(
$val
===
'-Blank (no data)-'
)
{
$val
=
''
;
}
$fieldId
=
substr
(
$key
,
2
);
$field
=
$tracker_definition
->
getField
(
$fieldId
);
...
...
@@ -670,6 +673,7 @@ function wikiplugin_trackerFilter_get_filters($trackerId=0, array $listfields=ar
}
$opts
[]
=
$opt
;
}
$opts
[]
=
wikiplugin_trackerFilter_add_empty_option
(
$fieldId
);
break
;
case
'c'
:
// checkbox
$opt
[
'id'
]
=
'y'
;
...
...
@@ -723,6 +727,7 @@ function wikiplugin_trackerFilter_get_filters($trackerId=0, array $listfields=ar
}
$opts
[]
=
$opt
;
}
$opts
[]
=
wikiplugin_trackerFilter_add_empty_option
(
$fieldId
);
break
;
case
'w'
:
//dynamic item lists
case
'r'
:
// item link
...
...
@@ -747,6 +752,7 @@ function wikiplugin_trackerFilter_get_filters($trackerId=0, array $listfields=ar
$opts
[]
=
$opt
;
}
}
$opts
[]
=
wikiplugin_trackerFilter_add_empty_option
(
$fieldId
);
break
;
case
'f'
:
...
...
@@ -843,3 +849,12 @@ function wikiplugin_trackerFilter_build_urlquery($params)
}
return
$urlquery
;
}
function
wikiplugin_trackerFilter_add_empty_option
(
$fieldId
)
{
$empty
=
'-Blank (no data)-'
;
return
array
(
'id'
=>
$empty
,
'name'
=>
$empty
,
'selected'
=>
(
!
empty
(
$_REQUEST
[
'f_'
.
$fieldId
])
&&
((
!
is_array
(
$_REQUEST
[
'f_'
.
$fieldId
])
&&
$_REQUEST
[
'f_'
.
$fieldId
]
===
$empty
)
||
(
is_array
(
$_REQUEST
[
'f_'
.
$fieldId
])
&&
in_array
(
$empty
,
$_REQUEST
[
'f_'
.
$fieldId
]))))
?
'y'
:
'n'
);
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
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 comment