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
Tatuya Kamada
gitlab-ce
Commits
415516b2
Commit
415516b2
authored
Nov 04, 2011
by
gitlabhq
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'dev'
parents
8a8fa8b0
687290a0
Changes
17
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
17 changed files
with
1362 additions
and
88 deletions
+1362
-88
app/assets/images/chosen-sprite.png
app/assets/images/chosen-sprite.png
+0
-0
app/assets/javascripts/chosen.jquery.js
app/assets/javascripts/chosen.jquery.js
+901
-0
app/assets/stylesheets/chosen.css
app/assets/stylesheets/chosen.css
+367
-0
app/assets/stylesheets/projects.css.scss
app/assets/stylesheets/projects.css.scss
+13
-0
app/assets/stylesheets/style.scss
app/assets/stylesheets/style.scss
+1
-1
app/controllers/application_controller.rb
app/controllers/application_controller.rb
+17
-13
app/helpers/application_helper.rb
app/helpers/application_helper.rb
+17
-0
app/models/key.rb
app/models/key.rb
+1
-1
app/views/commits/index.html.haml
app/views/commits/index.html.haml
+5
-20
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
-2
app/views/layouts/application.html.haml
app/views/layouts/application.html.haml
+1
-2
app/views/layouts/devise.html.haml
app/views/layouts/devise.html.haml
+0
-1
app/views/layouts/profile.html.haml
app/views/layouts/profile.html.haml
+1
-2
app/views/layouts/project.html.haml
app/views/layouts/project.html.haml
+1
-2
app/views/projects/_refs.html.haml
app/views/projects/_refs.html.haml
+8
-0
app/views/projects/_tree.html.haml
app/views/projects/_tree.html.haml
+4
-17
No files found.
app/assets/images/chosen-sprite.png
0 → 100644
View file @
415516b2
396 Bytes
app/assets/javascripts/chosen.jquery.js
0 → 100644
View file @
415516b2
This diff is collapsed.
Click to expand it.
app/assets/stylesheets/chosen.css
0 → 100644
View file @
415516b2
This diff is collapsed.
Click to expand it.
app/assets/stylesheets/projects.css.scss
View file @
415516b2
...
...
@@ -706,3 +706,16 @@ table.highlighttable pre{
line-height
:
16px
!
important
;
font-size
:
12px
!
important
;
}
.project-refs-form
{
span
{
background
:
none
!
important
;
position
:static
!
important
;
width
:auto
!
important
;
height
:
auto
!
important
;
}
}
.project-refs-select
{
width
:
200px
;
}
app/assets/stylesheets/style.scss
View file @
415516b2
...
...
@@ -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 @
415516b2
class
ApplicationController
<
ActionController
::
Base
before_filter
:authenticate_user!
before_filter
:view_style
protect_from_forgery
helper_method
:abilities
,
:can?
...
...
@@ -57,20 +59,14 @@ class ApplicationController < ActionController::Base
end
def
load_refs
@branch
=
unless
params
[
:branch
].
blank?
params
[
:branch
]
unless
params
[
:ref
].
blank?
@ref
=
params
[
:ref
]
else
nil
end
@tag
=
unless
params
[
:tag
].
blank?
params
[
:tag
]
else
nil
end
@branch
=
params
[
:branch
].
blank?
?
nil
:
params
[
:branch
]
@tag
=
params
[
:tag
].
blank?
?
nil
:
params
[
:tag
]
@ref
=
@branch
||
@tag
||
"master"
end
end
def
render_404
render
:file
=>
File
.
join
(
Rails
.
root
,
"public"
,
"404"
),
:layout
=>
false
,
:status
=>
"404"
...
...
@@ -79,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/helpers/application_helper.rb
View file @
415516b2
...
...
@@ -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"
...
...
@@ -32,6 +40,15 @@ module ApplicationHelper
"Never"
end
def
grouped_options_refs
options
=
[
[
"Branch"
,
@repo
.
heads
.
map
(
&
:name
)
],
[
"Tag"
,
@project
.
tags
]
]
grouped_options_for_select
(
options
,
@ref
)
end
def
markdown
(
text
)
RDiscount
.
new
(
text
,
:autolink
,
:no_pseudo_protocols
,
:safelink
,
:smart
,
:filter_html
).
to_html
.
html_safe
end
...
...
app/models/key.rb
View file @
415516b2
...
...
@@ -8,7 +8,7 @@ class Key < ActiveRecord::Base
validates
:key
,
:presence
=>
true
,
:uniqueness
=>
true
,
:length
=>
{
:within
=>
0
..
1
024
}
:length
=>
{
:within
=>
0
..
1
600
}
before_save
:set_identifier
after_save
:update_gitosis
...
...
app/views/commits/index.html.haml
View file @
415516b2
-
content_for
(
:body_class
,
"project-page commits-page"
)
.left
=
form_tag
project_commits_path
(
@project
),
:method
=>
:get
do
=
select_tag
"branch"
,
options_for_select
(
@repo
.
heads
.
map
(
&
:name
),
@branch
),
:onchange
=>
"this.form.submit();"
,
:class
=>
""
,
:prompt
=>
"Branches"
.left
=
form_tag
project_commits_path
(
@project
),
:method
=>
:get
do
=
select_tag
"tag"
,
options_for_select
(
@project
.
tags
,
@tag
),
:onchange
=>
"this.form.submit();"
,
:class
=>
""
,
:prompt
=>
"Tags"
.clear
%br
-#%a.right.button{:href => "#"} Download
-#-if can? current_user, :admin_project, @project
%a.right.button.blue{:href => "#"} EDIT
%h2
.icon
%span
%a
.project-name
{
:href
=>
"#"
}
%i
.arrow
>
Project
%d
%a
{
:href
=>
"#"
}
=
@
ref
=
link_to
project_commits_path
(
@project
)
do
=
@
project
.
name
-
if
params
[
:path
]
%d
\/
%a
{
:href
=>
"#"
}=
params
[
:path
].
split
(
"/"
).
join
(
" / "
)
.right
=
render
:partial
=>
"projects/refs"
,
:locals
=>
{
:destination
=>
project_commits_path
(
@project
)
}
%div
{
:id
=>
dom_id
(
@project
)}
=
render
"commits"
app/views/layouts/_head_panel.html.erb
View file @
415516b2
<!-- 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 @
415516b2
...
...
@@ -6,11 +6,10 @@
=
stylesheet_link_tag
"application"
=
javascript_include_tag
"application"
=
csrf_meta_tags
%link
{
:href
=>
"/assets/favicon.png"
,
:rel
=>
"icon"
,
:type
=>
"image/png"
}
/
=
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 @
415516b2
...
...
@@ -10,11 +10,10 @@
=
stylesheet_link_tag
"application"
=
javascript_include_tag
"application"
=
csrf_meta_tags
%link
{
:href
=>
"/assets/favicon.png"
,
:rel
=>
"icon"
,
:type
=>
"image/png"
}
/
=
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/devise.html.haml
View file @
415516b2
...
...
@@ -6,7 +6,6 @@
=
stylesheet_link_tag
"application"
=
javascript_include_tag
"application"
=
csrf_meta_tags
%link
{
:href
=>
"/assets/favicon.png"
,
:rel
=>
"icon"
,
:type
=>
"image/png"
}
/
=
javascript_tag
do
REQ_URI = "
#{
request
.
env
[
"REQUEST_URI"
]
}
";
REQ_REFFER = "
#{
request
.
env
[
"HTTP_REFERER"
]
}
";
...
...
app/views/layouts/profile.html.haml
View file @
415516b2
...
...
@@ -6,11 +6,10 @@
=
stylesheet_link_tag
"application"
=
javascript_include_tag
"application"
=
csrf_meta_tags
%link
{
:href
=>
"/assets/favicon.png"
,
:rel
=>
"icon"
,
:type
=>
"image/png"
}
/
=
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 @
415516b2
...
...
@@ -6,11 +6,10 @@
=
stylesheet_link_tag
"application"
=
javascript_include_tag
"application"
=
csrf_meta_tags
%link
{
:href
=>
"/assets/favicon.png"
,
:rel
=>
"icon"
,
:type
=>
"image/png"
}
/
=
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/projects/_refs.html.haml
0 → 100644
View file @
415516b2
=
form_tag
destination
,
:method
=>
:get
,
:class
=>
"project-refs-form"
do
=
select_tag
"ref"
,
grouped_options_refs
,
:onchange
=>
"this.form.submit();"
,
:class
=>
"project-refs-select"
:javascript
$
(
function
(){
$
(
'
.project-refs-select
'
).
chosen
();
})
app/views/projects/_tree.html.haml
View file @
415516b2
.left
=
form_tag
tree_project_path
(
@project
),
:method
=>
:get
do
=
select_tag
"branch"
,
options_for_select
(
@repo
.
heads
.
map
(
&
:name
),
@branch
),
:onchange
=>
"this.form.submit();"
,
:class
=>
""
,
:prompt
=>
"Branches"
.left
=
form_tag
tree_project_path
(
@project
),
:method
=>
:get
do
=
select_tag
"tag"
,
options_for_select
(
@project
.
tags
,
@tag
),
:onchange
=>
"this.form.submit();"
,
:class
=>
""
,
:prompt
=>
"Tags"
.clear
%br
-#%a.right.button{:href => "#"} Download
-#-if can? current_user, :admin_project, @project
...
...
@@ -14,14 +5,9 @@
#tree-breadcrumbs
%h2
.icon
%span
=
link_to
tree_project_path
(
@project
,
:path
=>
nil
,
:commit_id
=>
@commit
.
try
(
:id
)),
:remote
=>
true
,
:class
=>
'project-name'
do
%i
.arrow
>
=
@project
.
name
%d
%a
{
:href
=>
"#"
}
=
@ref
=
link_to
tree_project_path
(
@project
,
:path
=>
nil
,
:commit_id
=>
@commit
.
try
(
:id
)),
:remote
=>
true
do
=
@project
.
name
-
if
params
[
:path
]
-
part_path
=
""
-
params
[
:path
].
split
(
"
\/
"
).
each
do
|
part
|
...
...
@@ -30,7 +16,8 @@
-
part_path
=
part
\/
=
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
:partial
=>
"projects/refs"
,
:locals
=>
{
:destination
=>
tree_project_path
(
@project
)
}
.clear
#tree-content-holder
...
...
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