sshkeys.tmpl 3.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384
  1. {{template "base/head" .}}
  2. <div class="user settings sshkeys">
  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_ssh_keys"}}
  10. <div class="ui right">
  11. <div class="ui blue tiny show-panel button" data-panel="#add-ssh-key-panel">{{.i18n.Tr "settings.add_key"}}</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.ssh_desc"}}
  18. </div>
  19. {{range .Keys}}
  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.key_state_desc"}}" data-variation="inverted tiny"{{end}}></i>
  23. </div>
  24. <div class="one wide column">
  25. <i class="mega-octicon octicon-key left"></i>
  26. </div>
  27. <div class="eleven wide column">
  28. <strong>{{.Name}}</strong>
  29. <div class="print meta">
  30. {{.Fingerprint}}
  31. </div>
  32. <div class="activity meta">
  33. <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>
  34. </div>
  35. </div>
  36. <div class="two wide column">
  37. <button class="ui red tiny button delete-button" data-url="{{$.Link}}/delete" data-id="{{.ID}}">
  38. {{$.i18n.Tr "settings.delete_key"}}
  39. </button>
  40. </div>
  41. </div>
  42. {{end}}
  43. </div>
  44. </div>
  45. <br>
  46. <p>{{.i18n.Tr "settings.ssh_helper" "https://help.github.com/articles/generating-ssh-keys" "https://help.github.com/ssh-issues/" | Str2html}}</p>
  47. <div {{if not .HasError}}class="hide"{{end}} id="add-ssh-key-panel">
  48. <h4 class="ui top attached header">
  49. {{.i18n.Tr "settings.add_new_key"}}
  50. </h4>
  51. <div class="ui attached segment">
  52. <form class="ui form" action="{{.Link}}" method="post">
  53. {{.CsrfTokenHtml}}
  54. <div class="field {{if .Err_Title}}error{{end}}">
  55. <label for="title">{{.i18n.Tr "settings.key_name"}}</label>
  56. <input id="title" name="title" value="{{.title}}" autofocus required>
  57. </div>
  58. <div class="field {{if .Err_Content}}error{{end}}">
  59. <label for="content">{{.i18n.Tr "settings.key_content"}}</label>
  60. <textarea id="content" name="content" required>{{.content}}</textarea>
  61. </div>
  62. <button class="ui green button">
  63. {{.i18n.Tr "settings.add_key"}}
  64. </button>
  65. </form>
  66. </div>
  67. </div>
  68. </div>
  69. </div>
  70. </div>
  71. </div>
  72. <div class="ui small basic delete modal">
  73. <div class="ui icon header">
  74. <i class="trash icon"></i>
  75. {{.i18n.Tr "settings.ssh_key_deletion"}}
  76. </div>
  77. <div class="content">
  78. <p>{{.i18n.Tr "settings.ssh_key_deletion_desc"}}</p>
  79. </div>
  80. {{template "base/delete_modal_actions" .}}
  81. </div>
  82. {{template "base/footer" .}}