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
Léo-Paul Géneau
gitlab-ce
Commits
bfe23847
Commit
bfe23847
authored
May 09, 2015
by
Douwe Maan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Restructure project sidebar.
parent
e9dff9f4
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
81 additions
and
65 deletions
+81
-65
app/helpers/icons_helper.rb
app/helpers/icons_helper.rb
+3
-3
app/views/projects/_aside.html.haml
app/views/projects/_aside.html.haml
+78
-62
No files found.
app/helpers/icons_helper.rb
View file @
bfe23847
...
@@ -26,15 +26,15 @@ module IconsHelper
...
@@ -26,15 +26,15 @@ module IconsHelper
end
end
def
public_icon
def
public_icon
icon
(
'globe'
)
icon
(
'globe
fw
'
)
end
end
def
internal_icon
def
internal_icon
icon
(
'shield'
)
icon
(
'shield
fw
'
)
end
end
def
private_icon
def
private_icon
icon
(
'lock'
)
icon
(
'lock
fw
'
)
end
end
def
file_type_icon_class
(
type
,
mode
,
name
)
def
file_type_icon_class
(
type
,
mode
,
name
)
...
...
app/views/projects/_aside.html.haml
View file @
bfe23847
.clearfix
.clearfix
.append-bottom-20
=
render
"shared/clone_panel"
-
unless
@project
.
empty_repo?
-
unless
@project
.
empty_repo?
.well
.well
%h4
.visibility-level-label
%h4
.visibility-level-label
=
visibility_level_icon
(
@project
.
visibility_level
)
=
visibility_level_icon
(
@project
.
visibility_level
)
=
"
#{
visibility_level_label
(
@project
.
visibility_level
).
capitalize
}
project"
=
"
#{
visibility_level_label
(
@project
.
visibility_level
).
capitalize
}
project"
%ul
.nav.nav-pills
%li
=
link_to
pluralize
(
number_with_delimiter
(
@repository
.
commit_count
),
'commit'
),
namespace_project_commits_path
(
@project
.
namespace
,
@project
,
@ref
||
@repository
.
root_ref
)
%li
=
link_to
pluralize
(
number_with_delimiter
(
@repository
.
branch_names
.
count
),
'branch'
),
namespace_project_branches_path
(
@project
.
namespace
,
@project
)
%li
=
link_to
pluralize
(
number_with_delimiter
(
@repository
.
tag_names
.
count
),
'tag'
),
namespace_project_tags_path
(
@project
.
namespace
,
@project
)
.actions
=
link_to
namespace_project_compare_index_path
(
@project
.
namespace
,
@project
,
from:
@repository
.
root_ref
,
to:
@ref
||
@repository
.
root_ref
),
class:
'btn btn-sm'
do
%i
.fa.fa-exchange
Compare code
-
if
can?
(
current_user
,
:download_code
,
@project
)
-
if
@repository
.
changelog
||
@repository
.
license
||
@repository
.
contribution_guide
%ul
.nav.nav-pills
=
render
'projects/repositories/download_archive'
,
split_button:
true
,
btn_class:
'btn-group-sm'
-
if
@repository
.
changelog
%li
.hidden-xs
=
link_to
changelog_url
(
@project
)
do
=
icon
(
"list-alt fw"
)
Changelog
-
if
@repository
.
license
%li
=
link_to
license_url
(
@project
)
do
=
icon
(
"check-circle-o fw"
)
License
-
if
@repository
.
contribution_guide
%li
=
link_to
contribution_guide_url
(
@project
)
do
=
icon
(
"info-circle fw"
)
Contribution guide
-
unless
@project
.
empty_repo?
.well
%h4
Contribute
%ul
.nav.nav-pills
-
if
@repository
.
changelog
%li
.hidden-xs
=
link_to
changelog_url
(
@project
)
do
Changelog
-
if
@repository
.
contribution_guide
%li
.hidden-xs
=
link_to
contribution_guide_url
(
@project
)
do
Contribution guide
-
if
@repository
.
license
%li
=
link_to
license_url
(
@project
)
do
License
.actions
.actions
=
link_to
url_for_new_issue
(
@project
,
only_path:
true
),
title:
"New Issue"
,
class:
'btn btn-sm'
do
-
if
can?
current_user
,
:write_issue
,
@project
%i
.fa.fa-fw.fa-exclamation-circle
=
link_to
url_for_new_issue
(
@project
,
only_path:
true
),
title:
"New Issue"
,
class:
'btn btn-sm append-right-10'
do
New issue
=
icon
(
"exclamation-circle fw"
)
New Issue
-
if
can?
current_user
,
:write_merge_request
,
@project
-
if
can?
current_user
,
:write_merge_request
,
@project
=
link_to
new_namespace_project_merge_request_path
(
@project
.
namespace
,
@project
),
class:
"btn btn-sm"
,
title:
"New Merge Request"
do
=
link_to
new_namespace_project_merge_request_path
(
@project
.
namespace
,
@project
),
class:
"btn btn-sm"
,
title:
"New Merge Request"
do
%i
.fa.fa-plus
=
icon
(
"plus fw"
)
New Merge Request
New Merge Request
-
if
version
=
@repository
.
version
.well
-
if
@project
.
archived?
.alert.alert-warning
%h4
%h4
%i
.fa.fa-exclamation-triangle
=
icon
(
"clock-o fw"
)
Archived project!
Version
%p
Repository is read-only
.pull-right
=
link_to
version_url
(
@project
)
do
=
@repository
.
blob_by_oid
(
version
.
id
).
data
-
if
@project
.
forked_from_project
-
if
forked_from_project
=
@project
.
forked_from_project
.well
.well
%h4
%h4
=
icon
(
"code-fork fw"
)
Forked from
Forked from
.pull-right
.pull-right
=
link_to
@project
.
forked_from_project
.
namespace
.
try
(
:name
),
project_path
(
@project
.
forked_from_project
)
=
link_to
forked_from_project
.
namespace
.
try
(
:name
),
project_path
(
forked_from_project
)
-
@project
.
ci_services
.
each
do
|
ci_service
|
-
if
ci_service
.
active?
&&
ci_service
.
respond_to?
(
:builds_path
)
.well
%h4
=
icon
(
"check fw"
)
=
ci_service
.
title
.pull-right
-
if
ci_service
.
respond_to?
(
:status_img_path
)
=
link_to
ci_service
.
builds_path
,
:'data-no-turbolink'
=>
'data-no-turbolink'
do
=
image_tag
ci_service
.
status_img_path
,
alt:
"build status"
-
else
=
link_to
'view builds'
,
ci_service
.
builds_path
,
:'data-no-turbolink'
=>
'data-no-turbolink'
-
if
version
=
@repository
.
version
-
unless
@project
.
empty_repo?
.well
%h4
Version
.pull-right
=
link_to
version_url
(
@project
)
do
=
@repository
.
blob_by_oid
(
version
.
id
).
data
-
@project
.
ci_services
.
each
do
|
ci_service
|
-
if
ci_service
.
active?
&&
ci_service
.
respond_to?
(
:builds_path
)
.well
.well
%h4
%h4
=
ci_service
.
title
=
icon
(
"archive fw"
)
.pull-right
Repository
-
if
ci_service
.
respond_to?
(
:status_img_path
)
=
link_to
ci_service
.
builds_path
,
:'data-no-turbolink'
=>
'data-no-turbolink'
do
%ul
.nav.nav-pills
=
image_tag
ci_service
.
status_img_path
,
alt:
"build status"
%li
-
else
=
link_to
namespace_project_commits_path
(
@project
.
namespace
,
@project
,
@ref
||
@repository
.
root_ref
)
do
=
link_to
'view builds'
,
ci_service
.
builds_path
,
:'data-no-turbolink'
=>
'data-no-turbolink'
=
icon
(
"history fw"
)
=
pluralize
(
number_with_delimiter
(
@repository
.
commit_count
),
'commit'
)
%li
=
link_to
namespace_project_branches_path
(
@project
.
namespace
,
@project
)
do
=
icon
(
"code-fork fw"
)
=
pluralize
(
number_with_delimiter
(
@repository
.
branch_names
.
count
),
'branch'
)
%li
=
link_to
namespace_project_tags_path
(
@project
.
namespace
,
@project
)
do
=
icon
(
"tags fw"
)
=
pluralize
(
number_with_delimiter
(
@repository
.
tag_names
.
count
),
'tag'
)
=
render
"shared/clone_panel"
.actions.prepend-top-10
=
link_to
namespace_project_compare_index_path
(
@project
.
namespace
,
@project
,
from:
@repository
.
root_ref
,
to:
@ref
||
@repository
.
root_ref
),
class:
'btn btn-sm append-right-10'
do
%i
.fa.fa-exchange
Compare code
-
if
can?
(
current_user
,
:download_code
,
@project
)
=
render
'projects/repositories/download_archive'
,
split_button:
true
,
btn_class:
'btn-group-sm'
-
if
@project
.
archived?
.alert.alert-warning
%h4
=
icon
(
"exclamation-triangle fw"
)
Archived project!
%p
Repository is read-only
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