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
b876793d
Commit
b876793d
authored
Feb 19, 2015
by
Dmitriy Zaporozhets
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Restlye issueable filters to be more compact
parent
61772560
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
120 additions
and
119 deletions
+120
-119
app/assets/javascripts/issues.js.coffee
app/assets/javascripts/issues.js.coffee
+3
-3
app/views/projects/issues/_issues.html.haml
app/views/projects/issues/_issues.html.haml
+0
-15
app/views/projects/issues/index.html.haml
app/views/projects/issues/index.html.haml
+17
-8
app/views/shared/_issuable_filter.html.haml
app/views/shared/_issuable_filter.html.haml
+100
-93
No files found.
app/assets/javascripts/issues.js.coffee
View file @
b876793d
...
...
@@ -15,7 +15,7 @@
$
(
this
).
html
totalIssues
+
1
else
$
(
this
).
html
totalIssues
-
1
$
(
"body"
).
on
"click"
,
".issues-filters .dropdown-menu a"
,
->
$
(
"body"
).
on
"click"
,
".issues-
other-
filters .dropdown-menu a"
,
->
$
(
'.issues-list'
).
block
(
message
:
null
,
overlayCSS
:
...
...
@@ -77,9 +77,9 @@
ids
.
push
$
(
value
).
attr
(
"data-id"
)
$
(
"#update_issues_ids"
).
val
ids
$
(
".issues-filters"
).
hide
()
$
(
".issues-
other-
filters"
).
hide
()
$
(
".issues_bulk_update"
).
show
()
else
$
(
"#update_issues_ids"
).
val
[]
$
(
".issues_bulk_update"
).
hide
()
$
(
".issues-filters"
).
show
()
$
(
".issues-
other-
filters"
).
show
()
app/views/projects/issues/_issues.html.haml
View file @
b876793d
.append-bottom-10
.check-all-holder
=
check_box_tag
"check_all_issues"
,
nil
,
false
,
class:
"check_all_issues left"
,
disabled:
!
can?
(
current_user
,
:modify_issue
,
@project
)
=
render
'shared/issuable_filter'
.clearfix
.issues_bulk_update.hide
=
form_tag
bulk_update_project_issues_path
(
@project
),
method: :post
do
=
select_tag
(
'update[status]'
,
options_for_select
([[
'Open'
,
'open'
],
[
'Closed'
,
'closed'
]]),
prompt:
"Status"
)
=
project_users_select_tag
(
'update[assignee_id]'
,
placeholder:
'Assignee'
)
=
select_tag
(
'update[milestone_id]'
,
bulk_update_milestone_options
,
prompt:
"Milestone"
)
=
hidden_field_tag
'update[issues_ids]'
,
[]
=
hidden_field_tag
:status
,
params
[
:status
]
=
button_tag
"Update issues"
,
class:
"btn update_selected_issues btn-save"
.panel.panel-default
%ul
.well-list.issues-list
=
render
@issues
...
...
app/views/projects/issues/index.html.haml
View file @
b876793d
%h3
.page-title
Issues
-
if
current_user
.hidden-xs.inline
=
link_to
project_issues_path
(
@project
,
:atom
,
{
private_token:
current_user
.
private_token
})
do
%small
%i
.fa.fa-rss
.append-bottom-10
.pull-right
.pull-left
-
if
current_user
.hidden-xs.pull-left
=
link_to
project_issues_path
(
@project
,
:atom
,
{
private_token:
current_user
.
private_token
}),
class:
'btn append-right-10'
do
%i
.fa.fa-rss
=
form_tag
project_issues_path
(
@project
),
method: :get
,
id:
"issue_search_form"
,
class:
'pull-left issue-search-form'
do
.append-right-10.hidden-xs.hidden-sm
=
search_field_tag
:issue_search
,
params
[
:issue_search
],
{
placeholder:
'Filter by title or description'
,
class:
'form-control issue_search search-text-input input-mn-300'
}
...
...
@@ -21,7 +20,17 @@
%i
.fa.fa-plus
New Issue
=
render
'shared/issuable_filter'
.clearfix
.issues_bulk_update.hide
=
form_tag
bulk_update_project_issues_path
(
@project
),
method: :post
do
=
select_tag
(
'update[status]'
,
options_for_select
([[
'Open'
,
'open'
],
[
'Closed'
,
'closed'
]]),
prompt:
"Status"
)
=
project_users_select_tag
(
'update[assignee_id]'
,
placeholder:
'Assignee'
)
=
select_tag
(
'update[milestone_id]'
,
bulk_update_milestone_options
,
prompt:
"Milestone"
)
=
hidden_field_tag
'update[issues_ids]'
,
[]
=
hidden_field_tag
:status
,
params
[
:status
]
=
button_tag
"Update issues"
,
class:
"btn update_selected_issues btn-save"
%hr
.issues-holder
=
render
"issues"
app/views/shared/_issuable_filter.html.haml
View file @
b876793d
.issues-filters
.
pull-left.append-right-20
%ul
.nav.nav-
pills.nav-compact
.
issues-state-filters
%ul
.nav.nav-
tabs
%li
{
class:
(
"active"
if
params
[
:state
]
==
'opened'
)}
=
link_to
page_filter_path
(
state:
'opened'
)
do
%i
.fa.fa-exclamation-circle
...
...
@@ -14,99 +14,106 @@
%i
.fa.fa-compass
All
.dropdown.inline.assignee-filter
%a
.dropdown-toggle.btn
{
href:
'#'
,
"data-toggle"
=>
"dropdown"
}
%i
.fa.fa-user
%span
.light
assignee:
-
if
@assignee
.
present?
%strong
=
@assignee
.
name
-
elsif
params
[
:assignee_id
]
==
"0"
Unassigned
-
else
Any
%b
.caret
%ul
.dropdown-menu
%li
=
link_to
page_filter_path
(
assignee_id:
nil
)
do
Any
=
link_to
page_filter_path
(
assignee_id:
0
)
do
Unassigned
-
@assignees
.
sort_by
(
&
:name
).
each
do
|
user
|
%li
=
link_to
page_filter_path
(
assignee_id:
user
.
id
)
do
=
image_tag
avatar_icon
(
user
.
email
),
class:
"avatar s16"
,
alt:
''
=
user
.
name
.dropdown.inline.prepend-left-10.author-filter
%a
.dropdown-toggle.btn
{
href:
'#'
,
"data-toggle"
=>
"dropdown"
}
%i
.fa.fa-user
%span
.light
author:
-
if
@author
.
present?
%strong
=
@author
.
name
-
elsif
params
[
:author_id
]
==
"0"
Unassigned
-
else
Any
%b
.caret
%ul
.dropdown-menu
%li
=
link_to
page_filter_path
(
author_id:
nil
)
do
Any
=
link_to
page_filter_path
(
author_id:
0
)
do
Unassigned
-
@authors
.
sort_by
(
&
:name
).
each
do
|
user
|
%li
=
link_to
page_filter_path
(
author_id:
user
.
id
)
do
=
image_tag
avatar_icon
(
user
.
email
),
class:
"avatar s16"
,
alt:
''
=
user
.
name
.dropdown.inline.prepend-left-10.milestone-filter
%a
.dropdown-toggle.btn
{
href:
'#'
,
"data-toggle"
=>
"dropdown"
}
%i
.fa.fa-clock-o
%span
.light
milestone:
-
if
@milestone
.
present?
%strong
=
@milestone
.
title
-
elsif
params
[
:milestone_id
]
==
"0"
None (backlog)
-
else
Any
%b
.caret
%ul
.dropdown-menu
%li
=
link_to
page_filter_path
(
milestone_id:
nil
)
do
Any
=
link_to
page_filter_path
(
milestone_id:
0
)
do
None (backlog)
-
@milestones
.
each
do
|
milestone
|
%li
=
link_to
page_filter_path
(
milestone_id:
milestone
.
id
)
do
%strong
=
milestone
.
title
%small
.light
=
milestone
.
expires_at
%div
-
if
controller
.
controller_name
==
'issues'
.check-all-holder
=
check_box_tag
"check_all_issues"
,
nil
,
false
,
class:
"check_all_issues left"
,
disabled:
!
can?
(
current_user
,
:modify_issue
,
@project
)
.issues-other-filters
.dropdown.inline.assignee-filter
%a
.dropdown-toggle.btn
{
href:
'#'
,
"data-toggle"
=>
"dropdown"
}
%i
.fa.fa-user
%span
.light
assignee:
-
if
@assignee
.
present?
%strong
=
@assignee
.
name
-
elsif
params
[
:assignee_id
]
==
"0"
Unassigned
-
else
Any
%b
.caret
%ul
.dropdown-menu
%li
=
link_to
page_filter_path
(
assignee_id:
nil
)
do
Any
=
link_to
page_filter_path
(
assignee_id:
0
)
do
Unassigned
-
@assignees
.
sort_by
(
&
:name
).
each
do
|
user
|
%li
=
link_to
page_filter_path
(
assignee_id:
user
.
id
)
do
=
image_tag
avatar_icon
(
user
.
email
),
class:
"avatar s16"
,
alt:
''
=
user
.
name
-
if
@project
.dropdown.inline.prepend-left-10.labels-filter
%a
.dropdown-toggle.btn
{
href:
'#'
,
"data-toggle"
=>
"dropdown"
}
%i
.fa.fa-tags
%span
.light
label:
-
if
params
[
:label_name
].
present?
%strong
=
params
[
:label_name
]
-
else
Any
%b
.caret
%ul
.dropdown-menu
%li
=
link_to
page_filter_path
(
label_name:
nil
)
do
.dropdown.inline.prepend-left-10.author-filter
%a
.dropdown-toggle.btn
{
href:
'#'
,
"data-toggle"
=>
"dropdown"
}
%i
.fa.fa-user
%span
.light
author:
-
if
@author
.
present?
%strong
=
@author
.
name
-
elsif
params
[
:author_id
]
==
"0"
Unassigned
-
else
Any
-
if
@project
.
labels
.
any?
-
@project
.
labels
.
each
do
|
label
|
%b
.caret
%ul
.dropdown-menu
%li
=
link_to
page_filter_path
(
author_id:
nil
)
do
Any
=
link_to
page_filter_path
(
author_id:
0
)
do
Unassigned
-
@authors
.
sort_by
(
&
:name
).
each
do
|
user
|
%li
=
link_to
page_filter_path
(
label_name:
label
.
name
)
do
=
render_colored_label
(
label
)
-
else
=
link_to
page_filter_path
(
author_id:
user
.
id
)
do
=
image_tag
avatar_icon
(
user
.
email
),
class:
"avatar s16"
,
alt:
''
=
user
.
name
.dropdown.inline.prepend-left-10.milestone-filter
%a
.dropdown-toggle.btn
{
href:
'#'
,
"data-toggle"
=>
"dropdown"
}
%i
.fa.fa-clock-o
%span
.light
milestone:
-
if
@milestone
.
present?
%strong
=
@milestone
.
title
-
elsif
params
[
:milestone_id
]
==
"0"
None (backlog)
-
else
Any
%b
.caret
%ul
.dropdown-menu
%li
=
link_to
generate_project_labels_path
(
@project
,
redirect:
request
.
original_url
),
method: :post
do
%i
.fa.fa-plus-circle
Create default labels
=
link_to
page_filter_path
(
milestone_id:
nil
)
do
Any
=
link_to
page_filter_path
(
milestone_id:
0
)
do
None (backlog)
-
@milestones
.
each
do
|
milestone
|
%li
=
link_to
page_filter_path
(
milestone_id:
milestone
.
id
)
do
%strong
=
milestone
.
title
%small
.light
=
milestone
.
expires_at
-
if
@project
.dropdown.inline.prepend-left-10.labels-filter
%a
.dropdown-toggle.btn
{
href:
'#'
,
"data-toggle"
=>
"dropdown"
}
%i
.fa.fa-tags
%span
.light
label:
-
if
params
[
:label_name
].
present?
%strong
=
params
[
:label_name
]
-
else
Any
%b
.caret
%ul
.dropdown-menu
%li
=
link_to
page_filter_path
(
label_name:
nil
)
do
Any
-
if
@project
.
labels
.
any?
-
@project
.
labels
.
each
do
|
label
|
%li
=
link_to
page_filter_path
(
label_name:
label
.
name
)
do
=
render_colored_label
(
label
)
-
else
%li
=
link_to
generate_project_labels_path
(
@project
,
redirect:
request
.
original_url
),
method: :post
do
%i
.fa.fa-plus-circle
Create default labels
.pull-right
=
render
'shared/sort_dropdown'
.pull-right
=
render
'shared/sort_dropdown'
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