Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
Q
Qpixel
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Terraform modules
Analyze
Contributor analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
EIP
Answers
Qpixel
Commits
d8d3c892
Unverified
Commit
d8d3c892
authored
Aug 28, 2020
by
ArtOfCode
Committed by
GitHub
Aug 28, 2020
Browse files
Options
Downloads
Plain Diff
Merge pull request #151 from galegosimpatico/edit-time-20200826
parents
b7d87d7d
9bab1738
No related branches found
No related tags found
No related merge requests found
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
app/views/posts/_expanded.html.erb
+26
-10
26 additions, 10 deletions
app/views/posts/_expanded.html.erb
config/locales/time.en_abbrev.yml
+3
-3
3 additions, 3 deletions
config/locales/time.en_abbrev.yml
with
29 additions
and
13 deletions
app/views/posts/_expanded.html.erb
+
26
−
10
View file @
d8d3c892
...
@@ -101,6 +101,9 @@
...
@@ -101,6 +101,9 @@
<div
class=
"post--body"
>
<div
class=
"post--body"
>
<%=
raw
(
sanitize
(
post
.
body
,
scrubber:
scrubber
))
%>
<%=
raw
(
sanitize
(
post
.
body
,
scrubber:
scrubber
))
%>
<%
been_edited
=
post
.
last_activity_by_id
!=
nil
%>
<%
if
(
been_edited
)
then
last_edited_by_self
=
post
.
user_id
==
post
.
last_activity_by_id
end
%>
<div
class=
"post--meta has-margin-bottom-4"
>
<div
class=
"post--meta has-margin-bottom-4"
>
<%=
render
'users/post_usercard'
,
post:
post
%>
<%=
render
'users/post_usercard'
,
post:
post
%>
<%
if
has_tags
%>
<%
if
has_tags
%>
...
@@ -118,16 +121,29 @@
...
@@ -118,16 +121,29 @@
<%
end
%>
<%
end
%>
</div>
</div>
<%
end
%>
<%
end
%>
<%
if
post
.
license
.
present?
||
been_edited
%>
<div
class=
"post--licensing--edited has-margin-left-2"
>
<%
if
post
.
license
.
present?
%>
<%
if
post
.
license
.
present?
%>
<div
class=
"post--licensing has-margin-left-2"
>
<i
class=
"fas fa-balance-scale"
title=
"License"
></i>
<i
class=
"fas fa-balance-scale"
title=
"License"
></i>
<%=
link_to
post
.
license
.
name
,
post
.
license
.
url
%>
<%=
link_to
post
.
license
.
name
,
post
.
license
.
url
%>
<%
end
%>
<%
if
post
.
license
.
present?
&&
been_edited
%>
<%
end
%>
<%
if
been_edited
%>
<i
class=
"fa fa-pencil-alt"
title=
"Edited"
></i>
<span
class=
"has-color-tertiary"
>
<%=
time_ago_in_words
(
post
.
last_activity
,
locale: :en_abbrev
)
%>
ago
<%
if
!
last_edited_by_self
%>
by
<%=
link_to
post
.
last_activity_by
.
username
,
user_path
(
post
.
last_activity_by_id
)
%>
<%
end
%>
</span>
<%
end
%>
</div>
</div>
<%
end
%>
<%
end
%>
</div>
</div>
<div
class=
"has-clear-clear"
></div>
<div
class=
"has-clear-clear"
></div>
<div
class=
"post--actions"
>
<div
class=
"post--actions"
>
<div
class=
"tools"
>
<div
class=
"tools"
>
<%=
link_to
generic_share_link
(
post
),
class:
'tools--item'
do
%>
<%=
link_to
generic_share_link
(
post
),
class:
'tools--item'
do
%>
...
...
This diff is collapsed.
Click to expand it.
config/locales/
en-ABBREV
.yml
→
config/locales/
time.en_abbrev
.yml
+
3
−
3
View file @
d8d3c892
en
-ABBREV
:
en
_abbrev
:
datetime
:
datetime
:
distance_in_words
:
distance_in_words
:
x_seconds
:
'
%{count}s'
x_seconds
:
'
%{count}s'
x_minutes
:
'
%{count}m'
x_minutes
:
'
%{count}m'
about_x_hours
:
'
%{count}h'
about_x_hours
:
'
~
%{count}h'
x_hours
:
'
%{count}h'
x_hours
:
'
%{count}h'
x_days
:
'
%{count}d'
x_days
:
'
%{count}d'
x_weeks
:
'
%{count}w'
x_weeks
:
'
%{count}w'
about_x_months
:
'
%{count}mo'
about_x_months
:
'
~
%{count}mo'
x_months
:
'
%{count}mo'
x_months
:
'
%{count}mo'
x_years
:
'
%{count}y'
x_years
:
'
%{count}y'
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
sign in
to comment