Commit 6d2a48d5 authored by Filipa Lacerda's avatar Filipa Lacerda

Merge branch 'move-boards-modal-empty-state-vue-component' into 'master'

Move boards modal EmptyState vue component

See merge request gitlab-org/gitlab-ce!20068
parents ec88d12b 77723e2f
import Vue from 'vue'; <script>
import ModalStore from '../../stores/modal_store'; import ModalStore from '../../stores/modal_store';
import modalMixin from '../../mixins/modal_mixins'; import modalMixin from '../../mixins/modal_mixins';
gl.issueBoards.ModalEmptyState = Vue.extend({ export default {
mixins: [modalMixin], mixins: [modalMixin],
props: { props: {
newIssuePath: { newIssuePath: {
...@@ -38,7 +38,10 @@ gl.issueBoards.ModalEmptyState = Vue.extend({ ...@@ -38,7 +38,10 @@ gl.issueBoards.ModalEmptyState = Vue.extend({
return obj; return obj;
}, },
}, },
template: ` };
</script>
<template>
<section class="empty-state"> <section class="empty-state">
<div class="row"> <div class="row">
<div class="col-12 col-md-6 order-md-last"> <div class="col-12 col-md-6 order-md-last">
...@@ -49,21 +52,22 @@ gl.issueBoards.ModalEmptyState = Vue.extend({ ...@@ -49,21 +52,22 @@ gl.issueBoards.ModalEmptyState = Vue.extend({
<h4>{{ contents.title }}</h4> <h4>{{ contents.title }}</h4>
<p v-html="contents.content"></p> <p v-html="contents.content"></p>
<a <a
v-if="activeTab === 'all'"
:href="newIssuePath" :href="newIssuePath"
class="btn btn-success btn-inverted" class="btn btn-success btn-inverted"
v-if="activeTab === 'all'"> >
New issue New issue
</a> </a>
<button <button
type="button" v-if="activeTab === 'selected'"
class="btn btn-default" class="btn btn-default"
type="button"
@click="changeTab('all')" @click="changeTab('all')"
v-if="activeTab === 'selected'"> >
Open issues Open issues
</button> </button>
</div> </div>
</div> </div>
</div> </div>
</section> </section>
`, </template>
});
...@@ -6,15 +6,15 @@ import loadingIcon from '~/vue_shared/components/loading_icon.vue'; ...@@ -6,15 +6,15 @@ import loadingIcon from '~/vue_shared/components/loading_icon.vue';
import './header'; import './header';
import './list'; import './list';
import './footer'; import './footer';
import './empty_state'; import EmptyState from './empty_state.vue';
import ModalStore from '../../stores/modal_store'; import ModalStore from '../../stores/modal_store';
gl.issueBoards.IssuesModal = Vue.extend({ gl.issueBoards.IssuesModal = Vue.extend({
components: { components: {
EmptyState,
'modal-header': gl.issueBoards.ModalHeader, 'modal-header': gl.issueBoards.ModalHeader,
'modal-list': gl.issueBoards.ModalList, 'modal-list': gl.issueBoards.ModalList,
'modal-footer': gl.issueBoards.ModalFooter, 'modal-footer': gl.issueBoards.ModalFooter,
'empty-state': gl.issueBoards.ModalEmptyState,
loadingIcon, loadingIcon,
}, },
props: { props: {
......
---
title: Move boards modal EmptyState vue component
merge_request: 20068
author: George Tsiolis
type: performance
...@@ -136,7 +136,7 @@ if (process.env.BABEL_ENV === 'coverage') { ...@@ -136,7 +136,7 @@ if (process.env.BABEL_ENV === 'coverage') {
// exempt these files from the coverage report // exempt these files from the coverage report
const troubleMakers = [ const troubleMakers = [
'./blob_edit/blob_bundle.js', './blob_edit/blob_bundle.js',
'./boards/components/modal/empty_state.js', './boards/components/modal/empty_state.vue',
'./boards/components/modal/footer.js', './boards/components/modal/footer.js',
'./boards/components/modal/header.js', './boards/components/modal/header.js',
'./cycle_analytics/cycle_analytics_bundle.js', './cycle_analytics/cycle_analytics_bundle.js',
......
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