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.

empty.tmpl 2.9KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182
  1. {{template "base/head" .}}
  2. <div role="main" aria-label="{{.Title}}" class="page-content repository quickstart">
  3. {{template "repo/header" .}}
  4. <div class="ui container">
  5. <div class="ui grid">
  6. <div class="sixteen wide column content">
  7. {{template "base/alert" .}}
  8. {{if .Repository.IsArchived}}
  9. <div class="ui warning message tw-text-center">
  10. {{if .Repository.ArchivedUnix.IsZero}}
  11. {{ctx.Locale.Tr "repo.archive.title"}}
  12. {{else}}
  13. {{ctx.Locale.Tr "repo.archive.title_date" (DateTime "long" .Repository.ArchivedUnix)}}
  14. {{end}}
  15. </div>
  16. {{end}}
  17. {{if .Repository.IsBroken}}
  18. <div class="ui segment center">
  19. {{ctx.Locale.Tr "repo.broken_message"}}
  20. </div>
  21. {{else if .CanWriteCode}}
  22. <h4 class="ui top attached header">
  23. {{ctx.Locale.Tr "repo.quick_guide"}}
  24. </h4>
  25. <div class="ui attached guide table segment empty-repo-guide">
  26. <div class="item">
  27. <h3>{{ctx.Locale.Tr "repo.clone_this_repo"}} <small>{{ctx.Locale.Tr "repo.clone_helper" "http://git-scm.com/book/en/Git-Basics-Getting-a-Git-Repository"}}</small></h3>
  28. <div class="repo-button-row">
  29. {{if and .CanWriteCode (not .Repository.IsArchived)}}
  30. <a class="ui small button" href="{{.RepoLink}}/_new/{{.BranchName | PathEscapeSegments}}/">
  31. {{ctx.Locale.Tr "repo.editor.new_file"}}
  32. </a>
  33. {{if .RepositoryUploadEnabled}}
  34. <a class="ui small button" href="{{.RepoLink}}/_upload/{{.BranchName | PathEscapeSegments}}/">
  35. {{ctx.Locale.Tr "repo.editor.upload_file"}}
  36. </a>
  37. {{end}}
  38. {{end}}
  39. <div class="clone-panel ui action small input tw-flex-1">
  40. {{template "repo/clone_buttons" .}}
  41. </div>
  42. </div>
  43. </div>
  44. {{if not .Repository.IsArchived}}
  45. <div class="divider tw-my-0"></div>
  46. <div class="item">
  47. <h3>{{ctx.Locale.Tr "repo.create_new_repo_command"}}</h3>
  48. <div class="markup">
  49. <pre><code>touch README.md
  50. git init
  51. {{if ne .Repository.DefaultBranch "master"}}git checkout -b {{.Repository.DefaultBranch}}{{end}}
  52. git add README.md
  53. git commit -m "first commit"
  54. git remote add origin <span class="js-clone-url">{{$.CloneButtonOriginLink.HTTPS}}</span>
  55. git push -u origin {{.Repository.DefaultBranch}}</code></pre>
  56. </div>
  57. </div>
  58. <div class="divider"></div>
  59. <div class="item">
  60. <h3>{{ctx.Locale.Tr "repo.push_exist_repo"}}</h3>
  61. <div class="markup">
  62. <pre><code>git remote add origin <span class="js-clone-url">{{$.CloneButtonOriginLink.HTTPS}}</span>
  63. git push -u origin {{.Repository.DefaultBranch}}</code></pre>
  64. </div>
  65. </div>
  66. {{end}}
  67. {{else}}
  68. <div class="ui segment center">
  69. {{ctx.Locale.Tr "repo.empty_message"}}
  70. </div>
  71. {{end}}
  72. {{template "repo/clone_script" .}}
  73. </div>
  74. </div>
  75. </div>
  76. </div>
  77. </div>
  78. {{template "base/footer" .}}