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
Milan
diaspora
Commits
aefcfc7b
Commit
aefcfc7b
authored
Mar 11, 2014
by
Steffen van Bergerem
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Show hovercards in the notification drop-down for users on the same pod
parent
766c6f0a
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
6 additions
and
1 deletion
+6
-1
Changelog.md
Changelog.md
+1
-0
app/helpers/people_helper.rb
app/helpers/people_helper.rb
+1
-1
spec/helpers/people_helper_spec.rb
spec/helpers/people_helper_spec.rb
+4
-0
No files found.
Changelog.md
View file @
aefcfc7b
...
...
@@ -20,6 +20,7 @@
*
Fix active user statistics by saving a last seen timestamp for users
[
#4734
](
https://github.com/diaspora/diaspora/issues/4734
)
*
Render HTML in atom user feed
[
#4835
](
https://github.com/diaspora/diaspora/pull/4835
)
*
Fix plaintext mode of Mentionable
[
#4294
](
https://github.com/diaspora/diaspora/issues/4294
)
*
Show hovercards in the notification drop-down for users on the same pod
[
#4843
](
https://github.com/diaspora/diaspora/pull/4843
)
## Features
*
You can report a single post by clicking the correct icon in the controler section
[
#4517
](
https://github.com/diaspora/diaspora/pull/4517
)
...
...
app/helpers/people_helper.rb
View file @
aefcfc7b
...
...
@@ -36,7 +36,7 @@ module PeopleHelper
opts
[
:class
]
||=
""
opts
[
:class
]
<<
" self"
if
defined?
(
user_signed_in?
)
&&
user_signed_in?
&&
current_user
.
person
==
person
remote_or_hovercard_link
=
Rails
.
application
.
routes
.
url_helpers
.
person_path
(
person
).
html_safe
"<a data-hovercard='
#{
remote_or_hovercard_link
}
'
#{
person_href
(
person
)
}
class='
#{
opts
[
:class
]
}
'
#{
(
"target="
+
opts
[
:target
])
if
opts
[
:target
]
}
>
#{
h
(
person
.
name
)
}
</a>"
.
html_safe
"<a data-hovercard='
#{
remote_or_hovercard_link
}
'
href='
#{
remote_or_hovercard_link
}
'
class='
#{
opts
[
:class
]
}
'
#{
(
"target="
+
opts
[
:target
])
if
opts
[
:target
]
}
>
#{
h
(
person
.
name
)
}
</a>"
.
html_safe
end
def
person_image_tag
(
person
,
size
=
:thumb_small
)
...
...
spec/helpers/people_helper_spec.rb
View file @
aefcfc7b
...
...
@@ -58,6 +58,10 @@ describe PeopleHelper do
@person
.
profile
.
last_name
=
"I'm <h1>Evil"
person_link
(
@person
).
should_not
include
(
"<h1>"
)
end
it
'links by id for a local user'
do
person_link
(
@user
.
person
).
should
include
"href='
#{
person_path
(
@user
.
person
)
}
'"
end
end
describe
"#person_href"
do
...
...
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