From: Jean-Philippe Lang
Date: Wed, 23 Dec 2009 18:13:24 +0000 (+0000)
Subject: Display API key in the sidebar, just below the API key heading.
X-Git-Tag: 0.9.0~37
X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=e26eeef837f15de2d8f139ca838980eaa9de4da0;p=redmine.git
Display API key in the sidebar, just below the API key heading.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@3225 e93f8b46-1217-0410-a6f0-8f06a7374b81
---
diff --git a/app/views/my/_sidebar.rhtml b/app/views/my/_sidebar.rhtml
index ee3c8abdc..0a95acfea 100644
--- a/app/views/my/_sidebar.rhtml
+++ b/app/views/my/_sidebar.rhtml
@@ -17,6 +17,11 @@
<% if Setting.rest_api_enabled? %>
<%= l(:label_api_access_key) %>
+
+ <%= link_to_function(l(:button_show), "$('api-access-key').toggle();")%>
+
<%= @user.api_key %>
+
+<%= javascript_tag("$('api-access-key').hide();") %>
<% if @user.api_token %>
<%= l(:label_api_access_key_created_on, distance_of_time_in_words(Time.now, @user.api_token.created_on)) %>
diff --git a/app/views/my/account.rhtml b/app/views/my/account.rhtml
index a3136f4cd..9bf45b33e 100644
--- a/app/views/my/account.rhtml
+++ b/app/views/my/account.rhtml
@@ -52,17 +52,6 @@
<% end %>
-<% if Setting.rest_api_enabled? && @user.api_token %>
-
<%=l(:label_api_access_key) %>
-
-
- <%= link_to_function(l(:button_show), "$('api-access-key').show();")%>
-
<%= @user.api_key %>
-
- <%= javascript_tag("$('api-access-key').hide();") %>
-
-<% end %>
-
<% end %>