From d26d2497483b5ea4998350b6a03ee9a736e658da Mon Sep 17 00:00:00 2001 From: John Olheiser <42128690+jolheiser@users.noreply.github.com> Date: Tue, 19 Feb 2019 17:09:47 -0600 Subject: Minor UI tweaks (#5980) * Remove all CommitStatus when a repo is deleted Signed-off-by: jolheiser * Minor UI tweaks (#5782) Added 'No License' option Added link and octicon change for external issue trackers Reset password now notifies right away if the code is invalid Signed-off-by: jolheiser * More UI tweaks More info in PR * Generate stylesheet for arc-green * Make gofmt work * Change PR integration since the button is changed * Rebase * Generate stylesheet * UI updates Made the PR button a "basic" button Vertically centered the issue checkboxes Labels will update only once after modal is closed * Commit to reference related issues Resolves #5782 Resolves #5861 Addresses original question in #5993 * Change the comment wording since PR button is no longer little and green. * Revert changes that made Windows work * Regenerate stylesheet * Regenerate stylesheets * make generate-stylesheets * Update integration again, changed button style Signed-off-by: jolheiser * Added ID to PR button Changed integration to use the ID to avoid breaking in the future * Added missing semi-colons * Added back distinction between issue actions and filters (overlooked it before) Moved action button over next to other action dropdowns * Remove extra tab formatting in list.tmpl * Remove more formatting from GoLand * Replace hardcoded "No License" with i18n license helper. --- routers/repo/issue.go | 7 +++++++ routers/user/auth.go | 6 +++++- 2 files changed, 12 insertions(+), 1 deletion(-) (limited to 'routers') diff --git a/routers/repo/issue.go b/routers/repo/issue.go index 1843e00144..f0a6d1bd5f 100644 --- a/routers/repo/issue.go +++ b/routers/repo/issue.go @@ -291,6 +291,13 @@ func Issues(ctx *context.Context) { return } + perm, err := models.GetUserRepoPermission(ctx.Repo.Repository, ctx.User) + if err != nil { + ctx.ServerError("GetUserRepoPermission", err) + return + } + ctx.Data["CanWriteIssuesOrPulls"] = perm.CanWriteIssuesOrPulls(isPullList) + ctx.HTML(200, tplIssues) } diff --git a/routers/user/auth.go b/routers/user/auth.go index c86eb35403..fc4c358a9a 100644 --- a/routers/user/auth.go +++ b/routers/user/auth.go @@ -1185,7 +1185,11 @@ func ResetPasswd(ctx *context.Context) { return } ctx.Data["Code"] = code - ctx.Data["IsResetForm"] = true + + if u := models.VerifyUserActiveCode(code); u != nil { + ctx.Data["IsResetForm"] = true + } + ctx.HTML(200, tplResetPassword) } -- cgit v1.2.3