/templates/webapps/galaxy/user/api_keys.mako

https://bitbucket.org/cistrome/cistrome-harvard/ · Mako · 45 lines · 42 code · 3 blank · 0 comment · 2 complexity · 1095c553fc899bf061ab7cc7b935bd35 MD5 · raw file

  1. <%inherit file="/base.mako"/>
  2. <%namespace file="/message.mako" import="render_msg" />
  3. <br/><br/>
  4. <ul class="manage-table-actions">
  5. <li>
  6. <a class="action-button" href="${h.url_for( controller='user', action='index', cntrller=cntrller )}">User preferences</a>
  7. </li>
  8. </ul>
  9. %if message:
  10. ${render_msg( message, status )}
  11. %endif
  12. <div class="toolForm">
  13. <div class="toolFormTitle">Web API Key</div>
  14. <div class="toolFormBody">
  15. <form name="user_api_keys" id="user_api_keys" action="${h.url_for( controller='user', action='api_keys', cntrller=cntrller )}" method="post" >
  16. <div class="form-row">
  17. <label>Current API key:</label>
  18. %if user.api_keys:
  19. ${user.api_keys[0].key}
  20. %else:
  21. none set
  22. %endif
  23. </div>
  24. <div class="form-row">
  25. <input type="submit" name="new_api_key_button" value="Generate a new key now"/>
  26. %if user.api_keys:
  27. (invalidates old key)
  28. %endif
  29. <div class="toolParamHelp" style="clear: both;">
  30. <%
  31. if trans.webapp.name == 'galaxy':
  32. webapp_str = 'Galaxy'
  33. else:
  34. webapp_str = 'the Tool Shed'
  35. %>
  36. An API key will allow you to access ${webapp_str} via its web API. Please note that <strong>this key acts as an alternate means
  37. to access your account and should be treated with the same care as your login password</strong>.
  38. </div>
  39. </div>
  40. </form>
  41. </div>
  42. </div>