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
Léo-Paul Géneau
gitlab-ce
Commits
b1d89f73
Commit
b1d89f73
authored
Mar 25, 2012
by
Dmitriy Zaporozhets
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' of
https://github.com/dubcanada/gitlabhq
into dubcanada-master
parents
d07f8510
3c9a18a0
Changes
12
Hide whitespace changes
Inline
Side-by-side
Showing
12 changed files
with
185 additions
and
45 deletions
+185
-45
app/assets/images/icon-attachment.png
app/assets/images/icon-attachment.png
+0
-0
app/assets/javascripts/note.js
app/assets/javascripts/note.js
+6
-0
app/assets/stylesheets/common.scss
app/assets/stylesheets/common.scss
+101
-5
app/assets/stylesheets/ref_select.scss
app/assets/stylesheets/ref_select.scss
+10
-0
app/models/issue.rb
app/models/issue.rb
+5
-0
app/views/issues/_form.html.haml
app/views/issues/_form.html.haml
+13
-4
app/views/issues/show.html.haml
app/views/issues/show.html.haml
+26
-22
app/views/notes/_form.html.haml
app/views/notes/_form.html.haml
+9
-5
app/views/notes/_show.html.haml
app/views/notes/_show.html.haml
+2
-2
db/migrate/20120317095543_add_description_to_issues.rb
db/migrate/20120317095543_add_description_to_issues.rb
+5
-0
db/schema.rb
db/schema.rb
+1
-0
vendor/assets/stylesheets/chosen.css
vendor/assets/stylesheets/chosen.css
+7
-7
No files found.
app/assets/images/icon-attachment.png
0 → 100644
View file @
b1d89f73
450 Bytes
app/assets/javascripts/note.js
View file @
b1d89f73
...
...
@@ -37,6 +37,12 @@ init:
$
(
'
.attach_holder
'
).
show
();
});
$
(
"
#note_attachment
"
).
change
(
function
(
e
){
var
val
=
$
(
'
.input-file
'
).
val
();
var
filename
=
val
.
replace
(
/^.*
[\\\/]
/
,
''
);
$
(
"
.file_name
"
).
text
(
filename
);
});
},
...
...
app/assets/stylesheets/common.scss
View file @
b1d89f73
...
...
@@ -293,8 +293,14 @@ nav.main_menu {
background-image
:
-o-linear-gradient
(
#eee
6
.6%
,
#dfdfdf
);
@include
shade
;
.count
{
color
:
#aaa
;
margin-left
:
3px
;
margin-left
:
3px
;
color
:
#332
;
background
:
white
;
padding
:
1px
6px
2px
;
font-weight
:
bold
;
-webkit-border-radius
:
9px
;
-moz-border-radius
:
9px
;
border-radius
:
9px
;
}
.label
{
background
:
$hover
;
...
...
@@ -345,8 +351,8 @@ nav.main_menu {
img
.avatar
{
float
:left
;
margin-right
:
1
5
px
;
width
:
40
px
;
margin-right
:
1
0
px
;
width
:
35
px
;
-webkit-border-radius
:
4px
;
-moz-border-radius
:
4px
;
border-radius
:
4px
;
...
...
@@ -372,7 +378,7 @@ img.lil_av {
.wll
{
background-color
:
#FFF
;
padding
:
10px
5
px
;
padding
:
6px
10
px
;
min-height
:
20px
;
border-bottom
:
1px
solid
#eee
;
border-bottom
:
1px
solid
rgba
(
0
,
0
,
0
,
0
.05
);
...
...
@@ -998,6 +1004,41 @@ p.time {
margin
:
2px
;
}
/* Issues Changed */
/* Could probably rewrite this, a bit sloppy */
.well
{
.issue_status.span2
{
width
:
116px
;
.alert-message
{
width
:
34px
;
margin
:
0
0
0
auto
;
.error
{
width
:
40px
;
}
}
}
pre
{
background
:
white
!
important
;
code
{
background
:
none
!
important
;
}
}
}
/* Fix for readme code (stopped it from being yellow) */
.readme
{
pre
{
background
:
white
!
important
;
code
{
background
:
none
!
important
;
}
}
}
.highlight_word
{
background
:
#EEDC94
;
}
...
...
@@ -1040,3 +1081,58 @@ p.time {
border-bottom
:
2px
solid
$style_color
;
}
}
// Fixes alignment on notes.
.new_note
{
label
{
text-align
:left
;
}
}
.issue_notes
{
.input-file
{
font
:
500px
monospace
;
opacity
:
0
;
filter
:
alpha
(
opacity
=
0
);
position
:
absolute
;
z-index
:
1
;
top
:
0
;
right
:
0
;
padding
:
0
;
margin
:
0
;
}
.file_upload
{
position
:
absolute
;
right
:
14px
;
top
:
7px
;
height
:
30px
;
}
div
.attachments
{
position
:relative
;
width
:
350px
;
height
:
30px
;
overflow
:hidden
;
margin
:
0
0
5px
!
important
;
}
.file_name
{
line-height
:
30px
;
width
:
240px
;
height
:
28px
;
overflow
:hidden
;
}
}
// Fix issue with notes & lists creating a bunch of bottom borders.
li
.note
{
.note-title
{
li
{
border-bottom
:none
!
important
;
}
.file
{
padding-left
:
20px
;
background
:url
(
"icon-attachment.png"
)
no-repeat
left
center
;
}
}
}
\ No newline at end of file
app/assets/stylesheets/ref_select.scss
View file @
b1d89f73
...
...
@@ -48,3 +48,13 @@
}
}
/** Fix for Search Dropdown Border **/
.chzn-container
{
.chzn-search
{
input
:focus
{
-webkit-box-shadow
:
none
;
-moz-box-shadow
:
none
;
box-shadow
:
none
;
}
}
}
app/models/issue.rb
View file @
b1d89f73
...
...
@@ -24,6 +24,10 @@ class Issue < ActiveRecord::Base
validates
:title
,
:presence
=>
true
,
:length
=>
{
:within
=>
0
..
255
}
validates
:description
,
:presence
=>
true
,
:length
=>
{
:within
=>
0
..
2000
}
scope
:critical
,
where
(
:critical
=>
true
)
scope
:non_critical
,
where
(
:critical
=>
false
)
...
...
@@ -57,6 +61,7 @@ end
#
# id :integer not null, primary key
# title :string(255)
# description :text
# assignee_id :integer
# author_id :integer
# project_id :integer
...
...
app/views/issues/_form.html.haml
View file @
b1d89f73
...
...
@@ -9,12 +9,18 @@
%li
=
msg
.clearfix
=
f
.
label
:title
.input
=
f
.
text_area
:title
,
:maxlength
=>
255
,
:class
=>
"xxlarge"
=
f
.
label
:title
,
"Issue Subject"
.input
=
f
.
text_field
:title
,
:maxlength
=>
255
.clearfix
=
f
.
label
:description
,
"Issue Details"
.input
=
f
.
text_area
:description
,
:maxlength
=>
2000
,
:class
=>
"xxlarge"
%p
.hint
Markdown is enabled.
.clearfix
=
f
.
label
:assignee_id
.input
=
f
.
select
(
:assignee_id
,
@project
.
users
.
all
.
collect
{
|
p
|
[
p
.
name
,
p
.
id
]
},
{
:include_blank
=>
"
Select
user"
})
.input
=
f
.
select
(
:assignee_id
,
@project
.
users
.
all
.
collect
{
|
p
|
[
p
.
name
,
p
.
id
]
},
{
:include_blank
=>
"
Assign to
user"
})
.clearfix
=
f
.
label
:critical
,
"Critical"
...
...
@@ -26,7 +32,10 @@
.input
=
f
.
check_box
:closed
.actions
=
f
.
submit
'Save'
,
:class
=>
"primary btn"
-
if
@issue
.
new_record?
=
f
.
submit
'Submit new issue'
,
:class
=>
"primary btn"
-
else
=
f
.
submit
'Save changes'
,
:class
=>
"primary btn"
-
if
request
.
xhr?
=
link_to
"Cancel"
,
"#back"
,
:onclick
=>
"backToIssues();"
,
:class
=>
"btn"
...
...
app/views/issues/show.html.haml
View file @
b1d89f73
%h3
Issue ##{@issue.id}
.back_link
=
link_to
project_issues_path
(
@project
)
do
←
To issues list
%h3
#{
@issue
.
title
}
%small
created at
=
@issue
.
created_at
.
stamp
(
"Aug 21, 2011"
)
...
...
@@ -17,33 +21,33 @@
%br
-
if
@issue
.
upvotes
>
0
.upvotes
#upvotes
=
"+
#{
pluralize
@issue
.
upvotes
,
'upvote'
}
"
.back_link
=
link_to
project_issues_path
(
@project
)
do
←
To issues list
%hr
-
if
@issue
.
closed
.alert-message.error
Closed
-
else
.alert-message.success
Open
%div
.well.prettyprint
%div
%cite
.cgray
Created by
=
image_tag
gravatar_icon
(
@issue
.
author_email
),
:width
=>
16
,
:class
=>
"lil_av"
%strong
.author
=
link_to_issue_author
(
@issue
)
%cite
.cgray
and currently assigned to
=
image_tag
gravatar_icon
(
@issue
.
assignee_email
),
:width
=>
16
,
:class
=>
"lil_av"
%strong
.author
=
link_to_issue_assignee
(
@issue
)
%div
.well
%div
.row
%div
.issue_meta.span13
%cite
.cgray
Created by
=
image_tag
gravatar_icon
(
@issue
.
author_email
),
:width
=>
16
,
:class
=>
"lil_av"
%strong
.author
=
link_to_issue_author
(
@issue
)
%cite
.cgray
and currently assigned to
=
image_tag
gravatar_icon
(
@issue
.
assignee_email
),
:width
=>
16
,
:class
=>
"lil_av"
%strong
.author
=
link_to_issue_assignee
(
@issue
)
%div
.issue_status.span2
-
if
@issue
.
closed
.alert-message.error
Closed
-
else
.alert-message.success
Open
%hr
%hr
%div
=
simple_format
@issue
.
title
%div
-
if
@project
.
description
.
present?
=
markdown
@issue
.
description
.issue_notes
#notes
=
render
"notes/notes"
,
:tid
=>
@issue
.
id
,
:tt
=>
"issue"
app/views/notes/_form.html.haml
View file @
b1d89f73
=
form_for
[
@project
,
@note
],
:remote
=>
"true"
,
:multipart
=>
true
do
|
f
|
%h3
Leave a
note
%h3
Leave a
comment
-
if
@note
.
errors
.
any?
.alert-message.block-message.error
-
@note
.
errors
.
full_messages
.
each
do
|
msg
|
...
...
@@ -8,6 +8,7 @@
=
f
.
hidden_field
:noteable_id
=
f
.
hidden_field
:noteable_type
=
f
.
text_area
:note
,
:size
=>
255
%p
.hint
Markdown is enabled.
.row
.span4
...
...
@@ -21,11 +22,14 @@
=
label_tag
:notify_author
do
=
check_box_tag
:notify_author
,
1
,
@note
.
noteable_type
==
"Commit"
%span
Commit author
.span
4
.span
8
%h5
Attachment:
.clearfix
=
f
.
label
:attachment
,
"Any file, < 10 MB"
.input
=
f
.
file_field
:attachment
,
:class
=>
"input-file"
.attachments.breadcrumb
%div
.file_name
File name...
%button
.file_upload.btn.primary
Upload File
.input
=
f
.
file_field
:attachment
,
:class
=>
"input-file"
%span
Any file less then 10 MB
=
f
.
submit
'Add
note
'
,
:class
=>
"btn primary"
,
:id
=>
"submit_note"
=
f
.
submit
'Add
Comment
'
,
:class
=>
"btn primary"
,
:id
=>
"submit_note"
app/views/notes/_show.html.haml
View file @
b1d89f73
...
...
@@ -12,6 +12,6 @@
=
markdown
(
note
.
note
)
-
if
note
.
attachment
.
url
.right
%
span
.file
=
link_to
note
.
attachment_identifier
,
note
.
attachment
.
url
,
:target
=>
"_blank"
%
div
.file
=
link_to
note
.
attachment_identifier
,
note
.
attachment
.
url
,
:target
=>
"_blank"
.clear
db/migrate/20120317095543_add_description_to_issues.rb
0 → 100644
View file @
b1d89f73
class
AddDescriptionToIssues
<
ActiveRecord
::
Migration
def
change
add_column
:issues
,
:description
,
:text
end
end
db/schema.rb
View file @
b1d89f73
...
...
@@ -27,6 +27,7 @@ ActiveRecord::Schema.define(:version => 20120323221339) do
create_table
"issues"
,
:force
=>
true
do
|
t
|
t
.
string
"title"
t
.
text
"description"
t
.
integer
"assignee_id"
t
.
integer
"author_id"
t
.
integer
"project_id"
...
...
vendor/assets/stylesheets/chosen.css
View file @
b1d89f73
...
...
@@ -107,13 +107,13 @@
z-index
:
1010
;
}
.chzn-container-single
.chzn-search
input
{
background
:
#fff
url('chosen-sprite.png')
no-repeat
100%
-2
2
px
;
background
:
url('chosen-sprite.png')
no-repeat
100%
-2
2
px
,
-webkit-gradient
(
linear
,
left
bottom
,
left
top
,
color-stop
(
0.85
,
white
),
color-stop
(
0.99
,
#eeeeee
));
background
:
url('chosen-sprite.png')
no-repeat
100%
-2
2
px
,
-webkit-linear-gradient
(
center
bottom
,
white
85%
,
#eeeeee
99%
);
background
:
url('chosen-sprite.png')
no-repeat
100%
-2
2
px
,
-moz-linear-gradient
(
center
bottom
,
white
85%
,
#eeeeee
99%
);
background
:
url('chosen-sprite.png')
no-repeat
100%
-2
2
px
,
-o-linear-gradient
(
bottom
,
white
85%
,
#eeeeee
99%
);
background
:
url('chosen-sprite.png')
no-repeat
100%
-2
2
px
,
-ms-linear-gradient
(
top
,
#ffffff
85%
,
#eeeeee
99%
);
background
:
url('chosen-sprite.png')
no-repeat
100%
-2
2
px
,
linear-gradient
(
top
,
#ffffff
85%
,
#eeeeee
99%
);
background
:
#fff
url('chosen-sprite.png')
no-repeat
100%
-2
1
px
;
background
:
url('chosen-sprite.png')
no-repeat
100%
-2
1
px
,
-webkit-gradient
(
linear
,
left
bottom
,
left
top
,
color-stop
(
0.85
,
white
),
color-stop
(
0.99
,
#eeeeee
));
background
:
url('chosen-sprite.png')
no-repeat
100%
-2
1
px
,
-webkit-linear-gradient
(
center
bottom
,
white
85%
,
#eeeeee
99%
);
background
:
url('chosen-sprite.png')
no-repeat
100%
-2
1
px
,
-moz-linear-gradient
(
center
bottom
,
white
85%
,
#eeeeee
99%
);
background
:
url('chosen-sprite.png')
no-repeat
100%
-2
1
px
,
-o-linear-gradient
(
bottom
,
white
85%
,
#eeeeee
99%
);
background
:
url('chosen-sprite.png')
no-repeat
100%
-2
1
px
,
-ms-linear-gradient
(
top
,
#ffffff
85%
,
#eeeeee
99%
);
background
:
url('chosen-sprite.png')
no-repeat
100%
-2
1
px
,
linear-gradient
(
top
,
#ffffff
85%
,
#eeeeee
99%
);
margin
:
1px
0
;
padding
:
4px
20px
4px
5px
;
outline
:
0
;
...
...
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