aboutsummaryrefslogtreecommitdiff
blob: 5bbe164e87cac0ffc44f0043c92e94e4317349d9 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
{{define "maintainerheader"}}
    <div class="kk-header-container">
        <div class="container">
            <div class="row">
                <div class="col-12">

                    <div class="row mt-3">
                        <div class="col-md-5">
                            <h1 class="stick-top kk-package-title" id="package-title">
                                <small class="kk-package-cat">
                                    {{- if eq .Maintainer.Type "project" -}}
                                        Gentoo Project
                                    {{- else if contains .Maintainer.Email "@gentoo.org" -}}
                                        Gentoo Developer
                                    {{- else if ne .Maintainer.Email "" -}}
                                        Proxied Maintainer
                                    {{- end -}}</small>
                                <div>
                                    <svg height="32" class="octicon octicon-person right left kk-package-icon" aria-label="Package icon" viewBox="0 0 16 16" version="1.1" width="32" role="img"><path fill-rule="evenodd" d="M10.5 5a2.5 2.5 0 11-5 0 2.5 2.5 0 015 0zm.061 3.073a4 4 0 10-5.123 0 6.004 6.004 0 00-3.431 5.142.75.75 0 001.498.07 4.5 4.5 0 018.99 0 .75.75 0 101.498-.07 6.005 6.005 0 00-3.432-5.142z"></path></svg>
                                    <div class="kk-package-name">{{if .Maintainer.Name}}{{.Maintainer.Name}}{{else if .Maintainer.Email}}{{.Maintainer.Email}}{{else}}Maintainer Needed{{end}}</div>
                                </div>
                            </h1>
                        </div>
                        <div class="col-md-7">
                            <p class="lead kk-package-maindesc">
                                <!-- TODO -->
                            </p>
                        </div>

                        {{- $security_bugs := 0 -}}
                        {{- $non_security_bugs := 0 -}}
                        {{- range .Packages -}}
                            {{range .Bugs}}
                                {{if eq .Component "Vulnerabilities"}}
                                    {{$security_bugs = (add $security_bugs 1)}}
                                {{else}}
                                    {{$non_security_bugs = (add $non_security_bugs 1)}}
                                {{end}}
                            {{end}}
                        {{- end -}}
                        <div class="col-md-12 pt-4 mt-1">
                            <nav class="nav kk-package-nav">
                                <a class="nav-link {{if eq .PageName "packages"}}active{{end}}" href="/maintainer/{{if .Maintainer.Email}}{{.Maintainer.Email}}{{else}}maintainer-needed{{end}}"><i class="fa fa-info mr-1" aria-hidden="true"></i> Packages <span class="ml-1 badge badge-pill kk-misc-badge">{{len .Packages}}</span></a>
                                <a class="nav-link {{if eq .PageName "stabilization"}}active{{end}}" href="/maintainer/{{if .Maintainer.Email}}{{.Maintainer.Email}}{{else}}maintainer-needed{{end}}/stabilization"><i class="fa fa-check-circle-o mr-1" aria-hidden="true"></i> Stabilization <span class="ml-1 badge badge-pill kk-misc-badge">{{.Maintainer.PackagesInformation.StableRequests}}</span></a>
                                <a class="nav-link {{if eq .PageName "outdated"}}active{{end}}" href="/maintainer/{{if .Maintainer.Email}}{{.Maintainer.Email}}{{else}}maintainer-needed{{end}}/outdated"><i class="fa fa-tag mr-1" aria-hidden="true"></i> Outdated <span class="ml-1 badge badge-pill kk-misc-badge">{{.Maintainer.PackagesInformation.Outdated}}</span></a>
                                <a class="nav-link {{if eq .PageName "pull-requests"}}active{{end}}" href="/maintainer/{{if .Maintainer.Email}}{{.Maintainer.Email}}{{else}}maintainer-needed{{end}}/pull-requests"><span class="octicon octicon-git-pull-request opticon-resource-icon ml-1"></span> Pull requests <span class="ml-1 badge badge-pill kk-misc-badge">{{.Maintainer.PackagesInformation.PullRequests}}</span></a>
                                <a class="nav-link {{if eq .PageName "bugs"}}active{{end}}" href="/maintainer/{{if .Maintainer.Email}}{{.Maintainer.Email}}{{else}}maintainer-needed{{end}}/bugs"><i class="fa fa-bug" aria-hidden="true"></i> Bugs <span class="ml-1 badge badge-pill kk-misc-badge">{{.Maintainer.PackagesInformation.Bugs}}</span></a>
                                <a class="nav-link {{if eq .PageName "security"}}active{{end}}" href="/maintainer/{{if .Maintainer.Email}}{{.Maintainer.Email}}{{else}}maintainer-needed{{end}}/security"><i class="fa fa-shield" aria-hidden="true"></i> Security <span class="ml-1 badge badge-pill kk-misc-badge">{{.Maintainer.PackagesInformation.SecurityBugs}}</span></a>
                                <a class="nav-link {{if eq .PageName "changelog"}}active{{end}}" href="/maintainer/{{if .Maintainer.Email}}{{.Maintainer.Email}}{{else}}maintainer-needed{{end}}/changelog"><i class="fa fa-fw fa-history"></i> Changelog</a>
                            </nav>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>
{{end}}