Browse Source

merge

tags/vopendata0.1.2
e 5 years ago
parent
commit
e0de07ae15
85 changed files with 1839 additions and 2903 deletions
  1. +0
    -41
      custom/templates/base/footer_content.tmpl
  2. +0
    -196
      custom/templates/base/head.tmpl
  3. +0
    -186
      custom/templates/base/head_navbar.tmpl
  4. +0
    -3
      custom/templates/custom/header.tmpl
  5. +0
    -49
      custom/templates/datasets/dataset_list.tmpl
  6. +0
    -14
      custom/templates/datasets/dataset_search.tmpl
  7. +0
    -18
      custom/templates/datasets/index.tmpl
  8. +0
    -49
      custom/templates/explore/dataset_list.tmpl
  9. +0
    -14
      custom/templates/explore/dataset_search.tmpl
  10. +0
    -17
      custom/templates/explore/datasets.tmpl
  11. +0
    -47
      custom/templates/explore/navbar.tmpl
  12. +0
    -68
      custom/templates/explore/organizations.tmpl
  13. +0
    -75
      custom/templates/explore/repo_list.tmpl
  14. +0
    -1
      custom/templates/explore/repo_right.tmpl
  15. +0
    -14
      custom/templates/explore/repo_search.tmpl
  16. +0
    -20
      custom/templates/explore/repos.tmpl
  17. +0
    -13
      custom/templates/explore/search.tmpl
  18. +0
    -63
      custom/templates/explore/users.tmpl
  19. +0
    -254
      custom/templates/home.tmpl
  20. +0
    -27
      custom/templates/org/header.tmpl
  21. +0
    -87
      custom/templates/org/home.tmpl
  22. +0
    -75
      custom/templates/org/member/members.tmpl
  23. +0
    -48
      custom/templates/org/team/teams.tmpl
  24. +0
    -10
      custom/templates/user/auth/signin.tmpl
  25. +0
    -103
      custom/templates/user/auth/signin_inner.tmpl
  26. +0
    -85
      custom/templates/user/auth/signup_inner.tmpl
  27. +0
    -59
      custom/templates/user/dashboard/navbar.tmpl
  28. +16
    -1
      models/attachment.go
  29. +51
    -3
      models/dataset.go
  30. +1
    -0
      models/migrations/v140.go
  31. +11
    -0
      models/repo.go
  32. +20
    -0
      models/repo_unit.go
  33. +14
    -0
      models/unit.go
  34. +1
    -0
      modules/auth/repo_form.go
  35. +1
    -0
      modules/context/repo.go
  36. +13
    -0
      options/locale/locale_en-US.ini
  37. +221
    -208
      options/locale/locale_zh-CN.ini
  38. +0
    -256
      routers/dataset/dataset.go
  39. +18
    -1
      routers/repo/attachment.go
  40. +114
    -0
      routers/repo/dataset.go
  41. +16
    -0
      routers/repo/setting.go
  42. +9
    -14
      routers/routes/routes.go
  43. +1
    -8
      templates/admin/dataset/list.tmpl
  44. +34
    -19
      templates/base/footer_content.tmpl
  45. +3
    -3
      templates/base/head.tmpl
  46. +52
    -16
      templates/base/head_navbar.tmpl
  47. +3
    -0
      templates/custom/header.tmpl
  48. +0
    -28
      templates/datasets/create.tmpl
  49. +0
    -24
      templates/datasets/dataset_list.tmpl
  50. +0
    -23
      templates/datasets/dataset_search.tmpl
  51. +0
    -24
      templates/datasets/edit.tmpl
  52. +0
    -82
      templates/datasets/form.tmpl
  53. +0
    -11
      templates/datasets/index.tmpl
  54. +0
    -70
      templates/datasets/show.tmpl
  55. +49
    -0
      templates/explore/dataset_list.tmpl
  56. +14
    -0
      templates/explore/dataset_search.tmpl
  57. +17
    -0
      templates/explore/datasets.tmpl
  58. +46
    -15
      templates/explore/navbar.tmpl
  59. +59
    -29
      templates/explore/organizations.tmpl
  60. +32
    -1
      templates/explore/repo_list.tmpl
  61. +1
    -0
      templates/explore/repo_right.tmpl
  62. +14
    -30
      templates/explore/repo_search.tmpl
  63. +14
    -4
      templates/explore/repos.tmpl
  64. +11
    -23
      templates/explore/search.tmpl
  65. +53
    -23
      templates/explore/users.tmpl
  66. +242
    -41
      templates/home.tmpl
  67. +15
    -14
      templates/org/header.tmpl
  68. +66
    -61
      templates/org/home.tmpl
  69. +62
    -63
      templates/org/member/members.tmpl
  70. +0
    -0
      templates/org/navber.tmpl
  71. +0
    -0
      templates/org/repo_list.tmpl
  72. +33
    -32
      templates/org/team/teams.tmpl
  73. +8
    -0
      templates/repo/datasets/dataset.tmpl
  74. +37
    -0
      templates/repo/datasets/dataset_list.tmpl
  75. +91
    -0
      templates/repo/datasets/index.tmpl
  76. +96
    -0
      templates/repo/datasets/right_side.tmpl
  77. +8
    -2
      templates/repo/header.tmpl
  78. +9
    -0
      templates/repo/settings/options.tmpl
  79. +3
    -1
      templates/user/auth/signin.tmpl
  80. +91
    -65
      templates/user/auth/signin_inner.tmpl
  81. +76
    -68
      templates/user/auth/signup_inner.tmpl
  82. +1
    -2
      templates/user/dashboard/navbar.tmpl
  83. +2
    -2
      templates/user/profile.tmpl
  84. +69
    -0
      web_src/js/index.js
  85. +21
    -0
      web_src/less/_dataset.less

+ 0
- 41
custom/templates/base/footer_content.tmpl View File

@@ -1,41 +0,0 @@
<footer>
<div class="ui container">
<div class="ui grid">
<div class="sixteen wide mobile eight wide tablet eight wide computer column">
<div class="ui three column grid">
<div class="column ui vertical text menu">
<div class="header item">{{.i18n.Tr "custom.head.community"}}</div>
<a href="https://www.openi.org.cn/html/Club/2019/0227/14.html" class="item">{{.i18n.Tr "custom.foot.council"}}</a>
<a href="https://www.openi.org.cn/html/Club/2019/0227/14.html" class="item">{{.i18n.Tr "custom.foot.technical_committee"}}</a>
<a href="https://www.openi.org.cn/html/Club/2019/0228/17.html" class="item">{{.i18n.Tr "custom.foot.join"}}</a>
</div>
<div class="column ui vertical text menu">
<div class="header item">{{.i18n.Tr "custom.foot.news"}}</div>
<a href="https://www.openi.org.cn/html/news/dongtai/" class="item">{{.i18n.Tr "custom.foot.community_news"}}</a>
<a href="https://www.openi.org.cn/html/news/huodong/" class="item">{{.i18n.Tr "custom.foot.member_news"}}</a>
<a href="https://www.openi.org.cn/html/news/zixun/" class="item">{{.i18n.Tr "custom.foot.industry_advisory"}}</a>
</div>
<div class="column ui vertical text menu">
<div class="header item">{{.i18n.Tr "custom.foot.help"}}</div>
<div class="ui language bottom floating slide up dropdown link item">
<i class="world icon"></i>
<div class="text">{{.LangName}}</div>
<div class="menu">
{{range .AllLangs}}
<a lang="{{.Lang}}" class="item {{if eq $.Lang .Lang}}active selected{{end}}" href="{{if eq $.Lang .Lang}}#{{else}}{{$.Link}}?lang={{.Lang}}{{end}}">{{.Name}}</a>
{{end}}
</div>
</div>
{{template "custom/extra_links_footer" .}}
</div>
</div>
</div>
<div class="sixteen wide mobile eight wide tablet eight wide computer column" style=" margin:2.0rem 0">
{{.i18n.Tr "custom.foot.copyright"}} <a href="http://www.miitbeian.gov.cn/" target="_blank">京ICP备18004880号</a>
<br>
{{.i18n.Tr "powered_by" "鹏城实验室云脑、Trustie、华为云 DevCloud、gitea"}}
<br>
</div>
</div>
</div>
</footer>

+ 0
- 196
custom/templates/base/head.tmpl View File

@@ -1,196 +0,0 @@
<!DOCTYPE html>
<html lang="{{.Language}}">
<head data-suburl="{{AppSubUrl}}">
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta http-equiv="x-ua-compatible" content="ie=edge">
<title>{{if .Title}}{{.Title}} - {{end}} {{if .Repository.Name}}{{.Repository.Name}} - {{end}}{{AppName}}</title>
<link rel="manifest" href="{{AppSubUrl}}/manifest.json" crossorigin="use-credentials">
{{if UseServiceWorker}}
<script>
if ('serviceWorker' in navigator) {
navigator.serviceWorker.register('{{AppSubUrl}}/serviceworker.js').then(function(registration) {
// Registration was successful
console.info('ServiceWorker registration successful with scope: ', registration.scope);
}, function(err) {
// registration failed :(
console.info('ServiceWorker registration failed: ', err);
});
}
</script>
{{else}}
<script>
if ('serviceWorker' in navigator) {
navigator.serviceWorker.getRegistrations().then(function(registrations) {
registrations.forEach(function(registration) {
registration.unregister();
console.info('ServiceWorker unregistered');
});
});
}
</script>
{{end}}
<meta name="theme-color" content="{{ThemeColorMetaTag}}">
<meta name="author" content="{{if .Repository}}{{.Owner.Name}}{{else}}{{MetaAuthor}}{{end}}" />
<meta name="description" content="{{if .Repository}}{{.Repository.Name}}{{if .Repository.Description}} - {{.Repository.Description}}{{end}}{{else}}{{MetaDescription}}{{end}}" />
<meta name="keywords" content="{{MetaKeywords}}">
<meta name="referrer" content="no-referrer" />
<meta name="_csrf" content="{{.CsrfToken}}" />
{{if .IsSigned}}
<meta name="_uid" content="{{.SignedUser.ID}}" />
{{end}}
{{if .ContextUser}}
<meta name="_context_uid" content="{{.ContextUser.ID}}" />
{{end}}
{{if .SearchLimit}}
<meta name="_search_limit" content="{{.SearchLimit}}" />
{{end}}
{{if .GoGetImport}}
<meta name="go-import" content="{{.GoGetImport}} git {{.CloneLink.HTTPS}}">
<meta name="go-source" content="{{.GoGetImport}} _ {{.GoDocDirectory}} {{.GoDocFile}}">
{{end}}
<script>
{{SafeJS `/*
@licstart The following is the entire license notice for the
JavaScript code in this page.

Copyright (c) 2016 The Gitea Authors
Copyright (c) 2015 The Gogs Authors

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
---
Licensing information for additional javascript libraries can be found at:
{{StaticUrlPrefix}}/vendor/librejs.html

@licend The above is the entire license notice
for the JavaScript code in this page.
*/`}}
</script>
<script>
window.config = {
AppSubUrl: '{{AppSubUrl}}',
StaticUrlPrefix: '{{StaticUrlPrefix}}',
csrf: '{{.CsrfToken}}',
HighlightJS: {{if .RequireHighlightJS}}true{{else}}false{{end}},
Minicolors: {{if .RequireMinicolors}}true{{else}}false{{end}},
SimpleMDE: {{if .RequireSimpleMDE}}true{{else}}false{{end}},
Tribute: {{if .RequireTribute}}true{{else}}false{{end}},
U2F: {{if .RequireU2F}}true{{else}}false{{end}},
Heatmap: {{if .EnableHeatmap}}true{{else}}false{{end}},
heatmapUser: {{if .HeatmapUser}}'{{.HeatmapUser}}'{{else}}null{{end}},
NotificationSettings: {
MinTimeout: {{NotificationSettings.MinTimeout}},
TimeoutStep: {{NotificationSettings.TimeoutStep}},
MaxTimeout: {{NotificationSettings.MaxTimeout}},
EventSourceUpdateTime: {{NotificationSettings.EventSourceUpdateTime}},
},
{{if .RequireTribute}}
tributeValues: [
{{ range .Assignees }}
{key: '{{.Name}} {{.FullName}}', value: '{{.Name}}',
name: '{{.Name}}', fullname: '{{.FullName}}', avatar: '{{.RelAvatarLink}}'},
{{ end }}
],
{{end}}
};
</script>
<link rel="shortcut icon" href="{{StaticUrlPrefix}}/img/favicon.png">
<link rel="mask-icon" href="{{StaticUrlPrefix}}/img/gitea-safari.svg" color="#609926">
<link rel="fluid-icon" href="{{StaticUrlPrefix}}/img/gitea-lg.png" title="{{AppName}}">
<link rel="stylesheet" href="{{StaticUrlPrefix}}/vendor/assets/font-awesome/css/font-awesome.min.css">
<link rel="preload" as="font" href="{{StaticUrlPrefix}}/fomantic/themes/default/assets/fonts/icons.woff2" type="font/woff2" crossorigin="anonymous">
<link rel="preload" as="font" href="{{StaticUrlPrefix}}/fomantic/themes/default/assets/fonts/outline-icons.woff2" type="font/woff2" crossorigin="anonymous">
{{if .RequireSimpleMDE}}
<link rel="stylesheet" href="{{StaticUrlPrefix}}/vendor/plugins/simplemde/simplemde.min.css">
{{end}}

{{if .RequireTribute}}
<link rel="stylesheet" href="{{StaticUrlPrefix}}/vendor/plugins/tribute/tribute.css">
{{end}}
<link rel="stylesheet" href="{{StaticUrlPrefix}}/fomantic/semantic.min.css?v={{MD5 AppVer}}">
<link rel="stylesheet" href="{{StaticUrlPrefix}}/css/index.css?v={{MD5 AppVer}}">
<noscript>
<style>
.dropdown:hover > .menu { display: block; }
.ui.secondary.menu .dropdown.item > .menu { margin-top: 0; }
</style>
</noscript>
{{if .RequireMinicolors}}
<link rel="stylesheet" href="{{StaticUrlPrefix}}/vendor/plugins/jquery.minicolors/jquery.minicolors.css">
{{end}}
<style class="list-search-style"></style>
{{if .PageIsUserProfile}}
<meta property="og:title" content="{{.Owner.Name}}" />
<meta property="og:type" content="profile" />
<meta property="og:image" content="{{.Owner.AvatarLink}}" />
<meta property="og:url" content="{{.Owner.HTMLURL}}" />
{{if .Owner.Description}}
<meta property="og:description" content="{{.Owner.Description}}">
{{end}}
{{else if .Repository}}
{{if .Issue}}
<meta property="og:title" content="{{.Issue.Title}}" />
<meta property="og:url" content="{{.Issue.HTMLURL}}" />
{{if .Issue.Content}}
<meta property="og:description" content="{{.Issue.Content}}" />
{{end}}
{{else}}
<meta property="og:title" content="{{.Repository.Name}}" />
<meta property="og:url" content="{{.Repository.HTMLURL}}" />
{{if .Repository.Description}}
<meta property="og:description" content="{{.Repository.Description}}" />
{{end}}
{{end}}
<meta property="og:type" content="object" />
<meta property="og:image" content="{{.Repository.Owner.AvatarLink}}" />
{{else}}
<meta property="og:title" content="{{AppName}}">
<meta property="og:type" content="website" />
<meta property="og:image" content="{{StaticUrlPrefix}}/img/gitea-lg.png" />
<meta property="og:url" content="{{AppUrl}}" />
<meta property="og:description" content="{{MetaDescription}}">
{{end}}
<meta property="og:site_name" content="{{AppName}}" />
{{if .IsSigned }}
{{ if ne .SignedUser.Theme "gitea" }}
<link rel="stylesheet" href="{{StaticUrlPrefix}}/css/theme-{{.SignedUser.Theme}}.css?v={{MD5 AppVer}}">
{{end}}
{{else if ne DefaultTheme "gitea"}}
<link rel="stylesheet" href="{{StaticUrlPrefix}}/css/theme-{{DefaultTheme}}.css?v={{MD5 AppVer}}">
{{end}}
{{template "custom/header" .}}
</head>
<body>
{{template "custom/body_outer_pre" .}}

<div class="full height">
<noscript>{{.i18n.Tr "enable_javascript"}}</noscript>

{{template "custom/body_inner_pre" .}}

{{if not .PageIsInstall}}
<div class="ui top secondary stackable main menu following bar dark">
{{template "base/head_navbar" .}}
</div><!-- end bar -->
{{end}}
{{/*
</div>
</body>
</html>
*/}}

+ 0
- 186
custom/templates/base/head_navbar.tmpl View File

@@ -1,186 +0,0 @@
<div class="ui container" id="navbar">
<div class="item brand" style="justify-content: space-between;">
<a href="/">
<img class="ui mini image" src="{{StaticUrlPrefix}}/img/openi-logo-w.svg?v=2020041802">
</a>
<div class="ui basic icon button mobile-only" id="navbar-expand-toggle">
<i class="sidebar icon"></i>
</div>
</div>

{{if .IsSigned}}
<a class="item {{if .PageIsDashboard}}active{{end}}" href="/">{{.i18n.Tr "dashboard"}}</a>
<div class="ui dropdown item">
{{.i18n.Tr "custom.head.community"}}
<i class="dropdown icon"></i>
<div class="menu">
<a class="item" href="https://www.openi.org.cn/html/Club/2019/0228/17.html">{{.i18n.Tr "custom.head.welcome"}}</a>
<a class="item" href="https://www.openi.org.cn/html/Club/2019/0227/14.html">{{.i18n.Tr "custom.head.about_org"}}</a>
<a class="item" href="https://www.openi.org.cn/html/Club/2019/0227/15.html">{{.i18n.Tr "custom.head.license"}}</a>
<a class="item" href="https://www.openi.org.cn/html/Club/2019/0227/16.html">{{.i18n.Tr "custom.head.community_charter"}}</a>
<a class="item" href="https://www.openi.org.cn/html/news/dongtai/">{{.i18n.Tr "custom.head.community_infos"}}</a>
</div>
</div>
<a class="item" href="{{AppSubUrl}}/explore/datasets">{{.i18n.Tr "datasets"}}</a>
<a class="item" href="{{AppSubUrl}}/explore/repos">{{.i18n.Tr "custom.head.project"}}</a>
{{if not .UnitIssuesGlobalDisabled}}
<a class="item {{if .PageIsIssues}}active{{end}}" href="{{AppSubUrl}}/issues">{{.i18n.Tr "issues"}}</a>
{{end}}
{{if not .UnitPullsGlobalDisabled}}
<a class="item {{if .PageIsPulls}}active{{end}}" href="{{AppSubUrl}}/pulls">{{.i18n.Tr "pull_requests"}}</a>
{{end}}
{{if not (and .UnitIssuesGlobalDisabled .UnitPullsGlobalDisabled)}}
{{if .ShowMilestonesDashboardPage}}<a class="item {{if .PageIsMilestonesDashboard}}active{{end}}" href="{{AppSubUrl}}/milestones">{{.i18n.Tr "milestones"}}</a>{{end}}
{{end}}
<div class="ui dropdown item">
{{.i18n.Tr "explore"}}
<i class="dropdown icon"></i>
<div class="menu">
<a class="item" href="{{AppSubUrl}}/explore/repos">{{.i18n.Tr "custom.head.project"}}</a>
<a class="item" href="{{AppSubUrl}}/explore/datasets">{{.i18n.Tr "custom.head.dataset"}}</a>
<a class="item" href="javascript:alert('WIP')">{{.i18n.Tr "custom.head.study"}}</a>
<a class="item" href="javascript:alert('WIP')">{{.i18n.Tr "custom.head.activity"}}</a>
</div>
</div>
{{else if .IsLandingPageHome}}
<a class="item {{if .PageIsHome}}active{{end}}" href="/">{{.i18n.Tr "home"}}</a>
<div class="ui dropdown item">
{{.i18n.Tr "custom.head.community"}}
<i class="dropdown icon"></i>
<div class="menu">
<a class="item" href="https://www.openi.org.cn/html/Club/2019/0228/17.html">{{.i18n.Tr "custom.head.welcome"}}</a>
<a class="item" href="https://www.openi.org.cn/html/Club/2019/0227/14.html">{{.i18n.Tr "custom.head.about_org"}}</a>
<a class="item" href="https://www.openi.org.cn/html/Club/2019/0227/15.html">{{.i18n.Tr "custom.head.license"}}</a>
<a class="item" href="https://www.openi.org.cn/html/Club/2019/0227/16.html">{{.i18n.Tr "custom.head.community_charter"}}</a>
<a class="item" href="https://www.openi.org.cn/html/news/dongtai/">{{.i18n.Tr "custom.head.community_infos"}}</a>
</div>
</div>
<a class="item" href="{{AppSubUrl}}/explore/repos">{{.i18n.Tr "custom.head.project"}}</a>
<div class="ui dropdown item">
{{.i18n.Tr "explore"}}
<i class="dropdown icon"></i>
<div class="menu">
<a class="item {{if .PageIsExplore}}active{{end}}" href="{{AppSubUrl}}/explore/repos">{{.i18n.Tr "custom.head.project"}}</a>
<a class="item" href="{{AppSubUrl}}/explore/datasets">{{.i18n.Tr "datasets"}}</a>
<a class="item" href="javascript:alert('WIP')" target="_blank">{{.i18n.Tr "custom.head.project"}}</a>
<a class="item" href="javascript:alert('WIP')" target="_blank">{{.i18n.Tr "custom.head.activity"}}</a>
</div>
</div>
{{else if .IsLandingPageExplore}}
<a class="item {{if .PageIsExplore}}active{{end}}" href="{{AppSubUrl}}/explore/repos">{{.i18n.Tr "home"}}</a>
{{else if .IsLandingPageOrganizations}}
<a class="item {{if .PageIsExplore}}active{{end}}" href="{{AppSubUrl}}/explore/organizations">{{.i18n.Tr "home"}}</a>
{{end}}

{{template "custom/extra_links" .}}

{{/*
<div class="item">
<div class="ui icon input">
<input class="searchbox" type="text" placeholder="{{.i18n.Tr "search_project"}}">
<i class="search icon"></i>
</div>
</div>
*/}}

{{if .IsSigned}}
<div class="right stackable menu">
<a href="{{AppSubUrl}}/notifications" class="item poping up" data-content='{{.i18n.Tr "notifications"}}' data-variation="tiny inverted">
<span class="text">
<span class="fitted">{{svg "octicon-bell" 16}}</span>
<span class="sr-mobile-only">{{.i18n.Tr "notifications"}}</span>
{{$notificationUnreadCount := 0}}
{{if .NotificationUnreadCount}}{{$notificationUnreadCount = call .NotificationUnreadCount}}{{end}}
<span class="ui red label {{if not $notificationUnreadCount}}hidden{{end}} notification_count">
{{$notificationUnreadCount}}
</span>
</span>
</a>

<div class="ui dropdown jump item poping up" data-content="{{.i18n.Tr "create_new"}}" data-variation="tiny inverted">
<span class="text">
<span class="fitted">{{svg "octicon-plus" 16}}</span>
<span class="sr-mobile-only">{{.i18n.Tr "create_new"}}</span>
<span class="fitted not-mobile">{{svg "octicon-triangle-down" 16}}</span>
</span>
<div class="menu">
<a class="item" href="{{AppSubUrl}}/repo/create">
<span class="fitted">{{svg "octicon-plus" 16}}</span> {{.i18n.Tr "new_repo"}}
</a>
<a class="item" href="{{AppSubUrl}}/datasets/create">
<span class="fitted">{{svg "octicon-plus" 16}}</span> {{.i18n.Tr "new_dataset"}}
</a>
<a class="item" href="{{AppSubUrl}}/repo/migrate">
<span class="fitted">{{svg "octicon-repo-clone" 16}}</span> {{.i18n.Tr "new_migrate"}}
</a>
{{if .SignedUser.CanCreateOrganization}}
<a class="item" href="{{AppSubUrl}}/org/create">
<span class="fitted">{{svg "octicon-organization" 16}}</span> {{.i18n.Tr "new_org"}}
</a>
{{end}}
</div><!-- end content create new menu -->
</div><!-- end dropdown menu create new -->

<div class="ui dropdown jump item poping up" tabindex="-1" data-content="{{.i18n.Tr "user_profile_and_more"}}" data-variation="tiny inverted">
<span class="text">
<img class="ui tiny avatar image" width="24" height="24" src="{{.SignedUser.RelAvatarLink}}">
<span class="sr-only">{{.i18n.Tr "user_profile_and_more"}}</span>
<span class="mobile-only">{{.SignedUser.Name}}</span>
<span class="fitted not-mobile" tabindex="-1">{{svg "octicon-triangle-down" 16}}</span>
</span>
<div class="menu user-menu" tabindex="-1">
<div class="ui header">
{{.i18n.Tr "signed_in_as"}} <strong>{{.SignedUser.Name}}</strong>
</div>

<div class="divider"></div>
<a class="item" href="{{AppSubUrl}}/{{.SignedUser.Name}}">
{{svg "octicon-person" 16}}
{{.i18n.Tr "your_profile"}}<!-- Your profile -->
</a>
<a class="item" href="{{AppSubUrl}}/{{.SignedUser.Name}}?tab=stars">
{{svg "octicon-star" 16}}
{{.i18n.Tr "your_starred"}}
</a>
<a class="{{if .PageIsUserSettings}}active{{end}} item" href="{{AppSubUrl}}/user/settings">
{{svg "octicon-settings" 16}}
{{.i18n.Tr "your_settings"}}<!-- Your settings -->
</a>
<!--a class="item" target="_blank" rel="noopener noreferrer" href="https://docs.gitea.io">
{{svg "octicon-question" 16}}
{{.i18n.Tr "help"}}<!-- Help -->
</a-->
{{if .IsAdmin}}
<div class="divider"></div>

<a class="{{if .PageIsAdmin}}active{{end}} item" href="{{AppSubUrl}}/admin">
<i class="icon settings"></i>
{{.i18n.Tr "admin_panel"}}<!-- Admin Panel -->
</a>
{{end}}

<div class="divider"></div>
<a class="item link-action" href data-url="{{AppSubUrl}}/user/logout" data-redirect="{{AppSubUrl}}/">
{{svg "octicon-sign-out" 16}}
{{.i18n.Tr "sign_out"}}<!-- Sign Out -->
</a>
</div><!-- end content avatar menu -->
</div><!-- end dropdown avatar menu -->
</div><!-- end signed user right menu -->

{{else}}

<!--a class="item" target="_blank" rel="noopener noreferrer" href="https://docs.gitea.io">{{.i18n.Tr "help"}}</a-->
<div class="right stackable menu">
{{if .ShowRegistrationButton}}
<a class="item{{if .PageIsSignUp}} active{{end}}" href="{{AppSubUrl}}/user/sign_up">
{{svg "octicon-person" 16}} {{.i18n.Tr "register"}}
</a>
{{end}}
<a class="item{{if .PageIsSignIn}} active{{end}}" rel="nofollow" href="{{AppSubUrl}}/user/login?redirect_to={{.Link}}">
{{svg "octicon-sign-in" 16}} {{.i18n.Tr "sign_in"}}
</a>
</div><!-- end anonymous right menu -->

{{end}}
</div>

+ 0
- 3
custom/templates/custom/header.tmpl View File

@@ -1,3 +0,0 @@
<!--新增OpenI样式文件-->
<link rel="stylesheet" href="/css/openi.css?v={{MD5 AppVer}}">
<script type="text/javascript" src="/js/jquery.particleground.min.js"></script>

+ 0
- 49
custom/templates/datasets/dataset_list.tmpl View File

@@ -1,49 +0,0 @@
<h2 class="ui left floated medium header">
{{.i18n.Tr "datasets"}}
</h2>
<div class="ui right floated secondary filter menu">
<!-- Sort -->
<div class="ui right dropdown type jump item">
<span class="text">
{{.i18n.Tr "repo.issues.filter_sort"}}
<i class="dropdown icon"></i>
</span>
<div class="menu">
<a class="{{if eq .SortType "newest"}}active{{end}} item" href="{{$.Link}}?sort=newest&q={{$.Keyword}}&tab={{$.TabName}}">{{.i18n.Tr "repo.issues.filter_sort.latest"}}</a>
<a class="{{if eq .SortType "oldest"}}active{{end}} item" href="{{$.Link}}?sort=oldest&q={{$.Keyword}}&tab={{$.TabName}}">{{.i18n.Tr "repo.issues.filter_sort.oldest"}}</a>
<a class="{{if eq .SortType "recentupdate"}}active{{end}} item" href="{{$.Link}}?sort=recentupdate&q={{$.Keyword}}&tab={{$.TabName}}">{{.i18n.Tr "repo.issues.filter_sort.recentupdate"}}</a>
<a class="{{if eq .SortType "leastupdate"}}active{{end}} item" href="{{$.Link}}?sort=leastupdate&q={{$.Keyword}}&tab={{$.TabName}}">{{.i18n.Tr "repo.issues.filter_sort.leastupdate"}}</a>
</div>
</div>
</div>

<div class="ui clearing divider"></div>

<div class="ui dataset list">
<div class="ui sixteen wide mobile ten wide tablet ten wide computer colum">
{{range .datasets}}
<div class="item">
<div class="ui header">
<a class="name" href="/datasets/{{.ID}}">
{{.Title}}
</a>
<div class="ui right metas">
<span class="text grey">{{svg "octicon-tasklist" 16}} {{$.i18n.Tr (printf "dataset.task.%s" .Task)}}</span>
<span class="text grey">{{svg "octicon-tag" 16}}{{$.i18n.Tr (printf "dataset.category.%s" .Category)}}</span>
{{if ne .DownloadTimes 0}}
<span class="text grey">{{svg "octicon-flame" 16}} {{.DownloadTimes}}</span>
{{end}}
</div>
</div>
<div class="description">
<a><div class="ui small label topic">{{.Description}}</div></a>
<p class="time">{{$.i18n.Tr "org.repo_updated"}} {{TimeSinceUnix .UpdatedUnix $.i18n.Lang}}</p>
</div>
</div>
{{else}}
<div>
{{$.i18n.Tr "explore.dataset_no_results"}}
</div>
{{end}}
</div>
</div>

+ 0
- 14
custom/templates/datasets/dataset_search.tmpl View File

@@ -1,14 +0,0 @@
<div class="repos--seach">
<div class="ui container">
<div class="ui two column centered grid">
<form class="mobile ten wide tablet computer column ui form ignore-dirty">
<div class="ui fluid action input">
<input name="q" value="{{.Keyword}}" placeholder="{{.i18n.Tr "explore.search"}}..." autofocus>
<input type="hidden" name="tab" value="{{$.TabName}}">
<input type="hidden" name="sort" value="{{$.SortType}}">
<button class="ui blue button">{{.i18n.Tr "explore.search"}}</button>
</div>
</form>
</div>
</div>
</div>

+ 0
- 18
custom/templates/datasets/index.tmpl View File

@@ -1,18 +0,0 @@
{{template "base/head" .}}
<div class="explore datasets">
{{template "explore/repo_search" .}}
<div class="ui container">
<div class="ui grid">
{{template "explore/navbar" .}}

<div class="ui sixteen wide mobile ten wide tablet ten wide computer column">
{{template "datasets/dataset_list" .}}
{{template "base/paginate" .}}
</div>
<div class="ui sixteen wide mobile six wide tablet three wide computer column">
{{template "explore/repo_right" .}}
</div>
</div>
</div>
</div>
{{template "base/footer" .}}

+ 0
- 49
custom/templates/explore/dataset_list.tmpl View File

@@ -1,49 +0,0 @@
<h2 class="ui left floated medium header">
{{.i18n.Tr "datasets"}}
</h2>
<div class="ui right floated secondary filter menu">
<!-- Sort -->
<div class="ui right dropdown type jump item">
<span class="text">
{{.i18n.Tr "repo.issues.filter_sort"}}
<i class="dropdown icon"></i>
</span>
<div class="menu">
<a class="{{if eq .SortType "newest"}}active{{end}} item" href="{{$.Link}}?sort=newest&q={{$.Keyword}}&tab={{$.TabName}}">{{.i18n.Tr "repo.issues.filter_sort.latest"}}</a>
<a class="{{if eq .SortType "oldest"}}active{{end}} item" href="{{$.Link}}?sort=oldest&q={{$.Keyword}}&tab={{$.TabName}}">{{.i18n.Tr "repo.issues.filter_sort.oldest"}}</a>
<a class="{{if eq .SortType "recentupdate"}}active{{end}} item" href="{{$.Link}}?sort=recentupdate&q={{$.Keyword}}&tab={{$.TabName}}">{{.i18n.Tr "repo.issues.filter_sort.recentupdate"}}</a>
<a class="{{if eq .SortType "leastupdate"}}active{{end}} item" href="{{$.Link}}?sort=leastupdate&q={{$.Keyword}}&tab={{$.TabName}}">{{.i18n.Tr "repo.issues.filter_sort.leastupdate"}}</a>
</div>
</div>
</div>

<div class="ui clearing divider"></div>

<div class="ui dataset list">
<div class="ui sixteen wide mobile ten wide tablet ten wide computer colum">
{{range .Datasets}}
<div class="item">
<div class="ui header">
<a class="name" href="/datasets/{{.ID}}">
{{.Title}}
</a>
<div class="ui right metas">
<span class="text grey">{{svg "octicon-tasklist" 16}} {{$.i18n.Tr (printf "dataset.task.%s" .Task)}}</span>
<span class="text grey">{{svg "octicon-tag" 16}}{{$.i18n.Tr (printf "dataset.category.%s" .Category)}}</span>
{{if ne .DownloadTimes 0}}
<span class="text grey">{{svg "octicon-flame" 16}} {{.DownloadTimes}}</span>
{{end}}
</div>
</div>
<div class="description">
<a><div class="ui small label topic">{{.Description}}</div></a>
<p class="time">{{$.i18n.Tr "org.repo_updated"}} {{TimeSinceUnix .UpdatedUnix $.i18n.Lang}}</p>
</div>
</div>
{{else}}
<div>
{{$.i18n.Tr "explore.dataset_no_results"}}
</div>
{{end}}
</div>
</div>

+ 0
- 14
custom/templates/explore/dataset_search.tmpl View File

@@ -1,14 +0,0 @@
<div class="repos--seach">
<div class="ui container">
<div class="ui two column centered grid">
<form class="mobile ten wide tablet computer column ui form ignore-dirty">
<div class="ui fluid action input">
<input name="q" value="{{.Keyword}}" placeholder="{{.i18n.Tr "explore.search"}}..." autofocus>
<input type="hidden" name="tab" value="{{$.TabName}}">
<input type="hidden" name="sort" value="{{$.SortType}}">
<button class="ui blue button">{{.i18n.Tr "explore.search"}}</button>
</div>
</form>
</div>
</div>
</div>

+ 0
- 17
custom/templates/explore/datasets.tmpl View File

@@ -1,17 +0,0 @@
{{template "base/head" .}}
<div class="explore repositories">
{{template "explore/dataset_search" .}}
<div class="ui container">
<div class="ui grid">
{{template "explore/navbar" .}}
<div class="ui sixteen wide mobile ten wide tablet ten wide computer column">
{{template "explore/dataset_list" .}}
{{template "base/paginate" .}}
</div>
<div class="ui sixteen wide mobile six wide tablet three wide computer column">
{{template "explore/repo_right" .}}
</div>
</div>
</div>
</div>
{{template "base/footer" .}}

+ 0
- 47
custom/templates/explore/navbar.tmpl View File

@@ -1,47 +0,0 @@
<div class="tablet only mobile only sixteen wide mobile sixteen wide tablet column row">
<div class="ui secondary pointing tabular top attached borderless menu navbar">
<a class="{{if .PageIsExploreRepositories}}active{{end}} item" href="{{AppSubUrl}}/explore/repos">
{{svg "octicon-repo" 16}} {{.i18n.Tr "explore.repos"}}
</a>
<a class="{{if .PageIsDatasets}}active{{end}} item" href="{{AppSubUrl}}/explore/datasets">
{{svg "octicon-file-submodule" 16}} {{.i18n.Tr "datasets"}}
</a>
<a class="{{if .PageIsExploreUsers}}active{{end}} item" href="{{AppSubUrl}}/explore/users">
{{svg "octicon-person" 16}} {{.i18n.Tr "explore.users"}}
</a>
<a class="{{if .PageIsExploreOrganizations}}active{{end}} item" href="{{AppSubUrl}}/explore/organizations">
{{svg "octicon-organization" 16}} {{.i18n.Tr "explore.organizations"}}
</a>
{{if .IsRepoIndexerEnabled}}
<a class="{{if .PageIsExploreCode}}active{{end}} item" href="{{AppSubUrl}}/explore/code">
{{svg "octicon-code" 16}} {{.i18n.Tr "explore.code"}}
</a>
{{end}}
</div>
</div>
<!--平板、移动端-->

<div class="computer only three wide computer column">
<div class="ui grid">
<div class="sixteen wide column ui secondary sticky pointing tabular vertical menu">
<a class="{{if .PageIsExploreRepositories}}active{{end}} item" href="{{AppSubUrl}}/explore/repos">
{{svg "octicon-repo" 16}} {{.i18n.Tr "explore.repos"}}
</a>
<a class="{{if .PageIsDatasets}}active{{end}} item" href="{{AppSubUrl}}/explore/datasets">
{{svg "octicon-file-submodule" 16}} {{.i18n.Tr "datasets"}}
</a>
<a class="{{if .PageIsExploreUsers}}active{{end}} item" href="{{AppSubUrl}}/explore/users">
{{svg "octicon-person" 16}} {{.i18n.Tr "explore.users"}}
</a>
<a class="{{if .PageIsExploreOrganizations}}active{{end}} item" href="{{AppSubUrl}}/explore/organizations">
{{svg "octicon-organization" 16}} {{.i18n.Tr "explore.organizations"}}
</a>
{{if .IsRepoIndexerEnabled}}
<a class="{{if .PageIsExploreCode}}active{{end}} item" href="{{AppSubUrl}}/explore/code">
{{svg "octicon-code" 16}} {{.i18n.Tr "explore.code"}}
</a>
{{end}}
</div>
</div>
</div>
<!--电脑、宽屏-->

+ 0
- 68
custom/templates/explore/organizations.tmpl View File

@@ -1,68 +0,0 @@
{{template "base/head" .}}
<div class="explore users">
{{template "explore/search" .}}

<div class="ui container">
<div class="ui grid">
{{template "explore/navbar" .}}
<div class="sixteen wide mobile ten wide tablet ten wide computer column">
<h2 class="ui left floated medium header">
{{.i18n.Tr "explore.organizations"}}
</h2>
<div class="ui right floated secondary filter menu">
<!-- Sort -->
<div class="ui right dropdown type jump item">
<span class="text">
{{.i18n.Tr "repo.issues.filter_sort"}}
<i class="dropdown icon"></i>
</span>
<div class="menu">
<a class="{{if eq .SortType "newest"}}active{{end}} item" href="{{$.Link}}?sort=newest&q={{$.Keyword}}&tab={{$.TabName}}">{{.i18n.Tr "repo.issues.filter_sort.latest"}}</a>
<a class="{{if eq .SortType "oldest"}}active{{end}} item" href="{{$.Link}}?sort=oldest&q={{$.Keyword}}&tab={{$.TabName}}">{{.i18n.Tr "repo.issues.filter_sort.oldest"}}</a>
<a class="{{if eq .SortType "alphabetically"}}active{{end}} item" href="{{$.Link}}?sort=alphabetically&q={{$.Keyword}}&tab={{$.TabName}}">{{.i18n.Tr "repo.issues.label.filter_sort.alphabetically"}}</a>
<a class="{{if eq .SortType "reversealphabetically"}}active{{end}} item" href="{{$.Link}}?sort=reversealphabetically&q={{$.Keyword}}&tab={{$.TabName}}">{{.i18n.Tr "repo.issues.label.filter_sort.reverse_alphabetically"}}</a>
<a class="{{if eq .SortType "recentupdate"}}active{{end}} item" href="{{$.Link}}?sort=recentupdate&q={{$.Keyword}}&tab={{$.TabName}}">{{.i18n.Tr "repo.issues.filter_sort.recentupdate"}}</a>
<a class="{{if eq .SortType "leastupdate"}}active{{end}} item" href="{{$.Link}}?sort=leastupdate&q={{$.Keyword}}&tab={{$.TabName}}">{{.i18n.Tr "repo.issues.filter_sort.leastupdate"}}</a>
</div>
</div>
</div>

<div class="ui clearing divider"></div>

<div class="ui user list">
{{range .Users}}
<div class="item">
<img class="ui avatar image" src="{{.RelAvatarLink}}">
<div class="content">
<span class="header">
<a href="{{.HomeLink}}">{{.Name}}</a> {{.FullName}}
{{if .Visibility.IsPrivate}}
<span class="text gold">{{svg "octicon-lock" 16}}</span>
{{end}}
</span>
<div class="description">
{{if .Location}}
{{svg "octicon-location" 16}} {{.Location}}
{{end}}
{{if and .Website}}
{{svg "octicon-link" 16}}
<a href="{{.Website}}" rel="nofollow">{{.Website}}</a>
{{end}}
{{svg "octicon-clock" 16}} {{$.i18n.Tr "user.join_on"}} {{.CreatedUnix.FormatShort}}
</div>
</div>
</div>
{{else}}
<div>{{$.i18n.Tr "explore.org_no_results"}}</div>
{{end}}
</div>

{{template "base/paginate" .}}
</div>
<div class="sixteen wide mobile six wide tablet three wide computer column">
{{template "explore/repo_right" .}}
</div>
</div>
</div>
</div>
{{template "base/footer" .}}

+ 0
- 75
custom/templates/explore/repo_list.tmpl View File

@@ -1,75 +0,0 @@
<h2 class="ui left floated medium header">
{{.i18n.Tr "explore.repos"}}
</h2>
<div class="ui right floated secondary filter menu">
<!-- Sort -->
<div class="ui right dropdown type jump item">
<span class="text">
{{.i18n.Tr "repo.issues.filter_sort"}}
<i class="dropdown icon"></i>
</span>
<div class="menu">
<a class="{{if eq .SortType "newest"}}active{{end}} item" href="{{$.Link}}?sort=newest&q={{$.Keyword}}&tab={{$.TabName}}">{{.i18n.Tr "repo.issues.filter_sort.latest"}}</a>
<a class="{{if eq .SortType "oldest"}}active{{end}} item" href="{{$.Link}}?sort=oldest&q={{$.Keyword}}&tab={{$.TabName}}">{{.i18n.Tr "repo.issues.filter_sort.oldest"}}</a>
<a class="{{if eq .SortType "alphabetically"}}active{{end}} item" href="{{$.Link}}?sort=alphabetically&q={{$.Keyword}}&tab={{$.TabName}}">{{.i18n.Tr "repo.issues.label.filter_sort.alphabetically"}}</a>
<a class="{{if eq .SortType "reversealphabetically"}}active{{end}} item" href="{{$.Link}}?sort=reversealphabetically&q={{$.Keyword}}&tab={{$.TabName}}">{{.i18n.Tr "repo.issues.label.filter_sort.reverse_alphabetically"}}</a>
<a class="{{if eq .SortType "recentupdate"}}active{{end}} item" href="{{$.Link}}?sort=recentupdate&q={{$.Keyword}}&tab={{$.TabName}}">{{.i18n.Tr "repo.issues.filter_sort.recentupdate"}}</a>
<a class="{{if eq .SortType "leastupdate"}}active{{end}} item" href="{{$.Link}}?sort=leastupdate&q={{$.Keyword}}&tab={{$.TabName}}">{{.i18n.Tr "repo.issues.filter_sort.leastupdate"}}</a>
<a class="{{if eq .SortType "moststars"}}active{{end}} item" href="{{$.Link}}?sort=moststars&q={{$.Keyword}}&tab={{$.TabName}}">{{.i18n.Tr "repo.issues.filter_sort.moststars"}}</a>
<a class="{{if eq .SortType "feweststars"}}active{{end}} item" href="{{$.Link}}?sort=feweststars&q={{$.Keyword}}&tab={{$.TabName}}">{{.i18n.Tr "repo.issues.filter_sort.feweststars"}}</a>
<a class="{{if eq .SortType "mostforks"}}active{{end}} item" href="{{$.Link}}?sort=mostforks&q={{$.Keyword}}&tab={{$.TabName}}">{{.i18n.Tr "repo.issues.filter_sort.mostforks"}}</a>
<a class="{{if eq .SortType "fewestforks"}}active{{end}} item" href="{{$.Link}}?sort=fewestforks&q={{$.Keyword}}&tab={{$.TabName}}">{{.i18n.Tr "repo.issues.filter_sort.fewestforks"}}</a>
</div>
</div>
</div>

<div class="ui clearing divider"></div>

<div class="ui repository list">
{{range .Repos}}
<div class="item">
<div class="ui header">
{{if .RelAvatarLink}}
<img class="ui avatar image" src="{{.RelAvatarLink}}">
{{end}}
<a class="name" href="{{.Link}}">
{{if or $.PageIsExplore $.PageIsProfileStarList }}{{if .Owner}}{{.Owner.Name}} / {{end}}{{end}}{{.Name}}
{{if .IsArchived}}<i class="archive icon archived-icon"></i>{{end}}
</a>
{{if .IsPrivate}}
<span class="middle text gold">{{svg "octicon-lock" 16}}</span>
{{else if .IsFork}}
<span class="middle">{{svg "octicon-repo-forked" 16}}</span>
{{else if .IsMirror}}
<span class="middle">{{svg "octicon-repo-clone" 16}}</span>
{{else if .Owner}}
{{if .Owner.Visibility.IsPrivate}}
<span class="text gold">{{svg "octicon-lock" 16}}</span>
{{end}}
{{end}}
<div class="ui right metas">
{{if .PrimaryLanguage }}
<span class="text grey"><i class="color-icon" style="background-color: {{.PrimaryLanguage.Color}}"></i>{{ .PrimaryLanguage.Language }}</span>
{{end}}
<span class="text grey">{{svg "octicon-star" 16}} {{.NumStars}}</span>
<span class="text grey">{{svg "octicon-git-branch" 16}} {{.NumForks}}</span>
</div>
</div>
<div class="description">
{{if .DescriptionHTML}}<p class="has-emoji">{{.DescriptionHTML}}</p>{{end}}
{{if .Topics }}
<div class="ui tags">
{{range .Topics}}
{{if ne . "" }}<a href="{{AppSubUrl}}/explore/repos?q={{.}}&topic=1"><div class="ui small label topic">{{.}}</div></a>{{end}}
{{end}}
</div>
{{end}}
<p class="time">{{$.i18n.Tr "org.repo_updated"}} {{TimeSinceUnix .UpdatedUnix $.i18n.Lang}}</p>
</div>
</div>
{{else}}
<div>
{{$.i18n.Tr "explore.repo_no_results"}}
</div>
{{end}}
</div>

+ 0
- 1
custom/templates/explore/repo_right.tmpl View File

@@ -1 +0,0 @@
<img class="ui mini image" src="/img/banner-qimen-4X3.jpg" style="width:100%;">

+ 0
- 14
custom/templates/explore/repo_search.tmpl View File

@@ -1,14 +0,0 @@
<div class="repos--seach">
<div class="ui container">
<div class="ui two column centered grid">
<form class="mobile ten wide tablet computer column ui form ignore-dirty">
<div class="ui fluid action input">
<input name="q" value="{{.Keyword}}" placeholder="{{.i18n.Tr "explore.search"}}..." autofocus>
<input type="hidden" name="tab" value="{{$.TabName}}">
<input type="hidden" name="sort" value="{{$.SortType}}">
<button class="ui blue button">{{.i18n.Tr "explore.search"}}</button>
</div>
</form>
</div>
</div>
</div>

+ 0
- 20
custom/templates/explore/repos.tmpl View File

@@ -1,20 +0,0 @@
{{template "base/head" .}}
<div class="explore repositories">

{{template "explore/repo_search" .}}

<div class="ui container">
<div class="ui grid">
{{template "explore/navbar" .}}

<div class="ui sixteen wide mobile ten wide tablet ten wide computer column">
{{template "explore/repo_list" .}}
{{template "base/paginate" .}}
</div>
<div class="ui sixteen wide mobile six wide tablet three wide computer column">
{{template "explore/repo_right" .}}
</div>
</div>
</div>
</div>
{{template "base/footer" .}}

+ 0
- 13
custom/templates/explore/search.tmpl View File

@@ -1,13 +0,0 @@
<div class="repos--seach">
<div class="ui container">
<div class="ui two column centered grid">
<form class="sixteen wide mobile eight fourteen tablet fourteen wide computer column ui form ignore-dirty">
<div class="ui fluid action input">
<input name="q" value="{{.Keyword}}" placeholder="{{.i18n.Tr "explore.search"}}..." autofocus>
<input type="hidden" name="tab" value="{{$.TabName}}">
<button class="ui blue button">{{.i18n.Tr "explore.search"}}</button>
</div>
</form>
</div>
</div>
</div>

+ 0
- 63
custom/templates/explore/users.tmpl View File

@@ -1,63 +0,0 @@
{{template "base/head" .}}
<div class="explore users">
{{template "explore/search" .}}
<div class="ui container">
<div class="ui grid">
{{template "explore/navbar" .}}
<div class="sixteen mobile ten wide tablet computer column">

<h2 class="ui left floated medium header">
{{.i18n.Tr "explore.users"}}
</h2>
<div class="ui right floated secondary filter menu">
<!-- Sort -->
<div class="ui right dropdown type jump item">
<span class="text">
{{.i18n.Tr "repo.issues.filter_sort"}}
<i class="dropdown icon"></i>
</span>
<div class="menu">
<a class="{{if eq .SortType "newest"}}active{{end}} item" href="{{$.Link}}?sort=newest&q={{$.Keyword}}&tab={{$.TabName}}">{{.i18n.Tr "repo.issues.filter_sort.latest"}}</a>
<a class="{{if eq .SortType "oldest"}}active{{end}} item" href="{{$.Link}}?sort=oldest&q={{$.Keyword}}&tab={{$.TabName}}">{{.i18n.Tr "repo.issues.filter_sort.oldest"}}</a>
<a class="{{if eq .SortType "alphabetically"}}active{{end}} item" href="{{$.Link}}?sort=alphabetically&q={{$.Keyword}}&tab={{$.TabName}}">{{.i18n.Tr "repo.issues.label.filter_sort.alphabetically"}}</a>
<a class="{{if eq .SortType "reversealphabetically"}}active{{end}} item" href="{{$.Link}}?sort=reversealphabetically&q={{$.Keyword}}&tab={{$.TabName}}">{{.i18n.Tr "repo.issues.label.filter_sort.reverse_alphabetically"}}</a>
<a class="{{if eq .SortType "recentupdate"}}active{{end}} item" href="{{$.Link}}?sort=recentupdate&q={{$.Keyword}}&tab={{$.TabName}}">{{.i18n.Tr "repo.issues.filter_sort.recentupdate"}}</a>
<a class="{{if eq .SortType "leastupdate"}}active{{end}} item" href="{{$.Link}}?sort=leastupdate&q={{$.Keyword}}&tab={{$.TabName}}">{{.i18n.Tr "repo.issues.filter_sort.leastupdate"}}</a>
</div>
</div>
</div>

<div class="ui clearing divider"></div>

<div class="ui user list">
{{range .Users}}
<div class="item">
<img class="ui avatar image" src="{{.RelAvatarLink}}">
<div class="content">
<span class="header"><a href="{{.HomeLink}}">{{.Name}}</a> {{.FullName}}</span>
<div class="description">
{{if .Location}}
{{svg "octicon-location" 16}} {{.Location}}
{{end}}
{{if and $.ShowUserEmail .Email $.IsSigned (not .KeepEmailPrivate)}}
{{svg "octicon-mail" 16}}
<a href="mailto:{{.Email}}" rel="nofollow">{{.Email}}</a>
{{end}}
{{svg "octicon-clock" 16}} {{$.i18n.Tr "user.join_on"}} {{.CreatedUnix.FormatShort}}
</div>
</div>
</div>
{{else}}
<div>{{$.i18n.Tr "explore.user_no_results"}}</div>
{{end}}
</div>
{{template "base/paginate" .}}
</div>
<div class="sixteen wide mobile six wide tablet three wide computer column">
{{template "explore/repo_right" .}}
</div>

</div>
</div>
</div>
{{template "base/footer" .}}

+ 0
- 254
custom/templates/home.tmpl View File

@@ -1,254 +0,0 @@
{{template "base/head" .}}
<div class="home">
<script>
document.addEventListener('DOMContentLoaded', function () {
particleground(document.getElementById('particles'), {
dotColor: 'rgba(0,176,240,0.2)',
lineColor: 'rgba(68,114,196,0.1)'
});
var intro = document.getElementById('intro');
intro.style.marginTop = - intro.offsetHeight / 2 + 'px';
}, false);
</script>
<div id="index-project">
<div id="particles"></div>
<div class="center aligned ui container inverted segment"><!--内容宽度,默认1127px-->
<h1 class="ui header section--header">启智社区
<p class="sub header">Open Intelligence,Open Source,Open Community,Open Ecosystem</p>
</h1>
<div class="ui six column grid prorow">
<div class="eight wide mobile four wide tablet four wide computer column ipros">
<div class="ui card">
<div class="image"><img src="http://www.openi.org.cn/statics/openi/images/index/openi-paddle.png" style=" height:20px;"></div>
<div class="content ui grid">
<div class="header right aligned eight wide column" style=" border-right:2px solid #ffc000">
<span style="color: #5170ff;">OpenI</span> <b style="color:#FFF">DL</b>
</div>
<div class="header left aligned eight wide column">
<span style="color: #5170ff;">OpenI</span> <b style="color:#ffc000">RL</b>
</div>
</div>
<div class="extra content">
<div class="center floated author">
贡献者:百度
</div>
</div>
</div>
<a class="flip" href="http://www.openi.org.cn/html/2020/Framework_0325/12.html"></a>
</div>
<div class="eight wide mobile three wide tablet three wide computer column ipros">
<div class="ui card">
<div class="image">
<img src="http://www.openi.org.cn/statics/openi/images/index/openi-tianyuan.png" alt="Brain++·天元" style=" height:50px;">
</div>
<div class="content">
<div class="header">Brain++·天元</div>
</div>
<div class="extra content">
<div class="center floated author">
贡献者:旷视
</div>
</div>
</div>
<a class="flip" href="/html/2020/Framework_0325/18.html"></a>
</div>
<div class="eight wide mobile four wide tablet four wide computer column ipros">
<div class="ui card">
<div class="content ui grid">
<div class="header eight wide column" style=" border-right:2px solid #ffc000">
<div><span style="color: #5170ff;">OpenI</span> <b style="color:#FFF">天璇</b></div>
</div>
<div class="header eight wide column">
<div><span style="color: #5170ff;">OpenI</span> <b style="color:#FFF">天枢</b></div>
</div>
<div class="eight wide column" style=" border-right:2px solid #ffc000; padding-top:0">
<div class="meta">AVS3 解码</div>
</div>
<div class="eight wide column" style="padding-top:0">
<div class="meta">AVS3 编码</div>
</div>
</div>
<div class="extra content">
<div class="center floated author">
贡献者:北大深研院、鹏城实验室、深圳市超高清创新中心
</div>
</div>
</div>
<a class="flip" style="border-style:dashed;"></a>
</div>
<div class="eight wide mobile three wide tablet three wide computer column ipros">
<div class="ui card">
<div class="content">
<div class="header" style=" padding-top:0.8em;padding-bottom:0.5em"><span style="color: #5170ff;">OpenI</span> <b style="color:#FFF">海参</b></div>
<div class="meta">基于深度学习的视频智能编码</div>
</div>
<div class="extra content">
<div class="center floated author">
贡献者:鹏城实验室、北大、武大、中科大、哈工大
</div>
</div>
</div>
<a class="flip" href="/html/2020/Framework_0325/18.html"></a>
</div>
<div class="sixteen wide mobile two wide tablet two wide computer column">
<div class="ui card">
<div class="content">
<div class="header" ><i class="ellipsis horizontal icon"></i></div>
</div>
</div>
<div class="flip flip-more"></div>
</div>
</div>
<div class="ui divider" style="margin-top:2.0em; margin-bottom:2.0em;"></div>
<div class="ui six column grid prorow">
<div class="eight wide mobile four wide tablet four wide computer column ipros">
<div class="ui card">
<div class="image">
<img src="http://www.openi.org.cn/statics/openi/images/index/openi-octopus.png" alt="启智章鱼" style=" height:50px;">
</div>
<div class="content">
<div class="meta">新一代智能资源管理系统</div>
</div>
<div class="extra content">
<div class="center floated author">
贡献者:鹏城实验室、北大
</div>
</div>
</div>
<a class="flip flip-blue" href="/html/2020/Environment_0325/9.html"></a>
</div>
<div class="eight wide mobile three wide tablet three wide computer column ipros">
<div class="ui card">
<div class="image">
<img src="http://www.openi.org.cn/statics/openi/images/index/openi-shanhu.png" alt="OpenI珊瑚" style=" height:50px;">
</div>
<div class="content">
<div class="meta">异构资源调度项目</div>
</div>
<div class="extra content">
<div class="center floated author">
贡献者:华为
</div>
</div>
</div>
<a class="flip flip-blue" href="/html/2020/Environment_0325/10.html"></a>
</div>
<div class="five wide mobile three wide tablet three wide computer column ipros">
<div class="ui card">
<div class="image">
<img src="http://www.openi.org.cn/statics/openi/images/index/openi-trustie.png" alt="启智Trustie" style=" height:50px;">
</div>
<div class="content">
<div class="meta">群体化协同创新环境</div>
</div>
<div class="extra content">
<div class="center floated author">
贡献者:国防科大、北航、北大…
</div>
</div>
</div>
<a class="flip flip-green" href="/html/2020/Environment_0325/11.html"></a>
</div>
<div class="five wide mobile three wide tablet three wide computer column ipros">
<div class="ui card">
<div class="image">
<img src="http://www.openi.org.cn/statics/openi/images/index/huawei.png" alt="华为" style=" height:25px; margin-top:32px;">
</div>
<div class="content">
<div class="meta">华为软开云</div>
</div>
</div>
<a class="flip flip-green"></a>
</div>
<div class="six wide mobile three wide tablet three wide computer column ipros">
<div class="ui card">
<div class="image">
<img src="http://www.openi.org.cn/statics/openi/images/index/openi-zhongheng.png" alt="OpenI 纵横" style=" height:50px;">
</div>
<div class="content">
<div class="meta">数据协同环境</div>
</div>
<div class="extra content">
<div class="center floated author">
贡献者:微众银行
</div>
</div>
</div>
<a class="flip flip-green" href="/html/2020/Environment_0325/13.html"></a>
</div>
</div>
<div class="ui divider" style="margin-top:2.0em; margin-bottom:2.0em;"></div>
<div class="ui six column grid prorow">
<div class="sixteen wide mobile six wide tablet six wide computer column ipros">
<div class="content ui grid">
<div class="header sixteen wide column">
<div class="ui centered card" style=" margin-top:0.5em; margin-bottom:0.5em;">
<div class="content">
<div class="header">鹏城云脑1、2</div>
</div>
</div>
<a class="flip flip-green"></a>
</div>
<div class="header sixteen wide column">
<div class="ui centered card" style=" margin-top:0.5em; margin-bottom:0.5em;">
<div class="content">
<div class="header">北京、合肥、苏州…</div>
</div>
</div>
<a class="flip flip-green"></a>
</div>
</div>
</div>
<div class="eight wide mobile two wide tablet four wide computer column ipros">
<div class="ui card">
<div class="content">
<div class="header" style=" padding-top:0.8em;padding-bottom:0.5em"><span style="color: #5170ff;">OpenI</span> <b style="color:#FFF">海藻</b></div>
<div class="meta">可配置指令集和微架构的AI开源芯片</div>
</div>
<div class="extra content">
<div class="center floated author">
贡献者:北大、中科院、鹏城实验室
</div>
</div>
</div>
<a class="flip flip-green" href="/html/2020/Framework_0325/15.html"></a>
</div>
<div class="eight wide mobile three wide tablet four wide computer column ipros">
<div class="ui card">
<div class="image">
<img src="http://www.openi.org.cn/statics/openi/images/index/huaweicloud.png" alt="华为云" style=" height:50px; margin-top:32px;">
</div>
</div>
<a class="flip flip-green"></a>
</div>
<div class="sixteen wide mobile two wide tablet two wide computer column">
<div class="ui card">
<div class="content">
<div class="header" ><i class="ellipsis horizontal icon"></i></div>
</div>
</div>
<div class="flip flip-more"></div>
</div>
</div>
</div>
</div>

<div class="ui stackable middle very relaxed page grid">
<div class="center column">
<h1 class="ui header section--header" style=" margin-top:1.0em">启智社区期待您的加入</h1>
<p class="large" style="padding: 0 0 43px;">
OpenI社区旨在促进人工智能领域的开源开放协同创新,构建OpenI的技术链、创新链和生态链、推动人工智能产业健康快速发展及其在社会经济各领域的广泛应用。围绕重大产业创新,汇聚创新资源,促进众创共享,形成产业生态的目标,让"一体两翼"构想下的以技术专家为主体组成的多个工作组(标准工作组、知识产权工作组、投融资工作组、开源治理工作组等)、和以企业为主体的多个应用推进组(智能交通推进组、智能医疗推进组、智能金融推进组、智能教育推进组等)作为一个整体进行工作。以"完全开源、完全开放、完全免费、尊重创新"为准则,汇聚学术机构、商业实体、自然人或任何其他法人,共建共享开源软件、开源硬件和开源数据的超级社区;以众智、赛智、创智、有智等工作方法,努力建设成具有国际影响力的人工智能开源开放平台。
</p>
<a class="ui blue button" href="https://www.openi.org.cn/html/Club/2019/0228/17.html" style="padding-left:5.0rem;padding-right:5.0rem;">加入OpenI社区 <i class="arrow right icon"></i></a>
<div style="margin-top:80px;">
<img src="https://www.openi.org.cn/statics/openi/images/index/mem-logos.png" alt="OpenI前期参与成员" style="width:100%; max-width:1200px;">
</div>
</div>
</div>
</div>
{{template "base/footer" .}}

+ 0
- 27
custom/templates/org/header.tmpl View File

@@ -1,27 +0,0 @@

<div class="organization-header">
<div class="ui container">
<div class="ui vertically grid head">
<div class="column">
<div class="ui header">
{{with .Org}}
<img class="ui image" src="{{.SizedRelAvatarLink 100}}">
<span class="text thin grey"><a href="{{.HomeLink}}">{{.DisplayName}}</a></span>
{{end}}
{{if .IsOrganizationOwner}}
<div class="ui right">
<a class="ui green button" href="{{.OrgLink}}/teams/new">{{svg "octicon-plus" 16}} {{.i18n.Tr "org.create_new_team"}}</a>
</div>
{{end}}
{{if .CanCreateOrgRepo}}
<div class="ui right">
<a class="ui green button" href="{{AppSubUrl}}/repo/create?org={{.Org.ID}}">{{svg "octicon-plus" 16}} {{.i18n.Tr "new_repo"}}</a>
</div>
{{end}}
</div>
</div>
</div>
</div>
</div>


+ 0
- 87
custom/templates/org/home.tmpl View File

@@ -1,87 +0,0 @@
{{template "base/head" .}}
<div class="organization profile">
{{/* overflow: auto is the clearfix - this avoids the image going beyond
the container where it is supposed to stay inside. */}}
<div class="organization-info">
<div class="ui center aligned container " style="overflow: auto">
<img class="ui circular image" id="org-avatar" src="{{.Org.SizedRelAvatarLink 140}}"/>
<div id="org-info">
<div class="ui header">
{{.Org.DisplayName}}
{{if .IsOrganizationOwner}}<a class="middle text grey" href="{{.OrgLink}}/settings">{{svg "octicon-gear" 16}}</a>{{end}}
</div>
{{if .Org.Description}}<p class="text grey desc">{{.Org.Description}}</p>{{end}}
<div class="meta">
{{if .Org.Location}}<div class="item">{{svg "octicon-location" 16}} <span>{{.Org.Location}}</span></div>{{end}}
{{if .Org.Website}}<div class="item">{{svg "octicon-link" 16}} <a target="_blank" rel="noopener noreferrer" href="{{.Org.Website}}">{{.Org.Website}}</a></div>{{end}}
</div>
</div>
</div>
</div>

<div class="ui container">
<div class="ui stackable grid">
{{template "org/navber" .}}
<div class="ui fourteen wide computer column">
<div class="ui mobile reversed stackable grid">
<div class="ui ten wide tablet eleven wide computer column">
{{if .CanCreateOrgRepo}}
<div class="text right">
<a class="ui green button" href="{{AppSubUrl}}/repo/create?org={{.Org.ID}}">{{.i18n.Tr "new_repo"}}</a>
</div>
{{end}}
{{template "org/repo_list" .}}
{{template "base/paginate" .}}
</div>

<div class="ui sixteen wide mobile six wide tablet five wide computer column">
<h4 class="ui top attached header">
<strong>{{.i18n.Tr "org.people"}}</strong>
{{if .IsOrganizationMember}}
<div class="ui right">
<a class="text grey" href="{{.OrgLink}}/members">{{.Org.NumMembers}} {{svg "octicon-chevron-right" 16}}</a>
</div>
{{end}}
</h4>
<div class="ui attached segment members">
{{$isMember := .IsOrganizationMember}}
{{range .Members}}
{{if or $isMember (.IsPublicMember $.Org.ID)}}
<a href="{{.HomeLink}}" title="{{.Name}}{{if .FullName}} ({{.FullName}}){{end}}"><img class="ui avatar" src="{{.RelAvatarLink}}"></a>
{{end}}
{{end}}
</div>

{{if .IsOrganizationMember}}
<div class="ui top attached header">
<strong>{{.i18n.Tr "org.teams"}}</strong>
<div class="ui right">
<a class="text grey" href="{{.OrgLink}}/teams"><span>{{.Org.NumTeams}}</span> {{svg "octicon-chevron-right" 16}}</a>
</div>
</div>
<div class="ui attached table segment teams">
{{range .Teams}}
<div class="item">
<a href="{{$.OrgLink}}/teams/{{.LowerName}}"><strong class="team-name">{{.Name}}</strong></a>
<p class="text grey">
<a href="{{$.OrgLink}}/teams/{{.LowerName}}"><strong>{{.NumMembers}}</strong> {{$.i18n.Tr "org.lower_members"}}</a> ·
<a href="{{$.OrgLink}}/teams/{{.LowerName}}/repositories"><strong>{{.NumRepos}}</strong> {{$.i18n.Tr "org.lower_repositories"}}</a>
</p>
</div>
{{end}}
</div>
{{if .IsOrganizationOwner}}
<div class="ui bottom attached segment">
<a class="ui blue small button" href="{{.OrgLink}}/teams/new">{{.i18n.Tr "org.create_new_team"}}</a>
</div>
{{end}}
{{end}}
</div>
</div>
</div>
</div>
</div>
</div>
{{template "base/footer" .}}

+ 0
- 75
custom/templates/org/member/members.tmpl View File

@@ -1,75 +0,0 @@
{{template "base/head" .}}
<div class="organization members">
{{template "org/header" .}}
<div class="ui container">
{{template "base/alert" .}}
<div class="ui stackable grid">
{{template "org/navber" .}}
<div class="ui fourteen wide computer column list">
{{ range .Members}}
<div class="item ui grid">
<div class="ui two wide column">
<img class="ui avatar" src="{{.SizedRelAvatarLink 48}}">
</div><div class="ui three wide column">
<div class="meta"><a href="{{.HomeLink}}">{{.Name}}</a></div>
<div class="meta">{{.FullName}}</div>
</div><div class="ui four wide column center">
<div class="meta">
{{$.i18n.Tr "org.members.membership_visibility"}}
</div>
<div class="meta">
{{ $isPublic := index $.MembersIsPublicMember .ID}}
{{if $isPublic}}
<strong>{{$.i18n.Tr "org.members.public"}}</strong>
{{if or (eq $.SignedUser.ID .ID) $.IsOrganizationOwner}}(<a class="link-action" href data-url="{{$.OrgLink}}/members/action/private?uid={{.ID}}">{{$.i18n.Tr "org.members.public_helper"}}</a>){{end}}
{{else}}
<strong>{{$.i18n.Tr "org.members.private"}}</strong>
{{if or (eq $.SignedUser.ID .ID) $.IsOrganizationOwner}}(<a class="link-action" href data-url="{{$.OrgLink}}/members/action/public?uid={{.ID}}">{{$.i18n.Tr "org.members.private_helper"}}</a>){{end}}
{{end}}
</div>
</div><div class="ui three wide column center">
<div class="meta">
{{$.i18n.Tr "org.members.member_role"}}
</div>
<div class="meta">
<strong>{{if index $.MembersIsUserOrgOwner .ID}}{{svg "octicon-shield-lock" 16}} {{$.i18n.Tr "org.members.owner"}}{{else}}{{$.i18n.Tr "org.members.member"}}{{end}}</strong>
</div>
</div><div class="ui one wide column center">
<div class="meta">
2FA
</div>
<div class="meta">
<strong>
{{if index $.MembersTwoFaStatus .ID}}
<span class="text green">{{svg "octicon-check" 16}}</span>
{{else}}
{{svg "octicon-x" 16}}
{{end}}
</strong>
</div>
</div><div class="ui three wide column">
<div class="text right">
{{if eq $.SignedUser.ID .ID}}
<form method="post" action="{{$.OrgLink}}/members/action/leave">
{{$.CsrfTokenHtml}}
<button type="submit" class="ui red small button" name="uid" value="{{.ID}}">{{$.i18n.Tr "org.members.leave"}}</button>
</form>
{{else if $.IsOrganizationOwner}}
<form method="post" action="{{$.OrgLink}}/members/action/remove">
{{$.CsrfTokenHtml}}
<button type="submit" class="ui red small button" name="uid" value="{{.ID}}">{{$.i18n.Tr "org.members.remove"}}</button>
</form>
{{end}}
</div>
</div>
</div>
{{end}}
</div>
{{template "base/paginate" .}}
</div>
</div>
</div>
{{template "base/footer" .}}

+ 0
- 48
custom/templates/org/team/teams.tmpl View File

@@ -1,48 +0,0 @@
{{template "base/head" .}}
<div class="organization teams">
{{template "org/header" .}}
<div class="ui container">
{{template "base/alert" .}}

<div class="ui stackable grid">
{{template "org/navber" .}}
<div class="ui fourteen wide computer column list">
<div class="ui two column grid">
{{range .Teams}}
<div class="column">
<div class="ui top attached header">
<a class="text black" href="{{$.OrgLink}}/teams/{{.LowerName}}"><strong>{{.Name}}</strong></a>
<div class="ui right">
{{if .IsMember $.SignedUser.ID}}
<form method="post" action="{{$.OrgLink}}/teams/{{.LowerName}}/action/leave">
{{$.CsrfTokenHtml}}
<button type="submit" class="ui red small button" name="uid" value="{{$.SignedUser.ID}}">{{$.i18n.Tr "org.teams.leave"}}</button>
</form>
{{else if $.IsOrganizationOwner}}
<form method="post" action="{{$.OrgLink}}/teams/{{.LowerName}}/action/join">
{{$.CsrfTokenHtml}}
<button type="submit" class="ui blue small button" name="uid" value="{{$.SignedUser.ID}}">{{$.i18n.Tr "org.teams.join"}}</button>
</form>
{{end}}
</div>
</div>
<div class="ui attached segment members">
{{range .Members}}
<a href="{{.HomeLink}}" title="{{.Name}}">
<img class="ui avatar image" src="{{.RelAvatarLink}}">
</a>
{{end}}
</div>
<div class="ui bottom attached header">
<p class="team-meta">{{.NumMembers}} {{$.i18n.Tr "org.lower_members"}} · {{.NumRepos}} {{$.i18n.Tr "org.lower_repositories"}}</p>
</div>
</div>
{{end}}
</div>
</div>
</div>
</div>
</div>
{{template "base/footer" .}}

+ 0
- 10
custom/templates/user/auth/signin.tmpl View File

@@ -1,10 +0,0 @@
{{template "base/head" .}}
<div class="user signin{{if .LinkAccountMode}} icon{{end}}">
{{template "user/auth/signin_navbar" .}}
<div class="ui container">
<div class="ui raised very padded text container segment">
{{template "user/auth/signin_inner" .}}
</div>
</div>
</div>
{{template "base/footer" .}}

+ 0
- 103
custom/templates/user/auth/signin_inner.tmpl View File

@@ -1,103 +0,0 @@
<style>
.full.height{background-color: #F9F9F9;}
.ui.left:not(.action){ float:none;}
.ui.left{ float:none;}
.ui.secondary.pointing.menu{ border-bottom:none;}
</style>
{{if or (not .LinkAccountMode) (and .LinkAccountMode .LinkAccountModeSignIn)}}
{{template "base/alert" .}}
{{end}}

<div class="ui centered grid">
<div class="sixteen wide mobile ten wide tablet ten wide computer column">
<div class="ui bottom aligned two column grid">
<div class="column">
<h2 class="ui header">
{{if .LinkAccountMode}}
{{.i18n.Tr "auth.oauth_signin_title"}}
{{else}}
{{.i18n.Tr "auth.login_userpass"}}
{{end}}
</h2>
</div>
{{if .ShowRegistrationButton}}
<div class="ui right floated column">
<a href="{{AppSubUrl}}/user/sign_up">{{.i18n.Tr "auth.sign_up_now" | Str2html}}</a>
</div>
{{end}}
</div>

<div class="ui grid">
<div class="column">
<form class="ui form" action="{{.SignInLink}}" method="post">
{{.CsrfTokenHtml}}
<div class="field">
<div class="ui left icon input {{if and (.Err_UserName) (or (not .LinkAccountMode) (and .LinkAccountMode .LinkAccountModeSignIn))}}error{{end}}">
<i class="user icon"></i>
<input id="user_name" name="user_name" value="{{.user_name}}" placeholder="{{.i18n.Tr "home.uname_holder"}}" autofocus required>
</div>
</div>
{{if or (not .DisablePassword) .LinkAccountMode}}
<div class="field">
<div class="ui left icon input {{if and (.Err_Password) (or (not .LinkAccountMode) (and .LinkAccountMode .LinkAccountModeSignIn))}}error{{end}}">
<i class="lock icon"></i>
<input id="password" name="password" type="password" value="{{.password}}" placeholder="{{.i18n.Tr "password"}}" autocomplete="off" required>
</div>
</div>
{{end}}
{{if not .LinkAccountMode}}
<div class="two fields inline">
<div class="field">
<div class="ui checkbox">
<label>{{.i18n.Tr "auth.remember_me"}}</label>
<input name="remember" type="checkbox">
</div>
</div>
<div class="field" style="padding-right: 0; text-align: right;">
<a href="{{AppSubUrl}}/user/forgot_password">{{.i18n.Tr "auth.forgot_password"}}</a>
</div>
</div>
{{end}}

<div class="ui hidden divider"></div>

<div class="center aligned field">
<button class="fluid large ui blue button">
{{if .LinkAccountMode}}
{{.i18n.Tr "auth.oauth_signin_submit"}}
{{else}}
{{.i18n.Tr "sign_in"}}
{{end}}
</button>
</div>

{{if and .OrderedOAuth2Names .OAuth2Providers}}
<div class="ui centered grid">
<div class="sixteen wide mobile ten wide tablet ten wide computer column">
<div class="oauth2 center">
<div id="oauth2-login-loader" class="ui disabled centered loader"></div>
<div>
<div id="oauth2-login-navigator">
<p>{{.i18n.Tr "sign_in_with"}}</p>
{{range $key := .OrderedOAuth2Names}}
{{$provider := index $.OAuth2Providers $key}}
<a href="{{AppSubUrl}}/user/oauth2/{{$key}}">
<img
alt="{{$provider.DisplayName}}{{if eq $provider.Name "openidConnect"}} ({{$key}}){{end}}"
title="{{$provider.DisplayName}}{{if eq $provider.Name "openidConnect"}} ({{$key}}){{end}}"
class="{{$provider.Name}}"
src="{{AppSubUrl}}{{$provider.Image}}"
onclick="window.onOAuthLoginClick()"
></a>
{{end}}
</div>
</div>
</div>
</div>
</div>
{{end}}
</form>
</div>
</div>
</div>
</div>

+ 0
- 85
custom/templates/user/auth/signup_inner.tmpl View File

@@ -1,85 +0,0 @@
<style>
.full.height{background-color: #F9F9F9;}
</style>

<div class="ui container very padded {{if .LinkAccountMode}} icon{{end}}" style=" padding-top: 5.0rem; padding-bottom: 3.0rem;">
<div class="ui raised very padded text container segment">
<div class="ui centered grid">
<div class="sixteen wide mobile ten wide tablet ten wide computer column">
<div class="ui bottom aligned two column grid">
<div class="column">
<h2 class="ui header">
{{if .LinkAccountMode}}
{{.i18n.Tr "auth.oauth_signup_title"}}
{{else}}
{{.i18n.Tr "sign_up"}}
{{end}}
</h2>
</div>
{{if not .LinkAccountMode}}
<div class="ui right floated column">
<a href="{{AppSubUrl}}/user/login">{{.i18n.Tr "auth.register_helper_msg"}}</a>
</div>
{{end}}
</div>
<div class="ui grid">
<div class="column">
<form class="ui form" action="{{.SignUpLink}}" method="post">
{{.CsrfTokenHtml}}
{{if or (not .LinkAccountMode) (and .LinkAccountMode .LinkAccountModeRegister)}}
{{template "base/alert" .}}
{{end}}
{{if .DisableRegistration}}
<p>{{.i18n.Tr "auth.disable_register_prompt"}}</p>
{{else}}
<div class="field {{if and (.Err_UserName) (or (not .LinkAccountMode) (and .LinkAccountMode .LinkAccountModeRegister))}}error{{end}}">
<input id="user_name" name="user_name" value="{{.user_name}}" placeholder="{{.i18n.Tr "username"}}" autofocus required>
</div>
<div class="field {{if .Err_Email}}error{{end}}">
<input id="email" name="email" type="email" value="{{.email}}" placeholder="{{.i18n.Tr "email"}}" required>
</div>

{{if not .DisablePassword}}
<div class="field {{if and (.Err_Password) (or (not .LinkAccountMode) (and .LinkAccountMode .LinkAccountModeRegister))}}error{{end}}">
<input id="password" name="password" type="password" value="{{.password}}" placeholder="{{.i18n.Tr "password"}}" autocomplete="off" required>
</div>
<div class="field {{if and (.Err_Password) (or (not .LinkAccountMode) (and .LinkAccountMode .LinkAccountModeRegister))}}error{{end}}">
<input id="retype" name="retype" type="password" value="{{.retype}}" placeholder="{{.i18n.Tr "re_type"}}" autocomplete="off" required>
</div>
{{end}}
{{if and .EnableCaptcha (eq .CaptchaType "image")}}
<div class="field">
{{.Captcha.CreateHtml}}
</div>
<div class="field {{if .Err_Captcha}}error{{end}}">
<input id="captcha" name="captcha" value="{{.captcha}}" placeholder="{{.i18n.Tr "captcha"}}" autocomplete="off">
</div>
{{end}}
{{if and .EnableCaptcha (eq .CaptchaType "recaptcha")}}
<div class="field required">
<div class="g-recaptcha" data-sitekey="{{ .RecaptchaSitekey }}"></div>
</div>
{{end}}
<div class="ui hidden divider"></div>

<div class="center aligned field">
<button class="fluid large ui blue button">
{{if .LinkAccountMode}}
{{.i18n.Tr "auth.oauth_signup_submit"}}
{{else}}
{{.i18n.Tr "auth.create_new_account"}}
{{end}}
</button>
</div>
{{end}}
</form>
</div>
</div>
</div>
</div>
</div>
</div>

+ 0
- 59
custom/templates/user/dashboard/navbar.tmpl View File

@@ -1,59 +0,0 @@
<div class="dashboard-navbar">
<div class="ui container secondary stackable menu">
<div class="item">
<div class="ui floating dropdown link jump">
<span class="text">
<img class="ui avatar image" src="{{.ContextUser.RelAvatarLink}}" title="{{.ContextUser.Name}}" width="28" height="28">
{{.ContextUser.ShortName 20}}
<i class="dropdown icon"></i>
</span>
<div class="context user overflow menu" tabindex="-1">
<div class="ui header">
{{.i18n.Tr "home.switch_dashboard_context"}}
</div>
<div class="scrolling menu items">
<a class="{{if eq .ContextUser.ID .SignedUser.ID}}active selected{{end}} item" href="{{AppSubUrl}}/{{if .PageIsIssues}}issues{{else if .PageIsPulls}}pulls{{else if .PageIsMilestonesDashboard}}milestones{{end}}">
<img class="ui avatar image" src="{{.SignedUser.RelAvatarLink}}" width="28" height="28">
{{.SignedUser.Name}}
</a>
{{range .Orgs}}
<a class="{{if eq $.ContextUser.ID .ID}}active selected{{end}} item" title="{{.Name}}" href="{{AppSubUrl}}/org/{{.Name}}/{{if $.PageIsIssues}}issues{{else if $.PageIsPulls}}pulls{{else if $.PageIsMilestonesDashboard}}milestones{{else}}dashboard{{end}}">
<img class="ui avatar image" src="{{.RelAvatarLink}}" width="28" height="28">
{{.ShortName 20}}
</a>
{{end}}
</div>
{{if .SignedUser.CanCreateOrganization}}
<a class="item" href="{{AppSubUrl}}/org/create">
{{svg "octicon-plus" 16}}&nbsp;&nbsp;&nbsp;{{.i18n.Tr "new_org"}}
</a>
{{end}}
</div>
</div>
</div>

{{if .ContextUser.IsOrganization}}
<div class="right stackable menu">
<a class="{{if .PageIsNews}}active{{end}} item" style="margin-left: auto" href="{{AppSubUrl}}/org/{{.ContextUser.Name}}/dashboard">
{{svg "octicon-rss" 16}}&nbsp;{{.i18n.Tr "activities"}}
</a>
<a class="{{if .PageIsIssues}}active{{end}} item" href="{{AppSubUrl}}/org/{{.ContextUser.Name}}/issues">
{{svg "octicon-issue-opened" 16}}&nbsp;{{.i18n.Tr "issues"}}
</a>
<a class="{{if .PageIsPulls}}active{{end}} item" href="{{AppSubUrl}}/org/{{.ContextUser.Name}}/pulls">
{{svg "octicon-git-pull-request" 16}}&nbsp;{{.i18n.Tr "pull_requests"}}
</a>
{{if .ShowMilestonesDashboardPage}}
<a class="{{if .PageIsMilestonesDashboard}}active{{end}} item" href="{{AppSubUrl}}/org/{{.ContextUser.Name}}/milestones">
{{svg "octicon-milestone" 16}}&nbsp;{{.i18n.Tr "milestones"}}
</a>
{{end}}
<div class="item">
<a class="ui blue basic button" href="{{.ContextUser.HomeLink}}" title='{{.i18n.Tr "home.view_home" .ContextUser.Name}}'>
{{.i18n.Tr "home.view_home" (.ContextUser.ShortName 10)}}
</a>
</div>
</div>
{{end}}
</div>
</div>

+ 16
- 1
models/attachment.go View File

@@ -31,9 +31,24 @@ type Attachment struct {
Name string
DownloadCount int64 `xorm:"DEFAULT 0"`
Size int64 `xorm:"DEFAULT 0"`
IsPrivate bool `xorm:"DEFAULT false"`
CreatedUnix timeutil.TimeStamp `xorm:"created"`
}

func (a *Attachment) AfterUpdate() {
if a.DatasetID > 0 {
datasetIsPublicCount, err := x.Where("dataset_id = ? AND is_private = ?", a.DatasetID, false).Count(new(Attachment))
if err != nil {
return
}
if datasetIsPublicCount > 0 {
x.Table(new(Dataset)).ID(a.DatasetID).Update(map[string]interface{}{"status": DatasetStatusPublic})
} else {
x.Table(new(Dataset)).ID(a.DatasetID).Update(map[string]interface{}{"status": DatasetStatusPrivate})
}
}
}

// IncreaseDownloadCount is update download count + 1
func (a *Attachment) IncreaseDownloadCount() error {
// Update download count.
@@ -264,7 +279,7 @@ func updateAttachment(e Engine, atta *Attachment) error {
// Use uuid only if id is not set and uuid is set
sess = e.Where("uuid = ?", atta.UUID)
}
_, err := sess.Cols("name", "issue_id", "release_id", "comment_id", "download_count").Update(atta)
_, err := sess.Cols("name", "issue_id", "release_id", "comment_id", "download_count", "is_private").Update(atta)
return err
}



+ 51
- 3
models/dataset.go View File

@@ -26,6 +26,8 @@ type Dataset struct {
Task string
ReleaseID int64 `xorm:"INDEX"`
UserID int64 `xorm:"INDEX"`
RepoID int64 `xorm:"INDEX"`
Repo *Repository `xorm:"-"`
CreatedUnix timeutil.TimeStamp `xorm:"INDEX created"`
UpdatedUnix timeutil.TimeStamp `xorm:"INDEX updated"`

@@ -57,19 +59,28 @@ func (datasets DatasetList) loadAttributes(e Engine) error {
datasetIDs := make([]int64, len(datasets))
for i := range datasets {
set[datasets[i].UserID] = struct{}{}
set[datasets[i].RepoID] = struct{}{}
datasetIDs[i] = datasets[i].ID
}

// Load owners.
users := make(map[int64]*User, len(set))
repos := make(map[int64]*Repository, len(set))
if err := e.
Where("id > 0").
In("id", keysInt64(set)).
Find(&users); err != nil {
return fmt.Errorf("find users: %v", err)
}
if err := e.
Where("id > 0").
In("id", keysInt64(set)).
Find(&repos); err != nil {
return fmt.Errorf("find repos: %v", err)
}
for i := range datasets {
datasets[i].User = users[datasets[i].UserID]
datasets[i].Repo = repos[datasets[i].RepoID]
}

return nil
@@ -78,6 +89,7 @@ func (datasets DatasetList) loadAttributes(e Engine) error {
type SearchDatasetOptions struct {
Keyword string
OwnerID int64
RepoID int64
IncludePublic bool
ListOptions
SearchOrderBy
@@ -91,6 +103,22 @@ func CreateDataset(dataset *Dataset) (err error) {
return nil
}

func CreateDefaultDatasetToRepo(repo *Repository) (err error) {
dataset := &Dataset{RepoID: repo.ID}
has, err := x.Get(dataset)
if err != nil {
return err
}
if !has {
dataset.Status = DatasetStatusPrivate
dataset.Title = repo.Name
if err = CreateDataset(dataset); err != nil {
return err
}
}
return nil
}

func SearchDataset(opts *SearchDatasetOptions) (DatasetList, int64, error) {
cond := SearchDatasetCondition(opts)
return SearchDatasetByCondition(opts, cond)
@@ -104,6 +132,10 @@ func SearchDatasetCondition(opts *SearchDatasetOptions) builder.Cond {
cond = cond.And(builder.Like{"title", opts.Keyword})
}

if opts.RepoID > 0 {
cond = cond.And(builder.Eq{"repo_id": opts.RepoID})
}

if opts.IncludePublic {
cond = cond.And(builder.Eq{"status": DatasetStatusPublic})
if opts.OwnerID > 0 {
@@ -165,11 +197,11 @@ func (s datasetMetaSearch) Less(i, j int) bool {
return s.ID[i] < s.ID[j]
}

func GeDatasetAttachments(rels ...*Dataset) (err error) {
return geDatasetAttachments(x, rels...)
func GetDatasetAttachments(rels ...*Dataset) (err error) {
return getDatasetAttachments(x, rels...)
}

func geDatasetAttachments(e Engine, rels ...*Dataset) (err error) {
func getDatasetAttachments(e Engine, rels ...*Dataset) (err error) {
if len(rels) == 0 {
return
}
@@ -248,6 +280,22 @@ func GetDatasetByID(id int64) (*Dataset, error) {
return rel, nil
}

func GetDatasetByRepo(repo *Repository) (*Dataset, error) {
if err := CreateDefaultDatasetToRepo(repo); err != nil {
return nil, err
}
dataset := &Dataset{RepoID: repo.ID}
has, err := x.Get(dataset)
if err != nil {
return nil, err
}
if has {
return dataset, nil
} else {
return nil, errors.New("Not Found")
}
}

func DeleteDataset(datasetID int64, uid int64) error {
var err error
sess := x.NewSession()


+ 1
- 0
models/migrations/v140.go View File

@@ -23,6 +23,7 @@ func addDatasetTable(x *xorm.Engine) error {
Task string
ReleaseID int64 `xorm:"INDEX"`
UserID int64 `xorm:"INDEX"`
RepoID int64 `xorm:"INDEX"`
CreatedUnix timeutil.TimeStamp `xorm:"INDEX created"`
UpdatedUnix timeutil.TimeStamp `xorm:"INDEX updated"`
}


+ 11
- 0
models/repo.go View File

@@ -1070,6 +1070,12 @@ func CreateRepository(ctx DBContext, doer, u *User, repo *Repository) (err error
Type: tp,
Config: &PullRequestsConfig{AllowMerge: true, AllowRebase: true, AllowRebaseMerge: true, AllowSquash: true},
})
} else if tp == UnitTypeDatasets {
units = append(units, RepoUnit{
RepoID: repo.ID,
Type: tp,
Config: &DatasetConfig{EnableDataset: true},
})
} else {
units = append(units, RepoUnit{
RepoID: repo.ID,
@@ -1132,6 +1138,10 @@ func CreateRepository(ctx DBContext, doer, u *User, repo *Repository) (err error
return fmt.Errorf("copyDefaultWebhooksToRepo: %v", err)
}

if err = CreateDefaultDatasetToRepo(repo); err != nil {
return fmt.Errorf("models.CreateDefaultDatasetToRepo: %v", err)
}

return nil
}

@@ -1572,6 +1582,7 @@ func DeleteRepository(doer *User, uid, repoID int64) error {
&LanguageStat{RepoID: repoID},
&Comment{RefRepoID: repoID},
&Task{RepoID: repoID},
&Dataset{RepoID: repoID},
); err != nil {
return fmt.Errorf("deleteBeans: %v", err)
}


+ 20
- 0
models/repo_unit.go View File

@@ -113,6 +113,20 @@ func (cfg *PullRequestsConfig) IsMergeStyleAllowed(mergeStyle MergeStyle) bool {
mergeStyle == MergeStyleSquash && cfg.AllowSquash
}

type DatasetConfig struct {
EnableDataset bool
}

// FromDB fills up a IssuesConfig from serialized format.
func (cfg *DatasetConfig) FromDB(bs []byte) error {
return json.Unmarshal(bs, &cfg)
}

// ToDB exports a IssuesConfig to a serialized format.
func (cfg *DatasetConfig) ToDB() ([]byte, error) {
return json.Marshal(cfg)
}

// BeforeSet is invoked from XORM before setting the value of a field of this object.
func (r *RepoUnit) BeforeSet(colName string, val xorm.Cell) {
switch colName {
@@ -128,6 +142,8 @@ func (r *RepoUnit) BeforeSet(colName string, val xorm.Cell) {
r.Config = new(PullRequestsConfig)
case UnitTypeIssues:
r.Config = new(IssuesConfig)
case UnitTypeDatasets:
r.Config = new(DatasetConfig)
default:
panic("unrecognized repo unit type: " + com.ToStr(*val))
}
@@ -169,6 +185,10 @@ func (r *RepoUnit) ExternalTrackerConfig() *ExternalTrackerConfig {
return r.Config.(*ExternalTrackerConfig)
}

func (r *RepoUnit) DatasetConfig() *DatasetConfig {
return r.Config.(*DatasetConfig)
}

func getUnitsByRepoID(e Engine, repoID int64) (units []*RepoUnit, err error) {
var tmpUnits []*RepoUnit
if err := e.Where("repo_id = ?", repoID).Find(&tmpUnits); err != nil {


+ 14
- 0
models/unit.go View File

@@ -24,6 +24,7 @@ const (
UnitTypeWiki // 5 Wiki
UnitTypeExternalWiki // 6 ExternalWiki
UnitTypeExternalTracker // 7 ExternalTracker
UnitTypeDatasets UnitType = 10 // 10 Dataset
)

// Value returns integer value for unit type
@@ -47,6 +48,8 @@ func (u UnitType) String() string {
return "UnitTypeExternalWiki"
case UnitTypeExternalTracker:
return "UnitTypeExternalTracker"
case UnitTypeDatasets:
return "UnitTypeDataset"
}
return fmt.Sprintf("Unknown UnitType %d", u)
}
@@ -68,6 +71,7 @@ var (
UnitTypeWiki,
UnitTypeExternalWiki,
UnitTypeExternalTracker,
UnitTypeDatasets,
}

// DefaultRepoUnits contains the default unit types
@@ -77,6 +81,7 @@ var (
UnitTypePullRequests,
UnitTypeReleases,
UnitTypeWiki,
UnitTypeDatasets,
}

// NotAllowedDefaultRepoUnits contains units that can't be default
@@ -242,6 +247,14 @@ var (
4,
}

UnitDataset = Unit{
UnitTypeDatasets,
"repo.datasets",
"/datasets",
"repo.datasets.desc",
5,
}

// Units contains all the units
Units = map[UnitType]Unit{
UnitTypeCode: UnitCode,
@@ -251,6 +264,7 @@ var (
UnitTypeReleases: UnitReleases,
UnitTypeWiki: UnitWiki,
UnitTypeExternalWiki: UnitExternalWiki,
UnitTypeDatasets: UnitDataset,
}
)



+ 1
- 0
modules/auth/repo_form.go View File

@@ -120,6 +120,7 @@ type RepoSettingForm struct {
EnablePrune bool

// Advanced settings
EnableDataset bool
EnableWiki bool
EnableExternalWiki bool
ExternalWikiURL string


+ 1
- 0
modules/context/repo.go View File

@@ -813,6 +813,7 @@ func UnitTypes() macaron.Handler {
return func(ctx *Context) {
ctx.Data["UnitTypeCode"] = models.UnitTypeCode
ctx.Data["UnitTypeIssues"] = models.UnitTypeIssues
ctx.Data["UnitTypeDatasets"] = models.UnitTypeDatasets
ctx.Data["UnitTypePullRequests"] = models.UnitTypePullRequests
ctx.Data["UnitTypeReleases"] = models.UnitTypeReleases
ctx.Data["UnitTypeWiki"] = models.UnitTypeWiki


+ 13
- 0
options/locale/locale_en-US.ini View File

@@ -625,6 +625,7 @@ email_notifications.submit = Set Email Preference

[dataset]
dataset = Dataset
dataset_setting= Dataset Setting
title = Name
description = Description
create_dataset = Create Dataset
@@ -632,14 +633,19 @@ show_dataset= Dataset
edit_dataset= Edit Dataset
update_dataset= Update Dataset
category = Category
no_category = No Category
task = Task
no_task = No Task
license = License
no_license = No License
file = Dataset File
download = download
download_count = download count
edit = edit
private = private
public = public
back = back
copy_url=copy download url
visibility = visibility
visibility_description = Only the owner or the organization members if they have rights, will be able to see it.
visibility_helper = Make Dataset Private
@@ -688,6 +694,11 @@ category.computer_vision= computer vision
category.natural_language_processing= natural language processing
category.speech_processing= speech processing
category.computer_vision_natural_language_processing= computer vision and natural language processing
attachment.delete= delete this version of dataset
attachment.delete_desc= Are you sure you will delete this version of dataset, once deelted can not be recovery
public= public
private= private
delete= deelte

[repo]
owner = Owner
@@ -739,6 +750,7 @@ reactions_more = and %d more
unit_disabled = The site administrator has disabled this repository section.
language_other = Other
datasets = Datasets
datasets.desc = Enable Dataset

template.items = Template Items
template.git_content = Git Content (Default Branch)
@@ -1407,6 +1419,7 @@ settings.use_external_wiki = Use External Wiki
settings.external_wiki_url = External Wiki URL
settings.external_wiki_url_error = The external wiki URL is not a valid URL.
settings.external_wiki_url_desc = Visitors are redirected to the external wiki URL when clicking the wiki tab.
settings.dataset_desc= Enable Repository Dataset
settings.issues_desc = Enable Repository Issue Tracker
settings.use_internal_issue_tracker = Use Built-In Issue Tracker
settings.use_external_issue_tracker = Use External Issue Tracker


+ 221
- 208
options/locale/locale_zh-CN.ini View File

@@ -44,16 +44,16 @@ u2f_error_4=此请求不允许使用安全密钥。请确保该密钥尚未注
u2f_error_5=在读取到密钥之前超时。请重新加载本页面以重试。
u2f_reload=重新加载

repository=仓库
repository=项目
organization=组织
mirror=镜像
new_repo=创建仓库
new_repo=创建项目
new_dataset=创建数据集
new_migrate=迁移外部仓库
new_migrate=迁移外部项目
edit_dataset = Edit Dataset
update_dataset = update Dataset
new_mirror=创建新的镜像
new_fork=新的仓库Fork
new_fork=新的项目Fork
new_org=创建组织
manage_org=管理我的组织
admin_panel=管理后台
@@ -130,8 +130,8 @@ err_admin_name_is_invalid=管理员用户名无效
general_title=一般设置
app_name=站点名称
app_name_helper=您可以在此输入您公司的名称。
repo_path=仓库根目录
repo_path_helper=所有远程 Git 仓库将保存到此目录。
repo_path=项目根目录
repo_path_helper=所有远程 Git 项目将保存到此目录。
lfs_path=LFS根目录
lfs_path_helper=存储为Git LFS的文件将被存储在此目录。留空禁用LFS
run_user=以用户名运行
@@ -184,7 +184,7 @@ install_btn_confirm=立即安装
test_git_failed=无法识别 'git' 命令:%v
sqlite3_not_available=您所使用的发行版不支持 SQLite3,请从 %s 下载官方构建版,而不是 gobuild 版本。
invalid_db_setting=数据库设置无效: %v
invalid_repo_path=仓库根目录设置无效:%v
invalid_repo_path=项目根目录设置无效:%v
run_user_not_match=运行用户名不是当前的用户名:%s -> %s
save_config_failed=应用配置保存失败:%v
invalid_admin_setting=管理员帐户设置无效: %v
@@ -203,13 +203,13 @@ no_reply_address_helper=具有隐藏电子邮件地址的用户的域名。例
uname_holder=登录名或电子邮箱地址
password_holder=密码
switch_dashboard_context=切换控制面板用户
my_repos=仓库列表
show_more_repos=显示更多仓库
collaborative_repos=参与协作的仓库
my_repos=项目列表
show_more_repos=显示更多项目
collaborative_repos=参与协作的项目
my_orgs=我的组织
my_mirrors=我的镜像
view_home=访问 %s
search_repos=查找仓库
search_repos=查找项目
filter=其他过滤器

show_archived=已存档
@@ -222,15 +222,15 @@ show_both_private_public=显示公开的和私有的
show_only_private=只显示私有的
show_only_public=只显示公开的

issues.in_your_repos=属于该用户仓库
issues.in_your_repos=属于该用户项目

[explore]
repos=仓库
repos=项目
users=用户
organizations=组织
search=搜索
code=代码
repo_no_results=未找到匹配的仓库
repo_no_results=未找到匹配的项目
dataset_no_results = 未找到匹配的数据集。
user_no_results=未找到匹配的用户。
org_no_results=未找到匹配的组织。
@@ -293,7 +293,7 @@ email_domain_blacklisted=您不能使用您的电子邮件地址注册。
authorize_application=应用授权
authorize_redirect_notice=如果您授权此应用,您将会被重定向到 %s。
authorize_application_created_by=此应用由%s创建。
authorize_application_description=如果您允许,它将能够读取和修改您的所有帐户信息,包括私人仓库和组织。
authorize_application_description=如果您允许,它将能够读取和修改您的所有帐户信息,包括私人项目和组织。
authorize_title=授权 %s 访问您的帐户?
authorization_failed=授权失败
authorization_failed_desc=授权失败,这是一个无效的请求。请联系尝试授权应用的管理员。
@@ -314,7 +314,7 @@ modify=更新

[form]
UserName=用户名
RepoName=仓库名称
RepoName=项目名称
Email=邮箱地址
Password=密码
Retype=重新输入密码
@@ -352,12 +352,12 @@ password_not_match=密码不匹配。
lang_select_error=从列表中选出语言

username_been_taken=用户名已被使用。
repo_name_been_taken=仓库名称已被使用。
repo_name_been_taken=项目名称已被使用。
visit_rate_limit=远程访问达到速度限制。
2fa_auth_required=远程访问需要双重验证。
org_name_been_taken=组织名称已被使用。
team_name_been_taken=团队名称已被使用。
team_no_units_error=至少选择一项仓库单元。
team_no_units_error=至少选择一项项目单元。
email_been_used=该电子邮件地址已在使用中。
openid_been_used=OpenID 地址 '%s' 已被使用。
username_password_incorrect=用户名或密码不正确。
@@ -366,7 +366,7 @@ password_lowercase_one=至少一个小写字符
password_uppercase_one=至少一个大写字符
password_digit_one=至少一个数字
password_special_one=至少一个特殊字符(标点符号,括号,引号等)
enterred_invalid_repo_name=输入的仓库名称不正确
enterred_invalid_repo_name=输入的项目名称不正确
enterred_invalid_owner_name=新的所有者名称无效。
enterred_invalid_password=输入的密码不正确
user_not_exist=该用户名不存在
@@ -379,16 +379,16 @@ invalid_gpg_key=无法验证您的 GPG 密钥: %s
unable_verify_ssh_key=无法验证SSH密钥,再次检查是否有误。
auth_failed=授权验证失败:%v

still_own_repo=此帐户仍拥有至少一个仓库,您需要先删除或转移它们。
still_own_repo=此帐户仍拥有至少一个项目,您需要先删除或转移它们。
still_has_org=此帐户仍隶属于一个或多个组织,您需要退出他们。
org_still_own_repo=该组织仍然是某些仓库的拥有者,您必须先转移或删除它们才能执行删除组织操作!
org_still_own_repo=该组织仍然是某些项目的拥有者,您必须先转移或删除它们才能执行删除组织操作!

target_branch_not_exist=目标分支不存在。

[user]
change_avatar=修改头像
join_on=加入于
repositories=仓库列表
repositories=项目列表
datasets=数据集
activity=公开活动
followers=关注者
@@ -413,7 +413,7 @@ ssh_gpg_keys=SSH / GPG 密钥
social=社交帐号绑定
applications=应用
orgs=管理组织
repos=仓库列表
repos=项目列表
delete=删除帐户
twofa=两步验证
account_link=已绑定帐户
@@ -491,7 +491,7 @@ openid_desc=OpenID 让你可以将认证转发到外部服务。
manage_ssh_keys=管理 SSH 密钥
manage_gpg_keys=管理 GPG 密钥
add_key=增加密钥
ssh_desc=这些 SSH 公钥已经关联到你的账号。相应的私钥拥有完全操作你的仓库的权限。
ssh_desc=这些 SSH 公钥已经关联到你的账号。相应的私钥拥有完全操作你的项目的权限。
gpg_desc=这些 GPG 公钥已经关联到你的账号。请妥善保管你的私钥因为他们将被用于认证提交。
ssh_helper=<strong>需要帮助?</strong> 请查看有关 <a href="%s">如何生成 SSH 密钥</a> 或 <a href="%s">常见 SSH 问题</a> 寻找答案。
gpg_helper=<strong>需要帮助吗?</strong>看一看 GitHub <a href="%s">关于GPG</a> 的指导。
@@ -610,7 +610,7 @@ remove_account_link_desc=删除已绑定帐户将吊销其对您的 Gitea 帐户
remove_account_link_success=已取消绑定帐户。

orgs_none=您现在还不是任何组织的成员。
repos_none=你并不拥有任何仓库
repos_none=你并不拥有任何项目

delete_account=删除当前帐户
delete_prompt=此操作将永久删除您的用户帐户。它 <strong>不能</strong> 被撤消。
@@ -625,6 +625,7 @@ email_notifications.submit=邮件通知设置

[dataset]
dataset=数据集
dataset_setting=数据集设置
title=名称
description=描述
create_dataset=创建数据集
@@ -632,14 +633,19 @@ show_dataset=数据集
edit_dataset=编辑数据集
update_dataset=更新数据集
category=分类
task=针对的具体任务
no_category=未设置分类
task=研究方向/应用领域
no_task=未设置研究方向/应用领域
license=license
no_license=没有设置license
file=数据集文件
download=下载附件
download_count = 下载统计
edit=编辑
private=私有
public=公有
back=返回
copy_url=复制下载链接
visibility=可见性
visibility_description=只有组织所有人或拥有权利的组织成员才能看到。
visibility_helper=将数据集设为私有
@@ -649,7 +655,7 @@ settings.delete=删除数据集
settings.delete_desc=删除据集是永久性的, 无法撤消。
settings.delete_notices_1=- 此操作 <strong>不可以</strong> 被回滚。
settings.delete_notices_2=- 此操作将永久删除据集 <strong>%s</strong>。
settings.delete_notices_fork_1=- 在此仓库删除后,它的派生据集将变成独立据集。
settings.delete_notices_fork_1=- 在此项目删除后,它的派生据集将变成独立据集。
settings.deletion_success=据集已被删除。
task.machine_translation=机器翻译
task.question_answering_system=问答系统
@@ -688,30 +694,35 @@ category.computer_vision=计算机视觉
category.natural_language_processing=自然语言处理
category.speech_processing=语音处理
category.computer_vision_natural_language_processing=计算机视觉、自然语言处理
attachment.delete= 删除该版本的数据集
attachment.delete_desc= 你确定要删除该版本的数据集么?一旦删除不能恢复。
public=公有
private=私有
delete=删除

[repo]
owner=拥有者
repo_name=仓库名称
repo_name=项目名称
repo_name_helper=好的存储库名称使用简短、深刻和独特的关键字。
repo_size=仓库大小
repo_size=项目大小
template=模板
template_select=选择模板
template_helper=设置仓库为模板仓库
template_description=模板仓库让用户通过拷贝目录结构,文件和可选设置来生成仓库
template_helper=设置项目为模板项目
template_description=模板项目让用户通过拷贝目录结构,文件和可选设置来生成项目
visibility=可见性
visibility_description=只有组织所有人或拥有权利的组织成员才能看到。
visibility_helper=将仓库设为私有
visibility_helper_forced=站点管理员强制要求新仓库为私有。
visibility_fork_helper=(修改该值将会影响到所有派生仓库
visibility_helper=将项目设为私有
visibility_helper_forced=站点管理员强制要求新项目为私有。
visibility_fork_helper=(修改该值将会影响到所有派生项目
clone_helper=不知道如何克隆?查看<a target="_blank" rel="noopener noreferrer" href="%s">帮助</a> 。
fork_repo=派生仓库
fork_repo=派生项目
fork_from=派生自
fork_visibility_helper=无法更改派生仓库的可见性。
fork_visibility_helper=无法更改派生项目的可见性。
use_template=使用此模板
generate_repo=生成仓库
generate_repo=生成项目
generate_from=生成自
repo_desc=仓库描述
repo_lang=仓库语言
repo_desc=项目描述
repo_lang=项目语言
repo_gitignore_helper=选择 .gitignore 模板。
issue_labels=工单标签
issue_labels_helper=选择一个工单标签集
@@ -720,7 +731,7 @@ license_helper=选择授权许可文件。
readme=自述
readme_helper=选择自述文件模板。
auto_init=初始化存储库 (添加. gitignore、许可证和自述文件)
create_repo=创建仓库
create_repo=创建项目
default_branch=默认分支
mirror_prune=修剪
mirror_prune_desc=删除过时的远程跟踪引用
@@ -733,35 +744,36 @@ mirror_address_protocol_invalid=提供的 url 无效。只能从 http(s):// 或
mirror_last_synced=上次同步
watchers=关注者
stargazers=称赞者
forks=派生仓库
forks=派生项目
pick_reaction=选择你的表情
reactions_more=再加载 %d
unit_disabled=站点管理员已禁用此仓库单元。
unit_disabled=站点管理员已禁用此项目单元。
language_other=其它
datasets = 数据集
datasets.desc = 数据集功能

template.items=模板选项
template.git_content=Git数据(默认分支)
template.git_hooks=Git 钩子
template.git_hooks_tooltip=您目前无法修改或删除曾经添加过的 git 钩子。请仅在您信任模板仓库时选择此项。
template.git_hooks_tooltip=您目前无法修改或删除曾经添加过的 git 钩子。请仅在您信任模板项目时选择此项。
template.webhooks=Web 钩子
template.topics=主题
template.avatar=头像
template.issue_labels=工单标签
template.one_item=必须至少选择一个模板项
template.invalid=必须选择一个模板仓库
template.invalid=必须选择一个模板项目

archive.title=此仓库已存档。您可以查看文件和克隆,但不能推送或创建工单/合并请求。
archive.issue.nocomment=此仓库已存档,您不能在此工单添加评论。
archive.pull.nocomment=此仓库已存档,您不能在此合并请求添加评论。
archive.title=此项目已存档。您可以查看文件和克隆,但不能推送或创建工单/合并请求。
archive.issue.nocomment=此项目已存档,您不能在此工单添加评论。
archive.pull.nocomment=此项目已存档,您不能在此合并请求添加评论。

form.reach_limit_of_creation=你已经达到了您的 %d 仓库的限制。
form.name_reserved=仓库名称 '%s' 是被保留的。
form.name_pattern_not_allowed=仓库名称中不允许使用模式 "%s"。
form.reach_limit_of_creation=你已经达到了您的 %d 项目的限制。
form.name_reserved=项目名称 '%s' 是被保留的。
form.name_pattern_not_allowed=项目名称中不允许使用模式 "%s"。

need_auth=需要授权验证
migrate_type=迁移类型
migrate_type_helper=该仓库将是一个 <span class="text blue">镜像</span>
migrate_type_helper=该项目将是一个 <span class="text blue">镜像</span>
migrate_items=迁移项目
migrate_items_wiki=百科
migrate_items_milestones=里程碑
@@ -769,11 +781,11 @@ migrate_items_labels=标签
migrate_items_issues=工单
migrate_items_pullrequests=合并请求
migrate_items_releases=版本发布
migrate_repo=迁移仓库
migrate_repo=迁移项目
migrate.clone_address=从 URL 迁移/克隆
migrate.clone_address_desc=现有仓库的 HTTP(s) 或 Git "clone" URL
migrate.clone_address_desc=现有项目的 HTTP(s) 或 Git "clone" URL
migrate.clone_local_path=或服务器本地路径
migrate.permission_denied=您没有获得导入本地仓库的权限。
migrate.permission_denied=您没有获得导入本地项目的权限。
migrate.invalid_local_path=无效的本地路径,不存在或不是一个目录!
migrate.failed=迁移失败:%v
migrate.lfs_mirror_unsupported=不支持镜像 LFS 对象 - 使用 'git lfs fetch --all' 和 'git lfs push --all' 替代。
@@ -786,8 +798,8 @@ migrate.migrating_failed=从 <b>%s</b> 迁移失败。
mirror_from=镜像自地址
forked_from=派生自
generated_from=生成自
fork_from_self=无法派生已经拥有的仓库
fork_guest_user=登录并 派生 这个仓库
fork_from_self=无法派生已经拥有的项目
fork_guest_user=登录并 派生 这个项目
copy_link=复制链接
copy_link_success=已复制链接
copy_link_error=请按下 ⌘-C 或 Ctrl-C 复制
@@ -797,13 +809,13 @@ watch=关注
unstar=取消点赞
star=点赞
fork=派生
download_archive=下载此仓库
download_archive=下载此项目

no_desc=暂无描述
quick_guide=快速帮助
clone_this_repo=克隆当前仓库
create_new_repo_command=从命令行创建一个新的仓库
push_exist_repo=从命令行推送已经创建的仓库
clone_this_repo=克隆当前项目
create_new_repo_command=从命令行创建一个新的项目
push_exist_repo=从命令行推送已经创建的项目
empty_message=这个家伙很懒,什么都没有推送。

code=代码
@@ -816,7 +828,7 @@ tags=标签列表
issues=工单
pulls=合并请求
labels=标签
org_labels_desc=组织级别的标签,可以被本组织下的 <strong>所有仓库</strong> 使用
org_labels_desc=组织级别的标签,可以被本组织下的 <strong>所有项目</strong> 使用
org_labels_desc_manage=管理

milestones=里程碑
@@ -847,7 +859,7 @@ editor.cannot_edit_non_text_files=网页不能编辑二进制文件。
editor.edit_this_file=编辑文件
editor.this_file_locked=文件已锁定
editor.must_be_on_a_branch=您必须在某个分支上才能对此文件进行修改操作。
editor.fork_before_edit=您必须在派生这个仓库才能对此文件进行修改操作
editor.fork_before_edit=您必须在派生这个项目才能对此文件进行修改操作
editor.delete_this_file=删除文件
editor.must_have_write_access=您必须具有写权限才能对此文件进行修改操作。
editor.file_delete_success=文件 %s 已被删除。
@@ -870,15 +882,15 @@ editor.new_branch_name_desc=新的分支名称...
editor.cancel=取消
editor.filename_cannot_be_empty=文件名不能为空。
editor.filename_is_invalid=文件名无效:'%s'。
editor.branch_does_not_exist=此仓库中不存在名为 '%s' 的分支。
editor.branch_already_exists=此仓库已存在名为 '%s' 的分支。
editor.directory_is_a_file='%s' 已经作为文件名在此仓库中存在。
editor.branch_does_not_exist=此项目中不存在名为 '%s' 的分支。
editor.branch_already_exists=此项目已存在名为 '%s' 的分支。
editor.directory_is_a_file='%s' 已经作为文件名在此项目中存在。
editor.file_is_a_symlink='%s' 是一个符号链接,无法在线编辑。
editor.filename_is_a_directory='%s' 已经作为目录名在此仓库中存在。
editor.filename_is_a_directory='%s' 已经作为目录名在此项目中存在。
editor.file_editing_no_longer_exists=正在编辑的文件 '%s' 已不存在。
editor.file_deleting_no_longer_exists=仓库中不存在将被删除的文件‘%s’。
editor.file_deleting_no_longer_exists=项目中不存在将被删除的文件‘%s’。
editor.file_changed_while_editing=文件内容在您进行编辑时已经发生变动。<a target="_blank" rel="noopener noreferrer" href="%s">单击此处</a> 查看变动的具体内容,或者 <strong>再次提交</strong> 覆盖已发生的变动。
editor.file_already_exists=此仓库已经存在名为 '%s' 的文件。
editor.file_already_exists=此项目已经存在名为 '%s' 的文件。
editor.commit_empty_file_header=提交一个空文件
editor.commit_empty_file_text=您要提交的文件是空的,继续吗?
editor.no_changes_to_show=没有可以显示的变更。
@@ -1070,7 +1082,7 @@ issues.unlock_comment=解锁此对话 %s
issues.lock_confirm=锁定
issues.unlock_confirm=解锁​​​​
issues.lock.notice_1=- 其他用户不能对这个工单添加新的评论。
issues.lock.notice_2=- 您和仓库其他协作者仍可评论并可见。
issues.lock.notice_2=- 您和项目其他协作者仍可评论并可见。
issues.lock.notice_3=- 您可以在未来再次解锁这个工单。
issues.unlock.notice_1=- 每个人都可以再次就这一工单发表评论。
issues.unlock.notice_2=- 您可以在未来再次解锁这个工单。
@@ -1106,7 +1118,7 @@ issues.due_date_form=yyyy年mm月dd日
issues.due_date_form_add=添加到期时间
issues.due_date_form_edit=编辑
issues.due_date_form_remove=删除
issues.due_date_not_writer=你需要仓库写入权限来更新工单到期时间。
issues.due_date_not_writer=你需要项目写入权限来更新工单到期时间。
issues.due_date_not_set=未设置到期时间。
issues.due_date_added=到期时间 %s %s 已添加
issues.due_date_modified=已将到期时间从 %s %s 修改为 %s
@@ -1139,7 +1151,7 @@ issues.dependency.add_error_dep_issue_not_exist=依赖项不存在。
issues.dependency.add_error_dep_not_exist=依赖项不存在。
issues.dependency.add_error_dep_exists=依赖项已存在。
issues.dependency.add_error_cannot_create_circular=您不能创建依赖, 使得两个工单相互阻止。
issues.dependency.add_error_dep_not_same_repo=这两个工单必须在同一仓库
issues.dependency.add_error_dep_not_same_repo=这两个工单必须在同一项目
issues.review.self.approval=您不能批准您自己的合并请求。
issues.review.self.rejection=您不能请求对您自己的合并请求进行更改。
issues.review.approve=已于 %s 批准这些更改
@@ -1188,7 +1200,7 @@ pulls.is_closed=合并请求已经关闭。
pulls.has_merged=请求已合并。
pulls.title_wip_desc=`<a href="#">标题以 <strong>%s</strong> 开头</a>以免合并请求意外合并。`
pulls.cannot_merge_work_in_progress=这个合并请求被标记为尚未完成的工作。完成后请从标题中移除<strong>%s</strong>前缀。
pulls.data_broken=此合并请求因为派生仓库信息缺失而中断。
pulls.data_broken=此合并请求因为派生项目信息缺失而中断。
pulls.files_conflicted=此合并请求有变更与目标分支冲突。
pulls.is_checking=正在进行合并冲突检测,请稍后再试。
pulls.required_status_check_failed=一些必要的检查没有成功。
@@ -1210,7 +1222,7 @@ pulls.waiting_count_1=%d 个正在等待审核
pulls.waiting_count_n=%d 个正在等待审核

pulls.no_merge_desc=由于未启用合并选项,此合并请求无法被合并。
pulls.no_merge_helper=在仓库设置中启用合并选项或者手工合并请求。
pulls.no_merge_helper=在项目设置中启用合并选项或者手工合并请求。
pulls.no_merge_wip=这个合并请求无法合并,因为被标记为尚未完成的工作。
pulls.no_merge_not_ready=此拉取请求尚未准备好合并,请检查审核状态和状态检查。
pulls.no_merge_access=您无权合并此拉取请求。
@@ -1224,8 +1236,8 @@ pulls.merge_conflict=合并失败:合并时发生冲突:%[1]s<br>[2]<br> 提
pulls.rebase_conflict=合并失败:Rebase合并时发生冲突:%[1]s<br>%[2]s<br>%[3]s<br> 提示:尝试不同的合并策略
pulls.unrelated_histories=合并失败:两个分支没有共同历史。提示:尝试不同的策略
pulls.merge_out_of_date=合并失败:在生成合并时,主分支已更新。提示:再试一次。
pulls.push_rejected=合并失败:这个推送被拒绝并收到以下消息:<br>%s<br>检查这个仓库的 githooks
pulls.push_rejected_no_message=合并失败:这个推送被拒绝但没有远程消息。<br>检查这个仓库的 githooks
pulls.push_rejected=合并失败:这个推送被拒绝并收到以下消息:<br>%s<br>检查这个项目的 githooks
pulls.push_rejected_no_message=合并失败:这个推送被拒绝但没有远程消息。<br>检查这个项目的 githooks
pulls.open_unmerged_pull_exists=`您不能执行重新打开操作, 因为已经存在相同的合并请求 (#%d)。`
pulls.status_checking=一些检测仍在等待运行
pulls.status_checks_success=所有检测均成功
@@ -1376,12 +1388,12 @@ activity.git_stats_deletion_1=删除 %d 行
activity.git_stats_deletion_n=删除 %d 行

search=搜索
search.search_repo=搜索仓库...
search.search_repo=搜索项目...
search.results=在 <a href="%s"> %s </a> 中搜索 "%s" 的结果

settings=仓库设置
settings.desc=设置是你可以管理仓库设置的地方
settings.options=仓库
settings=项目设置
settings.desc=设置是你可以管理项目设置的地方
settings.options=项目
settings.collaboration=协作者
settings.collaboration.admin=管理员
settings.collaboration.write=可写权限
@@ -1399,14 +1411,15 @@ settings.email_notifications.onmention=只在被提到时邮件通知
settings.email_notifications.disable=停用邮件通知
settings.email_notifications.submit=邮件通知设置
settings.site=网站
settings.update_settings=更新仓库设置
settings.update_settings=更新项目设置
settings.advanced_settings=高级设置
settings.wiki_desc=启用仓库百科
settings.wiki_desc=启用项目百科
settings.use_internal_wiki=使用内置百科
settings.use_external_wiki=使用外部百科
settings.external_wiki_url=外部 Wiki 链接
settings.external_wiki_url_error=外部百科链接无效
settings.external_wiki_url_desc=当点击工单标签时,访问者将被重定向到外部工单系统的URL。
settings.dataset_desc=启用数据集
settings.issues_desc=启用工单系统
settings.use_internal_issue_tracker=使用内置的轻量级工单管理系统
settings.use_external_issue_tracker=使用外部的工单管理系统
@@ -1418,7 +1431,7 @@ settings.tracker_url_format_error=外部工单链接无效
settings.tracker_issue_style=外部工单管理系统的编号格式
settings.tracker_issue_style.numeric=纯数字形式
settings.tracker_issue_style.alphanumeric=英文字母数字组合形式
settings.tracker_url_format_desc=使用占位符 <code>{user}</code>, <code>{repo}</code> 和 <code>{index}</code> 作为用户名、仓库名和工单索引。
settings.tracker_url_format_desc=使用占位符 <code>{user}</code>, <code>{repo}</code> 和 <code>{index}</code> 作为用户名、项目名和工单索引。
settings.enable_timetracker=启用时间跟踪
settings.allow_only_contributors_to_track_time=仅允许成员跟踪时间
settings.pulls_desc=启用合并请求
@@ -1428,56 +1441,56 @@ settings.pulls.allow_rebase_merge=启用变基合并提交
settings.pulls.allow_rebase_merge_commit=启用变基显式合并 (--no-ff)
settings.pulls.allow_squash_commits=启用Squash合并提交
settings.admin_settings=管理员设置
settings.admin_enable_health_check=启用仓库健康检查 (git fsck)
settings.admin_enable_health_check=启用项目健康检查 (git fsck)
settings.admin_enable_close_issues_via_commit_in_any_branch=通过在非默认分支中提交来关闭工单
settings.danger_zone=危险操作区
settings.new_owner_has_same_repo=新的仓库拥有者已经存在同名仓库
settings.convert=转换为普通仓库
settings.convert_desc=您可以将该镜像仓库转换为普通仓库,但此操作不可恢复。
settings.convert_notices_1=该操作会将镜像仓库转换为普通仓库,但该操作不可恢复。
settings.convert_confirm=转换仓库
settings.convert_succeed=此镜像仓库已经转换为普通仓库
settings.transfer=转移仓库所有权
settings.transfer_desc=您可以将仓库转移至您拥有管理员权限的帐户或组织。
settings.new_owner_has_same_repo=新的项目拥有者已经存在同名项目
settings.convert=转换为普通项目
settings.convert_desc=您可以将该镜像项目转换为普通项目,但此操作不可恢复。
settings.convert_notices_1=该操作会将镜像项目转换为普通项目,但该操作不可恢复。
settings.convert_confirm=转换项目
settings.convert_succeed=此镜像项目已经转换为普通项目
settings.transfer=转移项目所有权
settings.transfer_desc=您可以将项目转移至您拥有管理员权限的帐户或组织。
settings.transfer_notices_1=-如果将其传输给单个用户, 您将失去对存储库的访问权限。
settings.transfer_notices_2=-如果将其转移到您 (共同) 拥有的组织,您可以继续访问该仓库
settings.transfer_form_title=输入仓库名称以做确认:
settings.transfer_notices_2=-如果将其转移到您 (共同) 拥有的组织,您可以继续访问该项目
settings.transfer_form_title=输入项目名称以做确认:
settings.wiki_delete=删除百科数据
settings.wiki_delete_desc=删除仓库百科数据是永久性的,无法撤消。
settings.wiki_delete_desc=删除项目百科数据是永久性的,无法撤消。
settings.wiki_delete_notices_1=- 这将永久删除和禁用 %s 的百科。
settings.confirm_wiki_delete=删除百科数据
settings.wiki_deletion_success=仓库百科数据删除成功!
settings.delete=删除本仓库
settings.delete_desc=删除仓库是永久性的, 无法撤消。
settings.wiki_deletion_success=项目百科数据删除成功!
settings.delete=删除本项目
settings.delete_desc=删除项目是永久性的, 无法撤消。
settings.delete_notices_1=- 此操作 <strong>不可以</strong> 被回滚。
settings.delete_notices_2=- 此操作将永久删除仓库 <strong>%s</strong>,包括 Git 数据、 工单、评论、百科和协作者的操作权限。
settings.delete_notices_fork_1=- 在此仓库删除后,它的派生仓库将变成独立仓库
settings.deletion_success=仓库已被删除。
settings.update_settings_success=仓库设置已更新。
settings.delete_notices_2=- 此操作将永久删除项目 <strong>%s</strong>,包括 Git 数据、 工单、评论、百科和协作者的操作权限。
settings.delete_notices_fork_1=- 在此项目删除后,它的派生项目将变成独立项目
settings.deletion_success=项目已被删除。
settings.update_settings_success=项目设置已更新。
settings.transfer_owner=新拥有者
settings.make_transfer=开始转移
settings.transfer_succeed=仓库已被转移。
settings.confirm_delete=删除本仓库
settings.transfer_succeed=项目已被转移。
settings.confirm_delete=删除本项目
settings.add_collaborator=增加协作者
settings.add_collaborator_success=协作者添加成功!
settings.add_collaborator_inactive_user=无法添加未激活的用户作为合作者。
settings.add_collaborator_duplicate=合作者已经被添加到本仓库
settings.add_collaborator_duplicate=合作者已经被添加到本项目
settings.delete_collaborator=删除
settings.collaborator_deletion=删除协作者
settings.collaborator_deletion_desc=删除协作者后他将无法再对此仓库的访问。继续?
settings.collaborator_deletion_desc=删除协作者后他将无法再对此项目的访问。继续?
settings.remove_collaborator_success=协作者删除成功!
settings.search_user_placeholder=搜索用户...
settings.org_not_allowed_to_be_collaborator=组织不允许被添加为仓库协作者!
settings.change_team_access_not_allowed=更改仓库的团队访问权限仅限于组织所有者
settings.team_not_in_organization=团队不在与仓库相同的组织中
settings.org_not_allowed_to_be_collaborator=组织不允许被添加为项目协作者!
settings.change_team_access_not_allowed=更改项目的团队访问权限仅限于组织所有者
settings.team_not_in_organization=团队不在与项目相同的组织中
settings.teams=团队
settings.add_team=添加团队
settings.add_team_duplicate=团队已经拥有仓库
settings.add_team_success=团队现在可以访问仓库
settings.add_team_duplicate=团队已经拥有项目
settings.add_team_success=团队现在可以访问项目
settings.search_team=搜索团队...
settings.change_team_permission_tip=团队权限设置于团队设置页面,不能根据仓库更改
settings.delete_team_tip=该团队仍有仓库, 无法删除
settings.remove_team_success=团队访问仓库的权限已被删除。
settings.change_team_permission_tip=团队权限设置于团队设置页面,不能根据项目更改
settings.delete_team_tip=该团队仍有项目, 无法删除
settings.remove_team_success=团队访问项目的权限已被删除。
settings.add_webhook=添加 Web 钩子
settings.add_webhook.invalid_channel_name=Webhook 通道名称不能为空且不能仅包含一个 # 字符。
settings.hooks_desc=当Gitea事件发生时,Web钩子自动发出HTTP POST请求。在 <a target="_blank" rel="noopener noreferrer" href="%s"> 指南</a> 中阅读更多内容。
@@ -1511,19 +1524,19 @@ settings.event_desc=触发条件:
settings.event_push_only=推送事件
settings.event_send_everything=所有事件
settings.event_choose=自定义事件...
settings.event_header_repository=仓库事件
settings.event_header_repository=项目事件
settings.event_create=创建
settings.event_create_desc=创建分支或标签
settings.event_delete=刪除
settings.event_delete_desc=分支或标签已删除。
settings.event_fork=派生
settings.event_fork_desc=仓库被派生。
settings.event_fork_desc=项目被派生。
settings.event_release=版本发布
settings.event_release_desc=发布、更新或删除版本时。
settings.event_push=推送
settings.event_push_desc=Git 仓库推送
settings.event_repository=仓库
settings.event_repository_desc=创建或删除仓库
settings.event_push_desc=Git 项目推送
settings.event_repository=项目
settings.event_repository_desc=创建或删除项目
settings.event_header_issue=工单事件
settings.event_issues=工单
settings.event_issues_desc=工单已打开、已关闭、已重新打开或已编辑。
@@ -1560,21 +1573,21 @@ settings.update_hook_success=Web 钩子更新成功!
settings.delete_webhook=删除 Web 钩子
settings.recent_deliveries=最近推送记录
settings.hook_type=钩子类型
settings.add_slack_hook_desc=将 <a href="%s">Slack</a> 集成到您的仓库中。
settings.add_slack_hook_desc=将 <a href="%s">Slack</a> 集成到您的项目中。
settings.slack_token=令牌
settings.slack_domain=域名
settings.slack_channel=频道
settings.add_discord_hook_desc=将 <a href="%s">Discord</a> 集成到您的仓库中。
settings.add_dingtalk_hook_desc=将 <a href="%s">Dingtalk</a> 集成到您的仓库中。
settings.add_telegram_hook_desc=将 <a href="%s">Telegram</a> 集成到您的仓库中。
settings.add_matrix_hook_desc=将 <a href="%s">Matrix</a> 集成到您的仓库中。
settings.add_msteams_hook_desc=将 <a href="%s">Microsoft Teams</a> 集成到您的仓库中。
settings.add_feishu_hook_desc=将 <a href="%s">Feishu</a> 集成到您的仓库中。
settings.add_discord_hook_desc=将 <a href="%s">Discord</a> 集成到您的项目中。
settings.add_dingtalk_hook_desc=将 <a href="%s">Dingtalk</a> 集成到您的项目中。
settings.add_telegram_hook_desc=将 <a href="%s">Telegram</a> 集成到您的项目中。
settings.add_matrix_hook_desc=将 <a href="%s">Matrix</a> 集成到您的项目中。
settings.add_msteams_hook_desc=将 <a href="%s">Microsoft Teams</a> 集成到您的项目中。
settings.add_feishu_hook_desc=将 <a href="%s">Feishu</a> 集成到您的项目中。
settings.deploy_keys=管理部署密钥
settings.add_deploy_key=添加部署密钥
settings.deploy_key_desc=部署密钥具有对仓库的只读拉取权限。
settings.deploy_key_desc=部署密钥具有对项目的只读拉取权限。
settings.is_writable=启用写权限
settings.is_writable_info=允许此部署密钥 <strong>推送</strong> 提交到仓库
settings.is_writable_info=允许此部署密钥 <strong>推送</strong> 提交到项目
settings.no_deploy_keys=没有部署密钥。
settings.title=标题
settings.deploy_key_content=密钥文本
@@ -1609,7 +1622,7 @@ settings.protect_merge_whitelist_users=合并白名单用户:
settings.protect_merge_whitelist_teams=合并白名单团队:
settings.protect_check_status_contexts=启用状态检查
settings.protect_check_status_contexts_desc=要求状态检查通过才能合并,选择必须先通过哪些状态检查才能合并。如果启用,推送的合并请求必须先通过状态检查才能够合并到对应的分支。如果没有选择具体的状态检查上下文,则所有的状态检查都通过才能合并。
settings.protect_check_status_contexts_list=此仓库上周进行过的状态检查
settings.protect_check_status_contexts_list=此项目上周进行过的状态检查
settings.protect_required_approvals=所需的批准:
settings.protect_required_approvals_desc=只允许合并有足够审核人数的拉取请求。
settings.protect_approvals_whitelist_enabled=批准仅限列入白名单的用户或团队
@@ -1643,22 +1656,22 @@ settings.matrix.homeserver_url=主服务器网址
settings.matrix.room_id=房间ID
settings.matrix.access_token=访问令牌(Access Token)
settings.matrix.message_type=消息类型
settings.archive.button=归档仓库
settings.archive.header=归档此仓库
settings.archive.text=归档后仓库将只有只读权限,并在仪表盘中被隐藏。你将不能再对其建立提交、创建工单或建立合并请求。
settings.archive.success=仓库已成功归档。
settings.archive.error=仓库在归档时出现异常。请通过日志获取详细信息。
settings.archive.error_ismirror=请不要对镜像仓库归档,谢谢!
settings.archive.branchsettings_unavailable=已归档仓库无法进行分支设置。
settings.unarchive.button=撤销仓库归档
settings.unarchive.header=撤销此仓库归档
settings.unarchive.text=取消存档将恢复仓库接收提交,推送,新工单和合并请求。
settings.unarchive.success=仓库已成功取消归档。
settings.unarchive.error=仓库在撤销归档时出现异常。请通过日志获取详细信息。
settings.update_avatar_success=仓库头像已经更新。
settings.archive.button=归档项目
settings.archive.header=归档此项目
settings.archive.text=归档后项目将只有只读权限,并在仪表盘中被隐藏。你将不能再对其建立提交、创建工单或建立合并请求。
settings.archive.success=项目已成功归档。
settings.archive.error=项目在归档时出现异常。请通过日志获取详细信息。
settings.archive.error_ismirror=请不要对镜像项目归档,谢谢!
settings.archive.branchsettings_unavailable=已归档项目无法进行分支设置。
settings.unarchive.button=撤销项目归档
settings.unarchive.header=撤销此项目归档
settings.unarchive.text=取消存档将恢复项目接收提交,推送,新工单和合并请求。
settings.unarchive.success=项目已成功取消归档。
settings.unarchive.error=项目在撤销归档时出现异常。请通过日志获取详细信息。
settings.update_avatar_success=项目头像已经更新。
settings.lfs=LFS
settings.lfs_filelist=存储在此仓库中的 LFS 文件
settings.lfs_no_lfs_files=此仓库中没有 LFS 文件
settings.lfs_filelist=存储在此项目中的 LFS 文件
settings.lfs_no_lfs_files=此项目中没有 LFS 文件
settings.lfs_findcommits=查找提交
settings.lfs_lfs_file_no_commits=没有找到关于此 LFS 文件的提交
settings.lfs_noattribute=此路径在默认分支中没有可锁定的属性
@@ -1674,11 +1687,11 @@ settings.lfs_lock_path=要锁定的文件路径...
settings.lfs_locks_no_locks=无锁定
settings.lfs_lock_file_no_exist=锁定的文件在默认分支中不存在
settings.lfs_force_unlock=强制解锁
settings.lfs_pointers.found=找到 %d 个块指针 - %d 个关联, %d 个未关联(%d 个从仓库丢失)
settings.lfs_pointers.found=找到 %d 个块指针 - %d 个关联, %d 个未关联(%d 个从项目丢失)
settings.lfs_pointers.sha=Blob SHA
settings.lfs_pointers.oid=OID
settings.lfs_pointers.inRepo=在仓库
settings.lfs_pointers.exists=在仓库中存在
settings.lfs_pointers.inRepo=在项目
settings.lfs_pointers.exists=在项目中存在
settings.lfs_pointers.accessible=用户可访问
settings.lfs_pointers.associateAccessible=关联可访问的 %d OID

@@ -1745,7 +1758,7 @@ release.save_draft=保存草稿
release.edit_release=保存此次发布
release.delete_release=删除发布
release.deletion=删除发布
release.deletion_desc=删除一个版本发布将从仓库中删除对应的Git标签。仓库内容和历史将保持不变,继续?
release.deletion_desc=删除一个版本发布将从项目中删除对应的Git标签。项目内容和历史将保持不变,继续?
release.deletion_success=Release已被删除。
release.tag_name_already_exist=使用此标签名称的发布版本已经存在。
release.tag_name_invalid=标签名称无效。
@@ -1765,7 +1778,7 @@ branch.delete_branch_has_new_commits=因为合并之后有新的提交,分支
branch.create_branch=创建分支 <strong>%s</strong>
branch.create_from=从 '%s'
branch.create_success=分支 '%s' 已创建。
branch.branch_already_exists=此仓库已存在名为 '%s' 的分支。
branch.branch_already_exists=此项目已存在名为 '%s' 的分支。
branch.branch_name_conflict=分支 '%s' 与已存在的分支 '%s' 名称冲突。
branch.tag_collision=分支 '%s' 不能被创建因为同名的标签已经存在。
branch.deleted_by=删除人:%s
@@ -1792,7 +1805,7 @@ repo_updated=最后更新于
people=组织成员
teams=组织团队
lower_members=名成员
lower_repositories=个仓库
lower_repositories=个项目
create_new_team=新建团队
create_team=创建团队
org_desc=组织描述
@@ -1800,13 +1813,13 @@ team_name=团队名称
team_desc=团队描述
team_name_helper=团队名字应该简单明了。
team_desc_helper=描述团队的目的或作用。
team_access_desc=仓库权限
team_access_desc=项目权限
team_permission_desc=权限
team_unit_desc=允许访问仓库单元
team_unit_desc=允许访问项目单元
team_unit_disabled=(已禁用)

form.name_reserved=组织名称 '%s' 是被保留的。
form.name_pattern_not_allowed=仓库名称中不允许使用 "%s"。
form.name_pattern_not_allowed=项目名称中不允许使用 "%s"。
form.create_org_not_allowed=此账号禁止创建组织

settings=组织设置
@@ -1815,7 +1828,7 @@ settings.full_name=组织全名
settings.website=官方网站
settings.location=所在地区
settings.permission=权限
settings.repoadminchangeteam=仓库管理员可以添加或移除团队的访问权限
settings.repoadminchangeteam=项目管理员可以添加或移除团队的访问权限
settings.visibility=可见性
settings.visibility.public=公开
settings.visibility.limited=受限 (仅对登录用户可见)
@@ -1831,9 +1844,9 @@ settings.delete_prompt=删除操作会永久清除该组织的信息,并且 <s
settings.confirm_delete_account=确认删除组织
settings.delete_org_title=删除组织
settings.delete_org_desc=此组织将会被永久删除,确认继续吗?
settings.hooks_desc=在此处添加的 Web 钩子将会应用到该组织下的 <strong>所有仓库</strong>。
settings.hooks_desc=在此处添加的 Web 钩子将会应用到该组织下的 <strong>所有项目</strong>。

settings.labels_desc=添加能够被该组织下的 <strong>所有仓库</strong> 的工单使用的标签。
settings.labels_desc=添加能够被该组织下的 <strong>所有项目</strong> 的工单使用的标签。

members.membership_visibility=成员可见性:
members.public=可见
@@ -1850,17 +1863,17 @@ members.invite_now=立即邀请

teams.join=加入团队
teams.leave=离开团队
teams.can_create_org_repo=创建仓库
teams.can_create_org_repo_helper=成员可以在组织中创建仓库。创建者将自动获得创建的仓库的管理员权限。
teams.can_create_org_repo=创建项目
teams.can_create_org_repo_helper=成员可以在组织中创建项目。创建者将自动获得创建的项目的管理员权限。
teams.read_access=读取权限
teams.read_access_helper=成员可以查看和克隆团队仓库
teams.read_access_helper=成员可以查看和克隆团队项目
teams.write_access=写入权限
teams.write_access_helper=成员可以查看和推送提交到团队仓库
teams.write_access_helper=成员可以查看和推送提交到团队项目
teams.admin_access=管理员权限
teams.admin_access_helper=成员可以拉取和推送到团队仓库同时可以添加协作者。
teams.admin_access_helper=成员可以拉取和推送到团队项目同时可以添加协作者。
teams.no_desc=该团队暂无描述
teams.settings=团队设置
teams.owners_permission_desc=管理员团队对 <strong>所有仓库</strong> 具有操作权限,且对组织具有 <strong>管理员权限</strong>。
teams.owners_permission_desc=管理员团队对 <strong>所有项目</strong> 具有操作权限,且对组织具有 <strong>管理员权限</strong>。
teams.members=团队成员
teams.update_settings=更新团队设置
teams.delete_team=删除团队
@@ -1868,34 +1881,34 @@ teams.add_team_member=添加团队成员
teams.delete_team_title=删除团队
teams.delete_team_desc=删除一个团队将删除团队成员的访问权限,继续?
teams.delete_team_success=该团队已被删除。
teams.read_permission_desc=该团队拥有对所属仓库的 <strong>读取</strong> 权限,团队成员可以进行查看和克隆等只读操作。
teams.write_permission_desc=该团队拥有对所属仓库的 <strong>读取</strong> 和 <strong>写入</strong> 的权限。
teams.admin_permission_desc=该团队拥有一定的 <strong>管理</strong> 权限,团队成员可以读取、克隆、推送以及添加其它仓库协作者。
teams.create_repo_permission_desc=此外,该团队拥有了 <strong>创建仓库</strong> 的权限:成员可以在组织中创建新的仓库
teams.repositories=团队仓库
teams.search_repo_placeholder=搜索仓库...
teams.remove_all_repos_title=移除所有团队仓库
teams.remove_all_repos_desc=这将从团队中移除所有仓库
teams.add_all_repos_title=添加所有仓库
teams.add_all_repos_desc=这将把组织的所有仓库添加到团队。
teams.add_nonexistent_repo=您尝试添加到团队的仓库不存在,请先创建仓库
teams.read_permission_desc=该团队拥有对所属项目的 <strong>读取</strong> 权限,团队成员可以进行查看和克隆等只读操作。
teams.write_permission_desc=该团队拥有对所属项目的 <strong>读取</strong> 和 <strong>写入</strong> 的权限。
teams.admin_permission_desc=该团队拥有一定的 <strong>管理</strong> 权限,团队成员可以读取、克隆、推送以及添加其它项目协作者。
teams.create_repo_permission_desc=此外,该团队拥有了 <strong>创建项目</strong> 的权限:成员可以在组织中创建新的项目
teams.repositories=团队项目
teams.search_repo_placeholder=搜索项目...
teams.remove_all_repos_title=移除所有团队项目
teams.remove_all_repos_desc=这将从团队中移除所有项目
teams.add_all_repos_title=添加所有项目
teams.add_all_repos_desc=这将把组织的所有项目添加到团队。
teams.add_nonexistent_repo=您尝试添加到团队的项目不存在,请先创建项目
teams.add_duplicate_users=用户已经是团队成员。
teams.repos.none=此团队无法访问任何仓库
teams.repos.none=此团队无法访问任何项目
teams.members.none=团队中没有成员。
teams.specific_repositories=指定仓库
teams.specific_repositories_helper=团队成员将只能访问添加到团队的仓库。 选择此项 <strong>将不会</strong> 自动删除已经添加的仓库
teams.all_repositories=所有仓库
teams.all_repositories_helper=团队可以访问所有仓库。选择此选项将 <strong>添加所有现有的</strong> 仓库到指定团队。
teams.all_repositories_read_permission_desc=此团队授予<strong>读取</strong><strong>所有仓库</strong>的访问权限: 成员可以查看和克隆仓库
teams.all_repositories_write_permission_desc=此团队授予<strong>修改</strong><strong>所有仓库</strong>的访问权限: 成员可以查看和推送至仓库
teams.all_repositories_admin_permission_desc=该团队拥有 <strong>管理</strong> <strong>所有仓库</strong>的权限:团队成员可以读取、克隆、推送以及添加其它仓库协作者。
teams.specific_repositories=指定项目
teams.specific_repositories_helper=团队成员将只能访问添加到团队的项目。 选择此项 <strong>将不会</strong> 自动删除已经添加的项目
teams.all_repositories=所有项目
teams.all_repositories_helper=团队可以访问所有项目。选择此选项将 <strong>添加所有现有的</strong> 项目到指定团队。
teams.all_repositories_read_permission_desc=此团队授予<strong>读取</strong><strong>所有项目</strong>的访问权限: 成员可以查看和克隆项目
teams.all_repositories_write_permission_desc=此团队授予<strong>修改</strong><strong>所有项目</strong>的访问权限: 成员可以查看和推送至项目
teams.all_repositories_admin_permission_desc=该团队拥有 <strong>管理</strong> <strong>所有项目</strong>的权限:团队成员可以读取、克隆、推送以及添加其它项目协作者。

[admin]
dashboard=管理面板
users=帐户管理
organizations=组织管理
datasets=数据集
repositories=仓库管理
repositories=项目管理
hooks=默认Web钩子
systemhooks=系统 Web 钩子
authentication=认证源
@@ -1910,7 +1923,7 @@ total=总计:%d
dashboard.statistic=摘要
dashboard.operations=维护操作
dashboard.system_status=系统状态
dashboard.statistic_info=Gitea 数据库统计:<b>%d</b> 位用户,<b>%d</b> 个组织,<b>%d</b> 个公钥,<b>%d</b> 个仓库,<b>%d</b> 个仓库关注,<b>%d</b> 个赞,<b>%d</b> 次行为,<b>%d</b> 条权限记录,<b>%d</b> 张工单,<b>%d</b> 次评论,<b>%d</b> 个社交帐号,<b>%d</b> 个用户关注,<b>%d</b> 个镜像,<b>%d</b> 个版本发布,<b>%d</b> 个登录源,<b>%d</b> 个 Web 钩子,<b>%d</b> 个里程碑,<b>%d</b> 个标签,<b>%d</b> 个钩子任务,<b>%d</b> 个团队,<b>%d</b> 个更新任务,<b>%d</b> 个附件。
dashboard.statistic_info=Gitea 数据库统计:<b>%d</b> 位用户,<b>%d</b> 个组织,<b>%d</b> 个公钥,<b>%d</b> 个项目,<b>%d</b> 个项目关注,<b>%d</b> 个赞,<b>%d</b> 次行为,<b>%d</b> 条权限记录,<b>%d</b> 张工单,<b>%d</b> 次评论,<b>%d</b> 个社交帐号,<b>%d</b> 个用户关注,<b>%d</b> 个镜像,<b>%d</b> 个版本发布,<b>%d</b> 个登录源,<b>%d</b> 个 Web 钩子,<b>%d</b> 个里程碑,<b>%d</b> 个标签,<b>%d</b> 个钩子任务,<b>%d</b> 个团队,<b>%d</b> 个更新任务,<b>%d</b> 个附件。
dashboard.operation_name=操作名称
dashboard.operation_switch=开关
dashboard.operation_run=执行
@@ -1929,22 +1942,22 @@ dashboard.cron.error=任务中的错误: %s: %[3]s
dashboard.cron.finished=任务:%[1]s 已经完成
dashboard.delete_inactive_accounts=删除所有未激活的帐户
dashboard.delete_inactive_accounts.started=删除所有未激活的账户任务已启动。
dashboard.delete_repo_archives=删除所有仓库存档
dashboard.delete_repo_archives.started=删除所有仓库存档任务已启动。
dashboard.delete_missing_repos=删除所有丢失 Git 文件的仓库
dashboard.delete_missing_repos.started=删除所有丢失 Git 文件的仓库任务已启动。
dashboard.delete_generated_repository_avatars=删除生成的仓库头像
dashboard.update_mirrors=更新镜像仓库
dashboard.repo_health_check=健康检查所有仓库
dashboard.check_repo_stats=检查所有仓库统计
dashboard.archive_cleanup=删除旧的仓库存档
dashboard.delete_repo_archives=删除所有项目存档
dashboard.delete_repo_archives.started=删除所有项目存档任务已启动。
dashboard.delete_missing_repos=删除所有丢失 Git 文件的项目
dashboard.delete_missing_repos.started=删除所有丢失 Git 文件的项目任务已启动。
dashboard.delete_generated_repository_avatars=删除生成的项目头像
dashboard.update_mirrors=更新镜像项目
dashboard.repo_health_check=健康检查所有项目
dashboard.check_repo_stats=检查所有项目统计
dashboard.archive_cleanup=删除旧的项目存档
dashboard.deleted_branches_cleanup=清理已删除的分支
dashboard.update_migration_poster_id=更新迁移的发表者ID
dashboard.git_gc_repos=对仓库进行垃圾回收
dashboard.git_gc_repos=对项目进行垃圾回收
dashboard.resync_all_sshkeys=使用 Gitea SSH 密钥更新'.ssh/authorized_keys' 文件。
dashboard.resync_all_sshkeys.desc=(内置的 SSH 服务器不需要。)
dashboard.resync_all_hooks=重新同步所有仓库的 pre-receive、update 和 post-receive 钩子
dashboard.reinit_missing_repos=重新初始化所有丢失的 Git 仓库存在的记录
dashboard.resync_all_hooks=重新同步所有项目的 pre-receive、update 和 post-receive 钩子
dashboard.reinit_missing_repos=重新初始化所有丢失的 Git 项目存在的记录
dashboard.sync_external_users=同步外部用户数据
dashboard.server_uptime=服务运行时间
dashboard.current_goroutine=当前 Goroutines 数量
@@ -1983,7 +1996,7 @@ users.full_name=全名
users.activated=已激活
users.admin=管理员
users.restricted=受限
users.repos=仓库
users.repos=项目
users.created=创建时间
users.last_login=上次登录
users.never_login=从未登录
@@ -1996,7 +2009,7 @@ users.auth_login_name=认证登录名称
users.password_helper=保持密码为空将不更改密码。
users.update_profile_success=该帐户已被更新。
users.edit_account=编辑帐号
users.max_repo_creation=最大仓库
users.max_repo_creation=最大项目
users.max_repo_creation_desc=(设置为 -1 表示使用全局默认值)
users.is_activated=该用户已被激活
users.prohibit_login=禁用登录
@@ -2004,11 +2017,11 @@ users.is_admin=是管理员
users.is_restricted=受限
users.allow_git_hook=允许创建 Git 钩子
users.allow_git_hook_tooltip=Git 钩子作为运行 Gitea 的操作系统用户执行,并且将拥有相同级别的主机访问权限
users.allow_import_local=允许导入本地仓库
users.allow_import_local=允许导入本地项目
users.allow_create_organization=允许创建组织
users.update_profile=更新帐户
users.delete_account=删除帐户
users.still_own_repo=此用户仍然拥有一个或多个仓库。必须首先删除或转让这些仓库
users.still_own_repo=此用户仍然拥有一个或多个项目。必须首先删除或转让这些项目
users.still_has_org=此用户是组织的成员。必须先从组织中删除用户。
users.deletion_success=用户帐户已被删除。

@@ -2031,7 +2044,7 @@ orgs.teams=团队
orgs.members=成员
orgs.new_orga=创建新的组织

repos.repo_manage_panel=仓库管理
repos.repo_manage_panel=项目管理
repos.owner=所有者
repos.name=名称
repos.private=私有库
@@ -2046,11 +2059,11 @@ datasets.owner=所有者
datasets.name=名称
datasets.private=私有

hooks.desc=当某些 Gitea 事件触发时, Web 钩子会自动向服务器发出 HTTP POST 请求。此处定义的 Web 钩子是默认值, 将复制到所有新建仓库中。参阅 <a target="_blank" rel="noopener" href="https://docs.gitea.io/en-us/webhooks/">Web钩子指南</a> 获取更多内容。
hooks.desc=当某些 Gitea 事件触发时, Web 钩子会自动向服务器发出 HTTP POST 请求。此处定义的 Web 钩子是默认值, 将复制到所有新建项目中。参阅 <a target="_blank" rel="noopener" href="https://docs.gitea.io/en-us/webhooks/">Web钩子指南</a> 获取更多内容。
hooks.add_webhook=新增默认Web钩子
hooks.update_webhook=更新默认Web钩子

systemhooks.desc=当某些 Gitea 事件触发时, Web 钩子会自动向服务器发出 HTTP POST 请求。此处定义的 Web 钩子是默认值, 将复制到所有新建仓库中。参阅 <a target="_blank" rel="noopener" href="https://docs.gitea.io/zh-cn/webhooks/">Web钩子指南</a> 获取更多内容。
systemhooks.desc=当某些 Gitea 事件触发时, Web 钩子会自动向服务器发出 HTTP POST 请求。此处定义的 Web 钩子是默认值, 将复制到所有新建项目中。参阅 <a target="_blank" rel="noopener" href="https://docs.gitea.io/zh-cn/webhooks/">Web钩子指南</a> 获取更多内容。
systemhooks.add_webhook=添加系统 Web 钩子
systemhooks.update_webhook=更新系统 Web 钩子

@@ -2156,7 +2169,7 @@ config.disable_router_log=关闭路由日志
config.run_user=以用户名运行
config.run_mode=运行模式
config.git_version=Git 版本
config.repo_root_path=仓库根目录
config.repo_root_path=项目根目录
config.lfs_root_path=LFS根目录
config.static_file_root_path=静态文件根目录
config.log_file_root_path=日志路径
@@ -2354,15 +2367,15 @@ notices.inverse_selection=反向选中
notices.delete_selected=删除选中项
notices.delete_all=删除所有提示
notices.type=提示类型
notices.type_1=仓库
notices.type_1=项目
notices.type_2=任务
notices.desc=提示描述
notices.op=操作
notices.delete_success=系统通知已被删除。

[action]
create_repo=创建了仓库 <a href="%s">%s</a>
rename_repo=重命名仓库 <code>%[1]s</code> 为 <a href="%[2]s">%[3]s</a>
create_repo=创建了项目 <a href="%s">%s</a>
rename_repo=重命名项目 <code>%[1]s</code> 为 <a href="%[2]s">%[3]s</a>
commit_repo=推送了 <a href="%[1]s/src/branch/%[2]s">%[3]s</a> 分支的代码到 <a href="%[1]s">%[4]s</a>
create_issue=`创建了工单 <a href="%s/issues/%s">%s#%[2]s</a>`
close_issue=`关闭了工单 <a href="%s/issues/%s">%s#%[2]s</a>`
@@ -2373,7 +2386,7 @@ reopen_pull_request=`重新开启了合并请求 <a href="%s/pulls/%s">%s#%[2]s<
comment_issue=`评论了工单 <a href="%s/issues/%s">%s#%[2]s</a>`
comment_pull=`评论了合并请求 <a href="%s/pulls/%s">%s#%[2]s</a>`
merge_pull_request=`合并了合并请求 <a href="%s/pulls/%s">%s#%[2]s</a>`
transfer_repo=将仓库 <code>%s</code> 转移至 <a href="%s">%s</a>
transfer_repo=将项目 <code>%s</code> 转移至 <a href="%s">%s</a>
push_tag=推送了标签 <a href="%s/src/tag/%s">%[2]s</a> 到 <a href="%[1]s">%[3]s</a>
delete_tag=从<a href="%[1]s">%[3]s</a> 删除了标签 %[2]s
delete_branch=从 <a href="%[1]s">%[3]s</a> 删除分支 %[2]s
@@ -2437,8 +2450,8 @@ error.probable_bad_signature=警告!虽然数据库中有一个此ID的密钥
error.probable_bad_default_signature=警告!虽然默认密钥拥有此ID,但它没有验证此提交!此提交是有疑问的。

[units]
error.no_unit_allowed_repo=您没有被允许访问此仓库的任何单元。
error.unit_not_allowed=您没有权限访问此仓库单元
error.no_unit_allowed_repo=您没有被允许访问此项目的任何单元。
error.unit_not_allowed=您没有权限访问此项目单元

[custom]
head.community=社区


+ 0
- 256
routers/dataset/dataset.go View File

@@ -1,256 +0,0 @@
package dataset

import (
"errors"
"strings"

"code.gitea.io/gitea/models"
"code.gitea.io/gitea/modules/auth"
"code.gitea.io/gitea/modules/base"
"code.gitea.io/gitea/modules/context"
"code.gitea.io/gitea/modules/log"
"code.gitea.io/gitea/modules/setting"
"code.gitea.io/gitea/routers/repo"
"github.com/unknwon/com"
)

const (
tplDataSet base.TplName = "datasets/index"
tplShow base.TplName = "datasets/show"
tplCreate base.TplName = "datasets/create"
tplEdit base.TplName = "datasets/edit"
)

type ListOptions struct {
PageSize int
Page int // start from 1
}

func List(ctx *context.Context) {
ctx.Data["PageIsDatasets"] = true

var (
datasets []*models.Dataset
count int64
err error
orderBy models.SearchOrderBy
)

page := ctx.QueryInt("page")
if page <= 0 {
page = 1
}
ctx.Data["SortType"] = ctx.Query("sort")
switch ctx.Query("sort") {
case "newest":
orderBy = models.SearchOrderByNewest
case "oldest":
orderBy = models.SearchOrderByOldest
case "recentupdate":
orderBy = models.SearchOrderByRecentUpdated
case "leastupdate":
orderBy = models.SearchOrderByLeastUpdated
case "reversealphabetically":
orderBy = models.SearchOrderByAlphabeticallyReverse
case "alphabetically":
orderBy = models.SearchOrderByAlphabetically
case "reversesize":
orderBy = models.SearchOrderBySizeReverse
default:
ctx.Data["SortType"] = "recentupdate"
orderBy = models.SearchOrderByRecentUpdated
}
keyword := strings.Trim(ctx.Query("q"), " ")
var userID int64
if ctx.User != nil {
userID = ctx.User.ID
}
opts := &models.SearchDatasetOptions{
Keyword: keyword,
IncludePublic: true,
SearchOrderBy: orderBy,
OwnerID: userID,
ListOptions: models.ListOptions{
Page: page,
PageSize: setting.UI.ExplorePagingNum,
},
}

if len(opts.SearchOrderBy) == 0 {
opts.SearchOrderBy = models.SearchOrderByAlphabetically
}

datasets, count, err = models.SearchDataset(opts)
if err != nil {
ctx.ServerError("SearchDatasets", err)
return
}

pager := context.NewPagination(int(count), opts.PageSize, page, 5)
pager.SetDefaultParams(ctx)
ctx.Data["Page"] = pager

ctx.Data["datasets"] = datasets
ctx.Data["datasetsCount"] = count
ctx.HTML(200, tplDataSet)
}

func Create(ctx *context.Context) {
ctx.HTML(200, tplCreate)
}

func CreatePost(ctx *context.Context, form auth.CreateDatasetForm) {
ctx.Data["Title"] = ctx.Tr("new_dataset")

ctxUser := ctx.User

if ctx.HasError() {
ctx.HTML(200, tplCreate)
return
}

status := models.DatasetStatusPublic
if form.Private {
status = models.DatasetStatusPrivate
}

var err error
opts := models.Dataset{
Title: form.Title,
Category: form.Category,
Description: form.Description,
License: form.License,
Task: form.Task,
ReleaseID: form.ReleaseID,
UserID: ctxUser.ID,
Status: status,
}

if err = models.CreateDataset(&opts); err != nil {
log.Error("%v", err)
}

var attachmentUUIDs []string
if setting.Attachment.Enabled {
attachmentUUIDs = form.Files
}

if err = models.AddDatasetAttachments(opts.ID, attachmentUUIDs); err != nil {
log.Error("%v", err)
}

if err == nil {
log.Trace("Dataset created [%d]: %s/%s", opts.ID, ctxUser.Name, opts.Title)
ctx.Redirect(setting.AppSubURL + "/datasets/" + com.ToStr(opts.ID))
return
}
}

func Show(ctx *context.Context) {
ctx.Data["Title"] = ctx.Tr("dataset.show_dataset")

user := ctx.User
dataset, err := models.GetOwnerDatasetByID(ctx.ParamsInt64((":id")), user)
if err != nil {
ctx.NotFound("GetDataset", err)
return
}

err = models.GeDatasetAttachments(dataset)
if err != nil {
ctx.ServerError("GetDatasetAttachments", err)
return
}

isOwner := (ctx.User != nil && dataset.UserID == user.ID)

ctx.Data["dataset"] = dataset
ctx.Data["IsOwner"] = isOwner

ctx.HTML(200, tplShow)
}

// EditDataset render release edit page
func EditDataset(ctx *context.Context) {
ctx.Data["Title"] = ctx.Tr("dataset.edit_dataset")
ctx.Data["PageIsEditDataset"] = true
repo.RenderAttachmentSettings(ctx)
rel, err := models.GetOwnerDatasetByID(ctx.ParamsInt64(":id"), ctx.User)
if err != nil {
ctx.NotFound("GetDataset", err)
return
}
isOwner := (ctx.User != nil && rel.UserID == ctx.User.ID)
if !isOwner {
ctx.NotFound("403", errors.New("not owner"))
return
}

ctx.Data["ID"] = rel.ID
ctx.Data["title"] = rel.Title
ctx.Data["private"] = rel.IsPrivate()
ctx.Data["description"] = rel.Description
ctx.Data["category"] = rel.Category
ctx.Data["task"] = rel.Task
ctx.Data["license"] = rel.License

ctx.HTML(200, tplEdit)
}

func EditDatasetPost(ctx *context.Context, form auth.EditDatasetForm) {
ctx.Data["Title"] = ctx.Tr("dataset.edit_dataset")

rel, err := models.GetDatasetByID(ctx.ParamsInt64(":id"))
if err != nil {
ctx.ServerError("GetDataset", err)
return
}
isOwner := (ctx.User != nil && rel.UserID == ctx.User.ID)
if !isOwner {
ctx.NotFound("403", errors.New("not owner"))
return
}
ctx.Data["ID"] = rel.ID
ctx.Data["title"] = rel.Title
ctx.Data["description"] = rel.Description
ctx.Data["category"] = rel.Category
ctx.Data["task"] = rel.Task
ctx.Data["license"] = rel.License
ctx.Data["private"] = rel.IsPrivate()

if ctx.HasError() {
ctx.HTML(200, tplCreate)
return
}

var attachmentUUIDs []string
if setting.Attachment.Enabled {
attachmentUUIDs = form.Files
}

status := models.DatasetStatusPublic
if form.Private {
status = models.DatasetStatusPrivate
}

rel.Title = form.Title
rel.Status = status
rel.Description = form.Description
rel.Category = form.Category
rel.Task = form.Task
rel.License = form.License
if err = models.UpdateDataset(models.DefaultDBContext(), rel); err != nil {
log.Error("%v", err)
}

if err = models.AddDatasetAttachments(rel.ID, attachmentUUIDs); err != nil {
log.Error("%v", err)
}
log.Trace("Dataset updated: %d", rel.ID)

ctx.Redirect(setting.AppSubURL + "/datasets/" + com.ToStr(rel.ID))
}

func Delete(ctx *context.Context) {
log.Debug("[dataset] Delete...\n")
}

+ 18
- 1
routers/repo/attachment.go View File

@@ -7,6 +7,7 @@ package repo
import (
"fmt"
"net/http"
"strconv"
"strings"

"code.gitea.io/gitea/models"
@@ -57,9 +58,13 @@ func UploadAttachment(ctx *context.Context) {
return
}

datasetID, _ := strconv.ParseInt(ctx.Req.FormValue("dataset_id"), 10, 64)

attach, err := models.NewAttachment(&models.Attachment{
IsPrivate: true,
UploaderID: ctx.User.ID,
Name: header.Filename,
DatasetID: datasetID,
}, buf, file)
if err != nil {
ctx.Error(500, fmt.Sprintf("NewAttachment: %v", err))
@@ -72,6 +77,18 @@ func UploadAttachment(ctx *context.Context) {
})
}

func UpdatePublicAttachment(ctx *context.Context) {
file := ctx.Query("file")
isPrivate, _ := strconv.ParseBool(ctx.Query("is_private"))
attach, err := models.GetAttachmentByUUID(file)
if err != nil {
ctx.Error(404, err.Error())
return
}
attach.IsPrivate = isPrivate
models.UpdateAttachment(attach)
}

// DeleteAttachment response for deleting issue's attachment
func DeleteAttachment(ctx *context.Context) {
file := ctx.Query("file")
@@ -182,7 +199,7 @@ func GetAttachment(ctx *context.Context) {

}

func increaseDownloadCount(attach *models.Attachment, dataSet *models.Dataset) error{
func increaseDownloadCount(attach *models.Attachment, dataSet *models.Dataset) error {
if err := attach.IncreaseDownloadCount(); err != nil {
return err
}


+ 114
- 0
routers/repo/dataset.go View File

@@ -0,0 +1,114 @@
package repo

import (
"sort"

"code.gitea.io/gitea/models"
"code.gitea.io/gitea/modules/auth"
"code.gitea.io/gitea/modules/base"
"code.gitea.io/gitea/modules/context"
"code.gitea.io/gitea/modules/log"
)

const (
tplIndex base.TplName = "repo/datasets/index"
)

// MustEnableDataset check if repository enable internal dataset
func MustEnableDataset(ctx *context.Context) {
if !ctx.Repo.CanRead(models.UnitTypeDatasets) {
ctx.NotFound("MustEnableDataset", nil)
return
}
}

func filterPrivateAttachments(ctx *context.Context, list []*models.Attachment) []*models.Attachment {
if ctx.Repo.CanWrite(models.UnitTypeDatasets) {
return list
} else {
var publicList []*models.Attachment
for _, attach := range list {
if !attach.IsPrivate {
publicList = append(publicList, attach)
}
}
return publicList
}

}

func DatasetIndex(ctx *context.Context) {
MustEnableDataset(ctx)

repo := ctx.Repo.Repository

dataset, err := models.GetDatasetByRepo(repo)
if err != nil {
ctx.NotFound("GetDatasetByRepo", err)
return
}
err = models.GetDatasetAttachments(dataset)
if err != nil {
ctx.ServerError("GetDatasetAttachments", err)
return
}
attachments := filterPrivateAttachments(ctx, dataset.Attachments)

ctx.Data["SortType"] = ctx.Query("sort")
switch ctx.Query("sort") {
case "newest":
sort.Slice(attachments, func(i, j int) bool {
return attachments[i].CreatedUnix > attachments[j].CreatedUnix
})
case "oldest":
sort.Slice(attachments, func(i, j int) bool {
return attachments[i].CreatedUnix < attachments[j].CreatedUnix
})
default:
ctx.Data["SortType"] = "newest"
sort.Slice(attachments, func(i, j int) bool {
return attachments[i].CreatedUnix > attachments[j].CreatedUnix
})
}

ctx.Data["PageIsDataset"] = true
ctx.Data["Title"] = ctx.Tr("dataset.show_dataset")
ctx.Data["Link"] = ctx.Repo.RepoLink + "/datasets"
ctx.Data["dataset"] = dataset
ctx.Data["Attachments"] = attachments
ctx.Data["IsOwner"] = true

ctx.HTML(200, tplIndex)
}

func EditDatasetPost(ctx *context.Context, form auth.EditDatasetForm) {
ctx.Data["PageIsDataset"] = true

ctx.Data["Title"] = ctx.Tr("dataset.edit_dataset")

rel, err := models.GetDatasetByID(form.ID)
ctx.Data["dataset"] = rel

if err != nil {
ctx.ServerError("GetDataset", err)
return
}

if ctx.HasError() {
ctx.Data["Error"] = true
ctx.HTML(200, tplIndex)
return
}

rel.Title = form.Title
rel.Description = form.Description
rel.Category = form.Category
rel.Task = form.Task
rel.License = form.License
if err = models.UpdateDataset(models.DefaultDBContext(), rel); err != nil {
ctx.Data["Error"] = true
ctx.HTML(200, tplIndex)
log.Error("%v", err)
}
ctx.Redirect(ctx.Repo.RepoLink + "/datasets")
}

+ 16
- 0
routers/repo/setting.go View File

@@ -210,6 +210,22 @@ func SettingsPost(ctx *context.Context, form auth.RepoSettingForm) {
// This section doesn't require repo_name/RepoName to be set in the form, don't show it
// as an error on the UI for this action
ctx.Data["Err_RepoName"] = nil
if err := models.CreateDefaultDatasetToRepo(repo); err != nil {
ctx.ServerError("CreateDefaultDatasetToRepo", err)
return
}

if form.EnableDataset && !models.UnitTypeDatasets.UnitGlobalDisabled() {
units = append(units, models.RepoUnit{
RepoID: repo.ID,
Type: models.UnitTypeDatasets,
Config: &models.DatasetConfig{
EnableDataset: form.EnableDataset,
},
})
} else if !models.UnitTypeDatasets.UnitGlobalDisabled() {
deleteUnitTypes = append(deleteUnitTypes, models.UnitTypeDatasets)
}

if form.EnableWiki && form.EnableExternalWiki && !models.UnitTypeExternalWiki.UnitGlobalDisabled() {
if !validation.IsValidExternalURL(form.ExternalWikiURL) {


+ 9
- 14
routers/routes/routes.go View File

@@ -26,7 +26,6 @@ import (
"code.gitea.io/gitea/routers"
"code.gitea.io/gitea/routers/admin"
apiv1 "code.gitea.io/gitea/routers/api/v1"
"code.gitea.io/gitea/routers/dataset"
"code.gitea.io/gitea/routers/dev"
"code.gitea.io/gitea/routers/events"
"code.gitea.io/gitea/routers/org"
@@ -467,7 +466,7 @@ func RegisterRoutes(m *macaron.Macaron) {

m.Group("/datasets", func() {
m.Get("", admin.Datasets)
m.Post("/delete", admin.DeleteDataset)
// m.Post("/delete", admin.DeleteDataset)
})

m.Group("/^:configType(hooks|system-hooks)$", func() {
@@ -521,6 +520,7 @@ func RegisterRoutes(m *macaron.Macaron) {
m.Post("/delete", repo.DeleteAttachment)
m.Get("/get_pre_url", repo.GetPresignedPutObjectURL)
m.Post("/add", repo.AddAttachment)
m.Post("/private", repo.UpdatePublicAttachment)
}, reqSignIn)

m.Group("/:username", func() {
@@ -542,6 +542,8 @@ func RegisterRoutes(m *macaron.Macaron) {
reqRepoPullsReader := context.RequireRepoReader(models.UnitTypePullRequests)
reqRepoIssuesOrPullsWriter := context.RequireRepoWriterOr(models.UnitTypeIssues, models.UnitTypePullRequests)
reqRepoIssuesOrPullsReader := context.RequireRepoReaderOr(models.UnitTypeIssues, models.UnitTypePullRequests)
reqRepoDatasetReader := context.RequireRepoReader(models.UnitTypeDatasets)
reqRepoDatasetWriter := context.RequireRepoWriter(models.UnitTypeDatasets)

// ***** START: Organization *****
m.Group("/org", func() {
@@ -862,6 +864,11 @@ func RegisterRoutes(m *macaron.Macaron) {
m.Get("/milestones", reqRepoIssuesOrPullsReader, repo.Milestones)
}, context.RepoRef())

m.Group("/datasets", func() {
m.Get("", reqRepoDatasetReader, repo.DatasetIndex)
m.Post("", reqRepoDatasetWriter, bindIgnErr(auth.EditDatasetForm{}), repo.EditDatasetPost)
}, context.RepoRef())

m.Group("/wiki", func() {
m.Get("/?:page", repo.Wiki)
m.Get("/_pages", repo.WikiPages)
@@ -1007,18 +1014,6 @@ func RegisterRoutes(m *macaron.Macaron) {
})
})
// ***** END: Repository *****

// DataSet
m.Group("/datasets", func() {
// m.Get("", dataset.List)
m.Get("/create", dataset.Create)
m.Post("/create", bindIgnErr(auth.CreateDatasetForm{}), dataset.CreatePost)
m.Post("/delete", dataset.Delete)
m.Get("/:id", dataset.Show)
m.Get("/edit/:id", dataset.EditDataset)
m.Post("/edit/:id", bindIgnErr(auth.EditDatasetForm{}), dataset.EditDatasetPost)
}, ignSignIn)
// ***** END: DataSet*****
m.Group("/notifications", func() {
m.Get("", user.Notifications)
m.Post("/status", user.NotificationStatusPost)


+ 1
- 8
templates/admin/dataset/list.tmpl View File

@@ -14,7 +14,6 @@
<thead>
<tr>
<th>ID</th>
<th>{{.i18n.Tr "admin.datasets.owner"}}</th>
<th>{{.i18n.Tr "admin.datasets.name"}}</th>
<th>{{.i18n.Tr "admin.datasets.private"}}</th>
<th>{{.i18n.Tr "admin.users.created"}}</th>
@@ -25,16 +24,10 @@
{{range .Datasets}}
<tr>
<td>{{.ID}}</td>
<td>
<a href="{{AppSubUrl}}/{{.User.Name}}">{{.User.Name}}</a>
{{if .User.Visibility.IsPrivate}}
<span class="text gold">{{svg "octicon-lock" 16}}</span>
{{end}}
</td>
<td><a href="{{AppSubUrl}}/">{{.Title}}</a></td>
<td><i class="fa fa{{if .IsPrivate}}-check{{end}}-square-o"></i></td>
<td><span title="{{.CreatedUnix.FormatLong}}">{{.CreatedUnix.FormatShort}}</span></td>
<td><a class="delete-button" href="" data-url="{{$.Link}}/delete?page={{$.Page.Paginater.Current}}&sort={{$.SortType}}" data-id="{{.ID}}" data-name="{{.Title}}"><i class="trash icon text red"></i></a></td>
<td></td>
</tr>
{{end}}
</tbody>


+ 34
- 19
templates/base/footer_content.tmpl View File

@@ -1,26 +1,41 @@
<footer>
<div class="ui container">
<div class="ui left">
{{.i18n.Tr "powered_by" "Gitea"}} {{if (or .ShowFooterVersion .PageIsAdmin)}}{{.i18n.Tr "version"}}: {{AppVer}}{{end}} {{if ShowFooterTemplateLoadTime}}{{.i18n.Tr "page"}}: <strong>{{LoadTimes .PageStartTime}}</strong> {{.i18n.Tr "template"}}: <strong>{{call .TmplLoadTimes}}</strong>{{end}}
</div>
<div class="ui right links">
{{if .ShowFooterBranding}}
<a target="_blank" rel="noopener noreferrer" href="https://github.com/go-gitea/gitea"><i class="fa fa-github-square"></i><span class="sr-only">GitHub</span></a>
{{end}}
<div class="ui language bottom floating slide up dropdown link item">
<i class="world icon"></i>
<div class="text">{{.LangName}}</div>
<div class="menu">
{{range .AllLangs}}
<a lang="{{.Lang}}" class="item {{if eq $.Lang .Lang}}active selected{{end}}" href="{{if eq $.Lang .Lang}}#{{else}}{{$.Link}}?lang={{.Lang}}{{end}}">{{.Name}}</a>
{{end}}
<div class="ui grid">
<div class="sixteen wide mobile eight wide tablet eight wide computer column">
<div class="ui three column grid">
<div class="column ui vertical text menu">
<div class="header item">{{.i18n.Tr "custom.head.community"}}</div>
<a href="https://www.openi.org.cn/html/Club/2019/0227/14.html" class="item">{{.i18n.Tr "custom.foot.council"}}</a>
<a href="https://www.openi.org.cn/html/Club/2019/0227/14.html" class="item">{{.i18n.Tr "custom.foot.technical_committee"}}</a>
<a href="https://www.openi.org.cn/html/Club/2019/0228/17.html" class="item">{{.i18n.Tr "custom.foot.join"}}</a>
</div>
<div class="column ui vertical text menu">
<div class="header item">{{.i18n.Tr "custom.foot.news"}}</div>
<a href="https://www.openi.org.cn/html/news/dongtai/" class="item">{{.i18n.Tr "custom.foot.community_news"}}</a>
<a href="https://www.openi.org.cn/html/news/huodong/" class="item">{{.i18n.Tr "custom.foot.member_news"}}</a>
<a href="https://www.openi.org.cn/html/news/zixun/" class="item">{{.i18n.Tr "custom.foot.industry_advisory"}}</a>
</div>
<div class="column ui vertical text menu">
<div class="header item">{{.i18n.Tr "custom.foot.help"}}</div>
<div class="ui language bottom floating slide up dropdown link item">
<i class="world icon"></i>
<div class="text">{{.LangName}}</div>
<div class="menu">
{{range .AllLangs}}
<a lang="{{.Lang}}" class="item {{if eq $.Lang .Lang}}active selected{{end}}" href="{{if eq $.Lang .Lang}}#{{else}}{{$.Link}}?lang={{.Lang}}{{end}}">{{.Name}}</a>
{{end}}
</div>
</div>
{{template "custom/extra_links_footer" .}}
</div>
</div>
</div>
<a href="{{StaticUrlPrefix}}/vendor/librejs.html" data-jslicense="1">JavaScript licenses</a>
{{if .EnableSwagger}}<a href="{{AppSubUrl}}/api/swagger">API</a>{{end}}
<a target="_blank" rel="noopener noreferrer" href="https://gitea.io">{{.i18n.Tr "website"}}</a>
{{template "custom/extra_links_footer" .}}
{{if (or .ShowFooterVersion .PageIsAdmin)}}<span class="version">{{GoVer}}</span>{{end}}
<div class="sixteen wide mobile eight wide tablet eight wide computer column" style=" margin:2.0rem 0">
{{.i18n.Tr "custom.foot.copyright"}} <a href="http://www.miitbeian.gov.cn/" target="_blank">京ICP备18004880号</a>
<br>
{{.i18n.Tr "powered_by" "鹏城实验室云脑、Trustie、华为云 DevCloud、gitea"}}
<br>
</div>
</div>
</div>
</footer>

+ 3
- 3
templates/base/head.tmpl View File

@@ -1,10 +1,10 @@
<!DOCTYPE html>
<html lang="{{.Language}}" class="theme-{{.SignedUser.Theme}}">
<html lang="{{.Language}}">
<head data-suburl="{{AppSubUrl}}">
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta http-equiv="x-ua-compatible" content="ie=edge">
<title>{{if .Title}}{{.Title | RenderEmojiPlain}} - {{end}} {{if .Repository.Name}}{{.Repository.Name}} - {{end}}{{AppName}} </title>
<title>{{if .Title}}{{.Title}} - {{end}} {{if .Repository.Name}}{{.Repository.Name}} - {{end}}{{AppName}}</title>
<link rel="manifest" href="{{AppSubUrl}}/manifest.json" crossorigin="use-credentials">
{{if UseServiceWorker}}
<script>
@@ -185,7 +185,7 @@
{{template "custom/body_inner_pre" .}}

{{if not .PageIsInstall}}
<div class="ui top secondary stackable main menu following bar light">
<div class="ui top secondary stackable main menu following bar dark">
{{template "base/head_navbar" .}}
</div><!-- end bar -->
{{end}}


+ 52
- 16
templates/base/head_navbar.tmpl View File

@@ -1,7 +1,7 @@
<div class="ui container" id="navbar">
<div class="item brand" style="justify-content: space-between;">
<a href="{{AppSubUrl}}/">
<img class="ui mini image" src="{{StaticUrlPrefix}}/img/gitea-sm.png">
<a href="/">
<img class="ui mini image" src="{{StaticUrlPrefix}}/img/openi-logo-w.svg?v=2020041802">
</a>
<div class="ui basic icon button mobile-only" id="navbar-expand-toggle">
<i class="sidebar icon"></i>
@@ -9,8 +9,20 @@
</div>

{{if .IsSigned}}
<a class="item {{if .PageIsDashboard}}active{{end}}" href="{{AppSubUrl}}/">{{.i18n.Tr "dashboard"}}</a>
<a class="item {{if .PageIsDataSets}}active{{end}}" href="{{AppSubUrl}}/datasets">{{.i18n.Tr "datasets"}}</a>
<a class="item {{if .PageIsDashboard}}active{{end}}" href="/">{{.i18n.Tr "dashboard"}}</a>
<div class="ui dropdown item">
{{.i18n.Tr "custom.head.community"}}
<i class="dropdown icon"></i>
<div class="menu">
<a class="item" href="https://www.openi.org.cn/html/Club/2019/0228/17.html">{{.i18n.Tr "custom.head.welcome"}}</a>
<a class="item" href="https://www.openi.org.cn/html/Club/2019/0227/14.html">{{.i18n.Tr "custom.head.about_org"}}</a>
<a class="item" href="https://www.openi.org.cn/html/Club/2019/0227/15.html">{{.i18n.Tr "custom.head.license"}}</a>
<a class="item" href="https://www.openi.org.cn/html/Club/2019/0227/16.html">{{.i18n.Tr "custom.head.community_charter"}}</a>
<a class="item" href="https://www.openi.org.cn/html/news/dongtai/">{{.i18n.Tr "custom.head.community_infos"}}</a>
</div>
</div>
<a class="item" href="{{AppSubUrl}}/explore/datasets">{{.i18n.Tr "datasets"}}</a>
<a class="item" href="{{AppSubUrl}}/explore/repos">{{.i18n.Tr "custom.head.project"}}</a>
{{if not .UnitIssuesGlobalDisabled}}
<a class="item {{if .PageIsIssues}}active{{end}}" href="{{AppSubUrl}}/issues">{{.i18n.Tr "issues"}}</a>
{{end}}
@@ -20,17 +32,44 @@
{{if not (and .UnitIssuesGlobalDisabled .UnitPullsGlobalDisabled)}}
{{if .ShowMilestonesDashboardPage}}<a class="item {{if .PageIsMilestonesDashboard}}active{{end}}" href="{{AppSubUrl}}/milestones">{{.i18n.Tr "milestones"}}</a>{{end}}
{{end}}
<a class="item {{if .PageIsExplore}}active{{end}}" href="{{AppSubUrl}}/explore/repos">{{.i18n.Tr "explore"}}</a>
<div class="ui dropdown item">
{{.i18n.Tr "explore"}}
<i class="dropdown icon"></i>
<div class="menu">
<a class="item" href="{{AppSubUrl}}/explore/repos">{{.i18n.Tr "custom.head.project"}}</a>
<a class="item" href="{{AppSubUrl}}/explore/datasets">{{.i18n.Tr "custom.head.dataset"}}</a>
<a class="item" href="javascript:alert('WIP')">{{.i18n.Tr "custom.head.study"}}</a>
<a class="item" href="javascript:alert('WIP')">{{.i18n.Tr "custom.head.activity"}}</a>
</div>
</div>
{{else if .IsLandingPageHome}}
<a class="item {{if .PageIsHome}}active{{end}}" href="{{AppSubUrl}}/">{{.i18n.Tr "home"}}</a>
<a class="item {{if .PageIsDataSets}}active{{end}}" href="{{AppSubUrl}}/datasets">{{.i18n.Tr "datasets"}}</a>
<a class="item {{if .PageIsExplore}}active{{end}}" href="{{AppSubUrl}}/explore/repos">{{.i18n.Tr "explore"}}</a>
<a class="item {{if .PageIsHome}}active{{end}}" href="/">{{.i18n.Tr "home"}}</a>
<div class="ui dropdown item">
{{.i18n.Tr "custom.head.community"}}
<i class="dropdown icon"></i>
<div class="menu">
<a class="item" href="https://www.openi.org.cn/html/Club/2019/0228/17.html">{{.i18n.Tr "custom.head.welcome"}}</a>
<a class="item" href="https://www.openi.org.cn/html/Club/2019/0227/14.html">{{.i18n.Tr "custom.head.about_org"}}</a>
<a class="item" href="https://www.openi.org.cn/html/Club/2019/0227/15.html">{{.i18n.Tr "custom.head.license"}}</a>
<a class="item" href="https://www.openi.org.cn/html/Club/2019/0227/16.html">{{.i18n.Tr "custom.head.community_charter"}}</a>
<a class="item" href="https://www.openi.org.cn/html/news/dongtai/">{{.i18n.Tr "custom.head.community_infos"}}</a>
</div>
</div>
<a class="item" href="{{AppSubUrl}}/explore/repos">{{.i18n.Tr "custom.head.project"}}</a>
<div class="ui dropdown item">
{{.i18n.Tr "explore"}}
<i class="dropdown icon"></i>
<div class="menu">
<a class="item {{if .PageIsExplore}}active{{end}}" href="{{AppSubUrl}}/explore/repos">{{.i18n.Tr "custom.head.project"}}</a>
<a class="item" href="{{AppSubUrl}}/explore/datasets">{{.i18n.Tr "datasets"}}</a>
<a class="item" href="javascript:alert('WIP')" target="_blank">{{.i18n.Tr "custom.head.project"}}</a>
<a class="item" href="javascript:alert('WIP')" target="_blank">{{.i18n.Tr "custom.head.activity"}}</a>
</div>
</div>
{{else if .IsLandingPageExplore}}
<a class="item {{if .PageIsExplore}}active{{end}}" href="{{AppSubUrl}}/explore/repos">{{.i18n.Tr "home"}}</a>
<a class="item {{if .PageIsDataSets}}active{{end}}" href="{{AppSubUrl}}/datasets">{{.i18n.Tr "datasets"}}</a>
{{else if .IsLandingPageOrganizations}}
<a class="item {{if .PageIsExplore}}active{{end}}" href="{{AppSubUrl}}/explore/organizations">{{.i18n.Tr "home"}}</a>
<a class="item {{if .PageIsDataSets}}active{{end}}" href="{{AppSubUrl}}/datasets">{{.i18n.Tr "datasets"}}</a>
{{end}}

{{template "custom/extra_links" .}}
@@ -68,9 +107,6 @@
<a class="item" href="{{AppSubUrl}}/repo/create">
<span class="fitted">{{svg "octicon-plus" 16}}</span> {{.i18n.Tr "new_repo"}}
</a>
<a class="item" href="{{AppSubUrl}}/datasets/create">
<span class="fitted">{{svg "octicon-plus" 16}}</span> {{.i18n.Tr "new_dataset"}}
</a>
<a class="item" href="{{AppSubUrl}}/repo/migrate">
<span class="fitted">{{svg "octicon-repo-clone" 16}}</span> {{.i18n.Tr "new_migrate"}}
</a>
@@ -107,10 +143,10 @@
{{svg "octicon-settings" 16}}
{{.i18n.Tr "your_settings"}}<!-- Your settings -->
</a>
<a class="item" target="_blank" rel="noopener noreferrer" href="https://docs.gitea.io">
<!--a class="item" target="_blank" rel="noopener noreferrer" href="https://docs.gitea.io">
{{svg "octicon-question" 16}}
{{.i18n.Tr "help"}}<!-- Help -->
</a>
</a-->
{{if .IsAdmin}}
<div class="divider"></div>

@@ -131,7 +167,7 @@

{{else}}

<a class="item" target="_blank" rel="noopener noreferrer" href="https://docs.gitea.io">{{.i18n.Tr "help"}}</a>
<!--a class="item" target="_blank" rel="noopener noreferrer" href="https://docs.gitea.io">{{.i18n.Tr "help"}}</a-->
<div class="right stackable menu">
{{if .ShowRegistrationButton}}
<a class="item{{if .PageIsSignUp}} active{{end}}" href="{{AppSubUrl}}/user/sign_up">


+ 3
- 0
templates/custom/header.tmpl View File

@@ -0,0 +1,3 @@
<!--新增OpenI样式文件-->
<link rel="stylesheet" href="/css/openi.css?v={{MD5 AppVer}}">
<script type="text/javascript" src="/js/jquery.particleground.min.js"></script>

+ 0
- 28
templates/datasets/create.tmpl View File

@@ -1,28 +0,0 @@
{{template "base/head" .}}
<div class="dataset new">
<div class="ui middle very relaxed page grid">
<div class="column">
<form class="ui form" action="{{.Link}}" method="post">
{{.CsrfTokenHtml}}
<h3 class="ui top attached header">
{{if .PageIsEditDataset}}
{{.i18n.Tr "dataset.edit_dataset"}}
{{else}}
{{.i18n.Tr "new_dataset"}}
{{end}}
</h3>
<div class="ui attached segment">
{{template "datasets/form" .}}
<div class="inline field">
<label></label>
<button class="ui green button">
{{.i18n.Tr "dataset.create_dataset"}}
</button>
<a class="ui button" href="{{AppSubUrl}}/">{{.i18n.Tr "cancel"}}</a>
</div>
</div>
</form>
</div>
</div>
</div>
{{template "base/footer" .}}

+ 0
- 24
templates/datasets/dataset_list.tmpl View File

@@ -1,24 +0,0 @@
<div class="ui dataset list">
{{range .datasets}}
<div class="item">
<div class="ui header">
<a class="name" href="/datasets/{{.ID}}">
{{.Title}}
</a>
<div class="ui right metas">
<span class="text grey">{{svg "octicon-tasklist" 16}}{{$.i18n.Tr (printf "dataset.task.%s" .Task)}}</span>
<span class="text grey">{{svg "octicon-tag" 16}}{{$.i18n.Tr (printf "dataset.category.%s" .Category)}}</span>
<span class="text grey">{{svg "octicon-flame" 16}} 24</span>
</div>
</div>
<div class="description">
<a><div class="ui small label topic">{{.Description}}</div></a>
<p class="time">{{$.i18n.Tr "org.repo_updated"}} {{TimeSinceUnix .UpdatedUnix $.i18n.Lang}}</p>
</div>
</div>
{{else}}
<div>
{{$.i18n.Tr "explore.dataset_no_results"}}
</div>
{{end}}
</div>

+ 0
- 23
templates/datasets/dataset_search.tmpl View File

@@ -1,23 +0,0 @@
<div class="ui right floated secondary filter menu">
<!-- Sort -->
<div class="ui right dropdown type jump item">
<span class="text">
{{.i18n.Tr "repo.issues.filter_sort"}}<i class="dropdown icon"></i>
</span>
<div class="menu">
<a class="item" href="{{$.Link}}?sort=newest&q={{$.Keyword}}&tab={{$.TabName}}">{{.i18n.Tr "repo.issues.filter_sort.latest"}}</a>
<a class="item" href="{{$.Link}}?sort=oldest&q={{$.Keyword}}&tab={{$.TabName}}">{{.i18n.Tr "repo.issues.filter_sort.oldest"}}</a>
<a class="item" href="{{$.Link}}?sort=oldest&q={{$.Keyword}}&tab={{$.TabName}}">{{.i18n.Tr "repo.issues.filter_sort.recentupdate"}}</a>
<a class="item" href="{{$.Link}}?sort=oldest&q={{$.Keyword}}&tab={{$.TabName}}">{{.i18n.Tr "repo.issues.filter_sort.leastupdate"}}</a>
</div>
</div>
</div>
<form class="ui form ignore-dirty" style="max-width: 90%">
<input type="hidden" name="tab" value="{{$.TabName}}">
<input type="hidden" name="sort" value="{{$.SortType}}">
<div class="ui fluid action input">
<input name="q" value="{{.Keyword}}" placeholder="{{.i18n.Tr "explore.search"}}..." autofocus>
<button class="ui blue button">{{.i18n.Tr "explore.search"}}</button>
</div>
</form>
<div class="ui divider"></div>

+ 0
- 24
templates/datasets/edit.tmpl View File

@@ -1,24 +0,0 @@
{{template "base/head" .}}
<div class="dataset new">
<div class="ui middle very relaxed page grid">
<div class="column">
<form class="ui form" action="{{.Link}}" method="post">
{{.CsrfTokenHtml}}
<h3 class="ui top attached header">
{{.i18n.Tr "edit_dataset"}}
</h3>
<div class="ui attached segment">
{{template "datasets/form" .}}
<div class="inline field">
<label></label>
<button class="ui green button">
{{.i18n.Tr "dataset.update_dataset"}}
</button>
<a class="ui button" href="{{AppSubUrl}}/">{{.i18n.Tr "cancel"}}</a>
</div>
</div>
</form>
</div>
</div>
</div>
{{template "base/footer" .}}

+ 0
- 82
templates/datasets/form.tmpl View File

@@ -1,82 +0,0 @@
{{template "base/alert" .}}
<div class="inline required field">
<label>{{.i18n.Tr "dataset.title"}}</label>
<input name="title" placeholder='{{.i18n.Tr "dataset.title"}}' value="{{.title}}" autofocus required maxlength="255">
</div>

<div class="inline field">
<label>{{.i18n.Tr "dataset.visibility"}}</label>
<div class="ui checkbox">
{{if .IsForcedPrivate}}
<input name="private" type="checkbox" checked readonly>
<label>{{.i18n.Tr "dataset.visibility_helper_forced" | Safe}}</label>
{{else}}
<input name="private" type="checkbox" {{if .private}}checked{{end}}>
<label>{{.i18n.Tr "dataset.visibility_helper" | Safe}}</label>
{{end}}
</div>
<span class="help" style="display: none;">{{.i18n.Tr "dataset.visibility_description"}}</span>
</div>

<div class="inline required field">
<label>{{.i18n.Tr "dataset.description"}}</label>
<textarea name="description">{{.description}}</textarea>
</div>

<div class="inline required field">
<label>{{.i18n.Tr "dataset.category"}}</label>
<div class="ui selection dropdown">
<input type="hidden" name="category" id="category" value="{{.category}}" required>
<i class="dropdown icon"></i>
<div class="default text" style="min-width:20vw">{{.i18n.Tr "dataset.category"}}</div>
<div class="menu">
{{range $category := categories}}
<div class="item" data-value="{{$category}}">
{{$.i18n.Tr (printf "dataset.category.%s" $category)}}
</div>
{{end}}
</div>
</div>
</div>

<div class="inline required field">
<label>{{.i18n.Tr "dataset.task"}}</label>
<div class="ui selection dropdown">
<input type="hidden" name="task" id="task" value="{{.task}}" required>
<div class="default text" style="min-width:20vw">{{.i18n.Tr "dataset.task"}}</div>
<i class="dropdown icon"></i>
<div class="menu">
{{range $task := tasks}}
<div class="item" data-value="{{$task}}">
{{$.i18n.Tr (printf "dataset.task.%s" $task)}}
</div>
{{end}}
</div>
</div>
</div>

<div class="inline required field">
<label>{{.i18n.Tr "dataset.license"}}</label>
<div class="ui selection owner dropdown">
<input type="hidden" name="license" id="license" value="{{.license}}" required>
<div class="default text" style="min-width:20vw">{{.i18n.Tr "dataset.license"}}</div>
<i class="dropdown icon"></i>
<div class="menu">
{{range $license := licenses}}
<div class="item" data-value="{{$license}}">
{{$license}}
</div>
{{end}}
</div>
</div>
</div>

<br/>

<div class="field required dataset-files">
<label>{{.i18n.Tr "dataset.file"}}</label>
<div class="files"></div>
<div class="ui dropzone" id="dataset" data-upload-url="{{AppSubUrl}}/attachments" data-accepts="{{.AttachmentAllowedTypes}}" data-max-file="1000" data-max-size="{{.AttachmentMaxSize}}" data-default-message="{{.i18n.Tr "dropzone.default_message"}}" data-invalid-input-type="{{.i18n.Tr "dropzone.invalid_input_type"}}" data-file-too-big="{{.i18n.Tr "dropzone.file_too_big"}}" data-remove-file="{{.i18n.Tr "dropzone.remove_file"}}">
</div>
</div>
<br/>

+ 0
- 11
templates/datasets/index.tmpl View File

@@ -1,11 +0,0 @@
{{template "base/head" .}}
<div class="explore repositories">
<div class="ui container">
{{template "datasets/dataset_search" .}}
<div class="ui list">
{{template "datasets/dataset_list" .}}
{{template "base/paginate" .}}
</div>
</div>
</div>
{{template "base/footer" .}}

+ 0
- 70
templates/datasets/show.tmpl View File

@@ -1,70 +0,0 @@
{{template "base/head" .}}
<div class="dataset">
<div class="ui container">
<h2 class="ui header">
{{$.i18n.Tr "dataset.dataset"}}
<div class="ui right">
<a class="ui small white button" href="/datasets">
{{$.i18n.Tr "dataset.back"}}
</a>
<a class="ui small green button" href="/datasets/create">
{{$.i18n.Tr "dataset.create_dataset"}}
</a>
</div>
</h2>
<ul id="dataset-list">
<li class="ui grid">
<div class="ui four wide column meta">
{{if .dataset.IsPrivate }}
<span class="ui green label">{{$.i18n.Tr "dataset.private"}}</span>
{{else}}
<span class="ui yellow label">{{$.i18n.Tr "dataset.public"}}</span>
{{end}}
<span class="tag text blue">
<a href=""><i class="tag icon"></i> {{$.i18n.Tr (printf "dataset.task.%s" .dataset.Task)}}</a>
</span>
<span class="tag text blue">
<a href=""><i class="tag icon"></i> {{.dataset.License}}</a>
</span>
<span class="tag text blue">
<a href=""><i class="tag icon"></i> {{$.i18n.Tr (printf "dataset.category.%s" .dataset.Category)}}</a>
</span>
</div>
<div class="ui twelve wide column detail">
<h3><a href="">{{.dataset.Title}}</a>
{{if .isOwner}}
<small>(<a href="/datasets/edit/{{.dataset.ID}}" rel="nofollow">{{$.i18n.Tr "dataset.edit"}}</a>)</small>
{{end}}
</h3>
<div class="markdown desc">
<p>{{.dataset.Description}}</p>
</div>
<div class="download">
<div class="ui accordion">
<h2 class="title active">
<i class="dropdown icon"></i>
{{$.i18n.Tr "dataset.download"}}
</h2>
<div class="content active">
<ul class="list">
{{if .dataset.Attachments}}
{{range .dataset.Attachments}}
<li>
<span class="ui text right" data-tooltip="{{$.i18n.Tr "repo.release.download_count" (.DownloadCount | PrettyNumber)}}" data-position="bottom right">{{svg "octicon-info" 16}}</span>
<a target="_blank" rel="noopener noreferrer" href="{{.DownloadURL}}">
<strong><span class="ui image" title='{{.Name}}'>{{svg "octicon-package" 16}}</span> {{.Name}}</strong>
<span class="ui text grey right">{{.Size | FileSize}}</span>
</a>
</li>
{{end}}
{{end}}
</ul>
</div>
</div>
</div>
</div>
</li>
</ul>
</div>
</div>
{{template "base/footer" .}}

+ 49
- 0
templates/explore/dataset_list.tmpl View File

@@ -0,0 +1,49 @@
<h2 class="ui left floated medium header">
{{.i18n.Tr "datasets"}}
</h2>
<div class="ui right floated secondary filter menu">
<!-- Sort -->
<div class="ui right dropdown type jump item">
<span class="text">
{{.i18n.Tr "repo.issues.filter_sort"}}
<i class="dropdown icon"></i>
</span>
<div class="menu">
<a class="{{if eq .SortType "newest"}}active{{end}} item" href="{{$.Link}}?sort=newest&q={{$.Keyword}}&tab={{$.TabName}}">{{.i18n.Tr "repo.issues.filter_sort.latest"}}</a>
<a class="{{if eq .SortType "oldest"}}active{{end}} item" href="{{$.Link}}?sort=oldest&q={{$.Keyword}}&tab={{$.TabName}}">{{.i18n.Tr "repo.issues.filter_sort.oldest"}}</a>
<a class="{{if eq .SortType "recentupdate"}}active{{end}} item" href="{{$.Link}}?sort=recentupdate&q={{$.Keyword}}&tab={{$.TabName}}">{{.i18n.Tr "repo.issues.filter_sort.recentupdate"}}</a>
<a class="{{if eq .SortType "leastupdate"}}active{{end}} item" href="{{$.Link}}?sort=leastupdate&q={{$.Keyword}}&tab={{$.TabName}}">{{.i18n.Tr "repo.issues.filter_sort.leastupdate"}}</a>
</div>
</div>
</div>

<div class="ui clearing divider"></div>

<div class="ui dataset list">
<div class="ui sixteen wide mobile ten wide tablet ten wide computer colum">
{{range .Datasets}}
<div class="item">
<div class="ui header">
<a class="name" href="{{.Repo.Link}}/datasets">
{{.Title}}
</a>
<div class="ui right metas">
<span class="text grey">{{svg "octicon-tasklist" 16}} {{$.i18n.Tr (printf "dataset.task.%s" .Task)}}</span>
<span class="text grey">{{svg "octicon-tag" 16}}{{$.i18n.Tr (printf "dataset.category.%s" .Category)}}</span>
{{if ne .DownloadTimes 0}}
<span class="text grey">{{svg "octicon-flame" 16}} {{.DownloadTimes}}</span>
{{end}}
</div>
</div>
<div class="description">
<a><div class="ui small label topic">{{.Description}}</div></a>
<p class="time">{{$.i18n.Tr "org.repo_updated"}} {{TimeSinceUnix .UpdatedUnix $.i18n.Lang}}</p>
</div>
</div>
{{else}}
<div>
{{$.i18n.Tr "explore.dataset_no_results"}}
</div>
{{end}}
</div>
</div>

+ 14
- 0
templates/explore/dataset_search.tmpl View File

@@ -0,0 +1,14 @@
<div class="repos--seach">
<div class="ui container">
<div class="ui two column centered grid">
<form class="mobile ten wide tablet computer column ui form ignore-dirty">
<div class="ui fluid action input">
<input name="q" value="{{.Keyword}}" placeholder="{{.i18n.Tr "explore.search"}}..." autofocus>
<input type="hidden" name="tab" value="{{$.TabName}}">
<input type="hidden" name="sort" value="{{$.SortType}}">
<button class="ui blue button">{{.i18n.Tr "explore.search"}}</button>
</div>
</form>
</div>
</div>
</div>

+ 17
- 0
templates/explore/datasets.tmpl View File

@@ -0,0 +1,17 @@
{{template "base/head" .}}
<div class="explore repositories">
{{template "explore/dataset_search" .}}
<div class="ui container">
<div class="ui grid">
{{template "explore/navbar" .}}
<div class="ui sixteen wide mobile ten wide tablet ten wide computer column">
{{template "explore/dataset_list" .}}
{{template "base/paginate" .}}
</div>
<div class="ui sixteen wide mobile six wide tablet three wide computer column">
{{template "explore/repo_right" .}}
</div>
</div>
</div>
</div>
{{template "base/footer" .}}

+ 46
- 15
templates/explore/navbar.tmpl View File

@@ -1,16 +1,47 @@
<div class="ui secondary pointing tabular top attached borderless stackable menu navbar">
<a class="{{if .PageIsExploreRepositories}}active{{end}} item" href="{{AppSubUrl}}/explore/repos">
{{svg "octicon-repo" 16}} {{.i18n.Tr "explore.repos"}}
</a>
<a class="{{if .PageIsExploreUsers}}active{{end}} item" href="{{AppSubUrl}}/explore/users">
{{svg "octicon-person" 16}} {{.i18n.Tr "explore.users"}}
</a>
<a class="{{if .PageIsExploreOrganizations}}active{{end}} item" href="{{AppSubUrl}}/explore/organizations">
{{svg "octicon-organization" 16}} {{.i18n.Tr "explore.organizations"}}
</a>
{{if .IsRepoIndexerEnabled}}
<a class="{{if .PageIsExploreCode}}active{{end}} item" href="{{AppSubUrl}}/explore/code">
{{svg "octicon-code" 16}} {{.i18n.Tr "explore.code"}}
</a>
{{end}}
<div class="tablet only mobile only sixteen wide mobile sixteen wide tablet column row">
<div class="ui secondary pointing tabular top attached borderless menu navbar">
<a class="{{if .PageIsExploreRepositories}}active{{end}} item" href="{{AppSubUrl}}/explore/repos">
{{svg "octicon-repo" 16}} {{.i18n.Tr "explore.repos"}}
</a>
<a class="{{if .PageIsDatasets}}active{{end}} item" href="{{AppSubUrl}}/explore/datasets">
{{svg "octicon-file-submodule" 16}} {{.i18n.Tr "datasets"}}
</a>
<a class="{{if .PageIsExploreUsers}}active{{end}} item" href="{{AppSubUrl}}/explore/users">
{{svg "octicon-person" 16}} {{.i18n.Tr "explore.users"}}
</a>
<a class="{{if .PageIsExploreOrganizations}}active{{end}} item" href="{{AppSubUrl}}/explore/organizations">
{{svg "octicon-organization" 16}} {{.i18n.Tr "explore.organizations"}}
</a>
{{if .IsRepoIndexerEnabled}}
<a class="{{if .PageIsExploreCode}}active{{end}} item" href="{{AppSubUrl}}/explore/code">
{{svg "octicon-code" 16}} {{.i18n.Tr "explore.code"}}
</a>
{{end}}
</div>
</div>
<!--平板、移动端-->

<div class="computer only three wide computer column">
<div class="ui grid">
<div class="sixteen wide column ui secondary sticky pointing tabular vertical menu">
<a class="{{if .PageIsExploreRepositories}}active{{end}} item" href="{{AppSubUrl}}/explore/repos">
{{svg "octicon-repo" 16}} {{.i18n.Tr "explore.repos"}}
</a>
<a class="{{if .PageIsDatasets}}active{{end}} item" href="{{AppSubUrl}}/explore/datasets">
{{svg "octicon-file-submodule" 16}} {{.i18n.Tr "datasets"}}
</a>
<a class="{{if .PageIsExploreUsers}}active{{end}} item" href="{{AppSubUrl}}/explore/users">
{{svg "octicon-person" 16}} {{.i18n.Tr "explore.users"}}
</a>
<a class="{{if .PageIsExploreOrganizations}}active{{end}} item" href="{{AppSubUrl}}/explore/organizations">
{{svg "octicon-organization" 16}} {{.i18n.Tr "explore.organizations"}}
</a>
{{if .IsRepoIndexerEnabled}}
<a class="{{if .PageIsExploreCode}}active{{end}} item" href="{{AppSubUrl}}/explore/code">
{{svg "octicon-code" 16}} {{.i18n.Tr "explore.code"}}
</a>
{{end}}
</div>
</div>
</div>
<!--电脑、宽屏-->

+ 59
- 29
templates/explore/organizations.tmpl View File

@@ -1,38 +1,68 @@
{{template "base/head" .}}
<div class="explore users">
{{template "explore/navbar" .}}
<div class="ui container">
{{template "explore/search" .}}
{{template "explore/search" .}}

<div class="ui user list">
{{range .Users}}
<div class="item">
<img class="ui avatar image" src="{{.RelAvatarLink}}">
<div class="content">
<span class="header">
<a href="{{.HomeLink}}">{{.Name}}</a> {{.FullName}}
{{if .Visibility.IsPrivate}}
<span class="text gold">{{svg "octicon-lock" 16}}</span>
{{end}}
</span>
<div class="description">
{{if .Location}}
{{svg "octicon-location" 16}} {{.Location}}
{{end}}
{{if and .Website}}
{{svg "octicon-link" 16}}
<a href="{{.Website}}" rel="nofollow">{{.Website}}</a>
{{end}}
{{svg "octicon-clock" 16}} {{$.i18n.Tr "user.join_on"}} {{.CreatedUnix.FormatShort}}
<div class="ui container">
<div class="ui grid">
{{template "explore/navbar" .}}
<div class="sixteen wide mobile ten wide tablet ten wide computer column">
<h2 class="ui left floated medium header">
{{.i18n.Tr "explore.organizations"}}
</h2>
<div class="ui right floated secondary filter menu">
<!-- Sort -->
<div class="ui right dropdown type jump item">
<span class="text">
{{.i18n.Tr "repo.issues.filter_sort"}}
<i class="dropdown icon"></i>
</span>
<div class="menu">
<a class="{{if eq .SortType "newest"}}active{{end}} item" href="{{$.Link}}?sort=newest&q={{$.Keyword}}&tab={{$.TabName}}">{{.i18n.Tr "repo.issues.filter_sort.latest"}}</a>
<a class="{{if eq .SortType "oldest"}}active{{end}} item" href="{{$.Link}}?sort=oldest&q={{$.Keyword}}&tab={{$.TabName}}">{{.i18n.Tr "repo.issues.filter_sort.oldest"}}</a>
<a class="{{if eq .SortType "alphabetically"}}active{{end}} item" href="{{$.Link}}?sort=alphabetically&q={{$.Keyword}}&tab={{$.TabName}}">{{.i18n.Tr "repo.issues.label.filter_sort.alphabetically"}}</a>
<a class="{{if eq .SortType "reversealphabetically"}}active{{end}} item" href="{{$.Link}}?sort=reversealphabetically&q={{$.Keyword}}&tab={{$.TabName}}">{{.i18n.Tr "repo.issues.label.filter_sort.reverse_alphabetically"}}</a>
<a class="{{if eq .SortType "recentupdate"}}active{{end}} item" href="{{$.Link}}?sort=recentupdate&q={{$.Keyword}}&tab={{$.TabName}}">{{.i18n.Tr "repo.issues.filter_sort.recentupdate"}}</a>
<a class="{{if eq .SortType "leastupdate"}}active{{end}} item" href="{{$.Link}}?sort=leastupdate&q={{$.Keyword}}&tab={{$.TabName}}">{{.i18n.Tr "repo.issues.filter_sort.leastupdate"}}</a>
</div>
</div>
</div>
</div>
{{else}}
<div>{{$.i18n.Tr "explore.org_no_results"}}</div>
{{end}}
</div>

{{template "base/paginate" .}}
<div class="ui clearing divider"></div>

<div class="ui user list">
{{range .Users}}
<div class="item">
<img class="ui avatar image" src="{{.RelAvatarLink}}">
<div class="content">
<span class="header">
<a href="{{.HomeLink}}">{{.Name}}</a> {{.FullName}}
{{if .Visibility.IsPrivate}}
<span class="text gold">{{svg "octicon-lock" 16}}</span>
{{end}}
</span>
<div class="description">
{{if .Location}}
{{svg "octicon-location" 16}} {{.Location}}
{{end}}
{{if and .Website}}
{{svg "octicon-link" 16}}
<a href="{{.Website}}" rel="nofollow">{{.Website}}</a>
{{end}}
{{svg "octicon-clock" 16}} {{$.i18n.Tr "user.join_on"}} {{.CreatedUnix.FormatShort}}
</div>
</div>
</div>
{{else}}
<div>{{$.i18n.Tr "explore.org_no_results"}}</div>
{{end}}
</div>

{{template "base/paginate" .}}
</div>
<div class="sixteen wide mobile six wide tablet three wide computer column">
{{template "explore/repo_right" .}}
</div>
</div>
</div>
</div>
{{template "base/footer" .}}

+ 32
- 1
templates/explore/repo_list.tmpl View File

@@ -1,3 +1,30 @@
<h2 class="ui left floated medium header">
{{.i18n.Tr "explore.repos"}}
</h2>
<div class="ui right floated secondary filter menu">
<!-- Sort -->
<div class="ui right dropdown type jump item">
<span class="text">
{{.i18n.Tr "repo.issues.filter_sort"}}
<i class="dropdown icon"></i>
</span>
<div class="menu">
<a class="{{if eq .SortType "newest"}}active{{end}} item" href="{{$.Link}}?sort=newest&q={{$.Keyword}}&tab={{$.TabName}}">{{.i18n.Tr "repo.issues.filter_sort.latest"}}</a>
<a class="{{if eq .SortType "oldest"}}active{{end}} item" href="{{$.Link}}?sort=oldest&q={{$.Keyword}}&tab={{$.TabName}}">{{.i18n.Tr "repo.issues.filter_sort.oldest"}}</a>
<a class="{{if eq .SortType "alphabetically"}}active{{end}} item" href="{{$.Link}}?sort=alphabetically&q={{$.Keyword}}&tab={{$.TabName}}">{{.i18n.Tr "repo.issues.label.filter_sort.alphabetically"}}</a>
<a class="{{if eq .SortType "reversealphabetically"}}active{{end}} item" href="{{$.Link}}?sort=reversealphabetically&q={{$.Keyword}}&tab={{$.TabName}}">{{.i18n.Tr "repo.issues.label.filter_sort.reverse_alphabetically"}}</a>
<a class="{{if eq .SortType "recentupdate"}}active{{end}} item" href="{{$.Link}}?sort=recentupdate&q={{$.Keyword}}&tab={{$.TabName}}">{{.i18n.Tr "repo.issues.filter_sort.recentupdate"}}</a>
<a class="{{if eq .SortType "leastupdate"}}active{{end}} item" href="{{$.Link}}?sort=leastupdate&q={{$.Keyword}}&tab={{$.TabName}}">{{.i18n.Tr "repo.issues.filter_sort.leastupdate"}}</a>
<a class="{{if eq .SortType "moststars"}}active{{end}} item" href="{{$.Link}}?sort=moststars&q={{$.Keyword}}&tab={{$.TabName}}">{{.i18n.Tr "repo.issues.filter_sort.moststars"}}</a>
<a class="{{if eq .SortType "feweststars"}}active{{end}} item" href="{{$.Link}}?sort=feweststars&q={{$.Keyword}}&tab={{$.TabName}}">{{.i18n.Tr "repo.issues.filter_sort.feweststars"}}</a>
<a class="{{if eq .SortType "mostforks"}}active{{end}} item" href="{{$.Link}}?sort=mostforks&q={{$.Keyword}}&tab={{$.TabName}}">{{.i18n.Tr "repo.issues.filter_sort.mostforks"}}</a>
<a class="{{if eq .SortType "fewestforks"}}active{{end}} item" href="{{$.Link}}?sort=fewestforks&q={{$.Keyword}}&tab={{$.TabName}}">{{.i18n.Tr "repo.issues.filter_sort.fewestforks"}}</a>
</div>
</div>
</div>

<div class="ui clearing divider"></div>

<div class="ui repository list">
{{range .Repos}}
<div class="item">
@@ -15,6 +42,10 @@
<span class="middle">{{svg "octicon-repo-forked" 16}}</span>
{{else if .IsMirror}}
<span class="middle">{{svg "octicon-repo-clone" 16}}</span>
{{else if .Owner}}
{{if .Owner.Visibility.IsPrivate}}
<span class="text gold">{{svg "octicon-lock" 16}}</span>
{{end}}
{{end}}
<div class="ui right metas">
{{if .PrimaryLanguage }}
@@ -25,7 +56,7 @@
</div>
</div>
<div class="description">
{{if .DescriptionHTML}}<p>{{.DescriptionHTML}}</p>{{end}}
{{if .DescriptionHTML}}<p class="has-emoji">{{.DescriptionHTML}}</p>{{end}}
{{if .Topics }}
<div class="ui tags">
{{range .Topics}}


+ 1
- 0
templates/explore/repo_right.tmpl View File

@@ -0,0 +1 @@
<img class="ui mini image" src="/img/banner-qimen-4X3.jpg" style="width:100%;">

+ 14
- 30
templates/explore/repo_search.tmpl View File

@@ -1,30 +1,14 @@
<div class="ui right floated secondary filter menu">
<!-- Sort -->
<div class="ui right dropdown type jump item">
<span class="text">
{{.i18n.Tr "repo.issues.filter_sort"}}
<i class="dropdown icon"></i>
</span>
<div class="menu">
<a class="{{if eq .SortType "newest"}}active{{end}} item" href="{{$.Link}}?sort=newest&q={{$.Keyword}}&tab={{$.TabName}}">{{.i18n.Tr "repo.issues.filter_sort.latest"}}</a>
<a class="{{if eq .SortType "oldest"}}active{{end}} item" href="{{$.Link}}?sort=oldest&q={{$.Keyword}}&tab={{$.TabName}}">{{.i18n.Tr "repo.issues.filter_sort.oldest"}}</a>
<a class="{{if eq .SortType "alphabetically"}}active{{end}} item" href="{{$.Link}}?sort=alphabetically&q={{$.Keyword}}&tab={{$.TabName}}">{{.i18n.Tr "repo.issues.label.filter_sort.alphabetically"}}</a>
<a class="{{if eq .SortType "reversealphabetically"}}active{{end}} item" href="{{$.Link}}?sort=reversealphabetically&q={{$.Keyword}}&tab={{$.TabName}}">{{.i18n.Tr "repo.issues.label.filter_sort.reverse_alphabetically"}}</a>
<a class="{{if eq .SortType "recentupdate"}}active{{end}} item" href="{{$.Link}}?sort=recentupdate&q={{$.Keyword}}&tab={{$.TabName}}">{{.i18n.Tr "repo.issues.filter_sort.recentupdate"}}</a>
<a class="{{if eq .SortType "leastupdate"}}active{{end}} item" href="{{$.Link}}?sort=leastupdate&q={{$.Keyword}}&tab={{$.TabName}}">{{.i18n.Tr "repo.issues.filter_sort.leastupdate"}}</a>
<a class="{{if eq .SortType "moststars"}}active{{end}} item" href="{{$.Link}}?sort=moststars&q={{$.Keyword}}&tab={{$.TabName}}">{{.i18n.Tr "repo.issues.filter_sort.moststars"}}</a>
<a class="{{if eq .SortType "feweststars"}}active{{end}} item" href="{{$.Link}}?sort=feweststars&q={{$.Keyword}}&tab={{$.TabName}}">{{.i18n.Tr "repo.issues.filter_sort.feweststars"}}</a>
<a class="{{if eq .SortType "mostforks"}}active{{end}} item" href="{{$.Link}}?sort=mostforks&q={{$.Keyword}}&tab={{$.TabName}}">{{.i18n.Tr "repo.issues.filter_sort.mostforks"}}</a>
<a class="{{if eq .SortType "fewestforks"}}active{{end}} item" href="{{$.Link}}?sort=fewestforks&q={{$.Keyword}}&tab={{$.TabName}}">{{.i18n.Tr "repo.issues.filter_sort.fewestforks"}}</a>
</div>
</div>
</div>
<form class="ui form ignore-dirty" style="max-width: 90%">
<input type="hidden" name="tab" value="{{$.TabName}}">
<input type="hidden" name="sort" value="{{$.SortType}}">
<div class="ui fluid action input">
<input name="q" value="{{.Keyword}}" placeholder="{{.i18n.Tr "explore.search"}}..." autofocus>
<button class="ui blue button">{{.i18n.Tr "explore.search"}}</button>
</div>
</form>
<div class="ui divider"></div>
<div class="repos--seach">
<div class="ui container">
<div class="ui two column centered grid">
<form class="mobile ten wide tablet computer column ui form ignore-dirty">
<div class="ui fluid action input">
<input name="q" value="{{.Keyword}}" placeholder="{{.i18n.Tr "explore.search"}}..." autofocus>
<input type="hidden" name="tab" value="{{$.TabName}}">
<input type="hidden" name="sort" value="{{$.SortType}}">
<button class="ui blue button">{{.i18n.Tr "explore.search"}}</button>
</div>
</form>
</div>
</div>
</div>

+ 14
- 4
templates/explore/repos.tmpl View File

@@ -1,10 +1,20 @@
{{template "base/head" .}}
<div class="explore repositories">
{{template "explore/navbar" .}}

{{template "explore/repo_search" .}}

<div class="ui container">
{{template "explore/repo_search" .}}
{{template "explore/repo_list" .}}
{{template "base/paginate" .}}
<div class="ui grid">
{{template "explore/navbar" .}}

<div class="ui sixteen wide mobile ten wide tablet ten wide computer column">
{{template "explore/repo_list" .}}
{{template "base/paginate" .}}
</div>
<div class="ui sixteen wide mobile six wide tablet three wide computer column">
{{template "explore/repo_right" .}}
</div>
</div>
</div>
</div>
{{template "base/footer" .}}

+ 11
- 23
templates/explore/search.tmpl View File

@@ -1,25 +1,13 @@
<div class="ui right floated secondary filter menu">
<!-- Sort -->
<div class="ui right dropdown type jump item">
<span class="text">
{{.i18n.Tr "repo.issues.filter_sort"}}
<i class="dropdown icon"></i>
</span>
<div class="menu">
<a class="{{if eq .SortType "newest"}}active{{end}} item" href="{{$.Link}}?sort=newest&q={{$.Keyword}}&tab={{$.TabName}}">{{.i18n.Tr "repo.issues.filter_sort.latest"}}</a>
<a class="{{if eq .SortType "oldest"}}active{{end}} item" href="{{$.Link}}?sort=oldest&q={{$.Keyword}}&tab={{$.TabName}}">{{.i18n.Tr "repo.issues.filter_sort.oldest"}}</a>
<a class="{{if eq .SortType "alphabetically"}}active{{end}} item" href="{{$.Link}}?sort=alphabetically&q={{$.Keyword}}&tab={{$.TabName}}">{{.i18n.Tr "repo.issues.label.filter_sort.alphabetically"}}</a>
<a class="{{if eq .SortType "reversealphabetically"}}active{{end}} item" href="{{$.Link}}?sort=reversealphabetically&q={{$.Keyword}}&tab={{$.TabName}}">{{.i18n.Tr "repo.issues.label.filter_sort.reverse_alphabetically"}}</a>
<a class="{{if eq .SortType "recentupdate"}}active{{end}} item" href="{{$.Link}}?sort=recentupdate&q={{$.Keyword}}&tab={{$.TabName}}">{{.i18n.Tr "repo.issues.filter_sort.recentupdate"}}</a>
<a class="{{if eq .SortType "leastupdate"}}active{{end}} item" href="{{$.Link}}?sort=leastupdate&q={{$.Keyword}}&tab={{$.TabName}}">{{.i18n.Tr "repo.issues.filter_sort.leastupdate"}}</a>
<div class="repos--seach">
<div class="ui container">
<div class="ui two column centered grid">
<form class="sixteen wide mobile eight fourteen tablet fourteen wide computer column ui form ignore-dirty">
<div class="ui fluid action input">
<input name="q" value="{{.Keyword}}" placeholder="{{.i18n.Tr "explore.search"}}..." autofocus>
<input type="hidden" name="tab" value="{{$.TabName}}">
<button class="ui blue button">{{.i18n.Tr "explore.search"}}</button>
</div>
</form>
</div>
</div>
</div>
<form class="ui form ignore-dirty" style="max-width: 90%">
<input type="hidden" name="tab" value="{{$.TabName}}">
<div class="ui fluid action input">
<input name="q" value="{{.Keyword}}" placeholder="{{.i18n.Tr "explore.search"}}..." autofocus>
<button class="ui blue button">{{.i18n.Tr "explore.search"}}</button>
</div>
</form>
<div class="ui divider"></div>
</div>

+ 53
- 23
templates/explore/users.tmpl View File

@@ -1,33 +1,63 @@
{{template "base/head" .}}
<div class="explore users">
{{template "explore/navbar" .}}
{{template "explore/search" .}}
<div class="ui container">
{{template "explore/search" .}}
<div class="ui grid">
{{template "explore/navbar" .}}
<div class="sixteen mobile ten wide tablet computer column">

<div class="ui user list">
{{range .Users}}
<div class="item">
<img class="ui avatar image" src="{{.RelAvatarLink}}">
<div class="content">
<span class="header"><a href="{{.HomeLink}}">{{.Name}}</a> {{.FullName}}</span>
<div class="description">
{{if .Location}}
{{svg "octicon-location" 16}} {{.Location}}
{{end}}
{{if and $.ShowUserEmail .Email $.IsSigned (not .KeepEmailPrivate)}}
{{svg "octicon-mail" 16}}
<a href="mailto:{{.Email}}" rel="nofollow">{{.Email}}</a>
{{end}}
{{svg "octicon-clock" 16}} {{$.i18n.Tr "user.join_on"}} {{.CreatedUnix.FormatShort}}
<h2 class="ui left floated medium header">
{{.i18n.Tr "explore.users"}}
</h2>
<div class="ui right floated secondary filter menu">
<!-- Sort -->
<div class="ui right dropdown type jump item">
<span class="text">
{{.i18n.Tr "repo.issues.filter_sort"}}
<i class="dropdown icon"></i>
</span>
<div class="menu">
<a class="{{if eq .SortType "newest"}}active{{end}} item" href="{{$.Link}}?sort=newest&q={{$.Keyword}}&tab={{$.TabName}}">{{.i18n.Tr "repo.issues.filter_sort.latest"}}</a>
<a class="{{if eq .SortType "oldest"}}active{{end}} item" href="{{$.Link}}?sort=oldest&q={{$.Keyword}}&tab={{$.TabName}}">{{.i18n.Tr "repo.issues.filter_sort.oldest"}}</a>
<a class="{{if eq .SortType "alphabetically"}}active{{end}} item" href="{{$.Link}}?sort=alphabetically&q={{$.Keyword}}&tab={{$.TabName}}">{{.i18n.Tr "repo.issues.label.filter_sort.alphabetically"}}</a>
<a class="{{if eq .SortType "reversealphabetically"}}active{{end}} item" href="{{$.Link}}?sort=reversealphabetically&q={{$.Keyword}}&tab={{$.TabName}}">{{.i18n.Tr "repo.issues.label.filter_sort.reverse_alphabetically"}}</a>
<a class="{{if eq .SortType "recentupdate"}}active{{end}} item" href="{{$.Link}}?sort=recentupdate&q={{$.Keyword}}&tab={{$.TabName}}">{{.i18n.Tr "repo.issues.filter_sort.recentupdate"}}</a>
<a class="{{if eq .SortType "leastupdate"}}active{{end}} item" href="{{$.Link}}?sort=leastupdate&q={{$.Keyword}}&tab={{$.TabName}}">{{.i18n.Tr "repo.issues.filter_sort.leastupdate"}}</a>
</div>
</div>
</div>
</div>
{{else}}
<div>{{$.i18n.Tr "explore.user_no_results"}}</div>
{{end}}
</div>

{{template "base/paginate" .}}
<div class="ui clearing divider"></div>

<div class="ui user list">
{{range .Users}}
<div class="item">
<img class="ui avatar image" src="{{.RelAvatarLink}}">
<div class="content">
<span class="header"><a href="{{.HomeLink}}">{{.Name}}</a> {{.FullName}}</span>
<div class="description">
{{if .Location}}
{{svg "octicon-location" 16}} {{.Location}}
{{end}}
{{if and $.ShowUserEmail .Email $.IsSigned (not .KeepEmailPrivate)}}
{{svg "octicon-mail" 16}}
<a href="mailto:{{.Email}}" rel="nofollow">{{.Email}}</a>
{{end}}
{{svg "octicon-clock" 16}} {{$.i18n.Tr "user.join_on"}} {{.CreatedUnix.FormatShort}}
</div>
</div>
</div>
{{else}}
<div>{{$.i18n.Tr "explore.user_no_results"}}</div>
{{end}}
</div>
{{template "base/paginate" .}}
</div>
<div class="sixteen wide mobile six wide tablet three wide computer column">
{{template "explore/repo_right" .}}
</div>

</div>
</div>
</div>
{{template "base/footer" .}}

+ 242
- 41
templates/home.tmpl View File

@@ -1,53 +1,254 @@
{{template "base/head" .}}
<div class="home">
<div class="ui stackable middle very relaxed page grid">
<div class="sixteen wide center aligned centered column">
<div>
<img class="logo" src="{{StaticUrlPrefix}}/img/gitea-lg.png" />
<script>
document.addEventListener('DOMContentLoaded', function () {
particleground(document.getElementById('particles'), {
dotColor: 'rgba(0,176,240,0.2)',
lineColor: 'rgba(68,114,196,0.1)'
});
var intro = document.getElementById('intro');
intro.style.marginTop = - intro.offsetHeight / 2 + 'px';
}, false);
</script>
<div id="index-project">
<div id="particles"></div>
<div class="center aligned ui container inverted segment"><!--内容宽度,默认1127px-->
<h1 class="ui header section--header">启智社区
<p class="sub header">Open Intelligence,Open Source,Open Community,Open Ecosystem</p>
</h1>
<div class="ui six column grid prorow">
<div class="eight wide mobile four wide tablet four wide computer column ipros">
<div class="ui card">
<div class="image"><img src="http://www.openi.org.cn/statics/openi/images/index/openi-paddle.png" style=" height:20px;"></div>
<div class="content ui grid">
<div class="header right aligned eight wide column" style=" border-right:2px solid #ffc000">
<span style="color: #5170ff;">OpenI</span> <b style="color:#FFF">DL</b>
</div>
<div class="header left aligned eight wide column">
<span style="color: #5170ff;">OpenI</span> <b style="color:#ffc000">RL</b>
</div>
</div>
<div class="extra content">
<div class="center floated author">
贡献者:百度
</div>
</div>
</div>
<a class="flip" href="http://www.openi.org.cn/html/2020/Framework_0325/12.html"></a>
</div>
<div class="eight wide mobile three wide tablet three wide computer column ipros">
<div class="ui card">
<div class="image">
<img src="http://www.openi.org.cn/statics/openi/images/index/openi-tianyuan.png" alt="Brain++·天元" style=" height:50px;">
</div>
<div class="content">
<div class="header">Brain++·天元</div>
</div>
<div class="extra content">
<div class="center floated author">
贡献者:旷视
</div>
</div>
</div>
<a class="flip" href="/html/2020/Framework_0325/18.html"></a>
</div>
<div class="eight wide mobile four wide tablet four wide computer column ipros">
<div class="ui card">
<div class="content ui grid">
<div class="header eight wide column" style=" border-right:2px solid #ffc000">
<div><span style="color: #5170ff;">OpenI</span> <b style="color:#FFF">天璇</b></div>

</div>
<div class="header eight wide column">
<div><span style="color: #5170ff;">OpenI</span> <b style="color:#FFF">天枢</b></div>

</div>
<div class="eight wide column" style=" border-right:2px solid #ffc000; padding-top:0">
<div class="meta">AVS3 解码</div>
</div>
<div class="eight wide column" style="padding-top:0">
<div class="meta">AVS3 编码</div>
</div>
</div>
<div class="extra content">
<div class="center floated author">
贡献者:北大深研院、鹏城实验室、深圳市超高清创新中心
</div>
</div>
</div>
<a class="flip" style="border-style:dashed;"></a>
</div>
<div class="eight wide mobile three wide tablet three wide computer column ipros">
<div class="ui card">
<div class="content">
<div class="header" style=" padding-top:0.8em;padding-bottom:0.5em"><span style="color: #5170ff;">OpenI</span> <b style="color:#FFF">海参</b></div>
<div class="meta">基于深度学习的视频智能编码</div>
</div>
<div class="extra content">
<div class="center floated author">
贡献者:鹏城实验室、北大、武大、中科大、哈工大
</div>
</div>
</div>
<a class="flip" href="/html/2020/Framework_0325/18.html"></a>
</div>
<div class="sixteen wide mobile two wide tablet two wide computer column">
<div class="ui card">
<div class="content">
<div class="header" ><i class="ellipsis horizontal icon"></i></div>
</div>
</div>
<div class="flip flip-more"></div>
</div>
</div>
<div class="hero">
<h1 class="ui icon header title">
{{AppName}}
</h1>
<h2>{{.i18n.Tr "startpage.app_desc"}}</h2>
<div class="ui divider" style="margin-top:2.0em; margin-bottom:2.0em;"></div>

<div class="ui six column grid prorow">
<div class="eight wide mobile four wide tablet four wide computer column ipros">
<div class="ui card">
<div class="image">
<img src="http://www.openi.org.cn/statics/openi/images/index/openi-octopus.png" alt="启智章鱼" style=" height:50px;">
</div>
<div class="content">
<div class="meta">新一代智能资源管理系统</div>
</div>
<div class="extra content">
<div class="center floated author">
贡献者:鹏城实验室、北大
</div>
</div>
</div>
<a class="flip flip-blue" href="/html/2020/Environment_0325/9.html"></a>
</div>
<div class="eight wide mobile three wide tablet three wide computer column ipros">
<div class="ui card">
<div class="image">
<img src="http://www.openi.org.cn/statics/openi/images/index/openi-shanhu.png" alt="OpenI珊瑚" style=" height:50px;">
</div>
<div class="content">
<div class="meta">异构资源调度项目</div>
</div>
<div class="extra content">
<div class="center floated author">
贡献者:华为
</div>
</div>
</div>
<a class="flip flip-blue" href="/html/2020/Environment_0325/10.html"></a>
</div>
<div class="five wide mobile three wide tablet three wide computer column ipros">
<div class="ui card">
<div class="image">
<img src="http://www.openi.org.cn/statics/openi/images/index/openi-trustie.png" alt="启智Trustie" style=" height:50px;">
</div>
<div class="content">
<div class="meta">群体化协同创新环境</div>
</div>
<div class="extra content">
<div class="center floated author">
贡献者:国防科大、北航、北大…
</div>
</div>
</div>
<a class="flip flip-green" href="/html/2020/Environment_0325/11.html"></a>
</div>
<div class="five wide mobile three wide tablet three wide computer column ipros">
<div class="ui card">
<div class="image">
<img src="http://www.openi.org.cn/statics/openi/images/index/huawei.png" alt="华为" style=" height:25px; margin-top:32px;">
</div>
<div class="content">
<div class="meta">华为软开云</div>
</div>
</div>
<a class="flip flip-green"></a>
</div>
<div class="six wide mobile three wide tablet three wide computer column ipros">
<div class="ui card">
<div class="image">
<img src="http://www.openi.org.cn/statics/openi/images/index/openi-zhongheng.png" alt="OpenI 纵横" style=" height:50px;">
</div>
<div class="content">
<div class="meta">数据协同环境</div>
</div>
<div class="extra content">
<div class="center floated author">
贡献者:微众银行
</div>
</div>
</div>
<a class="flip flip-green" href="/html/2020/Environment_0325/13.html"></a>
</div>
</div>
<div class="ui divider" style="margin-top:2.0em; margin-bottom:2.0em;"></div>

<div class="ui six column grid prorow">
<div class="sixteen wide mobile six wide tablet six wide computer column ipros">
<div class="content ui grid">
<div class="header sixteen wide column">
<div class="ui centered card" style=" margin-top:0.5em; margin-bottom:0.5em;">
<div class="content">
<div class="header">鹏城云脑1、2</div>
</div>
</div>
<a class="flip flip-green"></a>
</div>
<div class="header sixteen wide column">
<div class="ui centered card" style=" margin-top:0.5em; margin-bottom:0.5em;">
<div class="content">
<div class="header">北京、合肥、苏州…</div>
</div>
</div>
<a class="flip flip-green"></a>
</div>
</div>
</div>
<div class="eight wide mobile two wide tablet four wide computer column ipros">
<div class="ui card">
<div class="content">
<div class="header" style=" padding-top:0.8em;padding-bottom:0.5em"><span style="color: #5170ff;">OpenI</span> <b style="color:#FFF">海藻</b></div>
<div class="meta">可配置指令集和微架构的AI开源芯片</div>
</div>
<div class="extra content">
<div class="center floated author">
贡献者:北大、中科院、鹏城实验室
</div>
</div>
</div>
<a class="flip flip-green" href="/html/2020/Framework_0325/15.html"></a>
</div>
<div class="eight wide mobile three wide tablet four wide computer column ipros">
<div class="ui card">
<div class="image">
<img src="http://www.openi.org.cn/statics/openi/images/index/huaweicloud.png" alt="华为云" style=" height:50px; margin-top:32px;">
</div>
</div>
<a class="flip flip-green"></a>
</div>
<div class="sixteen wide mobile two wide tablet two wide computer column">
<div class="ui card">
<div class="content">
<div class="header" ><i class="ellipsis horizontal icon"></i></div>
</div>
</div>
<div class="flip flip-more"></div>
</div>
</div>
</div>
</div>

<div class="ui stackable middle very relaxed page grid">
<div class="eight wide center column">
<h1 class="hero ui icon header">
{{svg "octicon-flame" 16}} {{.i18n.Tr "startpage.install"}}
</h1>
<p class="large">
{{.i18n.Tr "startpage.install_desc" | Str2html}}
</p>
</div>
<div class="eight wide center column">
<h1 class="hero ui icon header">
{{svg "octicon-device-desktop" 16}} {{.i18n.Tr "startpage.platform"}}
</h1>
<p class="large">
{{.i18n.Tr "startpage.platform_desc" | Str2html}}
</p>
</div>
</div>
<div class="ui stackable middle very relaxed page grid">
<div class="eight wide center column">
<h1 class="hero ui icon header">
{{svg "octicon-rocket" 16}} {{.i18n.Tr "startpage.lightweight"}}
</h1>
<p class="large">
{{.i18n.Tr "startpage.lightweight_desc" | Str2html}}
</p>
</div>
<div class="eight wide center column">
<h1 class="hero ui icon header">
{{svg "octicon-code" 16}} {{.i18n.Tr "startpage.license"}}
</h1>
<p class="large">
{{.i18n.Tr "startpage.license_desc" | Str2html}}
<div class="center column">
<h1 class="ui header section--header" style=" margin-top:1.0em">启智社区期待您的加入</h1>
<p class="large" style="padding: 0 0 43px;">
OpenI社区旨在促进人工智能领域的开源开放协同创新,构建OpenI的技术链、创新链和生态链、推动人工智能产业健康快速发展及其在社会经济各领域的广泛应用。围绕重大产业创新,汇聚创新资源,促进众创共享,形成产业生态的目标,让"一体两翼"构想下的以技术专家为主体组成的多个工作组(标准工作组、知识产权工作组、投融资工作组、开源治理工作组等)、和以企业为主体的多个应用推进组(智能交通推进组、智能医疗推进组、智能金融推进组、智能教育推进组等)作为一个整体进行工作。以"完全开源、完全开放、完全免费、尊重创新"为准则,汇聚学术机构、商业实体、自然人或任何其他法人,共建共享开源软件、开源硬件和开源数据的超级社区;以众智、赛智、创智、有智等工作方法,努力建设成具有国际影响力的人工智能开源开放平台。
</p>
<a class="ui blue button" href="https://www.openi.org.cn/html/Club/2019/0228/17.html" style="padding-left:5.0rem;padding-right:5.0rem;">加入OpenI社区 <i class="arrow right icon"></i></a>
<div style="margin-top:80px;">
<img src="https://www.openi.org.cn/statics/openi/images/index/mem-logos.png" alt="OpenI前期参与成员" style="width:100%; max-width:1200px;">
</div>
</div>
</div>

</div>
{{template "base/footer" .}}

+ 15
- 14
templates/org/header.tmpl View File

@@ -1,26 +1,27 @@
{{with .Org}}

<div class="organization-header">
<div class="ui container">
<div class="ui vertically grid head">
<div class="column">
<div class="ui header">
{{with .Org}}
<img class="ui image" src="{{.SizedRelAvatarLink 100}}">
<span class="text thin grey"><a href="{{.HomeLink}}">{{.DisplayName}}</a></span>

{{end}}
{{if .IsOrganizationOwner}}
<div class="ui right">
<div class="ui menu">
<a class="{{if $.PageIsOrgMembers}}active{{end}} item" href="{{$.OrgLink}}/members">
{{svg "octicon-organization" 16}}&nbsp;{{$.i18n.Tr "org.people"}}
<div class="floating ui black label">{{.NumMembers}}</div>
</a>
<a class="{{if $.PageIsOrgTeams}}active{{end}} item" href="{{$.OrgLink}}/teams">
{{svg "octicon-jersey" 16}}&nbsp;{{$.i18n.Tr "org.teams"}}
<div class="floating ui black label">{{.NumTeams}}</div>
</a>
</div>
<a class="ui green button" href="{{.OrgLink}}/teams/new">{{svg "octicon-plus" 16}} {{.i18n.Tr "org.create_new_team"}}</a>
</div>
{{end}}
{{if .CanCreateOrgRepo}}
<div class="ui right">
<a class="ui green button" href="{{AppSubUrl}}/repo/create?org={{.Org.ID}}">{{svg "octicon-plus" 16}} {{.i18n.Tr "new_repo"}}</a>
</div>
{{end}}
</div>
</div>
</div>
</div>
<div class="ui divider"></div>
{{end}}
</div>

+ 66
- 61
templates/org/home.tmpl View File

@@ -2,80 +2,85 @@
<div class="organization profile">
{{/* overflow: auto is the clearfix - this avoids the image going beyond
the container where it is supposed to stay inside. */}}
<div class="ui container" style="overflow: auto">
<img class="ui left" id="org-avatar" src="{{.Org.SizedRelAvatarLink 140}}"/>
<div id="org-info">
<div class="ui header">
{{.Org.DisplayName}}
{{if .IsOrganizationOwner}}<a class="middle text grey" href="{{.OrgLink}}/settings">{{svg "octicon-gear" 16}}</a>{{end}}
</div>
{{if .Org.Description}}<p class="desc">{{.Org.Description}}</p>{{end}}
<div class="text grey meta">
{{if .Org.Location}}<div class="item">{{svg "octicon-location" 16}} <span>{{.Org.Location}}</span></div>{{end}}
{{if .Org.Website}}<div class="item">{{svg "octicon-link" 16}} <a target="_blank" rel="noopener noreferrer" href="{{.Org.Website}}">{{.Org.Website}}</a></div>{{end}}
<div class="organization-info">
<div class="ui center aligned container " style="overflow: auto">
<img class="ui circular image" id="org-avatar" src="{{.Org.SizedRelAvatarLink 140}}"/>
<div id="org-info">
<div class="ui header">
{{.Org.DisplayName}}
{{if .IsOrganizationOwner}}<a class="middle text grey" href="{{.OrgLink}}/settings">{{svg "octicon-gear" 16}}</a>{{end}}
</div>
{{if .Org.Description}}<p class="text grey desc">{{.Org.Description}}</p>{{end}}
<div class="meta">
{{if .Org.Location}}<div class="item">{{svg "octicon-location" 16}} <span>{{.Org.Location}}</span></div>{{end}}
{{if .Org.Website}}<div class="item">{{svg "octicon-link" 16}} <a target="_blank" rel="noopener noreferrer" href="{{.Org.Website}}">{{.Org.Website}}</a></div>{{end}}
</div>
</div>
</div>
</div>

<div class="ui divider"></div>

<div class="ui container">
<div class="ui mobile reversed stackable grid">
<div class="ui eleven wide column">
{{if .CanCreateOrgRepo}}
<div class="text right">
<a class="ui green button" href="{{AppSubUrl}}/repo/create?org={{.Org.ID}}">{{.i18n.Tr "new_repo"}}</a>
<div class="ui stackable grid">
{{template "org/navber" .}}
<div class="ui fourteen wide computer column">
<div class="ui mobile reversed stackable grid">
<div class="ui ten wide tablet eleven wide computer column">
{{if .CanCreateOrgRepo}}
<div class="text right">
<a class="ui green button" href="{{AppSubUrl}}/repo/create?org={{.Org.ID}}">{{.i18n.Tr "new_repo"}}</a>
</div>
{{end}}
{{template "org/repo_list" .}}
{{template "base/paginate" .}}
</div>
<div class="ui divider"></div>
{{end}}
{{template "explore/repo_search" .}}
{{template "explore/repo_list" .}}
{{template "base/paginate" .}}
</div>

<div class="ui five wide column">
<h4 class="ui top attached header">
<strong>{{.i18n.Tr "org.people"}}</strong>
{{if .IsOrganizationMember}}
<div class="ui right">
<a class="text grey" href="{{.OrgLink}}/members">{{.Org.NumMembers}} {{svg "octicon-chevron-right" 16}}</a>
<div class="ui sixteen wide mobile six wide tablet five wide computer column">
<h4 class="ui top attached header">
<strong>{{.i18n.Tr "org.people"}}</strong>
{{if .IsOrganizationMember}}
<div class="ui right">
<a class="text grey" href="{{.OrgLink}}/members">{{.Org.NumMembers}} {{svg "octicon-chevron-right" 16}}</a>
</div>
{{end}}
</h4>
<div class="ui attached segment members">
{{$isMember := .IsOrganizationMember}}
{{range .Members}}
{{if or $isMember (.IsPublicMember $.Org.ID)}}
<a href="{{.HomeLink}}" title="{{.Name}}{{if .FullName}} ({{.FullName}}){{end}}"><img class="ui avatar" src="{{.RelAvatarLink}}"></a>
{{end}}
{{end}}
</div>
{{end}}
</h4>
<div class="ui attached segment members">
{{$isMember := .IsOrganizationMember}}
{{range .Members}}
{{if or $isMember (.IsPublicMember $.Org.ID)}}
<a href="{{.HomeLink}}" title="{{.Name}}{{if .FullName}} ({{.FullName}}){{end}}"><img class="ui avatar" src="{{.RelAvatarLink}}"></a>
{{end}}
{{end}}
</div>

{{if .IsOrganizationMember}}
<div class="ui top attached header">
<strong>{{.i18n.Tr "org.teams"}}</strong>
<div class="ui right">
<a class="text grey" href="{{.OrgLink}}/teams"><span>{{.Org.NumTeams}}</span> {{svg "octicon-chevron-right" 16}}</a>
</div>
</div>
<div class="ui attached table segment teams">
{{range .Teams}}
<div class="item">
<a href="{{$.OrgLink}}/teams/{{.LowerName}}"><strong class="team-name">{{.Name}}</strong></a>
<p class="text grey">
<a href="{{$.OrgLink}}/teams/{{.LowerName}}"><strong>{{.NumMembers}}</strong> {{$.i18n.Tr "org.lower_members"}}</a> ·
<a href="{{$.OrgLink}}/teams/{{.LowerName}}/repositories"><strong>{{.NumRepos}}</strong> {{$.i18n.Tr "org.lower_repositories"}}</a>
</p>
{{if .IsOrganizationMember}}
<div class="ui top attached header">
<strong>{{.i18n.Tr "org.teams"}}</strong>
<div class="ui right">
<a class="text grey" href="{{.OrgLink}}/teams"><span>{{.Org.NumTeams}}</span> {{svg "octicon-chevron-right" 16}}</a>
</div>
</div>
<div class="ui attached table segment teams">
{{range .Teams}}
<div class="item">
<a href="{{$.OrgLink}}/teams/{{.LowerName}}"><strong class="team-name">{{.Name}}</strong></a>
<p class="text grey">
<a href="{{$.OrgLink}}/teams/{{.LowerName}}"><strong>{{.NumMembers}}</strong> {{$.i18n.Tr "org.lower_members"}}</a> ·
<a href="{{$.OrgLink}}/teams/{{.LowerName}}/repositories"><strong>{{.NumRepos}}</strong> {{$.i18n.Tr "org.lower_repositories"}}</a>
</p>
</div>
{{end}}
</div>
{{if .IsOrganizationOwner}}
<div class="ui bottom attached segment">
<a class="ui blue small button" href="{{.OrgLink}}/teams/new">{{.i18n.Tr "org.create_new_team"}}</a>
</div>
{{end}}
{{end}}
</div>
{{if .IsOrganizationOwner}}
<div class="ui bottom attached segment">
<a class="ui blue small button" href="{{.OrgLink}}/teams/new">{{.i18n.Tr "org.create_new_team"}}</a>
</div>
{{end}}
{{end}}
</div>
</div>
</div>
</div>
</div>


+ 62
- 63
templates/org/member/members.tmpl View File

@@ -3,74 +3,73 @@
{{template "org/header" .}}
<div class="ui container">
{{template "base/alert" .}}

<div class="list">
{{ range .Members}}
<div class="item ui grid">
<div class="ui one wide column">
<img class="ui avatar" src="{{.SizedRelAvatarLink 48}}">
</div>
<div class="ui three wide column">
<div class="meta"><a href="{{.HomeLink}}">{{.Name}}</a></div>
<div class="meta">{{.FullName}}</div>
</div>
<div class="ui four wide column center">
<div class="meta">
{{$.i18n.Tr "org.members.membership_visibility"}}
</div>
<div class="meta">
{{ $isPublic := index $.MembersIsPublicMember .ID}}
{{if $isPublic}}
<strong>{{$.i18n.Tr "org.members.public"}}</strong>
{{if or (eq $.SignedUser.ID .ID) $.IsOrganizationOwner}}(<a class="link-action" href data-url="{{$.OrgLink}}/members/action/private?uid={{.ID}}">{{$.i18n.Tr "org.members.public_helper"}}</a>){{end}}
{{else}}
<strong>{{$.i18n.Tr "org.members.private"}}</strong>
{{if or (eq $.SignedUser.ID .ID) $.IsOrganizationOwner}}(<a class="link-action" href data-url="{{$.OrgLink}}/members/action/public?uid={{.ID}}">{{$.i18n.Tr "org.members.private_helper"}}</a>){{end}}
{{end}}
</div>
</div>
<div class="ui three wide column center">
<div class="meta">
{{$.i18n.Tr "org.members.member_role"}}
</div>
<div class="meta">
<strong>{{if index $.MembersIsUserOrgOwner .ID}}{{svg "octicon-shield-lock" 16}} {{$.i18n.Tr "org.members.owner"}}{{else}}{{$.i18n.Tr "org.members.member"}}{{end}}</strong>
</div>
</div>
<div class="ui one wide column center">
<div class="meta">
2FA
</div>
<div class="meta">
<strong>
{{if index $.MembersTwoFaStatus .ID}}
<span class="text green">{{svg "octicon-check" 16}}</span>
<div class="ui stackable grid">
{{template "org/navber" .}}
<div class="ui fourteen wide computer column list">
{{ range .Members}}
<div class="item ui grid">
<div class="ui two wide column">
<img class="ui avatar" src="{{.SizedRelAvatarLink 48}}">
</div><div class="ui three wide column">
<div class="meta"><a href="{{.HomeLink}}">{{.Name}}</a></div>
<div class="meta">{{.FullName}}</div>
</div><div class="ui four wide column center">
<div class="meta">
{{$.i18n.Tr "org.members.membership_visibility"}}
</div>
<div class="meta">
{{ $isPublic := index $.MembersIsPublicMember .ID}}
{{if $isPublic}}
<strong>{{$.i18n.Tr "org.members.public"}}</strong>
{{if or (eq $.SignedUser.ID .ID) $.IsOrganizationOwner}}(<a class="link-action" href data-url="{{$.OrgLink}}/members/action/private?uid={{.ID}}">{{$.i18n.Tr "org.members.public_helper"}}</a>){{end}}
{{else}}
{{svg "octicon-x" 16}}
<strong>{{$.i18n.Tr "org.members.private"}}</strong>
{{if or (eq $.SignedUser.ID .ID) $.IsOrganizationOwner}}(<a class="link-action" href data-url="{{$.OrgLink}}/members/action/public?uid={{.ID}}">{{$.i18n.Tr "org.members.private_helper"}}</a>){{end}}
{{end}}
</strong>
</div>
</div>
<div class="ui four wide column">
<div class="text right">
{{if eq $.SignedUser.ID .ID}}
<form method="post" action="{{$.OrgLink}}/members/action/leave">
{{$.CsrfTokenHtml}}
<button type="submit" class="ui red small button" name="uid" value="{{.ID}}">{{$.i18n.Tr "org.members.leave"}}</button>
</form>
{{else if $.IsOrganizationOwner}}
<form method="post" action="{{$.OrgLink}}/members/action/remove">
{{$.CsrfTokenHtml}}
<button type="submit" class="ui red small button" name="uid" value="{{.ID}}">{{$.i18n.Tr "org.members.remove"}}</button>
</form>
{{end}}
</div>
</div><div class="ui three wide column center">
<div class="meta">
{{$.i18n.Tr "org.members.member_role"}}
</div>
<div class="meta">
<strong>{{if index $.MembersIsUserOrgOwner .ID}}{{svg "octicon-shield-lock" 16}} {{$.i18n.Tr "org.members.owner"}}{{else}}{{$.i18n.Tr "org.members.member"}}{{end}}</strong>
</div>
</div><div class="ui one wide column center">
<div class="meta">
2FA
</div>
<div class="meta">
<strong>
{{if index $.MembersTwoFaStatus .ID}}
<span class="text green">{{svg "octicon-check" 16}}</span>
{{else}}
{{svg "octicon-x" 16}}
{{end}}
</strong>
</div>
</div><div class="ui three wide column">
<div class="text right">
{{if eq $.SignedUser.ID .ID}}
<form method="post" action="{{$.OrgLink}}/members/action/leave">
{{$.CsrfTokenHtml}}
<button type="submit" class="ui red small button" name="uid" value="{{.ID}}">{{$.i18n.Tr "org.members.leave"}}</button>
</form>
{{else if $.IsOrganizationOwner}}
<form method="post" action="{{$.OrgLink}}/members/action/remove">
{{$.CsrfTokenHtml}}
<button type="submit" class="ui red small button" name="uid" value="{{.ID}}">{{$.i18n.Tr "org.members.remove"}}</button>
</form>
{{end}}
</div>
</div>
</div>
</div>
{{end}}
{{end}}
</div>
{{template "base/paginate" .}}
</div>

{{template "base/paginate" .}}
</div>
</div>
{{template "base/footer" .}}

custom/templates/org/navber.tmpl → templates/org/navber.tmpl View File


custom/templates/org/repo_list.tmpl → templates/org/repo_list.tmpl View File


+ 33
- 32
templates/org/team/teams.tmpl View File

@@ -3,44 +3,45 @@
{{template "org/header" .}}
<div class="ui container">
{{template "base/alert" .}}
{{if .IsOrganizationOwner}}
<div class="text right">
<a class="ui green button" href="{{.OrgLink}}/teams/new">{{svg "octicon-plus" 16}} {{.i18n.Tr "org.create_new_team"}}</a>
</div>
<div class="ui divider"></div>
{{end}}

<div class="ui two column grid">
<div class="ui stackable grid">
{{template "org/navber" .}}
<div class="ui fourteen wide computer column list">
<div class="ui two column grid">
{{range .Teams}}
<div class="column">
<div class="ui top attached header">
<a class="text black" href="{{$.OrgLink}}/teams/{{.LowerName}}"><strong>{{.Name}}</strong></a>
<div class="ui right">
{{if .IsMember $.SignedUser.ID}}
<form method="post" action="{{$.OrgLink}}/teams/{{.LowerName}}/action/leave">
{{$.CsrfTokenHtml}}
<button type="submit" class="ui red small button" name="uid" value="{{$.SignedUser.ID}}">{{$.i18n.Tr "org.teams.leave"}}</button>
</form>
{{else if $.IsOrganizationOwner}}
<form method="post" action="{{$.OrgLink}}/teams/{{.LowerName}}/action/join">
{{$.CsrfTokenHtml}}
<button type="submit" class="ui blue small button" name="uid" value="{{$.SignedUser.ID}}">{{$.i18n.Tr "org.teams.join"}}</button>
</form>
<div class="column">
<div class="ui top attached header">
<a class="text black" href="{{$.OrgLink}}/teams/{{.LowerName}}"><strong>{{.Name}}</strong></a>
<div class="ui right">
{{if .IsMember $.SignedUser.ID}}
<form method="post" action="{{$.OrgLink}}/teams/{{.LowerName}}/action/leave">
{{$.CsrfTokenHtml}}
<button type="submit" class="ui red small button" name="uid" value="{{$.SignedUser.ID}}">{{$.i18n.Tr "org.teams.leave"}}</button>
</form>
{{else if $.IsOrganizationOwner}}
<form method="post" action="{{$.OrgLink}}/teams/{{.LowerName}}/action/join">
{{$.CsrfTokenHtml}}
<button type="submit" class="ui blue small button" name="uid" value="{{$.SignedUser.ID}}">{{$.i18n.Tr "org.teams.join"}}</button>
</form>
{{end}}
</div>
</div>
<div class="ui attached segment members">
{{range .Members}}
<a href="{{.HomeLink}}" title="{{.Name}}">
<img class="ui avatar image" src="{{.RelAvatarLink}}">
</a>
{{end}}
</div>
<div class="ui bottom attached header">
<p class="team-meta">{{.NumMembers}} {{$.i18n.Tr "org.lower_members"}} · {{.NumRepos}} {{$.i18n.Tr "org.lower_repositories"}}</p>
</div>
</div>
<div class="ui attached segment members">
{{range .Members}}
<a href="{{.HomeLink}}" title="{{.Name}}">
<img class="ui avatar image" src="{{.RelAvatarLink}}">
</a>
{{end}}
</div>
<div class="ui bottom attached header">
<p class="team-meta">{{.NumMembers}} {{$.i18n.Tr "org.lower_members"}} · {{.NumRepos}} {{$.i18n.Tr "org.lower_repositories"}}</p>
</div>
</div>
{{end}}
</div>
</div>
</div>
</div>
</div>


+ 8
- 0
templates/repo/datasets/dataset.tmpl View File

@@ -0,0 +1,8 @@
<div class="ui attached segment">
<div class="field required dataset-files">
<label>{{.i18n.Tr "dataset.file"}}</label>
<div class="files"></div>
<div class="ui dropzone" id="dataset" data-upload-url="{{AppSubUrl}}/attachments" data-accepts="{{.AttachmentAllowedTypes}}" data-remove-url="{{AppSubUrl}}/attachments/delete" data-csrf="{{.CsrfToken}}" dataset-id={{.dataset.ID}} data-max-file="100" data-dataset-id="{{.dataset.ID}}" data-max-size="{{.AttachmentMaxSize}}" data-default-message="{{.i18n.Tr "dropzone.default_message"}}" data-invalid-input-type="{{.i18n.Tr "dropzone.invalid_input_type"}}" data-file-too-big="{{.i18n.Tr "dropzone.file_too_big"}}" data-remove-file="{{.i18n.Tr "dropzone.remove_file"}}">
</div>
</div>
</div>

+ 37
- 0
templates/repo/datasets/dataset_list.tmpl View File

@@ -0,0 +1,37 @@
{{if .Attachments}}
{{range .Attachments}}
<div class="ui grid item" id="{{.UUID}}">
<div class="row">
<div class="{{if $.Permission.CanWrite $.UnitTypeDatasets}}six{{else}}ten{{end}} wide column">
<a class="title" href="{{.DownloadURL}}">
<span class="fitted">{{svg "octicon-cloud-download" 16}}</span> {{.Name}}
</a>
</div>
<div class="two wide column">
{{.Size | FileSize}}
</div>
<div class="two wide column">
<span class="ui text center" data-tooltip='{{$.i18n.Tr "dataset.download_count"}}' data-position="bottom right">{{svg "octicon-flame" 16}} {{(.DownloadCount | PrettyNumber)}}</span>
</div>

<div class="one wide column">
<span class="ui text center clipboard" data-clipboard-text="{{.DownloadURL}}" data-tooltip='{{$.i18n.Tr "dataset.copy_url"}}' data-clipboard-action="copy">{{svg "octicon-file" 16}}</span>
</div>

{{if $.Permission.CanWrite $.UnitTypeDatasets}}
<div class="three wide column">
<div class="ui buttons mini">
<a class="ui button mini {{if .IsPrivate}}positive active{{end}}" href="javascript:void(0)" data-dataset-status="true-{{.UUID}}" data-csrf="{{$.CsrfToken}}" data-url="{{AppSubUrl}}/attachments/private" data-uuid={{.UUID}} data-private="true" data-is-private={{.IsPrivate}}>{{$.i18n.Tr "dataset.private"}}</a>
<div class="or"></div>
<a class="ui button mini {{if not .IsPrivate}}positive active{{end}}" href="javascript:void(0)" data-dataset-status="false-{{.UUID}}" data-csrf="{{$.CsrfToken}}" data-url="{{AppSubUrl}}/attachments/private" data-uuid={{.UUID}} data-private="false" data-is-private={{.IsPrivate}}>{{$.i18n.Tr "dataset.public"}}</a>
</div>
</div>

<div class="two wide column right aligned">
<a class="ui red button mini" href="javascript:void(0)" data-uuid={{.UUID}} data-dataset-delete data-remove-url="{{AppSubUrl}}/attachments/delete" data-csrf="{{$.CsrfToken}}">{{$.i18n.Tr "dataset.delete"}}</a>
</div>
{{end}}
</div>
</div>
{{end}}
{{end}}

+ 91
- 0
templates/repo/datasets/index.tmpl View File

@@ -0,0 +1,91 @@
{{template "base/head" .}}
<div class="repository release dataset-list view">
{{template "repo/header" .}}
<form class="ui container" action="{{.Link}}" method="post">
<input name="id" value="{{.dataset.ID}}" type="hidden" />
{{.CsrfTokenHtml}}
{{template "base/alert" .}}
<div class="ui two column stackable grid {{if .Error}}hide{{end}}" id="dataset-content">
<div class="column">
<h2>{{.dataset.Title}}</h2>
<div id="dataset-desc">
<span class="no-description text-italic">{{.dataset.Description}}</span>
</div>
</div>
{{if .Permission.CanWrite $.UnitTypeDatasets}}
<div class="column right aligned">
<a class="ui button primary" href="javascript:void(0)" id="dataset-edit">
{{.i18n.Tr "dataset.edit"}}
</a>
</div>
{{end}}
</div>

<div class="ui grid form segment success {{if not .Error}}hide{{end}}" id="dataset-content-edit">
<label class="d-block">{{.i18n.Tr "dataset.title"}}</label>
<div class="sixteen wide column">
<input name="title" placeholder='{{.i18n.Tr "dataset.title"}}' value="{{.dataset.Title}}" autofocus required maxlength="255">
</div>
<label class="d-block">{{.i18n.Tr "dataset.description"}}</label>
<div class="sixteen wide column">
<textarea name="description" rows="3">{{.dataset.Description}}</textarea>
</div>
<div class="sixteen wide column">
<a class="ui button" id="cancel">{{.i18n.Tr "cancel"}}</a>
<button class="ui primary button" id="submit">{{.i18n.Tr "dataset.update_dataset"}}</button>
</div>
</div>

<div class="ui divider"></div>
<div class="ui grid">
<div class="row">
<div class="ui twelve wide column">
<div class="ui sixteen wide column">
<div class="ui two column stackable grid">
<div class="column">
<h2>{{.i18n.Tr "datasets"}}</h2>
</div>
<div class="column right aligned">
<div class="ui right dropdown type jump item">
<span class="text">
{{.i18n.Tr "repo.issues.filter_sort"}}<i class="dropdown icon"></i>
</span>
<div class="menu">
<a class="item" href="{{$.Link}}?sort=newest&q={{$.Keyword}}&tab={{$.TabName}}">{{.i18n.Tr "repo.issues.filter_sort.latest"}}</a>
<a class="item" href="{{$.Link}}?sort=oldest&q={{$.Keyword}}&tab={{$.TabName}}">{{.i18n.Tr "repo.issues.filter_sort.oldest"}}</a>
</div>
</div>
</div>
</div>
</div>
<div class="dataset list">
{{template "repo/datasets/dataset_list" .}}
</div>
<div class="dataset ui middle very relaxed page">
<div class="column">
{{if .Permission.CanWrite $.UnitTypeDatasets}}
<form class="ui form" action="{{.Link}}" method="post">
{{template "repo/datasets/dataset" .}}
</form>
{{end}}
</div>
</div>
</div>
<div class="ui four wide column">
{{template "repo/datasets/right_side" .}}
</div>
</div>
</div>
</form>
</div>
<div class="ui small basic delete modal" id="data-dataset-delete-modal">
<div class="ui icon header">
<i class="trash icon"></i>
{{.i18n.Tr "dataset.attachment.delete"}}
</div>
<div class="content">
<p>{{.i18n.Tr "dataset.attachment.delete_desc" | Str2html}}</p>
</div>
{{template "base/delete_modal_actions" .}}
</div>
{{template "base/footer" .}}

+ 96
- 0
templates/repo/datasets/right_side.tmpl View File

@@ -0,0 +1,96 @@
<div class="ui segment metas">
<div class="ui basic">
<span class="text branch-name">{{.i18n.Tr "dataset.dataset_setting"}}</span>
</div>
<div class="ui divider"></div>
<div class="ui floating jump select-milestone dropdown">
{{if $.Permission.CanWrite $.UnitTypeDatasets}}
<span class="text" id="menutext_1">
<strong>{{.i18n.Tr "dataset.category"}}</strong>
{{svg "octicon-gear" 16}}
</span>
<div class="filter menu">
<input type="hidden" name="category" id="category" value="{{.dataset.Category}}">
{{range $category := categories}}
<a class="checked item" data-category-id="{{$category}}">
{{if eq $category $.dataset.Category}}
<span class="octicon-check">{{svg "octicon-check" 16}}</span>
{{end}}
{{$.i18n.Tr (printf "dataset.category.%s" $category)}}
</a>
{{end}}
</div>
{{else}}
<span class="text"><strong>{{.i18n.Tr "dataset.category"}}</strong></span>
{{end}}
</div>
<div class="ui select-milestone list">
{{if .dataset.Category}}
<a class="item" href="javascript:void(0)"> {{$.i18n.Tr (printf "dataset.category.%s" .dataset.Category)}}</a>
{{else}}
<span class="no-select item">{{.i18n.Tr "dataset.no_category"}}</span>
{{end}}
</div>
<div class="ui divider"></div>
<div class="ui floating jump select-milestone dropdown">
{{if $.Permission.CanWrite $.UnitTypeDatasets}}
<span class="text" id="menutext_2">
<strong>{{.i18n.Tr "dataset.task"}}</strong>
{{svg "octicon-gear" 16}}
</span>
<div class="filter menu">
<input type="hidden" name="task" id="task" value="{{.dataset.Task}}">
{{range $task := tasks}}
<a class="item" data-task-id="{{$task}}">
{{if eq $task $.dataset.Task}}
<span class="octicon-check">{{svg "octicon-check" 16}}</span>
{{end}}
{{$.i18n.Tr (printf "dataset.task.%s" $task)}}
</a>
{{end}}
</div>
{{else}}
<span class="text">
<strong>{{.i18n.Tr "dataset.task"}}</strong>
</span>
{{end}}
</div>
<div class="ui select-milestone list">
{{if .dataset.Task}}
<a class="item" href="javascript:void(0)"> {{$.i18n.Tr (printf "dataset.task.%s" .dataset.Task)}}</a>
{{else}}
<span class="no-select item">{{.i18n.Tr "dataset.no_task"}}</span>
{{end}}
</div>
<div class="ui divider"></div>
<div class="ui floating jump select-milestone dropdown">
{{if $.Permission.CanWrite $.UnitTypeDatasets}}
<span class="text" id="menutext_3">
<strong>{{.i18n.Tr "dataset.license"}}</strong>
{{svg "octicon-gear" 16}}
</span>
<div class="filter menu">
<input type="hidden" name="license" id="license" value="{{.dataset.License}}">
{{range $license := licenses}}
<a class="item" data-license-id="{{$license}}">
{{if eq $license $.dataset.License}}
<span class="octicon-check">{{svg "octicon-check" 16}}</span>
{{end}}
{{$license}}
</a>
{{end}}
</div>
{{else}}
<span class="text">
<strong>{{.i18n.Tr "dataset.license"}}</strong>
</span>
{{end}}
</div>
<div class="ui select-milestone list">
{{if .dataset.License}}
<a class="item" href="javascript:void(0)"> {{.dataset.License}}</a>
{{else}}
<span class="no-select item">{{.i18n.Tr "dataset.no_license"}}</span>
{{end}}
</div>
</div>

+ 8
- 2
templates/repo/header.tmpl View File

@@ -92,8 +92,14 @@
{{if not .Repository.IsBeingCreated}}
<div class="ui tabular stackable menu navbar">
{{if .Permission.CanRead $.UnitTypeCode}}
<a class="{{if .PageIsViewCode}}active{{end}} item" href="{{.RepoLink}}{{if (ne .BranchName .Repository.DefaultBranch)}}/src/{{.BranchNameSubURL | EscapePound}}{{end}}">
{{svg "octicon-code" 16}} {{.i18n.Tr "repo.code"}}
<a class="{{if .PageIsViewCode}}active{{end}} item" href="{{.RepoLink}}{{if (ne .BranchName .Repository.DefaultBranch)}}/src/{{.BranchNameSubURL | EscapePound}}{{end}}">
{{svg "octicon-code" 16}} {{.i18n.Tr "repo.code"}}
</a>
{{end}}

{{if .Permission.CanRead $.UnitTypeDatasets}}
<a class="{{if .PageIsDataset}}active{{end}} item" href="{{.RepoLink}}/datasets">
{{svg "octicon-file-submodule" 16}} {{.i18n.Tr "datasets"}}
</a>
{{end}}



+ 9
- 0
templates/repo/settings/options.tmpl View File

@@ -141,6 +141,15 @@
{{.CsrfTokenHtml}}
<input type="hidden" name="action" value="advanced">

{{$isDatasetEnabled := .Repository.UnitEnabled $.UnitTypeDatasets }}
<div class="inline field">
<label>{{.i18n.Tr "repo.dataset"}}</label>
<div class="ui checkbox">
<input class="enable-system" name="enable_dataset" type="checkbox" {{if $isDatasetEnabled}}checked{{end}}>
<label>{{.i18n.Tr "repo.settings.dataset_desc"}}</label>
</div>
</div>

{{$isWikiEnabled := or (.Repository.UnitEnabled $.UnitTypeWiki) (.Repository.UnitEnabled $.UnitTypeExternalWiki)}}
<div class="inline field">
<label>{{.i18n.Tr "repo.wiki"}}</label>


+ 3
- 1
templates/user/auth/signin.tmpl View File

@@ -2,7 +2,9 @@
<div class="user signin{{if .LinkAccountMode}} icon{{end}}">
{{template "user/auth/signin_navbar" .}}
<div class="ui container">
{{template "user/auth/signin_inner" .}}
<div class="ui raised very padded text container segment">
{{template "user/auth/signin_inner" .}}
</div>
</div>
</div>
{{template "base/footer" .}}

+ 91
- 65
templates/user/auth/signin_inner.tmpl View File

@@ -1,77 +1,103 @@
<style>
.full.height{background-color: #F9F9F9;}
.ui.left:not(.action){ float:none;}
.ui.left{ float:none;}
.ui.secondary.pointing.menu{ border-bottom:none;}
</style>
{{if or (not .LinkAccountMode) (and .LinkAccountMode .LinkAccountModeSignIn)}}
{{template "base/alert" .}}
{{end}}
<h4 class="ui top attached header center">
{{if .LinkAccountMode}}
{{.i18n.Tr "auth.oauth_signin_title"}}
{{else}}
{{.i18n.Tr "auth.login_userpass"}}
{{end}}
</h4>
<div class="ui attached segment">
<form class="ui form" action="{{.SignInLink}}" method="post">
{{.CsrfTokenHtml}}
<div class="required inline field {{if and (.Err_UserName) (or (not .LinkAccountMode) (and .LinkAccountMode .LinkAccountModeSignIn))}}error{{end}}">
<label for="user_name">{{.i18n.Tr "home.uname_holder"}}</label>
<input id="user_name" name="user_name" value="{{.user_name}}" autofocus required>
</div>
{{if or (not .DisablePassword) .LinkAccountMode}}
<div class="required inline field {{if and (.Err_Password) (or (not .LinkAccountMode) (and .LinkAccountMode .LinkAccountModeSignIn))}}error{{end}}">
<label for="password">{{.i18n.Tr "password"}}</label>
<input id="password" name="password" type="password" value="{{.password}}" autocomplete="off" required>
</div>
{{end}}
{{if not .LinkAccountMode}}
<div class="inline field">
<label></label>
<div class="ui checkbox">
<label>{{.i18n.Tr "auth.remember_me"}}</label>
<input name="remember" type="checkbox">

<div class="ui centered grid">
<div class="sixteen wide mobile ten wide tablet ten wide computer column">
<div class="ui bottom aligned two column grid">
<div class="column">
<h2 class="ui header">
{{if .LinkAccountMode}}
{{.i18n.Tr "auth.oauth_signin_title"}}
{{else}}
{{.i18n.Tr "auth.login_userpass"}}
{{end}}
</h2>
</div>
{{if .ShowRegistrationButton}}
<div class="ui right floated column">
<a href="{{AppSubUrl}}/user/sign_up">{{.i18n.Tr "auth.sign_up_now" | Str2html}}</a>
</div>
{{end}}
</div>
</div>
{{end}}

<div class="inline field">
<label></label>
<button class="ui green button">
{{if .LinkAccountMode}}
{{.i18n.Tr "auth.oauth_signin_submit"}}
{{else}}
{{.i18n.Tr "sign_in"}}
{{end}}
</button>
<a href="{{AppSubUrl}}/user/forgot_password">{{.i18n.Tr "auth.forgot_password"}}</a>
</div>
<div class="ui grid">
<div class="column">
<form class="ui form" action="{{.SignInLink}}" method="post">
{{.CsrfTokenHtml}}
<div class="field">
<div class="ui left icon input {{if and (.Err_UserName) (or (not .LinkAccountMode) (and .LinkAccountMode .LinkAccountModeSignIn))}}error{{end}}">
<i class="user icon"></i>
<input id="user_name" name="user_name" value="{{.user_name}}" placeholder="{{.i18n.Tr "home.uname_holder"}}" autofocus required>
</div>
</div>
{{if or (not .DisablePassword) .LinkAccountMode}}
<div class="field">
<div class="ui left icon input {{if and (.Err_Password) (or (not .LinkAccountMode) (and .LinkAccountMode .LinkAccountModeSignIn))}}error{{end}}">
<i class="lock icon"></i>
<input id="password" name="password" type="password" value="{{.password}}" placeholder="{{.i18n.Tr "password"}}" autocomplete="off" required>
</div>
</div>
{{end}}
{{if not .LinkAccountMode}}
<div class="two fields inline">
<div class="field">
<div class="ui checkbox">
<label>{{.i18n.Tr "auth.remember_me"}}</label>
<input name="remember" type="checkbox">
</div>
</div>
<div class="field" style="padding-right: 0; text-align: right;">
<a href="{{AppSubUrl}}/user/forgot_password">{{.i18n.Tr "auth.forgot_password"}}</a>
</div>
</div>
{{end}}

{{if .ShowRegistrationButton}}
<div class="inline field">
<label></label>
<a href="{{AppSubUrl}}/user/sign_up">{{.i18n.Tr "auth.sign_up_now" | Str2html}}</a>
</div>
{{end}}
<div class="ui hidden divider"></div>

{{if and .OrderedOAuth2Names .OAuth2Providers}}
<div class="ui attached segment">
<div class="oauth2 center">
<div id="oauth2-login-loader" class="ui disabled centered loader"></div>
<div>
<div id="oauth2-login-navigator">
<p>{{.i18n.Tr "sign_in_with"}}</p>
{{range $key := .OrderedOAuth2Names}}
{{$provider := index $.OAuth2Providers $key}}
<a href="{{AppSubUrl}}/user/oauth2/{{$key}}">
<img
alt="{{$provider.DisplayName}}{{if eq $provider.Name "openidConnect"}} ({{$key}}){{end}}"
title="{{$provider.DisplayName}}{{if eq $provider.Name "openidConnect"}} ({{$key}}){{end}}"
class="{{$provider.Name}}"
src="{{AppSubUrl}}{{$provider.Image}}"
onclick="window.onOAuthLoginClick()"
></a>
{{end}}
<div class="center aligned field">
<button class="fluid large ui blue button">
{{if .LinkAccountMode}}
{{.i18n.Tr "auth.oauth_signin_submit"}}
{{else}}
{{.i18n.Tr "sign_in"}}
{{end}}
</button>
</div>

{{if and .OrderedOAuth2Names .OAuth2Providers}}
<div class="ui centered grid">
<div class="sixteen wide mobile ten wide tablet ten wide computer column">
<div class="oauth2 center">
<div id="oauth2-login-loader" class="ui disabled centered loader"></div>
<div>
<div id="oauth2-login-navigator">
<p>{{.i18n.Tr "sign_in_with"}}</p>
{{range $key := .OrderedOAuth2Names}}
{{$provider := index $.OAuth2Providers $key}}
<a href="{{AppSubUrl}}/user/oauth2/{{$key}}">
<img
alt="{{$provider.DisplayName}}{{if eq $provider.Name "openidConnect"}} ({{$key}}){{end}}"
title="{{$provider.DisplayName}}{{if eq $provider.Name "openidConnect"}} ({{$key}}){{end}}"
class="{{$provider.Name}}"
src="{{AppSubUrl}}{{$provider.Image}}"
onclick="window.onOAuthLoginClick()"
></a>
{{end}}
</div>
</div>
</div>
</div>
</div>
{{end}}
</form>
</div>
</div>
</div>
{{end}}
</form>
</div>

+ 76
- 68
templates/user/auth/signup_inner.tmpl View File

@@ -1,77 +1,85 @@
<div class="user signup{{if .LinkAccountMode}} icon{{end}}">
<div class="ui middle very relaxed page grid">
<div class="column">
<form class="ui form" action="{{.SignUpLink}}" method="post">
{{.CsrfTokenHtml}}
<h3 class="ui top attached header">
{{if .LinkAccountMode}}
{{.i18n.Tr "auth.oauth_signup_title"}}
{{else}}
{{.i18n.Tr "sign_up"}}
{{end}}
</h3>
<div class="ui attached segment">
{{if or (not .LinkAccountMode) (and .LinkAccountMode .LinkAccountModeRegister)}}
{{template "base/alert" .}}
{{end}}
{{if .DisableRegistration}}
<p>{{.i18n.Tr "auth.disable_register_prompt"}}</p>
{{else}}
<div class="required inline field {{if and (.Err_UserName) (or (not .LinkAccountMode) (and .LinkAccountMode .LinkAccountModeRegister))}}error{{end}}">
<label for="user_name">{{.i18n.Tr "username"}}</label>
<input id="user_name" name="user_name" value="{{.user_name}}" autofocus required>
</div>
<div class="required inline field {{if .Err_Email}}error{{end}}">
<label for="email">{{.i18n.Tr "email"}}</label>
<input id="email" name="email" type="email" value="{{.email}}" required>
</div>
<style>
.full.height{background-color: #F9F9F9;}
</style>

{{if not .DisablePassword}}
<div class="required inline field {{if and (.Err_Password) (or (not .LinkAccountMode) (and .LinkAccountMode .LinkAccountModeRegister))}}error{{end}}">
<label for="password">{{.i18n.Tr "password"}}</label>
<input id="password" name="password" type="password" value="{{.password}}" autocomplete="off" required>
</div>
<div class="required inline field {{if and (.Err_Password) (or (not .LinkAccountMode) (and .LinkAccountMode .LinkAccountModeRegister))}}error{{end}}">
<label for="retype">{{.i18n.Tr "re_type"}}</label>
<input id="retype" name="retype" type="password" value="{{.retype}}" autocomplete="off" required>
</div>
{{end}}
{{if and .EnableCaptcha (eq .CaptchaType "image")}}
<div class="inline field">
<label></label>
{{.Captcha.CreateHtml}}
</div>
<div class="required inline field {{if .Err_Captcha}}error{{end}}">
<label for="captcha">{{.i18n.Tr "captcha"}}</label>
<input id="captcha" name="captcha" value="{{.captcha}}" autocomplete="off">
</div>
{{end}}
{{if and .EnableCaptcha (eq .CaptchaType "recaptcha")}}
<div class="inline field required">
<div class="g-recaptcha" data-sitekey="{{ .RecaptchaSitekey }}"></div>
</div>
<div class="ui container very padded {{if .LinkAccountMode}} icon{{end}}" style=" padding-top: 5.0rem; padding-bottom: 3.0rem;">
<div class="ui raised very padded text container segment">
<div class="ui centered grid">
<div class="sixteen wide mobile ten wide tablet ten wide computer column">
<div class="ui bottom aligned two column grid">
<div class="column">
<h2 class="ui header">
{{if .LinkAccountMode}}
{{.i18n.Tr "auth.oauth_signup_title"}}
{{else}}
{{.i18n.Tr "sign_up"}}
{{end}}
</h2>
</div>
{{if not .LinkAccountMode}}
<div class="ui right floated column">
<a href="{{AppSubUrl}}/user/login">{{.i18n.Tr "auth.register_helper_msg"}}</a>
</div>
{{end}}
</div>
<div class="ui grid">
<div class="column">
<form class="ui form" action="{{.SignUpLink}}" method="post">
{{.CsrfTokenHtml}}
{{if or (not .LinkAccountMode) (and .LinkAccountMode .LinkAccountModeRegister)}}
{{template "base/alert" .}}
{{end}}
{{if .DisableRegistration}}
<p>{{.i18n.Tr "auth.disable_register_prompt"}}</p>
{{else}}
<div class="field {{if and (.Err_UserName) (or (not .LinkAccountMode) (and .LinkAccountMode .LinkAccountModeRegister))}}error{{end}}">
<input id="user_name" name="user_name" value="{{.user_name}}" placeholder="{{.i18n.Tr "username"}}" autofocus required>
</div>
<div class="field {{if .Err_Email}}error{{end}}">
<input id="email" name="email" type="email" value="{{.email}}" placeholder="{{.i18n.Tr "email"}}" required>
</div>

<div class="inline field">
<label></label>
<button class="ui green button">
{{if .LinkAccountMode}}
{{.i18n.Tr "auth.oauth_signup_submit"}}
{{else}}
{{.i18n.Tr "auth.create_new_account"}}
{{if not .DisablePassword}}
<div class="field {{if and (.Err_Password) (or (not .LinkAccountMode) (and .LinkAccountMode .LinkAccountModeRegister))}}error{{end}}">
<input id="password" name="password" type="password" value="{{.password}}" placeholder="{{.i18n.Tr "password"}}" autocomplete="off" required>
</div>
<div class="field {{if and (.Err_Password) (or (not .LinkAccountMode) (and .LinkAccountMode .LinkAccountModeRegister))}}error{{end}}">
<input id="retype" name="retype" type="password" value="{{.retype}}" placeholder="{{.i18n.Tr "re_type"}}" autocomplete="off" required>
</div>
{{end}}
{{if and .EnableCaptcha (eq .CaptchaType "image")}}
<div class="field">
{{.Captcha.CreateHtml}}
</div>
<div class="field {{if .Err_Captcha}}error{{end}}">
<input id="captcha" name="captcha" value="{{.captcha}}" placeholder="{{.i18n.Tr "captcha"}}" autocomplete="off">
</div>
{{end}}
{{if and .EnableCaptcha (eq .CaptchaType "recaptcha")}}
<div class="field required">
<div class="g-recaptcha" data-sitekey="{{ .RecaptchaSitekey }}"></div>
</div>
{{end}}
</button>
</div>
<div class="ui hidden divider"></div>

{{if not .LinkAccountMode}}
<div class="inline field">
<label></label>
<a href="{{AppSubUrl}}/user/login">{{.i18n.Tr "auth.register_helper_msg"}}</a>
</div>
{{end}}
{{end}}
<div class="center aligned field">
<button class="fluid large ui blue button">
{{if .LinkAccountMode}}
{{.i18n.Tr "auth.oauth_signup_submit"}}
{{else}}
{{.i18n.Tr "auth.create_new_account"}}
{{end}}
</button>
</div>
{{end}}
</form>
</div>
</div>
</form>
</div>
</div>
</div>
</div>

+ 1
- 2
templates/user/dashboard/navbar.tmpl View File

@@ -1,5 +1,5 @@
<div class="dashboard-navbar">
<div class="ui secondary stackable menu">
<div class="ui container secondary stackable menu">
<div class="item">
<div class="ui floating dropdown link jump">
<span class="text">
@@ -57,4 +57,3 @@
{{end}}
</div>
</div>
<div class="ui divider"></div>

+ 2
- 2
templates/user/profile.tmpl View File

@@ -131,8 +131,8 @@
{{else if eq .TabName "followers"}}
{{template "repo/user_cards" .}}
{{else if eq .TabName "datasets"}}
{{template "datasets/dataset_search" .}}
{{template "datasets/dataset_list" .}}
{{template "explore/dataset_search" .}}
{{template "explore/dataset_list" .}}
{{template "base/paginate" .}}
{{else}}
{{template "explore/repo_search" .}}


+ 69
- 0
web_src/js/index.js View File

@@ -1086,6 +1086,69 @@ async function initRepository() {
initReactionSelector();
}

// Datasets
if ($('.repository.dataset-list.view').length > 0) {
const editContentToggle = function () {
$('#dataset-content').toggle();
$('#dataset-content-edit').toggle();
$('#dataset-content input').focus();
return false;
};
$('[data-dataset-status]').on('click', function () {
const $this = $(this);
const $private = $this.data('private');
const $is_private = $this.data('is-private');
if ($is_private === $private) {
return;
}
const $uuid = $this.data('uuid');
$.post($this.data('url'), {
_csrf: $this.data('csrf'),
file: $uuid,
is_private: $private,
}).done((_data) => {
$(`[data-uuid='${$uuid}']`).removeClass('positive active');
$(`[data-uuid='${$uuid}']`).data('is-private', $private);
$this.addClass('positive active');
}).fail(() => {
window.location.reload();
});
});
$('[data-dataset-delete]').on('click', function () {
const $this = $(this);
$('#data-dataset-delete-modal').modal({
closable: false,
onApprove() {
$.post($this.data('remove-url'), {
_csrf: $this.data('csrf'),
file: $this.data('uuid')
}).done((_data) => {
$(`#${$this.data('uuid')}`).hide();
}).fail(() => {
window.location.reload();
});
}
}).modal('show');
});
$('[data-category-id]').on('click', function () {
const category = $(this).data('category-id');
$('#category').val(category);
$('#submit').click();
});
$('[data-task-id]').on('click', function () {
const task = $(this).data('task-id');
$('#task').val(task);
$('#submit').click();
});
$('[data-license-id]').on('click', function () {
const license = $(this).data('license-id');
$('#license').val(license);
$('#submit').click();
});
$('#dataset-edit').on('click', editContentToggle);
$('#cancel').on('click', editContentToggle);
}

// Diff
if ($('.repository.diff').length > 0) {
$('.diff-counter').each(function () {
@@ -2345,11 +2408,17 @@ $(document).ready(async () => {
timeout: 3600000,
previewTemplate,
init() {
this.on('sending', (_file, _xhr, formData) => {
formData.append('dataset_id', $dataset.data('dataset-id'));
});
this.on('success', (file, data) => {
filenameDict[file.name] = data.uuid;
const input = $(`<input id="${data.uuid}" name="files" type="hidden">`).val(data.uuid);
$('.files').append(input);
});
this.on('queuecomplete', () => {
window.location.realod();
});
this.on('removedfile', (file) => {
if (file.name in filenameDict) {
$(`#${filenameDict[file.name]}`).remove();


+ 21
- 0
web_src/less/_dataset.less View File

@@ -136,6 +136,27 @@
}
}
}
.item {
padding-top: 15px;
padding-bottom: 10px;
border-bottom: 1px dashed #aaaaaa;
}
.ui.grid>.row {
align-items: center;
}
.title {
font-size: 16px;
font-weight: bold;
margin: 0 6px;
}
}
.dataset-list {
.octicon-check {
padding-right: 8px;;
}
.hide {
display: none;
}
}
.ui.dataset.list {
.item {


Loading…
Cancel
Save