Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
10
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Open sidebar
mahara
mahara
Commits
4404d730
Commit
4404d730
authored
Nov 07, 2019
by
Robert Lyon
Committed by
Gerrit Code Review
Nov 07, 2019
Browse files
Options
Browse Files
Download
Plain Diff
Merge "Bug 1851165: filter tags by owner id"
parents
42268822
ddbf98b7
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
3 additions
and
3 deletions
+3
-3
htdocs/lib/form/elements/tags.php
htdocs/lib/form/elements/tags.php
+2
-2
test/behat/features/settings/institution_tags.feature
test/behat/features/settings/institution_tags.feature
+1
-1
No files found.
htdocs/lib/form/elements/tags.php
View file @
4404d730
...
...
@@ -104,7 +104,7 @@ function display_tag($name, $alltags, $showcount = false) {
else
{
$tag
=
$alltags
[
$name
]
->
tag
;
}
if
(
$showcount
)
{
if
(
$showcount
&&
$alltags
[
$name
]
->
count
>
0
)
{
$tag
.
=
' ('
.
$alltags
[
$name
]
->
count
.
')'
;
}
return
$tag
;
...
...
@@ -212,7 +212,7 @@ function get_all_tags_for_user($query = null, $limit = null, $offset = null, $in
FROM
{
tag
}
t
LEFT JOIN
{
tag
}
t2 ON t2.id"
.
$typecast
.
" = SUBSTRING(t.tag, 7)
LEFT JOIN
{
institution
}
i ON i.name = t2.ownerid AND t2.resourcetype = 'institution'
WHERE t.
editedby
=? AND t.resourcetype IN ('artefact', 'view', 'collection', 'blocktype')
WHERE t.
ownertype='user' AND t.ownerid
=? AND t.resourcetype IN ('artefact', 'view', 'collection', 'blocktype')
GROUP BY 1, 3
-- Selecting tags used in institution section that you belong to
"
.
$userinstitutiontags
.
"
...
...
test/behat/features/settings/institution_tags.feature
View file @
4404d730
...
...
@@ -46,7 +46,7 @@ Scenario: Creating institution tags
And
I choose
"Journals"
in
"Create"
from main menu
And
I click on
"Mars journal"
And
I click on
"Edit"
in
"Mars party"
row
And I fill in select2 input "editpost_tags" with "One tag" and select "Institution One
:
One
tag
(0)
"
And I fill in select2 input "editpost_tags" with "One tag" and select "Institution One
:
One
tag"
And
I press
"Save entry"
Given
I choose
"Pages and collections"
in
"Create"
from main menu
...
...
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