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
Kazuhiko Shiozaki
gitlab-ce
Commits
487ae906
Commit
487ae906
authored
Oct 28, 2011
by
gitlabhq
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
project layout
parent
1ffb4b98
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
71 additions
and
9 deletions
+71
-9
app/assets/stylesheets/projects.css.scss
app/assets/stylesheets/projects.css.scss
+15
-8
app/controllers/issues_controller.rb
app/controllers/issues_controller.rb
+1
-0
app/controllers/projects_controller.rb
app/controllers/projects_controller.rb
+9
-0
app/views/layouts/project.html.haml
app/views/layouts/project.html.haml
+46
-0
app/views/projects/_top_menu.html.haml
app/views/projects/_top_menu.html.haml
+0
-1
No files found.
app/assets/stylesheets/projects.css.scss
View file @
487ae906
...
...
@@ -390,16 +390,17 @@ tbody tr:nth-child(2n) td, tbody tr.even td {
}
.top_menu_count
{
background
:
none
repeat
scroll
0
0
#FFF6BF
;
border-color
:
#FFD324
;
color
:
#514721
;
border
:
1px
solid
#DDDDDD
;
background
:
none
repeat
scroll
0
0
white
;
color
:
#333
;
border-color
:
#4BB8D2
;
padding
:
2px
;
font-size
:
12px
;
position
:relative
;
top
:
-14px
;
left
:
10px
;
font-size
:
10px
;
border-top
:none
;
text-align
:center
;
float
:right
;
width
:
25px
;
}
#logo
{
...
...
@@ -700,3 +701,9 @@ tbody tr:nth-child(2n) td, tbody tr.even td {
}
}
.left
{
float
:left
;
}
.right
{
float
:right
;
}
app/controllers/issues_controller.rb
View file @
487ae906
...
...
@@ -2,6 +2,7 @@ class IssuesController < ApplicationController
before_filter
:authenticate_user!
before_filter
:project
before_filter
:issue
,
:only
=>
[
:edit
,
:update
,
:destroy
,
:show
]
layout
"project"
# Authorize
before_filter
:add_project_abilities
...
...
app/controllers/projects_controller.rb
View file @
487ae906
class
ProjectsController
<
ApplicationController
before_filter
:project
,
:except
=>
[
:index
,
:new
,
:create
]
layout
:determine_layout
# Authorize
before_filter
:add_project_abilities
...
...
@@ -152,4 +153,12 @@ class ProjectsController < ApplicationController
def
project
@project
||=
Project
.
find_by_code
(
params
[
:id
])
end
def
determine_layout
if
@project
&&
!
@project
.
new_record?
"project"
else
"application"
end
end
end
app/views/layouts/project.html.haml
0 → 100644
View file @
487ae906
!!!
%html
%head
%title
GitLab
#{
" - #{@project.name}"
if
@project
&&
!
@project
.
new_record?
}
=
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
.project-page
#container
=
render
:partial
=>
"layouts/flash"
=
render
:partial
=>
"layouts/head_panel"
=
render
:partial
=>
"layouts/page_title"
.project-container
.project-sidebar.grid_1
%input
.git-url.text
{
:id
=>
""
,
:name
=>
""
,
:readonly
=>
""
,
:type
=>
"text"
,
:value
=>
@project
.
url_to_repo
}
%aside
=
link_to
image_tag
(
"home.png"
,
:width
=>
20
),
project_path
(
@project
),
:class
=>
current_page?
(
:controller
=>
"projects"
,
:action
=>
"show"
,
:id
=>
@project
)
?
"current"
:
nil
=
link_to
"Tree"
,
tree_project_path
(
@project
),
:class
=>
current_page?
(
:controller
=>
"projects"
,
:action
=>
"tree"
,
:id
=>
@project
)
?
"current"
:
nil
=
link_to
"Commits"
,
project_commits_path
(
@project
),
:class
=>
current_page?
(
:controller
=>
"commits"
,
:action
=>
"index"
,
:project_id
=>
@project
)
?
"current"
:
nil
=
link_to
team_project_path
(
@project
),
:class
=>
(
current_page?
(
:controller
=>
"projects"
,
:action
=>
"team"
,
:id
=>
@project
)
||
controller
.
controller_name
==
"team_members"
)
?
"current"
:
nil
do
Team
-
if
@project
.
users_projects
.
count
>
0
%span
{
:class
=>
"top_menu_count"
}=
@project
.
users_projects
.
count
=
link_to
project_issues_path
(
@project
),
:class
=>
(
controller
.
controller_name
==
"issues"
)
?
"current"
:
nil
do
Issues
-
if
@project
.
issues
.
opened
.
count
>
0
%span
{
:class
=>
"top_menu_count"
}=
@project
.
issues
.
opened
.
count
=
link_to
wall_project_path
(
@project
),
:class
=>
current_page?
(
:controller
=>
"projects"
,
:action
=>
"wall"
,
:id
=>
@project
)
?
"current"
:
nil
do
Wall
-
if
@project
.
common_notes
.
count
>
0
%span
{
:class
=>
"top_menu_count"
}=
@project
.
common_notes
.
count
=
link_to
project_snippets_path
(
@project
),
:class
=>
(
controller
.
controller_name
==
"snippets"
)
?
"current"
:
nil
do
Snippets
-
if
@project
.
snippets
.
count
>
0
%span
{
:class
=>
"top_menu_count"
}=
@project
.
snippets
.
non_expired
.
count
-
if
@commit
=
link_to
truncate
(
commit_name
(
@project
,
@commit
),
:length
=>
15
),
project_commit_path
(
@project
,
:id
=>
@commit
.
id
),
:class
=>
current_page?
(
:controller
=>
"commits"
,
:action
=>
"show"
,
:project_id
=>
@project
,
:id
=>
@commit
.
id
)
?
"current"
:
nil
.project-content
=
yield
app/views/projects/_top_menu.html.haml
View file @
487ae906
%div
.top_project_menu
-#%span= link_to @project.code.capitalize, @project, :class => current_page?(:controller => "projects", :action => "show", :id => @project) ? "current" : nil
-
if
@project
.
repo_exists?
%span
=
link_to
image_tag
(
"home.png"
,
:width
=>
20
),
project_path
(
@project
),
:class
=>
current_page?
(
:controller
=>
"projects"
,
:action
=>
"show"
,
:id
=>
@project
)
?
"current"
:
nil
%span
=
link_to
"Tree"
,
tree_project_path
(
@project
),
:class
=>
current_page?
(
:controller
=>
"projects"
,
:action
=>
"tree"
,
:id
=>
@project
)
?
"current"
:
nil
...
...
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