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
Tatuya Kamada
gitlab-ce
Commits
ae0049a8
Commit
ae0049a8
authored
Aug 02, 2016
by
Phil Hughes
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added blank state
parent
fcc88e52
Changes
11
Hide whitespace changes
Inline
Side-by-side
Showing
11 changed files
with
79 additions
and
10 deletions
+79
-10
app/assets/javascripts/boards/boards_bundle.js.es6
app/assets/javascripts/boards/boards_bundle.js.es6
+12
-1
app/assets/javascripts/boards/components/board.js.es6
app/assets/javascripts/boards/components/board.js.es6
+1
-1
app/assets/javascripts/boards/components/board_blank_state.js.es6
...ts/javascripts/boards/components/board_blank_state.js.es6
+14
-0
app/assets/javascripts/boards/components/board_delete.js.es6
app/assets/javascripts/boards/components/board_delete.js.es6
+1
-1
app/assets/javascripts/boards/components/board_list.js.es6
app/assets/javascripts/boards/components/board_list.js.es6
+1
-1
app/assets/javascripts/boards/stores/boards_store.js.es6
app/assets/javascripts/boards/stores/boards_store.js.es6
+3
-1
app/assets/javascripts/copy_to_clipboard.js
app/assets/javascripts/copy_to_clipboard.js
+6
-3
app/assets/stylesheets/pages/boards.scss
app/assets/stylesheets/pages/boards.scss
+24
-0
app/views/projects/boards/components/_blank_state.html.haml
app/views/projects/boards/components/_blank_state.html.haml
+14
-0
app/views/projects/boards/components/_board.html.haml
app/views/projects/boards/components/_board.html.haml
+2
-1
app/views/projects/boards/components/_card.html.haml
app/views/projects/boards/components/_card.html.haml
+1
-1
No files found.
app/assets/javascripts/boards/boards_bundle.js.es6
View file @
ae0049a8
...
...
@@ -17,7 +17,18 @@ $(function () {
ready: function () {
service.all()
.then((resp) => {
resp.json().forEach((board) => {
const boards = resp.json();
// Add blank state board
if (boards.length === 2) {
boards.splice(1, 0, {
id: 'blank',
title: 'Welcome to your Issue Board!',
index: 1
});
}
boards.forEach((board) => {
BoardsStore.new(board);
});
});
...
...
app/assets/javascripts/boards/components/board.js.es6
View file @
ae0049a8
...
...
@@ -37,4 +37,4 @@
});
Vue.component('board', Board)
}
()
);
}
)(
);
app/assets/javascripts/boards/components/board_blank_state.js.es6
0 → 100644
View file @
ae0049a8
(() => {
const BoardBlankState = Vue.extend({
methods: {
addDefaultLists: function () {
},
clearBlankState: function () {
BoardsStore.removeList('blank');
}
}
});
Vue.component('board-blank-state', BoardBlankState);
})();
app/assets/javascripts/boards/components/board_delete.js.es6
View file @
ae0049a8
...
...
@@ -15,4 +15,4 @@
});
Vue.component('board-delete', BoardDelete);
}
()
);
}
)(
);
app/assets/javascripts/boards/components/board_list.js.es6
View file @
ae0049a8
...
...
@@ -88,4 +88,4 @@
});
Vue.component('board-list', BoardList);
}
()
);
}
)(
);
app/assets/javascripts/boards/stores/boards_store.js.es6
View file @
ae0049a8
...
...
@@ -30,7 +30,9 @@
return list.id === id;
});
this.getDoneList().index = this.state.lists.length - 1;
if (id !== 'blank') {
this.getDoneList().index = this.state.lists.length - 1;
}
},
moveList: function (oldIndex, newIndex) {
const listFrom = _.find(this.state.lists, (list) => {
...
...
app/assets/javascripts/copy_to_clipboard.js
View file @
ae0049a8
...
...
@@ -34,9 +34,12 @@
$
(
function
()
{
var
clipboard
;
clipboard
=
new
Clipboard
(
'
[data-clipboard-target], [data-clipboard-text]
'
);
clipboard
.
on
(
'
success
'
,
genericSuccess
);
return
clipboard
.
on
(
'
error
'
,
genericError
);
if
(
$
(
'
body
'
).
attr
(
'
data-page
'
)
!==
'
projects:boards:index
'
)
{
clipboard
=
new
Clipboard
(
'
[data-clipboard-target], [data-clipboard-text]
'
);
clipboard
.
on
(
'
success
'
,
genericSuccess
);
return
clipboard
.
on
(
'
error
'
,
genericError
);
}
});
}).
call
(
this
);
app/assets/stylesheets/pages/boards.scss
View file @
ae0049a8
...
...
@@ -137,6 +137,30 @@
}
}
.board-blank-state
{
height
:
100%
;
padding
:
$gl-padding
;
background-color
:
#fff
;
}
.board-blank-state-list
{
list-style
:
none
;
>
li
:not
(
:last-child
)
{
margin-bottom
:
8px
;
}
.label-color
{
position
:
relative
;
top
:
2px
;
display
:
inline-block
;
width
:
16px
;
height
:
16px
;
margin-right
:
3px
;
border-radius
:
$border-radius-default
;
}
}
.board-list
{
flex
:
1
;
margin
:
0
;
...
...
app/views/projects/boards/components/_blank_state.html.haml
0 → 100644
View file @
ae0049a8
%board-blank-state
{
"inline-template"
=>
true
,
"v-if"
=>
"board.id == 'blank'"
}
.board-blank-state
%p
Add the following default lists to your Issue Board with one click:
%ul
.board-blank-state-list
%li
%span
.label-color
{
style:
"background-color: red;"
}
Development
%p
Starting out with the default set of lists will get you right on the way to making the most of your board.
%button
.btn.btn-create.btn-inverted.btn-block
{
type:
"button"
,
"@click"
=>
"addDefaultLists"
}
Add default lists
%button
.btn.btn-default.btn-block
{
type:
"button"
,
"@click"
=>
"clearBlankState"
}
Nevermind, i'll use my own
app/views/projects/boards/components/_board.html.haml
View file @
ae0049a8
...
...
@@ -14,6 +14,7 @@
=
icon
(
"search"
,
class:
"board-search-icon"
,
"v-show"
=>
"!query"
)
%button
.board-search-clear-btn
{
type:
"button"
,
role:
"button"
,
"aria-label"
=>
"Clear search"
,
"@click"
=>
"clearSearch"
,
"v-show"
=>
"query"
}
=
icon
(
"times"
,
class:
"board-search-clear"
)
%board-list
{
"inline-template"
=>
true
,
":board-id"
=>
"board.id"
,
":issues"
=>
"board.issues"
,
":disabled"
=>
"#{current_user.nil?}"
,
":query"
=>
"query"
,
":filters"
=>
"filters"
}
%board-list
{
"inline-template"
=>
true
,
"
v-if"
=>
"board.id != 'blank'"
,
"
:board-id"
=>
"board.id"
,
":issues"
=>
"board.issues"
,
":disabled"
=>
"#{current_user.nil?}"
,
":query"
=>
"query"
,
":filters"
=>
"filters"
}
%ul
.board-list
{
"v-el:list"
=>
true
,
":data-board"
=>
"boardId"
}
=
render
"projects/boards/components/card"
=
render
"projects/boards/components/blank_state"
app/views/projects/boards/components/_card.html.haml
View file @
ae0049a8
%li
.card
{
":data-issue"
=>
"issue.id"
,
"v-for"
=>
"issue in issues | filterBy query in 'title' | filterBy customFilter"
}
%li
.card
{
":data-issue"
=>
"issue.id"
,
"v-for"
=>
"issue in issues | filterBy query in 'title' | filterBy customFilter"
,
"track-by"
=>
"id"
}
%h4
.card-title
%a
{
href:
"#"
,
":title"
=>
"issue.title"
}
{{ issue.title }}
...
...
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