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
Jérome Perrin
gitlab-ce
Commits
3dd7703b
Commit
3dd7703b
authored
Aug 24, 2012
by
randx
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Feature: Labels page. Index page
parent
14bd9c92
Changes
7
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
81 additions
and
1 deletion
+81
-1
app/controllers/labels_controller.rb
app/controllers/labels_controller.rb
+25
-0
app/views/issues/_head.html.haml
app/views/issues/_head.html.haml
+3
-0
app/views/labels/_label.html.haml
app/views/labels/_label.html.haml
+4
-0
app/views/labels/index.html.haml
app/views/labels/index.html.haml
+14
-0
config/routes.rb
config/routes.rb
+2
-0
features/projects/issues/labels.feature
features/projects/issues/labels.feature
+13
-0
features/step_definitions/project/project_issues_steps.rb
features/step_definitions/project/project_issues_steps.rb
+20
-1
No files found.
app/controllers/labels_controller.rb
0 → 100644
View file @
3dd7703b
class
LabelsController
<
ApplicationController
before_filter
:authenticate_user!
before_filter
:project
before_filter
:module_enabled
layout
"project"
# Authorize
before_filter
:add_project_abilities
# Allow read any issue
before_filter
:authorize_read_issue!
respond_to
:js
,
:html
def
index
@labels
=
Issue
.
tag_counts_on
(
:labels
)
end
protected
def
module_enabled
return
render_404
unless
@project
.
issues_enabled
end
end
app/views/issues/_head.html.haml
View file @
3dd7703b
...
@@ -5,6 +5,9 @@
...
@@ -5,6 +5,9 @@
%li
{
class:
"#{'active' if current_page?(project_milestones_path(@project))}"
}
%li
{
class:
"#{'active' if current_page?(project_milestones_path(@project))}"
}
=
link_to
project_milestones_path
(
@project
),
class:
"tab"
do
=
link_to
project_milestones_path
(
@project
),
class:
"tab"
do
Milestones
Milestones
%li
{
class:
"#{'active' if current_page?(project_labels_path(@project))}"
}
=
link_to
project_labels_path
(
@project
),
class:
"tab"
do
Labels
%li
.right
%li
.right
%span
.rss-icon
%span
.rss-icon
=
link_to
project_issues_path
(
@project
,
:atom
,
{
private_token:
current_user
.
private_token
})
do
=
link_to
project_issues_path
(
@project
,
:atom
,
{
private_token:
current_user
.
private_token
})
do
...
...
app/views/labels/_label.html.haml
0 → 100644
View file @
3dd7703b
%li
.wll
%strong
=
label
.
name
.right
%span
=
pluralize
label
.
count
,
'issue'
app/views/labels/index.html.haml
0 → 100644
View file @
3dd7703b
=
render
"issues/head"
%h3
.page_title
Labels
%br
%div
.ui-box
%ul
.unstyled.labels-table
-
@labels
.
each
do
|
label
|
=
render
'label'
,
label:
label
-
unless
@labels
.
present?
%li
%h3
.nothing_here_message
Nothing to show here
config/routes.rb
View file @
3dd7703b
...
@@ -197,7 +197,9 @@ Gitlab::Application.routes.draw do
...
@@ -197,7 +197,9 @@ Gitlab::Application.routes.draw do
end
end
resources
:team_members
resources
:team_members
resources
:milestones
resources
:milestones
resources
:labels
,
:only
=>
[
:index
]
resources
:issues
do
resources
:issues
do
collection
do
collection
do
post
:sort
post
:sort
post
:bulk_update
post
:bulk_update
...
...
features/projects/issues/labels.feature
0 → 100644
View file @
3dd7703b
Feature
:
Labels
Background
:
Given
I signin as a user
And
I own project
"Shop"
And project "Shop" have issues tags
:
|
name
|
|
bug
|
|
feature
|
Given
I visit project
"Shop"
labels page
Scenario
:
I
should see active milestones
Then
I should see label
"bug"
And
I should see label
"feature"
features/step_definitions/project/project_issues_steps.rb
View file @
3dd7703b
...
@@ -33,6 +33,25 @@ Given /^I visit issue page "(.*?)"$/ do |arg1|
...
@@ -33,6 +33,25 @@ Given /^I visit issue page "(.*?)"$/ do |arg1|
end
end
Given
/^I submit new issue "(.*?)"$/
do
|
arg1
|
Given
/^I submit new issue "(.*?)"$/
do
|
arg1
|
fill_in
"issue_title"
,
:with
=>
arg1
fill_in
"issue_title"
,
with:
arg1
click_button
"Submit new issue"
click_button
"Submit new issue"
end
end
Given
/^project "(.*?)" have issues tags:$/
do
|
arg1
,
table
|
project
=
Project
.
find_by_name
(
arg1
)
table
.
hashes
.
each
do
|
hash
|
Factory
:issue
,
project:
project
,
label_list:
[
hash
[
:name
]]
end
end
Given
/^I visit project "(.*?)" labels page$/
do
|
arg1
|
visit
project_labels_path
(
Project
.
find_by_name
(
arg1
))
end
Then
/^I should see label "(.*?)"$/
do
|
arg1
|
within
".labels-table"
do
page
.
should
have_content
arg1
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