Commit 4d7c2014 authored by Douwe Maan's avatar Douwe Maan Committed by Fatih Acet

Don’t hardcode paths

parent add01596
......@@ -45,7 +45,7 @@ window.MergeConflictResolver = class MergeConflictResolver {
fetchData() {
const dp = this.dataProvider;
$.get('./conflicts.json')
$.get($('#conflicts').data('conflictsPath'))
.done((data) => {
dp.decorateData(this.vue, data);
})
......@@ -69,7 +69,7 @@ window.MergeConflictResolver = class MergeConflictResolver {
commit() {
this.vue.isSubmitting = true;
$.post('./resolve_conflicts', this.dataProvider.getCommitData())
$.post($('#conflicts').data('resolveConflictsPath'), this.dataProvider.getCommitData())
.done((data) => {
window.location.href = data.redirect_to;
})
......
......@@ -13,7 +13,8 @@
= render 'shared/issuable/sidebar', issuable: @merge_request
#conflicts{"v-cloak" => "true"}
#conflicts{"v-cloak" => "true", data: { conflicts_path: conflicts_namespace_project_merge_request_path(@merge_request.project.namespace, @merge_request.project, @merge_request, format: :json),
resolve_conflicts_path: resolve_conflicts_namespace_project_merge_request_path(@merge_request.project.namespace, @merge_request.project, @merge_request) } }
.loading{"v-if" => "isLoading"}
%i.fa.fa-spinner.fa-spin
......
......@@ -13,6 +13,4 @@
%span Commit conflict resolution
%a.fa.fa-spin.fa-spinner{":class" => "{'hidden': !isSubmitting}"}
/ FIXME: Hardcoded path
%a.btn.btn-cancel{"href" => "diffs"}
Cancel
= link_to "Cancel", namespace_project_merge_request_path(@merge_request.project.namespace, @merge_request.project, @merge_request), class: "btn btn-cancel"
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment