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
Boxiang Sun
gitlab-ce
Commits
1e78ceea
Commit
1e78ceea
authored
May 08, 2013
by
Dmitriy Zaporozhets
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
replace selectboxes with filters
parent
a87f5c60
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
55 additions
and
5 deletions
+55
-5
app/assets/stylesheets/gitlab_bootstrap/common.scss
app/assets/stylesheets/gitlab_bootstrap/common.scss
+1
-0
app/helpers/labels_helper.rb
app/helpers/labels_helper.rb
+2
-2
app/views/issues/_issues.html.haml
app/views/issues/_issues.html.haml
+52
-3
No files found.
app/assets/stylesheets/gitlab_bootstrap/common.scss
View file @
1e78ceea
...
...
@@ -19,6 +19,7 @@
.append-right-20
{
margin-right
:
20px
}
.append-bottom-10
{
margin-bottom
:
10px
}
.append-bottom-20
{
margin-bottom
:
20px
}
.inline
{
display
:
inline-block
}
.padded
{
padding
:
20px
}
.ipadded
{
padding
:
20px
!
important
}
...
...
app/helpers/labels_helper.rb
View file @
1e78ceea
module
LabelsHelper
def
issue_
tag
s
@project
.
issues
.
tag_counts_on
(
:labels
)
.
map
(
&
:name
)
def
issue_
label_name
s
@project
.
issues
_labels
.
map
(
&
:name
)
end
def
labels_autocomplete_source
...
...
app/views/issues/_issues.html.haml
View file @
1e78ceea
...
...
@@ -14,9 +14,58 @@
=
button_tag
"Save"
,
class:
"btn update_selected_issues btn-small btn-save"
.issues_filters
=
form_tag
project_issues_path
(
@project
),
method: :get
,
remote:
true
do
=
select_tag
(
:label_name
,
options_for_select
(
issue_tags
,
params
[
:label_name
]),
prompt:
"Labels"
)
=
select_tag
(
:assignee_id
,
options_from_collection_for_select
([
unassigned_filter
]
+
@project
.
users
.
all
,
"id"
,
"name"
,
params
[
:assignee_id
]),
prompt:
"Assignee"
)
=
select_tag
(
:milestone_id
,
options_from_collection_for_select
([
unassigned_filter
]
+
issues_active_milestones
,
"id"
,
"title"
,
params
[
:milestone_id
]),
prompt:
"Milestone"
)
%span
Filter by
.dropdown.inline.prepend-left-10
%a
.dropdown-toggle.btn.btn-small
{
href:
'#'
,
"data-toggle"
=>
"dropdown"
}
%i
.icon-tags
%span
.light
labels:
-
if
params
[
:label_name
]
%strong
=
params
[
:label_name
]
-
else
Any
%b
.caret
%ul
.dropdown-menu
-
issue_label_names
.
each
do
|
label_name
|
%li
=
link_to
'#'
do
%span
{
class:
"label #{label_css_class(label_name)}"
}
%i
.icon-tag
=
label_name
.dropdown.inline.prepend-left-10
%a
.dropdown-toggle.btn.btn-small
{
href:
'#'
,
"data-toggle"
=>
"dropdown"
}
%i
.icon-user
%span
.light
assignee:
-
if
params
[
:assignee_id
].
present?
%strong
=
User
.
find
(
params
[
:assignee_id
]).
name
-
else
Any
%b
.caret
%ul
.dropdown-menu
-
@project
.
users
.
sort_by
(
&
:name
).
each
do
|
user
|
%li
=
link_to
'#'
do
=
image_tag
gravatar_icon
(
user
.
email
),
class:
"avatar s16"
=
user
.
name
.dropdown.inline.prepend-left-10
%a
.dropdown-toggle.btn.btn-small
{
href:
'#'
,
"data-toggle"
=>
"dropdown"
}
%i
.icon-time
%span
.light
milestone:
-
if
params
[
:milestone_id
].
present?
%strong
=
Milestone
.
find
(
params
[
:milestone_id
]).
title
-
else
Any
%b
.caret
%ul
.dropdown-menu
-
issues_active_milestones
.
each
do
|
milestone
|
%li
=
link_to
'#'
do
%strong
=
milestone
.
title
%small
.light
=
milestone
.
expires_at
-#= select_tag(:label_name, options_for_select(issue_tags, params[:label_name]), prompt: "Labels")
-#= select_tag(:assignee_id, options_from_collection_for_select([unassigned_filter] + @project.users.all, "id", "name", params[:assignee_id]), prompt: "Assignee")
-#= select_tag(:milestone_id, options_from_collection_for_select([unassigned_filter] + issues_active_milestones, "id", "title", params[:milestone_id]), prompt: "Milestone")
=
hidden_field_tag
:status
,
params
[
:status
]
=
hidden_field_tag
:issue_search
,
params
[
:status
],
id:
'filter_issue_search'
...
...
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