Redesign project home page
This commit is contained in:
parent
e660da4f43
commit
7999c2065e
2 changed files with 105 additions and 37 deletions
|
@ -14,25 +14,67 @@
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.project_clone_panel {
|
.project-home-panel {
|
||||||
@include border-radius(4px);
|
.project-home-title {
|
||||||
@include bg-gray-gradient;
|
font-size: 18px;
|
||||||
padding: 4px 7px;
|
color: #777;
|
||||||
border: 1px solid #CCC;
|
margin: 0;
|
||||||
margin-bottom: 20px;
|
line-height: 2;
|
||||||
|
}
|
||||||
|
.project-home-dropdown {
|
||||||
|
margin-left: 10px;
|
||||||
|
float: right;
|
||||||
|
}
|
||||||
|
.project-home-extra {
|
||||||
|
margin-top: 10px;
|
||||||
|
|
||||||
.btn {
|
.project-home-desc {
|
||||||
padding: 4px 12px;
|
float: left;
|
||||||
|
color: #999;
|
||||||
|
}
|
||||||
|
|
||||||
|
.project-home-links {
|
||||||
|
float: right;
|
||||||
|
a {
|
||||||
|
margin-left: 10px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.public-label {
|
||||||
|
font-size: 14px;
|
||||||
|
background: #f1f1f1;
|
||||||
|
padding: 6px 10px;
|
||||||
|
border-radius: 4px;
|
||||||
|
margin-left: 10px;
|
||||||
|
color: #888;
|
||||||
|
text-shadow: 0 1px 1px #FFF;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.project_clone_holder {
|
.git-clone-holder {
|
||||||
input[type="text"] {
|
float: right;
|
||||||
@extend .monospace;
|
|
||||||
border: 1px solid #BBB;
|
.btn {
|
||||||
|
border: none;
|
||||||
|
background: none;
|
||||||
box-shadow: none;
|
box-shadow: none;
|
||||||
margin-left: -1px;
|
color: #29b;
|
||||||
background: #FFF;
|
padding: 6px;
|
||||||
|
|
||||||
|
&.active {
|
||||||
|
color: #333;
|
||||||
|
font-weight: bold;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
input[type="text"] {
|
||||||
|
margin-left: 5px;
|
||||||
|
@extend .monospace;
|
||||||
|
border: 1px solid #E1E1E1;
|
||||||
|
box-shadow: none;
|
||||||
|
background: #FAFAFA;
|
||||||
|
padding: 6px 10px;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,31 @@
|
||||||
= render 'clone_panel'
|
.project-home-panel
|
||||||
|
.row
|
||||||
|
.span4
|
||||||
|
%h4.project-home-title
|
||||||
|
= @project.name_with_namespace
|
||||||
|
- if @project.public
|
||||||
|
%span.public-label Public
|
||||||
|
.span8
|
||||||
|
.project-home-dropdown
|
||||||
|
= render "dropdown"
|
||||||
|
.form-horizontal
|
||||||
|
= render "shared/clone_panel"
|
||||||
|
|
||||||
|
.project-home-extra.clearfix
|
||||||
|
.project-home-desc
|
||||||
|
- if @project.description.present?
|
||||||
|
= @project.description
|
||||||
|
- if can?(current_user, :admin_project, @project)
|
||||||
|
–
|
||||||
|
%strong= link_to 'Edit', edit_project_path
|
||||||
|
|
||||||
|
.project-home-links
|
||||||
|
= link_to pluralize(@repository.round_commit_count, 'commit'), project_commits_path(@project, @ref || @repository.root_ref)
|
||||||
|
= link_to pluralize(@repository.branch_names.count, 'branch'), project_branches_path(@project)
|
||||||
|
= link_to pluralize(@repository.tag_names.count, 'tag'), project_tags_path(@project)
|
||||||
|
%span.light.prepend-left-20= repository_size
|
||||||
|
|
||||||
|
%hr
|
||||||
.row
|
.row
|
||||||
.span9
|
.span9
|
||||||
= render "events/event_last_push", event: @last_push
|
= render "events/event_last_push", event: @last_push
|
||||||
|
@ -7,17 +33,29 @@
|
||||||
.content_list
|
.content_list
|
||||||
.loading.hide
|
.loading.hide
|
||||||
.span3
|
.span3
|
||||||
.light-well
|
.clearfix
|
||||||
%h3.page-title
|
- if @project.forked_from_project
|
||||||
= @project.name
|
.alert.alert-success
|
||||||
- if @project.description.present?
|
%i.icon-code-fork
|
||||||
%p.light= @project.description
|
Forked from:
|
||||||
|
= link_to @project.forked_from_project.name_with_namespace, project_path(@project.forked_from_project)
|
||||||
|
- unless @project.empty_repo?
|
||||||
|
- if current_user && can?(current_user, :fork_project, @project) && @project.namespace != current_user.namespace
|
||||||
|
- if current_user.already_forked?(@project)
|
||||||
|
= link_to project_path(current_user.fork_of(@project)), class: 'btn btn-block' do
|
||||||
|
%i.icon-ok
|
||||||
|
Already forked
|
||||||
|
- else
|
||||||
|
= link_to fork_project_path(@project), title: "Fork", class: "btn btn-block", method: "POST" do
|
||||||
|
%i.icon-code-fork
|
||||||
|
Fork repository
|
||||||
|
|
||||||
%hr
|
- if can? current_user, :download_code, @project
|
||||||
%p
|
= link_to archive_project_repository_path(@project), class: "btn btn-block" do
|
||||||
%p
|
%i.icon-download-alt
|
||||||
%span.light Repo size is
|
%span Download
|
||||||
= repository_size
|
%br
|
||||||
|
.light-well
|
||||||
%p
|
%p
|
||||||
%span.light Created at
|
%span.light Created at
|
||||||
#{@project.created_at.stamp('Aug 22, 2013')}
|
#{@project.created_at.stamp('Aug 22, 2013')}
|
||||||
|
@ -27,19 +65,7 @@
|
||||||
#{link_to @project.group.name, @project.group} Group
|
#{link_to @project.group.name, @project.group} Group
|
||||||
- else
|
- else
|
||||||
#{link_to @project.owner_name, @project.owner}
|
#{link_to @project.owner_name, @project.owner}
|
||||||
- if @project.forked_from_project
|
|
||||||
%p
|
|
||||||
%i.icon-code-fork
|
|
||||||
Forked from:
|
|
||||||
= link_to @project.forked_from_project.name_with_namespace, project_path(@project.forked_from_project)
|
|
||||||
|
|
||||||
%hr
|
|
||||||
%p
|
|
||||||
= link_to pluralize(@repository.round_commit_count, 'commit'), project_commits_path(@project, @ref || @repository.root_ref)
|
|
||||||
%p
|
|
||||||
= link_to pluralize(@repository.branch_names.count, 'branch'), project_branches_path(@project)
|
|
||||||
%p
|
|
||||||
= link_to pluralize(@repository.tag_names.count, 'tag'), project_tags_path(@project)
|
|
||||||
|
|
||||||
- if @project.gitlab_ci?
|
- if @project.gitlab_ci?
|
||||||
%hr
|
%hr
|
||||||
|
|
Loading…
Reference in a new issue