You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

_sidebar.html.erb 1.2KB

123456789101112131415161718192021222324252627282930313233343536
  1. <h3><%=l(:label_my_account)%></h3>
  2. <p><%=l(:field_login)%>: <strong><%= link_to_user(@user, :format => :username) %></strong><br />
  3. <%=l(:field_created_on)%>: <%= format_time(@user.created_on) %></p>
  4. <% if @user.own_account_deletable? %>
  5. <p><%= link_to(l(:button_delete_my_account), {:controller => 'my', :action => 'destroy'}, :class => 'icon icon-del') %></p>
  6. <% end %>
  7. <h4><%= l(:label_feeds_access_key) %></h4>
  8. <p>
  9. <% if @user.rss_token %>
  10. <%= l(:label_feeds_access_key_created_on, distance_of_time_in_words(Time.now, @user.rss_token.created_on)) %>
  11. <% else %>
  12. <%= l(:label_missing_feeds_access_key) %>
  13. <% end %>
  14. (<%= link_to l(:button_reset), my_rss_key_path, :method => :post %>)
  15. </p>
  16. <% if Setting.rest_api_enabled? %>
  17. <h4><%= l(:label_api_access_key) %></h4>
  18. <div>
  19. <%= link_to l(:button_show), my_api_key_path, :remote => true %>
  20. <pre id='api-access-key' class='autoscroll'></pre>
  21. </div>
  22. <%= javascript_tag("$('#api-access-key').hide();") %>
  23. <p>
  24. <% if @user.api_token %>
  25. <%= l(:label_api_access_key_created_on, distance_of_time_in_words(Time.now, @user.api_token.created_on)) %>
  26. <% else %>
  27. <%= l(:label_missing_api_access_key) %>
  28. <% end %>
  29. (<%= link_to l(:button_reset), my_api_key_path, :method => :post %>)
  30. </p>
  31. <% end %>