Commit ae3abc38 authored by Tim Zallmann's avatar Tim Zallmann

Re added The Web IDE Button

parent 38d56a8b
<script> <script>
import tooltip from '~/vue_shared/directives/tooltip'; import tooltip from '~/vue_shared/directives/tooltip';
import { n__ } from '~/locale'; import { n__ } from '~/locale';
import icon from '~/vue_shared/components/icon.vue'; import icon from '~/vue_shared/components/icon.vue';
import clipboardButton from '~/vue_shared/components/clipboard_button.vue'; import clipboardButton from '~/vue_shared/components/clipboard_button.vue';
export default { export default {
name: 'MRWidgetHeader', name: 'MRWidgetHeader',
directives: { directives: {
tooltip, tooltip,
...@@ -41,13 +41,16 @@ ...@@ -41,13 +41,16 @@
isTargetBranchLong() { isTargetBranchLong() {
return this.isBranchTitleLong(this.mr.targetBranch); return this.isBranchTitleLong(this.mr.targetBranch);
}, },
webIdePath() {
return `${gon.relative_url_root}/-/ide/project${this.mr.statusPath.replace('.json', '')}`;
},
}, },
methods: { methods: {
isBranchTitleLong(branchTitle) { isBranchTitleLong(branchTitle) {
return branchTitle.length > 32; return branchTitle.length > 32;
}, },
}, },
}; };
</script> </script>
<template> <template>
<div class="mr-source-target"> <div class="mr-source-target">
...@@ -96,6 +99,14 @@ ...@@ -96,6 +99,14 @@
</div> </div>
<div v-if="mr.isOpen"> <div v-if="mr.isOpen">
<a
:disabled="mr.sourceBranchRemoved"
:href="webIdePath"
class="btn btn-sm btn-default inline js-web-ide"
type="button"
>
{{ s__("mrWidget|Open in Web IDE") }}
</a>
<button <button
data-target="#modal_merge_info" data-target="#modal_merge_info"
data-toggle="modal" data-toggle="modal"
......
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