Commit 7d293b9f authored by Simon Knox's avatar Simon Knox

rename board form

parent fd0dc53f
...@@ -25,7 +25,7 @@ ...@@ -25,7 +25,7 @@
> >
</div> </div>
<div class="media append-bottom-10"> <div class="media append-bottom-10">
<label class="label-light media-body align-self-sm-center"> <label class="label-light media-body">
Board scope Board scope
</label> </label>
<button <button
...@@ -42,7 +42,10 @@ ...@@ -42,7 +42,10 @@
</p> </p>
<!-- TODO: if current_board_parent.issue_board_milestone_available?(current_user) --> <!-- TODO: if current_board_parent.issue_board_milestone_available?(current_user) -->
<div class="board-inner-container"> <form-block
title="Milestone"
defaultText="Any milestone"
>
<input <input
type="hidden" type="hidden"
id="board-milestone" id="board-milestone"
...@@ -53,8 +56,34 @@ ...@@ -53,8 +56,34 @@
:milestone-path="milestonePath" :milestone-path="milestonePath"
:select-milestone="selectMilestone"> :select-milestone="selectMilestone">
</board-milestone-select> </board-milestone-select>
</div> </form-block>
<form-block
title="Labels"
defaultText="Any label"
>
</form-block>
<form-block
title="Assignee"
defaultText="Any assignee"
:fieldName="'filter[assignee]'"
>
</form-block>
<form-block
title="Author"
defaultText="Any author"
:fieldName="'filter[author]'"
>
</form-block>
<form-block
title="Weight"
defaultText="Any weight"
:fieldName="'filter[weight]'"
>
</form-block>
</div> </div>
</form> </form>
</popup-dialog> </popup-dialog>
...@@ -65,6 +94,7 @@ ...@@ -65,6 +94,7 @@
import Vue from 'vue'; import Vue from 'vue';
import PopupDialog from '~/vue_shared/components/popup_dialog.vue'; import PopupDialog from '~/vue_shared/components/popup_dialog.vue';
import FormBlock from './form_block.vue';
import BoardMilestoneSelect from './milestone_select.vue'; import BoardMilestoneSelect from './milestone_select.vue';
window.gl = window.gl || {}; window.gl = window.gl || {};
...@@ -96,6 +126,7 @@ export default Vue.extend({ ...@@ -96,6 +126,7 @@ export default Vue.extend({
components: { components: {
BoardMilestoneSelect, BoardMilestoneSelect,
PopupDialog, PopupDialog,
FormBlock,
}, },
mounted() { mounted() {
if (this.currentBoard && Object.keys(this.currentBoard).length && this.currentPage !== 'new') { if (this.currentBoard && Object.keys(this.currentBoard).length && this.currentPage !== 'new') {
......
import Vue from 'vue'; import Vue from 'vue';
import BoardSelectorForm from './board_new_form.vue'; import BoardForm from './board_form.vue';
(() => { (() => {
window.gl = window.gl || {}; window.gl = window.gl || {};
...@@ -11,7 +11,7 @@ import BoardSelectorForm from './board_new_form.vue'; ...@@ -11,7 +11,7 @@ import BoardSelectorForm from './board_new_form.vue';
gl.issueBoards.BoardsSelector = Vue.extend({ gl.issueBoards.BoardsSelector = Vue.extend({
components: { components: {
'board-selector-form': BoardSelectorForm, 'board-form': BoardForm,
}, },
props: { props: {
currentBoard: { currentBoard: {
......
<template> <template>
<div class=""> <ul
<div class="media"> ref="list"
<label class="media-body">Milestone</label> class="dropdown-menu"
<a href="#" data-dropdown-trigger="#milestone-dropdown" ref="trigger"> >
Edit <slot name="items"></slot>
</a> </ul>
</div>
<div class="droplab-dropdown">
<div>
Current value
</div>
<ul
ref="list"
class="dropdown-menu"
>
<slot name="items"></slot>
</ul>
</div>
</div>
</template> </template>
<script> <script>
......
<template>
<div class="board-inner-container">
<div class="media">
<label class="media-body">{{ title }}</label>
<a href="#" @click.prevent="toggleEditing">
Edit
</a>
</div>
<div class="droplab-dropdown">
<div v-if="editing">
<input
v-if="fieldName"
:name="fieldName"
>
<slot></slot>
</div>
<div v-else>
{{ defaultText }}
</div>
</div>
</div>
</template>
<script>
export default {
props: {
defaultText: {
type: String,
required: true,
},
title: {
type: String,
required: true,
},
fieldName: {
type: String,
required: false,
},
},
data() {
return {
editing: false,
};
},
methods: {
toggleEditing() {
this.editing = !this.editing;
},
},
};
</script>
\ No newline at end of file
...@@ -48,7 +48,7 @@ export default { ...@@ -48,7 +48,7 @@ export default {
tabindex="-1" tabindex="-1"
> >
<div <div
class="modal-dialog modal-sm" class="modal-dialog modal-lg"
role="document" role="document"
> >
<div class="modal-content"> <div class="modal-content">
......
...@@ -35,6 +35,6 @@ ...@@ -35,6 +35,6 @@
%span.text-danger %span.text-danger
Delete board Delete board
%board-selector-form{ ":milestone-path" => "milestonePath", %board-form{ ":milestone-path" => "milestonePath",
":can-admin-board" => can?(current_user, :admin_board, parent), ":can-admin-board" => can?(current_user, :admin_board, parent),
"v-if" => "currentPage" } "v-if" => "currentPage" }
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