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
39fbd189
Commit
39fbd189
authored
Jan 31, 2017
by
Phil Hughes
Committed by
Fatih Acet
Feb 03, 2017
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixed bug with empty state showing after search
Fixed users href path being incorrect
parent
1b01386a
Changes
21
Hide whitespace changes
Inline
Side-by-side
Showing
21 changed files
with
48 additions
and
30 deletions
+48
-30
app/assets/javascripts/boards/boards_bundle.js.es6
app/assets/javascripts/boards/boards_bundle.js.es6
+1
-0
app/assets/javascripts/boards/components/board.js.es6
app/assets/javascripts/boards/components/board.js.es6
+2
-1
app/assets/javascripts/boards/components/board_card.js.es6
app/assets/javascripts/boards/components/board_card.js.es6
+2
-1
app/assets/javascripts/boards/components/board_list.js.es6
app/assets/javascripts/boards/components/board_list.js.es6
+1
-0
app/assets/javascripts/boards/components/board_sidebar.js.es6
...assets/javascripts/boards/components/board_sidebar.js.es6
+1
-1
app/assets/javascripts/boards/components/issue_card_inner.js.es6
...ets/javascripts/boards/components/issue_card_inner.js.es6
+5
-4
app/assets/javascripts/boards/components/modal/empty_state.js.es6
...ts/javascripts/boards/components/modal/empty_state.js.es6
+3
-3
app/assets/javascripts/boards/components/modal/footer.js.es6
app/assets/javascripts/boards/components/modal/footer.js.es6
+1
-2
app/assets/javascripts/boards/components/modal/header.js.es6
app/assets/javascripts/boards/components/modal/header.js.es6
+2
-2
app/assets/javascripts/boards/components/modal/index.js.es6
app/assets/javascripts/boards/components/modal/index.js.es6
+8
-2
app/assets/javascripts/boards/components/modal/list.js.es6
app/assets/javascripts/boards/components/modal/list.js.es6
+7
-4
app/assets/javascripts/boards/components/modal/tabs.js.es6
app/assets/javascripts/boards/components/modal/tabs.js.es6
+1
-1
app/assets/javascripts/boards/services/board_service.js.es6
app/assets/javascripts/boards/services/board_service.js.es6
+1
-1
app/assets/javascripts/boards/stores/boards_store.js.es6
app/assets/javascripts/boards/stores/boards_store.js.es6
+1
-4
app/assets/javascripts/boards/stores/modal_store.js.es6
app/assets/javascripts/boards/stores/modal_store.js.es6
+2
-1
app/helpers/boards_helper.rb
app/helpers/boards_helper.rb
+2
-1
app/views/projects/boards/_show.html.haml
app/views/projects/boards/_show.html.haml
+3
-1
app/views/projects/boards/components/_board.html.haml
app/views/projects/boards/components/_board.html.haml
+1
-0
app/views/projects/boards/components/_board_list.html.haml
app/views/projects/boards/components/_board_list.html.haml
+1
-0
app/views/projects/boards/components/_card.html.haml
app/views/projects/boards/components/_card.html.haml
+2
-1
spec/features/boards/add_issues_modal_spec.rb
spec/features/boards/add_issues_modal_spec.rb
+1
-0
No files found.
app/assets/javascripts/boards/boards_bundle.js.es6
View file @
39fbd189
...
@@ -44,6 +44,7 @@ $(() => {
...
@@ -44,6 +44,7 @@ $(() => {
boardId: $boardApp.dataset.boardId,
boardId: $boardApp.dataset.boardId,
disabled: $boardApp.dataset.disabled === 'true',
disabled: $boardApp.dataset.disabled === 'true',
issueLinkBase: $boardApp.dataset.issueLinkBase,
issueLinkBase: $boardApp.dataset.issueLinkBase,
rootPath: $boardApp.dataset.rootPath,
detailIssue: Store.detail
detailIssue: Store.detail
},
},
computed: {
computed: {
...
...
app/assets/javascripts/boards/components/board.js.es6
View file @
39fbd189
...
@@ -22,7 +22,8 @@
...
@@ -22,7 +22,8 @@
props: {
props: {
list: Object,
list: Object,
disabled: Boolean,
disabled: Boolean,
issueLinkBase: String
issueLinkBase: String,
rootPath: String,
},
},
data () {
data () {
return {
return {
...
...
app/assets/javascripts/boards/components/board_card.js.es6
View file @
39fbd189
...
@@ -18,7 +18,8 @@
...
@@ -18,7 +18,8 @@
issue: Object,
issue: Object,
issueLinkBase: String,
issueLinkBase: String,
disabled: Boolean,
disabled: Boolean,
index: Number
index: Number,
rootPath: String,
},
},
data () {
data () {
return {
return {
...
...
app/assets/javascripts/boards/components/board_list.js.es6
View file @
39fbd189
...
@@ -23,6 +23,7 @@
...
@@ -23,6 +23,7 @@
issues: Array,
issues: Array,
loading: Boolean,
loading: Boolean,
issueLinkBase: String,
issueLinkBase: String,
rootPath: String,
},
},
data () {
data () {
return {
return {
...
...
app/assets/javascripts/boards/components/board_sidebar.js.es6
View file @
39fbd189
...
@@ -65,7 +65,7 @@
...
@@ -65,7 +65,7 @@
gl.Subscription.bindAll('.subscription');
gl.Subscription.bindAll('.subscription');
},
},
components: {
components: {
'remove-btn'
: gl.issueBoards.RemoveIssueBtn,
removeBtn
: gl.issueBoards.RemoveIssueBtn,
},
},
});
});
})();
})();
app/assets/javascripts/boards/components/issue_card_inner.js.es6
View file @
39fbd189
...
@@ -7,7 +7,7 @@
...
@@ -7,7 +7,7 @@
gl.issueBoards.IssueCardInner = Vue.extend({
gl.issueBoards.IssueCardInner = Vue.extend({
props: [
props: [
'issue', 'issueLinkBase', 'list',
'issue', 'issueLinkBase', 'list',
'rootPath',
],
],
methods: {
methods: {
showLabel(label) {
showLabel(label) {
...
@@ -57,11 +57,11 @@
...
@@ -57,11 +57,11 @@
<span
<span
class="card-number"
class="card-number"
v-if="issue.id">
v-if="issue.id">
#{{
issue.id
}}
#{{
issue.id
}}
</span>
</span>
<a
<a
class="card-assignee has-tooltip"
class="card-assignee has-tooltip"
:href="issue.assignee.username"
:href="
rootPath +
issue.assignee.username"
:title="'Assigned to ' + issue.assignee.name"
:title="'Assigned to ' + issue.assignee.name"
v-if="issue.assignee"
v-if="issue.assignee"
data-container="body">
data-container="body">
...
@@ -69,7 +69,8 @@
...
@@ -69,7 +69,8 @@
class="avatar avatar-inline s20"
class="avatar avatar-inline s20"
:src="issue.assignee.avatar"
:src="issue.assignee.avatar"
width="20"
width="20"
height="20" />
height="20"
:alt="'Avatar for ' + issue.assignee.name" />
</a>
</a>
<button
<button
class="label color-label has-tooltip"
class="label color-label has-tooltip"
...
...
app/assets/javascripts/boards/components/modal/empty_state.js.es6
View file @
39fbd189
...
@@ -31,10 +31,10 @@
...
@@ -31,10 +31,10 @@
},
},
},
},
template: `
template: `
<
div
class="empty-state">
<
section
class="empty-state">
<div class="row">
<div class="row">
<div class="col-xs-12 col-sm-6 col-sm-push-6">
<div class="col-xs-12 col-sm-6 col-sm-push-6">
<
div class="svg-content" v-html="image"></div
>
<
aside class="svg-content" v-html="image"></aside
>
</div>
</div>
<div class="col-xs-12 col-sm-6 col-sm-pull-6">
<div class="col-xs-12 col-sm-6 col-sm-pull-6">
<div class="text-content">
<div class="text-content">
...
@@ -56,7 +56,7 @@
...
@@ -56,7 +56,7 @@
</div>
</div>
</div>
</div>
</div>
</div>
</
div
>
</
section
>
`,
`,
});
});
})();
})();
app/assets/javascripts/boards/components/modal/footer.js.es6
View file @
39fbd189
...
@@ -27,8 +27,7 @@
...
@@ -27,8 +27,7 @@
addIssues() {
addIssues() {
const list = this.selectedList;
const list = this.selectedList;
const selectedIssues = ModalStore.getSelectedIssues();
const selectedIssues = ModalStore.getSelectedIssues();
const issueIds = selectedIssues.filter(issue => issue.selected)
const issueIds = selectedIssues.map(issue => issue.globalId);
.map(issue => issue.globalId);
// Post the data to the backend
// Post the data to the backend
this.$http.post(this.bulkUpdatePath, {
this.$http.post(this.bulkUpdatePath, {
...
...
app/assets/javascripts/boards/components/modal/header.js.es6
View file @
39fbd189
...
@@ -41,10 +41,10 @@
...
@@ -41,10 +41,10 @@
</button>
</button>
</h2>
</h2>
</header>
</header>
<modal-tabs v-if="!loading && issues
.length
> 0"></modal-tabs>
<modal-tabs v-if="!loading && issues
Count
> 0"></modal-tabs>
<div
<div
class="add-issues-search append-bottom-10"
class="add-issues-search append-bottom-10"
v-if="activeTab == 'all' && !loading && issues
.length
> 0">
v-if="activeTab == 'all' && !loading && issues
Count
> 0">
<input
<input
placeholder="Search issues..."
placeholder="Search issues..."
class="form-control"
class="form-control"
...
...
app/assets/javascripts/boards/components/modal/index.js.es6
View file @
39fbd189
...
@@ -10,6 +10,7 @@
...
@@ -10,6 +10,7 @@
gl.issueBoards.IssuesModal = Vue.extend({
gl.issueBoards.IssuesModal = Vue.extend({
props: [
props: [
'blankStateImage', 'newIssuePath', 'bulkUpdatePath', 'issueLinkBase',
'blankStateImage', 'newIssuePath', 'bulkUpdatePath', 'issueLinkBase',
'rootPath',
],
],
data() {
data() {
return ModalStore.store;
return ModalStore.store;
...
@@ -57,6 +58,10 @@
...
@@ -57,6 +58,10 @@
});
});
this.loadingNewPage = false;
this.loadingNewPage = false;
if (!this.issuesCount) {
this.issuesCount = this.issues.length;
}
});
});
},
},
},
},
...
@@ -66,7 +71,7 @@
...
@@ -66,7 +71,7 @@
return this.selectedIssues.length > 0;
return this.selectedIssues.length > 0;
}
}
return this.issues
.length
> 0;
return this.issues
Count
> 0;
},
},
},
},
components: {
components: {
...
@@ -83,9 +88,10 @@
...
@@ -83,9 +88,10 @@
<modal-header></modal-header>
<modal-header></modal-header>
<modal-list
<modal-list
:issue-link-base="issueLinkBase"
:issue-link-base="issueLinkBase"
:root-path="rootPath"
v-if="!loading && showList"></modal-list>
v-if="!loading && showList"></modal-list>
<empty-state
<empty-state
v-if="(!loading && issues
.length
=== 0) || (activeTab === 'selected' && selectedIssues.length === 0)"
v-if="(!loading && issues
Count
=== 0) || (activeTab === 'selected' && selectedIssues.length === 0)"
:image="blankStateImage"
:image="blankStateImage"
:new-issue-path="newIssuePath"></empty-state>
:new-issue-path="newIssuePath"></empty-state>
<section
<section
...
...
app/assets/javascripts/boards/components/modal/list.js.es6
View file @
39fbd189
...
@@ -7,7 +7,7 @@
...
@@ -7,7 +7,7 @@
gl.issueBoards.ModalList = Vue.extend({
gl.issueBoards.ModalList = Vue.extend({
props: [
props: [
'issueLinkBase',
'issueLinkBase',
'rootPath',
],
],
data() {
data() {
return ModalStore.store;
return ModalStore.store;
...
@@ -97,7 +97,7 @@
...
@@ -97,7 +97,7 @@
issueCardInner: gl.issueBoards.IssueCardInner,
issueCardInner: gl.issueBoards.IssueCardInner,
},
},
template: `
template: `
<
div
<
section
class="add-issues-list add-issues-list-columns"
class="add-issues-list add-issues-list-columns"
ref="list">
ref="list">
<div
<div
...
@@ -110,16 +110,19 @@
...
@@ -110,16 +110,19 @@
@click="toggleIssue($event, issue)">
@click="toggleIssue($event, issue)">
<issue-card-inner
<issue-card-inner
:issue="issue"
:issue="issue"
:issue-link-base="issueLinkBase">
:issue-link-base="issueLinkBase"
:root-path="rootPath">
</issue-card-inner>
</issue-card-inner>
<span
<span
:aria-label="'Issue #' + issue.id + ' selected'"
aria-checked="true"
v-if="issue.selected"
v-if="issue.selected"
class="issue-card-selected text-center">
class="issue-card-selected text-center">
<i class="fa fa-check"></i>
<i class="fa fa-check"></i>
</span>
</span>
</div>
</div>
</div>
</div>
</
div
>
</
section
>
`,
`,
});
});
})();
})();
app/assets/javascripts/boards/components/modal/tabs.js.es6
View file @
39fbd189
...
@@ -24,7 +24,7 @@
...
@@ -24,7 +24,7 @@
@click.prevent="activeTab = 'all'">
@click.prevent="activeTab = 'all'">
<span>All issues</span>
<span>All issues</span>
<span class="badge">
<span class="badge">
{{ issues
.length
}}
{{ issues
Count
}}
</span>
</span>
</a>
</a>
</li>
</li>
...
...
app/assets/javascripts/boards/services/board_service.js.es6
View file @
39fbd189
...
@@ -13,7 +13,7 @@ class BoardService {
...
@@ -13,7 +13,7 @@ class BoardService {
generate: {
generate: {
method: 'POST',
method: 'POST',
url: `${root}/${boardId}/lists/generate.json`
url: `${root}/${boardId}/lists/generate.json`
}
,
}
});
});
this.issue = Vue.resource(`${root}/${boardId}/issues{/id}`, {});
this.issue = Vue.resource(`${root}/${boardId}/issues{/id}`, {});
this.issues = Vue.resource(`${root}/${boardId}/lists{/id}/issues`, {});
this.issues = Vue.resource(`${root}/${boardId}/lists{/id}/issues`, {});
...
...
app/assets/javascripts/boards/stores/boards_store.js.es6
View file @
39fbd189
...
@@ -115,9 +115,6 @@
...
@@ -115,9 +115,6 @@
},
},
updateFiltersUrl () {
updateFiltersUrl () {
history.pushState(null, null, `?${$.param(this.state.filters)}`);
history.pushState(null, null, `?${$.param(this.state.filters)}`);
},
}
modalSelectedCount() {
return this.modal.selectedIssues.length;
},
};
};
})();
})();
app/assets/javascripts/boards/stores/modal_store.js.es6
View file @
39fbd189
...
@@ -6,6 +6,7 @@
...
@@ -6,6 +6,7 @@
constructor() {
constructor() {
this.store = {
this.store = {
issues: [],
issues: [],
issuesCount: false,
selectedIssues: [],
selectedIssues: [],
showAddIssuesModal: false,
showAddIssuesModal: false,
activeTab: 'all',
activeTab: 'all',
...
@@ -19,7 +20,7 @@
...
@@ -19,7 +20,7 @@
}
}
selectedCount() {
selectedCount() {
return this.
store.selectedIssues.filter(issue => issue.selected
).length;
return this.
getSelectedIssues(
).length;
}
}
toggleIssue(issueObj) {
toggleIssue(issueObj) {
...
...
app/helpers/boards_helper.rb
View file @
39fbd189
...
@@ -6,7 +6,8 @@ module BoardsHelper
...
@@ -6,7 +6,8 @@ module BoardsHelper
endpoint:
namespace_project_boards_path
(
@project
.
namespace
,
@project
),
endpoint:
namespace_project_boards_path
(
@project
.
namespace
,
@project
),
board_id:
board
.
id
,
board_id:
board
.
id
,
disabled:
"
#{
!
can?
(
current_user
,
:admin_list
,
@project
)
}
"
,
disabled:
"
#{
!
can?
(
current_user
,
:admin_list
,
@project
)
}
"
,
issue_link_base:
namespace_project_issues_path
(
@project
.
namespace
,
@project
)
issue_link_base:
namespace_project_issues_path
(
@project
.
namespace
,
@project
),
root_path:
root_path
,
}
}
end
end
end
end
app/views/projects/boards/_show.html.haml
View file @
39fbd189
...
@@ -24,9 +24,11 @@
...
@@ -24,9 +24,11 @@
":list"
=>
"list"
,
":list"
=>
"list"
,
":disabled"
=>
"disabled"
,
":disabled"
=>
"disabled"
,
":issue-link-base"
=>
"issueLinkBase"
,
":issue-link-base"
=>
"issueLinkBase"
,
":root-path"
=>
"rootPath"
,
":key"
=>
"_uid"
}
":key"
=>
"_uid"
}
=
render
"projects/boards/components/sidebar"
=
render
"projects/boards/components/sidebar"
%board-add-issues-modal
{
"blank-state-image"
=>
render
(
'shared/empty_states/icons/issues.svg'
),
%board-add-issues-modal
{
"blank-state-image"
=>
render
(
'shared/empty_states/icons/issues.svg'
),
"new-issue-path"
=>
new_namespace_project_issue_path
(
@project
.
namespace
,
@project
),
"new-issue-path"
=>
new_namespace_project_issue_path
(
@project
.
namespace
,
@project
),
"bulk-update-path"
=>
bulk_update_namespace_project_issues_path
(
@project
.
namespace
,
@project
),
"bulk-update-path"
=>
bulk_update_namespace_project_issues_path
(
@project
.
namespace
,
@project
),
":issue-link-base"
=>
"issueLinkBase"
}
":issue-link-base"
=>
"issueLinkBase"
,
":root-path"
=>
"rootPath"
}
app/views/projects/boards/components/_board.html.haml
View file @
39fbd189
...
@@ -29,6 +29,7 @@
...
@@ -29,6 +29,7 @@
":loading"
=>
"list.loading"
,
":loading"
=>
"list.loading"
,
":disabled"
=>
"disabled"
,
":disabled"
=>
"disabled"
,
":issue-link-base"
=>
"issueLinkBase"
,
":issue-link-base"
=>
"issueLinkBase"
,
":root-path"
=>
"rootPath"
,
"ref"
=>
"board-list"
}
"ref"
=>
"board-list"
}
-
if
can?
(
current_user
,
:admin_list
,
@project
)
-
if
can?
(
current_user
,
:admin_list
,
@project
)
=
render
"projects/boards/components/blank_state"
=
render
"projects/boards/components/blank_state"
app/views/projects/boards/components/_board_list.html.haml
View file @
39fbd189
...
@@ -34,6 +34,7 @@
...
@@ -34,6 +34,7 @@
":list"
=>
"list"
,
":list"
=>
"list"
,
":issue"
=>
"issue"
,
":issue"
=>
"issue"
,
":issue-link-base"
=>
"issueLinkBase"
,
":issue-link-base"
=>
"issueLinkBase"
,
":root-path"
=>
"rootPath"
,
":disabled"
=>
"disabled"
,
":disabled"
=>
"disabled"
,
":key"
=>
"issue.id"
}
":key"
=>
"issue.id"
}
%li
.board-list-count.text-center
{
"v-if"
=>
"showCount"
}
%li
.board-list-count.text-center
{
"v-if"
=>
"showCount"
}
...
...
app/views/projects/boards/components/_card.html.haml
View file @
39fbd189
...
@@ -6,4 +6,5 @@
...
@@ -6,4 +6,5 @@
"@mouseup"
=>
"showIssue($event)"
}
"@mouseup"
=>
"showIssue($event)"
}
%issue-card-inner
{
":list"
=>
"list"
,
%issue-card-inner
{
":list"
=>
"list"
,
":issue"
=>
"issue"
,
":issue"
=>
"issue"
,
":issue-link-base"
=>
"issueLinkBase"
}
":issue-link-base"
=>
"issueLinkBase"
,
":root-path"
=>
"rootPath"
}
spec/features/boards/add_issues_modal_spec.rb
View file @
39fbd189
...
@@ -90,6 +90,7 @@ describe 'Issue Boards add issue modal', :feature, :js do
...
@@ -90,6 +90,7 @@ describe 'Issue Boards add issue modal', :feature, :js do
find
(
'.form-control'
).
native
.
send_keys
(
'testing search'
)
find
(
'.form-control'
).
native
.
send_keys
(
'testing search'
)
expect
(
page
).
not_to
have_selector
(
'.card'
)
expect
(
page
).
not_to
have_selector
(
'.card'
)
expect
(
page
).
not_to
have_content
(
"You haven't added any issues to your project yet"
)
end
end
end
end
end
end
...
...
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