From 0e1b3e579bb23b893480ae29470721df879de225 Mon Sep 17 00:00:00 2001 From: unknown Date: Wed, 29 Aug 2012 21:55:25 +0200 Subject: [PATCH 1/2] Fixed some hardcoded path/git_user --- lib/tasks/bulk_import.rake | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/lib/tasks/bulk_import.rake b/lib/tasks/bulk_import.rake index 607250f1770..edb4a599eb0 100644 --- a/lib/tasks/bulk_import.rake +++ b/lib/tasks/bulk_import.rake @@ -1,11 +1,10 @@ -IMPORT_DIRECTORY = 'import_projects' -REPOSITORY_DIRECTORY = '/home/git/repositories' -desc "Imports existing Git repos into new projects from the import_projects folder" -task :import_projects, [:email] => :environment do |t, args| +desc "Imports existing Git repos from a directory into new projects in git_base_path" +task :import_projects, [:directory,:email] => :environment do |t, args| user_email = args.email - repos_to_import = Dir.glob("#{IMPORT_DIRECTORY}/*") - + import_directory = args.directory + repos_to_import = Dir.glob("#{import_directory}/*") + git_base_path = Gitlab.config.git_base_path puts "Found #{repos_to_import.length} repos to import" imported_count = 0 @@ -13,11 +12,9 @@ task :import_projects, [:email] => :environment do |t, args| failed_count = 0 repos_to_import.each do |repo_path| repo_name = File.basename repo_path - repo_full_path = File.join(Rails.root, repo_path) puts " Processing #{repo_name}" - - clone_path = "#{REPOSITORY_DIRECTORY}/#{repo_name}.git" + clone_path = "#{git_base_path}#{repo_name}.git" if Dir.exists? clone_path if Project.find_by_code(repo_name) @@ -29,7 +26,7 @@ task :import_projects, [:email] => :environment do |t, args| end else # Clone the repo - unless clone_bare_repo_as_git(repo_full_path, clone_path) + unless clone_bare_repo_as_git(repo_path, clone_path) failed_count += 1 next end @@ -47,14 +44,17 @@ task :import_projects, [:email] => :environment do |t, args| puts "Finished importing #{imported_count} projects (skipped #{skipped_count}, failed #{failed_count})." end -# Clones a repo as bare git repo using the git user +# Clones a repo as bare git repo using the git_user def clone_bare_repo_as_git(existing_path, new_path) + git_user = Gitlab.config.ssh_user begin - sh "sudo -u git -i git clone --bare '#{existing_path}' #{new_path}" + sh "sudo -u #{git_user} -i git clone --bare '#{existing_path}' #{new_path}" true - rescue + rescue Exception=> msg puts " ERROR: Faild to clone #{existing_path} to #{new_path}" - false + puts " Make sure #{git_user} can reach #{existing_path}" + puts " Exception-MSG: #{msg}" + false end end -- GitLab From 5ba4cecb2870d4e3fc75b1d70a7214ad3c799956 Mon Sep 17 00:00:00 2001 From: Cornelio Date: Thu, 30 Aug 2012 16:07:39 +0200 Subject: [PATCH 2/2] Revert "Merge remote-tracking branch 'origin/master' into bulk_import" This reverts commit b982c371f2716ff72becd7b1d894d516a91bd765, reversing changes made to 0e1b3e579bb23b893480ae29470721df879de225. --- app/assets/images/merge.png | Bin 593 -> 0 bytes app/assets/stylesheets/common.scss | 320 ++++--- app/assets/stylesheets/gitlab_bootstrap.scss | 817 ++++++++++++++++++ .../stylesheets/gitlab_bootstrap/blocks.scss | 145 ---- .../stylesheets/gitlab_bootstrap/buttons.scss | 88 -- .../stylesheets/gitlab_bootstrap/common.scss | 52 -- .../stylesheets/gitlab_bootstrap/files.scss | 156 ---- .../stylesheets/gitlab_bootstrap/lists.scss | 30 - .../stylesheets/gitlab_bootstrap/tables.scss | 41 - .../gitlab_bootstrap/typography.scss | 71 -- app/assets/stylesheets/main.scss | 41 +- app/assets/stylesheets/projects.css.scss | 385 +++++++++ app/assets/stylesheets/sections/commits.scss | 20 - app/assets/stylesheets/sections/issues.scss | 8 - .../stylesheets/sections/merge_requests.scss | 56 +- app/assets/stylesheets/sections/projects.scss | 31 +- app/helpers/application_helper.rb | 15 +- app/models/project.rb | 8 +- app/views/commits/_commit.html.haml | 4 +- app/views/dashboard/index.html.haml | 17 +- app/views/events/_event_last_push.html.haml | 2 +- app/views/issues/_form.html.haml | 11 +- app/views/keys/_form.html.haml | 4 +- app/views/merge_requests/_form.html.haml | 18 +- .../merge_requests/show/_mr_title.html.haml | 4 +- app/views/profile/password.html.haml | 2 +- app/views/profile/show.html.haml | 2 +- app/views/projects/_form.html.haml | 13 +- app/views/projects/_new_form.html.haml | 4 +- 29 files changed, 1497 insertions(+), 868 deletions(-) delete mode 100644 app/assets/images/merge.png create mode 100644 app/assets/stylesheets/gitlab_bootstrap.scss delete mode 100644 app/assets/stylesheets/gitlab_bootstrap/blocks.scss delete mode 100644 app/assets/stylesheets/gitlab_bootstrap/buttons.scss delete mode 100644 app/assets/stylesheets/gitlab_bootstrap/common.scss delete mode 100644 app/assets/stylesheets/gitlab_bootstrap/files.scss delete mode 100644 app/assets/stylesheets/gitlab_bootstrap/lists.scss delete mode 100644 app/assets/stylesheets/gitlab_bootstrap/tables.scss delete mode 100644 app/assets/stylesheets/gitlab_bootstrap/typography.scss create mode 100644 app/assets/stylesheets/projects.css.scss diff --git a/app/assets/images/merge.png b/app/assets/images/merge.png deleted file mode 100644 index 4a6bb2e154d6f724080f232e5bbb9dc21f99f7fc..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 593 zcmeAS@N?(olHy`uVBq!ia0y~yV2}V|4mJh`h6m-gKNuJo7>k44ofy`glX=O&z`&N| z?e41LH+c z7sn8f<7cOC?7A8t(6-+`j%Bv)7QqzhgYF-eh_OmLda`gwO6P77;MVSLVbS@*xJ^)A zkJzE_>(%I>tx0Q@^4ABdx`rT~jAqWH|XwyE3Cfa#hVWm7^^} zlD8F3PSW$P6TJS@vmqdrUAXJ@ABzpFIZSb~cXm643qEgeQ%I@kuU+kX+P`q>#U)Se z4zPW=Wx=sF+n{KCy{{(+%zlfSFBJVWy;b&;5HQBFlFCfM)0R!nyg3TRczZY~q}9WpxG9N1c$HlAX&he%Y*N5X3%bLzACU zWJB$G-&4;gGv#<+;(w!^8+ERIX9vU0YZDHwVz0KmUAu3I>|<$==+%qMRE~_;_=1Xae`>rf|`aIw{ zJ5$D*YYR_pQ@#7P^?y^zM$fLJCAYt9|IJpi(6j64{AqV4xh!UXC1Jq6&OCFY@T(p( sP4&Ig-yaFxSGZ*Qzr@}D=ikt`$UamPaiF-9fq{X+)78&qol`;+0GkQ|YXATM diff --git a/app/assets/stylesheets/common.scss b/app/assets/stylesheets/common.scss index d07912f4520..68f862b8d2a 100644 --- a/app/assets/stylesheets/common.scss +++ b/app/assets/stylesheets/common.scss @@ -1,9 +1,11 @@ -/** LAYOUT **/ - -body { - margin-bottom:20px; +.diff_file_header a, +.file_stats a { + color:$style_color; } + +/** LAYOUT **/ + .container { padding-top:0; z-index:5; @@ -38,6 +40,30 @@ body { color: $link_color; } +.widget { + @include shade; + padding:20px; + margin-bottom:20px; + border: 1px solid #DDD; + border-radius: 5px; + background:#fafafa; + + .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; + } + } +} + .help li { color:#111 } .back_link { @@ -62,6 +88,16 @@ body { padding-left:20px; } +.number { + border-radius: 4px; + text-shadow: none; + background: rgba(0,0,0,.12); + text-align: center; + padding: 2px 4px; + line-height:18px; + margin-left:2px; +} + table a code { position: relative; top: -2px; @@ -105,6 +141,16 @@ table a code { .git_url_wrapper { margin-right:50px } +.file_stats { + span { + img { + width:14px; + float:left; + margin-right:6px; + padding:2px 0; + } + } +} .handle:hover { cursor:move; @@ -128,6 +174,10 @@ span.update-author { display:block; } /** END UPDATE ITEM **/ +.ajax-tab-loading { + padding:40px; + display:none; +} .dashboard-loader { float:left; margin:10px; @@ -138,110 +188,15 @@ span.update-author { font-weight:bold; } -.neib { - margin-right:10px; -} - -.label { - background-color: #474D57; - - &.label-issue { - background-color: #eee; - border: 1px solid #ccc; - padding:4px 6px; - color:#444; - text-shadow:0 0 1px #fff; - - &.grouped { - float: left; - margin-right: 6px; - padding: 6px; - } - } -} - -.event_label { - @extend .label; - background-color: #999; - - &.pushed { - background-color: #3A87AD; - } - - &.opened { - background-color: #468847; - } - - &.closed { - background-color: #B94A48; - } - - &.merged { - background-color: #2A2; - } -} - -form { - @extend .form-horizontal; - - .actions { - @extend .form-actions; - } - - .clearfix { - @extend .control-group; - } - - .input { - @extend .controls; - } - - label { - @extend .control-label; - } - .xlarge { - @extend .input-xlarge; - } - .xxlarge { - @extend .input-xxlarge; - } -} - - -.field_with_errors { - display:inline; -} - -ul.breadcrumb { - background:white; - border:none; - li { - display: inline; - text-shadow: 0 1px 0 white - } - - a { - color:#474D57; - font-weight:bold; - font-size:14px; - } - - .arrow { - background: url("images.png") no-repeat -85px -77px; - width: 19px; - height: 16px; - float: left; - position: relative; - left: -10px; - padding:0; - margin:0; - } -} - -input[type=text] { - &.large_text { - padding:6px; - font-size:16px; +a.project-update.titled { + position:relative; + padding-left:35% !important; + .title-block { + padding:10px; + width:35%; + position:absolute; + left:0; + top:0; } } @@ -317,6 +272,40 @@ p.time { } +/** + * Dashboard page + * + */ +.dashboard_category { + margin-bottom:30px; + h3 a { + color:#474D57; + &:hover { + text-decoration:underline; + } + } + + .dashboard_block { + .dash_project_item { + margin-bottom:10px; + border:none; + padding:0px 5px; + .project_link { + color:#888; + &:hover { + color:#111; + .ico.project { + background-position:-209px -21px; + } + } + } + h4 { + color:#666; + } + } + } +} + .styled_image { border:2px solid #ddd; } @@ -406,6 +395,39 @@ p.time { } } +.btn { + &.very_small { + font-size:11px; + padding:2px 6px; + margin:2px; + } + + &.grouped { + margin-right:7px; + float:left; + } + + &.padded { + margin-right:3px; + padding:4px 10px 4px; + } +} + + +.prettyprint { + background-color: #fefbf3; + padding: 9px; + border: 1px solid rgba(0,0,0,.2); + -webkit-box-shadow: 0 1px 2px rgba(0,0,0,.1); + -moz-box-shadow: 0 1px 2px rgba(0,0,0,.1); + box-shadow: 0 1px 2px rgba(0,0,0,.1); +} + +.hint { + font-style: italic; + color: #999; +} + .upvotes { font-size: 14px; font-weight: bold; @@ -529,6 +551,14 @@ li.note { } +/** + * Milestones list + * + */ + +.milestone { + @extend .wll; +} /** * Admin area @@ -575,10 +605,11 @@ li.note { * */ .event_lp { - @extend .ui-box; - color:#777; + @extend .alert-info; margin-bottom:20px; padding:8px; + border-style: solid; + border-width: 1px; @include border-radius(4px); min-height:22px; @@ -592,19 +623,88 @@ li.note { cursor:pointer; } +/** + * Issues, MRs legend + * + */ + +.list_legend { + float:left; + margin-right:20px; + .icon { + width:12px; + height:12px; + float:left; + margin-right:5px; + margin-top: 2px; + @include border-radius(4px); + &.today{ + background: #ADA; + border:1px solid #8B8; + } + &.closed { + background: #DDD; + border:1px solid #BBB; + } + &.yours { + background: #AAD; + border:1px solid #88B; + } + &.merged { + background: #DAD; + border:1px solid #B8B; + } + } + .text { + padding-bottom: 10px; + float:left; + } +} + .merge_request, .issue { + .list_legend { + margin-right: 5px; + margin-top: 14px; + .icon { + width:8px; + height:8px; + float:left; + margin-right:5px; + @include border-radius(4px); + border:1px solid #ddd; + } + } + &.today{ background: #EFE; border-color:#CEC; + .icon { + background: #ADA; + border:1px solid #8B8; + } } &.closed { background: #F5f5f5; border-color:#E5E5E5; + .icon { + background: #DDD; + border:1px solid #BBB; + } + } + &.yours { + .icon { + background: #AAD; + border:1px solid #88B; + } } &.merged { background: #F5f5f5; border-color:#E5E5E5; + .icon { + background: #DAD; + border:1px solid #B8B; + } } } diff --git a/app/assets/stylesheets/gitlab_bootstrap.scss b/app/assets/stylesheets/gitlab_bootstrap.scss new file mode 100644 index 00000000000..a1faf0601cb --- /dev/null +++ b/app/assets/stylesheets/gitlab_bootstrap.scss @@ -0,0 +1,817 @@ +body { + margin-bottom:20px; +} + +pre { + font-family:'Menlo', 'Liberation Mono', 'Consolas', 'Courier New', 'andale mono','lucida console',monospace; + + &.dark { + background: #333; + color:#f5f5f5; + } +} + +a { + outline: none; + color: $link_color; + &:hover { + text-decoration:none; + color: $blue_link; + } + + &.btn { + color: $style_color; + } + + &.dark { + color: $style_color; + } + + &.lined { + text-decoration:underline; + &:hover { text-decoration:underline; } + } + + &.gray { + color:gray; + } + + &.supp_diff_link { + text-align:center; + padding:20px 0; + background:#f1f1f1; + width:100%; + float:left; + } + + &.neib { + margin-right:15px; + } +} + +.neib { + margin-right:10px; +} + +.alert-message { + @extend .alert; + + &.success { + @extend .alert-success; + } + + &.error { + @extend .alert-error; + } +} + +.alert { + &.alert-well { + background:#ddd; + border:1px solid #ccc; + background-image: -webkit-gradient(linear, 0 0, 0 30, color-stop(0.066, #ddd), to(#dfdfdf)); + background-image: -webkit-linear-gradient(#ddd 6.6%, #dfdfdf); + background-image: -moz-linear-gradient(#ddd 6.6%, #dfdfdf); + background-image: -o-linear-gradient(#ddd 6.6%, #dfdfdf); + color:#111; + } +} + +h3, h4, h5, h6 { + line-height: 36px; +} + +h5 { + font-size:14px; +} + + +table { + width:100%; + th { + padding-top: 9px; + font-weight: bold; + vertical-align: middle; + } + th, td { + padding: 10px 10px 9px; + line-height: 18px; + text-align: left; + } + + &.bordered-table { + border: 1px solid #DDD; + border-collapse: separate; + -webkit-border-radius: 4px; + -moz-border-radius: 4px; + border-radius: 4px; + } + + &.zebra-striped { + @extend .table-striped; + } +} + +.btn { + background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#f1f1f1), color-stop(25%, #f1f1f1), to(#e6e6e6)); + background-image: -webkit-linear-gradient(#f1f1f1, #f1f1f1 25%, #e6e6e6); + background-image: -moz-linear-gradient(top, #f1f1f1, #f1f1f1 25%, #e6e6e6); + background-image: -ms-linear-gradient(#f1f1f1, #f1f1f1 25%, #e6e6e6); + background-image: -o-linear-gradient(#f1f1f1, #f1f1f1 25%, #e6e6e6); + background-image: linear-gradient(#f1f1f1, #f1f1f1 25%, #e6e6e6); + + &:hover { + } + + &.btn-primary { + background:$link_color; + border-color: #2A79A3; + &:hover { + background:$blue_link; + } + } + &.primary { + @extend .btn-primary; + } + + &.success { + color: #fff; + text-shadow: 0 0 1px #111; + background: #5bb75b;; + font-weight: bold; + + &:hover { + background-color: #51a351; + color: #fff; + } + } + + &.danger, + &.btn-danger { + color:#fff; + background: #DA4E49; + border-color: #BD362F; + + &:hover { + color:#fff; + background: #EE4E49; + } + } + + &.danger { + @extend .btn-danger; + } + + &.small { + @extend .btn-small; + } + + &.active { + border-color:#aaa; + background-color:#ccc; + } +} + +a:focus { + outline: none; +} + +.nav-pills a:hover { + background-color:#888; +} + +.nav-pills .active a { + background-color: $style_color; +} + +.label { + background-color: #474D57; + &.label-important { + background-color: #B94A48; + } + + &.label-issue { + background-color: #eee; + border: 1px solid #ccc; + padding:4px 6px; + color:#444; + text-shadow:0 0 1px #fff; + + &.grouped { + float: left; + margin-right: 6px; + padding: 6px; + } + } +} + +.nav-tabs > li > a, .nav-pills > li > a { + color:$style_color; +} + +.nav-tabs > .active > a { + font-weight:bold; +} + +/** COLORS **/ +.cgray { color:gray; } +.cred { color:#D12F19; } +.cgreen { color:#44aa22; } +.cblack { color:#111; } +.cdark { color:#444 } +.cwhite { color:#fff !important } +.bgred { background: #F2DEDE !important} + +/** COMMON STYLES **/ +.left { + float:left; +} +.right { + float:right !important; +} +.width-50p{ + width:50%; +} +.width-49p{ + width:49%; +} +.width-30p{ + width:30%; +} +.width-65p{ + width:65%; +} +.width-100p{ + width:100%; +} +.append-bottom-10 { + margin-bottom:10px; +} +.append-bottom-20 { + margin-bottom:20px; +} +.prepend-top-10 { + margin-top:10px; +} + +.prepend-top-20 { + margin-top:20px; +} + +.padded { + padding:20px; +} + +.ipadded { + padding:20px !important; +} +.lborder { + border-left:1px solid #eee; +} + +.borders { + border: 1px solid #ccc; + @include shade; +} +.no-borders { + border:none; +} +table.no-borders { + border:none; + tr, td { border:none } +} +.no-padding { + padding:0 !important; +} +.underlined { + border-bottom: 1px solid $border_color; +} +.vlink { + color: $link_color !important; +} + +.pretty_label { + @include round-borders-all(4px); + padding:2px 4px; + background-image: -webkit-gradient(linear, 0 0, 0 26, color-stop(0.076, #fefefe), to(#F6F7F8)); + background-image: -webkit-linear-gradient(#fefefe 7.6%, #F6F7F8); + background-image: -moz-linear-gradient(#fefefe 7.6%, #F6F7F8); + background-image: -o-linear-gradient(#fefefe 7.6%, #F6F7F8); + color: #777; + border: 1px solid #DEDFE1; + + &.branch { + border:none; + font-size:13px; + background: #474D57; + color:#fff; + font-weight:bold; + font-family: monospace; + } +} + +.event_label { + @extend .label; + background-color: #999; + + &.pushed { + background-color: #3A87AD; + } + + &.opened { + background-color: #468847; + } + + &.closed { + background-color: #B94A48; + } + + &.merged { + background-color: #2A2; + } +} + +img.avatar { + float:left; + margin-right:15px; + width:40px; + border:1px solid #ddd; + padding:1px; + + &.s16 { + width:16px; + height:16px; + } + &.s24 { + width:24px; + height:24px; + } + &.s32 { + width:32px; + height:32px; + } +} + +img.lil_av { + padding-left: 4px; + padding-right:3px; +} + +form { + @extend .form-horizontal; + + .actions { + @extend .form-actions; + } + + .clearfix { + @extend .control-group; + } + + .input { + @extend .controls; + } + + label { + @extend .control-label; + } + .xlarge { + @extend .input-xlarge; + } + .xxlarge { + @extend .input-xxlarge; + } +} + +/** + * List li block element #1 + * + */ +.wll { + background-color: #FFF; + padding: 10px 5px; + min-height: 20px; + border-bottom: 1px solid #eee; + border-bottom: 1px solid rgba(0, 0, 0, 0.05); + &.smoke { + background-color:#f5f5f5; + } + &:hover { + background:$hover; + } + &:last-child { border:none } + p { padding-top:5px; margin:0; color:$style_color;} + .author { color: #999; } + p { + color:#222; + margin-bottom: 0; + img { + position:relative; + top:3px; + } + } +} + + +/** + * Block element #2 + * + */ +.entry { + position: relative; + padding: 7px 15px; + margin-bottom: 18px; + color: #404040; + filter:none; + + text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25); + text-shadow: 0 1px 0 rgba(255, 255, 255, 0.5); + + -webkit-border-radius: 4px; + -moz-border-radius: 4px; + border-radius: 4px; + + -webkit-box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.25); + -moz-box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.25); + box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.25); + + background:#F1F1F1; + border: 1px solid #ccc; + + + p { + color:$style_color; + margin-bottom: 0; + img { + position:relative; + top:3px; + } + } +} + + +/** + * Big UI Block for show page content + * + */ +.ui-box { + background:#F9F9F9; + margin-bottom: 25px; + @include round-borders-all(4px); + border-color: #CCC; + @include solid_shade; + + ul { + margin:0; + } + + h5, .title { + padding: 0 10px; + @include round-borders-top(4px); + @include bg-gray-gradient; + border-bottom: 1px solid #bbb; + + &.small { + line-height: 28px; + font-size: 14px; + line-height:28px; + text-shadow: 0 1px 1px white; + } + + form { + padding:9px 0; + margin:0px; + } + + .nav-pills { + li { + padding:3px 0; + &.active a { background-color:$style_color; } + a { + border-radius:7px; + } + } + } + } + + .bottom { + @include bg-gray-gradient; + @include round-borders-bottom(4px); + border-bottom:none; + border-top: 1px solid #bbb; + } + + &.padded { + h5, .title { + margin: -20px; + margin-bottom: 0; + padding: 5px 20px; + } + .middle_title { + background:#f5f5f5; + margin:20px -20px; + padding: 0 20px; + border-top:1px solid #eee; + border-bottom:1px solid #eee; + font-size:14px; + color:#777; + } + } + .row_title { + font-weight:bold; + color:#444; + &:hover { + color:#444; + text-decoration:underline; + } + } + + li, .wll { + padding:10px; + &:first-child { + @include round-borders-top(4px); + border-top:none; + } + + &:last-child { + @include round-borders-bottom(4px); + border:none; + } + } + +} + +table.admin-table { + @extend .table-bordered; + @extend .zebra-striped; + @include solid_shade; + th { + border-color: #CCC; + border-bottom: 1px solid #bbb; + @include bg-gray-gradient; + } +} + +.field_with_errors { + display:inline; +} + +ul.breadcrumb { + background:white; + border:none; + li { + display: inline; + text-shadow: 0 1px 0 white + } + + a { + color:#474D57; + font-weight:bold; + font-size:14px; + } + + .arrow { + background: url("images.png") no-repeat -85px -77px; + width: 19px; + height: 16px; + float: left; + position: relative; + left: -10px; + padding:0; + margin:0; + } +} + +.nothing_here_message { + text-align:center; + padding:20px; + color:#777; +} + +/** + * UI box element + * contains top, middle, bottom blocks + * + */ +.main_box { + @extend .borders; + @extend .prepend-top-20; + @extend .append-bottom-20; + border-width:1px; + @include solid_shade; + + + img { max-width: 100%; } + + pre { + code { + background: none !important; + } + } + + .top_box_content, + .middle_box_content, + .bottom_box_content { + padding:15px; + + pre { + background: none !important; + margin:0; + border:none; + padding:0; + } + } + + .middle_box_content { + border-radius:0; + border:none; + font-size:12px; + background-color:#f5f5f5; + border:none; + border-top:1px solid #eee; + } + + .bottom_box_content { + border-top:1px solid #eee; + } +} + +input[type=text] { + &.large_text { + padding:6px; + font-size:16px; + } +} + +p { + &.slead { + color:#456; + font-size:16px; + margin-bottom: 12px; + font-weight: 200; + line-height: 24px; + } +} + +h3.page_title { + color:#456; + font-size:20px; + font-weight: normal; + line-height: 28px; +} + +/** + * File content holder + * + */ +.file_holder { + border:1px solid #CCC; + margin-bottom:1em; + @include solid_shade; + + .file_title { + border-bottom: 1px solid #bbb; + @include bg-gray-gradient; + margin: 0; + font-weight: normal; + font-weight: bold; + text-align: left; + color: #666; + padding: 9px 10px; + height:18px; + + .options { + float:right; + margin-top: -5px; + } + + .file_name { + color:$style_color; + font-size:14px; + text-shadow: 0 1px 1px #fff; + small { + color:#999; + font-size:13px; + } + } + } + .file_content { + background:#fff; + font-size: 11px; + + &.wiki { + font-size: 13px; + code { + padding:0 4px; + } + padding:20px; + h1, h2 { + line-height: 46px; + } + h3, h4 { + line-height: 40px; + } + } + + &.image_file { + background:#eee; + text-align:center; + img { + padding:100px; + max-width:300px; + } + } + + &.blob_file { + + } + + /** + * Blame file + */ + &.blame { + tr { + border-bottom: 1px solid #eee; + } + td { + padding:5px; + } + .author, + .blame_commit { + background:#f5f5f5; + vertical-align:top; + } + .lines { + pre { + padding:0; + margin:0; + background:none; + border:none; + } + } + } + + &.logs { + background:#eee; + max-height: 700px; + overflow-y: auto; + + ol { + margin-left:40px; + padding: 10px 0; + border-left: 1px solid #CCC; + margin-bottom:0; + background: white; + li { + color:#888; + p { + margin:0; + color:#333; + line-height:24px; + padding-left: 10px; + } + + &:hover { + background:$hover; + } + } + } + } + + /** + * Code file + */ + &.code { + padding:0; + td.code { + width: 100%; + .highlight { + margin-left: 55px; + overflow:auto; + overflow-y:hidden; + } + } + .highlight pre { + white-space: pre; + word-wrap:normal; + } + + table.highlighttable { + border: none; + } + body.project-page table.highlighttable td { border: none } + table.highlighttable tr:hover { background:none;} + + table.highlighttable pre{ + line-height:16px !important; + font-size:12px !important; + } + + table.highlighttable .linenodiv pre { + text-align: right; + padding-right: 4px; + color:#666; + } + } + } +} diff --git a/app/assets/stylesheets/gitlab_bootstrap/blocks.scss b/app/assets/stylesheets/gitlab_bootstrap/blocks.scss deleted file mode 100644 index 894cb3044fa..00000000000 --- a/app/assets/stylesheets/gitlab_bootstrap/blocks.scss +++ /dev/null @@ -1,145 +0,0 @@ -/** - * =================================== - * Contain 3 main UI block elements: - * .main_box - for show pages - * .ui-box - for simple block & widgets - * =================================== - */ - -/** - * UI box element - * contains top, middle, bottom blocks - * - */ -.main_box { - @extend .borders; - @extend .prepend-top-20; - @extend .append-bottom-20; - border-width:1px; - @include solid_shade; - - - img { max-width: 100%; } - - pre { - code { - background: none !important; - } - } - - .top_box_content, - .middle_box_content, - .bottom_box_content { - padding:15px; - - pre { - background: none !important; - margin:0; - border:none; - padding:0; - } - } - - .middle_box_content { - border-radius:0; - border:none; - font-size:12px; - background-color:#f5f5f5; - border:none; - border-top:1px solid #eee; - } - - .bottom_box_content { - border-top:1px solid #eee; - } -} - -/** - * Big UI Block for show page content - * - */ -.ui-box { - background:#F9F9F9; - margin-bottom: 25px; - @include round-borders-all(4px); - border-color: #CCC; - @include solid_shade; - - ul { - margin:0; - } - - h5, .title { - padding: 0 10px; - @include round-borders-top(4px); - @include bg-gray-gradient; - border-bottom: 1px solid #bbb; - - &.small { - line-height: 28px; - font-size: 14px; - line-height:28px; - text-shadow: 0 1px 1px white; - } - - form { - padding:9px 0; - margin:0px; - } - - .nav-pills { - li { - padding:3px 0; - &.active a { background-color:$style_color; } - a { - border-radius:7px; - } - } - } - } - - .bottom { - @include bg-gray-gradient; - @include round-borders-bottom(4px); - border-bottom:none; - border-top: 1px solid #bbb; - } - - &.padded { - h5, .title { - margin: -20px; - margin-bottom: 0; - padding: 5px 20px; - } - .middle_title { - background:#f5f5f5; - margin:20px -20px; - padding: 0 20px; - border-top:1px solid #eee; - border-bottom:1px solid #eee; - font-size:14px; - color:#777; - } - } - .row_title { - font-weight:bold; - color:#444; - &:hover { - color:#444; - text-decoration:underline; - } - } - - li, .wll { - padding:10px; - &:first-child { - @include round-borders-top(4px); - border-top:none; - } - - &:last-child { - @include round-borders-bottom(4px); - border:none; - } - } -} diff --git a/app/assets/stylesheets/gitlab_bootstrap/buttons.scss b/app/assets/stylesheets/gitlab_bootstrap/buttons.scss deleted file mode 100644 index 9966e81b54c..00000000000 --- a/app/assets/stylesheets/gitlab_bootstrap/buttons.scss +++ /dev/null @@ -1,88 +0,0 @@ -.btn { - @include bg-dark-gray-gradient; - border-color:#aaa; - &:hover { - @include bg-gray-gradient; - border-color:#bbb; - color:#333; - } - - &.btn-primary { - background:#2a79A3; - border-color: #2A79A3; - &:hover { - background:$blue_link; - color:#fff; - } - } - &.primary { - @extend .btn-primary; - } - - &.success { - color: #fff; - text-shadow: 0 0 1px #111; - background: #5bb75b;; - font-weight: bold; - - &:hover { - background-color: #51a351; - color: #fff; - } - } - - &.save-btn { - @extend .wide; - @extend .primary; - } - - &.cancel-btn { - float:right; - } - - &.wide { - padding-left:30px; - padding-right:30px; - } - - &.danger, - &.btn-danger { - color:#fff; - background: #DA4E49; - border-color: #BD362F; - - &:hover { - color:#fff; - background: #EE4E49; - } - } - - &.danger { - @extend .btn-danger; - } - - &.small { - @extend .btn-small; - } - - &.active { - border-color:#aaa; - background-color:#ccc; - } - - &.very_small { - font-size:11px; - padding:2px 6px; - margin:2px; - } - - &.grouped { - margin-right:7px; - float:left; - } - - &.padded { - margin-right:3px; - padding:4px 10px 4px; - } -} diff --git a/app/assets/stylesheets/gitlab_bootstrap/common.scss b/app/assets/stylesheets/gitlab_bootstrap/common.scss deleted file mode 100644 index cd7145c99c3..00000000000 --- a/app/assets/stylesheets/gitlab_bootstrap/common.scss +++ /dev/null @@ -1,52 +0,0 @@ -/** COLORS **/ -.cgray { color:gray } -.cred { color:#D12F19 } -.cgreen { color:#4a2 } -.cblack { color:#111 } -.cdark { color:#444 } -.cwhite { color:#fff!important } -.bgred { background:#F2DEDE!important } - -/** COMMON CLASSES **/ -.left { float:left } -.right { float:right!important } -.width-50p { width:50% } -.width-49p { width:49% } -.width-30p { width:30% } -.width-65p { width:65% } -.width-100p { width:100% } -.append-bottom-10 { margin-bottom:10px } -.append-bottom-20 { margin-bottom:20px } -.prepend-top-10 { margin-top:10px } -.prepend-top-20 { margin-top:20px } -.padded { padding:20px } -.ipadded { padding:20px!important } -.lborder { border-left:1px solid #eee } -.no-padding { padding:0 !important; } -.underlined { border-bottom: 1px solid #CCC; } -.no-borders { border:none; } -.vlink { color: $link_color !important; } -.borders { border: 1px solid #ccc; @include shade; } -.hint { font-style: italic; color: #999; } - -/** PILLS & TABS**/ -.nav-pills a:hover { background-color:#888; } -.nav-pills .active a { background-color: $style_color; } -.nav-tabs > li > a, .nav-pills > li > a { color:$style_color; } -.nav-tabs > .active > a { font-weight:bold; } - -/** ALERT MESSAGES **/ -.alert-message { @extend .alert; } -.alert-messag.success { @extend .alert-success; } -.alert-message.error { @extend .alert-error; } - -/** AVATARS **/ -img.avatar { float:left; margin-right:15px; width:40px; border:1px solid #ddd; padding:1px; } -img.avatar.s16 { width:16px; height:16px; } -img.avatar.s24 { width:24px; height:24px; } -img.avatar.s32 { width:32px; height:32px; } -img.lil_av { padding-left: 4px; padding-right:3px; } - -/** HELPERS **/ -.nothing_here_message { text-align:center; padding:20px; color:#777; } -p.slead { color:#456; font-size:16px; margin-bottom: 12px; font-weight: 200; line-height: 24px; } diff --git a/app/assets/stylesheets/gitlab_bootstrap/files.scss b/app/assets/stylesheets/gitlab_bootstrap/files.scss deleted file mode 100644 index 4ea5ed02ada..00000000000 --- a/app/assets/stylesheets/gitlab_bootstrap/files.scss +++ /dev/null @@ -1,156 +0,0 @@ -/** - * File content holder - * - */ -.file_holder { - border:1px solid #CCC; - margin-bottom:1em; - @include solid_shade; - - .file_title { - border-bottom: 1px solid #bbb; - @include bg-gray-gradient; - margin: 0; - font-weight: normal; - font-weight: bold; - text-align: left; - color: #666; - padding: 9px 10px; - height:18px; - - .options { - float:right; - margin-top: -5px; - } - - .file_name { - color:$style_color; - font-size:14px; - text-shadow: 0 1px 1px #fff; - small { - color:#999; - font-size:13px; - } - } - } - .file_content { - background:#fff; - font-size: 11px; - - &.wiki { - font-size: 13px; - code { - padding:0 4px; - } - padding:20px; - h1, h2 { - line-height: 46px; - } - h3, h4 { - line-height: 40px; - } - } - - &.image_file { - background:#eee; - text-align:center; - img { - padding:100px; - max-width:300px; - } - } - - &.blob_file { - - } - - /** - * Blame file - */ - &.blame { - tr { - border-bottom: 1px solid #eee; - } - td { - padding:5px; - } - .author, - .blame_commit { - background:#f5f5f5; - vertical-align:top; - } - .lines { - pre { - padding:0; - margin:0; - background:none; - border:none; - } - } - } - - &.logs { - background:#eee; - max-height: 700px; - overflow-y: auto; - - ol { - margin-left:40px; - padding: 10px 0; - border-left: 1px solid #CCC; - margin-bottom:0; - background: white; - li { - color:#888; - p { - margin:0; - color:#333; - line-height:24px; - padding-left: 10px; - } - - &:hover { - background:$hover; - } - } - } - } - - /** - * Code file - */ - &.code { - padding:0; - td.code { - width: 100%; - .highlight { - margin-left: 55px; - overflow:auto; - overflow-y:hidden; - } - } - .highlight pre { - white-space: pre; - word-wrap:normal; - } - - table.highlighttable { - border: none; - } - body.project-page table.highlighttable td { border: none } - table.highlighttable tr:hover { background:none;} - - table.highlighttable pre{ - line-height:16px !important; - font-size:12px !important; - } - - table.highlighttable .linenodiv pre { - text-align: right; - padding-right: 4px; - color:#666; - } - } - } -} - diff --git a/app/assets/stylesheets/gitlab_bootstrap/lists.scss b/app/assets/stylesheets/gitlab_bootstrap/lists.scss deleted file mode 100644 index 402ba04bd00..00000000000 --- a/app/assets/stylesheets/gitlab_bootstrap/lists.scss +++ /dev/null @@ -1,30 +0,0 @@ -/** LISTS **/ - -ul { - /** - * List li block element #1 - * - */ - .wll { - background-color: #FFF; - padding: 10px 5px; - min-height: 20px; - border-bottom: 1px solid #eee; - border-bottom: 1px solid rgba(0, 0, 0, 0.05); - - &.smoke { background-color:#f5f5f5; } - &:hover { background:$hover; } - &:last-child { border:none } - .author { color: #999; } - - p { - padding-top:5px; - margin:0; - color:#222; - img { - position:relative; - top:3px; - } - } - } -} diff --git a/app/assets/stylesheets/gitlab_bootstrap/tables.scss b/app/assets/stylesheets/gitlab_bootstrap/tables.scss deleted file mode 100644 index f78b1dee4fa..00000000000 --- a/app/assets/stylesheets/gitlab_bootstrap/tables.scss +++ /dev/null @@ -1,41 +0,0 @@ -table { - width:100%; - th { - padding-top: 9px; - font-weight: bold; - vertical-align: middle; - } - th, td { - padding: 10px 10px 9px; - line-height: 18px; - text-align: left; - } - - &.bordered-table { - border: 1px solid #DDD; - border-collapse: separate; - -webkit-border-radius: 4px; - -moz-border-radius: 4px; - border-radius: 4px; - } - - &.zebra-striped { - @extend .table-striped; - } -} - -table.admin-table { - @extend .table-bordered; - @extend .zebra-striped; - @include solid_shade; - th { - border-color: #CCC; - border-bottom: 1px solid #bbb; - @include bg-gray-gradient; - } -} - -table.no-borders { - border:none; - tr, td { border:none } -} diff --git a/app/assets/stylesheets/gitlab_bootstrap/typography.scss b/app/assets/stylesheets/gitlab_bootstrap/typography.scss deleted file mode 100644 index 97e85492875..00000000000 --- a/app/assets/stylesheets/gitlab_bootstrap/typography.scss +++ /dev/null @@ -1,71 +0,0 @@ -/** - * Headers - * - */ -h3, h4, h5, h6 { line-height: 36px; } -h5 { font-size:14px; } -h3.page_title { - color:#456; - font-size:20px; - font-weight: normal; - line-height: 28px; -} - -/** CODE **/ -pre { - font-family:'Menlo', 'Liberation Mono', 'Consolas', 'Courier New', 'andale mono','lucida console',monospace; - - &.dark { - background: #333; - color:#f5f5f5; - } -} - -/** - * Links - * - */ -a { - outline: none; - color: $link_color; - &:hover { - text-decoration:none; - color: $blue_link; - } - - &.btn { - color: $style_color; - &:hover { - color: $style_color; - } - } - - &.dark { - color: $style_color; - } - - &.lined { - text-decoration:underline; - &:hover { text-decoration:underline; } - } - - &.gray { - color:gray; - } - - &.supp_diff_link { - text-align:center; - padding:20px 0; - background:#f1f1f1; - width:100%; - float:left; - } - - &.neib { - margin-right:15px; - } -} - -a:focus { - outline: none; -} diff --git a/app/assets/stylesheets/main.scss b/app/assets/stylesheets/main.scss index be27d754dfa..b4f0ebf8ba0 100644 --- a/app/assets/stylesheets/main.scss +++ b/app/assets/stylesheets/main.scss @@ -2,13 +2,29 @@ @import "bootstrap-responsive"; /** GITLAB colors **/ -$link_color:#3A89A3; +$text_color:#222; +$lite_text_color: #666; +$link_color:#2A79A3; +$active_link_color:#2FA0BB; +$active_bg_color:#79C3E0; +$active_bd_color: #2FA0BB; +$border_color:#CCC; +$lite_border_color:#EEE; +$min_app_width:980px; +$max_app_width:980px; +$app_padding:20px; +$bg_color: #FFF; +$styled_border_color: #2FA0BB; +$color: "#4BB8D2"; $blue_link: #2fa0bb; -$style_color: #474d57; -$hover: #fdf5d9; + + +/** Style colors **/ +$style_color: #474D57; +$hover: #FDF5D9; /** GITLAB Fonts **/ -@font-face { font-family: Korolev; src: url('korolev-medium-compressed.otf'); } +@font-face { font-family: Korolev; src: url('korolev-medium-compressed.otf'); } /** MIXINS **/ @mixin shade { @@ -56,7 +72,7 @@ $hover: #fdf5d9; border-radius: $radius; } -@mixin bg-gray-gradient { +@mixin bg-gray-gradient { background:#eee; 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); @@ -64,13 +80,6 @@ $hover: #fdf5d9; background-image: -o-linear-gradient(#eee 6.6%, #dfdfdf); } -@mixin bg-dark-gray-gradient { - background:#eee; - background-image: -webkit-linear-gradient(#e9e9e9, #d7d7d7); - background-image: -moz-linear-gradient(#e9e9e9, #d7d7d7); - background-image: -o-linear-gradient(#e9e9e9, #d7d7d7); -} - /** * Header of application. * Contain application logo, search panel, profile icon @@ -110,13 +119,7 @@ $hover: #fdf5d9; * Overrides some styles of twitter bootstrap. * Also give some common classes for gitlab app */ -@import "gitlab_bootstrap/common.scss"; -@import "gitlab_bootstrap/typography.scss"; -@import "gitlab_bootstrap/buttons.scss"; -@import "gitlab_bootstrap/blocks.scss"; -@import "gitlab_bootstrap/files.scss"; -@import "gitlab_bootstrap/tables.scss"; -@import "gitlab_bootstrap/lists.scss"; +@import "gitlab_bootstrap.scss"; /** diff --git a/app/assets/stylesheets/projects.css.scss b/app/assets/stylesheets/projects.css.scss new file mode 100644 index 00000000000..4bdf5dee2f5 --- /dev/null +++ b/app/assets/stylesheets/projects.css.scss @@ -0,0 +1,385 @@ +.git_url_wrapper { margin-right:50px } + +.sidebar aside a{ + display: block; + position: relative; + padding: 15px 10px; + margin: 10px 0 0 0; + + font-size:13px; + font-weight:bold; + color:#333; + + &.current { + color: white; + background: $active_bg_color; + border: 1px solid $active_bd_color; + border-radius:5px; + + -webkit-border-top-right-radius: 0; + -webkit-border-bottom-right-radius: 0; + -moz-border-radius-topright: 0px; + -moz-border-radius-bottomright: 0px; + border-top-right-radius: 0; + border-bottom-right-radius: 0; + margin-right: -1px; + } +} + +body table .commit a{color: #{$blue_link}} +body table th, body table td{ border-bottom: 1px solid #DEE2E3;} +body .fixed{position: fixed; } + +/** File stat **/ +.file_stats { + span { + img { + width:14px; + float:left; + margin-right: 6px; + padding:2px 0; + } + } +} + +.round-borders { + @include round-borders-all(4px); + padding: 4px 0px; +} + +table.round-borders { + float:left; + text-align: left; +} + + + +/** PROJECTS **/ +input.ssh_project_url { + padding:5px; + margin:0px; + float:right; + width:400px; + text-align:center; +} + +#projects-list .project { + height:50px; +} + +#tree-slider .tree-item, +#projects-list .project, +#snippets-table .snippet, +#issues-table .issue{ + cursor:pointer; +} + +.clear { + clear: both; +} + + + +#user_projects_limit{ + width: 60px; +} + +.handle:hover{ + cursor: move; +} + +.project-refs-form { + span { + background: none !important; + position:static !important; + width:auto !important; + height: auto !important; + } +} + +.project-refs-select { + width:200px; +} + +.filter .left { margin-right:15px; } + +body table .commit { + a.tree-commit-link { + color:#444; + &:hover { + text-decoration:underline; + } + } +} + +/** NEW PROJECT **/ +.new-project-hodler { + .icon span { background-position: -31px -70px; } + td { border-bottom: 1px solid #DEE2E3; } +} + +/** Feed entry **/ +.commit, +.snippet, +.message { + .title { + color:#666; + a { color:#666 !important; } + p { margin-top:0px; } + } + .author { color: #999 } +} + +/** JQuery UI **/ +.ui-autocomplete { @include round-borders-all(5px); } +.ui-menu-item { cursor: pointer } +.ui-selectmenu{ + @include round-borders-all(4px); + margin-right:10px; + font-size:1.5em; + height:auto; + font-weight:bold; + .ui-selectmenu-status { + padding:3px 10px; + } +} + +#holder { + background:#FAFAFA; + border: 1px solid #EEE; + cursor: move; + height: 70%; + overflow: hidden; +} + +/* Project Dashboard Page */ +html, body { height: 100%; } + +.news-feed h2{float: left;} +.news-feed .project-updates {margin-bottom: 20px; display: block; width: 100%;} +.news-feed .project-updates .data{ padding: 0} +.news-feed .project-updates a.project-update {padding: 10px; border-bottom: 1px solid #eee; overflow: hidden; display: block;} +.news-feed .project-updates a.project-update:last-child{border-bottom: 0} +.news-feed .project-updates a.project-update img{float: left; margin-right: 10px;} +.news-feed .project-updates a.project-update span.update-title, .dashboard-page .news-feed .project-updates li a span.update-author{display: block;} +.news-feed .project-updates a.project-update span.update-title{margin-bottom: 10px} +.news-feed .project-updates a.project-update span.update-author{color: #999; font-weight: normal; font-style: italic;} +.news-feed .project-updates a.project-update span.update-author strong{font-weight: bold; font-style: normal;} +/* eo Dashboard Page */ + + +/** Update entry **/ +.update-data { padding: 0 } +.update-data { width:100%; } +.update-data.ui-box .data { padding:0; } +a.update-item {padding: 10px; border-bottom: 1px solid #eee; overflow: hidden; display: block;} +a.update-item:last-child{border-bottom: 0} +a.update-item img{float: left; margin-right: 10px;} +a.update-item span.update-title, .dashboard-page .news-feed .project-updates li a span.update-author{display: block;} +a.update-item span.update-title{margin-bottom: 10px} +a.update-item span.update-author{color: #999; font-weight: normal; font-style: italic;} +a.update-item span.update-author strong{font-weight: bold; font-style: normal;} + + +body .team_member_new .span-6, .team_member_edit .span-6{ padding:10px 0; } + +body.projects-page input.text.git-url.project_list_url { width:165px; } + + +body table.no-borders th { + background:none; + border-bottom:1px solid #CCC; + color:#333; +} + +body table.no-borders tr, +body table.no-borders td{ + border:none; +} + +.ajax-tab-loading { + padding:40px; + display:none; +} + +#tree-content-holder { float:left; width:100%; } + +#tree-readme-holder { + float:left; + width:100%; + + .readme { + @include round-borders-all(4px); + padding: 4px 15px; + background:#F7F7F7; + } +} + + + +/* Commit Page */ +.entity-info {float: right;} +.entity-button{ + background-image: -webkit-gradient(linear, 0 0, 0 26, color-stop(0.192, #fff), to(#f4f4f4)); + background-image: -webkit-linear-gradient(#fff 19.2%, #f4f4f4); + background-image: -moz-linear-gradient(#fff 19.2%, #f4f4f4); + background-image: -o-linear-gradient(#fff 19.2%, #f4f4f4); + box-shadow: 0 -1px 0 white inset; + display: block; + border: 1px solid #eee; + border-radius: 5px; + margin-bottom: 2px; + position: relative; + padding: 4px 10px; + font-size: 11px; + padding-right: 20px; +} + +.entity-button i{ + background: url('images.png') no-repeat -138px -27px; + width: 6px; + height: 9px; + float: right; + position: absolute; + top: 6px; + right: 5px; +} +.box-arrow{float: right; background: #E3E5EA; padding: 10px; border-radius: 5px; margin-top: 2px; text-shadow: none; color: #999; margin: 1.5em 0;} + +h4.dash-tabs { + margin: 0; + border-bottom: 1px solid #ccc; + padding: 10px 10px; + font-size: 11px; + padding-left:20px; + font-weight: bold; text-transform: uppercase; + background: #F7F7F7; + margin-bottom:20px; + height:13px; + +} + +.dash-button { + border-right: 1px solid #ddd; + background:none; + padding: 10px 15px; + float:left; + position:relative; + top:-10px; + left:0px; + height:13px; + + &:first-child { + border-left: 1px solid #ddd; + } + &.active { + background: #eaeaea; + } +} + + +.dashboard-loader { + float:right; + margin-right:30px; + display:none; +} + + +.merge-tabs { + margin: 0; + border: 1px solid #ccc; + padding: 5px; + font-size: 12px; + background: #F7F7F7; + margin-bottom:20px; + height:26px; + + -moz-border-radius: 4px; + -webkit-border-radius: 4px; + border-radius: 4px; + + .tab { + font-weight: bold; + border-right: 1px solid #ddd; + background:none; + padding: 10px; + min-width:60px; + float:left; + position:relative; + top:-5px; + left:-5px; + height:16px; + padding-left:34px; + + span { + width: 20px; + height: 20px; + display: inline-block; + position: absolute; + left: 8px; + top: 8px; + } + + &.active { + background: #eaeaea; + } + } +} +.merge-tabs.repository .tab span{ background: url("images.png") no-repeat -38px -77px; } +.activities-tab span { background: url("images.png") no-repeat -161px -1px; } +.stat-tab span, +.team-tab span, +.snippets-tab span { background: url("images.png") no-repeat -38px -77px; } +.files-tab span { background: url("images.png") no-repeat -112px -23px; } + +.merge-notes-tab span { background: url("images.png") no-repeat -161px -1px; } +.merge-commits-tab span { background: url("images.png") no-repeat -86px 1px; } +.merge-diffs-tab span { background: url("images.png") no-repeat -118px 1px; } +.merge-tabs .dashboard-loader { padding:8px; } + +.user-mention { + color: #2FA0BB; + font-weight: bold; +} + +.author { + color: #999; +} + + + + +.dark_scheme_box { + padding:20px 0; + + label { + float:left; + box-shadow: 0 0px 5px rgba(0,0,0,.3); + + img { + } + } +} + +a.project-update.titled { + position: relative; + padding-left: 235px !important; + + .title-block { + padding: 10px; + width: 205px; + position: absolute; + left: 0; + top: 0; + } +} + +.add_new { + float: right; + background: #A6B807; + color: white; + padding: 4px 10px; + @include round-borders-all(4px); + font-size:11px; + margin: 10px 0; +} diff --git a/app/assets/stylesheets/sections/commits.scss b/app/assets/stylesheets/sections/commits.scss index 75e38aeea93..e2db701db71 100644 --- a/app/assets/stylesheets/sections/commits.scss +++ b/app/assets/stylesheets/sections/commits.scss @@ -206,24 +206,4 @@ min-width:65px; font-family: 'Menlo', 'Liberation Mono', 'Consolas', 'Courier New', 'andale mono','lucida console',monospace; } - - .commit-author-name { - color: #777; - } -} - -.diff_file_header a, -.file_stats a { - color:$style_color; -} - -.file_stats { - span { - img { - width:14px; - float:left; - margin-right:6px; - padding:2px 0; - } - } } diff --git a/app/assets/stylesheets/sections/issues.scss b/app/assets/stylesheets/sections/issues.scss index 6db4b987d4d..1b61ec3fe85 100644 --- a/app/assets/stylesheets/sections/issues.scss +++ b/app/assets/stylesheets/sections/issues.scss @@ -99,11 +99,3 @@ input.check_all_issues { #update_status { width:100px; } - -/** - * Milestones list - * - */ -.milestone { - @extend .wll; -} diff --git a/app/assets/stylesheets/sections/merge_requests.scss b/app/assets/stylesheets/sections/merge_requests.scss index 3a134531b48..ec84a64e23a 100644 --- a/app/assets/stylesheets/sections/merge_requests.scss +++ b/app/assets/stylesheets/sections/merge_requests.scss @@ -11,6 +11,23 @@ background:#f1f1f1; } + .commit { + margin:0; + padding:0; + padding: 5px; + margin-bottom: 5px; + + .committed_ago { + display:none; + } + .browse_code_link_holder { + display:none; + } + list-style:none; + &:hover { + background:none; + } + } } /** @@ -82,42 +99,3 @@ li.merge_request { @extend .padded; @extend .append-bottom-10; } - -.label_branch { - @include round-borders-all(4px); - padding:2px 4px; - border:none; - font-size:13px; - background: #474D57; - color:#fff; - font-weight:bold; - font-family: monospace; -} - -.mr_source_commit, -.mr_target_commit { - .commit { - margin:0; - padding:0; - padding: 5px; - margin-bottom: 5px; - .avatar { position:relative } - .row_title { - color:#444; - } - .commit-author-name, - .dash, - .committed_ago, - .browse_code_link_holder { - display:none; - } - list-style:none; - &:hover { - background:none; - } - } -} - -.mr_direction_tip { - margin-top:40px -} diff --git a/app/assets/stylesheets/sections/projects.scss b/app/assets/stylesheets/sections/projects.scss index 3d5aa80b34e..20fd2cbfe42 100644 --- a/app/assets/stylesheets/sections/projects.scss +++ b/app/assets/stylesheets/sections/projects.scss @@ -14,32 +14,6 @@ text-shadow: 0 1px 1px #fff; padding: 2px 10px; } - ul { - li { - padding:0; - a { - display:block; - .project_name { - color:#4fa2bd; - font-size:14px; - line-height:18px; - } - .arrow { - float:right; - padding:10px; - margin:0; - } - .last_activity { - padding-top:5px; - display:block; - span, strong { - font-size:12px; - color:#666; - } - } - } - } - } @extend .leftbar; @extend .ui-box; } @@ -59,14 +33,11 @@ color:#888; } .btn { - padding:6px 10px; + padding:6px; margin-left:10px; margin-bottom:8px; } } - .adv_settings { - h6 { margin-left:40px; } - } } .project_clone_panel { diff --git a/app/helpers/application_helper.rb b/app/helpers/application_helper.rb index 3dafb7534c3..38191f55571 100644 --- a/app/helpers/application_helper.rb +++ b/app/helpers/application_helper.rb @@ -78,16 +78,16 @@ module ApplicationHelper end def show_last_push_widget?(event) - event && + event && event.last_push_to_non_root? && !event.rm_ref? && - event.project && + event.project && event.project.merge_requests_enabled end def tab_class(tab_key) active = case tab_key - + # Project Area when :wall; wall_tab? when :wiki; controller.controller_name == "wikis" @@ -126,13 +126,4 @@ module ApplicationHelper def hexdigest(string) Digest::SHA1.hexdigest string end - - def project_last_activity project - activity = project.last_activity - if activity && activity.created_at - time_ago_in_words(activity.created_at) + " ago" - else - "Never" - end - end end diff --git a/app/models/project.rb b/app/models/project.rb index 3c7287f8d3d..3fe11916504 100644 --- a/app/models/project.rb +++ b/app/models/project.rb @@ -8,7 +8,7 @@ class Project < ActiveRecord::Base # # Relations - # + # belongs_to :owner, class_name: "User" has_many :users, through: :users_projects has_many :events, dependent: :destroy @@ -25,12 +25,12 @@ class Project < ActiveRecord::Base attr_accessor :error_code - # + # # Protected attributes # attr_protected :private_flag, :owner_id - # + # # Scopes # scope :public_only, where(private_flag: false) @@ -158,7 +158,7 @@ class Project < ActiveRecord::Base end def last_activity - events.order("created_at DESC").first || nil + events.last || nil end def last_activity_date diff --git a/app/views/commits/_commit.html.haml b/app/views/commits/_commit.html.haml index 61371d14c5f..686a4337b3a 100644 --- a/app/views/commits/_commit.html.haml +++ b/app/views/commits/_commit.html.haml @@ -4,8 +4,8 @@ %strong= link_to "Browse Code ยป", tree_project_ref_path(@project, commit.id), class: "right" %p = link_to commit.short_id(8), project_commit_path(@project, id: commit.id), class: "commit_short_id" - %strong.commit-author-name= commit.author_name - %span.dash – + %strong.cgray= commit.author_name + – = image_tag gravatar_icon(commit.author_email), class: "avatar", width: 16 = link_to_gfm truncate(commit.title, length: 50), project_commit_path(@project, id: commit.id), class: "row_title" diff --git a/app/views/dashboard/index.html.haml b/app/views/dashboard/index.html.haml index e13640fb835..ba7d019cb63 100644 --- a/app/views/dashboard/index.html.haml +++ b/app/views/dashboard/index.html.haml @@ -19,16 +19,13 @@ = link_to new_project_path, class: "btn very_small info" do %i.icon-plus New Project - %ul.unstyled - - @projects.each do |project| - %li.wll - = link_to project_path(project), class: dom_class(project) do - %strong.project_name= truncate(project.name, length: 25) - %span.arrow - → - %span.last_activity - %strong Last activity: - %span= project_last_activity(project) + - @projects.each do |project| + = link_to project_path(project), class: dom_class(project) do + %h4 + %span.ico.project + = truncate(project.name, length: 25) + %span.right + → .bottom= paginate @projects, theme: "gitlab" %hr diff --git a/app/views/events/_event_last_push.html.haml b/app/views/events/_event_last_push.html.haml index 66e149365f7..4ef927495ae 100644 --- a/app/views/events/_event_last_push.html.haml +++ b/app/views/events/_event_last_push.html.haml @@ -9,5 +9,5 @@ at %strong= link_to event.project.name, event.project - = link_to new_mr_path_from_push_event(event), title: "New Merge Request", class: "btn very_small" do + = link_to new_mr_path_from_push_event(event), title: "New Merge Request", class: "btn very_small primary" do Create Merge Request diff --git a/app/views/issues/_form.html.haml b/app/views/issues/_form.html.haml index db7920b993d..65bf605a038 100644 --- a/app/views/issues/_form.html.haml +++ b/app/views/issues/_form.html.haml @@ -43,15 +43,14 @@ .actions - if @issue.new_record? - = f.submit 'Submit new issue', class: "btn save-btn" + = f.submit 'Submit new issue', class: "primary btn" -else - = f.submit 'Save changes', class: "save-btn btn" + = f.submit 'Save changes', class: "primary btn" - - cancel_class = 'btn cancel-btn' - if request.xhr? - = link_to "Cancel", "#back", onclick: "backToIssues();", class: cancel_class + = link_to "Cancel", "#back", onclick: "backToIssues();", class: "btn" - else - if @issue.new_record? - = link_to "Cancel", project_issues_path(@project), class: cancel_class + = link_to "Cancel", project_issues_path(@project), class: "btn" - else - = link_to "Cancel", project_issue_path(@project, @issue), class: cancel_class + = link_to "Cancel", project_issue_path(@project, @issue), class: "btn" diff --git a/app/views/keys/_form.html.haml b/app/views/keys/_form.html.haml index 26700803e61..9c6e229bf49 100644 --- a/app/views/keys/_form.html.haml +++ b/app/views/keys/_form.html.haml @@ -19,6 +19,6 @@ .actions - = f.submit 'Save', class: "btn save-btn" - = link_to "Cancel", keys_path, class: "btn cancel-btn" + = f.submit 'Save', class: "primary btn" + = link_to "Cancel", keys_path, class: "btn" diff --git a/app/views/merge_requests/_form.html.haml b/app/views/merge_requests/_form.html.haml index 7e5c851bba3..b6c12397d6c 100644 --- a/app/views/merge_requests/_form.html.haml +++ b/app/views/merge_requests/_form.html.haml @@ -9,7 +9,7 @@ %br .row - .span5 + .span6 .mr_branch_box %h5 From (Head Branch) .body @@ -17,11 +17,10 @@ = f.label :source_branch, "From", class: "control-label" .controls = f.select(:source_branch, @project.heads.map(&:name), { include_blank: "Select branch" }, style: "width:250px") - .mr_source_commit + .bottom_commit + .mr_source_commit - .span2 - %center= image_tag "merge.png", class: 'mr_direction_tip' - .span5 + .span6 .mr_branch_box %h5 To (Base Branch) .body @@ -29,7 +28,8 @@ = f.label :target_branch, "To", class: "control-label" .controls = f.select(:target_branch, @project.heads.map(&:name), { include_blank: "Select branch" }, style: "width:250px") - .mr_target_commit + .bottom_commit + .mr_target_commit %h4.cdark 2. Fill info @@ -48,12 +48,12 @@ .control-group .form-actions - = f.submit 'Save', class: "btn save-btn" + = f.submit 'Save', class: "btn-primary btn" - if @merge_request.new_record? - = link_to project_merge_requests_path(@project), class: "btn cancel-btn" do + = link_to project_merge_requests_path(@project), class: "btn" do Cancel - else - = link_to project_merge_request_path(@project, @merge_request), class: "btn cancel-btn" do + = link_to project_merge_request_path(@project, @merge_request), class: "btn" do Cancel diff --git a/app/views/merge_requests/show/_mr_title.html.haml b/app/views/merge_requests/show/_mr_title.html.haml index 3ae1050d169..31fa0779fd2 100644 --- a/app/views/merge_requests/show/_mr_title.html.haml +++ b/app/views/merge_requests/show/_mr_title.html.haml @@ -1,9 +1,9 @@ %h3.page_title = "Merge Request ##{@merge_request.id}:"   - %span.label_branch= @merge_request.source_branch + %span.pretty_label.branch= @merge_request.source_branch → - %span.label_branch= @merge_request.target_branch + %span.pretty_label.branch= @merge_request.target_branch %span.right - if @merge_request.merged? diff --git a/app/views/profile/password.html.haml b/app/views/profile/password.html.haml index d0aee7ac6b3..257dacb1ad3 100644 --- a/app/views/profile/password.html.haml +++ b/app/views/profile/password.html.haml @@ -16,4 +16,4 @@ = f.label :password_confirmation .input= f.password_field :password_confirmation .actions - = f.submit 'Save', class: "btn save-btn" + = f.submit 'Save', class: "btn primary" diff --git a/app/views/profile/show.html.haml b/app/views/profile/show.html.haml index 22e840a089f..a7b6a18ad2d 100644 --- a/app/views/profile/show.html.haml +++ b/app/views/profile/show.html.haml @@ -67,4 +67,4 @@ = link_to "Add Public Key", new_key_path, class: "btn small right" .form-actions - = f.submit 'Save', class: "btn save-btn" + = f.submit 'Save', class: "btn-primary btn" diff --git a/app/views/projects/_form.html.haml b/app/views/projects/_form.html.haml index 8bdeda1cafe..ce66b2cf930 100644 --- a/app/views/projects/_form.html.haml +++ b/app/views/projects/_form.html.haml @@ -10,9 +10,9 @@ .input = f.text_field :name, placeholder: "Example Project", class: "xxlarge" - %hr - .adv_settings - %h6 Advanced settings: + %h5.page_title + .alert.alert-info + %h5 Advanced settings: .clearfix = f.label :path do Path @@ -34,9 +34,8 @@ .input= f.select(:default_branch, @project.heads.map(&:name), {}, style: "width:210px;") - unless @project.new_record? - %hr - .adv_settings - %h6 Features: + .alert.alert-info + %h5 Features: .clearfix = f.label :issues_enabled, "Issues" @@ -57,7 +56,7 @@ %br .actions - = f.submit 'Save', class: "btn save-btn" + = f.submit 'Save', class: "btn primary" = link_to 'Cancel', @project, class: "btn" - unless @project.new_record? .right diff --git a/app/views/projects/_new_form.html.haml b/app/views/projects/_new_form.html.haml index b1aafc3798f..5104df83a2c 100644 --- a/app/views/projects/_new_form.html.haml +++ b/app/views/projects/_new_form.html.haml @@ -10,8 +10,8 @@ = f.submit 'Create project', class: "btn primary" %hr - %div.adv_settings - %h6 Advanced settings: + .alert.alert-info + %h5 Advanced settings: .clearfix = f.label :path do Git Clone -- GitLab