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
1
Merge Requests
1
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
nexedi
gitlab-ce
Commits
b16780f7
Commit
b16780f7
authored
Nov 14, 2016
by
Phil Hughes
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixed issue boards when not logged in
parent
763a89a3
Changes
7
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
10 additions
and
6 deletions
+10
-6
app/models/issue.rb
app/models/issue.rb
+1
-1
app/views/projects/boards/components/_sidebar.html.haml
app/views/projects/boards/components/_sidebar.html.haml
+1
-1
app/views/projects/boards/components/sidebar/_assignee.html.haml
...ws/projects/boards/components/sidebar/_assignee.html.haml
+1
-1
app/views/projects/boards/components/sidebar/_due_date.html.haml
...ws/projects/boards/components/sidebar/_due_date.html.haml
+1
-1
app/views/projects/boards/components/sidebar/_labels.html.haml
...iews/projects/boards/components/sidebar/_labels.html.haml
+1
-1
app/views/projects/boards/components/sidebar/_milestone.html.haml
...s/projects/boards/components/sidebar/_milestone.html.haml
+1
-1
spec/features/boards/boards_spec.rb
spec/features/boards/boards_spec.rb
+4
-0
No files found.
app/models/issue.rb
View file @
b16780f7
...
@@ -266,7 +266,7 @@ class Issue < ActiveRecord::Base
...
@@ -266,7 +266,7 @@ class Issue < ActiveRecord::Base
def
as_json
(
options
=
{})
def
as_json
(
options
=
{})
super
(
options
).
tap
do
|
json
|
super
(
options
).
tap
do
|
json
|
json
[
:subscribed
]
=
subscribed?
(
options
[
:user
])
if
options
.
has_key?
(
:user
)
json
[
:subscribed
]
=
subscribed?
(
options
[
:user
])
if
options
.
has_key?
(
:user
)
&&
options
[
:user
]
if
options
.
has_key?
(
:labels
)
if
options
.
has_key?
(
:labels
)
json
[
:labels
]
=
labels
.
as_json
(
json
[
:labels
]
=
labels
.
as_json
(
...
...
app/views/projects/boards/components/_sidebar.html.haml
View file @
b16780f7
%board-sidebar
{
"inline-template"
=>
true
,
%board-sidebar
{
"inline-template"
=>
true
,
":current-user"
=>
"#{current_user
.to_json(only: [:username, :id, :name], methods: [:avatar_url]) if current_user
}"
}
":current-user"
=>
"#{current_user
? current_user.to_json(only: [:username, :id, :name], methods: [:avatar_url]) : {}
}"
}
%aside
.right-sidebar.right-sidebar-expanded.issue-boards-sidebar
{
"v-show"
=>
"showSidebar"
}
%aside
.right-sidebar.right-sidebar-expanded.issue-boards-sidebar
{
"v-show"
=>
"showSidebar"
}
.issuable-sidebar
.issuable-sidebar
.block.issuable-sidebar-header
.block.issuable-sidebar-header
...
...
app/views/projects/boards/components/sidebar/_assignee.html.haml
View file @
b16780f7
.block.assignee
.block.assignee
.title.hide-collapsed
.title.hide-collapsed
Assignee
Assignee
=
icon
(
"spinner spin"
,
class:
"block-loading"
)
-
if
can?
(
current_user
,
:admin_issue
,
@project
)
-
if
can?
(
current_user
,
:admin_issue
,
@project
)
=
icon
(
"spinner spin"
,
class:
"block-loading"
)
=
link_to
"Edit"
,
"#"
,
class:
"edit-link pull-right"
=
link_to
"Edit"
,
"#"
,
class:
"edit-link pull-right"
.value.hide-collapsed
.value.hide-collapsed
%span
.assign-yourself.no-value
{
"v-if"
=>
"!issue.assignee"
}
%span
.assign-yourself.no-value
{
"v-if"
=>
"!issue.assignee"
}
...
...
app/views/projects/boards/components/sidebar/_due_date.html.haml
View file @
b16780f7
.block.due_date
.block.due_date
.title
.title
Due date
Due date
=
icon
(
"spinner spin"
,
class:
"block-loading"
)
-
if
can?
(
current_user
,
:admin_issue
,
@project
)
-
if
can?
(
current_user
,
:admin_issue
,
@project
)
=
icon
(
"spinner spin"
,
class:
"block-loading"
)
=
link_to
"Edit"
,
"#"
,
class:
"edit-link pull-right"
=
link_to
"Edit"
,
"#"
,
class:
"edit-link pull-right"
.value
.value
.value-content
.value-content
...
...
app/views/projects/boards/components/sidebar/_labels.html.haml
View file @
b16780f7
.block.labels
.block.labels
.title
.title
Labels
Labels
=
icon
(
"spinner spin"
,
class:
"block-loading"
)
-
if
can?
(
current_user
,
:admin_issue
,
@project
)
-
if
can?
(
current_user
,
:admin_issue
,
@project
)
=
icon
(
"spinner spin"
,
class:
"block-loading"
)
=
link_to
"Edit"
,
"#"
,
class:
"edit-link pull-right"
=
link_to
"Edit"
,
"#"
,
class:
"edit-link pull-right"
.value.issuable-show-labels
.value.issuable-show-labels
%span
.no-value
{
"v-if"
=>
"issue.labels && issue.labels.length === 0"
}
%span
.no-value
{
"v-if"
=>
"issue.labels && issue.labels.length === 0"
}
...
...
app/views/projects/boards/components/sidebar/_milestone.html.haml
View file @
b16780f7
.block.milestone
.block.milestone
.title
.title
Milestone
Milestone
=
icon
(
"spinner spin"
,
class:
"block-loading"
)
-
if
can?
(
current_user
,
:admin_issue
,
@project
)
-
if
can?
(
current_user
,
:admin_issue
,
@project
)
=
icon
(
"spinner spin"
,
class:
"block-loading"
)
=
link_to
"Edit"
,
"#"
,
class:
"edit-link pull-right"
=
link_to
"Edit"
,
"#"
,
class:
"edit-link pull-right"
.value
.value
%span
.no-value
{
"v-if"
=>
"!issue.milestone"
}
%span
.no-value
{
"v-if"
=>
"!issue.milestone"
}
...
...
spec/features/boards/boards_spec.rb
View file @
b16780f7
...
@@ -659,6 +659,10 @@ describe 'Issue Boards', feature: true, js: true do
...
@@ -659,6 +659,10 @@ describe 'Issue Boards', feature: true, js: true do
wait_for_vue_resource
wait_for_vue_resource
end
end
it
'displays lists'
do
expect
(
page
).
to
have_selector
(
'.board'
)
end
it
'does not show create new list'
do
it
'does not show create new list'
do
expect
(
page
).
not_to
have_selector
(
'.js-new-board-list'
)
expect
(
page
).
not_to
have_selector
(
'.js-new-board-list'
)
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