From e92669fb2d60e4bb331e67d9bfd17a5266152a65 Mon Sep 17 00:00:00 2001 From: Nihad Abbasov Date: Fri, 28 Oct 2011 00:37:17 +0500 Subject: [PATCH 01/26] install rdiscount --- Gemfile | 3 ++- Gemfile.lock | 2 ++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/Gemfile b/Gemfile index 60fc118c..fc040ce0 100644 --- a/Gemfile +++ b/Gemfile @@ -19,6 +19,7 @@ gem "pygments.rb", "0.2.3" gem "thin" gem "git" gem "acts_as_list" +gem 'rdiscount' group :assets do gem 'sass-rails', " ~> 3.1.0" @@ -26,7 +27,7 @@ group :assets do gem 'uglifier' end -group :development do +group :development do gem 'rails-footnotes', '>= 3.7.5.rc4' gem 'annotate', :git => 'git://github.com/ctran/annotate_models.git' end diff --git a/Gemfile.lock b/Gemfile.lock index 83ccebd8..83df35b5 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -161,6 +161,7 @@ GEM rdoc (~> 3.4) thor (~> 0.14.6) rake (0.9.2) + rdiscount (1.6.8) rdoc (3.9.4) rspec (2.6.0) rspec-core (~> 2.6.0) @@ -264,6 +265,7 @@ DEPENDENCIES pygments.rb (= 0.2.3) rails (= 3.1.0) rails-footnotes (>= 3.7.5.rc4) + rdiscount rspec-rails ruby-debug19 sass-rails (~> 3.1.0) From 6c7706eb17cff08ba0c3cccc3ebcfc969ae0f6e3 Mon Sep 17 00:00:00 2001 From: Nihad Abbasov Date: Fri, 28 Oct 2011 00:57:10 +0500 Subject: [PATCH 02/26] process notes w/ rdiscount --- app/views/notes/_show.html.haml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/views/notes/_show.html.haml b/app/views/notes/_show.html.haml index ee9f9ffa..1907e9cc 100644 --- a/app/views/notes/_show.html.haml +++ b/app/views/notes/_show.html.haml @@ -2,7 +2,7 @@ %div.note_author = image_tag gravatar_icon(note.author.email), :class => "left", :width => 40, :style => "padding-right:5px;" %div.note_content.left - = simple_format(html_escape(note.note)) + = raw RDiscount.new(note.note, :smart, :filter_html).to_html - if note.attachment.url Attachment: = link_to note.attachment_identifier, note.attachment.url, :target => "_blank" From 1ffb4b98c0405ee4c8bafaf9b67f1fc49493fbbc Mon Sep 17 00:00:00 2001 From: gitlabhq Date: Fri, 28 Oct 2011 14:41:39 +0300 Subject: [PATCH 03/26] new design/layout started. projects page --- app/assets/images/.directory | 2 +- app/assets/images/bg-header.png | Bin 0 -> 212 bytes app/assets/images/images.png | Bin 0 -> 6472 bytes app/assets/images/login-logo.png | Bin 0 -> 1429 bytes app/assets/javascripts/modernizr-2.0.6.min.js | 4 + app/assets/stylesheets/projects.css.scss | 6 +- app/assets/stylesheets/style.scss | 521 ++++++++++++++++++ app/views/layouts/_head_panel.html.erb | 39 +- app/views/layouts/_page_title.html.haml | 6 + app/views/layouts/application.html.haml | 34 +- app/views/projects/_tile.html.haml | 29 +- app/views/projects/index.html.haml | 7 + 12 files changed, 605 insertions(+), 43 deletions(-) create mode 100644 app/assets/images/bg-header.png create mode 100644 app/assets/images/images.png create mode 100644 app/assets/images/login-logo.png create mode 100755 app/assets/javascripts/modernizr-2.0.6.min.js create mode 100755 app/assets/stylesheets/style.scss create mode 100644 app/views/layouts/_page_title.html.haml diff --git a/app/assets/images/.directory b/app/assets/images/.directory index 93a51f7c..d6f1a908 100644 --- a/app/assets/images/.directory +++ b/app/assets/images/.directory @@ -1,4 +1,4 @@ [Dolphin] ShowPreview=true -Timestamp=2011,9,14,20,34,18 +Timestamp=2011,10,28,13,16,25 Version=2 diff --git a/app/assets/images/bg-header.png b/app/assets/images/bg-header.png new file mode 100644 index 0000000000000000000000000000000000000000..8759ca589fccdfcddd6ec42ba4474257da26c855 GIT binary patch literal 212 zcmeAS@N?(olHy`uVBq!ia0vp^j6lrJ!VDy>ldP5lDdu7)&kzm{j@u9Y9{{=h0X`wF z{=sq9j^1WAu7+lII))av=1#N#N^ur=L>4nJa0`JjznHv8d^+P v(F&6Hba4#fn3r6IT literal 0 HcmV?d00001 diff --git a/app/assets/images/images.png b/app/assets/images/images.png new file mode 100644 index 0000000000000000000000000000000000000000..8af7472e70e1030ccb44952f287964cf460cbe20 GIT binary patch literal 6472 zcmeI1`CpRh*T-pWvYASw95dIxI8A;h&2e(gg-Xn6G99MU%mq`)G!=JL6k2AAH05y` zwbZn1a>jJ^GzHv{9iFQ{;Q96Wsq6K+fcv^{Ue~$L`JDGTH{AWj z+jG~~hF?Pr@U}JaIG~IZC}xbV@;D|GEMuEd zXuW+d)uyq@CUDt+xO3oHal!Uyzb0TN4h(Q-|L{F+R2^gKfy}R|`OWt$hcu5OhpNb0 zFO+TUCA)ox$h#jC=l*j$H0~_KsQruVm{ud}mm}E%PLN2rnEkN*RXUboultgq%J^&G z-SWEpRYM%YwH+ zCU5Ocg8bBG`%&9=34|+6qJv*qwMFp{HxR5&<@_;sd zG}=~AeCC?!{U~E-boaw5Ye@r|dlk~#dGCaEcbzk=xmdjsg4AoNNSpXbY;3{PD=o50 z>nugN#G%AgjdoV~LUHW=#MGD>RWWbrM!AK&_wU@EbXYm2c_d@hc+Txm4kX28qu;$u zBowMSQmOR9P!uhd{|F0%l`|MBAGh^~eM&U#(m0pRUdOPcoz`ypG>F3&PTab~P#c11 zf`Jus>iLr<*bl4ouXN$cyU9z#Gz4OqQy*~}5h&|-*CjU#o0kfLl7}v6Tw$le3ZM#G z(Lh4C6}@3RjsGaS@JLYeU-k9tS>TJAwKX+0&ak&y+Bz=7Ty9HdYHDg+T-?f|8174x z#l^+QXcr5oxZa9g>HY<}hz`_Q*}CrAIwi>i8C|+28G^3fs!+Hhv-$9nR|*LN!Q0vW zpr-6pN4Z?UB&LQG@x6lZuXJIsE7HIW}`&bLka?6Lr^O(6x+wh%bZh|rAx&arVQ@cL9O~7do1UH^#|Iu5mqz?qZ!C?m~h;D zYNlF%mpI0U;%S$1h{T!KB>Ff`#6UI6=8FkGI5}}P|Jh+}8NkA;RA;+Ots2P=6R9&w z5nj@A&6g6)pw`qZnFS@hIaoa3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y=bFk zeeX}V;0{BhWB2sgoru76iE<0>rx<*12Mk9#%re`(yfm;}=M|{_Ip@PR12*k-WY*a3 z*9Kv8RR5gol3M{o%@2k`j^Vh0g@*n7 z;8w>Hxq*eI>{o?blj@%V*lRana<3y+I>(|M8rXhYHbL{lQ<7ZPZeR)=(nDZ8ZeW3_ zJILA7%}v4jG<6bSyrJ3*n0iJ5<`7Z!&oDHCa%{g(AA;y97?{3sG|r*->DN4ucoGEn z2F3ygn*Sg-5lCjZFCLvqGp7$KF?T0XYa$<=$yu^AnbL57`Wwd5_uBGD0fxhqskO&x zQM`@>%s4ef=k>XJCXZdD2L?cJEelj-)|yDb#Hl%N9jQXhJ%?VkJRF`9SdJ6NUGr&} z#rf6w7hu%-AcVhMlp{ofWu+-EMz12(A$fIPPw4Ld0yADNs`|$69pijyDqz`5$>ZD~ zj|0rme0JYh`L;d?lnB^IAy;#P0bd+o;-oYhsd+ju`Hh~$z$CFSi*bNq(;}Wtv`uw4 zc_sW7;K*6-z5VH(q@Tko@$(g9$9~Z`z|0O6o|(@S_n~jitxl",a,""].join(""),k.id=i,k.innerHTML+=f,g.appendChild(k),h=c(k,a),k.parentNode.removeChild(k);return!!h},w=function(b){if(a.matchMedia)return matchMedia(b).matches;var c;v("@media "+b+" { #"+i+" { position: absolute; } }",function(b){c=(a.getComputedStyle?getComputedStyle(b,null):b.currentStyle).position=="absolute"});return c},x=function(){function d(d,e){e=e||b.createElement(a[d]||"div"),d="on"+d;var f=d in e;f||(e.setAttribute||(e=b.createElement("div")),e.setAttribute&&e.removeAttribute&&(e.setAttribute(d,""),f=D(e[d],"function"),D(e[d],c)||(e[d]=c),e.removeAttribute(d))),e=null;return f}var a={select:"input",change:"input",submit:"form",reset:"form",error:"img",load:"img",abort:"img"};return d}(),y,z={}.hasOwnProperty,A;!D(z,c)&&!D(z.call,c)?A=function(a,b){return z.call(a,b)}:A=function(a,b){return b in a&&D(a.constructor.prototype[b],c)};var H=function(c,d){var f=c.join(""),g=d.length;v(f,function(c,d){var f=b.styleSheets[b.styleSheets.length-1],h=f.cssRules&&f.cssRules[0]?f.cssRules[0].cssText:f.cssText||"",i=c.childNodes,j={};while(g--)j[i[g].id]=i[g];e.touch="ontouchstart"in a||j.touch.offsetTop===9,e.csstransforms3d=j.csstransforms3d.offsetLeft===9,e.generatedcontent=j.generatedcontent.offsetHeight>=1,e.fontface=/src/i.test(h)&&h.indexOf(d.split(" ")[0])===0},g,d)}(['@font-face {font-family:"font";src:url("https://")}',["@media (",o.join("touch-enabled),("),i,")","{#touch{top:9px;position:absolute}}"].join(""),["@media (",o.join("transform-3d),("),i,")","{#csstransforms3d{left:9px;position:absolute}}"].join(""),['#generatedcontent:after{content:"',m,'";visibility:hidden}'].join("")],["fontface","touch","csstransforms3d","generatedcontent"]);r.flexbox=function(){function c(a,b,c,d){a.style.cssText=o.join(b+":"+c+";")+(d||"")}function a(a,b,c,d){b+=":",a.style.cssText=(b+o.join(c+";"+b)).slice(0,-b.length)+(d||"")}var d=b.createElement("div"),e=b.createElement("div");a(d,"display","box","width:42px;padding:0;"),c(e,"box-flex","1","width:10px;"),d.appendChild(e),g.appendChild(d);var f=e.offsetWidth===42;d.removeChild(e),g.removeChild(d);return f},r.canvas=function(){var a=b.createElement("canvas");return!!a.getContext&&!!a.getContext("2d")},r.canvastext=function(){return!!e.canvas&&!!D(b.createElement("canvas").getContext("2d").fillText,"function")},r.webgl=function(){return!!a.WebGLRenderingContext},r.touch=function(){return e.touch},r.geolocation=function(){return!!navigator.geolocation},r.postmessage=function(){return!!a.postMessage},r.websqldatabase=function(){var b=!!a.openDatabase;return b},r.indexedDB=function(){for(var b=-1,c=p.length;++b7)},r.history=function(){return!!a.history&&!!history.pushState},r.draganddrop=function(){return x("dragstart")&&x("drop")},r.websockets=function(){for(var b=-1,c=p.length;++b";return(a.firstChild&&a.firstChild.namespaceURI)==q.svg},r.smil=function(){return!!b.createElementNS&&/SVG/.test(n.call(b.createElementNS(q.svg,"animate")))},r.svgclippaths=function(){return!!b.createElementNS&&/SVG/.test(n.call(b.createElementNS(q.svg,"clipPath")))};for(var J in r)A(r,J)&&(y=J.toLowerCase(),e[y]=r[J](),u.push((e[y]?"":"no-")+y));e.input||I(),e.addTest=function(a,b){if(typeof a=="object")for(var d in a)A(a,d)&&e.addTest(d,a[d]);else{a=a.toLowerCase();if(e[a]!==c)return;b=typeof b=="boolean"?b:!!b(),g.className+=" "+(b?"":"no-")+a,e[a]=b}return e},B(""),j=l=null,a.attachEvent&&function(){var a=b.createElement("div");a.innerHTML="";return a.childNodes.length!==1}()&&function(a,b){function s(a){var b=-1;while(++b=u.minw)&&(!u.maxw||u.maxw&&l<=u.maxw))m[u.media]||(m[u.media]=[]),m[u.media].push(f[u.rules])}for(var t in g)g[t]&&g[t].parentNode===j&&j.removeChild(g[t]);for(var t in m){var v=c.createElement("style"),w=m[t].join("\n");v.type="text/css",v.media=t,v.styleSheet?v.styleSheet.cssText=w:v.appendChild(c.createTextNode(w)),n.appendChild(v),g.push(v)}j.insertBefore(n,o.nextSibling)}},s=function(a,b){var c=t();if(!!c){c.open("GET",a,!0),c.onreadystatechange=function(){c.readyState==4&&(c.status==200||c.status==304)&&b(c.responseText)};if(c.readyState==4)return;c.send()}},t=function(){var a=!1,b=[function(){return new ActiveXObject("Microsoft.XMLHTTP")},function(){return new XMLHttpRequest}],c=b.length;while(c--){try{a=b[c]()}catch(d){continue}break}return function(){return a}}();m(),respond.update=m,a.addEventListener?a.addEventListener("resize",u,!1):a.attachEvent&&a.attachEvent("onresize",u)}}(this,Modernizr.mq("only all")),function(a,b,c){function k(a){return!a||a=="loaded"||a=="complete"}function j(){var a=1,b=-1;while(p.length- ++b)if(p[b].s&&!(a=p[b].r))break;a&&g()}function i(a){var c=b.createElement("script"),d;c.src=a.s,c.onreadystatechange=c.onload=function(){!d&&k(c.readyState)&&(d=1,j(),c.onload=c.onreadystatechange=null)},m(function(){d||(d=1,j())},H.errorTimeout),a.e?c.onload():n.parentNode.insertBefore(c,n)}function h(a){var c=b.createElement("link"),d;c.href=a.s,c.rel="stylesheet",c.type="text/css";if(!a.e&&(w||r)){var e=function(a){m(function(){if(!d)try{a.sheet.cssRules.length?(d=1,j()):e(a)}catch(b){b.code==1e3||b.message=="security"||b.message=="denied"?(d=1,m(function(){j()},0)):e(a)}},0)};e(c)}else c.onload=function(){d||(d=1,m(function(){j()},0))},a.e&&c.onload();m(function(){d||(d=1,j())},H.errorTimeout),!a.e&&n.parentNode.insertBefore(c,n)}function g(){var a=p.shift();q=1,a?a.t?m(function(){a.t=="c"?h(a):i(a)},0):(a(),j()):q=0}function f(a,c,d,e,f,h){function i(){!o&&k(l.readyState)&&(r.r=o=1,!q&&j(),l.onload=l.onreadystatechange=null,m(function(){u.removeChild(l)},0))}var l=b.createElement(a),o=0,r={t:d,s:c,e:h};l.src=l.data=c,!s&&(l.style.display="none"),l.width=l.height="0",a!="object"&&(l.type=d),l.onload=l.onreadystatechange=i,a=="img"?l.onerror=i:a=="script"&&(l.onerror=function(){r.e=r.r=1,g()}),p.splice(e,0,r),u.insertBefore(l,s?null:n),m(function(){o||(u.removeChild(l),r.r=r.e=o=1,j())},H.errorTimeout)}function e(a,b,c){var d=b=="c"?z:y;q=0,b=b||"j",C(a)?f(d,a,b,this.i++,l,c):(p.splice(this.i++,0,a),p.length==1&&g());return this}function d(){var a=H;a.loader={load:e,i:0};return a}var l=b.documentElement,m=a.setTimeout,n=b.getElementsByTagName("script")[0],o={}.toString,p=[],q=0,r="MozAppearance"in l.style,s=r&&!!b.createRange().compareNode,t=r&&!s,u=s?l:n.parentNode,v=a.opera&&o.call(a.opera)=="[object Opera]",w="webkitAppearance"in l.style,x=w&&"async"in b.createElement("script"),y=r?"object":v||x?"img":"script",z=w?"img":y,A=Array.isArray||function(a){return o.call(a)=="[object Array]"},B=function(a){return Object(a)===a},C=function(a){return typeof a=="string"},D=function(a){return o.call(a)=="[object Function]"},E=[],F={},G,H;H=function(a){function f(a){var b=a.split("!"),c=E.length,d=b.pop(),e=b.length,f={url:d,origUrl:d,prefixes:b},g,h;for(h=0;h> Global +----------------------------------------------------------------------------------------------------*/ + +.grid_1, +.grid_2, +.grid_3 { + display:inline; + float: left; + position: relative; + margin-left: 1%; + margin-right: 1%; +} + +/* Grid >> Children (Alpha ~ First, Omega ~ Last) +----------------------------------------------------------------------------------------------------*/ + +.alpha { + margin-left: 0; +} + +.omega { + margin-right: 0; +} + +/* Grid >> 3 Columns +----------------------------------------------------------------------------------------------------*/ + + +.container_3 .grid_1 { + width:31.333%; +} + +.container_3 .grid_2 { + width:64.667%; +} + +.container_3 .grid_3 { + width:98.0%; +} + + + +/* Prefix Extra Space >> 3 Columns +----------------------------------------------------------------------------------------------------*/ + + +.container_3 .prefix_1 { + padding-left:33.333%; +} + +.container_3 .prefix_2 { + padding-left:66.667%; +} + + + +/* Suffix Extra Space >> 3 Columns +----------------------------------------------------------------------------------------------------*/ + + +.container_3 .suffix_1 { + padding-right:33.333%; +} + +.container_3 .suffix_2 { + padding-right:66.667%; +} + + + +/* Push Space >> 3 Columns +----------------------------------------------------------------------------------------------------*/ + + +.container_3 .push_1 { + left:33.333%; +} + +.container_3 .push_2 { + left:66.667%; +} + + + +/* Pull Space >> 3 Columns +----------------------------------------------------------------------------------------------------*/ + + +.container_3 .pull_1 { + left:-33.333%; +} + +.container_3 .pull_2 { + left:-66.667%; +} + + + + +/* Clear Floated Elements +----------------------------------------------------------------------------------------------------*/ + +/* http://sonspring.com/journal/clearing-floats */ + +.clear { + clear: both; + display: block; + overflow: hidden; + visibility: hidden; + width: 0; + height: 0; +} + +/* http://perishablepress.com/press/2008/02/05/lessons-learned-concerning-the-clearfix-css-hack */ + +.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*/ + + +*{text-shadow: 0 1px 0 white} +body{font-size: 12px} +a{text-decoration: none; font-weight: bold; color: #333} +a:hover{color: #000} +/* Typography */ +h1,h2,h3,h4,h5{font-weight: normal; color: #666} +/* 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} +/* eo Forms */ + +/* Buttons */ +.grey-button{ + border-radius: 5px; + font-size: 12px; + font-weight: bold; + padding: 6px 20px; + border: 1px solid #999; + color: #666; + box-shadow: 0 1px 2px rgba(0,0,0,.3); + background-image: -webkit-gradient(linear, 0 0, 0 26, color-stop(0.076, #f7f7f7), to(#d5d5d5)); + background-image: -webkit-linear-gradient(#f7f7f7 7.6%, #d5d5d5); + background-image: -moz-linear-gradient(#f7f7f7 7.6%, #d5d5d5); + background-image: -o-linear-gradient(#f7f7f7 7.6%, #d5d5d5); +} + +.button{ + 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); +} + +.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); +} + +/* eo Buttons */ + +/* UI Box */ +.ui-box{border: 1px solid #DEDFE1; float: left; border-radius: 5px} +.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); + margin: 0; + padding: 1em; + font-size: 12px; + font-weight: normal; + 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 h3 a{font-weight: normal;} + +.ui-box .data{padding: .5em 1em} + +.ui-box .buttons{background-color: #f7f8f9; padding: 1em; + -webkit-border-bottom-right-radius: 5px; + -webkit-border-bottom-left-radius: 5px; + -moz-border-radius-bottomright: 5px; + -moz-border-radius-bottomleft: 5px; + border-bottom-right-radius: 5px; + border-bottom-left-radius: 5px; +} + +.ui-box: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 */ + +/* Login Page */ +body.login-page{background-color: #f1f1f1; padding-top: 10%} + +.login-box{ + width: 304px; + position: relative; + border-radius: 5px; + margin: auto; + padding: 20px; + background: white; + box-shadow: rgba(0, 0, 0, 0.07) 0 1px 0,white 0 2px 0,rgba(0, 0, 0, 0.07) 0 3px 0,white 0 4px 0, rgba(0, 0, 0, 0.07) 0 5px 0; +} + +.login-box .login-logo{ + margin: 10px 0 30px 0; + display: block; +} + +.login-box input.text{background-color: #f1f1f1; font-size: 16px; border-radius: 0; padding: 14px 10px; width: 280px} + +.login-box input.text.top{ + -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; +} + +.login-box input.text.bottom{ + -webkit-border-bottom-right-radius: 5px; + -webkit-border-bottom-left-radius: 5px; + -moz-border-radius-bottomright: 5px; + -moz-border-radius-bottomleft: 5px; + border-bottom-right-radius: 5px; + border-bottom-left-radius: 5px; + border-top: 0; + margin-bottom: 20px; +} + +.login-box a.forgot{float: right; padding-top: 6px} + + +/* General */ +header{background: #474D57 url('bg-header.png') repeat-x bottom; overflow: hidden; padding: 10px 2% 6px 2%} +header a{color: white; text-shadow: 0 -1px 0 black} +header a:hover{color: #f1f1f1} +header h1{ + width: 65px; +} +header h1.logo{ + background: url('images.png') no-repeat -3px -6px; + width: 65px; + height: 26px; + margin: 5px 0; + padding: 0; + float: left; + text-indent: -1000em; +} +header nav{border-radius: 4px; box-shadow: 0 1px 2px black; width: 321px; 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; +} +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.admin{ + -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 nav a.dashboard span{background: url('images.png') no-repeat -161px -4px; width: 20px; height: 20px; } +header nav a.admin span{background: url('images.png') no-repeat -184px -4px; width: 20px; height: 20px;} +header nav a.project span{background: url('images.png') no-repeat -209px -5px; width: 20px; height: 18px; 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; } + +.page-title{background-color: #f1f1f1;display: block; float: left; clear: both; width: 98%; padding: 0 1%; border-bottom: 1px solid #ccc; box-shadow: 0 -1px 0 white inset; margin-bottom: 1.5em} +.page-title a.grey-button{float: right;} + + + + +/* Project Page */ +.project-page .page-title{margin-bottom: 0} +.project-page .project-sidebar {width: 220px; margin-right: 1%; background: #f7f7f7; overflow: hidden; padding: 20px 0 20px 2%; margin: 0} +.project-page .project-sidebar input.text.git-url{width: 90%; box-shadow: 0 1px 2px rgba(0,0,0,.2) inset; padding: 3% 2%; margin: 0% 10% 7% 0} +.project-page .project-sidebar aside a{display: block; background: white; padding: 15px 10px; border-bottom: 1px solid #eee} +.project-page .project-sidebar aside a:first-child{ + -webkit-border-top-left-radius: 5px; + -moz-border-radius-topleft: 5px; + border-top-left-radius: 5px; +} +.project-page .project-sidebar aside a:last-child{ + -webkit-border-bottom-left-radius: 5px; + -moz-border-radius-bottomleft: 5px; + border-bottom-left-radius: 5px; +} +.project-page .project-sidebar aside a.current{background-color: #4bb8d2; color: white; text-shadow: none; border-color: transparent} +.project-page .project-content{ float: left; padding: 20px} +.project-page .project-content h2{margin-top: 0} +/* eo Project Page */ + +/* Projects Page */ +.project-box.ui-box .data .repository {margin-bottom: 20px} +.project-box.ui-box .data .title span{width: 80px; text-align: right; padding-right: 10px; display: inline-block; font-weight: bold;} +.project-box{width: 100%; margin-bottom: 3em} +.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; } +} diff --git a/app/views/layouts/_head_panel.html.erb b/app/views/layouts/_head_panel.html.erb index 07de8de4..e6f36e3f 100644 --- a/app/views/layouts/_head_panel.html.erb +++ b/app/views/layouts/_head_panel.html.erb @@ -1,22 +1,41 @@ -
+ +
+

+ GITLAB

+ + + +
+ + +
<%= link_to truncate(@project.name, :length => 20), project_path(@project), :class => "current button" if @project && !@project.new_record? %> + <%= link_to 'Dashboard', dashboard_path, :class => current_page?(dashboard_path) ? "current button" : "button" %> <%= link_to 'Projects', projects_path, :class => current_page?(projects_path) ? "current button" : "button" %> <%= link_to('Admin', admin_root_path, :class => admin_namespace? ? "current button" : "button" ) if current_user.is_admin? %> <%= link_to profile_path, :class => ((controller.controller_name == "keys" || controller.controller_name == "profile") ? "current button" : "button") do %> diff --git a/config/routes.rb b/config/routes.rb index 5f95e113..bac472a2 100644 --- a/config/routes.rb +++ b/config/routes.rb @@ -15,6 +15,7 @@ Gitlab::Application.routes.draw do put "profile/password", :to => "profile#password_update" put "profile/edit", :to => "profile#social_update" get "profile", :to => "profile#show" + get "dashboard", :to => "dashboard#index" #get "profile/:id", :to => "profile#show" resources :projects, :only => [:new, :create, :index] diff --git a/lib/commit_ext.rb b/lib/commit_ext.rb index 411809f0..32706acb 100644 --- a/lib/commit_ext.rb +++ b/lib/commit_ext.rb @@ -8,4 +8,8 @@ module CommitExt rescue "-- invalid encoding for commit message" end + + def created_at + committed_date + end end From d405292388c642117c8300a0a4931fc9a4eb1f66 Mon Sep 17 00:00:00 2001 From: gitlabhq Date: Tue, 1 Nov 2011 11:00:59 +0200 Subject: [PATCH 16/26] project page fixed --- app/assets/images/images.png | Bin 6472 -> 8698 bytes app/assets/stylesheets/style.scss | 294 +++++++++++++++++++----- app/views/layouts/_page_title.html.haml | 2 +- app/views/layouts/application.html.haml | 2 +- app/views/projects/_tile.html.haml | 2 +- app/views/projects/index.html.haml | 9 +- 6 files changed, 244 insertions(+), 65 deletions(-) diff --git a/app/assets/images/images.png b/app/assets/images/images.png index 8af7472e70e1030ccb44952f287964cf460cbe20..973d3bdd39d36e963223a1281ab44a5af453fe82 100644 GIT binary patch literal 8698 zcmeHtXH-+oyDuH-RzgQX5Ri@(As8vrn-swpq!ARtl_ zKv-L!h2N%q{RS-1oBWV;>lulA?mLs)CZzZqOYBAR+XxgbmyyFvQItMyKNre+av5 z@Yo*~0{8a{xU6TR`m}aYjgIazow2@-ZD{u9Y(${#a{l)2whI3qLoA57Eg=Qen(<2a z+{Ie|g|E)`h~zpFv)35=l*jkYyAzuS!L{1}W1#x;Hd3sVR>Rp~o-aW(9@+$i>Sp-kC=UUvT5NJ~tzrw@Ee6i(puQxYK zD`X2KX_i^Zm-qGSTK{Zg2&CD2vKkc4op(X-j}sFc*U^T;`syk+J2w{sx}0J}ke8Kp zV*hn|z>+Vj7*AoEKdcASc=w7~T_mNE%@N~eRl$S!Q`2MVpQbu8k%u|)5_l?Ea}g0kV`f?{AiEu-8D8#yCf%oTwA#nh{V_Q&T-Xz4m-hRM?6U@P3CG7p;3Ub?bz$iP}Ba0d^&% z%Q?2(4B47t1qRW+8!8m#GhG)%H}~mI!fQGkD=Wo-wc$cqNN>6v#G%@~8_i%?^|xE{ z%o28Uy55kTgJTXXqvD=AxC7>Zs>POdq;BavS? zUjNg#+S;Iz;X+e&!eou-bPUfehuWZxaqi2r@E4B$D(5@-kejFLE+UG@Rh=S@>%*oB z5vQ1F#xTQV5m;ZQ5?#|?&viMvj0eG!8c}t1Y8`KcO^uC>*J~%7Pu346Txj4w+@Gt3 zYy@2U1mR6jd-vByM5oY5G}{Z^zATl_6I=|BnH6OpoE%162@{Px%r`C`G5e_2Us6#) zg98%`V|rARuuo}9Qo54o_pkADkkli{nYeb)GnD;XGsz@;Sj4ybR?R&kQ9Doky-73m zc%x!IWV3dng+5R!t#!e-9=RCP9o`x51`T#Hgn{+WUX-ok@b^9e&U3 zyKj4gHz#YZ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-Tv`hu16m)b4oOk)3`;vw-CmrN4q1GJo$LNTf3Kk!MNEP>2+M}cOMI>Riwe0!TpopO`m_zw@F+%<#=fN z{4c!XEQoP2|n01zBq_HG1Dj)5nM~js1ivPH<`WimXX4;n((JuQT^@=N<-9Om&>TL++*pKEg zHOxCRh|G`n(}Nt*W1HyFouc9c^q{=bsa4YZXx>+FwtAg-R6DZ*72d-4I=l_C?|Jn( zArij-47TK0p|YW3A&~-2A-o*&m yield(:body_class), :id => yield(:boyd_id)} #container = render :partial => "layouts/flash" = render :partial => "layouts/head_panel" diff --git a/app/views/projects/_tile.html.haml b/app/views/projects/_tile.html.haml index ced0bf3b..7c0b8679 100644 --- a/app/views/projects/_tile.html.haml +++ b/app/views/projects/_tile.html.haml @@ -1,7 +1,7 @@ - @projects.in_groups_of(3, false) do |projects| - projects.each_with_index do |project, i| %div.grid_1 - %div{ :class => "project-box ui-box ui-box-big", :style => i == 2 ? "" : "margin-right:30px;" } + %div{ :class => "project-box ui-box ui-box-big" } = link_to project_path(project) do %h3= project.name .data diff --git a/app/views/projects/index.html.haml b/app/views/projects/index.html.haml index 45187b44..a35ead82 100644 --- a/app/views/projects/index.html.haml +++ b/app/views/projects/index.html.haml @@ -1,8 +1,9 @@ +- content_for(:body_class, "projects-page") - content_for(:page_title) do - .grid-4 - %h2.icon - - if current_user.can_create_project? - %a.grey-button.right{:href => new_project_path} Create new project + .grid_4 + - if current_user.can_create_project? + %a.grey-button.right{:href => new_project_path} Create new project + %h2.icon %span Projects From 0903932320073e3e5120faae523e00a94709a95a Mon Sep 17 00:00:00 2001 From: gitlabhq Date: Tue, 1 Nov 2011 11:22:16 +0200 Subject: [PATCH 17/26] updated --- app/controllers/commits_controller.rb | 1 + app/controllers/snippets_controller.rb | 1 + app/controllers/team_members_controller.rb | 1 + app/views/layouts/project.html.haml | 50 +++++++++++----------- 4 files changed, 28 insertions(+), 25 deletions(-) diff --git a/app/controllers/commits_controller.rb b/app/controllers/commits_controller.rb index 83071891..79b97ed7 100644 --- a/app/controllers/commits_controller.rb +++ b/app/controllers/commits_controller.rb @@ -2,6 +2,7 @@ require "base64" class CommitsController < ApplicationController before_filter :project + layout "project" # Authorize before_filter :add_project_abilities diff --git a/app/controllers/snippets_controller.rb b/app/controllers/snippets_controller.rb index d9a6ab2a..54ad6019 100644 --- a/app/controllers/snippets_controller.rb +++ b/app/controllers/snippets_controller.rb @@ -1,6 +1,7 @@ class SnippetsController < ApplicationController before_filter :authenticate_user! before_filter :project + layout "project" # Authorize before_filter :add_project_abilities diff --git a/app/controllers/team_members_controller.rb b/app/controllers/team_members_controller.rb index 48e7e9b9..8a4e32e5 100644 --- a/app/controllers/team_members_controller.rb +++ b/app/controllers/team_members_controller.rb @@ -1,5 +1,6 @@ class TeamMembersController < ApplicationController before_filter :project + layout "project" # Authorize before_filter :add_project_abilities diff --git a/app/views/layouts/project.html.haml b/app/views/layouts/project.html.haml index 68f973dc..acf57bd1 100644 --- a/app/views/layouts/project.html.haml +++ b/app/views/layouts/project.html.haml @@ -14,32 +14,32 @@ #container = render :partial => "layouts/flash" = render :partial => "layouts/head_panel" - = render :partial => "layouts/page_title" .project-container - .project-sidebar.grid_1 - %input.git-url.text{:id => "", :name => "", :readonly => "", :type => "text", :value => @project.url_to_repo} - %aside - = link_to image_tag("home.png", :width => 20), project_path(@project), :class => current_page?(:controller => "projects", :action => "show", :id => @project) ? "current" : nil - = link_to "Tree", tree_project_path(@project), :class => current_page?(:controller => "projects", :action => "tree", :id => @project) ? "current" : nil - = link_to "Commits", project_commits_path(@project), :class => current_page?(:controller => "commits", :action => "index", :project_id => @project) ? "current" : nil - = link_to team_project_path(@project), :class => (current_page?(:controller => "projects", :action => "team", :id => @project) || controller.controller_name == "team_members") ? "current" : nil do - Team - - if @project.users_projects.count > 0 - %span{ :class => "top_menu_count" }= @project.users_projects.count - = link_to project_issues_path(@project), :class => (controller.controller_name == "issues") ? "current" : nil do - Issues - - if @project.issues.opened.count > 0 - %span{ :class => "top_menu_count" }= @project.issues.opened.count - = link_to wall_project_path(@project), :class => current_page?(:controller => "projects", :action => "wall", :id => @project) ? "current" : nil do - Wall - - if @project.common_notes.count > 0 - %span{ :class => "top_menu_count" }= @project.common_notes.count - = link_to project_snippets_path(@project), :class => (controller.controller_name == "snippets") ? "current" : nil do - Snippets - - if @project.snippets.count > 0 - %span{ :class => "top_menu_count" }= @project.snippets.non_expired.count - - if @commit - = link_to truncate(commit_name(@project,@commit), :length => 15), project_commit_path(@project, :id => @commit.id), :class => current_page?(:controller => "commits", :action => "show", :project_id => @project, :id => @commit.id) ? "current" : nil + .project-sidebar + .fixed + %input.git-url.text{:id => "", :name => "", :readonly => "", :type => "text", :value => @project.url_to_repo} + %aside + = link_to image_tag("home.png", :width => 20), project_path(@project), :class => current_page?(:controller => "projects", :action => "show", :id => @project) ? "current" : nil + = link_to "Tree", tree_project_path(@project), :class => current_page?(:controller => "projects", :action => "tree", :id => @project) ? "current" : nil + = link_to "Commits", project_commits_path(@project), :class => current_page?(:controller => "commits", :action => "index", :project_id => @project) ? "current" : nil + = link_to team_project_path(@project), :class => (current_page?(:controller => "projects", :action => "team", :id => @project) || controller.controller_name == "team_members") ? "current" : nil do + Team + - if @project.users_projects.count > 0 + %span{ :class => "top_menu_count" }= @project.users_projects.count + = link_to project_issues_path(@project), :class => (controller.controller_name == "issues") ? "current" : nil do + Issues + - if @project.issues.opened.count > 0 + %span{ :class => "top_menu_count" }= @project.issues.opened.count + = link_to wall_project_path(@project), :class => current_page?(:controller => "projects", :action => "wall", :id => @project) ? "current" : nil do + Wall + - if @project.common_notes.count > 0 + %span{ :class => "top_menu_count" }= @project.common_notes.count + = link_to project_snippets_path(@project), :class => (controller.controller_name == "snippets") ? "current" : nil do + Snippets + - if @project.snippets.count > 0 + %span{ :class => "top_menu_count" }= @project.snippets.non_expired.count + - if @commit + = link_to truncate(commit_name(@project,@commit), :length => 15), project_commit_path(@project, :id => @commit.id), :class => current_page?(:controller => "commits", :action => "show", :project_id => @project, :id => @commit.id) ? "current" : nil .project-content From 84397ce88c09d30e14fef5d8e6a6e559ae0dcb7c Mon Sep 17 00:00:00 2001 From: gitlabhq Date: Tue, 1 Nov 2011 12:48:26 +0200 Subject: [PATCH 18/26] commits page --- app/assets/stylesheets/projects.css.scss | 48 ------------------------ app/views/commits/_commits.html.haml | 41 ++++++++++---------- app/views/commits/index.html.haml | 1 + app/views/layouts/project.html.haml | 12 +++--- 4 files changed, 29 insertions(+), 73 deletions(-) diff --git a/app/assets/stylesheets/projects.css.scss b/app/assets/stylesheets/projects.css.scss index e5184a7e..418a6e82 100644 --- a/app/assets/stylesheets/projects.css.scss +++ b/app/assets/stylesheets/projects.css.scss @@ -102,54 +102,6 @@ table.round-borders { float:left; } -.day-commits-table { - @include round-borders-all(4px); - padding: 4px 0px; - margin-bottom:10px; - display:block; - width:100%; - background: #E6F1F6; - - .day-header { - padding:10px; - h3 { - margin:0px; - } - } - - ul { - display:block; - list-style:none; - margin:0px; - padding:0px; - - li.commit { - display:list-item; - padding:8px; - margin:0px; - background: #F7FBFC; - border-top: 1px solid #E2EAEE; - - &:first-child { - border-top: 1px solid #E2EAEE; - } - &:nth-child(2n+1) { - background: white; - } - - a.button { - width:85px; - padding:10px; - margin:0px; - float:right; - } - p { - margin-bottom: 3px; - font-size: 13px; - } - } - } -} @mixin panel-color { background: #111 !important; background: -webkit-gradient(linear,left top,left bottom,from(#333),to(#111)) !important; diff --git a/app/views/commits/_commits.html.haml b/app/views/commits/_commits.html.haml index 99823065..36225d37 100644 --- a/app/views/commits/_commits.html.haml +++ b/app/views/commits/_commits.html.haml @@ -1,22 +1,25 @@ - @commits.group_by { |c| c.committed_date.to_date }.each do |day, commits| - .day-commits-table - .day-header + %div{ :class => "commits-date ui-box ui-box-small ui-box-big" } + .day-commits-table %h3= day.stamp("28 Aug, 2010") - %ul - - commits.each do |commit| - %li{ :class => "commit", :url => project_commit_path(@project, :id => commit.id) } - - if commit.author.email - = image_tag gravatar_icon(commit.author.email), :class => "left", :width => 40, :style => "padding-right:5px;" - - else - = image_tag "no_avatar.png", :class => "left", :width => 40, :style => "padding-right:5px;" - %p - %strong - = truncate(commit.safe_message, :length => 60) - = link_to "Browse Code", tree_project_path(@project, :commit_id => commit.id), :class => "lite_button", :style => "float:right" - = link_to truncate(commit.id.to_s, :length => 16), project_commit_path(@project, :id => commit.id), :class => "lite_button", :style => "width:120px;float:right" - %span - %span.author - = commit.author - = time_ago_in_words(commit.committed_date) - ago + .data + - commits.each do |commit| + %a{ :class => "commit", :href => project_commit_path(@project, :id => commit.id) } + %span.commit-info + %data.commit-button + = truncate(commit.id.to_s, :length => 16) + %i + %data.commit-browse{ :onclick => "location.href='#{tree_project_path(@project, :commit_id => commit.id)}';return false;"} + Browse Code + - if commit.author.email + = image_tag gravatar_icon(commit.author.email), :class => "left", :width => 40, :style => "padding-right:5px;" + - else + = image_tag "no_avatar.png", :class => "left", :width => 40, :style => "padding-right:5px;" + %span.commit-title + %strong + = truncate(commit.safe_message, :length => 60) + %span.commit-author + %strong= commit.author + = time_ago_in_words(commit.committed_date) + ago = more_commits_link if @commits.size > 99 diff --git a/app/views/commits/index.html.haml b/app/views/commits/index.html.haml index 452e13f8..92a382a9 100644 --- a/app/views/commits/index.html.haml +++ b/app/views/commits/index.html.haml @@ -1,3 +1,4 @@ +- content_for(:body_class, "project-page commits-page") %div %h3 .left diff --git a/app/views/layouts/project.html.haml b/app/views/layouts/project.html.haml index acf57bd1..619952f1 100644 --- a/app/views/layouts/project.html.haml +++ b/app/views/layouts/project.html.haml @@ -10,7 +10,7 @@ = javascript_tag do REQ_URI = "#{request.env["REQUEST_URI"]}"; REQ_REFFER = "#{request.env["HTTP_REFERER"]}"; - %body.project-page + %body{ :class => content_for?(:body_class) ? yield(:body_class) : 'project-page', :id => yield(:boyd_id)} #container = render :partial => "layouts/flash" = render :partial => "layouts/head_panel" @@ -19,25 +19,25 @@ .fixed %input.git-url.text{:id => "", :name => "", :readonly => "", :type => "text", :value => @project.url_to_repo} %aside - = link_to image_tag("home.png", :width => 20), project_path(@project), :class => current_page?(:controller => "projects", :action => "show", :id => @project) ? "current" : nil + = link_to "History", project_path(@project), :class => current_page?(:controller => "projects", :action => "show", :id => @project) ? "current" : nil = link_to "Tree", tree_project_path(@project), :class => current_page?(:controller => "projects", :action => "tree", :id => @project) ? "current" : nil = link_to "Commits", project_commits_path(@project), :class => current_page?(:controller => "commits", :action => "index", :project_id => @project) ? "current" : nil = link_to team_project_path(@project), :class => (current_page?(:controller => "projects", :action => "team", :id => @project) || controller.controller_name == "team_members") ? "current" : nil do Team - if @project.users_projects.count > 0 - %span{ :class => "top_menu_count" }= @project.users_projects.count + %span{ :class => "number" }= @project.users_projects.count = link_to project_issues_path(@project), :class => (controller.controller_name == "issues") ? "current" : nil do Issues - if @project.issues.opened.count > 0 - %span{ :class => "top_menu_count" }= @project.issues.opened.count + %span{ :class => "number" }= @project.issues.opened.count = link_to wall_project_path(@project), :class => current_page?(:controller => "projects", :action => "wall", :id => @project) ? "current" : nil do Wall - if @project.common_notes.count > 0 - %span{ :class => "top_menu_count" }= @project.common_notes.count + %span{ :class => "number" }= @project.common_notes.count = link_to project_snippets_path(@project), :class => (controller.controller_name == "snippets") ? "current" : nil do Snippets - if @project.snippets.count > 0 - %span{ :class => "top_menu_count" }= @project.snippets.non_expired.count + %span{ :class => "number" }= @project.snippets.non_expired.count - if @commit = link_to truncate(commit_name(@project,@commit), :length => 15), project_commit_path(@project, :id => @commit.id), :class => current_page?(:controller => "commits", :action => "show", :project_id => @project, :id => @commit.id) ? "current" : nil From e8d10b321716154421a0642e4d9f48d00c3aa56b Mon Sep 17 00:00:00 2001 From: gitlabhq Date: Tue, 1 Nov 2011 13:17:36 +0200 Subject: [PATCH 19/26] issues fix layout --- app/assets/stylesheets/projects.css.scss | 13 +++++++++++++ app/views/issues/show.html.haml | 4 ++-- app/views/projects/show.html.haml | 4 ++-- 3 files changed, 17 insertions(+), 4 deletions(-) diff --git a/app/assets/stylesheets/projects.css.scss b/app/assets/stylesheets/projects.css.scss index 418a6e82..e60dc701 100644 --- a/app/assets/stylesheets/projects.css.scss +++ b/app/assets/stylesheets/projects.css.scss @@ -660,3 +660,16 @@ tbody tr:nth-child(2n) td, tbody tr.even td { .right { float:right; } + +.width-50p{ + width:50%; +} +.width-49p{ + width:49%; +} +.width-30p{ + width:30%; +} +.width-65p{ + width:65%; +} diff --git a/app/views/issues/show.html.haml b/app/views/issues/show.html.haml index c6105283..371a8033 100644 --- a/app/views/issues/show.html.haml +++ b/app/views/issues/show.html.haml @@ -1,9 +1,9 @@ %h2 = "Issue ##{@issue.id} - #{html_escape(@issue.title)}" -.span-15 +.left.width-65p -#= simple_format html_escape(@issue.content) .issue_notes= render "notes/notes" -.span-8.right +.right.width-30p .span-8 - if @issue.closed %center.success Closed diff --git a/app/views/projects/show.html.haml b/app/views/projects/show.html.haml index 56621785..ff352437 100644 --- a/app/views/projects/show.html.haml +++ b/app/views/projects/show.html.haml @@ -13,11 +13,11 @@ = label_tag "week_view","Week" .clear %hr -.span-11 +.left.width-49p %h3 Commits =render "projects/recent_commits" -.span-11.right +.right.width-49p %h3 Talk =render "projects/recent_messages" From 82d16ccfd189f5bdc65090ac7af1d4eef1f1774e Mon Sep 17 00:00:00 2001 From: gitlabhq Date: Tue, 1 Nov 2011 22:11:24 +0200 Subject: [PATCH 20/26] commits + tree in progress --- app/assets/stylesheets/projects.css.scss | 41 ++++++++++++++--- app/views/commits/index.html.haml | 45 +++++++++++++------ app/views/issues/_issues.html.haml | 2 +- app/views/layouts/_page_title.html.haml | 5 --- app/views/layouts/project.html.haml | 1 - app/views/projects/_team.html.haml | 2 +- app/views/projects/_tree.html.haml | 56 +++++++++++++++--------- 7 files changed, 104 insertions(+), 48 deletions(-) diff --git a/app/assets/stylesheets/projects.css.scss b/app/assets/stylesheets/projects.css.scss index 66db914a..d8e04318 100644 --- a/app/assets/stylesheets/projects.css.scss +++ b/app/assets/stylesheets/projects.css.scss @@ -335,11 +335,6 @@ input.ssh_project_url { border-width: 1px; } -tbody tr:nth-child(2n) td, tbody tr.even td { - background: none repeat scroll 0 0 #F7FBFC; - border-top: 1px solid #E2EAEE; - border-bottom: 1px solid #E2EAEE; -} .top_menu_count { background: none repeat scroll 0 0 white; @@ -672,6 +667,42 @@ tbody tr:nth-child(2n) td, tbody tr.even td { } .width-65p{ width:65%; +} pre.commit_message { white-space: pre-wrap; } + +#container { + min-height:100%; +} +.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; + } +} + +td.code { + width: 100%; + .highlight { + margin-left: 55px; + overflow:auto; + overflow-y:hidden; + } +} +.highlight pre { + white-space: pre; + word-wrap:normal; +} + +.highlighttable tr:hover { + background:white; +} +table.highlighttable pre{ + line-height:16px !important; + font-size:12px !important; +} diff --git a/app/views/commits/index.html.haml b/app/views/commits/index.html.haml index 92a382a9..f8928b6f 100644 --- a/app/views/commits/index.html.haml +++ b/app/views/commits/index.html.haml @@ -1,16 +1,33 @@ - content_for(:body_class, "project-page commits-page") -%div - %h3 - .left - = form_tag project_commits_path(@project), :method => :get do - = select_tag "branch", options_for_select(@repo.heads.map(&:name), @branch), :onchange => "this.form.submit();", :class => "", :prompt => "Branches" -   - .left.prepend-1 - = form_tag project_commits_path(@project), :method => :get do - = select_tag "tag", options_for_select(@project.tags, @tag), :onchange => "this.form.submit();", :class => "", :prompt => "Tags" - = text_field_tag "ssh", @project.url_to_repo, :class => ["ssh_project_url", "one_click_select"] - .clear + +.left + = form_tag project_commits_path(@project), :method => :get do + = select_tag "branch", options_for_select(@repo.heads.map(&:name), @branch), :onchange => "this.form.submit();", :class => "", :prompt => "Branches" +.left + = form_tag project_commits_path(@project), :method => :get do + = select_tag "tag", options_for_select(@project.tags, @tag), :onchange => "this.form.submit();", :class => "", :prompt => "Tags" +.clear + +%br + + +-#%a.right.button{:href => "#"} Download +-#-if can? current_user, :admin_project, @project + %a.right.button.blue{:href => "#"} EDIT +%h2.icon + %span + %a.project-name{:href => "#"} + %i.arrow> + Project +   + %d + %a{:href => "#"} + = @ref - if params[:path] - %h3{:style => "color:#555"} /#{params[:path]} - %div{:id => dom_id(@project)} - = render "commits" +   + %d + %a{:href => "#"}= params[:path].split("/").join(" / ") + + +%div{:id => dom_id(@project)} + = render "commits" diff --git a/app/views/issues/_issues.html.haml b/app/views/issues/_issues.html.haml index 11e4c38e..a6a38e69 100644 --- a/app/views/issues/_issues.html.haml +++ b/app/views/issues/_issues.html.haml @@ -1,5 +1,5 @@ %table.round-borders#issues-table - %tr + %thead - if can?(current_user, :admin_issue, @project) && !params[:f] || params[:f] == "0" %th %th Assignee diff --git a/app/views/layouts/_page_title.html.haml b/app/views/layouts/_page_title.html.haml index ec8fa89d..ea72b25a 100644 --- a/app/views/layouts/_page_title.html.haml +++ b/app/views/layouts/_page_title.html.haml @@ -1,7 +1,2 @@ - if content_for?(:page_title) = yield :page_title -- else - .grid_4 - .container_3 - %h2.icon - %span= controller.controller_name.capitalize diff --git a/app/views/layouts/project.html.haml b/app/views/layouts/project.html.haml index 619952f1..b4b51631 100644 --- a/app/views/layouts/project.html.haml +++ b/app/views/layouts/project.html.haml @@ -41,6 +41,5 @@ - if @commit = link_to truncate(commit_name(@project,@commit), :length => 15), project_commit_path(@project, :id => @commit.id), :class => current_page?(:controller => "commits", :action => "show", :project_id => @project, :id => @commit.id) ? "current" : nil - .project-content = yield diff --git a/app/views/projects/_team.html.haml b/app/views/projects/_team.html.haml index 4001c7a2..d12ccac7 100644 --- a/app/views/projects/_team.html.haml +++ b/app/views/projects/_team.html.haml @@ -2,7 +2,7 @@ %div#new-member-holder = link_to "Add new", new_project_team_member_path(@project), :remote => true, :class => "lbutton vm" %table.round-borders#team-table - %tr + %thead %th Name %th Email %th Web diff --git a/app/views/projects/_tree.html.haml b/app/views/projects/_tree.html.haml index 11b04a3b..2aca18e4 100644 --- a/app/views/projects/_tree.html.haml +++ b/app/views/projects/_tree.html.haml @@ -1,31 +1,45 @@ -%h3 - .left - = form_tag tree_project_path(@project), :method => :get do - = select_tag "branch", options_for_select(@repo.heads.map(&:name), @branch), :onchange => "this.form.submit();", :class => "", :prompt => "Branches" -   - .left.prepend-1 - = form_tag tree_project_path(@project), :method => :get do - = select_tag "tag", options_for_select(@project.tags, @tag), :onchange => "this.form.submit();", :class => "", :prompt => "Tags" - = text_field_tag "ssh", @project.url_to_repo, :class => ["ssh_project_url","one_click_select"] - .clear +.left + = form_tag tree_project_path(@project), :method => :get do + = select_tag "branch", options_for_select(@repo.heads.map(&:name), @branch), :onchange => "this.form.submit();", :class => "", :prompt => "Branches" +.left + = form_tag tree_project_path(@project), :method => :get do + = select_tag "tag", options_for_select(@project.tags, @tag), :onchange => "this.form.submit();", :class => "", :prompt => "Tags" +.clear + +%br + +-#%a.right.button{:href => "#"} Download +-#-if can? current_user, :admin_project, @project + %a.right.button.blue{:href => "#"} EDIT +#tree-breadcrumbs + %h2.icon + %span + = link_to tree_project_path(@project, :path => nil, :commit_id => @commit.try(:id)), :remote => true, :class => 'project-name' do + %i.arrow> + = @project.name +   + %d + %a{:href => "#"} + = @ref + + - if params[:path] + - part_path = "" + - params[:path].split("\/").each do |part| + - part_path = File.join(part_path, part) unless part_path.empty? + - if part_path.empty? + - part_path = part + \/ + = link_to truncate(part, :length => 40), tree_file_project_path(@project, :path => part_path, :commit_id => @commit.try(:id), :branch => @branch, :tag => @tag), :remote => :true + +.clear -%h3#tree-breadcrumbs - = link_to @project.name, tree_project_path(@project, :path => nil, :commit_id => @commit.try(:id)), :remote => true - - if params[:path] - - part_path = "" - - params[:path].split("\/").each do |part| - - part_path = File.join(part_path, part) unless part_path.empty? - - if part_path.empty? - - part_path = part - \/ - = link_to truncate(part, :length => 40), tree_file_project_path(@project, :path => part_path, :commit_id => @commit.try(:id), :branch => @branch, :tag => @tag), :remote => :true #tree-content-holder - if tree.is_a?(Grit::Blob) = render :partial => "projects/tree_file", :locals => { :name => tree.name, :content => tree.data, :file => tree } - else - contents = tree.contents %table#tree-slider.round-borders - %tr + %thead %th Name %th Last Update %th From 5e12f10c142ca5add14e5c752cf9ef6d88c4dfd8 Mon Sep 17 00:00:00 2001 From: gitlabhq Date: Tue, 1 Nov 2011 22:51:20 +0200 Subject: [PATCH 21/26] fixes --- app/views/layouts/_head_panel.html.erb | 6 +- app/views/layouts/devise.html.haml | 3 +- spec/requests/issues_spec.rb | 93 +++++++++++++------ spec/requests/projects_spec.rb | 4 +- spec/support/login.rb | 8 +- .../stylesheets/jquery-ui/jquery-ui.css | 2 +- 6 files changed, 78 insertions(+), 38 deletions(-) diff --git a/app/views/layouts/_head_panel.html.erb b/app/views/layouts/_head_panel.html.erb index e6f36e3f..590e16a2 100644 --- a/app/views/layouts/_head_panel.html.erb +++ b/app/views/layouts/_head_panel.html.erb @@ -10,7 +10,10 @@ <%= current_user.name %> <% end %> <%= link_to 'Logout', destroy_user_session_path, :class => "logout", :method => :delete %> -
+
+ diff --git a/spec/models/project_spec.rb b/spec/models/project_spec.rb index 7bce57e8..bd83bc80 100644 --- a/spec/models/project_spec.rb +++ b/spec/models/project_spec.rb @@ -62,6 +62,51 @@ describe Project do end end + describe "updates" do + let(:project) { Factory :project } + + before do + @issue = Factory :issue, + :project => project, + :author => Factory(:user), + :assignee => Factory(:user) + + @note = Factory :note, + :project => project, + :author => Factory(:user) + + @commit = project.fresh_commits(1).first + end + + describe "return commit, note & issue" do + it { project.updates(3).count.should == 3 } + it { project.updates(3).last.id.should == @commit.id } + it { project.updates(3).include?(@issue).should be_true } + it { project.updates(3).include?(@note).should be_true } + end + end + + describe "last_activity" do + let(:project) { Factory :project } + + before do + @note = Factory :note, + :project => project, + :author => Factory(:user) + end + + it { project.last_activity.should == @note } + it { project.last_activity_date.to_s.should == @note.created_at.to_s } + end + + describe "fresh commits" do + let(:project) { Factory :project } + + it { project.fresh_commits(3).count.should == 3 } + it { project.fresh_commits.first.id.should == "2fb376f61875b58bceee0492e270e9c805294b1a" } + it { project.fresh_commits.last.id.should == "0dac878dbfe0b9c6104a87d65fe999149a8d862c" } + end + describe "Git methods" do let(:project) { Factory :project } diff --git a/spec/requests/dashboard_spec.rb b/spec/requests/dashboard_spec.rb new file mode 100644 index 00000000..6940366a --- /dev/null +++ b/spec/requests/dashboard_spec.rb @@ -0,0 +1,30 @@ +require 'spec_helper' + +describe "Dashboard" do + before { login_as :user } + + describe "GET /dashboard" do + before do + @project = Factory :project + @project.add_access(@user, :read, :write) + visit dashboard_path + end + + it "should be on dashboard page" do + current_path.should == dashboard_path + end + + it "should have projects panel" do + within ".project-list" do + page.should have_content(@project.name) + end + end + + it "should have news feed" do + within "#news-feed" do + page.should have_content(@project.commit.author.name) + page.should have_content(@project.commit.safe_message) + end + end + end +end diff --git a/spec/requests/issues_spec.rb b/spec/requests/issues_spec.rb index 0ff70308..b5d6f1bc 100644 --- a/spec/requests/issues_spec.rb +++ b/spec/requests/issues_spec.rb @@ -105,11 +105,6 @@ describe "Issues" do Notify.should_not_receive(:new_issue_email) click_button "Save" end - - it "should send valid email to user with email & password" do - click_button "Save" - ActionMailer::Base.deliveries.last.should be_nil - end end describe 'assign to other' do From 3abd977822247581465ff6d6df52d2c08e8da508 Mon Sep 17 00:00:00 2001 From: gitlabhq Date: Thu, 3 Nov 2011 06:56:26 -0400 Subject: [PATCH 25/26] fixed error with ascii error for dashboard --- app/models/issue.rb | 5 +++++ app/models/note.rb | 5 +++++ app/views/commits/_commits.html.haml | 6 +++--- app/views/commits/show.html.haml | 2 +- app/views/dashboard/index.html.haml | 4 ++-- lib/commit_ext.rb | 8 ++++++++ 6 files changed, 24 insertions(+), 6 deletions(-) diff --git a/app/models/issue.rb b/app/models/issue.rb index 9fb7ef30..f649cacb 100644 --- a/app/models/issue.rb +++ b/app/models/issue.rb @@ -10,6 +10,11 @@ class Issue < ActiveRecord::Base validates_presence_of :assignee_id validates_presence_of :author_id + delegate :name, + :email, + :to => :author, + :prefix => true + validates :title, :presence => true, :length => { :within => 0..255 } diff --git a/app/models/note.rb b/app/models/note.rb index 645bc7ce..3c59efef 100644 --- a/app/models/note.rb +++ b/app/models/note.rb @@ -7,6 +7,11 @@ class Note < ActiveRecord::Base belongs_to :author, :class_name => "User" + delegate :name, + :email, + :to => :author, + :prefix => true + attr_protected :author, :author_id validates_presence_of :project diff --git a/app/views/commits/_commits.html.haml b/app/views/commits/_commits.html.haml index 36225d37..9761c65f 100644 --- a/app/views/commits/_commits.html.haml +++ b/app/views/commits/_commits.html.haml @@ -11,15 +11,15 @@ %i %data.commit-browse{ :onclick => "location.href='#{tree_project_path(@project, :commit_id => commit.id)}';return false;"} Browse Code - - if commit.author.email - = image_tag gravatar_icon(commit.author.email), :class => "left", :width => 40, :style => "padding-right:5px;" + - if commit.author_email + = image_tag gravatar_icon(commit.author_email), :class => "left", :width => 40, :style => "padding-right:5px;" - else = image_tag "no_avatar.png", :class => "left", :width => 40, :style => "padding-right:5px;" %span.commit-title %strong = truncate(commit.safe_message, :length => 60) %span.commit-author - %strong= commit.author + %strong= commit.author_name = time_ago_in_words(commit.committed_date) ago = more_commits_link if @commits.size > 99 diff --git a/app/views/commits/show.html.haml b/app/views/commits/show.html.haml index 3227a447..3bd9145e 100644 --- a/app/views/commits/show.html.haml +++ b/app/views/commits/show.html.haml @@ -7,7 +7,7 @@ %td= @commit.id %tr %td Author - %td= @commit.author + %td= @commit.author_name %tr %td Commiter %td= @commit.committer diff --git a/app/views/dashboard/index.html.haml b/app/views/dashboard/index.html.haml index 761826ca..eb2122df 100644 --- a/app/views/dashboard/index.html.haml +++ b/app/views/dashboard/index.html.haml @@ -25,11 +25,11 @@ .data - project.updates.each do |update| %a.project-update{:href => dashboard_feed_path(project, update)} - = image_tag gravatar_icon(update.author.email), :class => "left", :width => 40 + = image_tag gravatar_icon(update.author_email), :class => "left", :width => 40 %span.update-title = dashboard_feed_title(update) %span.update-author - %strong= update.author.name + %strong= update.author_name authored = time_ago_in_words(update.created_at) ago diff --git a/lib/commit_ext.rb b/lib/commit_ext.rb index 32706acb..db650355 100644 --- a/lib/commit_ext.rb +++ b/lib/commit_ext.rb @@ -12,4 +12,12 @@ module CommitExt def created_at committed_date end + + def author_email + author.email.force_encoding(Encoding::UTF_8) + end + + def author_name + author.name.force_encoding(Encoding::UTF_8) + end end From 5c9cb850fcfb7aef6fc595210a11be71c364b2ba Mon Sep 17 00:00:00 2001 From: gitlabhq Date: Thu, 3 Nov 2011 07:00:16 -0400 Subject: [PATCH 26/26] dashboard is now root path --- config/routes.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/config/routes.rb b/config/routes.rb index bac472a2..d45c32bd 100644 --- a/config/routes.rb +++ b/config/routes.rb @@ -54,5 +54,5 @@ Gitlab::Application.routes.draw do end resources :notes, :only => [:create, :destroy] end - root :to => "projects#index" + root :to => "dashboard#index" end