From ca560b10f2458b400d4100189f81a6d2d96460dc Mon Sep 17 00:00:00 2001 From: Simon Rozet Date: Sat, 20 Sep 2008 19:38:24 +0200 Subject: [PATCH] indicates building? on homepage [#24 state:resolved] --- lib/integrity/ui/public/spinner.gif | Bin 0 -> 2306 bytes lib/integrity/ui/views/home.haml | 2 +- lib/integrity/ui/views/integrity.sass | 5 ++++- spec/ui_spec.rb | 9 +++++++-- 4 files changed, 12 insertions(+), 4 deletions(-) create mode 100644 lib/integrity/ui/public/spinner.gif diff --git a/lib/integrity/ui/public/spinner.gif b/lib/integrity/ui/public/spinner.gif new file mode 100644 index 0000000000000000000000000000000000000000..9a08feb74ad36e41313e65e163f282fb0cc47916 GIT binary patch literal 2306 zcmeH``BM{V8pq#st_}$ygn*$yw!`)S%8VSQb`zD^4iJ(sECnpH9*Zn;tccbERz^`r ztCJ4r0ydW-me@c*RMdd+Kv5IUpiwy#QBlJoqN2s@>@i#WgB$0l(ckySdH;a-^E{vD z`&DUTWb!QnAOQa+!P~cQ-@JKKSy|c8(6G3;*x1(hUcDko(rh-rc=5t$G*(wvTP&8AmX?<C>H^ zowc>Kj~_qo?d?5({(MtY)5()3uU@@+^yty~`T2tf4;B>_<>chFwY61MRdscBUA%bl z&Ye4_PMvCPZQZ+fuS%sF92}%5s-vT0U|?YP?%mg~U%z+nURqjOSy|cs{reLW6YJ~i zo12^S^YbrUxL~*2Z{EB)G&E!~nWm4bt@tw;@Y)qj~+d8 zcXzL-sL063aB*=Fi^ccv-+%b;6kY;JDu_U+rVv$NZ`Z@+ToN>5Kue}8{*aq+u%@4zqb|7Sq*jvKE` z{zH@^K^eX(lumR0Ecp+E$pj?$^gZQ$O#o~IG}sq*=sol>?bA^!49et?(ynf&#kqmh zw}3P&{&)<;4hG1AmPO)XQ8LdzVU9&-MZc7AC_0w|RP}!^k>>vas~a{ZW*b z?kMzdU)iHkI{?8_{;_jDNxdvbmFa9IhOec{0z3eO?QRFm5 zQVN|MsaQhtR6fKqB!2@<6YaufF(+k|s^ka+xp8V8y%5(gVCTX@{z#h8J5hK+B*U$C z0@H?;hIvFC4$0HnGryT{vxIE;hg}poU@4Vv`peif7>-8NAD$ToG^b#`bJb126Vs#V zH!-z0q7hi;9RLkn!%G3Bwi=qpZwhET1zXC{uh&dukA8!c`K;fijcb~{TR{kmY7OR3 zz7X+9sdfa~2E?Icx?n}r7NnerFxjPfssZZgdtj25G@lAF=NzNX1_oT>r177Lc$h=9!31mR&{mYQb~oyF9}iV znr&1KMLO<<)<^ONKfuue(`l9aQ-IVaXR}}pj@d{HjpbSv>bsz@0x>xmYStMjuOe+y zG7dBb+RB5xIMWCtsUcuJW2So?lz2$Pv$3%eH6jWln>%!K%9uJ`&Q!b3I9rabl)yrP zjTr9#fct~f_rcxlyyqr~%6U)!SaAxNr7WNL@K$xvZ4x6FO2u|&u$e~DT4bA8uLmWb zemQeGvxMs^O0*dl=p2Gh{Mm@jbTX4zs{{B4WZ$xq%Kb=qYBD3y!9lz}t_thN$Zm8- zb`f_bh**(no9unzum)^4Yqu?oG#&rk(`^u#+x(fjWYZL0n<+qfxu3i2AXsB;?+{i& zVhg)CYWY{lmtu{imqBpb&EbKa4Qhr!wsF(iR0ghieXPh#K6kN~R-y0WksbfGH%$}Vi>zfP9 zpkFc2xoM`bkVodAJ;G|8zK)Dck%?Q!2+!8`N8f08@v&L`7AH(^*(`ehdu_ zT#<(*^`U>OA=v+2k`>Iv@Iv cycle("even", "odd") } + %li{ :class => cycle("even", "odd") + (project.building? ? ' building' : '') } %a{ :href => project_url(project) }&= project.name %p#new %a{ :href => "/new" } Add a new project diff --git a/lib/integrity/ui/views/integrity.sass b/lib/integrity/ui/views/integrity.sass index 493a3943..34d44195 100644 --- a/lib/integrity/ui/views/integrity.sass +++ b/lib/integrity/ui/views/integrity.sass @@ -200,12 +200,15 @@ a :border-bottom = 1px solid !rule_color &.odd :background = !content_bg - #080808 + &.building + :background transparent url(/spinner.gif) no-repeat scroll right a :font-size 2em :padding .25em :line-height 1.2 :font-weight bold :display block + #previous_builds li @@ -325,4 +328,4 @@ a :color #666 :text-align right strong - :font-weight bold \ No newline at end of file + :font-weight bold diff --git a/spec/ui_spec.rb b/spec/ui_spec.rb index 22eeb68e..7c62e17c 100644 --- a/spec/ui_spec.rb +++ b/spec/ui_spec.rb @@ -82,8 +82,8 @@ def provide_valid_credentials! describe "with available projects" do before do - @project_1 = stub("project", :name => "The 1st Project", :permalink => "the-1st-project") - @project_2 = stub("project", :name => "The 2nd Project", :permalink => "the-2nd-project") + @project_1 = stub("project", :name => "The 1st Project", :permalink => "the-1st-project", :building? => true) + @project_2 = stub("project", :name => "The 2nd Project", :permalink => "the-2nd-project", :building? => false) Project.stub!(:all).and_return([@project_1, @project_2]) end @@ -110,6 +110,11 @@ def provide_valid_credentials! end end + it 'should mark projects being built as such' do + get_it '/' + body.should have_tag('#projects li[@class~="building"]', :count => 1) + end + it "should have a link to add a new project" do get_it "/" body.should have_tag("#new a[@href=/new]", /add a new project/i)