Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
Gutyán Gábor
/
circlestack
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Members
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
88a19949
authored
Jul 25, 2014
by
Bach Dániel
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
dashboard: display full name in autocomplete
parent
a4b51d64
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
19 additions
and
0 deletions
+19
-0
circle/dashboard/autocomplete_light_registry.py
+12
-0
circle/dashboard/templates/base.html
+7
-0
No files found.
circle/dashboard/autocomplete_light_registry.py
View file @
88a19949
...
...
@@ -10,6 +10,18 @@ class AclUserAutocomplete(autocomplete_light.AutocompleteGenericBase):
(
'^name'
,
'groupprofile__org_id'
),
)
autocomplete_js_attributes
=
{
'placeholder'
:
_
(
"Name of group or user"
)}
choice_html_format
=
u'<span data-value="
%
s"><span>
%
s</span>
%
s</span>'
def
choice_html
(
self
,
choice
):
try
:
name
=
choice
.
get_full_name
()
except
AttributeError
:
name
=
_
(
'group'
)
if
name
:
name
=
u'(
%
s)'
%
name
return
self
.
choice_html_format
%
(
self
.
choice_value
(
choice
),
self
.
choice_label
(
choice
),
name
)
def
choices_for_request
(
self
):
user
=
self
.
request
.
user
...
...
circle/dashboard/templates/base.html
View file @
88a19949
...
...
@@ -80,4 +80,11 @@
{% block extra_etc %}
{% endblock %}
<script>
yourlabs
.
TextWidget
.
prototype
.
getValue
=
function
(
choice
)
{
return
choice
.
children
().
html
();
}
</script>
</html>
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