From ed2c6571a8f88c4f67cca5c3a0eaf253ac4abada Mon Sep 17 00:00:00 2001 From: Artur Galyamov Date: Wed, 31 Aug 2022 17:36:09 +0500 Subject: [PATCH] =?UTF-8?q?=D0=92=D1=8B=D0=B2=D0=B5=D0=B4=D0=B5=D0=BD?= =?UTF-8?q?=D0=B0=20=D0=B2=D0=BA=D0=BB=D0=B0=D0=B4=D0=BA=D0=B0=20=D0=BA?= =?UTF-8?q?=D0=BE=D0=BC=D0=BF=D0=B5=D1=82=D0=B5=D0=BD=D1=86=D0=B8=D0=B8=20?= =?UTF-8?q?=D0=B8=20=D0=BD=D0=B0=D1=81=D1=82=D1=80=D0=BE=D0=B5=D0=BD=20?= =?UTF-8?q?=D0=BC=D0=B0=D1=80=D1=88=D1=80=D1=83=D1=82=20=D0=B4=D0=BB=D1=8F?= =?UTF-8?q?=20=D0=B1=D1=83=D0=B4=D1=83=D1=89=D0=B5=D0=B3=D0=BE=20=D0=BF?= =?UTF-8?q?=D0=BE=D0=B8=D1=81=D0=BA=D0=B0=20=D0=BF=D0=BE=20=D0=BA=D0=BE?= =?UTF-8?q?=D0=BC=D0=BF=D0=B5=D1=82=D0=B5=D0=BD=D1=86=D0=B8=D1=8F=D0=BC=20?= =?UTF-8?q?#106?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- options/locale/locale_ru-RU.ini | 1 + routers/web/explore/competence.go | 22 ++++++++++++++++++++++ routers/web/web.go | 1 + templates/explore/competences.tmpl | 1 + templates/explore/navbar.tmpl | 3 +++ 5 files changed, 28 insertions(+) create mode 100644 routers/web/explore/competence.go create mode 100644 templates/explore/competences.tmpl 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 @@ +

Competences

diff --git a/templates/explore/navbar.tmpl b/templates/explore/navbar.tmpl index 5b1e6b5d06..8ab195895b 100644 --- a/templates/explore/navbar.tmpl +++ b/templates/explore/navbar.tmpl @@ -15,4 +15,7 @@ {{svg "octicon-code"}} {{.i18n.Tr "explore.code"}} {{end}} + + {{svg "octicon-book"}} {{.i18n.Tr "explore.competences"}} +