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
Léo-Paul Géneau
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
-
-
-
-
-
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)
...
...
app/views/projects/issues/_discussion.html.haml
View file @
97d4ac40
...
...
@@ -13,7 +13,7 @@
=
link_to_member
(
@project
,
participant
,
name:
false
,
size:
24
)
.voting_notes
#notes
=
render
"projects/notes/notes_with_form"
.col-md-3
.hidden-sm.hidden-xs
.col-md-3
%div
.clearfix
%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 @@
%div
.prepend-top-20
%p
Assignee:
-
if
issue
.
assignee
=
link_to_member
(
@project
,
@issue
.
assignee
)
-
else
none
-
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
)
-
elsif
issue
.
assignee
=
link_to_member
(
@project
,
@issue
.
assignee
)
-
else
None
%div
.prepend-top-20
%p
Milestone:
-
if
issue
.
milestone
#{
link_to
@issue
.
milestone
.
title
,
project_milestone_path
(
@project
,
@issue
.
milestone
)
}
-
else
none
-
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'
})
=
hidden_field_tag
:issue_context
=
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 @@
:plain
$("##{dom_id(@issue)}").fadeOut();
-
elsif
params
[
:issue_context
]
$('.context').html("
#{
escape_javascript
(
render
partial:
'issue_context'
,
locals:
{
issue:
@issue
})
}
");
$('.context').effect('highlight');
-
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>
")
-
else
$('.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 @@
.col-md-9
=
render
"projects/merge_requests/show/participants"
=
render
"projects/notes/notes_with_form"
.col-md-3
.hidden-sm.hidden-xs
.col-md-3
.clearfix
%span
.slead.has_tooltip
{
:"data-original-title"
=>
'Cross-project reference'
}
=
cross_project_reference
(
@project
,
@merge_request
)
...
...
@@ -18,7 +18,7 @@
%cite
.cgray
=
render
partial:
'projects/merge_requests/show/context'
,
locals:
{
merge_request:
@merge_request
}
%hr
.votes-holder
.hidden-sm.hidden-xs
.votes-holder
%h6
Votes
#votes
=
render
'votes/votes_block'
,
votable:
@merge_request
...
...
app/views/projects/merge_requests/show/_context.html.haml
View file @
97d4ac40
...
...
@@ -2,22 +2,22 @@
%div
.prepend-top-20
%p
Assignee:
-
if
@merge_request
.
assignee
=
link_to_member
(
@project
,
@merge_request
.
assignee
)
-
else
none
-
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
)
-
elsif
merge_request
.
assignee
=
link_to_member
(
@project
,
@merge_request
.
assignee
)
-
else
None
%div
.prepend-top-20
%p
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
)
=
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
=
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
]
$('.context').html("
#{
escape_javascript
(
render
partial:
'projects/merge_requests/show/context'
,
locals:
{
issue:
@issue
})
}
");
$('.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
click_button
"Save changes"
page
.
should
have_content
"Assignee: Select assignee"
page
.
should
have_content
'Assignee: none'
issue
.
reload
.
assignee
.
should
be_nil
end
end
...
...
@@ -249,6 +249,7 @@ describe "Issues", feature: true do
click_button
'Update Issue'
page
.
should
have_content
"Milestone changed to
#{
milestone
.
title
}
"
page
.
should
have_content
"Milestone:
#{
milestone
.
title
}
"
has_select?
(
'issue_assignee_id'
,
:selected
=>
milestone
.
title
)
end
end
...
...
@@ -287,7 +288,7 @@ describe "Issues", feature: true do
sleep
2
# wait for ajax stuff to complete
first
(
'.user-result'
).
click
page
.
should
have_content
"Assignee: Unassigned"
page
.
should
have_content
'Assignee: none'
sleep
2
# wait for ajax stuff to complete
issue
.
reload
.
assignee
.
should
be_nil
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