First entry in wiki history leads to newest revision.
This commit is contained in:
parent
3103e567bc
commit
c13f420b66
|
@ -237,4 +237,9 @@ module ProjectsHelper
|
||||||
result.password = '*****' if result.password.present?
|
result.password = '*****' if result.password.present?
|
||||||
result
|
result
|
||||||
end
|
end
|
||||||
|
|
||||||
|
def project_wiki_path_with_version(proj, page, version, is_newest)
|
||||||
|
url_params = is_newest ? {} : { version_id: version }
|
||||||
|
project_wiki_path(proj, page, url_params)
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
|
@ -12,11 +12,12 @@
|
||||||
%th Last updated
|
%th Last updated
|
||||||
%th Format
|
%th Format
|
||||||
%tbody
|
%tbody
|
||||||
- @page.versions.each do |version|
|
- @page.versions.each_with_index do |version, index|
|
||||||
- commit = version
|
- commit = version
|
||||||
%tr
|
%tr
|
||||||
%td
|
%td
|
||||||
= link_to project_wiki_path(@project, @page, version_id: commit.id) do
|
= link_to project_wiki_path_with_version(@project, @page,
|
||||||
|
commit.id, index == 0) do
|
||||||
= truncate_sha(commit.id)
|
= truncate_sha(commit.id)
|
||||||
%td
|
%td
|
||||||
= commit.author.name
|
= commit.author.name
|
||||||
|
|
Loading…
Reference in New Issue