Commit 94db8a1c authored by Dmitriy Zaporozhets's avatar Dmitriy Zaporozhets

Usability & design improvements

parent 9a24ccde
...@@ -10,8 +10,12 @@ a { ...@@ -10,8 +10,12 @@ a {
color: $link_color !important; color: $link_color !important;
} }
.pills a:hover {
background-color:#ccc;
}
.pills .active a { .pills .active a {
background-color: #474D57; background-color: #aaa;
} }
.label { .label {
...@@ -83,7 +87,7 @@ a { ...@@ -83,7 +87,7 @@ a {
} }
.container .sidebar { .container .sidebar {
width: 250px; width: 220px;
height:100%; height:100%;
min-height:450px; min-height:450px;
float:right; float:right;
...@@ -131,6 +135,15 @@ nav.main_menu { ...@@ -131,6 +135,15 @@ nav.main_menu {
margin: 0; margin: 0;
float:left; float:left;
text-shadow:0 1px 1px white; text-shadow:0 1px 1px white;
&.home {
padding:7px 35px;
img {
position:relative;
top:4px;
}
}
&.current { &.current {
background:#DDD; background:#DDD;
} }
...@@ -182,7 +195,7 @@ img.lil_av { ...@@ -182,7 +195,7 @@ img.lil_av {
p { padding-top:5px; margin:0; color:$style_color;} p { padding-top:5px; margin:0; color:$style_color;}
.author { color: #999; } .author { color: #999; }
p { p {
color:$style_color; color:#222;
margin-bottom: 0; margin-bottom: 0;
img { img {
position:relative; position:relative;
...@@ -230,6 +243,27 @@ img.lil_av { ...@@ -230,6 +243,27 @@ img.lil_av {
.widget { .widget {
padding:20px; padding:20px;
margin-bottom:20px; margin-bottom:20px;
background-image: -webkit-gradient(linear, 0 0, 0 30, color-stop(0.066, #fff), to(#f1f1f1));
background-image: -webkit-linear-gradient(#fff 6.6%, #f1f1f1);
background-image: -moz-linear-gradient(#fff 6.6%, #f1f1f1);
background-image: -o-linear-gradient(#fff 6.6%, #f1f1f1);
border: 1px solid #DDD;
border-radius: 5px;
.link_holder {
background:#eee;
position:relative;
left:-20px;
top:20px;
padding:10px 20px;
width:100%;
border-top:1px solid #ccc;
a {
font-size:14px;
color:#666;
}
}
} }
...@@ -242,15 +276,20 @@ img.lil_av { ...@@ -242,15 +276,20 @@ img.lil_av {
margin:0; margin:0;
} }
h5 { h5, .title {
padding: 0 10px; padding: 0 10px;
background:#f5f5f5; background:#f5f5f5;
border-bottom: 1px solid #ccc; border-bottom: 1px solid #ccc;
@include round-borders-top(4px); @include round-borders-top(4px);
border-top:none; border-top:none;
form {
padding-top:16px;
}
} }
li {
li, .wll {
padding:10px; padding:10px;
&:first-child { &:first-child {
@include round-borders-top(4px); @include round-borders-top(4px);
...@@ -266,3 +305,11 @@ img.lil_av { ...@@ -266,3 +305,11 @@ img.lil_av {
} }
.help li { color:#111 } .help li { color:#111 }
.back_link {
text-decoration:underline;
font-size:14px;
font-weight:bold;
padding:10px 0;
padding-bottom:0;
}
...@@ -130,14 +130,21 @@ table.highlighttable .linenodiv pre { ...@@ -130,14 +130,21 @@ table.highlighttable .linenodiv pre {
} }
} }
.breadcrumb a { .breadcrumb {
color:$style_color; background:white;
font-weight:bold; border:none;
a {
color:$link_color;
font-weight:bold;
font-size:13px;
}
} }
#tree-slider { #tree-slider {
td { td {
padding:7px; padding:7px;
border-color:#f1f1f1;
} }
th { th {
......
...@@ -24,7 +24,9 @@ class MergeRequestsController < ApplicationController ...@@ -24,7 +24,9 @@ class MergeRequestsController < ApplicationController
@merge_requests = @project.merge_requests @merge_requests = @project.merge_requests
@merge_requests = case params[:f].to_i @merge_requests = case params[:f].to_i
when 1 then @merge_requests
when 2 then @merge_requests.closed when 2 then @merge_requests.closed
when 2 then @merge_requests.opened.assigned(current_user)
else @merge_requests.opened else @merge_requests.opened
end end
......
...@@ -42,7 +42,7 @@ class Commit ...@@ -42,7 +42,7 @@ class Commit
end end
def author_name def author_name
author.name author.name.force_encoding("UTF-8")
end end
def committer_name def committer_name
......
...@@ -65,7 +65,11 @@ class User < ActiveRecord::Base ...@@ -65,7 +65,11 @@ class User < ActiveRecord::Base
def self.generate_random_password def self.generate_random_password
(0...8).map{ ('a'..'z').to_a[rand(26)] }.join (0...8).map{ ('a'..'z').to_a[rand(26)] }.join
end end
def first_name
name.split(" ").first unless name.blank?
end
def self.find_for_ldap_auth(omniauth) def self.find_for_ldap_auth(omniauth)
username = omniauth.sAMAccountName[0] username = omniauth.sAMAccountName[0]
......
...@@ -12,7 +12,7 @@ ...@@ -12,7 +12,7 @@
= image_tag gravatar_icon(issue.assignee_email), :class => "avatar" = image_tag gravatar_icon(issue.assignee_email), :class => "avatar"
%span.update-author %span.update-author
assigned to assigned to
%strong= link_to_issue_assignee(issue) %strong= issue.assignee_name
- if issue.critical - if issue.critical
%span.label.important critical %span.label.important critical
- if issue.today? - if issue.today?
......
...@@ -9,30 +9,30 @@ ...@@ -9,30 +9,30 @@
= link_to new_project_issue_path(@project), :class => "right btn small", :title => "New Issue", :remote => true do = link_to new_project_issue_path(@project), :class => "right btn small", :title => "New Issue", :remote => true do
New Issue New Issue
%hr %hr
%div#issues-table-holder %div#issues-table-holder.ui-box
.row .title
.span8 .row
%ul.pills.left .span8
%li{:class => ("active" if (params[:f] == "0" || !params[:f]))} %ul.pills.left
= link_to project_issues_path(@project, :f => 0) do %li{:class => ("active" if (params[:f] == "0" || !params[:f]))}
Open = link_to project_issues_path(@project, :f => 0) do
%li{:class => ("active" if params[:f] == "2")} Open
= link_to project_issues_path(@project, :f => 2) do %li{:class => ("active" if params[:f] == "2")}
Closed = link_to project_issues_path(@project, :f => 2) do
%li{:class => ("active" if params[:f] == "3")} Closed
= link_to project_issues_path(@project, :f => 3) do %li{:class => ("active" if params[:f] == "3")}
To Me = link_to project_issues_path(@project, :f => 3) do
%li{:class => ("active" if params[:f] == "1")} To Me
= link_to project_issues_path(@project, :f => 1) do %li{:class => ("active" if params[:f] == "1")}
All = link_to project_issues_path(@project, :f => 1) do
All
.span2.right .span3.right
= form_tag search_project_issues_path(@project), :method => :get, :remote => true, :id => "issue_search_form", :class => :right do = form_tag search_project_issues_path(@project), :method => :get, :remote => true, :id => "issue_search_form", :class => :right do
= hidden_field_tag :project_id, @project.id, { :id => 'project_id' } = hidden_field_tag :project_id, @project.id, { :id => 'project_id' }
= hidden_field_tag :status, params[:f] = hidden_field_tag :status, params[:f]
= search_field_tag :issue_search, nil, { :placeholder => 'Search', :class => 'issue_search' } = search_field_tag :issue_search, nil, { :placeholder => 'Search', :class => 'issue_search' }
%hr
%ul#issues-table.unstyled= render "issues" %ul#issues-table.unstyled= render "issues"
:javascript :javascript
......
...@@ -14,6 +14,11 @@ ...@@ -14,6 +14,11 @@
= link_to edit_project_issue_path(@project, @issue), :class => "btn small" do = link_to edit_project_issue_path(@project, @issue), :class => "btn small" do
Edit Edit
.back_link
= link_to project_issues_path(@project) do
&larr; To issues list
%hr %hr
- if @issue.closed - if @issue.closed
.alert-message.error Closed .alert-message.error Closed
......
...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,7 @@
%hr %hr
%div#keys-table{ :class => "update-data ui-box ui-box-small ui-box-big" } %div#keys-table
%ul.unstyled %ul.unstyled
- @keys.each do |key| - @keys.each do |key|
= render(:partial => 'show', :locals => {:key => key}) = render(:partial => 'show', :locals => {:key => key})
%nav.main_menu %nav.main_menu
= link_to project_path(@project), :class => project_tab_class do = link_to project_path(@project), :class => "#{project_tab_class}", :title => "Project" do
Project Project
- if @project.repo_exists? - if @project.repo_exists?
......
...@@ -4,16 +4,16 @@ ...@@ -4,16 +4,16 @@
You can create at least You can create at least
= current_user.projects_limit = current_user.projects_limit
projects. Click on button to add a new one projects. Click on button to add a new one
%hr .link_holder
= link_to new_project_path, :class => "btn small" do = link_to new_project_path, :class => "" do
New Project » New Project »
- if current_user.is_admin? - if current_user.is_admin?
.widget .widget
You have administrator privilegies. You can configure application following this button: You have administrator privilegies. You can configure application following this button:
%hr .link_holder
= link_to admin_root_path, :class => "btn small", :title => "Admin" do = link_to admin_root_path, :class => "", :title => "Admin" do
Visit Admin Area » Visit Admin Area »
- if current_user.projects.count > 0 - if current_user.projects.count > 0
= render "widgets/recent_projects" = render "widgets/recent_projects"
......
...@@ -10,7 +10,7 @@ ...@@ -10,7 +10,7 @@
= link_to "Password & token", profile_password_path, :class => current_page?(:controller => "profile", :action => :password) ? "current" : nil = link_to "Password & token", profile_password_path, :class => current_page?(:controller => "profile", :action => :password) ? "current" : nil
= link_to "Design", profile_design_path, :class => current_page?(:controller => "profile", :action => :design) ? "current" : nil = link_to "Design", profile_design_path, :class => current_page?(:controller => "profile", :action => :design) ? "current" : nil
= link_to keys_path, :class => controller.controller_name == "keys" ? "current" : nil do = link_to keys_path, :class => controller.controller_name == "keys" ? "current" : nil do
Keys SSH Keys
.content .content
.row .row
.span12= yield .span12= yield
......
%li.wll %li.wll
= image_tag gravatar_icon(merge_request.author_email), :class => "avatar" = image_tag gravatar_icon(merge_request.author_email), :class => "avatar"
%span.update-author %span.update-author
%strong= link_to_merge_request_author(merge_request) %strong= merge_request.author_name
authored authored
= time_ago_in_words(merge_request.created_at) = time_ago_in_words(merge_request.created_at)
ago ago
......
...@@ -6,14 +6,21 @@ ...@@ -6,14 +6,21 @@
%hr %hr
%ul.pills .ui-box
%li{:class => ("active" if (params[:f] == "0" || !params[:f]))} .title
= link_to project_merge_requests_path(@project, :f => 0) do %ul.pills
Open %li{:class => ("active" if (params[:f] == "0" || !params[:f]))}
%li{:class => ("active" if params[:f] == "2")} = link_to project_merge_requests_path(@project, :f => 0) do
= link_to project_merge_requests_path(@project, :f => 2) do Open
Closed %li{:class => ("active" if params[:f] == "2")}
= link_to project_merge_requests_path(@project, :f => 2) do
Closed
%li{:class => ("active" if params[:f] == "3")}
= link_to project_merge_requests_path(@project, :f => 3) do
To Me
%li{:class => ("active" if params[:f] == "1")}
= link_to project_merge_requests_path(@project, :f => 1) do
All
%hr %ul.unstyled= render @merge_requests
%ul.unstyled= render @merge_requests
...@@ -19,6 +19,9 @@ ...@@ -19,6 +19,9 @@
= link_to edit_project_merge_request_path(@project, @merge_request), :class => "btn small" do = link_to edit_project_merge_request_path(@project, @merge_request), :class => "btn small" do
Edit Edit
.back_link
= link_to project_merge_requests_path(@project) do
&larr; To merge requests
%hr %hr
- if @merge_request.closed - if @merge_request.closed
.alert-message.error Closed .alert-message.error Closed
......
= render "project_head" = render "project_head"
%h3 %h3
= @project.name = @project.name
- if can? current_user, :download_code, @project
= link_to "Download", archive_project_repository_path(@project), :class => "btn small right"
.back_link
= link_to projects_path do
&larr; To projects list
%hr %hr
.alert-message.block-message.warning .alert-message.block-message.warning
.input .input
...@@ -10,7 +15,8 @@ ...@@ -10,7 +15,8 @@
= simple_format @project.description = simple_format @project.description
%h5.cgray Recent Activity .ui-box
.content_list= render "feed" %h5.cgray Recent Activity
.content_list= render "feed"
...@@ -6,6 +6,16 @@ ...@@ -6,6 +6,16 @@
%hr %hr
.entry
%p
Last commit was
%small
%code= @activities.first.commit.id.to_s[0..10]
= time_ago_in_words(@activities.first.commit.committed_date)
ago to
= link_to project_commits_path(@project, :ref => @activities.first.head.name), :class => "visible_link" do
%span.label= @activities.first.head.name
.alert-message.block-message.warning .alert-message.block-message.warning
.input .input
.input-prepend .input-prepend
...@@ -13,20 +23,12 @@ ...@@ -13,20 +23,12 @@
= text_field_tag :project_clone, @project.url_to_repo, :class => "xlarge one_click_select git_clone_url" = text_field_tag :project_clone, @project.url_to_repo, :class => "xlarge one_click_select git_clone_url"
%p
Last commit was
%small
%code= @activities.first.commit.id.to_s[0..10]
= time_ago_in_words(@activities.first.commit.committed_date) .ui-box
ago to %h5.cgray
= link_to project_commits_path(@project, :ref => @activities.first.head.name), :class => "visible_link" do Recent Branches
%span.label= @activities.first.head.name
%h4.cgray %ul.unstyled
Recent Branches - @activities.each do |update|
= render "repositories/feed", :update => update, :project => @project
%ul.unstyled
- @activities.each do |update|
= render "repositories/feed", :update => update, :project => @project
- allow_admin = can? current_user, :admin_project, @project - allow_admin = can? current_user, :admin_project, @project
- user = @team_member.user - user = @team_member.user
%div .media-grid
= link_to team_project_path(@project), :class => "btn right" do = link_to "#" do
Team » = image_tag gravatar_icon(user.email, 60), :class => "thumbnail", :width => 60
%h3.media_h
.media-grid = user.name
= link_to "#" do %br
= image_tag gravatar_icon(user.email, 90), :class => "thumbnail" %small= user.email
%h3.media_h= user.name
.back_link
= link_to team_project_path(@project), :class => "" do
&larr; To team list
%hr
%table.no-borders %table.no-borders
%tr %tr
%td Name %td Name
...@@ -23,7 +27,10 @@ ...@@ -23,7 +27,10 @@
%td= @team_member.created_at.stamp("Aug 21, 2011") %td= @team_member.created_at.stamp("Aug 21, 2011")
%tr %tr
%td Project Access %td
Project Access
(#{link_to "read more", help_permissions_path, :class => "vlink"})
%td %td
= form_for(@team_member, :as => :team_member, :url => project_team_member_path(@project, @team_member)) do |f| = form_for(@team_member, :as => :team_member, :url => project_team_member_path(@project, @team_member)) do |f|
= f.select :project_access, options_for_select(Project.access_options, @team_member.project_access), {}, :class => "project-access-select", :disabled => !allow_admin = f.select :project_access, options_for_select(Project.access_options, @team_member.project_access), {}, :class => "project-access-select", :disabled => !allow_admin
......
...@@ -3,20 +3,31 @@ ...@@ -3,20 +3,31 @@
.media-grid .media-grid
%li %li
= link_to project_team_member_path(@project, member), :title => current_user.name do = link_to project_team_member_path(@project, member), :title => current_user.name do
= image_tag gravatar_icon(current_user.email, 90), :class => "thumbnail" = image_tag gravatar_icon(current_user.email, 60), :class => "thumbnail", :width => 60
.row %h4
.span4 Hi,
%h4 = truncate current_user.first_name, :lenght => 24
= truncate(current_user.name, :lenght => 24) !
- if @project.owner == current_user %p
%span.label Project Owner - if @project.issues_enabled
Assigned issues:
= current_user.assigned_issues.count
%br
- if @project.merge_requests_enabled
Assigned merge request:
= current_user.assigned_merge_requests.count
%br
Your merge requests:
= current_user.assigned_merge_requests.count
.link_holder
= link_to project_team_member_path(@project, member), :title => current_user.name do
= "Access: #{member.project_access_human} »"
.span3
%span.label= member.project_access_human
- if can? current_user, :write_project, @project
-#- if can? current_user, :write_project, @project
.widget
- if @project.issues_enabled && @project.merge_requests_enabled - if @project.issues_enabled && @project.merge_requests_enabled
%hr
.span3 .span3
%p You have access to create new issue or merge request. %p You have access to create new issue or merge request.
%div %div
......
...@@ -7,4 +7,5 @@ ...@@ -7,4 +7,5 @@
%li %li
= link_to project_path(project) do = link_to project_path(project) do
= project.name = project.name
= link_to "More » ", projects_path .link_holder
= link_to "Projects » ", projects_path
...@@ -21,7 +21,6 @@ describe "Snippets" do ...@@ -21,7 +21,6 @@ describe "Snippets" do
it { should have_content(@snippet.title[0..10]) } it { should have_content(@snippet.title[0..10]) }
it { should have_content(@snippet.project.name) } it { should have_content(@snippet.project.name) }
it { should have_content(@snippet.author.name) }
describe "Destroy" do describe "Destroy" do
before do before do
......
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