diff --git a/options/locale/locale_ru-RU.ini b/options/locale/locale_ru-RU.ini index c7a318409c..27f9c4fa72 100644 --- a/options/locale/locale_ru-RU.ini +++ b/options/locale/locale_ru-RU.ini @@ -259,6 +259,7 @@ users=Пользователи organizations=Сообщества search=Поиск code=Файлы +competences=Компетенции search.fuzzy=Неточный search.match=Соответствие repo_no_results=Подходящие проекты не найдены. diff --git a/routers/web/explore/competence.go b/routers/web/explore/competence.go new file mode 100644 index 0000000000..d65ecc453d --- /dev/null +++ b/routers/web/explore/competence.go @@ -0,0 +1,22 @@ +package explore + +import ( + "code.gitea.io/gitea/modules/base" + "code.gitea.io/gitea/modules/context" + "code.gitea.io/gitea/modules/setting" + "net/http" +) + +const ( + tplExploreCompetences base.TplName = "explore/competences" +) + +func Competences(ctx *context.Context) { + ctx.Data["UsersIsDisabled"] = setting.Service.Explore.DisableUsersPage + ctx.Data["IsRepoIndexerEnabled"] = setting.Indexer.RepoIndexerEnabled + ctx.Data["Title"] = ctx.Tr("explore") + ctx.Data["PageIsExplore"] = true + ctx.Data["PageIsExploreCompetences"] = true + + ctx.HTML(http.StatusOK, tplExploreCompetences) +} diff --git a/routers/web/web.go b/routers/web/web.go index aa946dd343..1851333e92 100644 --- a/routers/web/web.go +++ b/routers/web/web.go @@ -254,6 +254,7 @@ func RegisterRoutes(m *web.Route) { m.Get("/users", explore.Users) m.Get("/organizations", explore.Organizations) m.Get("/code", explore.Code) + m.Get("/competences", explore.Competences) }, ignExploreSignIn) m.Group("/map", func() { m.Get("/umap", umap.UsersMap) diff --git a/templates/explore/competences.tmpl b/templates/explore/competences.tmpl new file mode 100644 index 0000000000..15bd99afda --- /dev/null +++ b/templates/explore/competences.tmpl @@ -0,0 +1 @@ +