applications.tmpl 3.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485
  1. {{template "base/head" .}}
  2. <div class="user settings">
  3. <div class="ui container">
  4. <div class="ui grid">
  5. {{template "user/settings/navbar" .}}
  6. <div class="twelve wide column content">
  7. {{template "base/alert" .}}
  8. <h4 class="ui top attached header">
  9. {{.i18n.Tr "settings.manage_access_token"}}
  10. <div class="ui right">
  11. <div class="ui blue tiny show-panel button" data-panel="#add-access-token-panel">{{.i18n.Tr "settings.generate_new_token"}}</div>
  12. </div>
  13. </h4>
  14. <div class="ui attached segment">
  15. <div class="ui key list">
  16. <div class="item">
  17. {{.i18n.Tr "settings.tokens_desc"}}
  18. </div>
  19. {{range .Tokens}}
  20. <div class="item ui grid">
  21. <div class="one wide column">
  22. <i class="ssh-key-state-indicator fa fa-circle{{if .HasRecentActivity}} active invert poping up{{else}}-o{{end}}" {{if .HasRecentActivity}}data-content="{{$.i18n.Tr "settings.token_state_desc"}}" data-variation="inverted tiny"{{end}}></i>
  23. </div>
  24. <div class="one wide column">
  25. <i class="fa fa-send fa-2x left"></i>
  26. </div>
  27. <div class="eleven wide column">
  28. <strong>{{.Name}}</strong>
  29. <div class="activity meta">
  30. <i>{{$.i18n.Tr "settings.add_on"}} <span>{{DateFmtShort .Created}}</span> — <i class="octicon octicon-info"></i> {{if .HasUsed}}{{$.i18n.Tr "settings.last_used"}} <span>{{DateFmtShort .Updated}}</span>{{else}}{{$.i18n.Tr "settings.no_activity"}}{{end}}</i>
  31. </div>
  32. </div>
  33. <div class="two wide column">
  34. <button class="ui red tiny button delete-button" data-url="{{$.Link}}/delete" data-id="{{.ID}}">
  35. {{$.i18n.Tr "settings.delete_token"}}
  36. </button>
  37. </div>
  38. </div>
  39. {{end}}
  40. </div>
  41. </div>
  42. <br>
  43. <div {{if not .HasError}}class="hide"{{end}} id="add-access-token-panel">
  44. <h4 class="ui top attached header">
  45. {{.i18n.Tr "settings.generate_new_token"}}
  46. </h4>
  47. <div class="ui attached segment">
  48. <form class="ui form" action="{{.Link}}" method="post">
  49. {{.CsrfTokenHtml}}
  50. <p>{{.i18n.Tr "settings.new_token_desc"}}</p>
  51. <div class="field {{if .Err_Name}}error{{end}}">
  52. <label for="name">{{.i18n.Tr "settings.token_name"}}</label>
  53. <input id="name" name="name" value="{{.name}}" autofocus required>
  54. </div>
  55. <button class="ui green button">
  56. {{.i18n.Tr "settings.generate_token"}}
  57. </button>
  58. </form>
  59. </div>
  60. </div>
  61. </div>
  62. </div>
  63. </div>
  64. </div>
  65. <div class="ui small basic delete modal">
  66. <div class="ui icon header">
  67. <i class="trash icon"></i>
  68. {{.i18n.Tr "settings.access_token_deletion"}}
  69. </div>
  70. <div class="content">
  71. <p>{{.i18n.Tr "settings.access_token_deletion_desc"}}</p>
  72. </div>
  73. <div class="actions">
  74. <div class="ui red basic inverted cancel button">
  75. <i class="remove icon"></i>
  76. {{.i18n.Tr "modal.no"}}
  77. </div>
  78. <div class="ui green basic inverted ok button">
  79. <i class="checkmark icon"></i>
  80. {{.i18n.Tr "modal.yes"}}
  81. </div>
  82. </div>
  83. </div>
  84. {{template "base/footer" .}}