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
34e15801
Commit
34e15801
authored
Feb 28, 2012
by
Dmitriy Zaporozhets
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Improved file browse page, prepared for downloads tab
parent
bcf03b5d
Changes
8
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
157 additions
and
166 deletions
+157
-166
app/assets/stylesheets/common.scss
app/assets/stylesheets/common.scss
+0
-7
app/assets/stylesheets/highlight.scss
app/assets/stylesheets/highlight.scss
+4
-1
app/assets/stylesheets/ref_select.scss
app/assets/stylesheets/ref_select.scss
+4
-3
app/assets/stylesheets/tree.scss
app/assets/stylesheets/tree.scss
+129
-140
app/views/commits/_head.html.haml
app/views/commits/_head.html.haml
+1
-1
app/views/refs/_tree.html.haml
app/views/refs/_tree.html.haml
+2
-7
app/views/refs/_tree_file.html.haml
app/views/refs/_tree_file.html.haml
+7
-7
app/views/refs/tree.html.haml
app/views/refs/tree.html.haml
+10
-0
No files found.
app/assets/stylesheets/common.scss
View file @
34e15801
...
@@ -583,13 +583,6 @@ ul.bordered-list li:last-child { border:none }
...
@@ -583,13 +583,6 @@ ul.bordered-list li:last-child { border:none }
}
}
}
}
.project-refs-form.commit-refs-form
.chzn-container
{
position
:
relative
;
top
:
0
;
left
:
0
;
margin-right
:
10px
;
}
li
.commit
{
li
.commit
{
.avatar
{
.avatar
{
width
:
24px
;
width
:
24px
;
...
...
app/assets/stylesheets/highlight.scss
View file @
34e15801
...
@@ -10,7 +10,8 @@ table.highlighttable
...
@@ -10,7 +10,8 @@ table.highlighttable
margin
:
0px
;
margin
:
0px
;
padding
:
0px
;
padding
:
0px
;
font-size
:
12px
;
font-size
:
12px
;
table-layout
:fixed
table-layout
:fixed
;
background
:
#F7F7F7
;
}
}
td
.code
,
td
.code
,
...
@@ -25,6 +26,8 @@ td.linenos{
...
@@ -25,6 +26,8 @@ td.linenos{
background
:none
;
background
:none
;
padding
:
10px
0px
0px
10px
;
padding
:
10px
0px
0px
10px
;
margin-left
:
0px
;
margin-left
:
0px
;
border-left
:
1px
solid
#DEE2E3
;
background
:
white
;
}
}
.linenodiv
pre
,
.linenodiv
pre
,
...
...
app/assets/stylesheets/ref_select.scss
View file @
34e15801
...
@@ -13,9 +13,10 @@
...
@@ -13,9 +13,10 @@
}
}
.project-refs-form
.chzn-container
{
.project-refs-form
.chzn-container
{
position
:relative
;
position
:
relative
;
top
:
-5px
;
top
:
0
;
left
:
-11px
;
left
:
0
;
margin-right
:
10px
;
.chzn-drop
{
.chzn-drop
{
margin
:
7px
0
;
margin
:
7px
0
;
...
...
app/assets/stylesheets/tree.scss
View file @
34e15801
#tree-content-holder
{
#tree-holder
{
float
:left
;
#tree-content-holder
{
width
:
100%
;
float
:left
;
}
width
:
100%
;
#tree-readme-holder
{
float
:left
;
width
:
100%
;
.readme
{
@include
round-borders-all
(
4px
);
padding
:
4px
15px
;
background
:
#F7F7F7
;
}
}
}
#tree-readme-holder
{
#tree-breadcrumbs
{
div
{
margin
:
0
;
margin-bottom
:
20px
;
float
:left
;
float
:left
;
font-size
:
14px
;
width
:
100%
;
.readme
{
@include
round-borders-all
(
4px
);
padding
:
4px
15px
;
background
:
#F7F7F7
;
}
}
}
}
.tree_progress
{
.tree_progress
{
display
:none
;
display
:none
;
margin
:
20px
;
margin
:
20px
;
&
.loading
{
&
.loading
{
display
:block
;
display
:block
;
}
}
}
}
/** FILE CONTENT VIEW **/
/** FILE CONTENT VIEW **/
.view_file_content
{
.view_file_content
{
.old_line
,
.new_line
{
.old_line
,
.new_line
{
background
:
#ECECEC
;
background
:
#ECECEC
;
color
:
#777
;
color
:
#777
;
width
:
15px
;
width
:
15px
;
float
:left
;
float
:left
;
padding
:
0px
10px
;
padding
:
0px
10px
;
border-right
:
1px
solid
#ccc
;
border-right
:
1px
solid
#ccc
;
}
}
.old_line
{
.old_line
{
display
:none
;
display
:none
;
}
}
}
}
.view_file
.view_file_header
,
.view_file
.view_file_header
,
.diff_file
.diff_file_header
{
.diff_file
.diff_file_header
{
background-image
:
-webkit-gradient
(
linear
,
0
0
,
0
26
,
color-stop
(
0
.076
,
#fefefe
)
,
to
(
#F6F7F8
));
background
:
#f5f5f5
;
background-image
:
-webkit-linear-gradient
(
#fefefe
7
.6%
,
#F6F7F8
);
background-image
:
-moz-linear-gradient
(
#fefefe
7
.6%
,
#F6F7F8
);
background-image
:
-o-linear-gradient
(
#fefefe
7
.6%
,
#F6F7F8
);
margin
:
0
;
margin
:
0
;
font-weight
:
normal
;
font-weight
:
normal
;
font-weight
:
bold
;
font-weight
:
bold
;
text-align
:
left
;
text-align
:
left
;
color
:
#666
;
color
:
#666
;
border-bottom
:
1px
solid
#
DEE2E3
;
border-bottom
:
1px
solid
#
ccc
;
padding
:
7px
10px
;
padding
:
7px
10px
;
.mode_text
,
.mode_text
,
.file_icon
{
.file_icon
{
margin-right
:
15px
;
padding-right
:
15px
;
border-right
:
1px
solid
$lite_border_color
;
float
:left
;
color
:
#aaa
;
color
:
#aaa
;
}
}
}
.file_icon
{
.view_file
{
padding-left
:
15px
;
border
:
1px
solid
#CCC
;
}
margin-bottom
:
1em
;
}
.view_file
{
.view_file_content
{
border
:
1px
solid
#CCC
;
background
:
#fff
;
margin-bottom
:
1em
;
color
:
#514721
;
font-size
:
11px
;
.view_file_content
{
}
background
:
#fff
;
.view_file_content_image
{
color
:
#514721
;
background
:
#eee
;
font-size
:
11px
;
text-align
:center
;
}
img
{
.view_file_content_image
{
padding
:
100px
;
background
:
#eee
;
max-width
:
300px
;
text-align
:center
;
}
img
{
padding
:
100px
;
max-width
:
300px
;
}
}
}
}
}
td
.code
{
td
.code
{
width
:
100%
;
width
:
100%
;
.highlight
{
.highlight
{
margin-left
:
55px
;
margin-left
:
55px
;
overflow
:auto
;
overflow
:auto
;
overflow-y
:hidden
;
overflow-y
:hidden
;
border-left
:
1px
solid
#DEE2E3
;
}
background
:
white
;
}
.highlight
pre
{
white-space
:
pre
;
word-wrap
:normal
;
}
}
}
.highlight
pre
{
white-space
:
pre
;
word-wrap
:normal
;
}
table
.highlighttable
{
border
:
none
;
background
:
#F7F7F7
;
}
body
.project-page
table
.highlighttable
td
{
border
:
none
}
table
.highlighttable
tr
:hover
{
background
:none
;}
table
.highlighttable
pre
{
line-height
:
16px
!
important
;
font-size
:
12px
!
important
;
}
table
.highlighttable
.linenodiv
pr
e
{
table
.highlighttabl
e
{
text-align
:
right
;
border
:
none
;
padding-right
:
4px
;
}
color
:
#888
;
body
.project-page
table
.highlighttable
td
{
border
:
none
}
}
table
.highlighttable
tr
:hover
{
background
:none
;
}
.tree-item
{
table
.highlighttable
pre
{
&
:hover
{
line-height
:
16px
!
important
;
background
:
$hover
;
font-size
:
12px
!
important
;
cursor
:pointer
;
}
}
table
.highlighttable
.linenodiv
pre
{
text-align
:
right
;
padding-right
:
4px
;
color
:
#888
;
}
.tree-item
-file-name
{
.tree-item
{
font-weight
:bold
;
&
:hover
{
a
{
background
:
$hover
;
c
olor
:
$style_colo
r
;
c
ursor
:pointe
r
;
}
}
img
{
position
:
relative
;
.tree-item-file-name
{
top
:
2px
;
font-weight
:bold
;
a
{
color
:
$style_color
;
}
img
{
position
:
relative
;
top
:
2px
;
}
}
}
}
}
}
.breadcrumb
{
ul
.breadcrumb
{
background
:white
;
background
:white
;
border
:none
;
border
:none
;
a
{
a
{
color
:
$link_color
;
color
:
#666
;
font-weight
:bold
;
font-weight
:bold
;
font-size
:
13px
;
font-size
:
14px
;
}
}
}
}
#tree-slider
{
#tree-slider
{
@include
shade
;
@include
shade
;
td
{
td
{
padding
:
7px
;
padding
:
7px
;
border-color
:
#f1f1f1
;
border-color
:
#f1f1f1
;
}
th
{
background
:
#f5f5f5
;
}
}
}
th
{
.tree-commit-link
{
background
:
#f5f5f5
;
color
:
#333
;
}
}
}
.tree-commit-link
{
#tree-content-holder
.view_file
{
color
:
#333
;
@include
shade
;
}
}
#tree-content-holder
.view_file
{
#tree-readme-holder
.readme
{
@include
shade
;
@include
shade
;
}
margin-bottom
:
20px
;
}
#tree-readme-holder
.readme
{
a
.tree-commit-link
{
@include
shade
;
color
:
#666
;
margin-bottom
:
20px
;
&
:hover
{
}
text-decoration
:
underline
;
}
}
a
.tree-commit-link
{
.arrow
{
color
:
#666
;
background
:
url("images.png")
no-repeat
-85px
-77px
;
&
:hover
{
width
:
19px
;
text-decoration
:
underline
;
height
:
16px
;
float
:
left
;
position
:
relative
;
left
:
-10px
;
}
}
}
}
app/views/commits/_head.html.haml
View file @
34e15801
%ul
.tabs
%ul
.tabs
%li
%li
=
form_tag
switch_project_refs_path
(
@project
),
:method
=>
:get
,
:class
=>
"project-refs-form
commit-refs-form
"
do
=
form_tag
switch_project_refs_path
(
@project
),
:method
=>
:get
,
:class
=>
"project-refs-form"
do
=
select_tag
"ref"
,
grouped_options_refs
,
:onchange
=>
"$(this.form).trigger('submit');"
,
:class
=>
"project-refs-select"
=
select_tag
"ref"
,
grouped_options_refs
,
:onchange
=>
"$(this.form).trigger('submit');"
,
:class
=>
"project-refs-select"
=
hidden_field_tag
:destination
,
"commits"
=
hidden_field_tag
:destination
,
"commits"
...
...
app/views/refs/_tree.html.haml
View file @
34e15801
%ul
.breadcrumb
%ul
.breadcrumb
%li
%li
=
form_tag
switch_project_refs_path
(
@project
),
:method
=>
:get
,
:class
=>
"project-refs-form left"
,
:remote
=>
true
do
%span
.arrow
=
select_tag
"ref"
,
grouped_options_refs
,
:onchange
=>
"$(this.form).trigger('submit');"
,
:class
=>
"project-refs-select"
=
hidden_field_tag
:destination
,
"tree"
=
hidden_field_tag
:path
,
params
[
:path
]
%li
=
link_to
tree_project_ref_path
(
@project
,
@ref
,
:path
=>
nil
),
:remote
=>
true
do
=
link_to
tree_project_ref_path
(
@project
,
@ref
,
:path
=>
nil
),
:remote
=>
true
do
=
@project
.
cod
e
=
@project
.
nam
e
-
tree
.
breadcrumbs
(
6
)
do
|
link
|
-
tree
.
breadcrumbs
(
6
)
do
|
link
|
\/
\/
%li
=
link
%li
=
link
...
...
app/views/refs/_tree_file.html.haml
View file @
34e15801
:css
:css
.view_file
.view_file
.view_file_header
.view_file_header
%strong
.row
%span
.file_icon
=
image_tag
"txt.png"
.span1
.file_icon
=
image_tag
"txt.png"
%span
.mode_text
=
file
.
mode
.span2
.mode_text
=
file
.
mode
%span
.file_name
=
name
.span7
.file_name
=
name
=
link_to
"raw"
,
blob_project_ref_path
(
@project
,
@ref
,
:path
=>
params
[
:path
]
),
:class
=>
"right"
,
:target
=>
"_blank"
.span4.right
=
link_to
"history"
,
project_commits_path
(
@project
,
:path
=>
params
[
:path
],
:ref
=>
@ref
),
:class
=>
"right"
,
:style
=>
"margin-right:10px;
"
=
link_to
"raw"
,
blob_project_ref_path
(
@project
,
@ref
,
:path
=>
params
[
:path
]
),
:class
=>
"right"
,
:target
=>
"_blank
"
%br
/
=
link_to
"history"
,
project_commits_path
(
@project
,
:path
=>
params
[
:path
],
:ref
=>
@ref
),
:class
=>
"right"
,
:style
=>
"margin-right:10px;"
-
if
file
.
text?
-
if
file
.
text?
.view_file_content
.view_file_content
-
unless
file
.
empty?
-
unless
file
.
empty?
...
...
app/views/refs/tree.html.haml
View file @
34e15801
%ul
.tabs
%li
=
form_tag
switch_project_refs_path
(
@project
),
:method
=>
:get
,
:class
=>
"project-refs-form"
,
:remote
=>
true
do
=
select_tag
"ref"
,
grouped_options_refs
,
:onchange
=>
"$(this.form).trigger('submit');"
,
:class
=>
"project-refs-select"
=
hidden_field_tag
:destination
,
"tree"
=
hidden_field_tag
:path
,
params
[
:path
]
%li
{
:class
=>
"#{'active' if (controller.controller_name == "
refs
") }"
}
=
link_to
tree_project_ref_path
(
@project
,
@ref
)
do
Code
#tree-holder
=
render
:partial
=>
"tree"
,
:locals
=>
{
:repo
=>
@repo
,
:commit
=>
@commit
,
:tree
=>
@tree
}
#tree-holder
=
render
:partial
=>
"tree"
,
:locals
=>
{
:repo
=>
@repo
,
:commit
=>
@commit
,
:tree
=>
@tree
}
:javascript
:javascript
...
...
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