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
6323cdda
Commit
6323cdda
authored
Nov 05, 2011
by
Aleksei Kvitinskii
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'dev' into issue-184
parents
b946da44
0b0e0225
Changes
27
Show whitespace changes
Inline
Side-by-side
Showing
27 changed files
with
195 additions
and
154 deletions
+195
-154
app/assets/images/ajax-loader.gif
app/assets/images/ajax-loader.gif
+0
-0
app/assets/javascripts/application.js
app/assets/javascripts/application.js
+2
-2
app/assets/javascripts/note.js
app/assets/javascripts/note.js
+65
-0
app/assets/stylesheets/projects.css.scss
app/assets/stylesheets/projects.css.scss
+10
-36
app/assets/stylesheets/style.scss
app/assets/stylesheets/style.scss
+1
-1
app/controllers/application_controller.rb
app/controllers/application_controller.rb
+10
-0
app/controllers/commits_controller.rb
app/controllers/commits_controller.rb
+7
-4
app/controllers/issues_controller.rb
app/controllers/issues_controller.rb
+9
-1
app/controllers/projects_controller.rb
app/controllers/projects_controller.rb
+8
-6
app/helpers/application_helper.rb
app/helpers/application_helper.rb
+8
-0
app/views/commits/index.html.haml
app/views/commits/index.html.haml
+1
-1
app/views/commits/show.js.haml
app/views/commits/show.js.haml
+1
-8
app/views/issues/show.html.haml
app/views/issues/show.html.haml
+3
-6
app/views/issues/show.js.haml
app/views/issues/show.js.haml
+1
-2
app/views/layouts/_head_panel.html.erb
app/views/layouts/_head_panel.html.erb
+24
-27
app/views/layouts/admin.html.haml
app/views/layouts/admin.html.haml
+1
-1
app/views/layouts/application.html.haml
app/views/layouts/application.html.haml
+1
-1
app/views/layouts/profile.html.haml
app/views/layouts/profile.html.haml
+1
-1
app/views/layouts/project.html.haml
app/views/layouts/project.html.haml
+1
-1
app/views/notes/_load.js.haml
app/views/notes/_load.js.haml
+10
-0
app/views/notes/_notes.html.haml
app/views/notes/_notes.html.haml
+12
-13
app/views/notes/_show.html.haml
app/views/notes/_show.html.haml
+11
-11
app/views/notes/create.js.haml
app/views/notes/create.js.haml
+1
-1
app/views/projects/_refs.html.haml
app/views/projects/_refs.html.haml
+1
-1
app/views/projects/_tree.html.haml
app/views/projects/_tree.html.haml
+1
-1
app/views/projects/wall.html.haml
app/views/projects/wall.html.haml
+4
-27
app/views/projects/wall.js.haml
app/views/projects/wall.js.haml
+1
-2
No files found.
app/assets/images/ajax-loader.gif
View replaced file @
b946da44
View file @
6323cdda
6.66 KB
|
W:
|
H:
4.08 KB
|
W:
|
H:
2-up
Swipe
Onion skin
app/assets/javascripts/application.js
View file @
6323cdda
...
...
@@ -21,6 +21,6 @@ $(function(){
$
(
'
select#tag
'
).
selectmenu
({
style
:
'
popup
'
,
width
:
200
});
});
function
updatePage
(){
$
.
ajax
({
type
:
"
GET
"
,
url
:
location
.
href
,
dataType
:
"
script
"
});
function
updatePage
(
data
){
$
.
ajax
({
type
:
"
GET
"
,
url
:
location
.
href
,
data
:
data
,
data
Type
:
"
script
"
});
}
app/assets/javascripts/note.js
0 → 100644
View file @
6323cdda
var
NoteList
=
{
first_id
:
0
,
last_id
:
0
,
resource_name
:
null
,
init
:
function
(
resource_name
,
first_id
,
last_id
)
{
this
.
resource_name
=
resource_name
;
this
.
first_id
=
first_id
;
this
.
last_id
=
last_id
;
this
.
initRefresh
();
this
.
initLoadMore
();
},
getOld
:
function
()
{
$
(
'
.loading
'
).
show
();
$
.
ajax
({
type
:
"
GET
"
,
url
:
location
.
href
,
data
:
"
first_id=
"
+
this
.
first_id
,
complete
:
function
(){
$
(
'
.loading
'
).
hide
()},
dataType
:
"
script
"
});
},
append
:
function
(
id
,
html
)
{
this
.
first_id
=
id
;
$
(
"
#notes-list
"
).
append
(
html
);
this
.
initLoadMore
();
},
prepend
:
function
(
id
,
html
)
{
this
.
last_id
=
id
;
$
(
"
#notes-list
"
).
prepend
(
html
);
},
getNew
:
function
()
{
// refersh notes list
$
.
ajax
({
type
:
"
GET
"
,
url
:
location
.
href
,
data
:
"
last_id=
"
+
this
.
last_id
,
dataType
:
"
script
"
});
},
initRefresh
:
function
()
{
// init timer
var
int
=
setInterval
(
"
NoteList.getNew()
"
,
20000
);
},
initLoadMore
:
function
()
{
$
(
window
).
bind
(
'
scroll
'
,
function
(){
if
(
$
(
window
).
scrollTop
()
==
$
(
document
).
height
()
-
$
(
window
).
height
()){
$
(
window
).
unbind
(
'
scroll
'
);
NoteList
.
getOld
();
}
});
}
}
app/assets/stylesheets/projects.css.scss
View file @
6323cdda
...
...
@@ -421,31 +421,6 @@ input.ssh_project_url {
list-style
:none
;
margin
:
0px
;
padding
:
0px
;
li
{
display
:list-item
;
padding
:
8px
;
margin
:
0px
;
background
:
#F7FBFC
;
border-top
:
1px
solid
#E2EAEE
;
&
:first-child
{
border-top
:
none
;
}
&
:nth-child
(
2n
+
1
)
{
background
:
white
;
}
p
{
margin-bottom
:
4px
;
font-size
:
13px
;
color
:
#111
;
}
}
cite
{
&
.ago
{
color
:
#666
;
}
}
}
.notes_count
{
...
...
@@ -460,14 +435,6 @@ input.ssh_project_url {
right
:
6px
;
top
:
6px
;
}
.note_author
{
float
:left
;
width
:
60px
;
}
.note_content
{
float
:left
;
width
:
650px
;
}
.issue_notes
{
.note_content
{
...
...
@@ -556,8 +523,7 @@ input.ssh_project_url {
}
.commit
,
.message
,
#notes-list
{
.message
{
.author
{
background
:
#eaeaea
;
color
:
#333
;
...
...
@@ -574,7 +540,7 @@ input.ssh_project_url {
font-size
:
14px
;
}
.wall_pag
e
{
#new_not
e
{
#note_note
{
height
:
25px
;
}
...
...
@@ -719,3 +685,11 @@ table.highlighttable pre{
.project-refs-select
{
width
:
200px
;
}
body
.project-page
#notes-list
.note
{
padding
:
10px
;
border-bottom
:
1px
solid
#eee
;
overflow
:
hidden
;
display
:
block
;}
body
.project-page
#notes-list
.note
{
padding
:
10px
;
border-bottom
:
1px
solid
#eee
;
overflow
:
hidden
;
display
:
block
;}
body
.project-page
#notes-list
.note
img
{
float
:
left
;
margin-right
:
10px
;}
body
.project-page
#notes-list
.note
span
.note-title
{
display
:
block
;}
body
.project-page
#notes-list
.note
span
.note-title
{
margin-bottom
:
10px
}
body
.project-page
#notes-list
.note
span
.note-author
{
color
:
#999
;
font-weight
:
normal
;
font-style
:
italic
;}
body
.project-page
#notes-list
.note
span
.note-author
strong
{
font-weight
:
bold
;
font-style
:
normal
;}
app/assets/stylesheets/style.scss
View file @
6323cdda
...
...
@@ -292,7 +292,7 @@ body.login-page{background-color: #f1f1f1; padding-top: 10%}
/* General */
#container
{
background-color
:
white
;
overflow
:
hidden
;}
/*#container{margin: auto; width: 980px; border: 1px solid rgba(0,0,0,.22); border-top: 0; box-shadow: 0 0 0px 4px rgba(0,0,0,.04)}*/
body
.collapsed
#container
{
margin
:
auto
;
width
:
980px
;
border
:
1px
solid
rgba
(
0
,
0
,
0
,.
22
);
border-top
:
0
;
box-shadow
:
0
0
0px
4px
rgba
(
0
,
0
,
0
,.
04
)}
...
...
app/controllers/application_controller.rb
View file @
6323cdda
class
ApplicationController
<
ActionController
::
Base
before_filter
:authenticate_user!
before_filter
:view_style
protect_from_forgery
helper_method
:abilities
,
:can?
...
...
@@ -73,4 +75,12 @@ class ApplicationController < ActionController::Base
def
require_non_empty_project
redirect_to
@project
unless
@project
.
repo_exists?
end
def
view_style
if
params
[
:view_style
]
==
"collapsed"
cookies
[
:view_style
]
=
"collapsed"
elsif
params
[
:view_style
]
==
"fluid"
cookies
[
:view_style
]
=
""
end
end
end
app/controllers/commits_controller.rb
View file @
6323cdda
...
...
@@ -28,12 +28,15 @@ class CommitsController < ApplicationController
def
show
@commit
=
project
.
repo
.
commits
(
params
[
:id
]).
first
@notes
=
project
.
notes
.
where
(
:noteable_id
=>
@commit
.
id
,
:noteable_type
=>
"Commit"
)
@notes
=
project
.
notes
.
where
(
:noteable_id
=>
@commit
.
id
,
:noteable_type
=>
"Commit"
)
.
order
(
"created_at DESC"
).
limit
(
20
)
@note
=
@project
.
notes
.
new
(
:noteable_id
=>
@commit
.
id
,
:noteable_type
=>
"Commit"
)
respond_to
do
|
format
|
format
.
html
# show.html.erb
format
.
js
format
.
html
format
.
js
do
@notes
=
@notes
.
where
(
"id > ?"
,
params
[
:last_id
])
if
params
[
:last_id
]
@notes
=
@notes
.
where
(
"id < ?"
,
params
[
:first_id
])
if
params
[
:first_id
]
end
end
end
end
app/controllers/issues_controller.rb
View file @
6323cdda
...
...
@@ -35,8 +35,16 @@ class IssuesController < ApplicationController
end
def
show
@notes
=
@issue
.
notes
.
order
(
"created_at
ASC"
)
@notes
=
@issue
.
notes
.
order
(
"created_at
DESC"
).
limit
(
20
)
@note
=
@project
.
notes
.
new
(
:noteable
=>
@issue
)
respond_to
do
|
format
|
format
.
html
format
.
js
do
@notes
=
@notes
.
where
(
"id > ?"
,
params
[
:last_id
])
if
params
[
:last_id
]
@notes
=
@notes
.
where
(
"id < ?"
,
params
[
:first_id
])
if
params
[
:first_id
]
end
end
end
def
create
...
...
app/controllers/projects_controller.rb
View file @
6323cdda
...
...
@@ -86,12 +86,14 @@ class ProjectsController < ApplicationController
def
wall
@note
=
Note
.
new
@notes
=
@project
.
common_notes
.
order
(
"created_at DESC"
)
@notes
=
@notes
.
fresh
.
limit
(
20
)
@notes
=
case
params
[
:view
]
when
"week"
then
@notes
.
since
((
Date
.
today
-
7
.
days
).
at_beginning_of_day
)
when
"all"
then
@notes
.
all
when
"day"
then
@notes
.
since
(
Date
.
today
.
at_beginning_of_day
)
else
@notes
.
fresh
.
limit
(
10
)
respond_to
do
|
format
|
format
.
html
format
.
js
do
@notes
=
@notes
.
where
(
"id > ?"
,
params
[
:last_id
])
if
params
[
:last_id
]
@notes
=
@notes
.
where
(
"id < ?"
,
params
[
:first_id
])
if
params
[
:first_id
]
end
end
end
...
...
app/helpers/application_helper.rb
View file @
6323cdda
...
...
@@ -4,6 +4,14 @@ module ApplicationHelper
"http://www.gravatar.com/avatar/
#{
Digest
::
MD5
.
hexdigest
(
user_email
)
}
?s=40&d=identicon"
end
def
body_class
(
default_class
=
nil
)
main
=
content_for
(
:body_class
).
blank?
?
default_class
:
content_for
(
:body_class
)
[
main
,
cookies
[
:view_style
]].
join
(
" "
)
end
def
commit_name
(
project
,
commit
)
if
project
.
commit
.
id
==
commit
.
id
"master"
...
...
app/views/commits/index.html.haml
View file @
6323cdda
...
...
@@ -12,7 +12,7 @@
\/
%a
{
:href
=>
"#"
}=
params
[
:path
].
split
(
"/"
).
join
(
" / "
)
.right
=
render
"projects/refs"
.right
=
render
:partial
=>
"projects/refs"
,
:locals
=>
{
:destination
=>
project_commits_path
(
@project
)
}
%div
{
:id
=>
dom_id
(
@project
)}
=
render
"commits"
app/views/commits/show.js.haml
View file @
6323cdda
-#:plain
$("#side-commit-preview").remove();
var side = $("<div id='side-commit-preview'></div>");
side.html("#{escape_javascript(render "commits/show")}");
$("##{dom_id(@project)}").parent().append(side);
$("##{dom_id(@project)}").addClass("span-14");
:plain
$("#notes-list").html("
#{
escape_javascript
(
render
(
:partial
=>
'notes/notes_list'
))
}
");
=
render
"notes/load"
app/views/issues/show.html.haml
View file @
6323cdda
%h2
=
"Issue #
#{
@issue
.
id
}
-
#{
html_escape
(
@issue
.
title
)
}
"
.left.width-65p
-#= simple_format html_escape(@issue.content)
.issue_notes
=
render
"notes/notes"
.loading
{
:style
=>
"display:none;"
}
%center
=
image_tag
"ajax-loader.gif"
.right.width-30p
.span-8
-
if
@issue
.
closed
%center
.success
Closed
-
else
%center
.error
Open
%table
.round-borders
%tr
%td
Title:
...
...
@@ -54,4 +52,3 @@
=
link_to
'Edit'
,
edit_project_issue_path
(
@project
,
@issue
),
:class
=>
"lbutton positive"
,
:remote
=>
true
.right
=
link_to
'Destroy'
,
[
@project
,
@issue
],
:confirm
=>
'Are you sure?'
,
:method
=>
:delete
,
:class
=>
"lbutton delete-issue negative"
,
:id
=>
"destroy_issue_
#{
@issue
.
id
}
"
.clear
app/views/issues/show.js.haml
View file @
6323cdda
:plain
$("#notes-list").html("
#{
escape_javascript
(
render
(
:partial
=>
'notes/notes_list'
))
}
");
=
render
"notes/load"
app/views/layouts/_head_panel.html.erb
View file @
6323cdda
<!-- Page Header -->
<header>
<h1
class=
"logo"
>
<a
href=
"/"
>
GITLAB
</a></h1>
<div
class=
"login-top"
>
<h1
class=
"logo"
>
<a
href=
"/"
>
GITLAB
</a>
</h1>
<div
class=
"account-box"
>
<%=
link_to
profile_path
,
:class
=>
"pic"
do
%>
<%=
image_tag
gravatar_icon
(
current_user
.
email
)
%>
<%
end
%>
<a
href=
"#"
class=
"arrow-up"
></a>
<div
class=
"account-links"
>
<%=
link_to
profile_path
,
:class
=>
"username"
do
%>
<%=
current_user
.
name
%>
<%#= current_user.name %>
Your profile
<%
end
%>
<%=
link_to
"Fluid layout"
,
url_for
(
:view_style
=>
'fluid'
)
if
cookies
[
:view_style
]
==
"collapsed"
%>
<%=
link_to
"Fixed layout"
,
url_for
(
:view_style
=>
'collapsed'
)
unless
cookies
[
:view_style
]
==
"collapsed"
%>
<%=
link_to
'Logout'
,
destroy_user_session_path
,
:class
=>
"logout"
,
:method
=>
:delete
%>
</div>
</div>
<!-- .account-box -->
<div
class=
"search"
>
<%=
text_field_tag
"search"
,
nil
,
:placeholder
=>
"Search"
,
:class
=>
"search-input"
%>
</div>
...
...
@@ -26,23 +36,10 @@
<span></span>
Admin
<%
end
%>
</nav>
</header>
<!-- eo Page Header -->
<div
id=
"header-panel"
style=
"display:none"
>
<div
class=
"container"
>
<div
class=
"span-24"
>
<div
class=
"span-10"
>
<span
class=
"search-holder"
>
</span>
</div>
<div
class=
"right"
>
<%=
link_to
truncate
(
@project
.
name
,
:length
=>
20
),
project_path
(
@project
),
:class
=>
"current button"
if
@project
&&
!
@project
.
new_record?
%>
</div>
</div>
</div>
</div>
<%
if
current_user
%>
<%=
javascript_tag
do
%>
$(function() {
...
...
app/views/layouts/admin.html.haml
View file @
6323cdda
...
...
@@ -9,7 +9,7 @@
=
javascript_tag
do
REQ_URI = "
#{
request
.
env
[
"REQUEST_URI"
]
}
";
REQ_REFFER = "
#{
request
.
env
[
"HTTP_REFERER"
]
}
";
%body
{
:class
=>
content_for?
(
:body_class
)
?
yield
(
:body_class
)
:
'project-page'
,
:id
=>
yield
(
:boyd_id
)}
%body
{
:class
=>
body_class
(
'project-page'
)
,
:id
=>
yield
(
:boyd_id
)}
#container
=
render
:partial
=>
"layouts/flash"
=
render
:partial
=>
"layouts/head_panel"
...
...
app/views/layouts/application.html.haml
View file @
6323cdda
...
...
@@ -13,7 +13,7 @@
=
javascript_tag
do
REQ_URI = "
#{
request
.
env
[
"REQUEST_URI"
]
}
";
REQ_REFFER = "
#{
request
.
env
[
"HTTP_REFERER"
]
}
";
%body
{
:class
=>
yield
(
:body_class
)
,
:id
=>
yield
(
:boyd_id
)}
%body
{
:class
=>
body_class
,
:id
=>
yield
(
:boyd_id
)}
#container
=
render
:partial
=>
"layouts/flash"
=
render
:partial
=>
"layouts/head_panel"
...
...
app/views/layouts/profile.html.haml
View file @
6323cdda
...
...
@@ -9,7 +9,7 @@
=
javascript_tag
do
REQ_URI = "
#{
request
.
env
[
"REQUEST_URI"
]
}
";
REQ_REFFER = "
#{
request
.
env
[
"HTTP_REFERER"
]
}
";
%body
{
:class
=>
content_for?
(
:body_class
)
?
yield
(
:body_class
)
:
'project-page'
,
:id
=>
yield
(
:boyd_id
)}
%body
{
:class
=>
body_class
(
'project-page'
)
,
:id
=>
yield
(
:boyd_id
)}
#container
=
render
:partial
=>
"layouts/flash"
=
render
:partial
=>
"layouts/head_panel"
...
...
app/views/layouts/project.html.haml
View file @
6323cdda
...
...
@@ -9,7 +9,7 @@
=
javascript_tag
do
REQ_URI = "
#{
request
.
env
[
"REQUEST_URI"
]
}
";
REQ_REFFER = "
#{
request
.
env
[
"HTTP_REFERER"
]
}
";
%body
{
:class
=>
content_for?
(
:body_class
)
?
yield
(
:body_class
)
:
'project-page'
,
:id
=>
yield
(
:boyd_id
)}
%body
{
:class
=>
body_class
(
'project-page'
)
,
:id
=>
yield
(
:boyd_id
)}
#container
=
render
:partial
=>
"layouts/flash"
=
render
:partial
=>
"layouts/head_panel"
...
...
app/views/notes/_load.js.haml
0 → 100644
View file @
6323cdda
-
unless
@notes
.
blank?
-
if
params
[
:last_id
]
:plain
NoteList.prepend(
#{
@notes
.
first
.
id
}
, "
#{
escape_javascript
(
render
(
:partial
=>
'notes/notes_list'
))
}
");
-
if
params
[
:first_id
]
:plain
NoteList.append(
#{
@notes
.
last
.
id
}
, "
#{
escape_javascript
(
render
(
:partial
=>
'notes/notes_list'
))
}
");
app/views/notes/_notes.html.haml
View file @
6323cdda
-
if
controller
.
action_name
==
"wall"
%ul
#notes-list
=
render
"notes/notes_list"
-
else
%ul
#notes-list
=
render
"notes/notes_list"
%br
%br
-
if
can?
current_user
,
:write_note
,
@project
-
if
can?
current_user
,
:write_note
,
@project
=
render
"notes/form"
.clear
%hr
%ul
#notes-list
=
render
"notes/notes_list"
:javascript
$
(
'
.delete-note
'
).
live
(
'
ajax:success
'
,
function
()
{
...
...
@@ -20,8 +16,11 @@
$
(
"
#submit_note
"
).
removeAttr
(
"
disabled
"
);
})
-
if
[
"issues"
,
"projects"
].
include?
(
controller
.
controller_name
)
:javascript
$
(
function
(){
var
int
=
self
.
setInterval
(
"
updatePage()
"
,
20000
);
$
(
"
#note_note
"
).
live
(
"
click
"
,
function
(){
$
(
this
).
css
(
"
height
"
,
"
100px
"
);
$
(
'
.attach_holder
'
).
show
();
});
NoteList
.
init
(
"
wall
"
,
#{
@notes
.
last
.
try
(
:id
)
||
0
}
,
#{
@notes
.
first
.
try
(
:id
)
||
0
}
);
});
app/views/notes/_show.html.haml
View file @
6323cdda
%li
{
:id
=>
dom_id
(
note
)}
%div
.note_author
%li
{
:id
=>
dom_id
(
note
),
:class
=>
"note"
}
=
image_tag
gravatar_icon
(
note
.
author
.
email
),
:class
=>
"left"
,
:width
=>
40
,
:style
=>
"padding-right:5px;"
%div
.note_content.left
%div
.note-author
%strong
=
note
.
author_name
%cite
=
time_ago_in_words
(
note
.
updated_at
)
ago
-
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"
%div
.note-title
=
markdown
(
note
.
note
)
-
if
note
.
attachment
.
url
Attachment:
=
link_to
note
.
attachment_identifier
,
note
.
attachment
.
url
,
:target
=>
"_blank"
%br
%span
.author
=
note
.
author
.
name
%cite
.ago
=
time_ago_in_words
(
note
.
updated_at
)
ago
%br
-
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"
.clear
app/views/notes/create.js.haml
View file @
6323cdda
-
if
@note
.
valid?
:plain
$("#new_note .errors").remove();
updatePage();
$('#note_note').val("");
NoteList.prepend(
#{
@note
.
id
}
, "
#{
escape_javascript
(
render
:partial
=>
"notes/show"
,
:locals
=>
{
:note
=>
@note
})
}
");
-
else
:plain
$("#new_note").replaceWith("
#{
escape_javascript
(
render
(
'form'
))
}
");
...
...
app/views/projects/_refs.html.haml
View file @
6323cdda
=
form_tag
project_commits_path
(
@project
)
,
:method
=>
:get
,
:class
=>
"project-refs-form"
do
=
form_tag
destination
,
:method
=>
:get
,
:class
=>
"project-refs-form"
do
=
select_tag
"ref"
,
grouped_options_refs
,
:onchange
=>
"this.form.submit();"
,
:class
=>
"project-refs-select"
...
...
app/views/projects/_tree.html.haml
View file @
6323cdda
...
...
@@ -17,7 +17,7 @@
\/
=
link_to
truncate
(
part
,
:length
=>
40
),
tree_file_project_path
(
@project
,
:path
=>
part_path
,
:commit_id
=>
@commit
.
try
(
:id
),
:branch
=>
@branch
,
:tag
=>
@tag
),
:remote
=>
:true
.right
=
render
"projects/refs"
.right
=
render
:partial
=>
"projects/refs"
,
:locals
=>
{
:destination
=>
tree_project_path
(
@project
)
}
.clear
#tree-content-holder
...
...
app/views/projects/wall.html.haml
View file @
6323cdda
%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
,
"recent"
,
(
params
[
:view
]
||
"recent"
)
==
"recent"
,
:onclick
=>
"this.form.submit()"
,
:id
=>
"recent_view"
=
label_tag
"recent_view"
,
"Recent"
.span-2
=
radio_button_tag
:view
,
"day"
,
params
[
:view
]
==
"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"
.loading
{
:style
=>
"display:none;"
}
%center
=
image_tag
"ajax-loader.gif"
:javascript
$
(
function
(){
$
(
"
#note_note
"
).
live
(
"
click
"
,
function
(){
$
(
this
).
css
(
"
height
"
,
"
100px
"
);
$
(
'
.attach_holder
'
).
show
();
});
});
app/views/projects/wall.js.haml
View file @
6323cdda
:plain
$("#notes-list").html("
#{
escape_javascript
(
render
(
:partial
=>
'notes/notes_list'
))
}
");
=
render
"notes/load"
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