deploy_keys.tmpl 3.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293
  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 {{if .Err_Title}}error{{end}}">
  56. <label for="title">{{.i18n.Tr "repo.settings.title"}}</label>
  57. <input id="title" name="title" value="{{.title}}" autofocus required>
  58. </div>
  59. <div class="field {{if .Err_Content}}error{{end}}">
  60. <label for="content">{{.i18n.Tr "repo.settings.deploy_key_content"}}</label>
  61. <textarea id="content" name="content" required>{{.content}}</textarea>
  62. </div>
  63. <button class="ui green button">
  64. {{.i18n.Tr "repo.settings.add_deploy_key"}}
  65. </button>
  66. </form>
  67. </div>
  68. </div>
  69. </div>
  70. </div>
  71. </div>
  72. </div>
  73. <div class="ui small basic delete modal">
  74. <div class="ui icon header">
  75. <i class="trash icon"></i>
  76. {{.i18n.Tr "repo.settings.deploy_key_deletion"}}
  77. </div>
  78. <div class="content">
  79. <p>{{.i18n.Tr "repo.settings.deploy_key_deletion_desc"}}</p>
  80. </div>
  81. <div class="actions">
  82. <div class="ui red basic inverted cancel button">
  83. <i class="remove icon"></i>
  84. {{.i18n.Tr "modal.no"}}
  85. </div>
  86. <div class="ui green basic inverted ok button">
  87. <i class="checkmark icon"></i>
  88. {{.i18n.Tr "modal.yes"}}
  89. </div>
  90. </div>
  91. </div>
  92. {{template "base/footer" .}}