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
97d4ac40
Commit
97d4ac40
authored
Jan 30, 2015
by
Jason Blanchard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Adds link to milestone and keeping resource context on smaller
viewports for issues and merge requests
parent
c0acb28c
Changes
8
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
37 additions
and
25 deletions
+37
-25
CHANGELOG
CHANGELOG
+1
-1
app/views/projects/issues/_discussion.html.haml
app/views/projects/issues/_discussion.html.haml
+1
-1
app/views/projects/issues/_issue_context.html.haml
app/views/projects/issues/_issue_context.html.haml
+8
-10
app/views/projects/issues/update.js.haml
app/views/projects/issues/update.js.haml
+7
-0
app/views/projects/merge_requests/_discussion.html.haml
app/views/projects/merge_requests/_discussion.html.haml
+2
-2
app/views/projects/merge_requests/show/_context.html.haml
app/views/projects/merge_requests/show/_context.html.haml
+9
-9
app/views/projects/merge_requests/update.js.haml
app/views/projects/merge_requests/update.js.haml
+6
-0
spec/features/issues_spec.rb
spec/features/issues_spec.rb
+3
-2
No files found.
CHANGELOG
View file @
97d4ac40
...
@@ -54,7 +54,7 @@ v 7.8.0
...
@@ -54,7 +54,7 @@ v 7.8.0
-
-
-
-
-
-
-
-
Added link to milestone and keeping resource context on smaller viewports for issues and merge requests (Jason Blanchard)
-
-
-
-
- API: Add support for editing an existing project (Mika Mäenpää and Hannes Rosenögger)
- API: Add support for editing an existing project (Mika Mäenpää and Hannes Rosenögger)
...
...
app/views/projects/issues/_discussion.html.haml
View file @
97d4ac40
...
@@ -13,7 +13,7 @@
...
@@ -13,7 +13,7 @@
=
link_to_member
(
@project
,
participant
,
name:
false
,
size:
24
)
=
link_to_member
(
@project
,
participant
,
name:
false
,
size:
24
)
.voting_notes
#notes
=
render
"projects/notes/notes_with_form"
.voting_notes
#notes
=
render
"projects/notes/notes_with_form"
.col-md-3
.hidden-sm.hidden-xs
.col-md-3
%div
%div
.clearfix
.clearfix
%span
.slead.has_tooltip
{
:"data-original-title"
=>
'Cross-project reference'
}
%span
.slead.has_tooltip
{
:"data-original-title"
=>
'Cross-project reference'
}
...
...
app/views/projects/issues/_issue_context.html.haml
View file @
97d4ac40
...
@@ -2,23 +2,21 @@
...
@@ -2,23 +2,21 @@
%div
.prepend-top-20
%div
.prepend-top-20
%p
%p
Assignee:
Assignee:
-
if
issue
.
assignee
=
link_to_member
(
@project
,
@issue
.
assignee
)
-
else
none
-
if
can?
(
current_user
,
:modify_issue
,
@issue
)
-
if
can?
(
current_user
,
:modify_issue
,
@issue
)
=
project_users_select_tag
(
'issue[assignee_id]'
,
placeholder:
'Select assignee'
,
class:
'custom-form-control js-select2 js-assignee'
,
selected:
@issue
.
assignee_id
)
=
project_users_select_tag
(
'issue[assignee_id]'
,
placeholder:
'Select assignee'
,
class:
'custom-form-control js-select2 js-assignee'
,
selected:
@issue
.
assignee_id
)
-
elsif
issue
.
assignee
=
link_to_member
(
@project
,
@issue
.
assignee
)
-
else
None
%div
.prepend-top-20
%div
.prepend-top-20
%p
%p
Milestone:
Milestone:
-
if
issue
.
milestone
#{
link_to
@issue
.
milestone
.
title
,
project_milestone_path
(
@project
,
@issue
.
milestone
)
}
-
else
none
-
if
can?
(
current_user
,
:modify_issue
,
@issue
)
-
if
can?
(
current_user
,
:modify_issue
,
@issue
)
=
f
.
select
(
:milestone_id
,
milestone_options
(
@issue
),
{
include_blank:
"Select milestone"
},
{
class:
'select2 select2-compact js-select2 js-milestone'
})
=
f
.
select
(
:milestone_id
,
milestone_options
(
@issue
),
{
include_blank:
"Select milestone"
},
{
class:
'select2 select2-compact js-select2 js-milestone'
})
=
hidden_field_tag
:issue_context
=
hidden_field_tag
:issue_context
=
f
.
submit
class:
'btn'
=
f
.
submit
class:
'btn'
-
elsif
issue
.
milestone
=
link_to
project_milestone_path
(
@project
,
@issue
.
milestone
)
do
=
@issue
.
milestone
.
title
-
else
None
app/views/projects/issues/update.js.haml
View file @
97d4ac40
...
@@ -3,8 +3,15 @@
...
@@ -3,8 +3,15 @@
:plain
:plain
$("##{dom_id(@issue)}").fadeOut();
$("##{dom_id(@issue)}").fadeOut();
-
elsif
params
[
:issue_context
]
-
elsif
params
[
:issue_context
]
$('.context').html("
#{
escape_javascript
(
render
partial:
'issue_context'
,
locals:
{
issue:
@issue
})
}
");
$('.context').effect('highlight');
$('.context').effect('highlight');
-
if
@issue
.
milestone
-
if
@issue
.
milestone
$('.milestone-nav-link').replaceWith("
<span
class=
'milestone-nav-link'
>
|
<span
class=
'light'
>
Milestone
</span>
#{
escape_javascript
(
link_to
@issue
.
milestone
.
title
,
project_milestone_path
(
@issue
.
project
,
@issue
.
milestone
))
}
</span>
")
$('.milestone-nav-link').replaceWith("
<span
class=
'milestone-nav-link'
>
|
<span
class=
'light'
>
Milestone
</span>
#{
escape_javascript
(
link_to
@issue
.
milestone
.
title
,
project_milestone_path
(
@issue
.
project
,
@issue
.
milestone
))
}
</span>
")
-
else
-
else
$('.milestone-nav-link').html('')
$('.milestone-nav-link').html('')
$('select.select2').select2({width: 'resolve', dropdownAutoWidth: true})
$('.edit-issue.inline-update input[type="submit"]').hide();
new ProjectUsersSelect();
new Issue();
app/views/projects/merge_requests/_discussion.html.haml
View file @
97d4ac40
...
@@ -9,7 +9,7 @@
...
@@ -9,7 +9,7 @@
.col-md-9
.col-md-9
=
render
"projects/merge_requests/show/participants"
=
render
"projects/merge_requests/show/participants"
=
render
"projects/notes/notes_with_form"
=
render
"projects/notes/notes_with_form"
.col-md-3
.hidden-sm.hidden-xs
.col-md-3
.clearfix
.clearfix
%span
.slead.has_tooltip
{
:"data-original-title"
=>
'Cross-project reference'
}
%span
.slead.has_tooltip
{
:"data-original-title"
=>
'Cross-project reference'
}
=
cross_project_reference
(
@project
,
@merge_request
)
=
cross_project_reference
(
@project
,
@merge_request
)
...
@@ -18,7 +18,7 @@
...
@@ -18,7 +18,7 @@
%cite
.cgray
%cite
.cgray
=
render
partial:
'projects/merge_requests/show/context'
,
locals:
{
merge_request:
@merge_request
}
=
render
partial:
'projects/merge_requests/show/context'
,
locals:
{
merge_request:
@merge_request
}
%hr
%hr
.votes-holder
.hidden-sm.hidden-xs
.votes-holder
%h6
Votes
%h6
Votes
#votes
=
render
'votes/votes_block'
,
votable:
@merge_request
#votes
=
render
'votes/votes_block'
,
votable:
@merge_request
...
...
app/views/projects/merge_requests/show/_context.html.haml
View file @
97d4ac40
...
@@ -2,22 +2,22 @@
...
@@ -2,22 +2,22 @@
%div
.prepend-top-20
%div
.prepend-top-20
%p
%p
Assignee:
Assignee:
-
if
@merge_request
.
assignee
=
link_to_member
(
@project
,
@merge_request
.
assignee
)
-
else
none
-
if
can?
(
current_user
,
:modify_merge_request
,
@merge_request
)
-
if
can?
(
current_user
,
:modify_merge_request
,
@merge_request
)
=
project_users_select_tag
(
'merge_request[assignee_id]'
,
placeholder:
'Select assignee'
,
class:
'custom-form-control js-select2 js-assignee'
,
selected:
@merge_request
.
assignee_id
)
=
project_users_select_tag
(
'merge_request[assignee_id]'
,
placeholder:
'Select assignee'
,
class:
'custom-form-control js-select2 js-assignee'
,
selected:
@merge_request
.
assignee_id
)
-
elsif
merge_request
.
assignee
=
link_to_member
(
@project
,
@merge_request
.
assignee
)
-
else
None
%div
.prepend-top-20
%div
.prepend-top-20
%p
%p
Milestone:
Milestone:
-
if
@merge_request
.
milestone
%span
.back-to-milestone
#{
link_to
@merge_request
.
milestone
.
title
,
project_milestone_path
(
@project
,
@merge_request
.
milestone
)
}
-
else
none
-
if
can?
(
current_user
,
:modify_merge_request
,
@merge_request
)
-
if
can?
(
current_user
,
:modify_merge_request
,
@merge_request
)
=
f
.
select
(
:milestone_id
,
milestone_options
(
@merge_request
),
{
include_blank:
"Select milestone"
},
{
class:
'select2 select2-compact js-select2 js-milestone'
})
=
f
.
select
(
:milestone_id
,
milestone_options
(
@merge_request
),
{
include_blank:
"Select milestone"
},
{
class:
'select2 select2-compact js-select2 js-milestone'
})
=
hidden_field_tag
:merge_request_context
=
hidden_field_tag
:merge_request_context
=
f
.
submit
class:
'btn'
=
f
.
submit
class:
'btn'
-
elsif
merge_request
.
milestone
=
link_to
merge_request
.
milestone
.
title
,
project_milestone_path
-
else
None
app/views/projects/merge_requests/update.js.haml
View file @
97d4ac40
-
if
params
[
:merge_request_context
]
-
if
params
[
:merge_request_context
]
$('.context').html("
#{
escape_javascript
(
render
partial:
'projects/merge_requests/show/context'
,
locals:
{
issue:
@issue
})
}
");
$('.context').effect('highlight');
$('.context').effect('highlight');
new ProjectUsersSelect();
$('select.select2').select2({width: 'resolve', dropdownAutoWidth: true});
merge_request = new MergeRequest();
spec/features/issues_spec.rb
View file @
97d4ac40
...
@@ -65,7 +65,7 @@ describe "Issues", feature: true do
...
@@ -65,7 +65,7 @@ describe "Issues", feature: true do
click_button
"Save changes"
click_button
"Save changes"
page
.
should
have_content
"Assignee: Select assignee"
page
.
should
have_content
'Assignee: none'
issue
.
reload
.
assignee
.
should
be_nil
issue
.
reload
.
assignee
.
should
be_nil
end
end
end
end
...
@@ -249,6 +249,7 @@ describe "Issues", feature: true do
...
@@ -249,6 +249,7 @@ describe "Issues", feature: true do
click_button
'Update Issue'
click_button
'Update Issue'
page
.
should
have_content
"Milestone changed to
#{
milestone
.
title
}
"
page
.
should
have_content
"Milestone changed to
#{
milestone
.
title
}
"
page
.
should
have_content
"Milestone:
#{
milestone
.
title
}
"
has_select?
(
'issue_assignee_id'
,
:selected
=>
milestone
.
title
)
has_select?
(
'issue_assignee_id'
,
:selected
=>
milestone
.
title
)
end
end
end
end
...
@@ -287,7 +288,7 @@ describe "Issues", feature: true do
...
@@ -287,7 +288,7 @@ describe "Issues", feature: true do
sleep
2
# wait for ajax stuff to complete
sleep
2
# wait for ajax stuff to complete
first
(
'.user-result'
).
click
first
(
'.user-result'
).
click
page
.
should
have_content
"Assignee: Unassigned"
page
.
should
have_content
'Assignee: none'
sleep
2
# wait for ajax stuff to complete
sleep
2
# wait for ajax stuff to complete
issue
.
reload
.
assignee
.
should
be_nil
issue
.
reload
.
assignee
.
should
be_nil
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