Commit 0a08c775 authored by Dmitriy Zaporozhets's avatar Dmitriy Zaporozhets

Improve UX for project home page

Signed-off-by: default avatarDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
parent 00d6ac29
......@@ -16,7 +16,7 @@
.project-home-panel {
border-bottom: 1px solid #DDD;
padding-bottom: 30px;
padding-bottom: 25px;
margin-bottom: 30px;
.project-home-title {
......@@ -166,3 +166,21 @@ ul.nav.nav-projects-tabs {
color: #777;
}
}
.project-side {
.btn-block {
background-image: none;
background-color: #F1f1f1;
border-color: #EEE;
&:hover {
background-color: #eee;
border-color: #DDD;
}
}
.project-fork-icon {
float: left;
font-size: 26px;
margin-right: 10px;
line-height: 1.5;
}
}
......@@ -6,15 +6,19 @@
- if @project.issues_enabled && can?(current_user, :write_issue, @project)
%li
= link_to url_for_new_issue, title: "New Issue" do
Issue
New issue
- if @project.merge_requests_enabled && can?(current_user, :write_merge_request, @project)
%li
= link_to new_project_merge_request_path(@project), title: "New Merge Request" do
Merge Request
New merge request
- if @project.snippets_enabled && can?(current_user, :write_snippet, @project)
%li
= link_to new_project_snippet_path(@project), title: "New Snippet" do
Snippet
New snippet
- if can?(current_user, :admin_team_member, @project)
%li
= link_to new_project_team_member_path(@project), title: "New project member" do
New project member
- if can? current_user, :push_code, @project
%li.divider
%li
......@@ -26,9 +30,4 @@
%i.icon-tag
Git tag
- if can?(current_user, :admin_team_member, @project)
%li.divider
%li
= link_to new_project_team_member_path(@project), title: "New project member" do
Project member
......@@ -34,19 +34,20 @@
= render 'shared/event_filter'
.content_list
.loading.hide
.span3
.span3.project-side
.clearfix
- if @project.forked_from_project
.alert.alert-success
%i.icon-code-fork
%i.icon-code-fork.project-fork-icon
Forked from:
%br
= 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
%i.icon-compass
Go to fork
- else
= link_to fork_project_path(@project), title: "Fork", class: "btn btn-block", method: "POST" do
%i.icon-code-fork
......@@ -56,8 +57,9 @@
= link_to archive_project_repository_path(@project), class: "btn btn-block" do
%i.icon-download-alt
%span Download
%br
.light-well
= link_to project_compare_index_path(@project, from: @repository.root_ref, to: @ref || @repository.root_ref), class: 'btn btn-block' do
Compare code
.prepend-top-10
%p
%span.light Created on
#{@project.created_at.stamp('Aug 22, 2013')}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment