mirror of
https://github.com/go-gitea/gitea.git
synced 2026-07-31 20:58:59 +00:00
Backport #38627 Co-authored-by: Sudhanshu Singh <sudhanshuwriterblc@gmail.com>
This commit is contained in:
@@ -35,7 +35,11 @@ func AddDependency(ctx *context.Context) {
|
||||
}
|
||||
|
||||
// Redirect
|
||||
defer ctx.Redirect(issue.Link())
|
||||
defer func() {
|
||||
if !ctx.Written() {
|
||||
ctx.Redirect(issue.Link())
|
||||
}
|
||||
}()
|
||||
|
||||
// Dependency
|
||||
dep, err := issues_model.GetIssueByID(ctx, depID)
|
||||
@@ -152,6 +156,7 @@ func RemoveDependency(ctx *context.Context) {
|
||||
if err = issues_model.RemoveIssueDependency(ctx, ctx.Doer, issue, dep, depType); err != nil {
|
||||
if issues_model.IsErrDependencyNotExists(err) {
|
||||
ctx.Flash.Error(ctx.Tr("repo.issues.dependency.add_error_dep_not_exist"))
|
||||
ctx.Redirect(issue.Link())
|
||||
return
|
||||
}
|
||||
ctx.ServerError("RemoveIssueDependency", err)
|
||||
|
||||
@@ -645,6 +645,10 @@ td .commit-summary {
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.repository.view.issue .ui.depending .item.dependency {
|
||||
display: flex;
|
||||
}
|
||||
|
||||
.repository.view.issue .ui.depending .item.is-closed .issue-dependency-title {
|
||||
text-decoration: line-through;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user