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
48924dfe
Commit
48924dfe
authored
Oct 20, 2011
by
gitlabhq
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Wall redesign
parent
59704f48
Changes
12
Hide whitespace changes
Inline
Side-by-side
Showing
12 changed files
with
89 additions
and
36 deletions
+89
-36
app/assets/javascripts/application.js
app/assets/javascripts/application.js
+4
-0
app/assets/stylesheets/projects.css.scss
app/assets/stylesheets/projects.css.scss
+28
-4
app/controllers/projects_controller.rb
app/controllers/projects_controller.rb
+9
-2
app/views/commits/_commits.html.haml
app/views/commits/_commits.html.haml
+2
-2
app/views/commits/show.js.haml
app/views/commits/show.js.haml
+3
-1
app/views/notes/_form.html.haml
app/views/notes/_form.html.haml
+2
-2
app/views/notes/_notes.html.haml
app/views/notes/_notes.html.haml
+8
-9
app/views/notes/_show.html.haml
app/views/notes/_show.html.haml
+5
-7
app/views/notes/create.js.haml
app/views/notes/create.js.haml
+1
-1
app/views/projects/_recent_commits.html.haml
app/views/projects/_recent_commits.html.haml
+2
-2
app/views/projects/_recent_messages.html.haml
app/views/projects/_recent_messages.html.haml
+0
-6
app/views/projects/wall.html.haml
app/views/projects/wall.html.haml
+25
-0
No files found.
app/assets/javascripts/application.js
View file @
48924dfe
...
@@ -16,3 +16,7 @@ $(function(){
...
@@ -16,3 +16,7 @@ $(function(){
$
(
'
select#branch
'
).
selectmenu
({
style
:
'
popup
'
,
width
:
200
});
$
(
'
select#branch
'
).
selectmenu
({
style
:
'
popup
'
,
width
:
200
});
$
(
'
select#tag
'
).
selectmenu
({
style
:
'
popup
'
,
width
:
200
});
$
(
'
select#tag
'
).
selectmenu
({
style
:
'
popup
'
,
width
:
200
});
});
});
function
updatePage
(){
$
.
ajax
({
type
:
"
GET
"
,
url
:
location
.
href
,
dataType
:
"
script
"
});
}
app/assets/stylesheets/projects.css.scss
View file @
48924dfe
...
@@ -491,8 +491,14 @@ tbody tr:nth-child(2n) td, tbody tr.even td {
...
@@ -491,8 +491,14 @@ tbody tr:nth-child(2n) td, tbody tr.even td {
background
:
white
;
background
:
white
;
}
}
p
{
p
{
margin-bottom
:
3px
;
margin-bottom
:
4px
;
font-size
:
12px
;
font-size
:
13px
;
color
:
#111
;
}
}
cite
{
&
.ago
{
color
:
#666
;
}
}
}
}
}
}
...
@@ -515,7 +521,7 @@ tbody tr:nth-child(2n) td, tbody tr.even td {
...
@@ -515,7 +521,7 @@ tbody tr:nth-child(2n) td, tbody tr.even td {
}
}
.note_content
{
.note_content
{
float
:left
;
float
:left
;
width
:
7
50px
;
width
:
6
50px
;
}
}
.issue_notes
{
.issue_notes
{
...
@@ -605,7 +611,9 @@ tbody tr:nth-child(2n) td, tbody tr.even td {
...
@@ -605,7 +611,9 @@ tbody tr:nth-child(2n) td, tbody tr.even td {
}
}
}
}
.message
{
.commit
,
.message
,
#notes-list
{
.author
{
.author
{
background
:
#eaeaea
;
background
:
#eaeaea
;
color
:
#333
;
color
:
#333
;
...
@@ -614,3 +622,19 @@ tbody tr:nth-child(2n) td, tbody tr.even td {
...
@@ -614,3 +622,19 @@ tbody tr:nth-child(2n) td, tbody tr.even td {
margin-right
:
5px
;
margin-right
:
5px
;
}
}
}
}
/* Note textare */
#note_note
{
height
:
100px
;
width
:
97%
;
font-size
:
14px
;
}
.wall_page
{
#note_note
{
height
:
25px
;
}
.attach_holder
{
display
:none
;
}
}
app/controllers/projects_controller.rb
View file @
48924dfe
...
@@ -75,7 +75,7 @@ class ProjectsController < ApplicationController
...
@@ -75,7 +75,7 @@ class ProjectsController < ApplicationController
y
.
committed_date
<=>
x
.
committed_date
y
.
committed_date
<=>
x
.
committed_date
end
end
@messages
=
project
.
notes
.
since
(
@date
).
limit
(
40
).
order
(
"created_at DESC"
)
@messages
=
project
.
notes
.
since
(
@date
).
order
(
"created_at DESC"
)
else
else
return
render
"projects/empty"
return
render
"projects/empty"
end
end
...
@@ -86,7 +86,14 @@ class ProjectsController < ApplicationController
...
@@ -86,7 +86,14 @@ class ProjectsController < ApplicationController
#
#
def
wall
def
wall
@notes
=
@project
.
common_notes
@date
=
case
params
[
:view
]
when
"week"
then
Date
.
today
-
7
.
days
when
"all"
then
nil
else
Date
.
today
end
@notes
=
@project
.
common_notes
.
order
(
"created_at DESC"
)
@notes
=
@notes
.
since
(
@date
.
at_beginning_of_day
)
if
@date
@note
=
Note
.
new
@note
=
Note
.
new
end
end
...
...
app/views/commits/_commits.html.haml
View file @
48924dfe
...
@@ -15,8 +15,8 @@
...
@@ -15,8 +15,8 @@
=
link_to
"Browse Code"
,
tree_project_path
(
@project
,
:commit_id
=>
commit
.
id
),
:class
=>
"lite_button"
,
:style
=>
"float:right"
=
link_to
"Browse Code"
,
tree_project_path
(
@project
,
:commit_id
=>
commit
.
id
),
:class
=>
"lite_button"
,
:style
=>
"float:right"
=
link_to
truncate
(
commit
.
id
.
to_s
,
:length
=>
16
),
project_commit_path
(
@project
,
:id
=>
commit
.
id
),
:class
=>
"lite_button"
,
:style
=>
"width:120px;float:right"
=
link_to
truncate
(
commit
.
id
.
to_s
,
:length
=>
16
),
project_commit_path
(
@project
,
:id
=>
commit
.
id
),
:class
=>
"lite_button"
,
:style
=>
"width:120px;float:right"
%span
%span
%span
%span
.author
[
#{
commit
.
author
}
]
=
commit
.
author
=
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.js.haml
View file @
48924dfe
:plain
-#
:plain
$("#side-commit-preview").remove();
$("#side-commit-preview").remove();
var side = $("<div id='side-commit-preview'></div>");
var side = $("<div id='side-commit-preview'></div>");
side.html("#{escape_javascript(render "commits/show")}");
side.html("#{escape_javascript(render "commits/show")}");
$("##{dom_id(@project)}").parent().append(side);
$("##{dom_id(@project)}").parent().append(side);
$("##{dom_id(@project)}").addClass("span-14");
$("##{dom_id(@project)}").addClass("span-14");
:plain
$("#notes-list").html("
#{
escape_javascript
(
render
(
:partial
=>
'notes/notes_list'
))
}
");
app/views/notes/_form.html.haml
View file @
48924dfe
...
@@ -12,9 +12,9 @@
...
@@ -12,9 +12,9 @@
=
f
.
label
:note
=
f
.
label
:note
%cite
(255 symbols only)
%cite
(255 symbols only)
%br
%br
=
f
.
text_area
:note
,
:style
=>
"width:97%;height:100px"
,
:size
=>
255
=
f
.
text_area
:note
,
:size
=>
255
%div
%div
.attach_holder
=
f
.
label
:attachment
=
f
.
label
:attachment
%cite
(less than 10 MB)
%cite
(less than 10 MB)
%br
%br
...
...
app/views/notes/_notes.html.haml
View file @
48924dfe
%ul
#notes-list
=
render
"notes/notes_list"
-
if
controller
.
action_name
==
"wall"
%ul
#notes-list
=
render
"notes/notes_list"
%br
-
else
%br
%ul
#notes-list
=
render
"notes/notes_list"
-
if
can?
current_user
,
:write_note
,
@project
%br
=
render
"notes/form"
%br
-
if
can?
current_user
,
:write_note
,
@project
=
render
"notes/form"
:javascript
:javascript
$
(
'
.delete-note
'
).
live
(
'
ajax:success
'
,
function
()
{
$
(
'
.delete-note
'
).
live
(
'
ajax:success
'
,
function
()
{
...
@@ -23,7 +26,3 @@
...
@@ -23,7 +26,3 @@
$
(
function
(){
$
(
function
(){
var
int
=
self
.
setInterval
(
"
updatePage()
"
,
20000
);
var
int
=
self
.
setInterval
(
"
updatePage()
"
,
20000
);
});
});
function
updatePage
(){
$
.
ajax
({
type
:
"
GET
"
,
url
:
location
.
href
,
dataType
:
"
script
"
});
}
app/views/notes/_show.html.haml
View file @
48924dfe
%li
{
:id
=>
dom_id
(
note
)}
%li
{
:id
=>
dom_id
(
note
)}
%div
.note_author
%div
.note_author
=
image_tag
gravatar_icon
(
note
.
author
.
email
),
:class
=>
"left"
,
:width
=>
40
,
:style
=>
"padding-right:5px;"
=
image_tag
gravatar_icon
(
note
.
author
.
email
),
:class
=>
"left"
,
:width
=>
40
,
:style
=>
"padding-right:5px;"
%div
.note_content
%div
.note_content
.left
=
simple_format
(
html_escape
(
note
.
note
))
=
simple_format
(
html_escape
(
note
.
note
))
-
if
note
.
attachment
.
url
-
if
note
.
attachment
.
url
Attachment:
Attachment:
=
link_to
note
.
attachment_identifier
,
note
.
attachment
.
url
=
link_to
note
.
attachment_identifier
,
note
.
attachment
.
url
,
:target
=>
"_blank"
%br
%br
%span
%span
.author
=
note
.
author
.
name
%span
%cite
.ago
[
#{
note
.
author
.
name
}
]
=
time_ago_in_words
(
note
.
updated_at
)
=
time_ago_in_words
(
note
.
updated_at
)
ago
ago
%br
%br
-
if
(
note
.
author_id
==
current_user
.
id
)
||
can?
(
current_user
,
:admin_note
,
@project
)
-
if
(
note
.
author_id
==
current_user
.
id
)
||
can?
(
current_user
,
:admin_note
,
@project
)
=
link_to
'Remove'
,
[
@project
,
note
],
:confirm
=>
'Are you sure?'
,
:method
=>
:delete
,
:remote
=>
true
,
:class
=>
"lbutton delete-note right negative"
=
link_to
'Remove'
,
[
@project
,
note
],
:confirm
=>
'Are you sure?'
,
:method
=>
:delete
,
:remote
=>
true
,
:class
=>
"lbutton delete-note right negative"
.clear
.clear
app/views/notes/create.js.haml
View file @
48924dfe
-
if
@note
.
valid?
-
if
@note
.
valid?
:plain
:plain
$("#new_note .errors").remove();
$("#new_note .errors").remove();
$("#notes-list").append("
#{
escape_javascript
(
render
(
:partial
=>
'show'
,
:locals
=>
{
:note
=>
@note
}
))
}
"
);
updatePage(
);
$('#note_note').val("");
$('#note_note').val("");
-
else
-
else
:plain
:plain
...
...
app/views/projects/_recent_commits.html.haml
View file @
48924dfe
...
@@ -9,8 +9,8 @@
...
@@ -9,8 +9,8 @@
=
link_to
truncate_commit_message
(
commit
,
60
),
project_commit_path
(
@project
,
:id
=>
commit
.
id
)
=
link_to
truncate_commit_message
(
commit
,
60
),
project_commit_path
(
@project
,
:id
=>
commit
.
id
)
%span
%span
%span
%span
.author
[
#{
commit
.
author
}
]
=
commit
.
author
.
name
.
force_encoding
(
"UTF-8"
)
%cite
%cite
=
time_ago_in_words
(
commit
.
committed_date
)
=
time_ago_in_words
(
commit
.
committed_date
)
ago
ago
...
...
app/views/projects/_recent_messages.html.haml
View file @
48924dfe
...
@@ -46,12 +46,6 @@
...
@@ -46,12 +46,6 @@
Attachment:
Attachment:
=
link_to
note
.
attachment_identifier
,
note
.
attachment
.
url
=
link_to
note
.
attachment_identifier
,
note
.
attachment
.
url
%br
%br
-#%span
%span
[ #{note.author.name} ]
%cite
= time_ago_in_words(note.created_at)
ago
%br
%br
.append-bottom
.append-bottom
...
...
app/views/projects/wall.html.haml
View file @
48924dfe
%div
.wall_page
-
if
can?
current_user
,
:write_note
,
@project
=
render
"notes/form"
.right
=
form_tag
wall_project_path
(
@project
),
:method
=>
:get
do
.span-2
=
radio_button_tag
:view
,
"day"
,
(
params
[
:view
]
||
"day"
)
==
"day"
,
:onclick
=>
"this.form.submit()"
,
:id
=>
"day_view"
=
label_tag
"day_view"
,
"Today"
.span-2
=
radio_button_tag
:view
,
"week"
,
params
[
:view
]
==
"week"
,
:onclick
=>
"this.form.submit()"
,
:id
=>
"week_view"
=
label_tag
"week_view"
,
"Week"
.span-2
=
radio_button_tag
:view
,
"all"
,
params
[
:view
]
==
"all"
,
:onclick
=>
"this.form.submit()"
,
:id
=>
"all_view"
=
label_tag
"all_view"
,
"All"
.clear
%br
%hr
=
render
"notes/notes"
=
render
"notes/notes"
:javascript
$
(
function
(){
$
(
"
#note_note
"
).
live
(
"
click
"
,
function
(){
$
(
this
).
css
(
"
height
"
,
"
100px
"
);
$
(
'
.attach_holder
'
).
show
();
});
});
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