| @@ -107,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> | |||
| @@ -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> | |||
| @@ -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> | |||
| @@ -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" .}} | |||
| @@ -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> | |||
| @@ -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> | |||
| @@ -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" .}} | |||
| @@ -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> | |||
| <!--电脑、宽屏--> | |||
| @@ -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" .}} | |||
| @@ -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> | |||
| @@ -1 +0,0 @@ | |||
| <img class="ui mini image" src="/img/banner-qimen-4X3.jpg" style="width:100%;"> | |||
| @@ -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> | |||
| @@ -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" .}} | |||
| @@ -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> | |||
| @@ -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" .}} | |||
| @@ -5,6 +5,7 @@ import ( | |||
| "fmt" | |||
| "sort" | |||
| "code.gitea.io/gitea/modules/setting" | |||
| "code.gitea.io/gitea/modules/timeutil" | |||
| "xorm.io/builder" | |||
| ) | |||
| @@ -27,6 +28,7 @@ type Dataset struct { | |||
| 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"` | |||
| @@ -329,6 +331,10 @@ func GetOwnerDatasetByID(id int64, user *User) (*Dataset, error) { | |||
| return nil, errors.New("dataset not fount") | |||
| } | |||
| func (dataset *Dataset) Link() string { | |||
| return setting.AppSubURL + "/" + dataset.Repo.FullName() | |||
| } | |||
| func IncreaseDownloadCount(datasetID int64) error { | |||
| // Update download count. | |||
| if _, err := x.Exec("UPDATE `dataset` SET download_times=download_times+1 WHERE id=?", datasetID); err != nil { | |||
| @@ -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.GetDatasetAttachments(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") | |||
| } | |||
| @@ -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" | |||
| @@ -1012,18 +1011,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) | |||
| @@ -10,7 +10,7 @@ | |||
| {{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 .PageIsDataSets}}active{{end}}" href="{{AppSubUrl}}/explore/datasets">{{.i18n.Tr "datasets"}}</a> | |||
| {{if not .UnitIssuesGlobalDisabled}} | |||
| <a class="item {{if .PageIsIssues}}active{{end}}" href="{{AppSubUrl}}/issues">{{.i18n.Tr "issues"}}</a> | |||
| {{end}} | |||
| @@ -23,14 +23,14 @@ | |||
| <a class="item {{if .PageIsExplore}}active{{end}}" href="{{AppSubUrl}}/explore/repos">{{.i18n.Tr "explore"}}</a> | |||
| {{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 .PageIsDataSets}}active{{end}}" href="{{AppSubUrl}}/explore/datasets">{{.i18n.Tr "datasets"}}</a> | |||
| <a class="item {{if .PageIsExplore}}active{{end}}" href="{{AppSubUrl}}/explore/repos">{{.i18n.Tr "explore"}}</a> | |||
| {{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> | |||
| <a class="item {{if .PageIsDataSets}}active{{end}}" href="{{AppSubUrl}}/explore/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> | |||
| <a class="item {{if .PageIsDataSets}}active{{end}}" href="{{AppSubUrl}}/explore/datasets">{{.i18n.Tr "datasets"}}</a> | |||
| {{end}} | |||
| {{template "custom/extra_links" .}} | |||
| @@ -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" .}} | |||
| @@ -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> | |||
| @@ -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> | |||
| @@ -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" .}} | |||
| @@ -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/> | |||
| @@ -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" .}} | |||
| @@ -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" .}} | |||
| @@ -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="/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,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> | |||
| @@ -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" .}} | |||
| @@ -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> | |||
| <!--电脑、宽屏--> | |||
| @@ -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" .}} | |||
| @@ -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}} | |||
| @@ -0,0 +1 @@ | |||
| <img class="ui mini image" src="/img/banner-qimen-4X3.jpg" style="width:100%;"> | |||
| @@ -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> | |||
| @@ -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" .}} | |||
| @@ -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> | |||
| @@ -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" .}} | |||