|
|
@ -17,9 +17,10 @@ import ( |
|
|
|
) |
|
|
|
|
|
|
|
const ( |
|
|
|
HOME base.TplName = "home" |
|
|
|
EXPLORE_REPOS base.TplName = "explore/repos" |
|
|
|
EXPLORE_USERS base.TplName = "explore/users" |
|
|
|
HOME base.TplName = "home" |
|
|
|
EXPLORE_REPOS base.TplName = "explore/repos" |
|
|
|
EXPLORE_USERS base.TplName = "explore/users" |
|
|
|
EXPLORE_ORGANIZATIONS base.TplName = "explore/organizations" |
|
|
|
) |
|
|
|
|
|
|
|
func Home(ctx *context.Context) { |
|
|
@ -180,6 +181,21 @@ func ExploreUsers(ctx *context.Context) { |
|
|
|
}) |
|
|
|
} |
|
|
|
|
|
|
|
func ExploreOrganizations(ctx *context.Context) { |
|
|
|
ctx.Data["Title"] = ctx.Tr("explore") |
|
|
|
ctx.Data["PageIsExplore"] = true |
|
|
|
ctx.Data["PageIsExploreOrganizations"] = true |
|
|
|
|
|
|
|
RenderUserSearch(ctx, &UserSearchOptions{ |
|
|
|
Type: models.USER_TYPE_ORGANIZATION, |
|
|
|
Counter: models.CountOrganizations, |
|
|
|
Ranger: models.Organizations, |
|
|
|
PageSize: setting.UI.ExplorePagingNum, |
|
|
|
OrderBy: "updated_unix DESC", |
|
|
|
TplName: EXPLORE_ORGANIZATIONS, |
|
|
|
}) |
|
|
|
} |
|
|
|
|
|
|
|
func NotFound(ctx *context.Context) { |
|
|
|
ctx.Data["Title"] = "Page Not Found" |
|
|
|
ctx.Handle(404, "home.NotFound", nil) |
|
|
|