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
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
gitlab-ce
Commits
3abd9778
Commit
3abd9778
authored
Nov 03, 2011
by
gitlabhq
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fixed error with ascii error for dashboard
parent
020e1a8e
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
24 additions
and
6 deletions
+24
-6
app/models/issue.rb
app/models/issue.rb
+5
-0
app/models/note.rb
app/models/note.rb
+5
-0
app/views/commits/_commits.html.haml
app/views/commits/_commits.html.haml
+3
-3
app/views/commits/show.html.haml
app/views/commits/show.html.haml
+1
-1
app/views/dashboard/index.html.haml
app/views/dashboard/index.html.haml
+2
-2
lib/commit_ext.rb
lib/commit_ext.rb
+8
-0
No files found.
app/models/issue.rb
View file @
3abd9778
...
@@ -10,6 +10,11 @@ class Issue < ActiveRecord::Base
...
@@ -10,6 +10,11 @@ class Issue < ActiveRecord::Base
validates_presence_of
:assignee_id
validates_presence_of
:assignee_id
validates_presence_of
:author_id
validates_presence_of
:author_id
delegate
:name
,
:email
,
:to
=>
:author
,
:prefix
=>
true
validates
:title
,
validates
:title
,
:presence
=>
true
,
:presence
=>
true
,
:length
=>
{
:within
=>
0
..
255
}
:length
=>
{
:within
=>
0
..
255
}
...
...
app/models/note.rb
View file @
3abd9778
...
@@ -7,6 +7,11 @@ class Note < ActiveRecord::Base
...
@@ -7,6 +7,11 @@ class Note < ActiveRecord::Base
belongs_to
:author
,
belongs_to
:author
,
:class_name
=>
"User"
:class_name
=>
"User"
delegate
:name
,
:email
,
:to
=>
:author
,
:prefix
=>
true
attr_protected
:author
,
:author_id
attr_protected
:author
,
:author_id
validates_presence_of
:project
validates_presence_of
:project
...
...
app/views/commits/_commits.html.haml
View file @
3abd9778
...
@@ -11,15 +11,15 @@
...
@@ -11,15 +11,15 @@
%i
%i
%data
.commit-browse
{
:onclick
=>
"location.href='#{tree_project_path(@project, :commit_id => commit.id)}';return false;"
}
%data
.commit-browse
{
:onclick
=>
"location.href='#{tree_project_path(@project, :commit_id => commit.id)}';return false;"
}
Browse Code
Browse Code
-
if
commit
.
author
.
email
-
if
commit
.
author
_
email
=
image_tag
gravatar_icon
(
commit
.
author
.
email
),
:class
=>
"left"
,
:width
=>
40
,
:style
=>
"padding-right:5px;"
=
image_tag
gravatar_icon
(
commit
.
author
_
email
),
:class
=>
"left"
,
:width
=>
40
,
:style
=>
"padding-right:5px;"
-
else
-
else
=
image_tag
"no_avatar.png"
,
:class
=>
"left"
,
:width
=>
40
,
:style
=>
"padding-right:5px;"
=
image_tag
"no_avatar.png"
,
:class
=>
"left"
,
:width
=>
40
,
:style
=>
"padding-right:5px;"
%span
.commit-title
%span
.commit-title
%strong
%strong
=
truncate
(
commit
.
safe_message
,
:length
=>
60
)
=
truncate
(
commit
.
safe_message
,
:length
=>
60
)
%span
.commit-author
%span
.commit-author
%strong
=
commit
.
author
%strong
=
commit
.
author
_name
=
time_ago_in_words
(
commit
.
committed_date
)
=
time_ago_in_words
(
commit
.
committed_date
)
ago
ago
=
more_commits_link
if
@commits
.
size
>
99
=
more_commits_link
if
@commits
.
size
>
99
app/views/commits/show.html.haml
View file @
3abd9778
...
@@ -7,7 +7,7 @@
...
@@ -7,7 +7,7 @@
%td
=
@commit
.
id
%td
=
@commit
.
id
%tr
%tr
%td
Author
%td
Author
%td
=
@commit
.
author
%td
=
@commit
.
author
_name
%tr
%tr
%td
Commiter
%td
Commiter
%td
=
@commit
.
committer
%td
=
@commit
.
committer
...
...
app/views/dashboard/index.html.haml
View file @
3abd9778
...
@@ -25,11 +25,11 @@
...
@@ -25,11 +25,11 @@
.data
.data
-
project
.
updates
.
each
do
|
update
|
-
project
.
updates
.
each
do
|
update
|
%a
.project-update
{
:href
=>
dashboard_feed_path
(
project
,
update
)}
%a
.project-update
{
:href
=>
dashboard_feed_path
(
project
,
update
)}
=
image_tag
gravatar_icon
(
update
.
author
.
email
),
:class
=>
"left"
,
:width
=>
40
=
image_tag
gravatar_icon
(
update
.
author
_
email
),
:class
=>
"left"
,
:width
=>
40
%span
.update-title
%span
.update-title
=
dashboard_feed_title
(
update
)
=
dashboard_feed_title
(
update
)
%span
.update-author
%span
.update-author
%strong
=
update
.
author
.
name
%strong
=
update
.
author
_
name
authored
authored
=
time_ago_in_words
(
update
.
created_at
)
=
time_ago_in_words
(
update
.
created_at
)
ago
ago
...
...
lib/commit_ext.rb
View file @
3abd9778
...
@@ -12,4 +12,12 @@ module CommitExt
...
@@ -12,4 +12,12 @@ module CommitExt
def
created_at
def
created_at
committed_date
committed_date
end
end
def
author_email
author
.
email
.
force_encoding
(
Encoding
::
UTF_8
)
end
def
author_name
author
.
name
.
force_encoding
(
Encoding
::
UTF_8
)
end
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