Commit 796784c7 authored by Dmitriy Zaporozhets's avatar Dmitriy Zaporozhets

Merge branch 'events' of dev.gitlabhq.com:gitlabhq into events

parents fa07c9d6 0a0710a5
......@@ -58,5 +58,5 @@ end
group :test do
gem "turn", :require => false
gem "simplecov", :require => false
gem "shoulda", "~> 3.0.0.beta2"
gem "shoulda", "3.0.0"
end
......@@ -232,9 +232,9 @@ GEM
ffi (~> 1.0.9)
multi_json (~> 1.0.4)
rubyzip
shoulda (3.0.0.beta2)
shoulda-context (~> 1.0.0.beta1)
shoulda-matchers (~> 1.0.0.beta1)
shoulda (3.0.0)
shoulda-context (~> 1.0.0)
shoulda-matchers (~> 1.0.0)
shoulda-context (1.0.0)
shoulda-matchers (1.0.0)
simplecov (0.5.4)
......@@ -322,7 +322,7 @@ DEPENDENCIES
rspec-rails
sass-rails (= 3.2.3)
seed-fu
shoulda (~> 3.0.0.beta2)
shoulda (= 3.0.0)
simplecov
six
sqlite3
......
......@@ -40,6 +40,7 @@ a {
.cred { color:#D12F19; }
.cgreen { color:#44aa22; }
.cblack { color:#111; }
.cwhite { color:#fff !important }
/** COMMON STYLES **/
.left {
......@@ -75,6 +76,10 @@ a {
.no-borders {
border:none;
}
table.no-borders {
border:none;
tr, td { border:none }
}
.no-padding {
padding:0 !important;
}
......@@ -433,7 +438,7 @@ input.git_clone_url {
}
.project_list_url {
width:270px;
width:250px;
background:#fff !important;
}
......@@ -441,7 +446,7 @@ input.git_clone_url {
@include shade;
@include round-borders-all(4px);
margin-bottom:20px;
width:338px;
width:298px;
float:left;
margin-left:20px;
border: 1px solid #DDD;
......@@ -600,3 +605,24 @@ p.time {
font-size: 90%;
margin: 30px 3px 3px 2px;
}
.dashboard_category {
margin-bottom:30px;
.dashboard_block {
width:700px;
margin:auto;
.wll {
border:none;
&:hover {
background:none;
}
h4 {
color:#666;
}
}
}
}
......@@ -70,6 +70,11 @@ $hover: #FDF5D9;
*/
@import "ui_basic.scss";
/**
* UI mars theme
*/
@import "ui_mars.scss";
/**
* Most of application styles placed here.
* This file represent common UI that should not be changed between themes
......
......@@ -57,11 +57,30 @@
text-shadow: 0 1px 1px #FFF;
}
&.home {
img {
float: left;
position: relative;
top: -9px;
width:46px;
}
}
&.admin_link {
width:16px;
height:16px;
padding: 5px;
border: 1px solid #ccc;
border-radius: 4px;
margin: 0px;
background: #eee;
margin-left:20px;
&:hover {
background:#f7f7f7;
}
img {
width:16px;
}
}
}
}
......
/**
* This file represent some UI that can be changed
* during web app restyle or theme select.
*
* Next items should be placed there
* - link colors
* - header styles
* - main menu styles
*
*/
.ui_mars {
/*
* Common styles
*
*/
a {
color: $link_color;
&:hover {
text-decoration:none;
color: $style_color;
}
}
/*
* Application Header
*
*/
header {
width:100%;
padding:0;
margin:0;
top:1px;
left:0;
background: #474D57 url('bg-header.png') repeat-x bottom;
z-index:10;
height:60px;
.search-input {
background:#474D57;
border-color:#888;
}
.app_logo {
width:230px;
float:left;
position:relative;
top:-4px;
a {
float:left;
h1 {
background: url('images.png') no-repeat -3px -7px;
width: 65px;
height: 26px;
margin: 5px 0;
padding: 0;
display: block;
float: left;
text-indent: -1000em;
}
&.home {
img {
display:none
}
}
&.admin_link {
width:16px;
height:16px;
padding: 5px;
border: 1px solid #888;
border-radius: 4px;
margin: 0px;
background:#474D57 ;
margin-left:20px;
margin-top:4px;
&:hover {
background:#f7f7f7;
}
img {
width:16px;
}
}
}
}
.wrapper {
margin:auto;
min-width:$min_app_width;
max-width:$max_app_width;
position:relative;
padding:15px 0;
.top_panel_content {
margin:0 $app_padding;
}
}
.project_name {
float:left;
width:400px;
margin:0;
margin-right:30px;
font-size:20px;
line-height:34px;
font-weight:bold;
color:#fff;
text-shadow: 0 1px 1px #111;
}
.git_url_wrapper {
padding:0px;
margin:0px;
float:left;
.git-url {
padding:0px;
margin:0px;
font-size: 12px;
margin-right:10px;
border-radius: 4px;
-moz-border-radius: 4px;
color: #666;
border: 1px solid #AAA;
padding: 0 10px 0 30px;
background: transparent url('images.png') no-repeat 8px -42px;
width: 260px;
height:26px;
}
}
/* Account box */
.account-box {
position: absolute;
right: 0;
top: 13px;
z-index: 10000;
width: 128px;
font-size: 11px;
float: right;
display: block;
cursor: pointer;
img {
border-radius: 4px;
right: 20px;
position: absolute;
width: 33px;
height: 33px;
display: block;
top: 0;
&:after {
content: " ";
display: block;
position: absolute;
top: 0;
right: 0;
left: 0;
bottom: 0;
float: right;
border-radius: 5px;
border: 1px solid rgba(255, 255, 255, 0.1);
border-bottom: 0;
background: -webkit-gradient(linear, 0% 0%, 0% 100%, from(rgba(255, 255, 255, 0.15)), to(rgba(0, 0, 0, 0.25))), -webkit-gradient(linear, left top, right bottom, color-stop(0, rgba(255, 255, 255, 0)), color-stop(0.5, rgba(255, 255, 255, 0.1)), color-stop(0.501, rgba(255, 255, 255, 0)), color-stop(1, rgba(255, 255, 255, 0)));
background: -moz-linear-gradient(top, rgba(255, 255, 255, 0.15), rgba(0, 0, 0, 0.25)), -moz-linear-gradient(left top, rgba(255, 255, 255, 0), rgba(255, 255, 255, 0.1) 50%, rgba(255, 255, 255, 0) 50%, rgba(255, 255, 255, 0));
background: linear-gradient(top, rgba(255, 255, 255, 0.15), rgba(0, 0, 0, 0.25)), linear-gradient(left top, rgba(255, 255, 255, 0), rgba(255, 255, 255, 0.1) 50%, rgba(255, 255, 255, 0) 50%, rgba(255, 255, 255, 0));
-webkit-background-origin: border-box;
-moz-background-origin: border;
background-origin: border-box; } } }
.account-box {
&.hover {
height: 138px; }
&:hover > .account-links {
display: block; } }
.account-links {
background: #79C3E0;
display: none;
border-radius: 5px;
width: 100px;
margin-top: 0;
float: right;
box-shadow: 0 1px 1px rgba(0, 0, 0, 0.2);
position: relative;
&:before {
content: ".";
width: 0;
height: 0;
position: absolute;
border: 5px solid transparent;
border-color: rgba(255, 255, 255, 0);
border-bottom-color: #333;
text-indent: -9999px;
top: -10px;
line-height: 0;
right: 10px;
z-index: 10; }
background: #333;
display: none;
z-index: 100000;
border-radius: 5px;
width: 100px;
position: absolute;
right: 20px;
top: 46px;
margin-top: 0;
float: right;
box-shadow: 0 1px 1px rgba(0, 0, 0, 0.2);
a {
color: #EEE;
padding: 6px 10px;
display: block;
text-shadow: none;
border-bottom: 1px solid #555;
&:hover {
background: #444; } } }
.account-box.hover .arrow-up {
top: 41px;
right: 6px;
position: absolute; }
.account-links a {
&:first-child {
-webkit-border-top-left-radius: 5px;
-webkit-border-top-right-radius: 5px;
-moz-border-radius-topleft: 5px;
-moz-border-radius-topright: 5px;
border-top-left-radius: 5px;
border-top-right-radius: 5px; }
&:last-child {
-webkit-border-bottom-right-radius: 5px;
-webkit-border-bottom-left-radius: 5px;
-moz-border-radius-bottomright: 5px;
-moz-border-radius-bottomleft: 5px;
border-bottom-right-radius: 5px;
border-bottom-left-radius: 5px;
border-bottom: 0; } }
}
/*
* End of Application Header
*
*/
/*
* Main Menu of Application
*
*/
nav.main_menu {
overflow:hidden;
border-radius: 4px;
margin: auto;
margin:30px $app_padding;
background:#eee;
border:1px solid #ccc;
height:38px;
background-image: -webkit-gradient(linear, 0 0, 0 30, color-stop(0.066, #eee), to(#dfdfdf));
background-image: -webkit-linear-gradient(#eee 6.6%, #dfdfdf);
background-image: -moz-linear-gradient(#eee 6.6%, #dfdfdf);
background-image: -o-linear-gradient(#eee 6.6%, #dfdfdf);
@include shade;
.count {
color:#aaa;
margin-left:3px;
}
.label {
background:$hover;
text-shadow:none;
color:$style_color;
}
a {
font-weight:bold;
&:first-child{
-webkit-border-top-left-radius: 4px;
-webkit-border-bottom-left-radius: 4px;
-moz-border-radius-topleft: 4px;
-moz-border-radius-bottomleft: 4px;
border-top-left-radius: 4px;
border-bottom-left-radius: 4px;
}
padding: 10px 25px;
display: inline-block;
color: $style_color;
border-right: 1px solid #d5d5d5;
position: relative;
box-shadow: 1px 0 0 rgba(255, 255, 255, 0.1);
margin: 0;
float:left;
text-shadow:0 1px 1px white;
&.home {
background: url(home_icon.PNG) no-repeat center center;
text-indent:-9999px;
min-width:40px;
img {
position:relative;
top:4px;
}
}
&.current {
background-color:#DDD;
}
}
}
/*
* End of Main Menu
*
*/
}
......@@ -3,7 +3,14 @@ class DashboardController < ApplicationController
def index
@projects = current_user.projects.all
@active_projects = @projects.select(&:repo_exists?).select(&:last_activity_date_cached).sort_by(&:last_activity_date_cached).reverse
@merge_requests = MergeRequest.where("author_id = :id or assignee_id = :id", :id => current_user.id).opened.order("created_at DESC").limit(10)
@user = current_user
@issues = current_user.assigned_issues.opened.order("created_at DESC").limit(10)
@issues = @issues.includes(:author, :project)
end
# Get authored or assigned open merge requests
......
- @active_projects.first(3).each do |project|
- @active_projects.first(5).each do |project|
.wll
= link_to project do
%h4= project.name
- project.updates(3).each do |update|
%a.project-update{:href => dashboard_feed_path(project, update)}
= image_tag gravatar_icon(update.author_email), :class => "avatar", :width => 32
%div
= dashboard_feed_title(update)
%span.update-author
%strong= update.author_name
authored
= time_ago_in_words(update.created_at)
ago
.right
- klass = update.class.to_s.split("::").last.downcase
%span.tag{ :class => klass }= klass
%h4
= project.name
%small
last activity at
= project.last_activity_date_cached.stamp("Aug 25, 2011")
%h3 Activities
%hr
.news-feed= render "dashboard/projects_feed"
- if current_user.require_ssh_key?
.alert-message.warning
%p
You wont be able to pull/push project code unless you
= link_to new_key_path, :class => "vlink" do
add new key
to your profile
%div.dashboard_category
%h3
Projects
%small
( most recent )
%strong.right
= link_to projects_path do
Projects list &rarr;
%hr
.row
.dashboard_block
.row
.span9= render "dashboard/projects_feed"
.span3.right
- if current_user.can_create_project?
.alert-message.block-message.warning
You can create up to
= current_user.projects_limit
projects. Click on link below to add a new one
.link_holder
= link_to new_project_path, :class => "" do
New Project »
- unless @merge_requests.blank?
%div.dashboard_category
%h3
Merge Requests
%small ( authored or assigned to you )
%strong.right
= link_to dashboard_merge_requests_path do
Vist merge requests page &rarr;
%hr
.row
.dashboard_block= render "dashboard/merge_requests_feed"
- unless @issues.blank?
%div.dashboard_category
%h3
Issues
%small ( assigned to you )
%strong.right
= link_to dashboard_merge_requests_path do
Vist issues page &rarr;
%hr
.row
.dashboard_block= render "dashboard/issues_feed"
......@@ -2,5 +2,5 @@
Issues
%small ( assigned to you )
%hr
= render "dashboard/issues_feed"
%br
.ui-box= render "dashboard/issues_feed"
......@@ -2,5 +2,5 @@
Merge Requests
%small ( authored or assigned to you )
%hr
= render "dashboard/merge_requests_feed"
%br
.ui-box= render "dashboard/merge_requests_feed"
......@@ -2,4 +2,4 @@
%h3 Access Denied
%hr
%p Youre not allowed to access this page
%p Ream more about project permissions #{link_to "here", help_permissions_path, :class => "vlink"}
%p Read more about project permissions #{link_to "here", help_permissions_path, :class => "vlink"}
%nav.main_menu
= render "layouts/const_menu_links"
-#= link_to "Projects", projects_path, :class => "#{"current" if current_page?(projects_path) || current_page?(root_path)}"
= link_to "Projects", projects_path, :class => "#{"current" if current_page?(projects_path)}"
= link_to "Issues", dashboard_issues_path, :class => "#{"current" if current_page?(dashboard_issues_path)}", :id => "issues_slide"
= link_to "Requests", dashboard_merge_requests_path, :class => "#{"current" if current_page?(dashboard_merge_requests_path)}", :id => "merge_requests_slide"
= link_to "Help", help_path, :class => "#{"current" if controller.controller_name == "help"}"
= link_to "Home", root_path, :class => "home #{"current" if current_page?(projects_path) || current_page?(root_path)}", :title => "Home"
= link_to "Home", root_path, :class => "home #{"current" if current_page?(dashboard_path) || current_page?(root_path)}", :title => "Home"
......@@ -5,7 +5,12 @@
%div.app_logo
= link_to root_path, :class => "home", :title => "Home" do
= image_tag "logo_tr.png", :width => 50
%h1 GITLAB
%h1
GITLAB
- if current_user.is_admin?
= link_to admin_projects_path, :class => "admin_link", :title => "Admin area" do
= image_tag "admin.PNG", :width => 16
%h1.project_name= title
.search= text_field_tag "search", nil, :placeholder => "Search", :class => "search-input"
......
......@@ -7,6 +7,4 @@
.container
= render :partial => "layouts/app_menu"
.content
.row
.span12= yield
.sidebar= render "layouts/projects_side"
= yield
- @projects.in_groups_of(2, false) do |projects|
- @projects.in_groups_of(3, false) do |projects|
.row
- projects.each_with_index do |project, i|
%div.project_tile
......
- if current_user.require_ssh_key?
.alert-message.block-message.error
%ul
%li You have no ssh keys added yo tour profile.
%li You have no ssh keys added to your profile.
%li You wont be able to pull/push repository.
%li Visit profile &rarr; keys and add public key of every machine you want to use for work with gitlabhq.
......
%h3
Projects
%small= "( #{current_user.projects.count} )"
- if current_user.can_create_project?
%span.right
= link_to new_project_path, :class => "btn small" do
New Project
%hr
- unless @projects.empty?
%div.content_list= render "tile"
......
......@@ -6,7 +6,7 @@
%ul
%li keep stable branches secured
%li forced code review before merge to protected branches
%p Ream more about project permissions #{link_to "here", help_permissions_path, :class => "vlink"}
%p Read more about project permissions #{link_to "here", help_permissions_path, :class => "vlink"}
......
......@@ -123,5 +123,5 @@ Gitlab::Application.routes.draw do
end
resources :notes, :only => [:index, :create, :destroy]
end
root :to => "projects#index"
root :to => "dashboard#index"
end
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