Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
D
diaspora
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Milan
diaspora
Commits
e1edef9f
Commit
e1edef9f
authored
Jan 13, 2012
by
Jonne Haß
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
lets see how all this markdown in the title looks. Attempt to fix #2395
parent
aed413b4
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
30 additions
and
0 deletions
+30
-0
app/helpers/posts_helper.rb
app/helpers/posts_helper.rb
+19
-0
app/views/posts/show.html.haml
app/views/posts/show.html.haml
+3
-0
config/locales/diaspora/en.yml
config/locales/diaspora/en.yml
+8
-0
No files found.
app/helpers/posts_helper.rb
0 → 100644
View file @
e1edef9f
# Copyright (c) 2012, Diaspora Inc. This file is
# licensed under the Affero General Public License version 3 or later. See
# the COPYRIGHT file.
module
PostsHelper
def
post_page_title
(
post
)
if
post
.
is_a?
(
Photo
)
I18n
.
t
"posts.show.photos_by"
,
:count
=>
1
,
:author
=>
post
.
status_message
.
author
.
name
elsif
post
.
is_a?
(
Reshare
)
I18n
.
t
"posts.show.reshare_by"
,
:author
=>
post
.
author
.
name
else
if
post
.
text
.
present?
truncate
(
post
.
text
(
:plain_text
=>
true
),
:length
=>
20
)
elsif
post
.
photos
.
present?
I18n
.
t
"posts.show.photos_by"
,
:count
=>
post
.
photos
.
size
,
:author
=>
post
.
author
.
name
end
end
end
end
app/views/posts/show.html.haml
View file @
e1edef9f
...
...
@@ -2,6 +2,9 @@
-# licensed under the Affero General Public License version 3 or later. See
-# the COPYRIGHT file.
-
content_for
:page_title
do
=
post_page_title
@post
.span-20.append-2.prepend-2.last
#main_stream
.stream.status_message_show
...
...
config/locales/diaspora/en.yml
View file @
e1edef9f
...
...
@@ -614,6 +614,14 @@ en:
destroy
:
"
Delete"
permalink
:
"
permalink"
not_found
:
"
Sorry,
we
couldn't
find
that
post."
photos_by
:
zero
:
"
No
photos
by
%{author}"
one
:
"
One
photo
by
%{author}"
two
:
"
Two
photos
by
%{author}"
few
:
"
%{count}
photos
by
%{author}"
many
:
"
%{count}
photos
by
%{author}"
other
:
"
%{count}
photos
by
%{author}"
reshare_by
:
"
Reshare
by
%{author}"
share_visibilites
:
update
:
...
...
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