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
iv
gitlab-ce
Commits
50fdb2e7
Commit
50fdb2e7
authored
Jun 27, 2012
by
Dmitriy Zaporozhets
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove critical status from Issue. Move sort instead
parent
1b1e77c7
Changes
12
Hide whitespace changes
Inline
Side-by-side
Showing
12 changed files
with
30 additions
and
65 deletions
+30
-65
app/assets/stylesheets/common.scss
app/assets/stylesheets/common.scss
+0
-12
app/controllers/issues_controller.rb
app/controllers/issues_controller.rb
+1
-1
app/controllers/merge_requests_controller.rb
app/controllers/merge_requests_controller.rb
+1
-1
app/helpers/issues_helper.rb
app/helpers/issues_helper.rb
+0
-1
app/models/issue.rb
app/models/issue.rb
+0
-3
app/models/project.rb
app/models/project.rb
+1
-1
app/views/dashboard/issues.html.haml
app/views/dashboard/issues.html.haml
+0
-9
app/views/issues/_form.html.haml
app/views/issues/_form.html.haml
+16
-16
app/views/issues/_issues.html.haml
app/views/issues/_issues.html.haml
+1
-4
app/views/issues/index.html.haml
app/views/issues/index.html.haml
+0
-15
db/migrate/20120627145613_remove_critical_from_issue.rb
db/migrate/20120627145613_remove_critical_from_issue.rb
+9
-0
db/schema.rb
db/schema.rb
+1
-2
No files found.
app/assets/stylesheets/common.scss
View file @
50fdb2e7
...
@@ -622,10 +622,6 @@ li.note {
...
@@ -622,10 +622,6 @@ li.note {
margin-right
:
5px
;
margin-right
:
5px
;
margin-top
:
2px
;
margin-top
:
2px
;
@include
border-radius
(
4px
);
@include
border-radius
(
4px
);
&
.critical
{
background
:
#EAA
;
border
:
1px
solid
#B88
;
}
&
.today
{
&
.today
{
background
:
#ADA
;
background
:
#ADA
;
border
:
1px
solid
#8B8
;
border
:
1px
solid
#8B8
;
...
@@ -664,14 +660,6 @@ li.note {
...
@@ -664,14 +660,6 @@ li.note {
}
}
}
}
&
.critical
{
background
:
#FEE
;
border-color
:
#ECC
;
.icon
{
background
:
#EAA
;
border
:
1px
solid
#B88
;
}
}
&
.today
{
&
.today
{
background
:
#EFE
;
background
:
#EFE
;
border-color
:
#CEC
;
border-color
:
#CEC
;
...
...
app/controllers/issues_controller.rb
View file @
50fdb2e7
...
@@ -140,7 +140,7 @@ class IssuesController < ApplicationController
...
@@ -140,7 +140,7 @@ class IssuesController < ApplicationController
@issues
=
@issues
.
where
(
:assignee_id
=>
params
[
:assignee_id
])
if
params
[
:assignee_id
].
present?
@issues
=
@issues
.
where
(
:assignee_id
=>
params
[
:assignee_id
])
if
params
[
:assignee_id
].
present?
@issues
=
@issues
.
where
(
:milestone_id
=>
params
[
:milestone_id
])
if
params
[
:milestone_id
].
present?
@issues
=
@issues
.
where
(
:milestone_id
=>
params
[
:milestone_id
])
if
params
[
:milestone_id
].
present?
@issues
=
@issues
.
tagged_with
(
params
[
:label_name
])
if
params
[
:label_name
].
present?
@issues
=
@issues
.
tagged_with
(
params
[
:label_name
])
if
params
[
:label_name
].
present?
@issues
=
@issues
.
includes
(
:author
,
:project
).
order
(
"
critical,
updated_at"
)
@issues
=
@issues
.
includes
(
:author
,
:project
).
order
(
"updated_at"
)
@issues
@issues
end
end
end
end
app/controllers/merge_requests_controller.rb
View file @
50fdb2e7
...
@@ -30,7 +30,7 @@ class MergeRequestsController < ApplicationController
...
@@ -30,7 +30,7 @@ class MergeRequestsController < ApplicationController
else
@merge_requests
.
opened
else
@merge_requests
.
opened
end
.
page
(
params
[
:page
]).
per
(
20
)
end
.
page
(
params
[
:page
]).
per
(
20
)
@merge_requests
=
@merge_requests
.
includes
(
:author
,
:project
).
order
(
"created_at desc"
)
@merge_requests
=
@merge_requests
.
includes
(
:author
,
:project
).
order
(
"c
losed, c
reated_at desc"
)
end
end
def
show
def
show
...
...
app/helpers/issues_helper.rb
View file @
50fdb2e7
...
@@ -28,7 +28,6 @@ module IssuesHelper
...
@@ -28,7 +28,6 @@ module IssuesHelper
def
issue_css_classes
issue
def
issue_css_classes
issue
classes
=
"issue"
classes
=
"issue"
classes
<<
" critical"
if
issue
.
critical
classes
<<
" closed"
if
issue
.
closed
classes
<<
" closed"
if
issue
.
closed
classes
<<
" today"
if
issue
.
today?
classes
<<
" today"
if
issue
.
today?
classes
classes
...
...
app/models/issue.rb
View file @
50fdb2e7
...
@@ -33,9 +33,6 @@ class Issue < ActiveRecord::Base
...
@@ -33,9 +33,6 @@ class Issue < ActiveRecord::Base
validates
:description
,
validates
:description
,
:length
=>
{
:within
=>
0
..
2000
}
:length
=>
{
:within
=>
0
..
2000
}
scope
:critical
,
where
(
:critical
=>
true
)
scope
:non_critical
,
where
(
:critical
=>
false
)
scope
:opened
,
where
(
:closed
=>
false
)
scope
:opened
,
where
(
:closed
=>
false
)
scope
:closed
,
where
(
:closed
=>
true
)
scope
:closed
,
where
(
:closed
=>
true
)
scope
:assigned
,
lambda
{
|
u
|
where
(
:assignee_id
=>
u
.
id
)}
scope
:assigned
,
lambda
{
|
u
|
where
(
:assignee_id
=>
u
.
id
)}
...
...
app/models/project.rb
View file @
50fdb2e7
...
@@ -13,7 +13,7 @@ class Project < ActiveRecord::Base
...
@@ -13,7 +13,7 @@ class Project < ActiveRecord::Base
has_many
:users
,
:through
=>
:users_projects
has_many
:users
,
:through
=>
:users_projects
has_many
:events
,
:dependent
=>
:destroy
has_many
:events
,
:dependent
=>
:destroy
has_many
:merge_requests
,
:dependent
=>
:destroy
has_many
:merge_requests
,
:dependent
=>
:destroy
has_many
:issues
,
:dependent
=>
:destroy
,
:order
=>
"position"
has_many
:issues
,
:dependent
=>
:destroy
,
:order
=>
"
closed,
position"
has_many
:milestones
,
:dependent
=>
:destroy
has_many
:milestones
,
:dependent
=>
:destroy
has_many
:users_projects
,
:dependent
=>
:destroy
has_many
:users_projects
,
:dependent
=>
:destroy
has_many
:notes
,
:dependent
=>
:destroy
has_many
:notes
,
:dependent
=>
:destroy
...
...
app/views/dashboard/issues.html.haml
View file @
50fdb2e7
...
@@ -3,15 +3,6 @@
...
@@ -3,15 +3,6 @@
%small
(assigned to you)
%small
(assigned to you)
%small
.right
#{
@issues
.
total_count
}
issues
%small
.right
#{
@issues
.
total_count
}
issues
%br
.issues_legend
.list_legend
.icon.critical
.text
Critical
.list_legend
.icon.today
.text
Today
.clearfix
.clearfix
-
if
@issues
.
any?
-
if
@issues
.
any?
-
@issues
.
group_by
(
&
:project
).
each
do
|
group
|
-
@issues
.
group_by
(
&
:project
).
each
do
|
group
|
...
...
app/views/issues/_form.html.haml
View file @
50fdb2e7
...
@@ -9,37 +9,37 @@
...
@@ -9,37 +9,37 @@
.issue_form_box
.issue_form_box
.issue_title
.issue_title
.clearfix
.clearfix
=
f
.
label
:title
,
"Issue Subject *"
=
f
.
label
:title
do
%strong
=
"Subject *"
.input
.input
=
f
.
text_field
:title
,
:maxlength
=>
255
,
:class
=>
"xxlarge"
=
f
.
text_field
:title
,
:maxlength
=>
255
,
:class
=>
"xxlarge"
.issue_middle_block
.issue_middle_block
.issue_assignee
.issue_assignee
=
f
.
label
:assignee_id
,
"Assign to"
=
f
.
label
:assignee_id
do
.input
=
f
.
select
(
:assignee_id
,
@project
.
users
.
all
.
collect
{
|
p
|
[
p
.
name
,
p
.
id
]
},
{
:include_blank
=>
"Assign to user"
})
%i
.icon-user
Assign to
.input
=
f
.
select
(
:assignee_id
,
@project
.
users
.
all
.
collect
{
|
p
|
[
p
.
name
,
p
.
id
]
},
{
:include_blank
=>
"Select a user"
})
.issue_milestone
.issue_milestone
=
f
.
label
:milestone_id
=
f
.
label
:milestone_id
do
%i
.icon-time
Milestone
.input
=
f
.
select
(
:milestone_id
,
@project
.
milestones
.
active
.
all
.
collect
{
|
p
|
[
p
.
title
,
p
.
id
]
},
{
:include_blank
=>
"Select milestone"
})
.input
=
f
.
select
(
:milestone_id
,
@project
.
milestones
.
active
.
all
.
collect
{
|
p
|
[
p
.
title
,
p
.
id
]
},
{
:include_blank
=>
"Select milestone"
})
.issue_description
.issue_description
.clearfix
.clearfix
=
f
.
label
:critical
,
"Critical"
=
f
.
label
:label_list
do
.input
=
f
.
check_box
:critical
%i
.icon-tag
Labels
.input
=
f
.
text_field
:label_list
,
:maxlength
=>
2000
,
:class
=>
"xxlarge"
%p
.hint
Separate with comma.
-
unless
@issue
.
new_record?
.clearfix
=
f
.
label
:closed
.input
=
f
.
check_box
:closed
.clearfix
.clearfix
=
f
.
label
:description
,
"
Issue
Details"
=
f
.
label
:description
,
"Details"
.input
.input
=
f
.
text_area
:description
,
:maxlength
=>
2000
,
:class
=>
"xxlarge"
,
:rows
=>
14
=
f
.
text_area
:description
,
:maxlength
=>
2000
,
:class
=>
"xxlarge"
,
:rows
=>
14
%p
.hint
Markdown is enabled.
%p
.hint
Markdown is enabled.
.clearfix
=
f
.
label
:label_list
,
"Labels"
.input
=
f
.
text_field
:label_list
,
:maxlength
=>
2000
,
:class
=>
"xxlarge"
%p
.hint
Separate with comma.
.actions
.actions
-
if
@issue
.
new_record?
-
if
@issue
.
new_record?
...
...
app/views/issues/_issues.html.haml
View file @
50fdb2e7
-
@issues
.
select
(
&
:critical
).
each
do
|
issue
|
-
@issues
.
each
do
|
issue
|
=
render
(
:partial
=>
'issues/show'
,
:locals
=>
{
:issue
=>
issue
})
-
@issues
.
reject
(
&
:critical
).
each
do
|
issue
|
=
render
(
:partial
=>
'issues/show'
,
:locals
=>
{
:issue
=>
issue
})
=
render
(
:partial
=>
'issues/show'
,
:locals
=>
{
:issue
=>
issue
})
-
if
@issues
.
present?
-
if
@issues
.
present?
...
...
app/views/issues/index.html.haml
View file @
50fdb2e7
...
@@ -13,22 +13,7 @@
...
@@ -13,22 +13,7 @@
=
hidden_field_tag
:status
,
params
[
:f
]
=
hidden_field_tag
:status
,
params
[
:f
]
=
search_field_tag
:issue_search
,
nil
,
{
:placeholder
=>
'Search'
,
:class
=>
'issue_search span3 right neib'
}
=
search_field_tag
:issue_search
,
nil
,
{
:placeholder
=>
'Search'
,
:class
=>
'issue_search span3 right neib'
}
%br
.issues_legend
.list_legend
.icon.today
.text
Today
.list_legend
.icon.critical
.text
Critical
.list_legend
.icon.closed
.text
Closed
.clearfix
.clearfix
%div
#issues-table-holder
.ui-box
%div
#issues-table-holder
.ui-box
.title
.title
.left
.left
...
...
db/migrate/20120627145613_remove_critical_from_issue.rb
0 → 100644
View file @
50fdb2e7
class
RemoveCriticalFromIssue
<
ActiveRecord
::
Migration
def
up
remove_column
:issues
,
:critical
end
def
down
add_column
:issues
,
:critical
,
:boolean
,
:null
=>
true
,
:default
=>
false
end
end
db/schema.rb
View file @
50fdb2e7
...
@@ -11,7 +11,7 @@
...
@@ -11,7 +11,7 @@
#
#
# It's strongly recommended to check this file into your version control system.
# It's strongly recommended to check this file into your version control system.
ActiveRecord
::
Schema
.
define
(
:version
=>
20120
413135904
)
do
ActiveRecord
::
Schema
.
define
(
:version
=>
20120
627145613
)
do
create_table
"events"
,
:force
=>
true
do
|
t
|
create_table
"events"
,
:force
=>
true
do
|
t
|
t
.
string
"target_type"
t
.
string
"target_type"
...
@@ -34,7 +34,6 @@ ActiveRecord::Schema.define(:version => 20120413135904) do
...
@@ -34,7 +34,6 @@ ActiveRecord::Schema.define(:version => 20120413135904) do
t
.
datetime
"updated_at"
,
:null
=>
false
t
.
datetime
"updated_at"
,
:null
=>
false
t
.
boolean
"closed"
,
:default
=>
false
,
:null
=>
false
t
.
boolean
"closed"
,
:default
=>
false
,
:null
=>
false
t
.
integer
"position"
,
:default
=>
0
t
.
integer
"position"
,
:default
=>
0
t
.
boolean
"critical"
,
:default
=>
false
,
:null
=>
false
t
.
string
"branch_name"
t
.
string
"branch_name"
t
.
text
"description"
t
.
text
"description"
t
.
integer
"milestone_id"
t
.
integer
"milestone_id"
...
...
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