HTML · 2946 bytes Raw Blame History
1 {{ define "page" -}}
2 <section class="shithub-org-settings-page">
3 <header class="shithub-org-pagehead shithub-org-settings-pagehead">
4 <div class="shithub-org-pagehead-inner">
5 <a class="shithub-org-pagehead-title" href="/{{ .Org.Slug }}">
6 <img src="{{ .AvatarURL }}" alt="" width="30" height="30">
7 <span>{{ if .Org.DisplayName }}{{ .Org.DisplayName }}{{ else }}{{ .Org.Slug }}{{ end }}</span>
8 </a>
9 </div>
10 </header>
11
12 <div class="shithub-org-settings-layout">
13 {{ template "org-settings-nav" . }}
14
15 <div class="shithub-org-settings-main">
16 {{ with .Error }}<p class="shithub-flash shithub-flash-error" role="alert">{{ . }}</p>{{ end }}
17 {{ with .Notice }}<p class="shithub-flash shithub-flash-success" role="status">{{ . }}</p>{{ end }}
18
19 <div class="Subhead">
20 <h2 class="Subhead-heading Subhead-heading--large">Import repositories</h2>
21 </div>
22
23 <form method="POST" action="/organizations/{{ .Org.Slug }}/settings/import" class="shithub-org-settings-form shithub-org-import-form" novalidate>
24 <input type="hidden" name="csrf_token" value="{{ .CSRFToken }}">
25 <label>
26 <span>GitHub organization</span>
27 <input type="text" name="github_org" value="{{ .Form.GitHubOrg }}" placeholder="github-org" required autocomplete="off">
28 </label>
29 <label>
30 <span>GitHub token <small>(optional)</small></span>
31 <input type="password" name="github_token" placeholder="Required for private repositories" autocomplete="off">
32 </label>
33 {{ if not .SecretBoxOK }}
34 <p class="shithub-flash shithub-flash-error" role="status">Token-backed imports are disabled until the server secret key is configured.</p>
35 {{ end }}
36 <p class="shithub-empty-note">Public imports need no token. Token-backed imports include private repositories visible to that token and keep them private on shithub.</p>
37 <button type="submit" class="shithub-button shithub-button-primary">Start import</button>
38 </form>
39
40 <section class="shithub-org-settings-section" aria-labelledby="org-import-history-heading">
41 <div class="Subhead Subhead--spacious border-bottom-0 mb-0 tmp-mb-0">
42 <h2 id="org-import-history-heading" class="Subhead-heading">Recent imports</h2>
43 </div>
44 <div class="shithub-org-import-history">
45 {{ range .Imports }}
46 <a href="/organizations/{{ $.Org.Slug }}/imports/{{ .ID }}" class="shithub-org-import-history-row">
47 <span>{{ .SourceOrg }}</span>
48 <span class="shithub-org-import-status is-{{ .Status }}">{{ .Status }}</span>
49 <span>{{ relativeTime .CreatedAt.Time }}</span>
50 </a>
51 {{ else }}
52 <p class="shithub-empty-note">No imports have been started for this organization.</p>
53 {{ end }}
54 </div>
55 </section>
56 </div>
57 </div>
58 </section>
59 {{- end }}