Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Jérome Perrin
gitlab-ce
Commits
4241c290
Commit
4241c290
authored
Oct 03, 2016
by
Phil Hughes
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add new issue form to lists
Closes #21219
parent
951431bc
Changes
5
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
89 additions
and
5 deletions
+89
-5
app/assets/javascripts/boards/components/board.js.es6
app/assets/javascripts/boards/components/board.js.es6
+7
-1
app/assets/javascripts/boards/components/board_list.js.es6
app/assets/javascripts/boards/components/board_list.js.es6
+5
-2
app/assets/javascripts/boards/components/board_new_issue.js.es6
...sets/javascripts/boards/components/board_new_issue.js.es6
+24
-0
app/assets/stylesheets/pages/boards.scss
app/assets/stylesheets/pages/boards.scss
+26
-0
app/views/projects/boards/components/_board.html.haml
app/views/projects/boards/components/_board.html.haml
+27
-2
No files found.
app/assets/javascripts/boards/components/board.js.es6
View file @
4241c290
...
@@ -21,7 +21,8 @@
...
@@ -21,7 +21,8 @@
},
},
data () {
data () {
return {
return {
filters: Store.state.filters
filters: Store.state.filters,
showIssueForm: false
};
};
},
},
watch: {
watch: {
...
@@ -33,6 +34,11 @@
...
@@ -33,6 +34,11 @@
deep: true
deep: true
}
}
},
},
methods: {
showNewIssueForm() {
this.showIssueForm = !this.showIssueForm;
}
},
ready () {
ready () {
const options = gl.issueBoards.getBoardSortableDefaultOptions({
const options = gl.issueBoards.getBoardSortableDefaultOptions({
disabled: this.disabled,
disabled: this.disabled,
...
...
app/assets/javascripts/boards/components/board_list.js.es6
View file @
4241c290
//= require ./board_card
//= require ./board_card
//= require ./board_new_issue
(() => {
(() => {
const Store = gl.issueBoards.BoardsStore;
const Store = gl.issueBoards.BoardsStore;
...
@@ -8,14 +9,16 @@
...
@@ -8,14 +9,16 @@
gl.issueBoards.BoardList = Vue.extend({
gl.issueBoards.BoardList = Vue.extend({
components: {
components: {
'board-card': gl.issueBoards.BoardCard
'board-card': gl.issueBoards.BoardCard,
'board-new-issue': gl.issueBoards.BoardNewIssue
},
},
props: {
props: {
disabled: Boolean,
disabled: Boolean,
list: Object,
list: Object,
issues: Array,
issues: Array,
loading: Boolean,
loading: Boolean,
issueLinkBase: String
issueLinkBase: String,
showIssueForm: Boolean
},
},
data () {
data () {
return {
return {
...
...
app/assets/javascripts/boards/components/board_new_issue.js.es6
0 → 100644
View file @
4241c290
(() => {
window.gl = window.gl || {};
gl.issueBoards.BoardNewIssue = Vue.extend({
props: {
showIssueForm: Boolean
},
data() {
return {
title: ''
};
},
methods: {
submit(e) {
e.preventDefault();
this.title = '';
},
cancel() {
this.showIssueForm = false;
}
}
});
})();
app/assets/stylesheets/pages/boards.scss
View file @
4241c290
...
@@ -233,3 +233,29 @@ lex
...
@@ -233,3 +233,29 @@ lex
margin-right
:
5px
;
margin-right
:
5px
;
}
}
}
}
.board-issue-count-holder
{
margin-top
:
-3px
;
.btn
{
line-height
:
12px
;
border-top-left-radius
:
0
;
border-bottom-left-radius
:
0
;
}
}
.board-issue-count
{
padding-right
:
10px
;
padding-left
:
10px
;
line-height
:
21px
;
border-radius
:
$border-radius-base
;
border-color
:
$border-color
;
border-style
:
solid
;
border-width
:
1px
1px
1px
1px
;
&
.has-btn
{
border-top-right-radius
:
0
;
border-bottom-right-radius
:
0
;
border-width
:
1px
0
1px
1px
;
}
}
app/views/projects/boards/components/_board.html.haml
View file @
4241c290
...
@@ -12,8 +12,15 @@
...
@@ -12,8 +12,15 @@
%header
.board-header
{
":class"
=>
"{ 'has-border': list.label }"
,
":style"
=>
"{ borderTopColor: (list.label ? list.label.color : null) }"
}
%header
.board-header
{
":class"
=>
"{ 'has-border': list.label }"
,
":style"
=>
"{ borderTopColor: (list.label ? list.label.color : null) }"
}
%h3
.board-title.js-board-handle
{
":class"
=>
"{ 'user-can-drag': (!disabled && !list.preset) }"
}
%h3
.board-title.js-board-handle
{
":class"
=>
"{ 'user-can-drag': (!disabled && !list.preset) }"
}
{{ list.title }}
{{ list.title }}
%span
.pull-right
{
"v-if"
=>
"list.type !== 'blank'"
}
.board-issue-count-holder.pull-right.clearfix
%span
.board-issue-count.pull-left
{
"v-if"
=>
"list.type !== 'blank'"
,
":class"
=>
"{ 'has-btn': list.type !== 'done' }"
}
{{ list.issuesSize }}
{{ list.issuesSize }}
-
if
can?
current_user
,
:create_issue
,
@project
%button
.btn.btn-small.btn-default.pull-right
{
type:
"button"
,
"@click"
=>
"showNewIssueForm"
,
"v-if"
=>
"list.type !== 'done'"
}
=
icon
(
"plus"
)
-
if
can?
(
current_user
,
:admin_list
,
@project
)
-
if
can?
(
current_user
,
:admin_list
,
@project
)
%board-delete
{
"inline-template"
=>
true
,
%board-delete
{
"inline-template"
=>
true
,
":list"
=>
"list"
,
":list"
=>
"list"
,
...
@@ -26,12 +33,30 @@
...
@@ -26,12 +33,30 @@
":issues"
=>
"list.issues"
,
":issues"
=>
"list.issues"
,
":loading"
=>
"list.loading"
,
":loading"
=>
"list.loading"
,
":disabled"
=>
"disabled"
,
":disabled"
=>
"disabled"
,
":show-issue-form.sync"
=>
"showIssueForm"
,
":issue-link-base"
=>
"issueLinkBase"
}
":issue-link-base"
=>
"issueLinkBase"
}
.board-list-loading.text-center
{
"v-if"
=>
"loading"
}
.board-list-loading.text-center
{
"v-if"
=>
"loading"
}
=
icon
(
"spinner spin"
)
=
icon
(
"spinner spin"
)
%ul
.board-list
{
"v-el:list"
=>
true
,
%ul
.board-list
{
"v-el:list"
=>
true
,
"v-show"
=>
"!loading"
,
"v-show"
=>
"!loading"
,
":data-board"
=>
"list.id"
}
":data-board"
=>
"list.id"
}
-
if
can?
current_user
,
:create_issue
,
@project
%board-new-issue
{
"inline-template"
=>
true
,
":show-issue-form.sync"
=>
"showIssueForm"
,
"v-if"
=>
"list.type !== 'done' && showIssueForm"
}
%li
.card
%form
{
"@submit"
=>
"submit($event)"
}
%label
.label-light
Title
%input
.form-control
{
type:
"text"
,
"v-model"
=>
"title"
}
.clearfix.prepend-top-10
%button
.btn.btn-success.pull-left
{
type:
"submit"
,
":disabled"
=>
"title === ''"
}
Submit issue
%button
.btn.btn-default.pull-right
{
type:
"button"
,
"@click"
=>
"cancel"
}
Cancel
=
render
"projects/boards/components/card"
=
render
"projects/boards/components/card"
%li
.board-list-count.text-center
{
"v-if"
=>
"showCount"
}
%li
.board-list-count.text-center
{
"v-if"
=>
"showCount"
}
=
icon
(
"spinner spin"
,
"v-show"
=>
"list.loadingMore"
)
=
icon
(
"spinner spin"
,
"v-show"
=>
"list.loadingMore"
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment