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
1
Merge Requests
1
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
nexedi
gitlab-ce
Commits
e683d9c0
Commit
e683d9c0
authored
Nov 20, 2014
by
Valery Sizov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Possibility to create Milestones or Labels when Issues are disabled
parent
43512817
Changes
7
Show whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
28 additions
and
15 deletions
+28
-15
app/controllers/projects/milestones_controller.rb
app/controllers/projects/milestones_controller.rb
+3
-1
app/views/projects/_issues_nav.html.haml
app/views/projects/_issues_nav.html.haml
+19
-3
app/views/projects/issues/index.html.haml
app/views/projects/issues/index.html.haml
+1
-1
app/views/projects/labels/index.html.haml
app/views/projects/labels/index.html.haml
+1
-1
app/views/projects/merge_requests/index.html.haml
app/views/projects/merge_requests/index.html.haml
+2
-7
app/views/projects/milestones/index.html.haml
app/views/projects/milestones/index.html.haml
+1
-1
app/views/projects/milestones/show.html.haml
app/views/projects/milestones/show.html.haml
+1
-1
No files found.
app/controllers/projects/milestones_controller.rb
View file @
e683d9c0
...
@@ -103,7 +103,9 @@ class Projects::MilestonesController < Projects::ApplicationController
...
@@ -103,7 +103,9 @@ class Projects::MilestonesController < Projects::ApplicationController
end
end
def
module_enabled
def
module_enabled
return
render_404
unless
@project
.
issues_enabled
unless
@project
.
issues_enabled
||
@project
.
merge_requests_enabled
return
render_404
end
end
end
def
milestone_params
def
milestone_params
...
...
app/views/projects/
issues/_head
.html.haml
→
app/views/projects/
_issues_nav
.html.haml
View file @
e683d9c0
%ul
.nav.nav-tabs
%ul
.nav.nav-tabs
-
if
project_nav_tab?
:issues
=
nav_link
(
controller: :issues
)
do
=
nav_link
(
controller: :issues
)
do
=
link_to
project_issues_path
(
@project
),
class:
"tab"
do
=
link_to
project_issues_path
(
@project
),
class:
"tab"
do
Browse Issues
Browse Issues
-
if
project_nav_tab?
:merge_requests
=
nav_link
(
controller: :merge_requests
)
do
=
link_to
project_merge_requests_path
(
@project
),
class:
"tab"
do
Merge Requests
=
nav_link
(
controller: :milestones
)
do
=
nav_link
(
controller: :milestones
)
do
=
link_to
'Milestones'
,
project_milestones_path
(
@project
),
class:
"tab"
=
link_to
'Milestones'
,
project_milestones_path
(
@project
),
class:
"tab"
=
nav_link
(
controller: :labels
)
do
=
nav_link
(
controller: :labels
)
do
...
@@ -34,3 +39,14 @@
...
@@ -34,3 +39,14 @@
=
link_to
new_project_issue_path
(
@project
,
issue:
{
assignee_id:
params
[
:assignee_id
],
milestone_id:
params
[
:milestone_id
]}),
class:
"btn btn-new pull-left"
,
title:
"New Issue"
,
id:
"new_issue_link"
do
=
link_to
new_project_issue_path
(
@project
,
issue:
{
assignee_id:
params
[
:assignee_id
],
milestone_id:
params
[
:milestone_id
]}),
class:
"btn btn-new pull-left"
,
title:
"New Issue"
,
id:
"new_issue_link"
do
%i
.fa.fa-plus
%i
.fa.fa-plus
New Issue
New Issue
-
if
current_controller?
(
:merge_requests
)
%li
.pull-right
.pull-right
%button
.btn.btn-default.sidebar-expand-button
%i
.icon.fa.fa-list
-
if
can?
current_user
,
:write_merge_request
,
@project
=
link_to
new_project_merge_request_path
(
@project
),
class:
"pull-right btn btn-new"
,
title:
"New Merge Request"
do
%i
.fa.fa-plus
New Merge Request
app/views/projects/issues/index.html.haml
View file @
e683d9c0
=
render
"
head
"
=
render
"
projects/issues_nav
"
.row
.row
.fixed.fixed.sidebar-expand-button.hidden-lg.hidden-md.hidden-xs
.fixed.fixed.sidebar-expand-button.hidden-lg.hidden-md.hidden-xs
%i
.fa.fa-list.fa-2x
%i
.fa.fa-list.fa-2x
...
...
app/views/projects/labels/index.html.haml
View file @
e683d9c0
=
render
"projects/issues
/head
"
=
render
"projects/issues
_nav
"
-
if
can?
current_user
,
:admin_label
,
@project
-
if
can?
current_user
,
:admin_label
,
@project
=
link_to
new_project_label_path
(
@project
),
class:
"pull-right btn btn-new"
do
=
link_to
new_project_label_path
(
@project
),
class:
"pull-right btn btn-new"
do
...
...
app/views/projects/merge_requests/index.html.haml
View file @
e683d9c0
-
if
can?
current_user
,
:write_merge_request
,
@project
=
render
"projects/issues_nav"
=
link_to
new_project_merge_request_path
(
@project
),
class:
"pull-right btn btn-new"
,
title:
"New Merge Request"
do
%i
.fa.fa-plus
New Merge Request
%h3
.page-title
Merge Requests
%hr
.row
.row
.fixed.sidebar-expand-button.hidden-lg.hidden-md
.fixed.sidebar-expand-button.hidden-lg.hidden-md
%i
.fa.fa-list.fa-2x
%i
.fa.fa-list.fa-2x
...
...
app/views/projects/milestones/index.html.haml
View file @
e683d9c0
=
render
"projects/issues
/head
"
=
render
"projects/issues
_nav
"
.milestones_content
.milestones_content
%h3
.page-title
%h3
.page-title
Milestones
Milestones
...
...
app/views/projects/milestones/show.html.haml
View file @
e683d9c0
=
render
"projects/issues
/head
"
=
render
"projects/issues
_nav
"
%h3
.page-title
%h3
.page-title
Milestone ##{@milestone.iid}
Milestone ##{@milestone.iid}
.pull-right
.pull-right
...
...
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