summaryrefslogtreecommitdiff
path: root/app/helpers
diff options
context:
space:
mode:
authorDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>2015-12-04 15:12:03 +0100
committerDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>2015-12-04 15:12:03 +0100
commit238ca3e472a67d319521daa5aeab6455b4740cdb (patch)
tree58339af286437b2da8f64feea8883d0e734651ad /app/helpers
parent4de7f32c60ea1f61768f9e8b18c3dca3edae9fdb (diff)
parente5c865eebf95d58ed33ef3d86f7582aa2db9bb09 (diff)
downloadgitlab-ce-238ca3e472a67d319521daa5aeab6455b4740cdb.tar.gz
Merge remote-tracking branch 'origin/ui/issuable-form'
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
Diffstat (limited to 'app/helpers')
-rw-r--r--app/helpers/issues_helper.rb6
-rw-r--r--app/helpers/merge_requests_helper.rb11
2 files changed, 11 insertions, 6 deletions
diff --git a/app/helpers/issues_helper.rb b/app/helpers/issues_helper.rb
index da2e0db0653..931d52055f8 100644
--- a/app/helpers/issues_helper.rb
+++ b/app/helpers/issues_helper.rb
@@ -51,8 +51,10 @@ module IssuesHelper
end
def milestone_options(object)
- options_from_collection_for_select(object.project.milestones.active,
- 'id', 'title', object.milestone_id)
+ milestones = object.project.milestones.active.to_a
+ milestones.unshift(Milestone::None)
+
+ options_from_collection_for_select(milestones, 'id', 'title', object.milestone_id)
end
def issue_box_class(item)
diff --git a/app/helpers/merge_requests_helper.rb b/app/helpers/merge_requests_helper.rb
index b804d4f4e3b..7f3a61a5e38 100644
--- a/app/helpers/merge_requests_helper.rb
+++ b/app/helpers/merge_requests_helper.rb
@@ -49,18 +49,21 @@ module MergeRequestsHelper
source_project_id: @merge_request.source_project_id,
target_project_id: @merge_request.target_project_id,
source_branch: @merge_request.source_branch,
- target_branch: nil
- }
+ target_branch: @merge_request.target_branch,
+ },
+ change_branches: true
)
end
def source_branch_with_namespace(merge_request)
+ branch = link_to(merge_request.source_branch, namespace_project_commits_path(merge_request.source_project.namespace, merge_request.source_project, merge_request.source_branch))
+
if merge_request.for_fork?
namespace = link_to(merge_request.source_project_namespace,
project_path(merge_request.source_project))
- namespace + ":#{merge_request.source_branch}"
+ namespace + ":" + branch
else
- merge_request.source_branch
+ branch
end
end