Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
O
our_own_cloud_project
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Model registry
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
die_coolen_jungs
our_own_cloud_project
Commits
0c043561
Commit
0c043561
authored
13 years ago
by
Michael Gapczynski
Browse files
Options
Downloads
Patches
Plain Diff
Support translations for modified date column in files
parent
04eebccc
Branches
Branches containing commit
No related tags found
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
files/js/files.js
+10
-10
10 additions, 10 deletions
files/js/files.js
with
10 additions
and
10 deletions
files/js/files.js
+
10
−
10
View file @
0c043561
...
...
@@ -398,19 +398,19 @@ function relative_modified_date(timestamp) {
var
diffdays
=
Math
.
round
(
diffhours
/
24
);
var
diffmonths
=
Math
.
round
(
diffdays
/
31
);
var
diffyears
=
Math
.
round
(
diffdays
/
365
);
if
(
timediff
<
60
)
{
return
'
seconds ago
'
;
}
else
if
(
timediff
<
120
)
{
return
'
1 minute ago
'
;
}
else
if
(
timediff
<
3600
)
{
return
diffminutes
+
'
minutes ago
'
;
}
if
(
timediff
<
60
)
{
return
t
(
'
files
'
,
'
seconds ago
'
)
;
}
else
if
(
timediff
<
120
)
{
return
'
1
'
+
t
(
'
files
'
,
'
minute ago
'
)
;
}
else
if
(
timediff
<
3600
)
{
return
diffminutes
+
'
'
+
t
(
'
files
'
,
'
minutes ago
'
)
;
}
//else if($timediff < 7200) { return '1 hour ago'; }
//else if($timediff < 86400) { return $diffhours.' hours ago'; }
else
if
(
timediff
<
86400
)
{
return
'
today
'
;
}
else
if
(
timediff
<
172800
)
{
return
'
yesterday
'
;
}
else
if
(
timediff
<
2678400
)
{
return
diffdays
+
'
days ago
'
;
}
else
if
(
timediff
<
5184000
)
{
return
'
last month
'
;
}
else
if
(
timediff
<
86400
)
{
return
t
(
'
files
'
,
'
today
'
)
;
}
else
if
(
timediff
<
172800
)
{
return
t
(
'
files
'
,
'
yesterday
'
)
;
}
else
if
(
timediff
<
2678400
)
{
return
diffdays
+
'
'
+
t
(
'
files
'
,
'
days ago
'
)
;
}
else
if
(
timediff
<
5184000
)
{
return
t
(
'
files
'
,
'
last month
'
)
;
}
//else if($timediff < 31556926) { return $diffmonths.' months ago'; }
else
if
(
timediff
<
31556926
)
{
return
'
months ago
'
;
}
else
if
(
timediff
<
63113852
)
{
return
'
last year
'
;
}
else
{
return
diffyears
+
'
years ago
'
;
}
else
if
(
timediff
<
31556926
)
{
return
t
(
'
files
'
,
'
months ago
'
)
;
}
else
if
(
timediff
<
63113852
)
{
return
t
(
'
files
'
,
'
last year
'
)
;
}
else
{
return
diffyears
+
'
'
+
t
(
'
files
'
,
'
years ago
'
)
;
}
}
function
getMimeIcon
(
mime
){
...
...
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
register
or
sign in
to comment