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 @@ ...@@ -16,7 +16,7 @@
.project-home-panel { .project-home-panel {
border-bottom: 1px solid #DDD; border-bottom: 1px solid #DDD;
padding-bottom: 30px; padding-bottom: 25px;
margin-bottom: 30px; margin-bottom: 30px;
.project-home-title { .project-home-title {
...@@ -166,3 +166,21 @@ ul.nav.nav-projects-tabs { ...@@ -166,3 +166,21 @@ ul.nav.nav-projects-tabs {
color: #777; 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 @@ ...@@ -6,15 +6,19 @@
- if @project.issues_enabled && can?(current_user, :write_issue, @project) - if @project.issues_enabled && can?(current_user, :write_issue, @project)
%li %li
= link_to url_for_new_issue, title: "New Issue" do = 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) - if @project.merge_requests_enabled && can?(current_user, :write_merge_request, @project)
%li %li
= link_to new_project_merge_request_path(@project), title: "New Merge Request" do = 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) - if @project.snippets_enabled && can?(current_user, :write_snippet, @project)
%li %li
= link_to new_project_snippet_path(@project), title: "New Snippet" do = 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 - if can? current_user, :push_code, @project
%li.divider %li.divider
%li %li
...@@ -26,9 +30,4 @@ ...@@ -26,9 +30,4 @@
%i.icon-tag %i.icon-tag
Git 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 @@ ...@@ -34,19 +34,20 @@
= render 'shared/event_filter' = render 'shared/event_filter'
.content_list .content_list
.loading.hide .loading.hide
.span3 .span3.project-side
.clearfix .clearfix
- if @project.forked_from_project - if @project.forked_from_project
.alert.alert-success .alert.alert-success
%i.icon-code-fork %i.icon-code-fork.project-fork-icon
Forked from: Forked from:
%br
= link_to @project.forked_from_project.name_with_namespace, project_path(@project.forked_from_project) = link_to @project.forked_from_project.name_with_namespace, project_path(@project.forked_from_project)
- unless @project.empty_repo? - unless @project.empty_repo?
- if current_user && can?(current_user, :fork_project, @project) && @project.namespace != current_user.namespace - if current_user && can?(current_user, :fork_project, @project) && @project.namespace != current_user.namespace
- if current_user.already_forked?(@project) - if current_user.already_forked?(@project)
= link_to project_path(current_user.fork_of(@project)), class: 'btn btn-block' do = link_to project_path(current_user.fork_of(@project)), class: 'btn btn-block' do
%i.icon-ok %i.icon-compass
Already forked Go to fork
- else - else
= link_to fork_project_path(@project), title: "Fork", class: "btn btn-block", method: "POST" do = link_to fork_project_path(@project), title: "Fork", class: "btn btn-block", method: "POST" do
%i.icon-code-fork %i.icon-code-fork
...@@ -56,8 +57,9 @@ ...@@ -56,8 +57,9 @@
= link_to archive_project_repository_path(@project), class: "btn btn-block" do = link_to archive_project_repository_path(@project), class: "btn btn-block" do
%i.icon-download-alt %i.icon-download-alt
%span Download %span Download
%br = link_to project_compare_index_path(@project, from: @repository.root_ref, to: @ref || @repository.root_ref), class: 'btn btn-block' do
.light-well Compare code
.prepend-top-10
%p %p
%span.light Created on %span.light Created on
#{@project.created_at.stamp('Aug 22, 2013')} #{@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