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
Jérome Perrin
gitlab-ce
Commits
a9639776
Commit
a9639776
authored
Nov 04, 2011
by
Dmitriy Zaporozhets
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fixed/fluid layout switch
parent
3ba392b3
Changes
8
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
47 additions
and
32 deletions
+47
-32
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/helpers/application_helper.rb
app/helpers/application_helper.rb
+8
-0
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
No files found.
app/assets/stylesheets/style.scss
View file @
a9639776
...
@@ -292,7 +292,7 @@ body.login-page{background-color: #f1f1f1; padding-top: 10%}
...
@@ -292,7 +292,7 @@ body.login-page{background-color: #f1f1f1; padding-top: 10%}
/* General */
/* General */
#container
{
background-color
:
white
;
overflow
:
hidden
;}
#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 @
a9639776
class
ApplicationController
<
ActionController
::
Base
class
ApplicationController
<
ActionController
::
Base
before_filter
:authenticate_user!
before_filter
:authenticate_user!
before_filter
:view_style
protect_from_forgery
protect_from_forgery
helper_method
:abilities
,
:can?
helper_method
:abilities
,
:can?
...
@@ -73,4 +75,12 @@ class ApplicationController < ActionController::Base
...
@@ -73,4 +75,12 @@ class ApplicationController < ActionController::Base
def
require_non_empty_project
def
require_non_empty_project
redirect_to
@project
unless
@project
.
repo_exists?
redirect_to
@project
unless
@project
.
repo_exists?
end
end
def
view_style
if
params
[
:view_style
]
==
"collapsed"
cookies
[
:view_style
]
=
"collapsed"
elsif
params
[
:view_style
]
==
"fluid"
cookies
[
:view_style
]
=
""
end
end
end
end
app/helpers/application_helper.rb
View file @
a9639776
...
@@ -4,6 +4,14 @@ module ApplicationHelper
...
@@ -4,6 +4,14 @@ module ApplicationHelper
"http://www.gravatar.com/avatar/
#{
Digest
::
MD5
.
hexdigest
(
user_email
)
}
?s=40&d=identicon"
"http://www.gravatar.com/avatar/
#{
Digest
::
MD5
.
hexdigest
(
user_email
)
}
?s=40&d=identicon"
end
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
)
def
commit_name
(
project
,
commit
)
if
project
.
commit
.
id
==
commit
.
id
if
project
.
commit
.
id
==
commit
.
id
"master"
"master"
...
...
app/views/layouts/_head_panel.html.erb
View file @
a9639776
<!-- Page Header -->
<!-- Page Header -->
<header>
<header>
<h1
class=
"logo"
>
<h1
class=
"logo"
>
<a
href=
"/"
>
GITLAB
</a></h1>
<a
href=
"/"
>
GITLAB
</a>
<div
class=
"login-top"
>
</h1>
<%=
link_to
profile_path
,
:class
=>
"pic"
do
%>
<div
class=
"account-box"
>
<%=
image_tag
gravatar_icon
(
current_user
.
email
)
%>
<%=
link_to
profile_path
,
:class
=>
"pic"
do
%>
<%
end
%>
<%=
image_tag
gravatar_icon
(
current_user
.
email
)
%>
<%=
link_to
profile_path
,
:class
=>
"username"
do
%>
<%
end
%>
<%=
current_user
.
name
%>
<%
end
%>
<a
href=
"#"
class=
"arrow-up"
></a>
<%=
link_to
'Logout'
,
destroy_user_session_path
,
:class
=>
"logout"
,
:method
=>
:delete
%>
<div
class=
"account-links"
>
<%=
link_to
profile_path
,
:class
=>
"username"
do
%>
<%#= 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>
<div
class=
"search"
>
</div>
<!-- .account-box -->
<%=
text_field_tag
"search"
,
nil
,
:placeholder
=>
"Search"
,
:class
=>
"search-input"
%>
</div>
<div
class=
"search"
>
<%=
text_field_tag
"search"
,
nil
,
:placeholder
=>
"Search"
,
:class
=>
"search-input"
%>
</div>
<!-- .login-top -->
<!-- .login-top -->
<nav>
<nav>
<%=
link_to
dashboard_path
,
:class
=>
current_page?
(
root_path
)
?
"current dashboard"
:
"dashboard"
do
%>
<%=
link_to
dashboard_path
,
:class
=>
current_page?
(
root_path
)
?
"current dashboard"
:
"dashboard"
do
%>
...
@@ -26,23 +36,10 @@
...
@@ -26,23 +36,10 @@
<span></span>
Admin
<span></span>
Admin
<%
end
%>
<%
end
%>
</nav>
</nav>
</header>
</header>
<!-- eo Page 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
%>
<%
if
current_user
%>
<%=
javascript_tag
do
%>
<%=
javascript_tag
do
%>
$(function() {
$(function() {
...
...
app/views/layouts/admin.html.haml
View file @
a9639776
...
@@ -9,7 +9,7 @@
...
@@ -9,7 +9,7 @@
=
javascript_tag
do
=
javascript_tag
do
REQ_URI = "
#{
request
.
env
[
"REQUEST_URI"
]
}
";
REQ_URI = "
#{
request
.
env
[
"REQUEST_URI"
]
}
";
REQ_REFFER = "
#{
request
.
env
[
"HTTP_REFERER"
]
}
";
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
#container
=
render
:partial
=>
"layouts/flash"
=
render
:partial
=>
"layouts/flash"
=
render
:partial
=>
"layouts/head_panel"
=
render
:partial
=>
"layouts/head_panel"
...
...
app/views/layouts/application.html.haml
View file @
a9639776
...
@@ -13,7 +13,7 @@
...
@@ -13,7 +13,7 @@
=
javascript_tag
do
=
javascript_tag
do
REQ_URI = "
#{
request
.
env
[
"REQUEST_URI"
]
}
";
REQ_URI = "
#{
request
.
env
[
"REQUEST_URI"
]
}
";
REQ_REFFER = "
#{
request
.
env
[
"HTTP_REFERER"
]
}
";
REQ_REFFER = "
#{
request
.
env
[
"HTTP_REFERER"
]
}
";
%body
{
:class
=>
yield
(
:body_class
)
,
:id
=>
yield
(
:boyd_id
)}
%body
{
:class
=>
body_class
,
:id
=>
yield
(
:boyd_id
)}
#container
#container
=
render
:partial
=>
"layouts/flash"
=
render
:partial
=>
"layouts/flash"
=
render
:partial
=>
"layouts/head_panel"
=
render
:partial
=>
"layouts/head_panel"
...
...
app/views/layouts/profile.html.haml
View file @
a9639776
...
@@ -9,7 +9,7 @@
...
@@ -9,7 +9,7 @@
=
javascript_tag
do
=
javascript_tag
do
REQ_URI = "
#{
request
.
env
[
"REQUEST_URI"
]
}
";
REQ_URI = "
#{
request
.
env
[
"REQUEST_URI"
]
}
";
REQ_REFFER = "
#{
request
.
env
[
"HTTP_REFERER"
]
}
";
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
#container
=
render
:partial
=>
"layouts/flash"
=
render
:partial
=>
"layouts/flash"
=
render
:partial
=>
"layouts/head_panel"
=
render
:partial
=>
"layouts/head_panel"
...
...
app/views/layouts/project.html.haml
View file @
a9639776
...
@@ -9,7 +9,7 @@
...
@@ -9,7 +9,7 @@
=
javascript_tag
do
=
javascript_tag
do
REQ_URI = "
#{
request
.
env
[
"REQUEST_URI"
]
}
";
REQ_URI = "
#{
request
.
env
[
"REQUEST_URI"
]
}
";
REQ_REFFER = "
#{
request
.
env
[
"HTTP_REFERER"
]
}
";
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
#container
=
render
:partial
=>
"layouts/flash"
=
render
:partial
=>
"layouts/flash"
=
render
:partial
=>
"layouts/head_panel"
=
render
:partial
=>
"layouts/head_panel"
...
...
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