deploy_keys.tmpl 3.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697
  1. {{template "base/head" .}}
  2. <div class="repository settings">
  3. {{template "repo/header" .}}
  4. <div class="ui container">
  5. <div class="ui grid">
  6. {{template "repo/settings/navbar" .}}
  7. <div class="twelve wide column content">
  8. {{template "base/alert" .}}
  9. <h4 class="ui top attached header">
  10. {{.i18n.Tr "repo.settings.deploy_keys"}}
  11. <div class="ui right">
  12. <div class="ui blue tiny show-panel button" data-panel="#add-deploy-key-panel">{{.i18n.Tr "repo.settings.add_deploy_key"}}</div>
  13. </div>
  14. </h4>
  15. <div class="ui attached segment">
  16. {{if .Deploykeys}}
  17. <div class="ui key list">
  18. {{range .Deploykeys}}
  19. <div class="item ui grid">
  20. <div class="one wide column">
  21. <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"{{end}}></i>
  22. </div>
  23. <div class="one wide column">
  24. <i class="mega-octicon octicon-key left"></i>
  25. </div>
  26. <div class="eleven wide column">
  27. <strong>{{.Name}}</strong>
  28. <div class="print meta">
  29. {{.Fingerprint}}
  30. </div>
  31. <div class="activity meta">
  32. <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>
  33. </div>
  34. </div>
  35. <div class="two wide column">
  36. <button class="ui red tiny button delete-button" data-url="{{$.Link}}/delete" data-id="{{.ID}}">
  37. {{$.i18n.Tr "settings.delete_key"}}
  38. </button>
  39. </div>
  40. </div>
  41. {{end}}
  42. </div>
  43. {{else}}
  44. {{.i18n.Tr "repo.settings.no_deploy_keys"}}
  45. {{end}}
  46. </div>
  47. <br>
  48. <p>{{.i18n.Tr "repo.settings.deploy_keys_helper" AppSubUrl "/user/settings/ssh" | Safe}}</p>
  49. <div {{if not .HasError}}class="hide"{{end}} id="add-deploy-key-panel">
  50. <h4 class="ui top attached header">
  51. {{.i18n.Tr "repo.settings.add_deploy_key"}}
  52. </h4>
  53. <div class="ui attached segment">
  54. <form class="ui form" action="{{.Link}}" method="post">
  55. {{.CsrfTokenHtml}}
  56. <div class="field">
  57. {{.i18n.Tr "repo.settings.deploy_key_desc"}}
  58. </div>
  59. <div class="field {{if .Err_Title}}error{{end}}">
  60. <label for="title">{{.i18n.Tr "repo.settings.title"}}</label>
  61. <input id="title" name="title" value="{{.title}}" autofocus required>
  62. </div>
  63. <div class="field {{if .Err_Content}}error{{end}}">
  64. <label for="content">{{.i18n.Tr "repo.settings.deploy_key_content"}}</label>
  65. <textarea id="content" name="content" required>{{.content}}</textarea>
  66. </div>
  67. <button class="ui green button">
  68. {{.i18n.Tr "repo.settings.add_deploy_key"}}
  69. </button>
  70. </form>
  71. </div>
  72. </div>
  73. </div>
  74. </div>
  75. </div>
  76. </div>
  77. <div class="ui small basic delete modal">
  78. <div class="ui icon header">
  79. <i class="trash icon"></i>
  80. {{.i18n.Tr "repo.settings.deploy_key_deletion"}}
  81. </div>
  82. <div class="content">
  83. <p>{{.i18n.Tr "repo.settings.deploy_key_deletion_desc"}}</p>
  84. </div>
  85. <div class="actions">
  86. <div class="ui red basic inverted cancel button">
  87. <i class="remove icon"></i>
  88. {{.i18n.Tr "modal.no"}}
  89. </div>
  90. <div class="ui green basic inverted ok button">
  91. <i class="checkmark icon"></i>
  92. {{.i18n.Tr "modal.yes"}}
  93. </div>
  94. </div>
  95. </div>
  96. {{template "base/footer" .}}