diff options
author | TM Lee <tm89lee@gmail.com> | 2017-03-15 08:44:05 +0300 |
---|---|---|
committer | TM Lee <tm89lee@gmail.com> | 2017-03-16 04:08:00 +0300 |
commit | 333e39d4923b285dce21c65f2923f132c36f5bf7 (patch) | |
tree | 7ec5ba7d5f3c5419560bc89b347cfc8b420a2c6c /app/views/projects/wikis | |
parent | 8fddde5b9f97feaa0c62f8c4a3e5441d20989165 (diff) |
[#28991] Wiki page edit button only appears on the current commit page
- Added method to check if the current Page version is the current latest version
- Conditionally checks for current version when showing Edit button
- Added feature specs for viewing project wiki page and expect edit button
- Added Changelog
Diffstat (limited to 'app/views/projects/wikis')
-rw-r--r-- | app/views/projects/wikis/_main_links.html.haml | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/app/views/projects/wikis/_main_links.html.haml b/app/views/projects/wikis/_main_links.html.haml index 763c2fea39b..5211ade1a5f 100644 --- a/app/views/projects/wikis/_main_links.html.haml +++ b/app/views/projects/wikis/_main_links.html.haml @@ -4,6 +4,6 @@ New Page = link_to namespace_project_wiki_history_path(@project.namespace, @project, @page), class: "btn" do Page History - - if can?(current_user, :create_wiki, @project) + - if can?(current_user, :create_wiki, @project) && @page.latest? = link_to namespace_project_wiki_edit_path(@project.namespace, @project, @page), class: "btn" do Edit |