|
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179 |
- <div class="header-wrapper">
- {{with .Repository}}
- <div class="ui container">
- <div class="repo-header">
- <div class="ui huge breadcrumb repo-title">
- {{if .RelAvatarLink}}
- <img class="ui avatar image" src="{{.RelAvatarLink}}">
- {{else if .IsTemplate}}
- {{if .IsPrivate}}
- {{svg "octicon-repo-template-private" 32}}
- {{else}}
- {{svg "octicon-repo-template" 32}}
- {{end}}
- {{else}}
- {{if .IsPrivate}}
- {{svg "octicon-lock" 32}}
- {{else if .IsMirror}}
- {{svg "octicon-repo-clone" 32}}
- {{else if .IsFork}}
- {{svg "octicon-repo-forked" 32}}
- {{else}}
- {{svg "octicon-repo" 32}}
- {{end}}
- {{end}}
- <a href="{{AppSubUrl}}/{{.Owner.Name}}">{{.Owner.Name}}</a>
- <div class="divider"> / </div>
- <a href="{{$.RepoLink}}">{{.Name}}</a>
- {{if .RelAvatarLink}}
- {{if .IsTemplate}}
- {{if .IsPrivate}}
- {{svg "octicon-repo-template-private" 32}}
- {{else}}
- {{svg "octicon-repo-template" 32}}
- {{end}}
- {{else}}
- {{if .IsPrivate}}
- {{svg "octicon-lock" 32}}
- {{else if .IsMirror}}
- {{svg "octicon-repo-clone" 32}}
- {{else if .IsFork}}
- {{svg "octicon-repo-forked" 32}}
- {{else}}
- {{svg "octicon-repo" 32}}
- {{end}}
- {{end}}
- {{end}}
- {{if .IsArchived}}<i class="archive icon archived-icon"></i>{{end}}
- {{if .IsMirror}}<div class="fork-flag">{{$.i18n.Tr "repo.mirror_from"}} <a target="_blank" rel="noopener noreferrer" href="{{if .SanitizedOriginalURL}}{{.SanitizedOriginalURL}}{{else}}{{MirrorAddress $.Mirror}}{{end}}">{{if .SanitizedOriginalURL}}{{.SanitizedOriginalURL}}{{else}}{{MirrorAddress $.Mirror}}{{end}}</a></div>{{end}}
- {{if .IsFork}}<div class="fork-flag">{{$.i18n.Tr "repo.forked_from"}} <a href="{{.BaseRepo.Link}}">{{SubStr .BaseRepo.RelLink 1 -1}}</a></div>{{end}}
- {{if .IsGenerated}}<div class="fork-flag">{{$.i18n.Tr "repo.generated_from"}} <a href="{{.TemplateRepo.Link}}">{{SubStr .TemplateRepo.RelLink 1 -1}}</a></div>{{end}}
- </div>
- {{if not .IsBeingCreated}}
- <div class="repo-buttons">
- <form method="post" action="{{$.RepoLink}}/action/{{if $.IsWatchingRepo}}un{{end}}watch?redirect_to={{$.Link}}">
- {{$.CsrfTokenHtml}}
- <div class="ui labeled button" tabindex="0">
- <button type="submit" class="ui compact basic button">
- <i class="icon fa-eye{{if not $.IsWatchingRepo}}-slash{{end}}"></i>{{if $.IsWatchingRepo}}{{$.i18n.Tr "repo.unwatch"}}{{else}}{{$.i18n.Tr "repo.watch"}}{{end}}
- </button>
- <a class="ui basic label" href="{{.Link}}/watchers">
- {{.NumWatches}}
- </a>
- </div>
- </form>
- <form method="post" action="{{$.RepoLink}}/action/{{if $.IsStaringRepo}}un{{end}}star?redirect_to={{$.Link}}">
- {{$.CsrfTokenHtml}}
- <div class="ui labeled button" tabindex="0">
- <button type="submit" class="ui compact basic button">
- <i class="icon star{{if not $.IsStaringRepo}} outline{{end}}"></i>{{if $.IsStaringRepo}}{{$.i18n.Tr "repo.unstar"}}{{else}}{{$.i18n.Tr "repo.star"}}{{end}}
- </button>
- <a class="ui basic label" href="{{.Link}}/stars">
- {{.NumStars}}
- </a>
- </div>
- </form>
- {{if and (not .IsEmpty) ($.Permission.CanRead $.UnitTypeCode)}}
- <div class="ui labeled button {{if and ($.IsSigned) (not $.CanSignedUserFork)}}disabled-repo-button{{end}}" tabindex="0">
- <a class="ui compact basic button {{if or (not $.IsSigned) (not $.CanSignedUserFork)}}poping up{{end}}" {{if $.CanSignedUserFork}}href="{{AppSubUrl}}/repo/fork/{{.ID}}"{{else if $.IsSigned}} data-content="{{$.i18n.Tr "repo.fork_from_self"}}" {{ else }} data-content="{{$.i18n.Tr "repo.fork_guest_user" }}" rel="nofollow" href="{{AppSubUrl}}/user/login?redirect_to={{AppSubUrl}}/repo/fork/{{.ID}}" {{end}} data-position="top center" data-variation="tiny">
- {{svg "octicon-repo-forked" 15}}{{$.i18n.Tr "repo.fork"}}
- </a>
- <a class="ui basic label" href="{{.Link}}/forks">
- {{.NumForks}}
- </a>
- </div>
- {{end}}
- </div>
- {{end}}
- </div><!-- end grid -->
- </div><!-- end container -->
- {{end}}
- <div class="ui tabs container">
- {{if not .Repository.IsBeingCreated}}
- <div class="ui tabular stackable menu navbar">
- {{if .Permission.CanRead $.UnitTypeCode}}
- <div class="dropdown-menu">
- <a class="{{if or .PageIsViewCode .PageIsReleaseList .PageIsWiki .PageIsActivity .PageIsViewCode}}active{{end}} item hover_active" href="{{.RepoLink}}{{if (ne .BranchName .Repository.DefaultBranch)}}/src/{{.BranchNameSubURL | EscapePound}}{{end}}">
- <span>{{svg "octicon-code" 16}} {{.i18n.Tr "repo.code"}} <i class="dropdown icon"></i></span>
- </a>
- <div class="dropdown-content">
- <a style="border: none;" class="{{if .PageIsReleaseList}}active{{end}} item" href="{{.RepoLink}}/releases">
- {{svg "octicon-tag" 16}} {{.i18n.Tr "repo.releases"}} <span class="ui {{if not .NumReleases}}gray{{else}}blue{{end}} small label">{{.NumReleases}}</span>
- </a>
- <a style="border: none;" class="{{if .PageIsWiki}}active{{end}} item" href="{{.RepoLink}}/wiki" {{if (.Permission.CanRead $.UnitTypeExternalWiki)}} target="_blank" rel="noopener noreferrer" {{end}}>
- {{svg "octicon-book" 16}} {{.i18n.Tr "repo.wiki"}}
- </a>
- <a style="border: none;" class="{{if .PageIsActivity}}active{{end}} item" href="{{.RepoLink}}/activity">
- {{svg "octicon-pulse" 16}} {{.i18n.Tr "repo.activity"}}
- </a>
-
- </div>
- </div>
-
- {{end}}
-
-
-
- {{if .Permission.CanRead $.UnitTypeIssues}}
- <a class="{{if .PageIsIssueList}}active{{end}} item" href="{{.RepoLink}}/issues">
- {{svg "octicon-issue-opened" 16}} {{.i18n.Tr "repo.issues"}} <span class="ui {{if not .Repository.NumOpenIssues}}gray{{else}}blue{{end}} small label">{{.Repository.NumOpenIssues}}</span>
- </a>
- {{end}}
-
- <!-- {{if .Permission.CanRead $.UnitTypeExternalTracker}}
- <a class="{{if .PageIsIssueList}}active{{end}} item" href="{{.RepoExternalIssuesLink}}" target="_blank" rel="noopener noreferrer">
- {{svg "octicon-link-external" 16}} {{.i18n.Tr "repo.issues"}} </span>
- </a>
- {{end}} -->
-
- {{if and .Repository.CanEnablePulls (.Permission.CanRead $.UnitTypePullRequests)}}
- <a class="{{if .PageIsPullList}}active{{end}} item" href="{{.RepoLink}}/pulls">
- {{svg "octicon-git-pull-request" 16}} {{.i18n.Tr "repo.pulls"}} <span class="ui {{if not .Repository.NumOpenPulls}}gray{{else}}blue{{end}} small label">{{.Repository.NumOpenPulls}}</span>
- </a>
- {{end}}
-
- {{if .Permission.CanRead $.UnitTypeDatasets}}
- <a class="{{if .PageIsDataset}}active{{end}} item" href="{{.RepoLink}}/datasets?type=0">
- <svg class="svg" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" width="16" height="16"><path fill="none" d="M0 0h24v24H0z"/><path d="M20.083 15.2l1.202.721a.5.5 0 0 1 0 .858l-8.77 5.262a1 1 0 0 1-1.03 0l-8.77-5.262a.5.5 0 0 1 0-.858l1.202-.721L12 20.05l8.083-4.85zm0-4.7l1.202.721a.5.5 0 0 1 0 .858L12 17.65l-9.285-5.571a.5.5 0 0 1 0-.858l1.202-.721L12 15.35l8.083-4.85zm-7.569-9.191l8.771 5.262a.5.5 0 0 1 0 .858L12 13 2.715 7.429a.5.5 0 0 1 0-.858l8.77-5.262a1 1 0 0 1 1.03 0zM12 3.332L5.887 7 12 10.668 18.113 7 12 3.332z"/></svg>
- {{.i18n.Tr "datasets"}}
- </a>
- {{end}}
- {{if .Permission.CanRead $.UnitTypeModelManage}}
- <a class="{{if .isModelManage}}active{{end}} item" href="{{.RepoLink}}/modelmanage/show_model">
- <svg class="svg" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" width="16" height="16"><path fill="none" d="M0 0h24v24H0z"/><path d="M3.741 1.408l18.462 10.154a.5.5 0 0 1 0 .876L3.741 22.592A.5.5 0 0 1 3 22.154V1.846a.5.5 0 0 1 .741-.438zM5 13v6.617L18.85 12 5 4.383V11h5v2H5z"/></svg>
- {{.i18n.Tr "repo.model_manager"}}
- </a>
- {{end}}
- {{if .Permission.CanRead $.UnitTypeCloudBrain}}
- <a class="{{if .PageIsCloudBrain}}active{{end}} item" href="{{.RepoLink}}/cloudbrain">
- <span>
- <svg class="svg" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" width="16" height="16"><path fill="none" d="M0 0h24v24H0z"/><path d="M4 3h16a1 1 0 0 1 1 1v7H3V4a1 1 0 0 1 1-1zM3 13h18v7a1 1 0 0 1-1 1H4a1 1 0 0 1-1-1v-7zm4 3v2h3v-2H7zM7 6v2h3V6H7z"/></svg>
- {{.i18n.Tr "repo.cloudbrain"}}
- <i class="question circle icon link cloudbrain-question" data-content={{.i18n.Tr "repo.cloudbrain_helper"}} data-position="top center" data-variation="mini"></i>
- </span>
- </a>
- {{end}}
- <!-- {{if .IsSigned}}
- <a class="{{if .PageIsBlockChain}}active{{end}} item " href="{{.RepoLink}}/blockchain">
- {{svg "octicon-law" 16}}
- {{.i18n.Tr "repo.balance"}}
- </a>
- {{end}} -->
-
- {{template "custom/extra_tabs" .}}
-
- {{if .Permission.IsAdmin}}
- <div class="right menu">
- <a class="{{if .PageIsSettings}}active{{end}} item" href="{{.RepoLink}}/settings">
- {{svg "octicon-tools" 16}} {{.i18n.Tr "repo.settings"}}
- </a>
- </div>
- {{end}}
- </div>
- {{end}}
- </div>
- <div class="ui tabs divider"></div>
- </div>
-
-
- <script src="https://cdn.jsdelivr.net/npm/jquery@3.2.1/dist/jquery.min.js"></script>
|