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
49b2fb24
Commit
49b2fb24
authored
Nov 11, 2011
by
gitlabhq
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
remove fluiod layout
parent
c092f397
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
7 additions
and
26 deletions
+7
-26
app/controllers/application_controller.rb
app/controllers/application_controller.rb
+0
-17
app/helpers/application_helper.rb
app/helpers/application_helper.rb
+2
-2
app/views/layouts/_head_panel.html.erb
app/views/layouts/_head_panel.html.erb
+1
-3
app/views/projects/_recent_commits.html.haml
app/views/projects/_recent_commits.html.haml
+1
-1
app/views/projects/_recent_messages.html.haml
app/views/projects/_recent_messages.html.haml
+2
-2
app/views/projects/_tree_item.html.haml
app/views/projects/_tree_item.html.haml
+1
-1
No files found.
app/controllers/application_controller.rb
View file @
49b2fb24
class
ApplicationController
<
ActionController
::
Base
before_filter
:authenticate_user!
before_filter
:view_style
protect_from_forgery
helper_method
:abilities
,
:can?
rescue_from
Gitosis
::
AccessDenied
do
|
exception
|
...
...
@@ -76,20 +73,6 @@ class ApplicationController < ActionController::Base
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
]
=
"fluid"
end
@view_mode
=
if
cookies
[
:view_style
]
==
"fluid"
:fluid
else
:collapsed
end
end
def
respond_with_notes
if
params
[
:last_id
]
&&
params
[
:first_id
]
@notes
=
@notes
.
where
(
"id >= ?"
,
params
[
:first_id
])
...
...
app/helpers/application_helper.rb
View file @
49b2fb24
...
...
@@ -7,7 +7,7 @@ module ApplicationHelper
end
def
fixed_mode?
@view_mode
==
:fluid
true
end
def
body_class
(
default_class
=
nil
)
...
...
@@ -15,7 +15,7 @@ module ApplicationHelper
default_class
:
content_for
(
:body_class
)
[
main
,
@view_mode
].
join
(
" "
)
[
main
,
"collapsed"
].
join
(
" "
)
end
def
commit_name
(
project
,
commit
)
...
...
app/views/layouts/_head_panel.html.erb
View file @
49b2fb24
...
...
@@ -11,10 +11,8 @@
<div
class=
"account-links"
>
<%=
link_to
profile_path
,
:class
=>
"username"
do
%>
<%#= current_user.name %>
Your
profile
My
profile
<%
end
%>
<%=
link_to
"Fluid layout"
,
url_for
(
:view_style
=>
'fluid'
)
unless
cookies
[
:view_style
]
==
"fluid"
%>
<%=
link_to
"Fixed layout"
,
url_for
(
:view_style
=>
'collapsed'
)
if
cookies
[
:view_style
]
==
"fluid"
%>
<%=
link_to
'Logout'
,
destroy_user_session_path
,
:class
=>
"logout"
,
:method
=>
:delete
%>
</div>
</div>
<!-- .account-box -->
...
...
app/views/projects/_recent_commits.html.haml
View file @
49b2fb24
...
...
@@ -22,7 +22,7 @@
-
else
=
image_tag
"no_avatar.png"
,
:class
=>
"left"
,
:width
=>
40
,
:style
=>
"padding-right:5px;"
.title
%p
=
link_to
truncate
(
commit
.
safe_message
,
:length
=>
fixed_mode?
?
40
:
10
0
),
project_commit_path
(
@project
,
:id
=>
commit
.
id
)
%p
=
link_to
truncate
(
commit
.
safe_message
,
:length
=>
4
0
),
project_commit_path
(
@project
,
:id
=>
commit
.
id
)
%span
%span
.author
...
...
app/views/projects/_recent_messages.html.haml
View file @
49b2fb24
...
...
@@ -7,14 +7,14 @@
%thead
%th
%div
{
:class
=>
"recent_message_parent"
}
=
link_to
(
truncate
(
dashboard_feed_title
(
parent
),
:length
=>
fixed_mode?
?
40
:
10
0
),
dashboard_feed_path
(
@project
,
parent
))
=
link_to
(
truncate
(
dashboard_feed_title
(
parent
),
:length
=>
4
0
),
dashboard_feed_path
(
@project
,
parent
))
-
notes
.
sort
{
|
x
,
y
|
y
.
updated_at
<=>
x
.
updated_at
}.
each
do
|
note
|
%tr
%td
%div
.message
=
image_tag
gravatar_icon
(
note
.
author_email
),
:class
=>
"left"
,
:width
=>
40
,
:style
=>
"padding-right:5px;"
%div
.title
=
link_to
markdown
(
truncate
(
note
.
note
,
:length
=>
fixed_mode?
?
40
:
10
0
)),
dashboard_feed_path
(
@project
,
parent
)
+
"#note_
#{
note
.
id
}
"
=
link_to
markdown
(
truncate
(
note
.
note
,
:length
=>
4
0
)),
dashboard_feed_path
(
@project
,
parent
)
+
"#note_
#{
note
.
id
}
"
-
if
note
.
attachment
.
url
%br
Attachment:
...
...
app/views/projects/_tree_item.html.haml
View file @
49b2fb24
...
...
@@ -12,7 +12,7 @@
=
time_ago_in_words
(
content_commit
.
committed_date
)
ago
%td
.commit
=
link_to
truncate
(
content_commit
.
safe_message
,
:length
=>
fixed_mode?
?
40
:
8
0
),
project_commit_path
(
@project
,
content_commit
),
:class
=>
"tree-commit-link"
=
link_to
truncate
(
content_commit
.
safe_message
,
:length
=>
4
0
),
project_commit_path
(
@project
,
content_commit
),
:class
=>
"tree-commit-link"
-
tm
=
@project
.
team_member_by_name_or_email
(
content_commit
.
author_email
,
content_commit
.
author_name
)
-
if
tm
=
link_to
"[
#{
tm
.
user_name
}
]"
,
project_team_member_path
(
@project
,
tm
)
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