From 0c3a0b6560912ad044a214dcfd74bca960a1fd24 Mon Sep 17 00:00:00 2001 From: George Andrinopoulos Date: Sun, 26 Mar 2017 23:16:55 +0300 Subject: Add keyboard edit shortcut for wiki --- app/views/projects/wikis/_main_links.html.haml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'app/views/projects') diff --git a/app/views/projects/wikis/_main_links.html.haml b/app/views/projects/wikis/_main_links.html.haml index 86178257af8..71bc33df463 100644 --- a/app/views/projects/wikis/_main_links.html.haml +++ b/app/views/projects/wikis/_main_links.html.haml @@ -5,5 +5,5 @@ = link_to namespace_project_wiki_history_path(@project.namespace, @project, @page), class: "btn" do Page history - if can?(current_user, :create_wiki, @project) && @page.latest? - = link_to namespace_project_wiki_edit_path(@project.namespace, @project, @page), class: "btn" do + = link_to namespace_project_wiki_edit_path(@project.namespace, @project, @page), class: "btn wiki-edit" do Edit -- cgit v1.2.1 From 8d0c7e8451e76fd7ef55b9e7a2bda3e4eada2dda Mon Sep 17 00:00:00 2001 From: George Andrinopoulos Date: Tue, 11 Apr 2017 20:26:01 +0300 Subject: Rename wiki-edit class to js-wiki-edit --- app/views/projects/wikis/_main_links.html.haml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'app/views/projects') diff --git a/app/views/projects/wikis/_main_links.html.haml b/app/views/projects/wikis/_main_links.html.haml index 71bc33df463..6a578dbf640 100644 --- a/app/views/projects/wikis/_main_links.html.haml +++ b/app/views/projects/wikis/_main_links.html.haml @@ -5,5 +5,5 @@ = link_to namespace_project_wiki_history_path(@project.namespace, @project, @page), class: "btn" do Page history - if can?(current_user, :create_wiki, @project) && @page.latest? - = link_to namespace_project_wiki_edit_path(@project.namespace, @project, @page), class: "btn wiki-edit" do + = link_to namespace_project_wiki_edit_path(@project.namespace, @project, @page), class: "btn js-wiki-edit" do Edit -- cgit v1.2.1