Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Boxiang Sun
gitlab-ce
Commits
0e387919
Commit
0e387919
authored
Aug 16, 2013
by
Dmitriy Zaporozhets
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixed wrong last-edit time for wiki
parent
ffa234bc
Changes
6
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
17 additions
and
29 deletions
+17
-29
app/models/wiki_page.rb
app/models/wiki_page.rb
+4
-0
app/views/projects/show.html.haml
app/views/projects/show.html.haml
+0
-1
app/views/projects/wikis/_main_links.html.haml
app/views/projects/wikis/_main_links.html.haml
+2
-2
app/views/projects/wikis/history.html.haml
app/views/projects/wikis/history.html.haml
+2
-3
app/views/projects/wikis/pages.html.haml
app/views/projects/wikis/pages.html.haml
+8
-22
app/views/projects/wikis/show.html.haml
app/views/projects/wikis/show.html.haml
+1
-1
No files found.
app/models/wiki_page.rb
View file @
0e387919
...
...
@@ -89,6 +89,10 @@ class WikiPage
@page
.
versions
.
map
{
|
v
|
Commit
.
new
(
Gitlab
::
Git
::
Commit
.
new
(
v
))
}
end
def
commit
versions
.
first
end
# Returns the Date that this latest version was
# created on.
def
created_at
...
...
app/views/projects/show.html.haml
View file @
0e387919
...
...
@@ -44,4 +44,3 @@
%hr
=
link_to
@project
.
gitlab_ci_service
.
builds_path
do
=
image_tag
@project
.
gitlab_ci_service
.
status_img_path
,
alt:
"build status"
app/views/projects/wikis/_main_links.html.haml
View file @
0e387919
%span
.pull-right
-
if
(
@wiki
&&
@wiki
.
persisted?
)
=
link_to
history_project_wiki_path
(
@project
,
@wiki
),
class:
"btn
btn-small
grouped"
do
=
link_to
history_project_wiki_path
(
@project
,
@wiki
),
class:
"btn grouped"
do
Page History
-
if
can?
(
current_user
,
:write_wiki
,
@project
)
=
link_to
edit_project_wiki_path
(
@project
,
@wiki
),
class:
"btn
btn-small
grouped"
do
=
link_to
edit_project_wiki_path
(
@project
,
@wiki
),
class:
"btn grouped"
do
%i
.icon-edit
Edit
app/views/projects/wikis/history.html.haml
View file @
0e387919
=
render
'nav'
%h3
.page-title
%span
.light
History for
=
@wiki
.
title
.
titleize
=
render
'main_links'
%br
=
link_to
@wiki
.
title
.
titleize
,
project_wiki_path
(
@project
,
@wiki
)
%table
%thead
%tr
...
...
app/views/projects/wikis/pages.html.haml
View file @
0e387919
=
render
'nav'
%h3
.page-title
All Pages
=
render
'main_links'
%br
%table
%thead
%tr
%th
Title
%th
Format
%th
Last updated
%th
Updated by
%tbody
%ul
.bordered-list
-
@wiki_pages
.
each
do
|
wiki_page
|
%tr
%td
%strong
=
link_to
wiki_page
.
title
.
titleize
,
project_wiki_path
(
@project
,
wiki_page
)
%td
%strong
=
wiki_page
.
format
%td
=
wiki_page
.
created_at
.
to_s
(
:short
)
do
(
#{
time_ago_in_words
(
wiki_page
.
created_at
)
}
ago)
%td
=
commit_author_link
(
wiki_page
.
version
,
avatar:
true
,
size:
24
)
%li
%h4
=
link_to
wiki_page
.
title
.
titleize
,
project_wiki_path
(
@project
,
wiki_page
)
%small
(
#{
wiki_page
.
format
}
)
.pull-right
%small
Last edited
#{
time_ago_in_words
(
wiki_page
.
commit
.
created_at
)
}
ago
app/views/projects/wikis/show.html.haml
View file @
0e387919
...
...
@@ -12,4 +12,4 @@
=
preserve
do
=
render_wiki_content
(
@wiki
)
%p
.time
Last edited by
#{
commit_author_link
(
@wiki
.
version
,
avatar:
true
,
size:
16
)
}
#{
time_ago_in_words
@wiki
.
created_at
}
ago
%p
.time
Last edited by
#{
commit_author_link
(
@wiki
.
commit
,
avatar:
true
,
size:
16
)
}
#{
time_ago_in_words
@wiki
.
commit
.
created_at
}
ago
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