2018-11-08 19:23:39 +05:30
|
|
|
<script>
|
2020-11-24 15:15:51 +05:30
|
|
|
import { GlIcon } from '@gitlab/ui';
|
2018-11-08 19:23:39 +05:30
|
|
|
|
|
|
|
export default {
|
|
|
|
components: {
|
2020-11-24 15:15:51 +05:30
|
|
|
GlIcon,
|
2018-11-08 19:23:39 +05:30
|
|
|
},
|
|
|
|
props: {
|
|
|
|
item: {
|
|
|
|
type: Object,
|
|
|
|
required: true,
|
|
|
|
},
|
|
|
|
currentId: {
|
|
|
|
type: String,
|
|
|
|
required: true,
|
|
|
|
},
|
|
|
|
currentProjectId: {
|
|
|
|
type: String,
|
|
|
|
required: true,
|
|
|
|
},
|
|
|
|
},
|
|
|
|
computed: {
|
|
|
|
isActive() {
|
|
|
|
return (
|
|
|
|
this.item.iid === parseInt(this.currentId, 10) &&
|
|
|
|
this.currentProjectId === this.item.projectPathWithNamespace
|
|
|
|
);
|
|
|
|
},
|
|
|
|
pathWithID() {
|
|
|
|
return `${this.item.projectPathWithNamespace}!${this.item.iid}`;
|
|
|
|
},
|
2018-11-18 11:00:15 +05:30
|
|
|
mergeRequestHref() {
|
|
|
|
const path = `/project/${this.item.projectPathWithNamespace}/merge_requests/${this.item.iid}`;
|
|
|
|
|
2020-06-23 00:09:42 +05:30
|
|
|
return this.$router.resolve(path).href;
|
2018-11-08 19:23:39 +05:30
|
|
|
},
|
|
|
|
},
|
|
|
|
};
|
|
|
|
</script>
|
|
|
|
|
|
|
|
<template>
|
2019-02-15 15:39:39 +05:30
|
|
|
<a :href="mergeRequestHref" class="btn-link d-flex align-items-center">
|
2020-07-28 23:09:34 +05:30
|
|
|
<span class="d-flex gl-mr-3 ide-search-list-current-icon">
|
2021-09-30 23:02:18 +05:30
|
|
|
<gl-icon v-if="isActive" :size="16" name="mobile-issue-close" />
|
2018-11-08 19:23:39 +05:30
|
|
|
</span>
|
|
|
|
<span>
|
2019-02-15 15:39:39 +05:30
|
|
|
<strong> {{ item.title }} </strong>
|
|
|
|
<span class="ide-merge-request-project-path d-block mt-1"> {{ pathWithID }} </span>
|
2018-11-08 19:23:39 +05:30
|
|
|
</span>
|
2018-11-18 11:00:15 +05:30
|
|
|
</a>
|
2018-11-08 19:23:39 +05:30
|
|
|
</template>
|