From 603c7389b8e56740033e51b36b79e61136b46002 Mon Sep 17 00:00:00 2001 From: Unknwon Date: Wed, 4 Nov 2015 12:50:02 -0500 Subject: [PATCH] #1459 Dashboard issues lacks sorting --- README.md | 2 +- gogs.go | 2 +- public/css/gogs.css | 16 ++++++++++----- public/less/_dashboard.less | 18 ++++++++++++----- routers/user/home.go | 3 +++ templates/.VERSION | 2 +- templates/user/dashboard/issues.tmpl | 29 ++++++++++++++++++++++------ 7 files changed, 53 insertions(+), 19 deletions(-) diff --git a/README.md b/README.md index 59ba8e21a2..9b7d71c411 100644 --- a/README.md +++ b/README.md @@ -5,7 +5,7 @@ Gogs - Go Git Service [![Build Status](https://travis-ci.org/gogits/gogs.svg?bra ![](public/img/gogs-large-resize.png) -##### Current version: 0.6.24 Beta +##### Current version: 0.6.25 Beta diff --git a/gogs.go b/gogs.go index c903192b84..8fe723fbda 100644 --- a/gogs.go +++ b/gogs.go @@ -17,7 +17,7 @@ import ( "github.com/gogits/gogs/modules/setting" ) -const APP_VER = "0.6.24.1104 Beta" +const APP_VER = "0.6.25.1104 Beta" func init() { runtime.GOMAXPROCS(runtime.NumCPU()) diff --git a/public/css/gogs.css b/public/css/gogs.css index 8448d618fe..8c66cdb3f3 100755 --- a/public/css/gogs.css +++ b/public/css/gogs.css @@ -2554,17 +2554,23 @@ ol.linenums { height: 16px; vertical-align: middle; } +.dashboard.issues .filter.menu .item .text.truncate { + width: 85%; +} .dashboard.issues .filter.menu .item .floating.label { top: 7px; left: 90%; width: 15%; } -.dashboard.issues .filter.menu .item.active { - background-color: #4183c4; - color: #FFF; +.dashboard.issues .filter.menu .jump.item { + margin: 1px; + padding-right: 0; } -.dashboard.issues .filter.menu .item .text { - width: 85%; +.dashboard.issues .filter.menu .menu { + max-height: 300px; + overflow-x: auto; + right: 0!important; + left: auto!important; } .dashboard.issues .ui.right .head.menu { margin-top: -5px; diff --git a/public/less/_dashboard.less b/public/less/_dashboard.less index d1b194bdcb..19264b0953 100644 --- a/public/less/_dashboard.less +++ b/public/less/_dashboard.less @@ -17,6 +17,9 @@ .text { height: 16px; vertical-align: middle; + &.truncate { + width: 85%; + } } .floating.label { top: 7px; @@ -24,12 +27,17 @@ width: 15%; } } - .item.active { - background-color: #4183c4; - color: #FFF; + + // Sort + .jump.item { + margin: 1px; + padding-right: 0; } - .item .text { - width: 85%; + .menu { + max-height: 300px; + overflow-x: auto; + right: 0!important; + left: auto!important; } } .ui.right .head.menu { diff --git a/routers/user/home.go b/routers/user/home.go index 581bb0633c..c5c42694fa 100644 --- a/routers/user/home.go +++ b/routers/user/home.go @@ -156,6 +156,7 @@ func Issues(ctx *middleware.Context) { // Organization does not have view type and filter mode. var ( viewType string + sortType = ctx.Query("sort") filterMode = models.FM_ALL assigneeID int64 posterID int64 @@ -248,6 +249,7 @@ func Issues(ctx *middleware.Context) { Page: page, IsClosed: isShowClosed, IsPull: isPullList, + SortType: sortType, }) if err != nil { ctx.Handle(500, "Issues: %v", err) @@ -276,6 +278,7 @@ func Issues(ctx *middleware.Context) { ctx.Data["IssueStats"] = issueStats ctx.Data["ViewType"] = viewType + ctx.Data["SortType"] = sortType ctx.Data["RepoID"] = repoID ctx.Data["IsShowClosed"] = isShowClosed if isShowClosed { diff --git a/templates/.VERSION b/templates/.VERSION index fee1aa357c..f116ce5caa 100644 --- a/templates/.VERSION +++ b/templates/.VERSION @@ -1 +1 @@ -0.6.24.1104 Beta \ No newline at end of file +0.6.25.1104 Beta \ No newline at end of file diff --git a/templates/user/dashboard/issues.tmpl b/templates/user/dashboard/issues.tmpl index 092c2523c6..678dfecfc6 100644 --- a/templates/user/dashboard/issues.tmpl +++ b/templates/user/dashboard/issues.tmpl @@ -5,23 +5,23 @@