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
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
gitlab-ce
Commits
5405f19b
Commit
5405f19b
authored
Dec 19, 2013
by
Dmitriy Zaporozhets
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'feature-issue-actions' of
https://github.com/jasonblanchard/gitlabhq
into 6-5-dev
parents
8bcb2ff2
65448e2f
Changes
7
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
140 additions
and
17 deletions
+140
-17
CHANGELOG
CHANGELOG
+3
-0
app/assets/javascripts/issues.js.coffee
app/assets/javascripts/issues.js.coffee
+6
-0
app/assets/stylesheets/sections/issues.scss
app/assets/stylesheets/sections/issues.scss
+5
-0
app/views/projects/issues/_issue_context.html.haml
app/views/projects/issues/_issue_context.html.haml
+31
-0
app/views/projects/issues/show.html.haml
app/views/projects/issues/show.html.haml
+8
-17
app/views/projects/issues/update.js.haml
app/views/projects/issues/update.js.haml
+9
-0
spec/features/issues_spec.rb
spec/features/issues_spec.rb
+78
-0
No files found.
CHANGELOG
View file @
5405f19b
v 6.5.0
- Dropdown menus on issue#show page for assignee and milestone (Jason Blanchard)
v 6.4.0
- Added sorting to project issues page (Jason Blanchard)
- Assembla integration (Carlos Paramio)
...
...
app/assets/javascripts/issues.js.coffee
View file @
5405f19b
...
...
@@ -79,3 +79,9 @@
$
(
"#update_issues_ids"
).
val
[]
$
(
".issues_bulk_update"
).
hide
()
$
(
".issues-filters"
).
show
()
$
->
$
(
'.edit-issue.inline-update input[type="submit"]'
).
hide
();
$
(
"body"
).
on
"change"
,
".edit-issue.inline-update select"
,
->
$
(
this
).
submit
()
app/assets/stylesheets/sections/issues.scss
View file @
5405f19b
...
...
@@ -119,3 +119,8 @@ input.check_all_issues {
background-color
:
#f4f4f4
;
}
}
.edit-issue.inline-update
select
{
width
:
100%
;
max-width
:
230px
;
}
app/views/projects/issues/_issue_context.html.haml
0 → 100644
View file @
5405f19b
=
form_for
[
@project
,
@issue
],
:remote
=>
true
,
:html
=>
{
:class
=>
'edit-issue inline-update'
}
do
|
f
|
.pull-right
Created by
#{
link_to_member
(
@project
,
issue
.
author
)
}
-
if
issue
.
assignee
\ and currently assigned to
-
if
can?
(
current_user
,
:modify_issue
,
@issue
)
=
link_to
profile_path
(
issue
.
assignee
)
do
=
image_tag
(
avatar_icon
(
issue
.
assignee
.
email
),
:class
=>
'avatar avatar-inline s16 assignee'
)
if
issue
.
assignee
=
f
.
select
(
:assignee_id
,
@project
.
team
.
members
.
sort_by
(
&
:name
).
map
{
|
p
|
[
p
.
name
,
p
.
id
]
},
{
include_blank:
"Assign to user (none):"
},
{
class:
'chosen'
})
-
elsif
issue
.
assignee
=
link_to_member
(
@project
,
@issue
.
assignee
)
-
if
issue
.
milestone
-
milestone
=
issue
.
milestone
%cite
.cgray
and attached to milestone
-
if
can?
(
current_user
,
:modify_issue
,
@issue
)
=
f
.
select
(
:milestone_id
,
@project
.
milestones
.
active
.
all
.
collect
{
|
p
|
[
p
.
title
,
p
.
id
]
},
{
include_blank:
"Select milestone (none):"
},
{
class:
'chosen'
})
=
hidden_field_tag
:issue_context
=
f
.
submit
:class
=>
'btn'
-
elsif
issue
.
milestone
=
link_to
issue
.
milestone
.
title
,
project_milestone_path
.pull-right
-
issue
.
labels
.
each
do
|
label
|
%span
{
class:
"label #{label_css_class(label.name)}"
}
%i
.icon-tag
=
label
.
name
app/views/projects/issues/show.html.haml
View file @
5405f19b
...
...
@@ -26,7 +26,12 @@
.back-link
=
link_to
project_issues_path
(
@project
)
do
←
To issues list
%span
.milestone-nav-link
-
if
@issue
.
milestone
|
=
link_to
project_milestone_path
(
@project
,
@issue
.
milestone
)
do
<strong>
Milestone:
</strong>
=
@issue
.
milestone
.
title
.ui-box.ui-box-show
.ui-box-head
...
...
@@ -39,21 +44,7 @@
.ui-box-body
%cite
.cgray
Created by
#{
link_to_member
(
@project
,
@issue
.
author
)
}
-
if
@issue
.
assignee
\ and currently assigned to
#{
link_to_member
(
@project
,
@issue
.
assignee
)
}
-
if
@issue
.
milestone
-
milestone
=
@issue
.
milestone
%cite
.cgray
and attached to milestone
%strong
=
link_to_gfm
truncate
(
milestone
.
title
,
length:
20
),
project_milestone_path
(
milestone
.
project
,
milestone
)
.pull-right
-
@issue
.
labels
.
each
do
|
label
|
%span
{
class:
"label #{label_css_class(label.name)}"
}
%i
.icon-tag
=
label
.
name
=
render
partial:
'issue_context'
,
locals:
{
issue:
@issue
}
-
if
@issue
.
description
.
present?
.ui-box-bottom
...
...
@@ -73,4 +64,4 @@
-
@issue
.
participants
.
each
do
|
participant
|
=
link_to_member
(
@project
,
participant
,
name:
false
,
size:
24
)
.voting_notes
#notes
=
render
"projects/notes/notes_with_form"
\ No newline at end of file
.voting_notes
#notes
=
render
"projects/notes/notes_with_form"
app/views/projects/issues/update.js.haml
View file @
5405f19b
...
...
@@ -2,3 +2,12 @@
-
if
@issue
.
valid?
:plain
$("##{dom_id(@issue)}").fadeOut();
-
elsif
params
[
:issue_context
]
$('.ui-box-body').html("
#{
escape_javascript
(
render
partial:
'issue_context'
,
locals:
{
issue:
@issue
})
}
");
$('.ui-box-body').effect('highlight');
$('.chosen').chosen();
$('.edit-issue.inline-update input[type="submit"]').hide();
-
if
@issue
.
milestone
$('.milestone-nav-link').replaceWith("
#{
escape_javascript
(
link_to
"| #{@issue.milestone.title}"
,
project_milestone_path
(
@issue
.
project
,
@issue
.
milestone
),
:class
=>
'milestone-nav-link'
)
}
")
-
else
$('.milestone-nav-link').html('')
spec/features/issues_spec.rb
View file @
5405f19b
...
...
@@ -175,6 +175,84 @@ describe "Issues" do
end
end
describe
'update assignee from issue#show'
do
let
(
:issue
)
{
create
(
:issue
,
project:
project
,
author:
@user
)
}
context
'by autorized user'
do
it
'with dropdown menu'
do
visit
project_issue_path
(
project
,
issue
)
find
(
'.edit-issue.inline-update'
).
select
(
project
.
team
.
members
.
first
.
name
,
from:
'issue_assignee_id'
)
click_button
'Update Issue'
page
.
should
have_content
"currently assigned to"
page
.
has_select?
(
'issue_assignee_id'
,
:selected
=>
project
.
team
.
members
.
first
.
name
)
end
end
context
'by unauthorized user'
do
let
(
:guest
)
{
create
(
:user
)
}
before
:each
do
project
.
team
<<
[[
guest
],
:guest
]
issue
.
assignee
=
@user
issue
.
save
end
it
'shows assignee text'
do
logout
login_with
guest
visit
project_issue_path
(
project
,
issue
)
page
.
should
have_content
"currently assigned to
#{
issue
.
assignee
.
name
}
"
end
end
end
describe
'update milestone from issue#show'
do
let!
(
:issue
)
{
create
(
:issue
,
project:
project
,
author:
@user
)
}
let!
(
:milestone
)
{
create
(
:milestone
,
project:
project
)
}
context
'by authorized user'
do
it
'with dropdown menu'
do
visit
project_issue_path
(
project
,
issue
)
p
find
(
'.edit-issue.inline-update'
).
text
find
(
'.edit-issue.inline-update'
).
select
(
milestone
.
title
,
from:
'issue_milestone_id'
)
click_button
'Update Issue'
page
.
should
have_content
"and attached to milestone"
page
.
has_select?
(
'issue_assignee_id'
,
:selected
=>
milestone
.
title
)
end
end
context
'by unauthorized user'
do
let
(
:guest
)
{
create
(
:user
)
}
before
:each
do
project
.
team
<<
[[
guest
],
:guest
]
issue
.
milestone
=
milestone
issue
.
save
end
it
'shows milestone text'
do
logout
login_with
guest
visit
project_issue_path
(
project
,
issue
)
page
.
should
have_content
"attached to milestone
#{
milestone
.
title
}
"
end
end
end
def
first_issue
all
(
"ul.issues-list li"
).
first
.
text
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