From fca1ffb888e506f7ab0551d01321e462c09d5112 Mon Sep 17 00:00:00 2001 From: Dmitriy Zaporozhets Date: Sun, 29 Jan 2012 23:59:12 +0200 Subject: [PATCH] Bootstrap: Issues, Merge Requests, SSH Key completed --- app/assets/stylesheets/buttons.scss | 118 ---- app/assets/stylesheets/common.scss | 15 +- app/assets/stylesheets/dashboard.scss | 27 - app/assets/stylesheets/style.scss | 570 ------------------ app/assets/stylesheets/tags.scss | 55 -- app/assets/stylesheets/top_panel.scss | 2 +- app/controllers/admin/projects_controller.rb | 6 + app/controllers/keys_controller.rb | 2 +- app/views/admin/projects/_form.html.haml | 29 +- app/views/admin/users/_form.html.haml | 45 +- app/views/admin/users/new.html.haml | 7 +- app/views/commits/index.html.haml | 6 +- .../dashboard/_merge_requests_feed.html.haml | 2 +- app/views/issues/_show.html.haml | 8 +- app/views/issues/index.html.haml | 11 +- app/views/issues/index.js.haml | 2 +- app/views/issues/show.html.haml | 28 +- app/views/keys/_form.html.haml | 22 +- app/views/keys/_show.html.haml | 14 +- app/views/keys/index.html.haml | 16 +- app/views/keys/new.html.haml | 6 +- app/views/keys/show.html.haml | 13 +- app/views/layouts/_head_panel.html.haml | 4 - app/views/layouts/_project_side.html.haml | 8 +- app/views/layouts/profile.html.haml | 22 +- app/views/merge_requests/show.html.haml | 30 +- app/views/profile/design.html.haml | 40 +- app/views/profile/password.html.haml | 77 ++- app/views/profile/show.html.haml | 7 +- .../requests/dashboard_merge_requests_spec.rb | 7 - spec/requests/issues_spec.rb | 14 +- spec/requests/projects_spec.rb | 10 +- 32 files changed, 213 insertions(+), 1010 deletions(-) delete mode 100644 app/assets/stylesheets/buttons.scss delete mode 100644 app/assets/stylesheets/dashboard.scss delete mode 100644 app/assets/stylesheets/style.scss delete mode 100644 app/assets/stylesheets/tags.scss diff --git a/app/assets/stylesheets/buttons.scss b/app/assets/stylesheets/buttons.scss deleted file mode 100644 index bd368b3d..00000000 --- a/app/assets/stylesheets/buttons.scss +++ /dev/null @@ -1,118 +0,0 @@ -/* Buttons */ -.grey-button{ - border-radius: 5px; - font-size: 12px; - font-weight: bold; - padding: 5px 17px; - border: 1px solid #999; - color: #666; - display: inline-block; - box-shadow: 0 1px 2px rgba(0,0,0,.3); - 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); -} - -.red-button{ - border-radius: 5px; - font-size: 12px; - font-weight: bold; - padding: 5px 17px; - border: 1px solid #999; - color: #666; - display: inline-block; - box-shadow: 0 1px 2px rgba(0,0,0,.3); - background: #D12F19; - color: white; -} - -.positive-button{ - border-radius: 5px; - font-size: 12px; - font-weight: bold; - padding: 5px 17px; - border: 1px solid #999; - color: #666; - display: inline-block; - box-shadow: 0 1px 2px rgba(0,0,0,.3); - background: #4A2; - color: white; -} - - -.lbutton, -.lite_button { - display:block; - float:left; - margin: 0px 5px 0px 0px; - padding:5px 10px; - - font-family:"Helvetica Neue", Arial, Helvetica, sans-serif; - border:1px solid #D3D3D3; - background:white; - font-size:12px !important; - line-height:130%; - text-decoration:none; - font-weight:bold; - color:#565656; - cursor:pointer; - - &:hover { - border:1px solid #C2E1EF; - color: #0099FF; - } - - &.hm { - margin: 0px 0px; - } - - &.vm { - margin: 5px 0px; - } -} - -a.button, input.button { - font-weight: bold; - padding: 10px 20px; - text-align: center; - display: inline-block; - border-radius: 5px; - color: #578E91; - font-size: 12px; - text-transform: uppercase; - border: 1px solid #8CE2E6; - background-image: -webkit-gradient(linear, 0 0, 0 34, color-stop(0.794, #dbf5f6), to(#c5eef0)); - background-image: -webkit-linear-gradient(#dbf5f6 79.4%, #c5eef0); - background-image: -moz-linear-gradient(#dbf5f6 79.4%, #c5eef0); - background-image: -o-linear-gradient(#dbf5f6 79.4%, #c5eef0); -} - -input.button{margin-bottom: 1.5em} - -.button:hover {color: rgba(0,0,0,.8)} - -.button.green {margin-right: 0; } - -.button.yellow{ - color: #908054; - border-color: #DDCDA1; - background-image: -webkit-gradient(linear, 0 0, 0 34, color-stop(0.794, #FFEFC3), to(#F3E3B7)); - background-image: -webkit-linear-gradient(#FFEFC3 79.4%, #F3E3B7); - background-image: -moz-linear-gradient(#FFEFC3 79.4%, #F3E3B7); - background-image: -o-linear-gradient(#FFEFC3 79.4%, #F3E3B7); -} - -.button.blue{ - color: #417E97; - border-color: #b2cdec; - background-image: -webkit-gradient(linear, 0 0, 0 34, color-stop(0.794, #dbe8f6), to(#c7daf1)); - background-image: -webkit-linear-gradient(#dbe8f6 79.4%, #c7daf1); - background-image: -moz-linear-gradient(#dbe8f6 79.4%, #c7daf1); - background-image: -o-linear-gradient(#dbe8f6 79.4%, #c7daf1); -} - -.button-small{ text-shadow: none; padding: 4px 10px; } -.button-green{background: #A6B807; color: white} - - diff --git a/app/assets/stylesheets/common.scss b/app/assets/stylesheets/common.scss index c834150b..61780e68 100644 --- a/app/assets/stylesheets/common.scss +++ b/app/assets/stylesheets/common.scss @@ -117,6 +117,7 @@ $blue_link: "#2fa0bb"; margin:10px 0 0 0; font-size:13px; font-weight:bold; + color:#444; } } @@ -141,6 +142,12 @@ img.avatar { border-radius: 4px; } +img.lil_av { + padding-left: 5px; + position: relative; + top: 3px; +} + .media-grid { h3, h2 , h4 { &.media_h { @@ -176,14 +183,6 @@ img.avatar { @import "notes.css.scss"; @import "login.scss"; -//@import "style.scss"; - -//@import "commits.css.scss"; - -//@import "dashboard.scss"; -//@import "tags.scss"; -//@import "buttons.scss"; - /** CODE HIGHTLIGHT **/ @import "highlight.css.scss"; @import "highlight.black.css.scss"; diff --git a/app/assets/stylesheets/dashboard.scss b/app/assets/stylesheets/dashboard.scss deleted file mode 100644 index 38eb2c08..00000000 --- a/app/assets/stylesheets/dashboard.scss +++ /dev/null @@ -1,27 +0,0 @@ -.application .news-feed{margin-left: 285px; min-height: 600px; margin-top: 20px; margin-right:2px; padding:20px;} -.application .application-content{ position: relative; float: left; width: 100%; height: 100%; } -.application .news-feed h2{float: left;} - -body.application aside{ - min-height: 820px; position: relative; top: 0; bottom: 0; right: 0; width: 260px; float: left; border-right: 1px solid $border_color; padding:20px; padding-right:0; - h4{margin: 0; border-bottom: 1px solid #ccc; padding: 20px 20px 20px 0px; font-size: 11px; font-weight: bold; text-transform: uppercase;} - .project-list {list-style: none; margin: 0; padding: 0;} - .project-list li a {background: white; color: #{$blue_link}; display: block; border-bottom: 1px solid $lite_border_color; padding: 14px 6% 14px 0px;} - .project-list li a span.project-name{font-size: 14px; display: block; margin-bottom: 8px} - .project-list li a span.time{color: #666; font-weight: normal; font-size: 11px} - .project-list li a span.arrow{float: right; background: #E3E5EA; padding: 10px; border-radius: 5px; margin-top: 2px; text-shadow: none; color: #999} -} - -body.application .news-feed .project-updates { - margin-bottom: 20px; display: block; width: 100%; - .data{ padding: 0} - a.project-update {padding: 10px; overflow: hidden; display: block;} - a.project-update:last-child{border-bottom: 0} - a.project-update img{float: left; margin-right: 10px;} - a.project-update span.update-title, .application .news-feed .project-updates li a span.update-author{display: block;} - a.project-update span.update-title{margin-bottom: 10px} - a.project-update span.update-author{color: #999; font-weight: normal; font-style: italic;} - a.project-update span.update-author strong{font-weight: bold; font-style: normal;} -} -/* eo Dashboard Page */ - diff --git a/app/assets/stylesheets/style.scss b/app/assets/stylesheets/style.scss deleted file mode 100644 index a090e322..00000000 --- a/app/assets/stylesheets/style.scss +++ /dev/null @@ -1,570 +0,0 @@ -/* HTML5 ✰ Boilerplate - * ==|== normalize ========================================================== - */ - -article, aside, details, figcaption, figure, footer, header, hgroup, nav, section { display: block; } -audio, canvas, video { display: inline-block; *display: inline; *zoom: 1; } -audio:not([controls]) { display: none; } -[hidden] { display: none; } - -html { font-size: 100%; overflow-y: scroll; -webkit-text-size-adjust: 100%; -ms-text-size-adjust: 100%; } -body { margin: 0; font-size: 13px; line-height: 1.231; } -body, button, input, select, textarea { - font-family: "helvetica", "arial", "freesans", "clean", sans-serif; -color: #222; } - -::-moz-selection { background: #79c3e0; color: #fff; text-shadow: none; } -::selection { background: #79c3e0; color: #fff; text-shadow: none; } - -a { color: #00e; } -a:hover { color: #06e; } -a:focus { outline: thin dotted; } -a:hover, a:active { outline: 0; } - -abbr[title] { border-bottom: 1px dotted; } -b, strong { font-weight: bold; } -blockquote { margin: 1em 40px; } -dfn { font-style: italic; } -hr { display: block; height: 1px; border: 0; border-top: 1px solid #ccc; margin: 1em 0; padding: 0; } -ins { background: #ff9; color: #000; text-decoration: none; } -mark { background: #ff0; color: #000; font-style: italic; font-weight: bold; } -pre, code, kbd, samp { font-family: monospace, monospace; _font-family: 'courier new', monospace; font-size: 1em; } -pre { white-space: pre; white-space: pre-wrap; word-wrap: break-word; } -q { quotes: none; } -q:before, q:after { content: ""; content: none; } -small { font-size: 85%; } -sub, sup { font-size: 75%; line-height: 0; position: relative; vertical-align: baseline; } -sup { top: -0.5em; } -sub { bottom: -0.25em; } -ul, ol { margin: 1em 0; padding: 0 0 0 40px; } -dd { margin: 0 0 0 40px; } -nav ul, nav ol { list-style: none; list-style-image: none; margin: 0; padding: 0; } -img { border: 0; -ms-interpolation-mode: bicubic; vertical-align: middle; } -svg:not(:root) { overflow: hidden; } -figure { margin: 0; } - -form { margin: 0; } -fieldset { border: 0; margin: 0; padding: 0; } -label { cursor: pointer; } -legend { border: 0; *margin-left: -7px; padding: 0; } -button, input, select, textarea { font-size: 100%; margin: 0; vertical-align: baseline; *vertical-align: middle; } -button, input { line-height: normal; *overflow: visible; } -table button, table input { *overflow: auto; } -button, input[type="button"], input[type="reset"], input[type="submit"] { cursor: pointer; -webkit-appearance: button; } -input[type="checkbox"], input[type="radio"] { box-sizing: border-box; } -input[type="search"] { -webkit-appearance: textfield; -moz-box-sizing: content-box; -webkit-box-sizing: content-box; box-sizing: content-box; } -input[type="search"]::-webkit-search-decoration { -webkit-appearance: none; } -button::-moz-focus-inner, input::-moz-focus-inner { border: 0; padding: 0; } -textarea { overflow: auto; vertical-align: top; resize: vertical; } -input:valid, textarea:valid { } -input:invalid, textarea:invalid { background-color: #f0dddd; } - -table { border-collapse: collapse; border-spacing: 0; } -td { vertical-align: top; } - -/* ==|== primary styles ===================================================== - Author: Ricardo Rauch - ========================================================================== */ - -/* 960gs */ -.container_4{width:98%;margin-left:1%;margin-right:1%}.grid_1,.grid_2,.grid_3,.grid_4{display:inline;float:left;position:relative;margin-left:1%;margin-right:1%}.alpha{margin-left:0}.omega{margin-right:0}.container_4 .grid_1{width:23.0%}.container_4 .grid_2{width:48.0%}.container_4 .grid_3{width:73.0%}.container_4 .grid_4{width:98.0%}.container_4 .prefix_1{padding-left:25.0%}.container_4 .prefix_2{padding-left:50.0%}.container_4 .prefix_3{padding-left:75.0%}.container_4 .suffix_1{padding-right:25.0%}.container_4 .suffix_2{padding-right:50.0%}.container_4 .suffix_3{padding-right:75.0%}.container_4 .push_1{left:25.0%}.container_4 .push_2{left:50.0%}.container_4 .push_3{left:75.0%}.container_4 .pull_1{left:-25.0%}.container_4 .pull_2{left:-50.0%}.container_4 .pull_3{left:-75.0%}.clear{clear:both;display:block;overflow:hidden;visibility:hidden;width:0;height:0}.clearfix:after{clear:both;content:' ';display:block;font-size:0;line-height:0;visibility:hidden;width:0;height:0}.clearfix{display:inline-block}* html .clearfix{height:1%}.clearfix{display:block} -/* eo 960gs*/ - - -html{ -webkit-font-smoothing:antialiased; } -body { - font-size: 12px; - background-color: #FFFFFF; -} -a{text-decoration: none; font-weight: bold; color: #444} -a:hover{color: #555} -/* Typography */ -h1,h2,h3,h4,h5{font-weight: normal; color: #666} -h2{margin: 1.5em 0} -/* eo Typography */ - -/* Forms */ -input[type="text"]:focus, input[type="password"]:focus { outline: none; } -input.text{border: 1px solid #ccc; border-radius: 4px; display: block; padding: 10px} - -.form-row{ - padding: 0px 0px 10px 0px; -} - -.form-row label{ - font-weight:bold; - display: inline-block; - padding: 0px 0px 5px 0px; -} - -/* eo Forms */ - -/* Tables */ -table {width:100%; border: 1px solid #DEE2E3; margin-bottom: 20px} -table thead{ - -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; -} -table thead th{ - 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); - margin: 0; - font-weight: normal; - font-weight: bold; - text-align: left; - color: #97A0A5; -} -td, th{ padding: .9em 1em; vertical-align: middle; } - -table thead .image{width:100px} -.listed_items tr.odd:hover{background-color:#FFFFCF} -/* eo Tables */ - - - -/* eo Buttons */ - -/* UI Box */ -//.ui-box{border: 1px solid #DEDFE1; float: left; border-radius: 5px} -.ui-box{float: left;} -.ui-box h3{ - 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); - background:none; - margin: 0; - padding: 1em; - font-size: 12px; - font-weight: normal; - font-weight: bold; - font-size: 16px; - border-bottom: 1px solid #DEDFE1; - -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; -} - -.ui-box.ui-box-small h3{ - padding: 8px 10px; - font-size: 12px; -} - -.ui-box .data{padding: .5em 1em} - -.ui-box .buttons{ - padding: 1em; - border-top:1px solid $lite_border_color; -} - -.ui-box .buttons .button{padding: 8px 9px; font-size: 11px} - -.ui-box.hover:hover{box-shadow: 0 0 10px rgba(0,0,0,.1); border: 1px solid #ccc; - - -webkit-transition: all 200ms cubic-bezier(0.470, 0.000, 0.745, 0.715); - -moz-transition: all 200ms cubic-bezier(0.470, 0.000, 0.745, 0.715); - -o-transition: all 200ms cubic-bezier(0.470, 0.000, 0.745, 0.715); - transition: all 200ms cubic-bezier(0.470, 0.000, 0.745, 0.715); -} - -/* eo UI Box */ - - -/* Icons */ -.directory, .file{ - display: inline-block; - margin-right: 10px; - width: 14px; -} - -.directory{ - background: url('images.png') no-repeat -73px -26px; - height: 11px; - margin-bottom: -1px; -} - -.file{ - background: url('images.png') no-repeat -114px -24px; - height: 16px; - margin-bottom: -3px; -} - -/* eo Icons*/ - -/* Errors */ -#error_explanation{background: #ffe5eb; padding: 20px; margin-bottom: 20px; border-radius: 5px} -#error_explanation h2{margin: 0; margin-bottom: 20px; color: red} -#error_explanation ul li{margin-bottom: 10px} -#error_explanation ul li:last-child{margin-bottom: 0} -.field_with_errors { - input[type="text"], - input[type="password"], - textarea - { - border: 1px solid #D30 !important; - } -} -/* eo Errors */ - -/* Notices */ -#notice{background: #dfffe1; padding: 20px; margin-bottom: 20px; border-radius: 5px; color: green; font-size: 1.3em;} -/* eo Notices */ - -/* InfoBlock */ -#infoblock{ - background: #eeeeee; - padding: 20px; - margin-bottom: 20px; - border-radius: 5px; -} -/* eo InfoBlock */ - -/* Header */ -header{ - background: #474D57 url('bg-header.png') repeat-x bottom; - z-index: 10000; - height: 44px; - padding: 10px 2% 6px 2%; -} -header a:hover{color: #f1f1f1} -header h1{ - width: 65px; -} -header h1.logo{margin: 0; padding: 0} -header h1.logo a{ - background: url('images.png') no-repeat -3px -7px; - width: 65px; - height: 26px; - margin: 5px 0; - padding: 0; - display: block; - float: left; - text-indent: -1000em; -} - -header nav{border-radius: 4px; box-shadow: 0 1px 2px black; width: 294px; margin: auto; - background-image: -webkit-gradient(linear, 0 0, 0 30, color-stop(0.066, #595d63), to(#31363e)); - background-image: -webkit-linear-gradient(#595d63 6.6%, #31363e); - background-image: -moz-linear-gradient(#595d63 6.6%, #31363e); - background-image: -o-linear-gradient(#595d63 6.6%, #31363e); - margin-top: 2px; - height:30px -} -header nav.shorter_nav{ - width: 207px; -} -header nav a{padding: 8px 12px 8px 34px; display: inline-block; color: #D6DADF; border-right: 1px solid #31363E; position: relative; box-shadow: 1px 0 0 rgba(255,255,255,.1); margin: 0} -header nav a span{width: 20px; height: 20px; display: inline-block; background: red; position: absolute; left: 8px; top: 6px;} -header nav a:last-child {border: 0; box-shadow: none} -header nav a:hover, header nav a.current{ - background-image: -webkit-gradient(linear, 0 0, 0 30, color-stop(0.066, #595d63), to(#2c2f35)); - background-image: -webkit-linear-gradient(#595d63 6.6%, #2c2f35); - background-image: -moz-linear-gradient(#595d63 6.6%, #202227); - background-image: -o-linear-gradient(#595d63 6.6%, #202227); -} - -header nav a:active{ - box-shadow: 0 1px 4px rgba(0,0,0,.8) inset; -} - -header nav a.dashboard { - -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; -} - -header nav a.last_elem{ - -webkit-border-top-right-radius: 4px; - -webkit-border-bottom-right-radius: 4px; - -moz-border-radius-topright: 4px; - -moz-border-radius-bottomright: 4px; - border-top-right-radius: 4px; - border-bottom-right-radius: 4px; -} - -header .search{ display: inline-block; float: right; margin-right: 90px} - -header nav a span{width: 20px; height: 20px; display: inline-block; background: red; position: absolute; left: 8px; top: 6px;} - -header nav a.dashboard span{background: url('images.png') no-repeat -161px 0;} -header nav a.admin span{background: url('images.png') no-repeat -184px 0;} -header nav a.project span{background: url('images.png') no-repeat -209px -1px; top: 7px} -header nav a.issues span{background: url('images.png') no-repeat -209px -1px; top: 7px} - -header .login-top{float: right; width: 180px; - background-image: -webkit-gradient(linear, 0 0, 0 62, color-stop(0.032, #464c56), to(#363c45)); - background-image: -webkit-linear-gradient(#464c56 3.2%, #363c45); - background-image: -moz-linear-gradient(#464c56 3.2%, #363c45); - background-image: -o-linear-gradient(#464c56 3.2%, #363c45); - padding: 0 10px; - height: 44px; -} -header .login-top a{display: block;} -header .login-top a.pic{float: left; margin-right: 10px; - img{ height: 36px; width: 36px; border: 1px solid black} -} -header .login-top a.username{margin-bottom: 5px} -header .login-top a.logout{color: #ccc} -header{margin-bottom: 0; clear: both; position:relative;} - -.page-title{background-color: #f1f1f1;display: block; float: left; clear: both; width: 98%; padding: 1% 1%; border-bottom: 1px solid #ccc; box-shadow: 0 -1px 0 white inset; margin-bottom: 1.5em} -.page-title h1{font-size: 20px; width: 400px; margin: 0; padding-top: 8px } -.page-title a.grey-button{float: right;} -.right{float: right;} - - -.big-message{ - background-image: -webkit-gradient(linear, 0 48, 0 0, color-stop(0.041, #eccb40), to(#ffee4d)); - background-image: -webkit-linear-gradient(90deg, #eccb40 4.1%, #ffee4d); - background-image: -moz-linear-gradient(90deg, #eccb40 4.1%, #ffee4d); - background-image: -o-linear-gradient(90deg, #eccb40 4.1%, #ffee4d); - text-align: center; - font-weight: bold; - padding: 10px 20px; - text-shadow: 0 1px 0 rgba(255,255,255,.3); - color: #333; - color: rgba(0,0,0,.7); - font-size: 14px; - box-shadow: 0 1px 2px rgba(0,0,0,.7); - z-index: 100000; - margin-bottom: 2px; -} - -.big-message a{color: #000; text-decoration: underline;} - -.big-message.error{ - background-color: #722523; - background-image: -webkit-gradient(linear, 0 49, 0 0, color-stop(0.04, #722523), to(#ad4846)); - background-image: -webkit-linear-gradient(90deg, #9b403f 4%, #c16765); - background-image: -moz-linear-gradient(90deg, #722523 4%, #ad4846); - background-image: -o-linear-gradient(90deg, #722523 4%, #ad4846); - color: #2E0D0C; -} - -.big-message.success{ - background-color: #7a9339; - background-image: -webkit-gradient(linear, 0 48, 0 0, color-stop(0.062, #7a9339), to(#93ae46)); - background-image: -webkit-linear-gradient(90deg, #7a9339 6.2%, #93ae46); - background-image: -moz-linear-gradient(90deg, #7a9339 6.2%, #93ae46); - background-image: -o-linear-gradient(90deg, #7a9339 6.2%, #93ae46) -} - -.big-message.success{ - background-color: #7a9339; - background-image: -webkit-gradient(linear, 0 48, 0 0, color-stop(0.062, #7a9339), to(#93ae46)); - background-image: -webkit-linear-gradient(90deg, #7a9339 6.2%, #93ae46); - background-image: -moz-linear-gradient(90deg, #7a9339 6.2%, #93ae46); - background-image: -o-linear-gradient(90deg, #7a9339 6.2%, #93ae46) -} - -.big-message.notice{ - background-image: -webkit-gradient(linear, 0 49, 0 0, color-stop(0.061, #447790), color-stop(0.897, #5da2bf)); - background-image: -webkit-linear-gradient(90deg, #447790 6.1%, #5da2bf 89.7%); - background-image: -moz-linear-gradient(90deg, #447790 6.1%, #5da2bf 89.7%); - background-image: -o-linear-gradient(90deg, #447790 6.1%, #5da2bf 89.7%) -} - -/* eo Account Box */ -input.search-input{ - float: left; - text-shadow: none; - width: 116px; - background-image: url('icon-search.png') ; - background-repeat: no-repeat; - background-position: 10px; - border-radius: 4px; - border: 1px solid #AAA; - background-color: #FFF; - padding: 5px; - padding-left: 26px; - margin-top: 2px; - margin-right: 10px; -} -/*input.search-input:focus{ background-color: white; width: 216px;}*/ -input.search-input::-webkit-input-placeholder {color: #666} -/* eo Header */ - -h2.icon{position: relative; padding-left: 40px; float: left; } -/*h2 a{font-weight: normal;}*/ -h2.icon span{background: #E3E5EA url('images.png'); height: 32px; width: 32px; left: 0; top: -5px; border-radius: 4px; display: inline-block; position: absolute} - -/* Dashboard Page */ -html, body { height: 100%; } - - - - -.grey-button.right{margin-top: 20px} - -/* Project Page */ -/* eo New Project Page */ - - -/* eo Project Page */ - -/* Projects Page */ -body.projects-page h2.icon span{background-position: -31px -70px;} -body.projects-page .project-box.ui-box .data .repository {margin-bottom: 20px} -body.projects-page .project-box.ui-box .data .title span{ font-weight: bold;} -body.projects-page .project-box{width: 100%; margin-bottom: 3em} -body.projects-page .browse-code{margin-right: 10px} -/* eo Projects Page */ - -/* ==|== non-semantic helper classes ======================================== */ -.ir { display: block; border: 0; text-indent: -999em; overflow: hidden; background-color: transparent; background-repeat: no-repeat; text-align: left; direction: ltr; } -.ir br { display: none; } -.hidden { display: none !important; visibility: hidden; } -.visuallyhidden { border: 0; clip: rect(0 0 0 0); height: 1px; margin: -1px; overflow: hidden; padding: 0; position: absolute; width: 1px; } -.visuallyhidden.focusable:active, .visuallyhidden.focusable:focus { clip: auto; height: auto; margin: 0; overflow: visible; position: static; width: auto; } -.invisible { visibility: hidden; } -.clearfix:before, .clearfix:after { content: ""; display: table; } -.clearfix:after { clear: both; } -.clearfix { zoom: 1; } - -/* ==|== media queries ====================================================== */ - -@media only screen and (min-width: 480px) { - -} - -@media only screen and (min-width: 768px) { - -} - -/* ==|== print styles ======================================================= */ - -@media print { - * { background: transparent !important; color: black !important; text-shadow: none !important; filter:none !important; -ms-filter: none !important; } - a, a:visited { text-decoration: underline; } - a[href]:after { content: " (" attr(href) ")"; } - abbr[title]:after { content: " (" attr(title) ")"; } - .ir a:after, a[href^="javascript:"]:after, a[href^="#"]:after { content: ""; } - pre, blockquote { border: 1px solid #999; page-break-inside: avoid; } - thead { display: table-header-group; } - tr, img { page-break-inside: avoid; } - img { max-width: 100% !important; } - @page { margin: 0.5cm; } - p, h2, h3 { orphans: 3; widows: 3; } - h2, h3 { page-break-after: avoid; } -} - -body, button, input, select, textarea { - font-family: "helvetica", "arial", "freesans", "clean", sans-serif; -} - - -.text_field { - width:400px; - padding:8px; - font-size:14px; - @include round-borders-all(4px); -} - -.input_button { - padding:8px; - font-size:14px; - cursor:pointer; - background-color: #F5F5F5; - border-color: #EEEEEE #DEDEDE #DEDEDE #EEEEEE; - border-right: 1px solid #DEDEDE; - border-style: solid; - border-width: 1px; -} - - - -.errors_holder { - background:#D30; - color:#fff; - @include round-borders-all(4px); - border:1px solid #a30; - padding:5px; - list-style:none; - font-weight: bold; - text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25); - - li { - padding:10px; - } -} - -.notice_holder { - background:#DDF4FB; - color:#444; - border:1px solid #C6EDF9; - @include round-borders-all(4px); - padding:5px; - list-style:none; - font-weight: bold; - text-shadow: 0 -1px 0 rgba(255, 255, 255, 0.25); - - li { - padding:10px; - } -} - -.alert_holder { - background:#FDF5D9; - color:#444; - border:1px solid #FCEEC1; - @include round-borders-all(4px); - padding:5px; - list-style:none; - font-weight: bold; - text-shadow: 0 -1px 0 rgba(255, 255, 255, 0.25); - - li { - padding:10px; - } -} - -.help_content { - margin:20px; - margin-top:71px; - - h2 { - margin:0; - padding:0; - } - - .menu { - float:left; - width:20%; - - .active { - color: $active_bd_color; - } - } - - .content { - float:right; - width:78%; - } - - .bash { - @include round-borders-all(4px); - background:#eee; - padding:5px; - //overflow-x:scroll; - pre{ - padding:0; - line-height:2.0; - margin:0; - font-family: 'Courier New', 'andale mono','lucida console',monospace; - color: #333; - text-align:left; - } - } -} diff --git a/app/assets/stylesheets/tags.scss b/app/assets/stylesheets/tags.scss deleted file mode 100644 index 7d40d396..00000000 --- a/app/assets/stylesheets/tags.scss +++ /dev/null @@ -1,55 +0,0 @@ -.tag { - @include round-borders-all(4px); - padding:2px 4px; - border:none; - text-shadow:none; - - &.inline { - display:inline; - } - - &.high, &.closed { - background: #D12F19; - color:white; - } - - &.today, &.open { - background: #44aa22; - color:white; - } - - &.yours { - background: #4466cc; - color:white; - } - &.normal { - background: #2c5ca6; - color:white; - } - &.notes { - background: #2c5c66; - color:white; - } - - &.note { - 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; - } - &.issue { - background: #D12F19; - color:white; - } - &.commit { - 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; - } -} - diff --git a/app/assets/stylesheets/top_panel.scss b/app/assets/stylesheets/top_panel.scss index b7493b07..61db2c31 100644 --- a/app/assets/stylesheets/top_panel.scss +++ b/app/assets/stylesheets/top_panel.scss @@ -50,7 +50,7 @@ body header { border: 1px solid #AAA; padding: 0 10px 0 30px; background: transparent url('images.png') no-repeat 8px -42px; - width: 160px; + width: 260px; height:26px; } } diff --git a/app/controllers/admin/projects_controller.rb b/app/controllers/admin/projects_controller.rb index 813e135b..2c6363c6 100644 --- a/app/controllers/admin/projects_controller.rb +++ b/app/controllers/admin/projects_controller.rb @@ -52,6 +52,12 @@ class Admin::ProjectsController < ApplicationController def update @admin_project = Project.find_by_code(params[:id]) + owner_id = params[:project][:owner_id] + + if owner_id + @admin_project.owner = User.find(owner_id) + end + if @admin_project.update_attributes(params[:project]) redirect_to [:admin, @admin_project], notice: 'Project was successfully updated.' else diff --git a/app/controllers/keys_controller.rb b/app/controllers/keys_controller.rb index 33c6958d..ce49e3e7 100644 --- a/app/controllers/keys_controller.rb +++ b/app/controllers/keys_controller.rb @@ -1,6 +1,6 @@ class KeysController < ApplicationController layout "profile" - respond_to :js + respond_to :js, :html def index @keys = current_user.keys.all diff --git a/app/views/admin/projects/_form.html.haml b/app/views/admin/projects/_form.html.haml index d75f2109..d10fbf95 100644 --- a/app/views/admin/projects/_form.html.haml +++ b/app/views/admin/projects/_form.html.haml @@ -6,28 +6,24 @@ - @admin_project.errors.full_messages.each do |msg| %li= msg - .form-row + .clearfix = f.label :name - %br - = f.text_field :name - .form-row + .input= f.text_field :name + .clearfix = f.label :code - %br - = f.text_field :code - .form-row + .input= f.text_field :code + .clearfix = f.label :path - %br - = f.text_field :path + .input= f.text_field :path - .form-row - = f.label :tag_list - %br - = f.text_area :tag_list, :placeholder => "project tags", :style => "height:50px", :id => :tag_field + - unless @admin_project.new_record? + .clearfix + = f.label :owner_id + .input= f.select :owner_id, User.all.map { |user| [user.name, user.id] } - .form-row + .clearfix = f.label :description - %br - = f.text_area :description + .input= f.text_area :description .clear %br .actions @@ -36,4 +32,5 @@ :javascript $(function(){ taggifyForm(); + $('#project_owner_id').chosen(); }) diff --git a/app/views/admin/users/_form.html.haml b/app/views/admin/users/_form.html.haml index 156696c9..b137ae3d 100644 --- a/app/views/admin/users/_form.html.haml +++ b/app/views/admin/users/_form.html.haml @@ -2,48 +2,41 @@ = form_for [:admin, @admin_user] do |f| -if @admin_user.errors.any? #error_explanation - %h2= "#{pluralize(@admin_user.errors.count, "error")} prohibited this admin_user from being saved:" %ul - @admin_user.errors.full_messages.each do |msg| %li= msg - .form-row + .clearfix = f.label :name - %br - = f.text_field :name - .form-row + .input= f.text_field :name + .clearfix = f.label :email - %br - = f.text_field :email - .form-row + .input= f.text_field :email + .clearfix = f.label :password - %br - = f.password_field :password - .form-row + .input= f.password_field :password + .clearfix = f.label :password_confirmation - %br - = f.password_field :password_confirmation - .form-row + .input= f.password_field :password_confirmation + .clearfix = f.check_box :admin = f.label :admin - .form-row - = f.text_field :projects_limit, :class => "small_input" + .clearfix = f.label :projects_limit + .input= f.text_field :projects_limit, :class => "small_input" - .form-row + .clearfix = f.label :skype - %br - = f.text_field :skype - .form-row + .input= f.text_field :skype + .clearfix = f.label :linkedin - %br - = f.text_field :linkedin - .form-row + .input= f.text_field :linkedin + .clearfix = f.label :twitter - %br - = f.text_field :twitter + .input= f.text_field :twitter .clear %br .actions - = f.submit 'Save', :class => "btn" + = f.submit 'Save', :class => "btn primary" + = link_to 'Cancel', admin_users_path, :class => "btn" diff --git a/app/views/admin/users/new.html.haml b/app/views/admin/users/new.html.haml index 87ea570b..87d6b0f2 100644 --- a/app/views/admin/users/new.html.haml +++ b/app/views/admin/users/new.html.haml @@ -1,6 +1,3 @@ -%h1 New user - +%h2 New user +%hr = render 'form' - -%br -= link_to 'Back', admin_users_path, :class => "" diff --git a/app/views/commits/index.html.haml b/app/views/commits/index.html.haml index 5f1eb9d4..6b6c52d7 100644 --- a/app/views/commits/index.html.haml +++ b/app/views/commits/index.html.haml @@ -29,5 +29,9 @@ :javascript $(function(){ CommitsList.init("#{@ref}", 20); - $('.project-refs-select').chosen(); }); + +:javascript + $(function(){ + $('.project-refs-select').chosen(); + }); diff --git a/app/views/dashboard/_merge_requests_feed.html.haml b/app/views/dashboard/_merge_requests_feed.html.haml index b1044d54..4f40f547 100644 --- a/app/views/dashboard/_merge_requests_feed.html.haml +++ b/app/views/dashboard/_merge_requests_feed.html.haml @@ -5,6 +5,6 @@ %strong = merge_request.project.name – - Issue # + Merge Request # = merge_request.id = truncate merge_request.title, :length => 50 diff --git a/app/views/issues/_show.html.haml b/app/views/issues/_show.html.haml index d9f6933b..cc154d8c 100644 --- a/app/views/issues/_show.html.haml +++ b/app/views/issues/_show.html.haml @@ -1,12 +1,10 @@ %li.wll{ :id => dom_id(issue), :class => "issue #{issue.critical ? "critical" : ""}", :url => project_issue_path(issue.project, issue) } - = image_tag gravatar_icon(issue.author_email), :class => "avatar" + = image_tag gravatar_icon(issue.assignee_email), :class => "avatar" %span.update-author + assigned to %strong = link_to project_team_member_path(@project, @project.team_member_by_id(issue.author_id)), :class => "author_link" do - = issue.author_name - authored - = time_ago_in_words(issue.created_at) - ago + = issue.assignee_name - if issue.critical %span.label.important critical - if issue.today? diff --git a/app/views/issues/index.html.haml b/app/views/issues/index.html.haml index f7fdb883..9c0f2847 100644 --- a/app/views/issues/index.html.haml +++ b/app/views/issues/index.html.haml @@ -1,13 +1,10 @@ -- if current_user.private_token - = content_for :rss_icon do - .rss-icon - = link_to project_issues_path(@project, :atom, { :private_token => current_user.private_token }) do - = image_tag "Rss-UI.PNG", :width => 22, :title => "feed" - - .issues_content %h3 Issues + %span.rss-icon + = link_to project_issues_path(@project, :atom, { :private_token => current_user.private_token }) do + = image_tag "Rss-UI.PNG", :width => 22, :title => "feed" + - if can? current_user, :write_issue, @project = link_to new_project_issue_path(@project), :class => "right btn small", :title => "New Issue", :remote => true do New Issue diff --git a/app/views/issues/index.js.haml b/app/views/issues/index.js.haml index a08ffe5a..a534cfbf 100644 --- a/app/views/issues/index.js.haml +++ b/app/views/issues/index.js.haml @@ -1,3 +1,3 @@ :plain - $('#issues-table tbody').html("#{escape_javascript(render('issues'))}"); + $('#issues-table').html("#{escape_javascript(render('issues'))}"); setSortable(); diff --git a/app/views/issues/show.html.haml b/app/views/issues/show.html.haml index 34767251..2ef59a2f 100644 --- a/app/views/issues/show.html.haml +++ b/app/views/issues/show.html.haml @@ -1,5 +1,8 @@ %h3 Issue ##{@issue.id} + %small + created at + = @issue.created_at.stamp("Aug 21, 2011") %span.right - if can?(current_user, :admin_project, @project) || @issue.author == current_user @@ -20,21 +23,18 @@ %div.well %div - %span.entity-info - = image_tag gravatar_icon(@issue.author_email), :class => "left", :width => 40, :style => "padding-right:5px;" - %span.commit-title - %strong - %span.commit-author - %strong - = link_to project_team_member_path(@project, @project.team_member_by_id(@issue.author.id)) do - %span.author= @issue.author_name - → - = link_to project_team_member_path(@project, @project.team_member_by_id(@issue.assignee.id)) do - %span.author= @issue.assignee_name - %br - .cgray= @issue.created_at.stamp("Aug 21, 2011 9:23pm") - + %cite.cgray Created by + = image_tag gravatar_icon(@issue.author_email), :width => 16, :class => "lil_av" + = link_to project_team_member_path(@project, @project.team_member_by_id(@issue.author.id)) do + %strong.author= @issue.author_name + %cite.cgray and currently assigned to + = image_tag gravatar_icon(@issue.assignee_email), :width => 16, :class => "lil_av" + = link_to project_team_member_path(@project, @project.team_member_by_id(@issue.assignee.id)) do + %strong.author= @issue.assignee_name + + %hr + %div= simple_format @issue.title diff --git a/app/views/keys/_form.html.haml b/app/views/keys/_form.html.haml index 1cc7e336..cdabdc73 100644 --- a/app/views/keys/_form.html.haml +++ b/app/views/keys/_form.html.haml @@ -1,16 +1,18 @@ %div - = form_for @key, :remote => true do |f| + = form_for @key do |f| -if @key.errors.any? - %ul - - @key.errors.full_messages.each do |msg| - %li= msg + .alert-message.block-message.error + %ul + - @key.errors.full_messages.each do |msg| + %li= msg - .form-row + .clearfix = f.label :title - = f.text_field :title, :style => "width:300px" - .form-row + .input= f.text_field :title + .clearfix = f.label :key - = f.text_area :key, :style => "width:300px; height:130px" - .form-row - = f.submit 'Save', :class => "grey-button" + .input= f.text_area :key, :class => "xlarge" + .actions + = f.submit 'Save', :class => "primary btn" + = link_to "Cancel", keys_path, :class => "btn" diff --git a/app/views/keys/_show.html.haml b/app/views/keys/_show.html.haml index 3d506e42..81ecbfe6 100644 --- a/app/views/keys/_show.html.haml +++ b/app/views/keys/_show.html.haml @@ -1,7 +1,7 @@ -%a.update-item{:href => key_path(key)} - %span.update-title - = key.title - %span.update-author - Added - = time_ago_in_words(key.created_at) - ago +%li.entry + = link_to key_path(key) do + %strong= key.title + %span.right.cgray + Added + = time_ago_in_words(key.created_at) + ago diff --git a/app/views/keys/index.html.haml b/app/views/keys/index.html.haml index 933eef63..e6979f5e 100644 --- a/app/views/keys/index.html.haml +++ b/app/views/keys/index.html.haml @@ -1,16 +1,10 @@ -%h2.icon - %span> +%h3 SSH Keys -%div#new-key-holder.right - = link_to "Add new", new_key_path, :remote => true, :class => "grey-button" -%br + = link_to "Add new", new_key_path, :class => "btn small right" + +%hr %div#keys-table{ :class => "update-data ui-box ui-box-small ui-box-big" } - .data + %ul.unstyled - @keys.each do |key| = render(:partial => 'show', :locals => {:key => key}) - -:javascript - $('.delete-key').live('ajax:success', function() { - $(this).closest('.update-item').fadeOut(); }); - diff --git a/app/views/keys/new.html.haml b/app/views/keys/new.html.haml index fed448b4..743a3173 100644 --- a/app/views/keys/new.html.haml +++ b/app/views/keys/new.html.haml @@ -1,5 +1,3 @@ -%h1 New key - +%h3 New key +%hr = render 'form' - -= link_to 'Back', keys_path diff --git a/app/views/keys/show.html.haml b/app/views/keys/show.html.haml index 9dcaa093..fe7f80d5 100644 --- a/app/views/keys/show.html.haml +++ b/app/views/keys/show.html.haml @@ -1,10 +1,7 @@ -.ui-box.width-100p - %h3= @key.title - .data - %pre= @key.key - .clear - .buttons - = link_to 'Remove', @key, :confirm => 'Are you sure?', :method => :delete, :class => "red-button delete-key right" - .clear +%h3= @key.title +%hr +%pre= @key.key +.actions + = link_to 'Remove', @key, :confirm => 'Are you sure?', :method => :delete, :class => "btn danger delete-key" diff --git a/app/views/layouts/_head_panel.html.haml b/app/views/layouts/_head_panel.html.haml index 429926dd..7d8ceecf 100644 --- a/app/views/layouts/_head_panel.html.haml +++ b/app/views/layouts/_head_panel.html.haml @@ -11,10 +11,6 @@ = truncate @project.name, :length => 28 .git_url_wrapper %input.git-url.text{:id => "", :name => "", :readonly => "", :type => "text", :value => @project.url_to_repo, :class => "one_click_select"} - -#- if @project.repo_exists? - .left{:style => "margin-left:5px;"} - = render :partial => "projects/refs", :locals => { :destination => controller.controller_name == "commits" ? "commits" : "tree" } - = yield :rss_icon .account-box diff --git a/app/views/layouts/_project_side.html.haml b/app/views/layouts/_project_side.html.haml index ed7a453a..1e553788 100644 --- a/app/views/layouts/_project_side.html.haml +++ b/app/views/layouts/_project_side.html.haml @@ -6,14 +6,14 @@ - if @project.repo_exists? = link_to "Repository", project_repository_path(@project), :class => repository_tab_class - = link_to "Tree", tree_project_ref_path(@project, @project.root_ref), :class => tree_tab_class + = link_to "Code", tree_project_ref_path(@project, @project.root_ref), :class => tree_tab_class = link_to "Commits", project_commits_path(@project), :class => (controller.controller_name == "commits") ? "current" : nil = link_to "Network", graph_project_path(@project), :class => current_page?(:controller => "projects", :action => "graph", :id => @project) ? "current" : nil = link_to project_issues_filter_path(@project), :class => (controller.controller_name == "issues") ? "current" : nil do Issues + = link_to project_merge_requests_path(@project), :class => (controller.controller_name == "merge_requests") ? "current" : nil do + Merge Requests = link_to wall_project_path(@project), :class => current_page?(:controller => "projects", :action => "wall", :id => @project) ? "current" : nil do - Wall + @Wall - if @project.common_notes.today.count > 0 %span.label= @project.common_notes.today.count - = link_to project_merge_requests_path(@project), :class => (controller.controller_name == "merge_requests") ? "current" : nil do - Requests diff --git a/app/views/layouts/profile.html.haml b/app/views/layouts/profile.html.haml index fcc8d975..ce41627e 100644 --- a/app/views/layouts/profile.html.haml +++ b/app/views/layouts/profile.html.haml @@ -13,13 +13,15 @@ = render :partial => "layouts/head_panel" .container-fluid .sidebar - .fixed - %aside - = link_to "Profile", profile_path, :class => current_page?(:controller => "profile", :action => :show) ? "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 keys_path, :class => controller.controller_name == "keys" ? "current" : nil do - Keys - - unless current_user.keys.empty? - %span{ :class => "number" }= current_user.keys.count - .content= yield + %aside + = link_to "Profile", profile_path, :class => current_page?(:controller => "profile", :action => :show) ? "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 keys_path, :class => controller.controller_name == "keys" ? "current" : nil do + Keys + - unless current_user.keys.empty? + %span.label= current_user.keys.count + .content + .row + .span10= yield + .span4= render "layouts/projects_side" diff --git a/app/views/merge_requests/show.html.haml b/app/views/merge_requests/show.html.haml index ead867f1..6293d2d8 100644 --- a/app/views/merge_requests/show.html.haml +++ b/app/views/merge_requests/show.html.haml @@ -5,6 +5,10 @@ → %span.label= @merge_request.target_branch + %small + created at + = @merge_request.created_at.stamp("Aug 21, 2011") + %span.right - if can?(current_user, :admin_project, @project) || @merge_request.author == current_user - if @merge_request.closed @@ -24,19 +28,17 @@ %div.well %div - %span.entity-info - = image_tag gravatar_icon(@merge_request.author_email), :class => "left", :width => 40, :style => "padding-right:5px;" - %span.commit-title - %strong - %span.commit-author - %strong - = link_to project_team_member_path(@project, @project.team_member_by_id(@merge_request.author.id)) do - %span.author= @merge_request.author_name - → - = link_to project_team_member_path(@project, @project.team_member_by_id(@merge_request.assignee.id)) do - %span.author= @merge_request.assignee_name - %br - .cgray= @merge_request.created_at.stamp("Aug 21, 2011 9:23pm") + %cite.cgray Created by + = image_tag gravatar_icon(@merge_request.author_email), :width => 16, :class => "lil_av" + = link_to project_team_member_path(@project, @project.team_member_by_id(@merge_request.author.id)) do + %strong.author= @merge_request.author_name + + %cite.cgray and currently assigned to + = image_tag gravatar_icon(@merge_request.assignee_email), :width => 16, :class => "lil_av" + = link_to project_team_member_path(@project, @project.team_member_by_id(@merge_request.assignee.id)) do + %strong.author= @merge_request.assignee_name + + %hr %div= simple_format @merge_request.title @@ -56,7 +58,7 @@ %img{:src => "/assets/ajax-loader-facebook.gif", :class => "dashboard-loader"} .merge-request-notes - .issue_notes= render "notes/notes" + .merge_request_notes= render "notes/notes" .loading{ :style => "display:none;"} %center= image_tag "ajax-loader.gif" .clear diff --git a/app/views/profile/design.html.haml b/app/views/profile/design.html.haml index db5ffccf..68746fdc 100644 --- a/app/views/profile/design.html.haml +++ b/app/views/profile/design.html.haml @@ -1,22 +1,20 @@ -.ui-box.width-100p - %h3 Design - = form_for @user, :url => profile_update_path, :method => :put do |f| - .data - .left.dark_scheme_box - %label{:for => "user_dark_scheme_false"} - = image_tag "white.png", :width => 310, :height => 212 - %center - %h4 - = f.radio_button :dark_scheme, false - White code preview - .right.dark_scheme_box - %label{:for => "user_dark_scheme_true"} - = image_tag "dark.png", :width => 310, :height => 212 - %center - %h4 - = f.radio_button :dark_scheme, true - Dark code preview - .clear - .buttons - = f.submit 'Save', :class => "btn" +%h3 Design +%hr += form_for @user, :url => profile_update_path, :method => :put do |f| + .row + %label.span4{:for => "user_dark_scheme_false"} + = image_tag "white.png", :width => 210 + %center + %h4 + = f.radio_button :dark_scheme, false + White code preview + %label.span4{:for => "user_dark_scheme_true"} + = image_tag "dark.png", :width => 210 + %center + %h4 + = f.radio_button :dark_scheme, true + Dark code preview + .clearfix + .actions + = f.submit 'Save', :class => "btn" diff --git a/app/views/profile/password.html.haml b/app/views/profile/password.html.haml index 47ee0093..3a88b1ce 100644 --- a/app/views/profile/password.html.haml +++ b/app/views/profile/password.html.haml @@ -1,44 +1,41 @@ -.ui-box.width-100p.append-bottom-20 - %h3 Password - = form_for @user, :url => profile_password_path, :method => :put do |f| - .data - %p After successfull password update you will be redirected to login page where you should login with new password - -if @user.errors.any? - #error_explanation - %ul - - @user.errors.full_messages.each do |msg| - %li= msg +%h3 Password +%hr += form_for @user, :url => profile_password_path, :method => :put do |f| + .data + %p After successfull password update you will be redirected to login page where you should login with new password + -if @user.errors.any? + #error_explanation + %ul + - @user.errors.full_messages.each do |msg| + %li= msg - .form-row - = f.label :password - %br - = f.password_field :password - .form-row - = f.label :password_confirmation - %br - = f.password_field :password_confirmation - .buttons - = f.submit 'Save', :class => "btn" -.clear - -.ui-box.width-100p - %h3 - Private token - %em.cred.right - keep it in secret! - = form_for @user, :url => profile_reset_private_token_path, :method => :put do |f| - .data - %p Private token used to access application resources without authentication. - %p For example its required to access commits feed. - %hr - %p.cgray - - if current_user.private_token - = text_field_tag "token", current_user.private_token - - else - You don`t have one yet. Click generate to fix it. - .buttons + .clearfix + = f.label :password + .input= f.password_field :password + .clearfix + = f.label :password_confirmation + .input= f.password_field :password_confirmation + .actions + = f.submit 'Save', :class => "btn" + +%h3 + Private token + %span.cred.right + keep it in secret! +%hr += form_for @user, :url => profile_reset_private_token_path, :method => :put do |f| + .data + %p Private token used to access application resources without authentication. + %p For example its required to access commits feed. + %hr + %p.cgray - if current_user.private_token - = f.submit 'Reset', :confirm => "Are you sure?", :class => "grey-button" + = text_field_tag "token", current_user.private_token - else - = f.submit 'Generate', :class => "btn" + You don`t have one yet. Click generate to fix it. + .actions + - if current_user.private_token + = f.submit 'Reset', :confirm => "Are you sure?", :class => "btn" + - else + = f.submit 'Generate', :class => "btn" diff --git a/app/views/profile/show.html.haml b/app/views/profile/show.html.haml index cb933e60..723b6413 100644 --- a/app/views/profile/show.html.haml +++ b/app/views/profile/show.html.haml @@ -1,4 +1,9 @@ -%h3= @user.name +.media-grid + = link_to "#" do + = image_tag gravatar_icon(@user.email, 90), :class => "thumbnail" + %h3.media_h= @user.name + +%hr = form_for @user, :url => profile_update_path, :method => :put do |f| -if @user.errors.any? diff --git a/spec/requests/dashboard_merge_requests_spec.rb b/spec/requests/dashboard_merge_requests_spec.rb index e5916095..f345a858 100644 --- a/spec/requests/dashboard_merge_requests_spec.rb +++ b/spec/requests/dashboard_merge_requests_spec.rb @@ -34,14 +34,7 @@ describe "User MergeRequests" do it { should have_content(@merge_request1.title[0..10]) } it { should have_content(@merge_request1.project.name) } - it { should have_content(@merge_request1.target_branch) } - it { should have_content(@merge_request1.source_branch) } - it { should have_content(@merge_request1.assignee.name) } - it { should have_content(@merge_request2.title[0..10]) } it { should have_content(@merge_request2.project.name) } - it { should have_content(@merge_request2.target_branch) } - it { should have_content(@merge_request2.source_branch) } - it { should have_content(@merge_request2.assignee.name) } end end diff --git a/spec/requests/issues_spec.rb b/spec/requests/issues_spec.rb index 62daf168..bff99531 100644 --- a/spec/requests/issues_spec.rb +++ b/spec/requests/issues_spec.rb @@ -51,17 +51,17 @@ describe "Issues" do # admin access to remove issue @user.users_projects.destroy_all project.add_access(@user, :read, :write, :admin) - visit project_issues_path(project) + visit edit_project_issue_path(project, @issue) end it "should remove entry" do expect { - click_link "destroy_issue_#{@issue.id}" + click_link "Remove" }.to change { Issue.count }.by(-1) end end - describe "statuses", :js => true do + describe "statuses" do before do @closed_issue = Factory :issue, :author => @user, @@ -76,13 +76,13 @@ describe "Issues" do end it "should show only closed" do - choose "closed_issues" + click_link "Closed" should have_no_content(@issue.title) should have_content(@closed_issue.title[0..25]) end it "should show all" do - choose "all_issues" + click_link "All" should have_content(@issue.title[0..25]) should have_content(@closed_issue.title[0..25]) end @@ -182,7 +182,6 @@ describe "Issues" do :assignee => @user, :project => project visit project_issues_path(project) - page.execute_script("$('.action-links').css('display', 'block');") click_link "Edit" end @@ -200,7 +199,6 @@ describe "Issues" do it "should update issue fields" do click_button "Save" - page.should_not have_content("Issue ##{@issue.id}") page.should have_content @user.name page.should have_content "bug 345" page.should have_content project.name @@ -226,7 +224,7 @@ describe "Issues" do @issue.save visit project_issues_path(project) - choose 'closed_issues' + click_link 'Closed' fill_in 'issue_search', :with => 'foobar' page.should have_content 'foobar' diff --git a/spec/requests/projects_spec.rb b/spec/requests/projects_spec.rb index 6db900c0..f3dd707b 100644 --- a/spec/requests/projects_spec.rb +++ b/spec/requests/projects_spec.rb @@ -5,7 +5,7 @@ describe "Projects" do describe "GET /projects" do before do - @project = Factory :project + @project = Factory :project, :owner => @user @project.add_access(@user, :read) visit projects_path end @@ -15,7 +15,7 @@ describe "Projects" do end it "should have link to new project" do - page.should have_content("Create new project") + page.should have_content("New Project") end it "should have project" do @@ -26,7 +26,7 @@ describe "Projects" do describe "GET /projects/new" do before do visit projects_path - click_link "Create new project" + click_link "New Project" end it "should be correct path" do @@ -68,7 +68,7 @@ describe "Projects" do describe "GET /projects/show" do before do - @project = Factory :project + @project = Factory :project, :owner => @user @project.add_access(@user, :read) visit project_path(@project) @@ -128,7 +128,7 @@ describe "Projects" do describe "PUT /projects/:id" do before do - @project = Factory :project + @project = Factory :project, :owner => @user @project.add_access(@user, :admin, :read) visit edit_project_path(@project)