Commit f39f5d2f authored by Kushal Pandya's avatar Kushal Pandya

Use ItemStatsValue Component, add `updatedAt` info for projects

parent 7a2f1073
<script> <script>
import tooltip from '../../vue_shared/directives/tooltip'; import icon from '~/vue_shared/components/icon.vue';
import timeAgoTooltip from '~/vue_shared/components/time_ago_tooltip.vue';
import { ITEM_TYPE, VISIBILITY_TYPE_ICON, GROUP_VISIBILITY_TYPE, PROJECT_VISIBILITY_TYPE } from '../constants'; import { ITEM_TYPE, VISIBILITY_TYPE_ICON, GROUP_VISIBILITY_TYPE, PROJECT_VISIBILITY_TYPE } from '../constants';
import itemStatsValue from './item_stats_value.vue';
export default { export default {
directives: { components: {
tooltip, icon,
timeAgoTooltip,
itemStatsValue,
}, },
props: { props: {
item: { item: {
...@@ -34,65 +38,47 @@ export default { ...@@ -34,65 +38,47 @@ export default {
<template> <template>
<div class="stats"> <div class="stats">
<span <item-stats-value
v-tooltip
v-if="isGroup" v-if="isGroup"
css-class="number-subgroups"
icon-name="folder"
:title="s__('Subgroups')" :title="s__('Subgroups')"
class="number-subgroups" :value=item.subgroupCount
data-placement="top" />
data-container="body"> <item-stats-value
<i
class="fa fa-folder"
aria-hidden="true"
/>
{{item.subgroupCount}}
</span>
<span
v-tooltip
v-if="isGroup" v-if="isGroup"
css-class="number-projects"
icon-name="bookmark"
:title="s__('Projects')" :title="s__('Projects')"
class="number-projects" :value=item.projectCount
data-placement="top" />
data-container="body"> <item-stats-value
<i
class="fa fa-bookmark"
aria-hidden="true"
/>
{{item.projectCount}}
</span>
<span
v-tooltip
v-if="isGroup" v-if="isGroup"
css-class="number-users"
icon-name="users"
:title="s__('Members')" :title="s__('Members')"
class="number-users" :value=item.memberCount
data-placement="top" />
data-container="body">
<i
class="fa fa-users"
aria-hidden="true"
/>
{{item.memberCount}}
</span>
<span <span
v-if="isProject" v-if="isProject"
class="project-stars"> class="project-stars">
<i <icon name="star"/>
class="fa fa-star" <span class="stat-value">{{item.starCount}}</span>
aria-hidden="true"
/>
{{item.starCount}}
</span> </span>
<span <item-stats-value
v-tooltip css-class="item-visibility"
tooltip-placement="left"
:icon-name="visibilityIcon"
:title="visibilityTooltip" :title="visibilityTooltip"
data-placement="left" />
data-container="body" <div
class="item-visibility"> class="last-updated"
<i v-if="isProject"
:class="visibilityIcon" >
class="fa" <time-ago-tooltip
aria-hidden="true" tooltip-placement="bottom"
:time="item.updatedAt"
/> />
</span> </div>
</div> </div>
</template> </template>
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