diff options
author | Alfredo Sumaran <alfredo@gitlab.com> | 2016-11-09 23:17:49 +0300 |
---|---|---|
committer | Fatih Acet <acetfatih@gmail.com> | 2016-11-10 17:53:34 +0300 |
commit | 6dbca36490bff0f2c1af4a323f0e76b8d971a4ab (patch) | |
tree | 3f432532eebc96168adf380b4d1b9d1826afa3b1 /app/assets/javascripts/merge_conflicts | |
parent | e9c66be12bf4c6e10f46dfed8f32c3fe7f093122 (diff) |
Fix Merge Conflicts app to make it work with Vue 2
Diffstat (limited to 'app/assets/javascripts/merge_conflicts')
-rw-r--r-- | app/assets/javascripts/merge_conflicts/components/parallel_conflict_lines.js.es6 | 17 |
1 files changed, 16 insertions, 1 deletions
diff --git a/app/assets/javascripts/merge_conflicts/components/parallel_conflict_lines.js.es6 b/app/assets/javascripts/merge_conflicts/components/parallel_conflict_lines.js.es6 index 083a836f92f..4ccbdcd6daa 100644 --- a/app/assets/javascripts/merge_conflicts/components/parallel_conflict_lines.js.es6 +++ b/app/assets/javascripts/merge_conflicts/components/parallel_conflict_lines.js.es6 @@ -7,7 +7,22 @@ props: { file: Object }, - mixins: [global.mergeConflicts.utils, global.mergeConflicts.actions] + mixins: [global.mergeConflicts.utils, global.mergeConflicts.actions], + template: ` + <table> + <tr class="line_holder parallel" v-for="section in file.parallelLines"> + <template v-for="line in section"> + <td class="diff-line-num header" :class="lineCssClass(line)" v-if="line.isHeader"></td> + <td class="line_content header" :class="lineCssClass(line)" v-if="line.isHeader"> + <strong>{{line.richText}}</strong> + <button class="btn" @click="handleSelected(file, line.id, line.section)">{{line.buttonTitle}}</button> + </td> + <td class="diff-line-num old_line" :class="lineCssClass(line)" v-if="!line.isHeader">{{line.lineNumber}}</td> + <td class="line_content parallel" :class="lineCssClass(line)" v-if="!line.isHeader" v-html="line.richText"></td> + </template> + </tr> + </table> + `, }); })(window.gl || (window.gl = {})); |