2017-09-26 10:47:19 +00:00
|
|
|
<script>
|
2018-10-10 06:09:55 +00:00
|
|
|
import userAvatarImage from '../../vue_shared/components/user_avatar/user_avatar_image.vue';
|
|
|
|
import limitWarning from './limit_warning_component.vue';
|
|
|
|
import totalTime from './total_time_component.vue';
|
|
|
|
import icon from '../../vue_shared/components/icon.vue';
|
2017-09-26 10:47:19 +00:00
|
|
|
|
2018-10-10 06:09:55 +00:00
|
|
|
export default {
|
|
|
|
components: {
|
|
|
|
userAvatarImage,
|
|
|
|
totalTime,
|
|
|
|
limitWarning,
|
|
|
|
icon,
|
|
|
|
},
|
|
|
|
props: {
|
|
|
|
items: {
|
|
|
|
type: Array,
|
|
|
|
default: () => [],
|
2017-09-26 10:47:19 +00:00
|
|
|
},
|
2018-10-10 06:09:55 +00:00
|
|
|
stage: {
|
|
|
|
type: Object,
|
|
|
|
default: () => ({}),
|
2018-01-05 12:56:55 +00:00
|
|
|
},
|
2018-10-10 06:09:55 +00:00
|
|
|
},
|
|
|
|
};
|
2017-09-26 10:47:19 +00:00
|
|
|
</script>
|
|
|
|
<template>
|
|
|
|
<div>
|
|
|
|
<div class="events-description">
|
|
|
|
{{ stage.description }}
|
|
|
|
<limit-warning :count="items.length" />
|
|
|
|
</div>
|
|
|
|
<ul class="stage-event-list">
|
|
|
|
<li
|
|
|
|
v-for="(mergeRequest, i) in items"
|
|
|
|
:key="i"
|
2018-01-05 12:56:55 +00:00
|
|
|
class="stage-event-item"
|
|
|
|
>
|
2017-09-26 10:47:19 +00:00
|
|
|
<div class="item-details">
|
|
|
|
<!-- FIXME: Pass an alt attribute here for accessibility -->
|
2018-02-21 15:17:03 +00:00
|
|
|
<user-avatar-image :img-src="mergeRequest.author.avatarUrl" />
|
2017-09-26 10:47:19 +00:00
|
|
|
<h5 class="item-title merge-merquest-title">
|
|
|
|
<a :href="mergeRequest.url">
|
|
|
|
{{ mergeRequest.title }}
|
|
|
|
</a>
|
|
|
|
</h5>
|
2018-01-05 12:56:55 +00:00
|
|
|
<a
|
|
|
|
:href="mergeRequest.url"
|
|
|
|
class="issue-link"
|
|
|
|
>!{{ mergeRequest.iid }}</a>
|
2017-09-26 10:47:19 +00:00
|
|
|
·
|
|
|
|
<span>
|
|
|
|
{{ s__('OpenedNDaysAgo|Opened') }}
|
2018-01-05 12:56:55 +00:00
|
|
|
<a
|
|
|
|
:href="mergeRequest.url"
|
|
|
|
class="issue-date"
|
|
|
|
>{{ mergeRequest.createdAt }}</a>
|
2017-09-26 10:47:19 +00:00
|
|
|
</span>
|
|
|
|
<span>
|
|
|
|
{{ s__('ByAuthor|by') }}
|
2018-01-05 12:56:55 +00:00
|
|
|
<a
|
|
|
|
:href="mergeRequest.author.webUrl"
|
|
|
|
class="issue-author-link"
|
|
|
|
>{{ mergeRequest.author.name }}</a>
|
2017-09-26 10:47:19 +00:00
|
|
|
</span>
|
|
|
|
<template v-if="mergeRequest.state === 'closed'">
|
|
|
|
<span class="merge-request-state">
|
2018-01-05 12:56:55 +00:00
|
|
|
<i
|
|
|
|
class="fa fa-ban"
|
|
|
|
aria-hidden="true"
|
|
|
|
>
|
|
|
|
</i>
|
2017-09-26 10:47:19 +00:00
|
|
|
{{ mergeRequest.state.toUpperCase() }}
|
|
|
|
</span>
|
|
|
|
</template>
|
|
|
|
<template v-else>
|
2018-01-05 12:56:55 +00:00
|
|
|
<span
|
|
|
|
v-if="mergeRequest.branch"
|
2018-06-11 09:49:47 +00:00
|
|
|
class="merge-request-branch"
|
2018-01-05 12:56:55 +00:00
|
|
|
>
|
2017-12-06 18:38:35 +00:00
|
|
|
<icon
|
2018-01-05 12:56:55 +00:00
|
|
|
:size="16"
|
2018-06-11 09:49:47 +00:00
|
|
|
name="fork"
|
2018-01-05 12:56:55 +00:00
|
|
|
/>
|
2018-01-05 14:31:01 +00:00
|
|
|
<a :href="mergeRequest.branch.url">
|
2018-01-05 12:56:55 +00:00
|
|
|
{{ mergeRequest.branch.name }}
|
|
|
|
</a>
|
2017-09-26 10:47:19 +00:00
|
|
|
</span>
|
|
|
|
</template>
|
|
|
|
</div>
|
|
|
|
<div class="item-time">
|
2018-01-05 12:56:55 +00:00
|
|
|
<total-time :time="mergeRequest.totalTime" />
|
2017-09-26 10:47:19 +00:00
|
|
|
</div>
|
|
|
|
</li>
|
|
|
|
</ul>
|
|
|
|
</div>
|
|
|
|
</template>
|