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.

96 lines
3.5 KiB

  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. <div {{if not .HasError}}class="hide"{{end}} id="add-deploy-key-panel">
  49. <h4 class="ui top attached header">
  50. {{.i18n.Tr "repo.settings.add_deploy_key"}}
  51. </h4>
  52. <div class="ui attached segment">
  53. <form class="ui form" action="{{.Link}}" method="post">
  54. {{.CsrfTokenHtml}}
  55. <div class="field">
  56. {{.i18n.Tr "repo.settings.deploy_key_desc"}}
  57. </div>
  58. <div class="field {{if .Err_Title}}error{{end}}">
  59. <label for="title">{{.i18n.Tr "repo.settings.title"}}</label>
  60. <input id="title" name="title" value="{{.title}}" autofocus required>
  61. </div>
  62. <div class="field {{if .Err_Content}}error{{end}}">
  63. <label for="content">{{.i18n.Tr "repo.settings.deploy_key_content"}}</label>
  64. <textarea id="content" name="content" required>{{.content}}</textarea>
  65. </div>
  66. <button class="ui green button">
  67. {{.i18n.Tr "repo.settings.add_deploy_key"}}
  68. </button>
  69. </form>
  70. </div>
  71. </div>
  72. </div>
  73. </div>
  74. </div>
  75. </div>
  76. <div class="ui small basic delete modal">
  77. <div class="ui icon header">
  78. <i class="trash icon"></i>
  79. {{.i18n.Tr "repo.settings.deploy_key_deletion"}}
  80. </div>
  81. <div class="content">
  82. <p>{{.i18n.Tr "repo.settings.deploy_key_deletion_desc"}}</p>
  83. </div>
  84. <div class="actions">
  85. <div class="ui red basic inverted cancel button">
  86. <i class="remove icon"></i>
  87. {{.i18n.Tr "modal.no"}}
  88. </div>
  89. <div class="ui green basic inverted ok button">
  90. <i class="checkmark icon"></i>
  91. {{.i18n.Tr "modal.yes"}}
  92. </div>
  93. </div>
  94. </div>
  95. {{template "base/footer" .}}