]> source.dussan.org Git - redmine.git/commitdiff
Display API key in the sidebar, just below the API key heading.
authorJean-Philippe Lang <jp_lang@yahoo.fr>
Wed, 23 Dec 2009 18:13:24 +0000 (18:13 +0000)
committerJean-Philippe Lang <jp_lang@yahoo.fr>
Wed, 23 Dec 2009 18:13:24 +0000 (18:13 +0000)
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@3225 e93f8b46-1217-0410-a6f0-8f06a7374b81

app/views/my/_sidebar.rhtml
app/views/my/account.rhtml

index ee3c8abdc561d70d8e07ddcb1f0e87fc25031f7c..0a95acfea00e3bd9360f1803d06c0a0335a4b17a 100644 (file)
 
 <% if Setting.rest_api_enabled? %>
 <h4><%= l(:label_api_access_key) %></h4>
+<p>
+  <%= link_to_function(l(:button_show), "$('api-access-key').toggle();")%>
+  <pre id='api-access-key' class='autoscroll'><%= @user.api_key %></pre>
+</p>
+<%= javascript_tag("$('api-access-key').hide();") %>
 <p>
 <% if @user.api_token %>
 <%= l(:label_api_access_key_created_on, distance_of_time_in_words(Time.now, @user.api_token.created_on)) %>
index a3136f4cd84afc1c914be92e9984f637538a9e67..9bf45b33e4dfed04ee6f18c0e6f98d7d2260e75d 100644 (file)
 <% end %>
 </div>
 
-<% if Setting.rest_api_enabled? && @user.api_token %>
-<h3><%=l(:label_api_access_key) %></h3>
-<div class="box">
-  <p>
-    <%= link_to_function(l(:button_show), "$('api-access-key').show();")%>
-    <pre id='api-access-key'><%= @user.api_key %></pre>
-  </p>
-  <%= javascript_tag("$('api-access-key').hide();") %>
-</div>
-<% end %>
-
 </div>
 <% end %>