<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}}">{{.DisplayName}}</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}}">{{.BaseRepo.FullDisplayName}}</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"> <div class="ui labeled button" tabindex="0"> <div style="position:relative;" class="ui compact basic button" onclick="$('.__watch_btn__').dropdown('show')"> <i class="icon fa-eye{{if not $.IsWatchingRepo}}-slash{{end}}"></i>{{if $.IsWatchingRepo}}{{$.i18n.Tr "repo.watched"}}{{else}}{{$.i18n.Tr "repo.notWatched"}}{{end}} <i class="dropdown icon" style="margin:0 -8px 0 4px"></i> <div style="position:absolute;left:0;top:23px;" class="ui dropdown floating __watch_btn__" onclick="event.stopPropagation();"> <div class="text" style="display:none;"></div> {{$WatchNotifyType := or $.WatchNotifyType 0}} <div class="menu"> <div class="item {{if not $.IsWatchingRepo}}active selected{{end}}"> <form method="post" style="margin: 0;" action="{{$.RepoLink}}/action/unwatch?redirect_to={{$.Link}}"> {{$.CsrfTokenHtml}} <button type="submit" style="border:none;background:transparent;width:100%;text-align:left;font-weight:inherit;cursor:pointer;"> <i class="check icon" style="{{if $.IsWatchingRepo}}opacity:0{{end}}"></i> {{$.i18n.Tr "repo.un_watch"}} </button> </form> </div> <div class="item {{if and $.IsWatchingRepo (eq $WatchNotifyType 9)}}active selected{{end}}"> <form method="post" style="margin: 0;" action="{{$.RepoLink}}/action/watch?redirect_to={{$.Link}}"> {{$.CsrfTokenHtml}} <button type="submit" style="border:none;background:transparent;width:100%;text-align:left;font-weight:inherit;cursor:pointer;"> <i class="check icon" style="{{if not (and $.IsWatchingRepo (eq $WatchNotifyType 9))}}opacity:0{{end}}"></i> {{$.i18n.Tr "repo.watch_all"}} </button> </form> </div> <div class="item {{if and $.IsWatchingRepo (eq $WatchNotifyType 0)}}active selected{{end}}"> <form method="post" style="margin: 0;" action="{{$.RepoLink}}/action/watch_but_reject?redirect_to={{$.Link}}"> {{$.CsrfTokenHtml}} <button type="submit" style="border:none;background:transparent;width:100%;text-align:left;font-weight:inherit;cursor:pointer;"> <i class="check icon" style="{{if not (and $.IsWatchingRepo (eq $WatchNotifyType 0))}}opacity:0{{end}}"></i> {{$.i18n.Tr "repo.watch_no_notify"}} </button> </form> </div> </div> </div> </div> <a class="ui basic label" href="{{.Link}}/watchers"> {{.NumWatches}} </a> </div> <!-- <form method="post" style="margin: 0;" 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" style="margin: 0;" 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 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"> {{if and (.Permission.CanRead $.UnitTypeReleases) (not .IsEmptyRepo) }} <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> {{end}} {{if or (.Permission.CanRead $.UnitTypeWiki) (.Permission.CanRead $.UnitTypeExternalWiki)}} <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> {{end}} {{if and (.Permission.CanReadAny $.UnitTypePullRequests $.UnitTypeIssues $.UnitTypeReleases) (not .IsEmptyRepo)}} <a style="border: none;" class="{{if .PageIsActivity}}active{{end}} item" href="{{.RepoLink}}/activity"> {{svg "octicon-pulse" 16}} {{.i18n.Tr "repo.activity"}} </a> {{end}} </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 or .PageIsComparePull .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" id="header-dataset" href="{{.RepoLink}}{{if IsShowDataSetOfCurrentRepo $.Repository.ID}}/datasets{{else}}/datasets/reference_datasets{{end}}"> <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}}/debugjob?debugListType=all"> <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="{{StaticUrlPrefix}}/js/jquery.js?v={{MD5 AppVer}}"></script> <script src="{{StaticUrlPrefix}}/self/js/notebook/es5-shim.min.js?v={{MD5 AppVer}}"></script> <script src="{{StaticUrlPrefix}}/self/js/notebook/marked.min.js?v={{MD5 AppVer}}"></script> <script src="{{StaticUrlPrefix}}/self/js/notebook/purify.min.js?v={{MD5 AppVer}}"></script> <script src="{{StaticUrlPrefix}}/self/js/notebook/ansi_up.min.js?v={{MD5 AppVer}}"></script> <script src="{{StaticUrlPrefix}}/self/js/notebook/prism.min.js?v={{MD5 AppVer}}"></script> <script src="{{StaticUrlPrefix}}/self/js/notebook/katex.min.js?v={{MD5 AppVer}}"></script> <script src="{{StaticUrlPrefix}}/self/js/notebook/katex-auto-render.min.js?v={{MD5 AppVer}}"></script> <script src="{{StaticUrlPrefix}}/self/js/notebook/notebook.min.js?v={{MD5 AppVer}}"></script> <link rel="stylesheet" href="{{StaticUrlPrefix}}/self/css/notebook/katex.min.css?v={{MD5 AppVer}}" /> <link rel="stylesheet" href="{{StaticUrlPrefix}}/self/css/notebook/prism.css?v={{MD5 AppVer}}" /> <link rel="stylesheet" href="{{StaticUrlPrefix}}/self/css/notebook/notebook.css?v={{MD5 AppVer}}" />