From a36f3558dd43dd5a598e36dd21fd5f7d2b4a94f5 Mon Sep 17 00:00:00 2001 From: Saman Bemel-Benrud Date: Thu, 3 Jan 2013 11:20:32 +0000 Subject: [PATCH] Site cleanup I set out to do a quick and dirty typography overhaul to make things more consistent and a bit cleaner, but I kept running into things I didn't like, so this lead me down something of a rabbit hole of design tweaks to the OSM site. Goals here are to have better content hierarchy, better vertical rhythm, more consistent UI, cleaner markup with less tables, all while keeping the basics pretty much intact. There are a lot of things I didn't touch even though they need to be updated (lots of tables where stuff shouldn't be tables, mostly). Basic overview of changes: I added a new persistent header that helps segment pages. It's now a lot easier to know what you're looking at. The header has a page title, a description, plus a submenu of actions. There is now a pattern of 20px/10px margins and padding for more rhythm and breathing room throughout the site. I know there are other problems here or things I've missed - would love another set of eyes to look over this! I am still getting comfortable working on the site - it's my first time ever digging into a ruby or rails so I'm not familiar with the templating language yet. --- app/assets/images/RSS.gif | Bin 652 -> 0 bytes app/assets/images/RSS.png | Bin 0 -> 296 bytes app/assets/images/RSS.svg | 84 ++ app/assets/images/color-palette.svg | 151 +++ app/assets/images/new.png | Bin 991 -> 127 bytes app/assets/images/new.svg | 73 + app/assets/images/notice.png | Bin 0 -> 227 bytes app/assets/images/notice.svg | 73 + app/assets/images/roles/administrator.png | Bin 910 -> 339 bytes app/assets/images/roles/administrator.svg | 60 + .../images/roles/blank_administrator.png | Bin 824 -> 449 bytes .../images/roles/blank_administrator.svg | 89 ++ app/assets/images/roles/blank_moderator.png | Bin 839 -> 403 bytes app/assets/images/roles/blank_moderator.svg | 65 + app/assets/images/roles/moderator.png | Bin 958 -> 300 bytes app/assets/images/roles/moderator.svg | 71 + app/assets/images/users/images/user-icons.svg | 182 +++ app/assets/javascripts/changeset.js | 4 +- .../templates/browse/feature.jst.ejs | 22 +- .../templates/browse/feature_history.jst.ejs | 13 +- .../templates/browse/feature_list.jst.ejs | 18 +- app/assets/stylesheets/common.css.scss | 1192 ++++++++++------- app/assets/stylesheets/large.css | 6 - app/assets/stylesheets/small-rtl.css | 2 +- app/assets/stylesheets/small.css.scss | 131 +- app/controllers/changeset_controller.rb | 88 +- app/controllers/diary_entry_controller.rb | 18 +- app/helpers/application_helper.rb | 4 +- app/views/browse/_changeset_details.html.erb | 122 +- app/views/browse/_common_details.html.erb | 61 +- .../browse/_containing_relation.html.erb | 19 +- app/views/browse/_map.html.erb | 53 +- app/views/browse/_navigation.html.erb | 69 +- app/views/browse/_node_details.html.erb | 26 +- app/views/browse/_paging_nav.html.erb | 13 +- app/views/browse/_relation_details.html.erb | 28 +- app/views/browse/_relation_member.html.erb | 8 +- app/views/browse/_tag.html.erb | 4 +- app/views/browse/_tag_details.html.erb | 14 +- app/views/browse/_way_details.html.erb | 32 +- app/views/browse/changeset.html.erb | 16 +- app/views/browse/node.html.erb | 24 +- app/views/browse/node_history.html.erb | 23 +- app/views/browse/relation.html.erb | 17 +- app/views/browse/relation_history.html.erb | 15 +- app/views/browse/start.html.erb | 17 +- app/views/browse/way.html.erb | 20 +- app/views/browse/way_history.html.erb | 15 +- app/views/changeset/_changeset.html.erb | 44 +- .../changeset/_changeset_paging_nav.html.erb | 32 +- app/views/changeset/_changesets.html.erb | 4 +- app/views/changeset/list.html.erb | 36 +- app/views/changeset/timeout.html.erb | 2 +- app/views/diary_entry/_diary_comment.html.erb | 15 +- app/views/diary_entry/_diary_entry.html.erb | 56 +- .../diary_entry/_diary_list_entry.html.erb | 3 +- app/views/diary_entry/comments.html.erb | 27 +- app/views/diary_entry/edit.html.erb | 4 +- app/views/diary_entry/list.html.erb | 66 +- app/views/diary_entry/no_such_entry.html.erb | 5 +- app/views/diary_entry/view.html.erb | 21 +- app/views/export/start.html.erb | 82 +- app/views/geocoder/description.html.erb | 6 +- app/views/geocoder/results.html.erb | 25 +- app/views/geocoder/search.html.erb | 2 +- app/views/layouts/_flash.html.erb | 6 +- app/views/layouts/site.html.erb | 126 +- app/views/message/_message_summary.html.erb | 2 +- .../message/_sent_message_summary.html.erb | 2 +- app/views/message/inbox.html.erb | 8 +- app/views/message/new.html.erb | 4 +- app/views/message/no_such_message.html.erb | 5 +- app/views/message/outbox.html.erb | 6 +- app/views/message/read.html.erb | 47 +- app/views/oauth/authorize.html.erb | 7 +- app/views/oauth/authorize_failure.html.erb | 4 +- app/views/oauth/authorize_success.html.erb | 4 +- app/views/oauth_clients/edit.html.erb | 5 +- app/views/oauth_clients/index.html.erb | 9 +- app/views/oauth_clients/new.html.erb | 7 +- app/views/oauth_clients/show.html.erb | 4 +- app/views/redactions/edit.html.erb | 5 +- app/views/redactions/index.html.erb | 4 +- app/views/redactions/new.html.erb | 4 +- app/views/redactions/show.html.erb | 4 +- app/views/site/_home_link.html.erb | 2 +- app/views/site/_sidebar.html.erb | 10 +- app/views/site/copyright.html.erb | 64 +- app/views/trace/_trace.html.erb | 10 +- app/views/trace/_trace_optionals.html.erb | 3 +- app/views/trace/create.html.erb | 4 +- app/views/trace/edit.html.erb | 6 +- app/views/trace/list.html.erb | 38 +- app/views/trace/offline.html.erb | 3 + app/views/trace/view.html.erb | 6 +- app/views/user/_contact.html.erb | 74 +- app/views/user/account.html.erb | 17 +- app/views/user/blocked.html.erb | 4 +- app/views/user/confirm.html.erb | 4 +- app/views/user/confirm_email.html.erb | 4 +- app/views/user/list.html.erb | 4 +- app/views/user/login.html.erb | 106 +- app/views/user/logout.html.erb | 5 +- app/views/user/lost_password.html.erb | 4 +- app/views/user/make_friend.html.erb | 5 +- app/views/user/new.html.erb | 4 +- app/views/user/no_such_user.html.erb | 4 +- app/views/user/remove_friend.html.erb | 5 +- app/views/user/reset_password.html.erb | 6 +- app/views/user/save.html.erb | 2 - app/views/user/suspended.html.erb | 4 +- app/views/user/terms.html.erb | 4 +- app/views/user/view.html.erb | 356 +++-- app/views/user_blocks/_blocks.html.erb | 14 +- app/views/user_blocks/blocks_by.html.erb | 4 +- app/views/user_blocks/blocks_on.html.erb | 5 +- app/views/user_blocks/edit.html.erb | 19 +- app/views/user_blocks/index.html.erb | 4 +- app/views/user_blocks/new.html.erb | 11 +- app/views/user_blocks/revoke.html.erb | 19 +- app/views/user_blocks/show.html.erb | 41 +- config/locales/en.yml | 43 +- db/structure.sql | 13 +- test/functional/browse_controller_test.rb | 46 +- 124 files changed, 2947 insertions(+), 1665 deletions(-) delete mode 100644 app/assets/images/RSS.gif create mode 100644 app/assets/images/RSS.png create mode 100644 app/assets/images/RSS.svg create mode 100644 app/assets/images/color-palette.svg create mode 100644 app/assets/images/new.svg create mode 100644 app/assets/images/notice.png create mode 100644 app/assets/images/notice.svg create mode 100644 app/assets/images/roles/administrator.svg create mode 100644 app/assets/images/roles/blank_administrator.svg create mode 100644 app/assets/images/roles/blank_moderator.svg create mode 100644 app/assets/images/roles/moderator.svg create mode 100644 app/assets/images/users/images/user-icons.svg diff --git a/app/assets/images/RSS.gif b/app/assets/images/RSS.gif deleted file mode 100644 index b0e4adf1d517547adb01c44d4b91dc78c170b6a5..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 652 zcmZ?wbhEHb6krfwc*el+Wun>ZdZS-+EPv0n`Z3e;&({zCe|~<~YVxAe@L9d_w<+eI zdQG2|=)Y_={m^OhuGRS8k57;D^!|N%b}LTnd4>L)F0+RfhHn~;9%Sjhsx^FEY4o_# z@aJ5|7tJR3Qg!}*e0DEi|9+vtokZ=wx3)ekF?ii+`l8kJ-}g^XOY|O<89r|`zE@!I zw8rQ~lgXb$Ew9>5@8;=0sWy6AYxJ_i?AMyOU+0$pSfBZBqR*FQ>F;Kx{5&!HWu4`h zy)%Byb9vwE_-=LQzc;sjE)9COY3j%A(|_+Qe^BcBc}e>FxhY@P6#u!o_50e)zxNOR z`}pkB;X?tj(k`Srkzulr~IeR}rieAnO4Zv4Ey|51V2uYJwG*T+4nasRbB>(}MY z-=|yroMriSlKIDO(^nhX|NsBbKr~SN$pTiZ10q3j!odErfwe$P+R%toOO{t(Rn)kk z$y!51Qk{%#a$H*ZiJ2Ns}=!r?* zzC;clP2T0XA-8-MDRdS$IkE`po9V86lyt^MlhNR^*9_zdDhD7bfX5EnZYiJ{nysD@|mN zw10I4Kv^-DC_4uu3o=Ts+yGkaNr@ZB#4@Dimi;Y2P>Ev;*k24ezhe&&+YV;(rv-nL z# + + + + + + + image/svg+xml + + + + + + + + + + + + + + + diff --git a/app/assets/images/color-palette.svg b/app/assets/images/color-palette.svg new file mode 100644 index 000000000..329288e1a --- /dev/null +++ b/app/assets/images/color-palette.svg @@ -0,0 +1,151 @@ + + + + + + + + + + + + image/svg+xml + + + + + + + + + + + + + + + + + + diff --git a/app/assets/images/new.png b/app/assets/images/new.png index 202e10eca8aff2839d598e91428029a7f44d6d73..d6355e0217adb23f6ab401bfa6b9b81ef3004db6 100644 GIT binary patch literal 127 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!61|;P_|4#%`Zk{fVAr-goPB!FXP~c(y+MBkl}sMU?b*`*e3Jgq2T-aMKNkS a&&g&Nne*ofD=h+=$l&Sf=d#Wzp$PzidMfY$ literal 991 zcmV<510ei~P)Px#1ZP1_K>z@;j|==^1poj5AY({UO#lFTCIA3{ga82g0001h=l}q9FaQARU;qF* zm;eA5aGbhPJOBUy32;bRa{vGfh5!Hyh5N2bPDNB8b~7$BH8Ae8p8x;@5lKWrR5(w4lv_v?Q5eTn zv$(|r31e`GqZDk=l`8KGs#K+X`w()T2d0$(=8jQ zPmSK1yhuL_)Q8hECJ`Tgv!iV<(LwaaxZS1hee}4pZ)m9a*_Y3Sy7BRX;qmeOVUa&x z9ts>fOKe{=KNF078(W^6b7Ovfo^TP9kX-j5d72>!MVQkcgJ?bjBX`>75)StS{n>>i z+MJlAmk9!a0F%&LfHEd9?Kqx+)mLi?dv2-9uX~*mB11( ziR_ml%Rk_Clwd*Xz@Oj;EH8;9VQmSEp-%|QFCot!;6j1yB9dezNF*98N0Vsl2_<}% zTr4jOtAbd!h>%c@fM@sDP#~+4M44+OUayzdLLx@t^LE3>pTI9~S0q8KErll`JB}jg z+s`CrB-s|1NRh#wND{TSfvBN0sG?=yo!)Z0ok63Ab$xVu?#lDDR|sRdML#~k|f6^PTmQ(ON=Jb zG!ZO~il`#Wsk{P`o+mD2YN`~R{@j)LlZibYyWIv+;2{W3IGr{)9acE(li;0$5cxj1 zgbw<@6E5)yMn?M3eWxjF&1P%A)z-@-Jnx7kY1T9*&_Kua5iI6W*sRld_x>$tTda|! zw6$v=Sgo_Gv(Lh2v%qRKVb)@V+04Og(!*$&hJl-g$;4rB=nb1BCoxHywzav>V9>*E zPZStvFb9)y21X+j{G@f5qT?Bo=y0Q~G?yePF;S|frRna(#P=1BL>$MMiKD04_4)+p zeBf38?`tK+d5MzbYDLA#W=+HW`o`L)sygM18dY__qNZw~T3PYBN>QO>&^sUcSvS*QR2 N002ovPDHLkV1lVBuzCOh diff --git a/app/assets/images/new.svg b/app/assets/images/new.svg new file mode 100644 index 000000000..ef65650f7 --- /dev/null +++ b/app/assets/images/new.svg @@ -0,0 +1,73 @@ + + + + + + + + image/svg+xml + + + + + + + + + + + diff --git a/app/assets/images/notice.png b/app/assets/images/notice.png new file mode 100644 index 0000000000000000000000000000000000000000..a2698d77bae2069880c9fa8ecb63ae107bc6b035 GIT binary patch literal 227 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!61|;P_|4#%`EX7WqAsj$Z!;#Vf2?p zUk71ECym(^Ktah8*NBqf{Irtt#G+J&^73-M%)IR4bz$W&1G4}@hIxI|FrlsIjm+2KJl>MTC%EI ziN}E1+p|qS>!q)$W(9eaG_u9Eg9imqAyvaKYTaUZN}9%OshB Pb}@Lm`njxgN@xNAKV3%f literal 0 HcmV?d00001 diff --git a/app/assets/images/notice.svg b/app/assets/images/notice.svg new file mode 100644 index 000000000..cb779ce21 --- /dev/null +++ b/app/assets/images/notice.svg @@ -0,0 +1,73 @@ + + + + + + + + image/svg+xml + + + + + + + + + + + diff --git a/app/assets/images/roles/administrator.png b/app/assets/images/roles/administrator.png index b566decb400a67a81990bfe2a057bd1c14d2db70..ea363d25767894e4f65b0c30872590ee08ab5173 100644 GIT binary patch delta 313 zcmV-90mlB02h#$OBYy!JNkl^Od4P~Qq!*IxjVZ!;Ke*$9(ahmm3=A{heC+L?tEFjr)~Ep0>YmMm z#Ab~=SeUq|n=qvahBzXP?Cg?|#$^}Y}_RhWSbz#$>d zu1aA{Pocuh@mPNHU9aicPEVC#7LGrAD9&67TVGWKR+vWr9?It=>UgFXO$G+6cFM&{ zhnf&f}Y`aMI07+Z6EvZmpTi(9+#=|agyK5mt=lILaXJ)=Llb@(6|EHPzah9h2 zC*W9l>z=XlwvR-_0kXg{5m_?MxfjqF=XnqhSPt|8b3hfiecu(9Mu%Ku+zr+yHVzN_ z4*~r^58y4;`hQ)4#<(vg66yX#BHg!Zcki3PT3{vMEg94PAT4IC`;xUuYm7@ipV
    Shnhc)W;8mbX-9HAOgtsk31iM8=2=4zAcl%W^NW zMl0HE4YyEyW~?+iJonAX$A8Xd?G7LhEX!o=${$ZZ@p+;6?4Q5=zHMsFn#7Ypsx@9! z7jXkm|1`LxP~1{Ia%BA>U;yX>Of#7PnWLYrf9>4)Et4lsJo+Ax0pwqSfP8=Iv4MjJ z*F6mQfY*_|0ZqRC#@cnqj&B$O674?idnip^R8`{+eg5&gqn&EoAM!U(Q-^t$_~0A> O0000 + + + + + + + image/svg+xml + + + + + + + + + diff --git a/app/assets/images/roles/blank_administrator.png b/app/assets/images/roles/blank_administrator.png index c68f9e427169c61c0894bd30fa58d3c67d2af1b3..8f56b6ea6e856fdb753d558a96351c742b65fbe7 100644 GIT binary patch delta 424 zcmV;Z0ayOG2EhZ6BYy#iNkl|i%woOEwF zGd5sxV@K|%$gkf;W+96m?1J&_45iTLWM;~0-WHWGWRR7drG9-VuUp!%#aXpcS_y?= zh77V%o-(d<#(z0l3l9` z0^C?lADG%q|^yg$Z(PQB{?v z0LTYc05aay|9=RSGOs2zwKCuBuFS6Wl^zB%fF*#8S2G7FqC(0%uav8FT~8q=XWb@X zDUfUdwb*=!($ErJ0y-eFvZS!vayQI;&&({$_IT{>(a}j4)594TLKsoKm_mpN(HHX8 z3E^mVI=4m)!_-Yfi5Y9Ar+b%6nP~$sjIV_HuYA!p&3~{v^eIiC01=5im3^V1)|$N! z&H*1$O3@qKSMl~;bGKo9SAQF(IiUi9=HbT1lFPturU#aQQVOLM*KZVgdU}uF`}Qpm zSqL^h{${GZ<50MuAn7!)3s?mt0%8_ut)Sl3b)f0}hpQjr!3G9f#{B+@N17&Tff8#_ zwpm6r(0_u8-r%vec)<1!Ul^zZih-oq`Z>1g4r~_AkLca+Yj;cthI`&B!FeZEhA|CT1JgH%A985ZEYc&YqgPjB7O z&09N90Zu^73k1ZSyH)EO8*|qJ9zf3L03e~(myvt*T6r1Zh|Liy>K9-wxHc`VGUH7; g>KlPoDjER%0yv4=tDT48fdBvi07*qoM6N<$f;riE4FCWD diff --git a/app/assets/images/roles/blank_administrator.svg b/app/assets/images/roles/blank_administrator.svg new file mode 100644 index 000000000..3e56c789a --- /dev/null +++ b/app/assets/images/roles/blank_administrator.svg @@ -0,0 +1,89 @@ + + + + + + + + image/svg+xml + + + + + + + + + + + + + diff --git a/app/assets/images/roles/blank_moderator.png b/app/assets/images/roles/blank_moderator.png index cf5ceea36d95715325965ab9e9e0d0744d8d9aee..7dc30728432a846e55ac2c1c368845b96424b032 100644 GIT binary patch delta 377 zcmV-<0fzp^29pDjBYy!}Nkl*-52Kz4?Mi@^ZxGOyYF@+ZB?lO zOY9a3dU8&W_{_k3UO^B@2%i~fZ+F@2NeI6U;M;gCA$%4fuz$m9Ra&jq!qdwFJnwWA z7oJ`kki}b*e$!~AxbO)%4(uTYI;WRrQ<~59?_$Sxfj-B;Qc3&PxUSWt$;2NkGUY43dG& z$an#*vuEM2>2g$}77MA}Mr%(oBSSU~$iam5x`^t>lWx4wlV0Qfg XRYi{F-&VYb00000NkvXXu0mjfV;{H+ delta 817 zcmV-11J3-D1IGrCBYyw{b3#c}2nYxWdnu~K~y-6t(99ylVKRg zfA6==Ioq7hoTSupnlhahb|Ryq17-&@I%q^@YSB#>K@q4?P=9p5qM~FK5e1S7QnX-6 z7afSoE}}DCsnJDw2xF3y|eEY5dKELgg>3YY*S0>)@H5kL_V8OiZ$GVE5J)f7Wc zX8LR(2^gmVmGFEB(NGiJ2l44C=z==EA%GAPiD>KW zF?PN0Y-u~W^BB;Dl#&(4y^Ho;YkNH~_(T3}d=CWW{;PL-+^ecC04ubC#UiCdN=bUf z0o!Je&-e0u@7K{_?OmS(rH3wc#M&p-0mVQ%U;@N1ptgd#lB3PF7w)|H5DnIN?|I+c zZF}z{lz$4KKpT|)7b6s?K}EUemNy!(?C_-yU@MRh#D&*K*e0juikLFNHYJ+Rre$X& z>CFi+v@zdC^%>SDtTe z4yvl`^7pG-PPM#CcF)<7kTt!i+H>=1XRkjXrGJ#=^^LCp7hs5xEKEPcf$NXo`kuA- zEvsp`t24$e1X2N$VvI{HIe7VE)5AAk>Tf*iF<5M~M$+)NL*brt3)i3Vby7G+;zK`>F9^Va^0Wl&F5QV!=yHb{H$_8wJaU=%-u}QO+JEm_xI0uLc v&ngiz + + + + + + + image/svg+xml + + + + + + + + + + diff --git a/app/assets/images/roles/moderator.png b/app/assets/images/roles/moderator.png index eaedf95d2ed2348a696f21562d5e70ea9e1fa5d7..f7534beb55c18df75699725c8f1566682394c536 100644 GIT binary patch delta 273 zcmV+s0q*|32dn~+B!BZsL_t(|+O3m43c^4Tg$?AV@EjHaFW?c(Db!m8Pv8+!rnE?< zV4B2pnTW`!@*3cXl0?pFDks)zU>wT=Friqh zfdK73K-OabjRiCsAYpkAvXyIqr2|;{fDAS?D|H-zSteI45Pz$68Gv|B(X17~nvAb+ zh$$N!c7K36WY#|~1*SP<0$_&Tpj*b&l@CZy@Y*1-_W|h%0-}?`+y($!dVN5y(9#iZ zT)Rqd2(Yq3FK7!_M6qVi0#;rijQ2k9M4)gCEO^#?9wER6x*<5@yGuOl|E_}vsMi}H X_TTm0xIEWf;bP zZ%$55PLh+>rfue2+O5;o{&C%n7QGoxy%AASm>}-L&WnLwcz-b+7OWOzLyDpzBHoB& zisCBW5D^C=C~hcQk=4a%sibymveGuqzvj<5=kua*%@V5&ec^-e;&~sQ_x+xSPn1&p zpXIq8uvF_m5%!Nx?C&2vF(M*fzyeGW*|5+1Z-km*K7dCvfG}_qkO7iF>ADs64S%Hj z%wV4pu==g;+kbZeT|g8tHX8jO33Y$)VXHOTWwmaKwcqv75O5=K17K{_(?BRSWdwqc zgsdjbH2nmku|XgL1gnIedOXzZu)1^u&;Ze!+N3oc9Oww^pbNWtyMNnF)ATN`I{c9?GCeh!b`ZxE zkL@Uw<0x^9S)-Ind^+>q!7*T7lv3RG()b?3YJRh=>(>63fI&xCCuVus6x1kG6mvP7 z*-VAGtWBw6Q?wmQCOn-JE=PaN7YUcNMpM5KJ>gYId0hk9$QX4%H(RL0WI~3cx{pmXfdN+r354NjV zEIK6f4vVWc3p4R->W44SB|aH@ALX7062OX5%D(1N))Xm6M2_gMoEV(T?s(Ae6|8nn6zlu{&WHE-np?X{6`NwY!u&6j>16!uLaAa?wjF%Yt>NgN$9GqI8`9FC zP<-Zo<+qGNKChN9oJm|d`Oa&uUH-M>u|tQ=&c0o)*U-#u0|Ts^yVi@>DijeNpMPg= z;eS##b^7yfF1~SKXeEB;v+Qr@zKxGPdEd&^cOMk5%%;7O%~9QIu>ieZ5K5`5=jLbL zzPop1JQ>^j+%V7sGy$Hf69fpw_CCL_=f&ffw+$UR2!sHseRM()CQXy``IP18-R;5(kAMz&)32g_o40JaD0000< KMNUMnLSTYLYr + + + + + + + image/svg+xml + + + + + + + + + + + + diff --git a/app/assets/images/users/images/user-icons.svg b/app/assets/images/users/images/user-icons.svg new file mode 100644 index 000000000..85288b242 --- /dev/null +++ b/app/assets/images/users/images/user-icons.svg @@ -0,0 +1,182 @@ + + + + + + + + image/svg+xml + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/app/assets/javascripts/changeset.js b/app/assets/javascripts/changeset.js index 152b3b4f7..9e393ad5a 100644 --- a/app/assets/javascripts/changeset.js +++ b/app/assets/javascripts/changeset.js @@ -27,12 +27,12 @@ $(document).ready(function () { function highlightChangeset(id) { rects[id].setStyle({fillOpacity: 0.5}); - $("#tr-changeset-" + id).addClass("selected"); + $("#changeset_" + id).addClass("selected"); } function unHighlightChangeset(id) { rects[id].setStyle({fillOpacity: 0}); - $("#tr-changeset-" + id).removeClass("selected"); + $("#changeset_" + id).removeClass("selected"); } group.on({ diff --git a/app/assets/javascripts/templates/browse/feature.jst.ejs b/app/assets/javascripts/templates/browse/feature.jst.ejs index 5a3fe3644..d80c68922 100644 --- a/app/assets/javascripts/templates/browse/feature.jst.ejs +++ b/app/assets/javascripts/templates/browse/feature.jst.ejs @@ -1,19 +1,15 @@ - - - - - - -
    <%- name %> - <%- I18n.t('browse.start_rjs.object_list.details') %> -
    -
    + +<%- I18n.t('browse.start_rjs.object_list.back') %> \ No newline at end of file diff --git a/app/assets/javascripts/templates/browse/feature_history.jst.ejs b/app/assets/javascripts/templates/browse/feature_history.jst.ejs index 6f870ac5b..c579070e1 100644 --- a/app/assets/javascripts/templates/browse/feature_history.jst.ejs +++ b/app/assets/javascripts/templates/browse/feature_history.jst.ejs @@ -1,13 +1,8 @@ - - - - - -
    <%- I18n.t("browse.start_rjs.history_for_feature", {feature: name}) %> - <%- I18n.t('browse.start_rjs.details') %> -
    -
      +

      <%- I18n.t("browse.start_rjs.history_for_feature", {feature: name}) %>

      + <%- I18n.t('browse.start_rjs.details') %> + +
        <% for (var i = 0; i < history.length; i++) { %>
      • <%- I18n.t("browse.start_rjs.edited_by_user_at_timestamp", history[i]) %>
      • <% } %> diff --git a/app/assets/javascripts/templates/browse/feature_list.jst.ejs b/app/assets/javascripts/templates/browse/feature_list.jst.ejs index ada7d0874..4bb49e4bb 100644 --- a/app/assets/javascripts/templates/browse/feature_list.jst.ejs +++ b/app/assets/javascripts/templates/browse/feature_list.jst.ejs @@ -1,9 +1,13 @@
        -

        <%- I18n.t('browse.start_rjs.object_list.heading') %>

        -
          - <% for (var i = 0; i < features.length; i++) { %> -
        • <%- features[i].typeName %> <%- features[i].name %>
        • - <% } %> -
        - <%- I18n.t('browse.start_rjs.object_list.api') %> +

        <%- I18n.t('browse.start_rjs.object_list.heading') %>

        +
        +
          + <% for (var i = 0; i < features.length; i++) { %> +
        • <%- features[i].typeName %> <%- features[i].name %>
        • + <% } %> +
        +
        + + +
        diff --git a/app/assets/stylesheets/common.css.scss b/app/assets/stylesheets/common.css.scss index 48112c2c6..255b846cf 100644 --- a/app/assets/stylesheets/common.css.scss +++ b/app/assets/stylesheets/common.css.scss @@ -1,11 +1,57 @@ /* Styles common to large and small screens */ +/* Minimal CSS reset */ + +html, body, ul, ol, li, form, fieldset, legend, h1, h2, h3, h4, h5, h6, p { + margin: 0; + padding: 0; + border: 0; + font-size:100%; +} + +fieldset,img { border: 0; } + +legend { color: #000; } + +sup { vertical-align: text-top; } + +sub { vertical-align: text-bottom; } + +table { + border-collapse: collapse; + border-spacing: 0; +} + +li { list-style: none; } + +input, +select, +textarea, +body { font: 14px/20px "Helvetica Neue",Arial,sans-serif; } + +abbr, acronym { + border-bottom: .1em dotted; + cursor: help; +} + +/* Micro Clearfix | Details: http://nicolasgallagher.com/micro-clearfix-hack/ */ + +.clearfix:before, +.clearfix:after { + content: " "; + display: table; +} + +.clearfix:after { + clear: both; +} + /* Default rules for the body of every page */ body { font-family: 'Helvetica Neue',Arial,sans-serif; font-size: 14px; - line-height: 20px; + line-height: 1.6666; color: #222; background-color: #fff; margin: 0px; @@ -17,15 +63,75 @@ body.slim { background-color: #f0f0f0; } +h1, h2, h3 { + margin-top: 10px; + margin-bottom: 20px; + font-weight: bold; + line-height: 1.2; +} + +h1, h2 { + font-size: 32px; +} + +#content h2 { + font-size: 24px; +} + +h3 { + font-size: 21px; + margin-top: 10px; + margin-bottom: 20px; +} + +h4,h5,h6 { + font-size: 14px; + margin-top: 10px; + margin-bottom: 20px; + font-weight: bold; + line-height: 1.5; +} + +p, ul { + margin-bottom: 20px; +} + +p > img { + width: auto; + max-width: 100%; +} + +small, aside { + font-size: 12px; +} + +h1:first-child, +h2:first-child, +h3:first-child, +h4:first-child, +h5:first-child, +h6:first-child { + margin-top: 0; +} + +.column-1 { + width: 50%; + margin-bottom: 20px; +} + +.small_icon { + vertical-align: middle; + margin-right: 5px; +} + /* Rules for links */ a { color: #00f; text-decoration: none; -} - -a:hover { - text-decoration: underline; + &:hover { + text-decoration: underline; + } } /* Rules for horizontal lines */ @@ -37,23 +143,34 @@ hr { height: 1px; } -/* Default rules for headings */ +/* General styles for tables */ -h2 { - margin: 5px 0; - font-size: 25px; - line-height: 30px; +table { + width: 100%; + margin-bottom: 20px; + th, td { + text-align: left; + padding: 5px; + line-height: 20px; + } + th { + font-weight: bold; + vertical-align: top; + } + td { + vertical-align: middle; + } } /* Rules for the whole left sidebar, including the logo */ #left { position: absolute; - top: 30px; - bottom: 0; + height: 100%; width: 185px; font-size: 11px; line-height: 12px; + z-index: 100; border-right: 1px solid #ccc; } @@ -63,15 +180,11 @@ h2 { display: block; width: 170px; min-width: 170px; - padding: 5px; + padding: 20px 5px; text-align: center; margin: auto; } -#logo img { - border: 0px; -} - #logo h1 { font-size: 18px; line-height: 20px; @@ -91,10 +204,6 @@ h2 { display: none; } -#small-title img { - border: 0px; -} - /* Rules for the introductory text displayed in the left sidebar to new users */ .sidebar-copy { @@ -117,15 +226,13 @@ h2 { */ .sidebar-alert { - padding: 4px 5px 4px 5px; + padding: 5px; border-top: 1px solid #ccc; margin-top: 4px; margin-bottom: -4px; background: #e00; - font-size: 13px; + font-size: 12px; font-weight: bold; - line-height: 17px; - p { margin: 5px; } @@ -138,14 +245,12 @@ h2 { */ .sidebar-notice { - padding: 4px 5px 4px 5px; + padding: 5px; border-top: 1px solid #ccc; margin-top: 4px; margin-bottom: -4px; background: #ea0; - font-size: 13px; - line-height: 17px; - + font-size: 12px; p { margin: 5px; } @@ -164,6 +269,10 @@ h2 { border-top: 1px solid #ccc; } +.left_menu img { + margin: 10px 0px; +} + .left_menu ul { padding: 0; margin: 0; @@ -212,23 +321,10 @@ h2 { text-align: left; } -.optionalbox h1 { - font-size: 14px; - font-weight: bold; - line-height: 20px; - margin: 0px; - vertical-align: bottom; -} - /* Rules for the search box */ -.whereami { -} - #search_field form { width: 165px; - margin: 0px; - padding: 0px; } #search_field { @@ -237,6 +333,7 @@ h2 { #search_field input[type="text"] { width: 165px; + padding: 3px; font-size: 14px; line-height: 15px; height: 25px; @@ -254,18 +351,17 @@ h2 { } #search_field input[type="submit"] { + border: 0; + margin: 0; + padding: 0; width: 15px; height: 15px; - border: 0px; text-indent: -1000px; overflow: hidden; - text-transform: capitalize; - padding-left: 0px; - padding-right: 0px; - background: image-url("sprite.png"); + background: image-url("sprite.png") 0 0 no-repeat; position: absolute; top: 5px; - right: 4px; + right: 5px; cursor: pointer; } @@ -273,12 +369,13 @@ h2 { margin: 5px 0 0 0; } +/* Utility for de-emphasizing content */ + .deemphasize { color: #999; -} - -.deemphasize a { - color: #7092FF; + a { + color: #7092FF; + } } /* Rules for donation request box */ @@ -287,7 +384,6 @@ h2 { display: block; position: relative; width: 153px; - margin: 10px 10px 0px 10px; padding: 5px; border: 1px solid #AED1A0; background: #cbeea7; @@ -297,6 +393,7 @@ h2 { border-radius: 2px; -moz-border-radius: 2px; color: #222; + margin: 10px 10px 0px 10px; } .donate:hover { @@ -313,8 +410,6 @@ h2 { width: 15px; height: 15px; border: 0px; - padding-left: 0px; - padding-right: 0px; background: image-url("sprite.png") 0 -30px no-repeat; position: absolute; top: 8px; @@ -324,63 +419,65 @@ h2 { /* Rules for Creative Commons logo button */ #cclogo { - margin-top: 10px; - margin-bottom: 10px; + margin: 10px 0; + float: right; } /* Rules for tabbed navigation bar */ #top-bar { - position: absolute; - z-index: 10000; - top: 0; - left: 185px; - right: 0; + position: relative; + margin-left: 185px; height: 29px; border-bottom: 1px solid #ccc; background: white; + z-index: 100; +} + +.site-edit #top-bar, +.site-index #top-bar, +.site-export #top-bar { + position: fixed; + left: 0; + right: 0; } #tabnav { - padding: 0; - margin: 0; - overflow:hidden; + height: 29px; + margin-bottom:0; + overflow: hidden; } #tabnav li { - margin: 0px; - padding: 0px; display: inline; - list-style-type: none; } #tabnav a, #tabnav a:link, #tabnav a:visited { float: left; background: #fff; - font-size: 14px; - line-height: 19px; font-weight: bold; - padding: 5px 10px; - margin-right: 1px; + padding: 3px 10px; text-decoration: none; color: #333; + float: left; + margin-right: 1px; -webkit-transition: color 200ms ease-in; - -moz-transition: color 200ms ease-in; - -o-transition: color 200ms ease-in; - transition: color 200ms ease-in; + -moz-transition: color 200ms ease-in; + -o-transition: color 200ms ease-in; + transition: color 200ms ease-in; } -body.site-index #tabnav a#viewanchor, -body.site-edit #tabnav a#editanchor, -body.changeset-list #tabnav a#historyanchor, -body.site-export #tabnav a#exportanchor { +.site-index #tabnav a#viewanchor, +.site-edit #tabnav a#editanchor, +.changeset_list #tabnav a#historyanchor, +.site-export #tabnav a#exportanchor { border-bottom: 1px solid #aaa; background: #9ed485; color: #000; } #tabnav a:link:hover, #tabnav a:visited:hover { - text-decoration:underline; + text-decoration: underline; } #tabnav a:link.disabled, @@ -398,10 +495,12 @@ body.site-export #tabnav a#exportanchor { text-decoration: none; } +/* Utility for styling notification numbers */ + .count-number { padding: 2px 5px; border-radius: 3px; - background: #eee; + background: #d7d7ff; margin: 0 2px; font-size: 11px; color: #333; @@ -411,11 +510,7 @@ body.site-export #tabnav a#exportanchor { #greeting { float: right; - height: 28px; - margin: 0px; - padding-right: 10px; - font-size: 13px; - line-height: 28px; + padding-top: 3px; } .greeting-bar-unread { @@ -433,16 +528,18 @@ body.site-export #tabnav a#exportanchor { /* Rules for Leaflet maps */ -#map { - margin: 0px; - border: 0px; - padding: 0px; +#permalink { + z-index: 10000; + position: absolute; + bottom: 0px; + right: 0px; + padding: 5px; + background:#fff; } .site-index .leaflet-top, .site-export .leaflet-top { - top: 40px !important; - + top: 10px !important; .leaflet-control { margin-top: 0px !important; } @@ -456,10 +553,10 @@ body.site-export #tabnav a#exportanchor { /* Rules for edit menu */ .menuicon { - padding: 5px; - + padding: 0 5px; + font-weight: normal; + display: inline-block; &:hover { - background: #eee; text-decoration: none !important; } } @@ -475,13 +572,10 @@ body.site-export #tabnav a#exportanchor { .menu ul { margin: 0px; - padding: 0px; } .menu li { padding: 2px 5px; - margin: 0px; - list-style-type: none; border-top: 1px solid #eee; white-space: nowrap; } @@ -492,7 +586,8 @@ body.site-export #tabnav a#exportanchor { display: none; } -.attribution_license { +.attribution_license, +.attribution_project { text-align: left; } @@ -500,63 +595,63 @@ body.site-export #tabnav a#exportanchor { text-align: center; } -.attribution_project { - text-align: right; -} - /* Rules for the popout map sidebar */ #sidebar { display: none; position: absolute; - margin: 30px 0px 0px 0px; - padding: 0px; - border-right: 1px solid #ccc; - width: 30%; + overflow: auto; top: 0px; bottom: 0px; left: 0px; + border-right: 1px solid #ccc; + width: 33.3333%; + .sidebar_heading { + position: relative; + padding: 10px 20px; + z-index: 9999; + background: #F4F4FF; + border-bottom: 1px solid #ccc; + } + h4 { + margin: 0; + } + ul { + margin-bottom: 0; + li { + margin-bottom: 5px; + &:last-child { + margin-bottom: 0; + } + } + } } -#sidebar #sidebar_content { - overflow: auto; +#sidebar_close { position: absolute; - font-size: 13px; - line-height: 15px; - top: 29px; - bottom: 0px; - left: 0px; - right: 0px; -} - -#sidebar .sidebar_title { - margin: 0px; - padding: 3px 6px 4px 6px; - height: 29px; - font-size: 14px; - line-height: 15px; - background: #ccc; -} - -#sidebar #sidebar_title { - text-align: left; + height: 20px; + top: 0px; + bottom: 0; + right: 20px; + margin: auto; } -#sidebar #sidebar_close { - text-align: right; +#sidebar_content { + position: relative; + bottom: 0; + width: 100%; + h4 { + padding: 0 20px 10px 20px; + margin-top: 10px; + margin-bottom: 0; + border-bottom: 1px solid #ddd; + } } /* Rules for the map key which appears in the popout sidebar */ -#mapkey h3 { - font-size: 110%; - font-weight: normal; - text-align: center; -} - -#mapkey .mapkey-table { - padding-left: 5px; - padding-right: 5px; +#mapkey { + padding: 20px; } #mapkey .mapkey-table-key img { @@ -565,8 +660,8 @@ body.site-export #tabnav a#exportanchor { margin-right: auto; } -#mapkey .mapkey-table-value { - font-size: 90%; +#mapkey td { + padding: 0 5px 5px 5px; } /* Rules for search results which appear in the popout sidebar */ @@ -576,77 +671,80 @@ body.site-export #tabnav a#exportanchor { margin-bottom: 5px; } -.search_results_heading { - margin: 0px; - padding: 2px 5px; - border-bottom: 1px solid #ccc; - font-weight: bold; +.search_results_entry { + margin-bottom: 0 ; } -.search_results_entry { - margin: 0px; - padding: 2px 5px; +.search_results_entry .search_searching { + text-align: center; + margin: 20px auto; + width: 20px; + display: block; } +ul.results-list li { border-bottom: 1px solid #ccc; } + .search_results_error { - margin: 0px; - padding: 2px 6px 0px; color: #f00; } /* Rules for data browser information which appears in the popout sidebar */ -.browse_heading { - margin: 0px; - padding: 3px 6px; - border: 1px solid #ccc; - background: #ddd; +#browse_content { + position: relative; + .browse_show_list.button { + position: absolute; + left: 20px; + right: 20px; + bottom: -40px; + margin-bottom: 0; + } + a.more-details { + position: absolute; + top: 0; + right: 20px; + } + ul li { + margin-bottom: 0; + } } .browse_details { - margin: 0px; - padding: 0px 6px; + position: relative; } -/* Rules for export information which appears in the popout sidebar */ - -.export_heading { - margin: 0px; - padding: 2px 5px; - border-bottom: 1px solid #ccc; - font-weight: bold; +.browse_status { + display: none; } +/* Rules for export information which appears in the popout sidebar */ + .export_bounds { - width: 100%; text-align: center; } -.export_bound { - margin: 5px; +.export_area_inputs { + margin-bottom: 10px; } -.export_details { - padding: 2px 6px; +.export_bound { + margin: 5px; } -#export_osm { - display: none; +.export_details input[type="text"]#export_html_text { + width: 100%; } -#export_mapnik { - display: none; +#sidebar #marker_inputs li:last-child { + margin-bottom: 10px; } +#export_osm, +#export_mapnik, #export_osmarender { display: none; } -.export_hint { - padding: 0px 12px; - font-style: italic; -} - .export_buttons { width: 100%; text-align: center; @@ -656,21 +754,23 @@ body.site-export #tabnav a#exportanchor { #content { padding: 20px; - margin: 30px 0px 0px 185px; - border-left: 1px solid #ccc; - text-align: left; + position: relative; } .site-edit #content, .site-index #content, .site-export #content { position: fixed; - margin-top: 0px; - left: 0px; - right: 0px; - top: 0px; - bottom: 0px; - padding: 0px; + padding: 0; + top: 30px; bottom: 0; + left: 185px; right: 0; + border-left: 1px solid #ccc; +} + +.wrapper { + margin-left: 185px; + border-left: 1px solid #ccc; + text-align: left; } .site-edit #content { @@ -701,6 +801,7 @@ body.site-export #tabnav a#exportanchor { margin: 10px; position: absolute; top: 0px; + margin-right: 5px; } #slim_header img { @@ -709,23 +810,44 @@ body.site-export #tabnav a#exportanchor { margin-right: 5px; } -/* Rules for text content pages */ - -.wide-table { - width: 100%; -} - -/* Rules for the home page */ +.content-heading { + position: relative; + padding: 20px; + background: #F4F4FF; + h1, h2 { + margin-bottom: 10px; + line-height: 100%; + &:last-child { + margin-bottom: 0; + } + } + p { + margin-top: 10px; + margin-bottom: 0px; + } +} -.site-index #map { - position: absolute; - top: 0px; - bottom: 0px; - left: 0px; - right: 0px; +/* Rules for small maps in content areas */ + +.content_map { + position: relative; + width: 45%; + height: 398px; + border: 1px solid #ccc; + margin-bottom: 20px; + float: right; +} + +.content_map #small_map { + height: 100%; + width: 100%; + margin-bottom: 20px; } -.site-export #map { +/* Rules for the home page */ + +.site-export #map, +.site-index #map { position: absolute; top: 0px; bottom: 0px; @@ -746,88 +868,88 @@ body.site-export #tabnav a#exportanchor { /* Rules for the changeset list shown by the history tab etc */ -#changeset_list_container { - position: relative; -} - #changeset_list { - width: 50%; - font-size: small; - border-collapse: collapse; - border-width: 0px; - margin-top: 1px; - margin-bottom: 1px; - text-align: left; -} - -#changeset_list td { - vertical-align: top; - padding: 3px; -} - -#changeset_list .date { - white-space: nowrap; -} - -#changeset_list .user { - white-space: nowrap; -} - -#changeset_list .area { - white-space: nowrap; -} - -#changeset_list .selected { - background-color: rgb(255, 255, 160); - background-color: rgba(255, 255, 85, 0.5); + width: 100%; + ul { + padding: 10px 0; + margin-bottom: 0px; + border-top: 1px solid #ccc; + &:last-child { + border-bottom: 1px solid #ccc; + } + } + .selected { + background-color: rgb(255, 255, 160); + } + .date, + .user { + border-left: 1px solid #ccc; + padding-left: 5px; + margin-right: 5px; + } } #changeset_list_map { position: absolute; - float: right; - top: 0px; - bottom: 0px; - right: 0px; - width: 49%; - min-height: 400px; - border: solid 1px black; + bottom: 20px; + top: 20px; + right: 20px; + width: 45%; + min-height: 398px; + max-height: 598px; + border: 1px solid #ccc; } /* Rules for the data browser */ -#browse_navigation { - float: right; - width: 250px; - margin-left: 10px; - text-align: center; -} - -table.browse_details th { - white-space: nowrap; -} - -#browse_map { - float: right; - width: 250px; - text-align: right; - margin-left: 10px; +.browse-section { + border-top: 1px solid #ccc; + margin-top: 10px; + padding-top: 10px; + &:first-child { + margin-top: 0; + } + h4, p { + margin-bottom: 5px; + } + p, ul, .bbox { + margin-left: 33.3333%; + } + h4 { + width: 33.3333%; + float: left; + } } -#browse_map #small_map { - width: 250px; - height: 300px; - border: solid 1px black; +.bbox { + div { + width: 33.3333%; + text-align: center; + padding: 5px 0; + overflow: hidden; + text-overflow: ellipsis; + float: left; + } + .max_lat, + .min_lat { + margin-left: auto; + margin-right: auto; + width: 100%; + } } #browse_map .geolink { display: none; } +#browse_map .secondary-actions { + margin-bottom: 10px; +} + /* Rules for the trace list shown by the traces tab etc */ #trace_list { - font-size: small; - border-collapse: collapse; + font-size: 10px; border-width: 0px; text-align: right; } @@ -857,113 +979,231 @@ table.browse_details th { color: red; } -/* Rules for the user list */ +/* Rules for the user profile page */ -#user_list { +#userinformation { + min-height: 100px; + .userinformation-inner { + float: left; + } + h2 { + margin-top: 0; + } + .user-description { + width: 100%; + clear: both; + } + .deemphasize { + margin: 0; + } +} + +.admin-user-info small { + margin-bottom: 10px; + display: inline; + margin-right: 20px; +} + +.activity-block { + border-bottom: 1px solid #ccc; + padding-bottom: 20px; + float: left; + h3 { + margin-bottom: 10px; + } +} + +.contact-activity { + margin-top: 20px; width: 100%; - font-size: small; } -#user_list tr { - vertical-align: middle; +.activity-details p { + margin-left: 72px; + margin-bottom: 0; } -#user_list p { +#friends-container .contact-activity ul { + margin-left: 72px; + } + +.user-view p#no_home_location { + margin: 20px; +} + +.user-view .user_thumbnail { + margin-top: 5px; + float: left; +} + +/* Rules for the user map */ + +.content_map .leaflet-popup-content { + margin: 10px 15px; + min-height: 62px; +} + +.content_map .leaflet-popup-content-wrapper { +-webkit-border-radius: 4px; + border-radius: 4px; +} + +/* Rules for user popups on maps */ + +.user_popup { + min-width: 200px; +} + +.user_popup p { + padding-top: 3px; + padding-bottom: 3px; margin-top: 0px; margin-bottom: 0px; + margin-left: 55px; + margin-right: 2px; } -#user_list_actions { - float: right; - margin-top: 10px; +.user_popup img.user_thumbnail { + float: left; + margin-right: 10px; } -/* Rules for the diary list */ +/* Rules for user popups on maps */ -.diary_entry-list img.user_image { - float: right; +.user_popup p { + margin-bottom: 0; + margin-left: 60px; + font-size: 12px; } -.diary_entry-list img.user_thumbnail { - float: right; +/* Rules for the user list */ + +#user_list { + font-size: 10px; + width: 100%; } -/* Rules for the diary entry view */ +#user_list tr { + vertical-align: middle; +} -.diary_entry-view img.user_image { - float: right; +#user_list p { + margin-top: 0px; + margin-bottom: 0px; } -.diary_entry-view img.user_thumbnail { +#user_list_actions { float: right; + margin-top: 10px; } -/* Rules for the new diary entry page */ +/* Rules for the diary list page */ -.diary_entry div#map { - position: relative; - width: 90%; - height: 400px; - border: 1px solid #ccc; - display: none; +.diary_entry-list img.user_thumbnail { + float: left; } -/* Rules for the login page */ +.diary_post { + position: relative; + margin-top: 20px; + padding-top: 20px; + border-top: 1px solid #ccc; -#login_wrapper div { - margin: 5px; - padding: 15px; - border-radius: 15px; - -moz-border-radius: 15px; + &:first-child { + margin-top: 0; + border-top: 0; + padding-top: 0; + } + h1, h2 { + font-size: 21px; + line-height: 21px; + } + small.deemphasize { + display: block; + } + ul, + ol { + margin-bottom: 20px; + font-style: italic; + margin-left: 20px; + } + ul li { + list-style: disc; + } + ol li { + list-style: decimal; + } + ul.secondary-actions { display: inline-block;} } -#login_login { - background-color: #f5f5ff; - border: 1px solid #f3f3ff; - border-radius: 15px; - -moz-border-radius: 15px; +.content-heading .hide_unless_logged_in { // hacky selector, better to just add a new class to this div + display: inline; } -#login_login h1 { - margin-top: 5px; +.post_heading { + margin-bottom: 20px; + h2 { + margin-top: 0; + margin-bottom: 0; + font-size: 24px; + float: left; + line-height: 32px; + } } -table#login_openid_buttons { - padding-bottom: 10px; -} +/* Rules for the diary entry page */ -#login_openid_buttons td { - padding-left: 10px; - padding-right: 10px; - padding-top: 5px; - padding-bottom: 5px; +.diary_entry { + #map { + position: relative; + width: 90%; + height: 398px; + border: 1px solid #ccc; + display: none; + margin-bottom: 20px; + } + #newcomment { + border-top: 1px solid #ccc; + padding-top: 20px; + margin-top: 10px; + } + .diary-comment { + margin-top: 10px; + &:first-child { + margin-top: 20px; + padding-top: 20px; + border-top: 1px solid #ccc; + } + p { + margin-bottom: 10px; + margin-left: 70px; + } + .comment-heading { + margin-bottom: 0; + margin-top: 0; + } + } } -#login_openid_buttons img { - border: 0; +.diary_entry-view img.user_thumbnail { + float: left; } -#login_signup form.button-to div { - margin: 0px; - padding: 0px; +/* Rules for the login page */ + +#login_openid_buttons li { + float: left; + padding: 5px 10px; } /* Rules for the account confirmation page */ div#contributorTerms { - border: 1px solid black; - padding: 4px; + border: 1px solid #ccc; + padding: 20px; + margin-bottom: 20px; overflow: auto; - width: 95%; - height: 400px; -} - -div#slim_content div#contributorTerms { - width: auto; -} - -div#contributorTerms p#first { - margin-top: 0px; + height: 398px; } div#contributorTerms p#last { @@ -976,14 +1216,7 @@ div#contributorTerms ol { div#contributorTerms img { display: block; - margin-left: auto; - margin-right: auto; - margin-top: 10%; -} - -form#termsForm { - width: 95%; - margin-bottom: 3em; + margin: 20px auto inherit auto; } form#termsForm div#buttons { @@ -991,7 +1224,7 @@ form#termsForm div#buttons { } form#termsForm input#agree { - margin-left: 50px; + margin-left: 40px; } div#slim_content form#termsForm { @@ -999,10 +1232,10 @@ div#slim_content form#termsForm { } p#contributorGuidance { - background-color: #f5f5ff; - border: 1px solid #f3f3ff; - border-radius: 15px; - -moz-border-radius: 15px; + background-color: #f4f4ff; + border-radius: 3px; + -moz-border-radius: 3px; + margin-top: 20px; padding: 10px; } @@ -1018,24 +1251,14 @@ p#contributorGuidance { #accountForm .user_map { position: relative; - width: 500px; - height: 400px; + width: 498px; + height: 398px; border: 1px solid #ccc; } -#accountForm td.accountImage { - img { - vertical-align: top; - margin-top: 3px; - } - - table { - display: inline-block; - - td { - padding-bottom: 0px; - } - } +.accountImage-options { + width: 50%; + display: inline-block; } .nohome .location { @@ -1054,66 +1277,16 @@ p#contributorGuidance { margin-top: 15px; } -/* Rules for the user view */ - -.user-view img.user_image { - float: right; -} - -.user-view .user_map { - float: right; - position: relative; - width: 400px; - height: 400px; - border: 1px solid #ccc; -} - -.user-view .user_map p#no_home_location { - position: absolute; - top: 0px; - bottom: 0px; - width: 90%; - height: 30%; - margin: auto 5% -} - -/* Rules for the user map */ - -.user_map .leaflet-control-pan, -.user_map .leaflet-control-zoomslider { - display: none; -} - -.user_map .leaflet-control-zoom { - display: block; -} - -/* Rules for user popups on maps */ - -.user_popup { - min-width: 200px; -} - -.user_popup p { - padding-top: 3px; - padding-bottom: 3px; - margin-top: 0px; - margin-bottom: 0px; - margin-left: 55px; - margin-right: 2px; -} - -.user_popup img.user_thumbnail { - float: left; +.content_map.settings_map { + float: none; + width: 50%; } /* Rules for message in/out box page */ .messages { width: 100%; - border-collapse: collapse; - border-spacing: 0px; - border-width: 0px; + border: 1px solid #ddd; } .messages tbody tr { @@ -1121,12 +1294,20 @@ p#contributorGuidance { } .messages .inbox-row { - background: #eee; + background: #f8f8ff; +} + +.messages .inbox-row-unread { + background:#CBEEA7; +} + +.right { + float: right; } .messages tr td, .messages tr th { - padding: 0px 5px; + padding: 5px; } .inbox-row .inbox-mark-read { @@ -1134,8 +1315,9 @@ p#contributorGuidance { } .info-line { - border-bottom: 1px solid #ccc; + margin-bottom: 20px; padding: 5px 0px 4px 0px; + border-bottom: 1px solid #ccc; } .info-line form, @@ -1147,48 +1329,30 @@ p#contributorGuidance { vertical-align: middle; } -.right { - float: right; -} - .inbox-row-unread .inbox-mark-unread { display: none; } /* Rules for "flash" notice boxes shown at the top of the content area */ -#error { - border: 1px solid red; - padding: 7px; - background-color: #fff0f0; - margin-bottom: 20px; - border-radius: 5px; - -moz-border-radius: 5px; -} - -#warning { - border: 1px solid orange; - padding: 7px; - background-color: #fff6f0; - margin-bottom: 20px; - border-radius: 5px; - -moz-border-radius: 5px; -} - -#notice { - border: 1px solid green; - padding: 7px; - background-color: #f0fff0; - margin-bottom: 20px; - border-radius: 5px; - -moz-border-radius: 5px; +.flash { + padding: 20px; + &#error { + background-color: #ff7070; + } + &#warning { + background-color: #fff6f0; + } + &#notice { + background-color: #CBEEA7; + } } /* Rules for highlighting fields with rails validation errors */ .field_with_errors { padding: 2px; - background-color: red; + background-color: #ff7070; display: table; } @@ -1196,18 +1360,17 @@ p#contributorGuidance { #errorExplanation { width: 400px; - border: 2px solid red; - padding: 7px; - padding-bottom: 12px; + border: 2px solid #ff7070; + padding: 10px; margin-bottom: 20px; background-color: #f0f0f0; } #errorExplanation h2 { + margin: -10px; + padding: 5px 5px 5px 15px; font-weight: bold; font-size: 12px; - padding: 5px 5px 5px 15px; - margin: -7px; background-color: #c00; color: #fff; text-align: left; @@ -1221,11 +1384,15 @@ p#contributorGuidance { #errorExplanation ul li { font-size: 12px; - list-style: square; + list-style: disc; } /* Rules for forms */ +.submitButton { + text-align: center; +} + .fieldName { vertical-align: top; font-weight: bold; @@ -1239,7 +1406,7 @@ p#contributorGuidance { } .minorNote { - font-size: 0.8em; + font-size: 12px; } input[type="text"], @@ -1250,28 +1417,27 @@ textarea { border: 1px solid #ccc; } -input.openid_url { - background: image-url('openid_input.png') repeat-y left white; - padding-left: 16px; -} - /* Rules for user images */ img.user_image { - max-width: 100px; - max-height: 100px; + width: 100px; + height: 100px; border: 1px solid #ccc; + margin-bottom: 20px; + float: left; + margin-right: 20px; } img.user_thumbnail { - max-width: 50px; - max-height: 100px; + width: 50px; + height: 50px; border: 1px solid #ccc; + margin-right: 20px; } img.user_thumbnail_tiny { - max-width: 25px; - max-height: 25px; + max-width: 24px; + max-height: 24px; border: 1px solid #ccc; } @@ -1294,13 +1460,87 @@ abbr.geo { top: 4px; } +/* General styles for action lists / subnavs / pager navs */ + +ul.secondary-actions { + font-style: normal; + margin-bottom: 0; + margin-left: 0; + &.pager { + display: inline-block; + margin-bottom: 20px; + margin-right: 60px; + } + li { + display: block; + float: left; + list-style: none; + border-left: 1px solid #ccc; + padding-left: 5px; + margin-right: 5px; + &:first-child { + border-left: 0; + padding-left: 0; + } + } + .hidden li, + .hide_unless_logged_in li, + .hide_unless_administrator li { + border-left: 1px solid #ccc; + padding-left: 5px; + } + .hidden:first-child li, + .hide_unless_logged_in:first-child li, + .hide_unless_administrator:first-child li { + border-left: 0; + padding-left: 0; + } +} + +/* Utility for managing inner content areas */ + +.inner22 { padding: 20px;} + +.inner12 { padding: 10px 20px;} + +.inner02 { padding: 0 20px;} + +/* Utility for general button styles */ + +a.button { + display: block; + padding: 5px; + min-width: 120px; + margin-bottom: 10px; + color: white; + background: #7092FF; + text-align: center; + border-radius: 2px; + -moz-border-radius: 2px; + &:hover { + background: blue; + text-decoration: none; + } + &:last-child { + margin-bottom: 0; + } +} + +a.button.submit { + background-color: #cbeea7; + &:hover { + background-color: #9ed485; + } +} /* Rules for doing distinct colour of alternate table rows */ -.table0 { - background: #f6f6f6; +.table0, +.item0 { + background: #F4F4FF; } -.table1 { +.table1, +.item1 { background: #fff; } @@ -1315,61 +1555,51 @@ abbr.geo { .richtext_container { white-space: nowrap; - .richtext_content { display: inline-block; vertical-align: top; - .richtext_preview { display: inline-block; - margin-top: 1px; - margin-bottom: 1px; - border: 4px solid #eee; - background-color: #eee; + padding: 20px; + background-color: #f4f4ff; white-space: normal; - &.loading { background-image: image-url("loading.gif"); background-repeat: no-repeat; background-position: center; } - > :first-child { margin-top: 0px; } } } - .richtext_help { display: inline-block; vertical-align: top; - background-color: #ddd; margin-left: 15px; - padding: 5px 10px 10px 10px; - font-size: 12px; - + background-color: #f8f8ff; + padding: 20px; p { margin: 0px; } - th { vertical-align: top; text-align: left; padding: 0px 15px 0px 0px !important; } - + table > thead th { + font-weight: bold; + } td { - text-align: left; font-family: fixed; line-height: 16px; + text-align: left; padding: 0px !important; } - input.richtext_doedit { margin-top: 5px !important; margin-right: 10px !important; } - input.richtext_dopreview { margin-top: 5px !important; margin-left: 10px !important; diff --git a/app/assets/stylesheets/large.css b/app/assets/stylesheets/large.css index 5ffaee985..cf7c0c202 100644 --- a/app/assets/stylesheets/large.css +++ b/app/assets/stylesheets/large.css @@ -1,11 +1,5 @@ /* Styles specific to large screens */ -/* Rules for greeting bar in the top right corner */ - -#small-greeting { - display: none; -} - /* Rules for OpenLayers maps */ .leaflet-control-zoom { diff --git a/app/assets/stylesheets/small-rtl.css b/app/assets/stylesheets/small-rtl.css index 91d9fa3ed..f4a1a00d4 100644 --- a/app/assets/stylesheets/small-rtl.css +++ b/app/assets/stylesheets/small-rtl.css @@ -1,4 +1,4 @@ /* *= require rtl/common *= require rtl/small - */ + */ \ No newline at end of file diff --git a/app/assets/stylesheets/small.css.scss b/app/assets/stylesheets/small.css.scss index 5d658fdc1..7ce0484b7 100644 --- a/app/assets/stylesheets/small.css.scss +++ b/app/assets/stylesheets/small.css.scss @@ -7,9 +7,33 @@ body { } h1 { + font-size: 16px; +} + +h2, h3, h4 { font-size: 14px; } +.wrapper { + margin: 0; +} + +.site-edit #content, +.site-index #content, +.site-export #content { + left: 0; +} + +.site-edit #top-bar, +.site-index #top-bar, +.site-export #top-bar { + position: relative; +} + +.column-1 { + width: 100%; +} + /* Rules for the whole left sidebar, including the logo */ #left { @@ -21,15 +45,15 @@ h1 { #top-bar { left: 0; margin: 0px; - height: 39px; - padding: 0; + height: 24px; + position: static; } #tabnav { - height: 14px; + height: 19px; margin: 0px; padding-top: 5px; - margin-top: 20px; + margin-top: 26px; font-size: 10px; line-height: 10px; } @@ -37,10 +61,12 @@ h1 { #tabnav a, #tabnav a:link, #tabnav a:visited { font-size: 10px; line-height: 10px; - padding: 2px 5px; + padding: 5px; margin-right: 1px; } +.menuicon { line-height: 10px;} + /* Rules for the site name - shown when left sidebar is hidden */ #small-title { @@ -52,7 +78,7 @@ h1 { left: 5px; top: 5px; padding: 2px; - width: 110px; /* TODO: find better fix for overlap */ + width: 110px; background-color: #fff; z-index: 100; } @@ -63,36 +89,41 @@ h1 { #small-title h1 { position: absolute; - left: 18px; font-size: 12px; + line-height: 18px; margin: 0; + left: 22px; } /* Rules for greeting bar in the top right corner */ #greeting { position: absolute; - right: 5px; - top: 5px; - height: 14px; - font-size: 12px; - line-height: 12px; - white-space: nowrap; + right: 0; + top: 0; background: none; } -#full-greeting { - display: none; +#browse_map ul.secondary-actions { + float: right; } -#small-greeting { - display: inline; +#map { + border: 0; } -/* Rules for OpenLayers maps */ +.content_map { + width: 100%; + border: none; + float: none; + height: 200px; + max-height: none; + min-height: auto; +} -#map { - border: 0; +.content_map #small_map { + height: 300px; + border: 1px solid #ccc; } .leaflet-control-pan, .leaflet-control-zoomslider { @@ -113,12 +144,19 @@ h1 { border-right: 0px; } +.site-export #content, +.site-edit #content, +.site-index #content { + margin-top: 21px; +} + /* Rules for search sidebar when shown */ #sidebar { border: 0px; - border-right: 1px solid #ccccdd; margin: 0px; + width: 50%; + border-right: 1px solid #ccccdd; } .sidebar_title, #sidebar_content { @@ -173,19 +211,23 @@ p.search_results_entry { } #login_openid_buttons td { - padding-left: 2px; - padding-right: 2px; - padding-top: 2px; - padding-bottom: 2px; + padding: 2px; } -/* Rules for the profile page */ +/* Rules for the user view */ .user_map { width: 100% !important; height: 300px !important; } +#userinformation .deemphasize { + position: relative; + right: auto; left: auto; + margin-top: 10px; + top: auto; +} + /* Rules for the user settings page */ #user_new_email { @@ -202,34 +244,21 @@ p.search_results_entry { /* Rules for the browse pages */ -#browse_navigation { - width: 100% !important; - margin-top: 0 !important; -} - -#small_map, #browse_map { - width: 100% !important; +.browse-section.common div{ + clear: both; } -#changeset_list tr { - display: block; - clear: left; +#changeset_list_map { + position: relative; width: 100%; -} - -#changeset_list th { - display: none; -} - -#changeset_list td { - display: block; - float: left; - padding-right: 10px; -} - -#changeset_list td.comment, #changeset_list td.area { - width: 96%; - clear: left; + right: 0; + left: 0; + top: 0px; + margin-bottom: 20px; + float: none; + height: 300px !important; + max-height: auto; + min-height: auto; } /* Rules for the diary entries pages */ diff --git a/app/controllers/changeset_controller.rb b/app/controllers/changeset_controller.rb index 9a4271621..b280de589 100644 --- a/app/controllers/changeset_controller.rb +++ b/app/controllers/changeset_controller.rb @@ -33,24 +33,24 @@ class ChangesetController < ApplicationController end ## - # Return XML giving the basic info about the changeset. Does not + # Return XML giving the basic info about the changeset. Does not # return anything about the nodes, ways and relations in the changeset. def read changeset = Changeset.find(params[:id]) render :text => changeset.to_xml.to_s, :content_type => "text/xml" end - + ## # marks a changeset as closed. this may be called multiple times # on the same changeset, so is idempotent. - def close + def close assert_method :put - - changeset = Changeset.find(params[:id]) + + changeset = Changeset.find(params[:id]) check_changeset_consistency(changeset, @user) # to close the changeset, we'll just set its closed_at time to - # now. this might not be enough if there are concurrency issues, + # now. this might not be enough if there are concurrency issues, # but we'll have to wait and see. changeset.set_closed_time_now @@ -70,11 +70,11 @@ class ChangesetController < ApplicationController cs = Changeset.find(params[:id]) check_changeset_consistency(cs, @user) - + # keep an array of lons and lats lon = Array.new lat = Array.new - + # the request is in pseudo-osm format... this is kind-of an # abuse, maybe should change to some other format? doc = XML::Parser.string(request.raw_post).parse @@ -82,17 +82,17 @@ class ChangesetController < ApplicationController lon << n['lon'].to_f * GeoRecord::SCALE lat << n['lat'].to_f * GeoRecord::SCALE end - + # add the existing bounding box to the lon-lat array lon << cs.min_lon unless cs.min_lon.nil? lat << cs.min_lat unless cs.min_lat.nil? lon << cs.max_lon unless cs.max_lon.nil? lat << cs.max_lat unless cs.max_lat.nil? - + # collapse the arrays to minimum and maximum - cs.min_lon, cs.min_lat, cs.max_lon, cs.max_lat = + cs.min_lon, cs.min_lat, cs.max_lon, cs.max_lat = lon.min, lat.min, lon.max, lat.max - + # save the larger bounding box and return the changeset, which # will include the bigger bounding box. cs.save! @@ -109,7 +109,7 @@ class ChangesetController < ApplicationController # Furthermore, each element in the diff can only reference the current # changeset. # - # Returns: a diffResult document, as described in + # Returns: a diffResult document, as described in # http://wiki.openstreetmap.org/wiki/OSM_Protocol_Version_0.6 def upload # only allow POST requests, as the upload method is most definitely @@ -120,7 +120,7 @@ class ChangesetController < ApplicationController changeset = Changeset.find(params[:id]) check_changeset_consistency(changeset, @user) - + diff_reader = DiffReader.new(request.raw_post, changeset) Changeset.transaction do result = diff_reader.commit @@ -132,45 +132,45 @@ class ChangesetController < ApplicationController # download the changeset as an osmChange document. # # to make it easier to revert diffs it would be better if the osmChange - # format were reversible, i.e: contained both old and new versions of + # format were reversible, i.e: contained both old and new versions of # modified elements. but it doesn't at the moment... # # this method cannot order the database changes fully (i.e: timestamp and # version number may be too coarse) so the resulting diff may not apply - # to a different database. however since changesets are not atomic this + # to a different database. however since changesets are not atomic this # behaviour cannot be guaranteed anyway and is the result of a design # choice. def download changeset = Changeset.find(params[:id]) - + # get all the elements in the changeset which haven't been redacted # and stick them in a big array. - elements = [changeset.old_nodes.unredacted, - changeset.old_ways.unredacted, + elements = [changeset.old_nodes.unredacted, + changeset.old_ways.unredacted, changeset.old_relations.unredacted].flatten - - # sort the elements by timestamp and version number, as this is the - # almost sensible ordering available. this would be much nicer if - # global (SVN-style) versioning were used - then that would be + + # sort the elements by timestamp and version number, as this is the + # almost sensible ordering available. this would be much nicer if + # global (SVN-style) versioning were used - then that would be # unambiguous. - elements.sort! do |a, b| + elements.sort! do |a, b| if (a.timestamp == b.timestamp) a.version <=> b.version else - a.timestamp <=> b.timestamp + a.timestamp <=> b.timestamp end end - + # create an osmChange document for the output result = OSM::API.new.get_xml_doc result.root.name = "osmChange" # generate an output element for each operation. note: we avoid looking - # at the history because it is simpler - but it would be more correct to + # at the history because it is simpler - but it would be more correct to # check these assertions. elements.each do |elt| result.root << - if (elt.version == 1) + if (elt.version == 1) # first version, so it must be newly-created. created = XML::Node.new "create" created << elt.to_xml_node @@ -217,7 +217,7 @@ class ChangesetController < ApplicationController render :text => results.to_s, :content_type => "text/xml" end - + ## # updates a changeset's tags. none of the changeset's attributes are # user-modifiable, so they will be ignored. @@ -238,7 +238,7 @@ class ChangesetController < ApplicationController changeset.update_from(new_changeset, @user) render :text => changeset.to_xml, :mime_type => "text/xml" else - + render :nothing => true, :status => :bad_request end end @@ -253,7 +253,7 @@ class ChangesetController < ApplicationController if params[:display_name] user = User.find_by_display_name(params[:display_name]) - + if user and user.active? if user.data_public? or user == @user changesets = changesets.where(:user_id => user.id) @@ -265,7 +265,7 @@ class ChangesetController < ApplicationController return end end - + if params[:friends] if @user changesets = changesets.where(:user_id => @user.friend_users.public) @@ -294,11 +294,11 @@ class ChangesetController < ApplicationController changesets = conditions_bbox(changesets, bbox) bbox_link = render_to_string :partial => "bbox", :object => bbox end - + if user user_link = render_to_string :partial => "user", :object => user end - + if params[:friends] and @user @title = t 'changeset.list.title_friend' @heading = t 'changeset.list.heading_friend' @@ -343,7 +343,7 @@ class ChangesetController < ApplicationController private #------------------------------------------------------------ # utility functions below. - #------------------------------------------------------------ + #------------------------------------------------------------ ## # if a bounding box was specified do some sanity checks. @@ -380,13 +380,13 @@ private # make sure we found a user raise OSM::APINotFoundError.new if u.nil? - # should be able to get changesets of public users only, or + # should be able to get changesets of public users only, or # our own changesets regardless of public-ness. unless u.data_public? # get optional user auth stuff so that users can see their own # changesets if they're non-public setup_user_auth - + raise OSM::APINotFoundError if @user.nil? or @user.id != u.id end return changesets.where(:user_id => u.id) @@ -397,14 +397,14 @@ private ## # restrict changes to those closed during a particular time period - def conditions_time(changesets, time) + def conditions_time(changesets, time) unless time.nil? - # if there is a range, i.e: comma separated, then the first is + # if there is a range, i.e: comma separated, then the first is # low, second is high - same as with bounding boxes. if time.count(',') == 1 # check that we actually have 2 elements in the array times = time.split(/,/) - raise OSM::APIBadUserInput.new("bad time range") if times.size != 2 + raise OSM::APIBadUserInput.new("bad time range") if times.size != 2 from, to = times.collect { |t| DateTime.parse(t) } return changesets.where("closed_at >= ? and created_at <= ?", from, to) @@ -432,11 +432,11 @@ private if open.nil? return changesets else - return changesets.where("closed_at >= ? and num_changes <= ?", + return changesets.where("closed_at >= ? and num_changes <= ?", Time.now.getutc, Changeset::MAX_ELEMENTS) end end - + ## # query changesets which are closed # ('closed at' time has passed or changes limit is hit) @@ -444,7 +444,7 @@ private if closed.nil? return changesets else - return changesets.where("closed_at < ? or num_changes > ?", + return changesets.where("closed_at < ? or num_changes > ?", Time.now.getutc, Changeset::MAX_ELEMENTS) end end @@ -455,5 +455,5 @@ private def conditions_nonempty(changesets) return changesets.where("num_changes > 0") end - + end diff --git a/app/controllers/diary_entry_controller.rb b/app/controllers/diary_entry_controller.rb index 52ed87f56..d69d58df3 100644 --- a/app/controllers/diary_entry_controller.rb +++ b/app/controllers/diary_entry_controller.rb @@ -29,7 +29,7 @@ class DiaryEntryController < ApplicationController else @user.preferences.create(:k => "diary.default_language", :v => @diary_entry.language_code) end - redirect_to :controller => 'diary_entry', :action => 'list', :display_name => @user.display_name + redirect_to :controller => 'diary_entry', :action => 'list', :display_name => @user.display_name else render :action => 'edit' end @@ -79,9 +79,9 @@ class DiaryEntryController < ApplicationController if @this_user @title = t 'diary_entry.list.user_title', :user => @this_user.display_name @entry_pages, @entries = paginate(:diary_entries, - :conditions => { + :conditions => { :user_id => @this_user.id, - :visible => true + :visible => true }, :order => 'created_at DESC', :per_page => 20) @@ -110,7 +110,7 @@ class DiaryEntryController < ApplicationController :per_page => 20) else require_user - return + return end elsif params[:nearby] if @user @@ -121,11 +121,11 @@ class DiaryEntryController < ApplicationController :visible => true }, :order => 'created_at DESC', - :per_page => 20) + :per_page => 20) else require_user - return - end + return + end else @title = t 'diary_entry.list.title' @entry_pages, @entries = paginate(:diary_entries, :include => :user, @@ -189,14 +189,14 @@ class DiaryEntryController < ApplicationController def comments @comment_pages, @comments = paginate(:diary_comments, - :conditions => { + :conditions => { :user_id => @this_user, :visible => true }, :order => 'created_at DESC', :per_page => 20) @page = (params[:page] || 1).to_i - end + end private ## # require that the user is a administrator, or fill out a helpful error message diff --git a/app/helpers/application_helper.rb b/app/helpers/application_helper.rb index 000677646..10895dd60 100644 --- a/app/helpers/application_helper.rb +++ b/app/helpers/application_helper.rb @@ -10,11 +10,11 @@ module ApplicationHelper end def rss_link_to(*args) - return link_to(image_tag("RSS.gif", :size => "16x16", :border => 0), Hash[*args], { :class => "rsssmall" }); + return link_to(image_tag("RSS.png", :size => "16x16", :border => 0), Hash[*args], { :class => "rsssmall" }); end def atom_link_to(*args) - return link_to(image_tag("RSS.gif", :size => "16x16", :border => 0), Hash[*args], { :class => "rsssmall" }); + return link_to(image_tag("RSS.png", :size => "16x16", :border => 0), Hash[*args], { :class => "rsssmall" }); end def style_rules diff --git a/app/views/browse/_changeset_details.html.erb b/app/views/browse/_changeset_details.html.erb index eb90fad10..47e38973d 100644 --- a/app/views/browse/_changeset_details.html.erb +++ b/app/views/browse/_changeset_details.html.erb @@ -1,92 +1,78 @@ - +
        + +
        +
        +

        <%= t 'browse.changeset_details.created_at' %>

        +

        <%= l changeset_details.created_at %>

        +
        + +
        +

        <%= t 'browse.changeset_details.closed_at' %>

        +

        <%= l changeset_details.closed_at %>

        +
        + + <% if changeset_details.user.data_public? %> +
        +

        <%= t 'browse.changeset_details.belongs_to' %>

        +

        <%= link_to h(changeset_details.user.display_name), :controller => "user", :action => "view", :display_name => changeset_details.user.display_name %>

        +
        + <% end %> +
        -
        - - - - - - - - - - <% if changeset_details.user.data_public? %> - - - - - <% end %> - <%= render :partial => "tag_details", :object => changeset_details %> - - +
        +

        <%= t 'browse.changeset_details.bounding_box' %>

        <% unless changeset_details.has_valid_bbox? %> -
        - <% else - bbox = changeset_details.bbox.to_unscaled - %> - +

        <%= t 'browse.changeset_details.no_bounding_box' %>

        + <% else bbox = changeset_details.bbox.to_unscaled %> +
        +
        <%=bbox.max_lat -%>
        +
        <%=bbox.min_lon -%>
        +
        (<%= link_to t('browse.changeset_details.box'), root_path(:minlon => bbox.min_lon, :minlat => bbox.min_lat, :maxlon => bbox.max_lon, :maxlat => bbox.max_lat, :box => 'yes'), :title => t('browse.changeset_details.show_area_box') %>)
        +
        <%=bbox.max_lon -%>
        +
        <%= bbox.min_lat -%>
        +
        <% end %> - + <% unless @nodes.empty? %> - - - - + + <%= render :partial => 'paging_nav', :locals => { :pages => @node_pages, :page_param => "node_page"} %> <% end %> - + <% unless @ways.empty? %> - - - - + + <%= render :partial => 'paging_nav', :locals => { :pages => @way_pages, :page_param => "way_page" } %> <% end %> - + <% unless @relations.empty? %> - - - - + + <%= render :partial => 'paging_nav', :locals => { :pages => @relation_pages, :page_param => "relation_page" } %> <% end %> -
        <%= t 'browse.changeset_details.created_at' %><%= l changeset_details.created_at %>
        <%= t 'browse.changeset_details.closed_at' %><%= l changeset_details.closed_at %>
        <%= t 'browse.changeset_details.belongs_to' %><%= link_to h(changeset_details.user.display_name), :controller => "user", :action => "view", :display_name => changeset_details.user.display_name %>
        <%= t 'browse.changeset_details.bounding_box' %><%= t 'browse.changeset_details.no_bounding_box' %> - - - - - - - - - - - - -
        <%=bbox.max_lat -%>
        <%=bbox.min_lon -%>(<%= link_to t('browse.changeset_details.box'), root_path(:minlon => bbox.min_lon, :minlat => bbox.min_lat, :maxlon => bbox.max_lon, :maxlat => bbox.max_lat, :box => 'yes'), :title => t('browse.changeset_details.show_area_box') %>)<%=bbox.max_lon -%>
        <%= bbox.min_lat -%>
        -
        <%= t 'browse.changeset_details.has_nodes', :count => @node_pages.item_count %> - +
        +

        <%= t 'browse.changeset_details.has_nodes', :count => @node_pages.item_count %>

        +
          <% @nodes.each do |node| %> -
        +
      • <%= link_to h(printable_name(node, true)), { :action => "node", :id => node.node_id.to_s }, :class => link_class('node', node), :title => link_title(node) %>
      • <% end %> -
        <%= link_to h(printable_name(node, true)), { :action => "node", :id => node.node_id.to_s }, :class => link_class('node', node), :title => link_title(node) %>
        -
        <%= t 'browse.changeset_details.has_ways', :count => @way_pages.item_count %> - +
        +

        <%= t 'browse.changeset_details.has_ways', :count => @way_pages.item_count %>

        +
          <% @ways.each do |way| %> -
        +
      • <%= link_to h(printable_name(way, true)), { :action => "way", :id => way.way_id.to_s }, :class => link_class('way', way), :title => link_title(way) %>
      • <% end %> <%= - #render :partial => "containing_relation", :collection => changeset_details.containing_relation_members + #render :partial => "containing_relation", :collection => changeset_details.containing_relation_members %> -
        <%= link_to h(printable_name(way, true)), { :action => "way", :id => way.way_id.to_s }, :class => link_class('way', way), :title => link_title(way) %>
        -
        <%= t 'browse.changeset_details.has_relations', :count => @relation_pages.item_count %> - +
        +

        <%= t 'browse.changeset_details.has_relations', :count => @relation_pages.item_count %>

        +
          <% @relations.each do |relation| %> -
        +
      • <%= link_to h(printable_name(relation, true)), { :action => "relation", :id => relation.relation_id.to_s }, :class => link_class('relation', relation), :title => link_title(relation) %>
      • <% end %> -
        <%= link_to h(printable_name(relation, true)), { :action => "relation", :id => relation.relation_id.to_s }, :class => link_class('relation', relation), :title => link_title(relation) %>
        -
        +
    \ No newline at end of file diff --git a/app/views/browse/_common_details.html.erb b/app/views/browse/_common_details.html.erb index 07b44a94a..574242f77 100644 --- a/app/views/browse/_common_details.html.erb +++ b/app/views/browse/_common_details.html.erb @@ -1,38 +1,39 @@ - - <% if common_details.visible? %> - <%= t 'browse.common_details.edited_at' %> - <% else %> - <%= t 'browse.common_details.deleted_at' %> - <% end %> - <%= l common_details.timestamp %> - - -<% if common_details.changeset.user.data_public? %> - +
    +
    <% if common_details.visible? %> - <%= t 'browse.common_details.edited_by' %> +

    <%= t 'browse.common_details.edited_at' %>

    <% else %> - <%= t 'browse.common_details.deleted_by' %> +

    <%= t 'browse.common_details.deleted_at' %>

    <% end %> - <%= link_to h(common_details.changeset.user.display_name), :controller => "user", :action => "view", :display_name => common_details.changeset.user.display_name %> - -<% end %> +

    <%= l common_details.timestamp %>

    +
    - - <%= t 'browse.common_details.version' %> - <%= h(common_details.version) %> - + <% if common_details.changeset.user.data_public? %> +
    + <% if common_details.visible? %> +

    <%= t 'browse.common_details.edited_by' %>

    + <% else %> +

    <%= t 'browse.common_details.deleted_by' %>

    + <% end %> +

    <%= link_to h(common_details.changeset.user.display_name), :controller => "user", :action => "view", :display_name => common_details.changeset.user.display_name %>

    +
    + <% end %> - - <%= t 'browse.common_details.in_changeset' %> - <%= link_to common_details.changeset_id, :action => :changeset, :id => common_details.changeset_id %> - +
    +

    <%= t 'browse.common_details.version' %>

    +

    <%= h(common_details.version) %>

    +
    -<% if common_details.changeset.tags['comment'] %> - - <%= t 'browse.common_details.changeset_comment' %> - <%= linkify(h(common_details.changeset.tags['comment'])) %> - -<% end %> +
    +

    <%= t 'browse.common_details.in_changeset' %>

    +

    <%= link_to common_details.changeset_id, :action => :changeset, :id => common_details.changeset_id %>

    +
    + <% if common_details.changeset.tags['comment'] %> +
    +

    <%= t 'browse.common_details.changeset_comment' %>

    +

    <%= linkify(h(common_details.changeset.tags['comment'])) %>

    +
    + <% end %> +
    <%= render :partial => "tag_details", :object => common_details %> diff --git a/app/views/browse/_containing_relation.html.erb b/app/views/browse/_containing_relation.html.erb index 6cc0cce6e..de41d9247 100644 --- a/app/views/browse/_containing_relation.html.erb +++ b/app/views/browse/_containing_relation.html.erb @@ -1,11 +1,8 @@ - - <%= - linked_name = link_to h(printable_name(containing_relation.relation)), :action => "relation", :id => containing_relation.relation.id.to_s - - if containing_relation.member_role.blank? - raw t 'browse.containing_relation.entry', :relation_name => linked_name - else - raw t 'browse.containing_relation.entry_role', :relation_name => linked_name, :relation_role => h(containing_relation.member_role) - end - %> - +
  • <%= + linked_name = link_to h(printable_name(containing_relation.relation)), :action => "relation", :id => containing_relation.relation.id.to_s + if containing_relation.member_role.blank? + raw t 'browse.containing_relation.entry', :relation_name => linked_name + else + raw t 'browse.containing_relation.entry_role', :relation_name => linked_name, :relation_role => h(containing_relation.member_role) + end +%>
  • \ No newline at end of file diff --git a/app/views/browse/_map.html.erb b/app/views/browse/_map.html.erb index d0e5af81e..f44e5bb31 100644 --- a/app/views/browse/_map.html.erb +++ b/app/views/browse/_map.html.erb @@ -1,7 +1,7 @@ -
    +
    <% if map.instance_of? Changeset or (map.instance_of? Node and map.version > 1) or map.visible %> <% content_for :head do %> @@ -31,29 +31,38 @@ <%= content_tag "div", "", :id => "small_map", :data => data %> <%= t 'browse.map.loading' %> - <%= link_to t("browse.map.larger.area"), - root_path(:box => "yes"), - :id => "area_larger_map", - :class => "geolink bbox" %> -
    - <%= link_to h(t("browse.map.edit.area")) + content_tag(:span, "▾", :class => "menuicon"), - edit_path, - :id => "area_edit", - :data => { :editor => preferred_editor }, - :class => "geolink bbox" %> - - <% unless map.instance_of? Changeset %> -
    - <%= link_to t("browse.map.larger." + map.class.to_s.downcase), - root_path, - :id => "object_larger_map", - :class => "geolink object" %> -
    - <%= link_to h(t("browse.map.edit." + map.class.to_s.downcase)) + content_tag(:span, "▾", :class => "menuicon"), +
      +
    • + <%= link_to t("browse.map.larger.area"), + root_path(:box => "yes"), + :id => "area_larger_map", + :class => "geolink bbox" %> +
    • +
    • + <%= link_to h(t("browse.map.edit.area")) + content_tag(:span, "▾", :class => "menuicon"), edit_path, - :id => "object_edit", + :id => "area_edit", :data => { :editor => preferred_editor }, - :class => "geolink object" %> + :class => "geolink bbox" %> +
    • +
    + + <% unless map.instance_of? Changeset %> +
      +
    • + <%= link_to t("browse.map.larger." + map.class.to_s.downcase), + root_path, + :id => "object_larger_map", + :class => "geolink object" %> +
    • +
    • + <%= link_to h(t("browse.map.edit." + map.class.to_s.downcase)) + content_tag(:span, "▾", :class => "menuicon"), + edit_path, + :id => "object_edit", + :data => { :editor => preferred_editor }, + :class => "geolink object" %> +
    • +
    <% end %> <% else %> diff --git a/app/views/browse/_navigation.html.erb b/app/views/browse/_navigation.html.erb index 54e792a9f..0856044c8 100644 --- a/app/views/browse/_navigation.html.erb +++ b/app/views/browse/_navigation.html.erb @@ -1,42 +1,43 @@ <% type = (@next || @prev).class.name.downcase %> -<% margin = @next_by_user || @prev_by_user ? 9 : 18 %> -
    - <% if @next_by_user or @prev_by_user %> - - <% if @prev_by_user %> - <%= link_to t('browse.navigation.paging.user.prev', :id => @prev_by_user.id.to_s), - { :id => @prev_by_user.id }, - { :title => t("browse.navigation.user.prev_#{type}_tooltip", :user => @prev_by_user.user.display_name) } %> - | - <% end %> - <%= - user = (@prev_by_user || @next_by_user).user.display_name - link_to h(user), - { :controller => "changeset", :action => "list", :display_name => user }, - { :title => t("browse.navigation.user.name_#{type}_tooltip", :user => h(user)) } - %> - <% if @next_by_user %> - | - <%= link_to t('browse.navigation.paging.user.next', :id => @next_by_user.id.to_s), - { :id => @next_by_user.id }, - { :title => t("browse.navigation.user.next_#{type}_tooltip", :user => @next_by_user.user.display_name) } %> - <% end %> - -
    - <% end %> - +
      <% if @prev %> +
    • <%= link_to t('browse.navigation.paging.all.prev', :id => @prev.id.to_s), { :id => @prev.id }, { :title => t("browse.navigation.all.prev_#{type}_tooltip") } %> - <% end %> - <% if @prev and @next %> - | +
    • <% end %> <% if @next %> - <%= link_to t('browse.navigation.paging.all.next', :id => @next.id.to_s), - { :id => @next.id }, - { :title => t("browse.navigation.all.next_#{type}_tooltip") } %> +
    • + <%= link_to t('browse.navigation.paging.all.next', :id => @next.id.to_s), + { :id => @next.id }, + { :title => t("browse.navigation.all.next_#{type}_tooltip") } %> +
    • <% end %> - -
    +
+ <% if @next_by_user or @prev_by_user %> +
    + <% if @prev_by_user %> +
  • + <%= link_to t('browse.navigation.paging.user.prev', :id => @prev_by_user.id.to_s), + { :id => @prev_by_user.id }, + { :title => t("browse.navigation.user.prev_#{type}_tooltip", :user => @prev_by_user.user.display_name) } %> +
  • + <% end %> +
  • + <%= + user = (@prev_by_user || @next_by_user).user.display_name + link_to h(user), + { :controller => "changeset", :action => "list", :display_name => user }, + { :title => t("browse.navigation.user.name_#{type}_tooltip", :user => h(user)) } + %> +
  • + <% if @next_by_user %> +
  • + <%= link_to t('browse.navigation.paging.user.next', :id => @next_by_user.id.to_s), + { :id => @next_by_user.id }, + { :title => t("browse.navigation.user.next_#{type}_tooltip", :user => @next_by_user.user.display_name) } %> +
  • + <% end %> +
+ <% end %> diff --git a/app/views/browse/_node_details.html.erb b/app/views/browse/_node_details.html.erb index 23176eab2..308ccd9bf 100644 --- a/app/views/browse/_node_details.html.erb +++ b/app/views/browse/_node_details.html.erb @@ -1,30 +1,28 @@ <% if node_details.redacted? %>

<%= t 'browse.redacted.message_html', :type => t('browse.redacted.type.node'), :redaction_link => link_to(t('browse.redacted.redaction', :id => node_details.redaction.id), node_details.redaction), :version => node_details.version %>

<% else %> - +
<%= render :partial => "common_details", :object => node_details %> <% if node_details.visible -%> -
- - - +
+

<%= t 'browse.node_details.coordinates' %>

+
<%= link_to(content_tag(:span, number_with_delimiter(node_details.lat), :class => "latitude") + ", " + content_tag(:span, number_with_delimiter(node_details.lon), :class => "longitude"), {:controller => 'site', :action => 'index', :lat => h(node_details.lat), :lon => h(node_details.lon), :zoom => "18"}) %>
+
<% end -%> <% unless node_details.ways.empty? and node_details.containing_relation_members.empty? %> - - - - + + <% end %> -
<%= t 'browse.node_details.coordinates' %>
<%= link_to(content_tag(:span, number_with_delimiter(node_details.lat), :class => "latitude") + ", " + content_tag(:span, number_with_delimiter(node_details.lon), :class => "longitude"), {:controller => 'site', :action => 'index', :lat => h(node_details.lat), :lon => h(node_details.lon), :zoom => "18"}) %>
<%= t 'browse.node_details.part_of' %> - +
+

<%= t 'browse.node_details.part_of' %>

+
    <% node_details.ways.each do |way| %> -
+
  • <%= link_to h(printable_name(way)), { :action => "way", :id => way.id.to_s }, :class => link_class('way', way), :title => link_title(way) %>
  • <% end %> <%= render :partial => "containing_relation", :collection => node_details.containing_relation_members %> -
    <%= link_to h(printable_name(way)), { :action => "way", :id => way.id.to_s }, :class => link_class('way', way), :title => link_title(way) %>
    -
    + <% end %> diff --git a/app/views/browse/_paging_nav.html.erb b/app/views/browse/_paging_nav.html.erb index f0342403e..f236b4465 100644 --- a/app/views/browse/_paging_nav.html.erb +++ b/app/views/browse/_paging_nav.html.erb @@ -1,15 +1,14 @@ - +
    <% current_page = pages.current_page %> -<%= t'browse.paging_nav.showing_page' %> -<%= current_page.number %> (<%= current_page.first_item %><% -if (current_page.first_item < current_page.last_item) # if more than 1 trace on page - %>-<%= current_page.last_item %><% +<%= t'browse.paging_nav.showing_page' %> +<%= current_page.number %> (<%= current_page.first_item %><% +if (current_page.first_item < current_page.last_item) # if more than 1 trace on page + %>-<%= current_page.last_item %><% end %> <%= t'browse.paging_nav.of'%> <%= pages.item_count %>) <% if pages.page_count > 1 %> | <%= raw pagination_links_each(pages, {}) { |n| link_to_page(n, page_param) } %> <% end %> - - +
    \ No newline at end of file diff --git a/app/views/browse/_relation_details.html.erb b/app/views/browse/_relation_details.html.erb index 57314817d..bfa5edefc 100644 --- a/app/views/browse/_relation_details.html.erb +++ b/app/views/browse/_relation_details.html.erb @@ -1,31 +1,23 @@ <% if relation_details.redacted? %>

    <%= t 'browse.redacted.message_html', :type => t('browse.redacted.type.relation'), :redaction_link => link_to(t('browse.redacted.redaction', :id => relation_details.redaction.id), relation_details.redaction), :version => relation_details.version %>

    <% else %> - +
    <%= render :partial => "common_details", :object => relation_details %> <% unless relation_details.relation_members.empty? %> -
    - - - +
    +

    <%= t'browse.relation_details.members' %>

    +
      <%= render :partial => "relation_member", :collection => relation_details.relation_members %>
    +
    <% end %> <% unless relation_details.containing_relation_members.empty? %> - - - - +
    +

    <%= t'browse.relation_details.part_of' %>

    +
      <%= render :partial => "containing_relation", :collection => relation_details.containing_relation_members %>
    +
    <% end %> -
    <%= t'browse.relation_details.members' %> - - <%= render :partial => "relation_member", :collection => relation_details.relation_members %> -
    -
    <%= t'browse.relation_details.part_of' %> - - <%= render :partial => "containing_relation", :collection => relation_details.containing_relation_members %> -
    -
    + <% end %> diff --git a/app/views/browse/_relation_member.html.erb b/app/views/browse/_relation_member.html.erb index 71d283971..2673df3c3 100644 --- a/app/views/browse/_relation_member.html.erb +++ b/app/views/browse/_relation_member.html.erb @@ -1,14 +1,12 @@ <% member_class = link_class(relation_member.member_type.downcase, relation_member.member) linked_name = link_to h(printable_name(relation_member.member)), { :action => relation_member.member_type.downcase, :id => relation_member.member_id.to_s }, :title => link_title(relation_member.member) - type_str = t'browse.relation_member.type.' + relation_member.member_type.downcase + type_str = t'browse.relation_member.type.' + relation_member.member_type.downcase %> - - <%= +
  • <%= if relation_member.member_role.blank? raw t'browse.relation_member.entry', :type => type_str, :name => linked_name else raw t'browse.relation_member.entry_role', :type => type_str, :name => linked_name, :role => h(relation_member.member_role) end - %> - + %>
  • \ No newline at end of file diff --git a/app/views/browse/_tag.html.erb b/app/views/browse/_tag.html.erb index 2eadad4f2..298331832 100644 --- a/app/views/browse/_tag.html.erb +++ b/app/views/browse/_tag.html.erb @@ -1,3 +1 @@ - - <%= format_key(tag[0]) %> = <%= format_value(tag[0], tag[1]) %> - +
  • <%= format_key(tag[0]) %> = <%= format_value(tag[0], tag[1]) %>
  • \ No newline at end of file diff --git a/app/views/browse/_tag_details.html.erb b/app/views/browse/_tag_details.html.erb index b5f2d97e7..9d0a2af54 100644 --- a/app/views/browse/_tag_details.html.erb +++ b/app/views/browse/_tag_details.html.erb @@ -1,10 +1,6 @@ <% unless tag_details.tags.empty? %> - - <%= t'browse.tag_details.tags' %> - - - <%= render :partial => "tag", :collection => tag_details.tags.sort %> -
    - - -<% end %> +
    +

    <%= t'browse.tag_details.tags' %>

    +
      <%= render :partial => "tag", :collection => tag_details.tags.sort %>
    +
    +<% end %> \ No newline at end of file diff --git a/app/views/browse/_way_details.html.erb b/app/views/browse/_way_details.html.erb index 1313cb250..d21365b45 100644 --- a/app/views/browse/_way_details.html.erb +++ b/app/views/browse/_way_details.html.erb @@ -1,39 +1,35 @@ <% if way_details.redacted? %>

    <%= t 'browse.redacted.message_html', :type => t('browse.redacted.type.way'), :redaction_link => link_to(t('browse.redacted.redaction', :id => way_details.redaction.id), way_details.redaction), :version => way_details.version %>

    <% else %> - + +
    <%= render :partial => "common_details", :object => way_details %> <% unless way_details.way_nodes.empty? %> -
    - - - + + <% end %> <% unless way_details.containing_relation_members.empty? %> - - - - + <% end %> -
    <%= t'browse.way_details.nodes' %> - +
    +

    <%= t'browse.way_details.nodes' %>

    +
      <% way_details.way_nodes.each do |wn| %> -
    + <% end %> -
    +
  • <%= link_to h(printable_name(wn.node)), { :action => "node", :id => wn.node_id.to_s }, :class => link_class('node', wn.node), :title => link_title(wn.node) %> <% related_ways = wn.node.ways.reject { |w| w.id == wn.way_id } %> <% if related_ways.size > 0 then %> (<%= raw t 'browse.way_details.also_part_of', :count => related_ways.size, :related_ways => related_ways.map { |w| link_to(h(printable_name(w)), { :action => "way", :id => w.id.to_s }, :class => link_class('way', w), :title => link_title(w) ) }.to_sentence %>) <% end %> -
  • -
    <%= t'browse.way_details.part_of' %> - +
    +

    <%= t'browse.way_details.part_of' %>

    +
      <%= render :partial => "containing_relation", :collection => way_details.containing_relation_members %> -
    -
    + <% end %> diff --git a/app/views/browse/changeset.html.erb b/app/views/browse/changeset.html.erb index 2796f7c5f..96a5280a5 100644 --- a/app/views/browse/changeset.html.erb +++ b/app/views/browse/changeset.html.erb @@ -1,12 +1,18 @@ <% content_for :head do %> <%= stylesheet_link_tag 'browse' %> <% end %> + +<% content_for :heading do %> +

    <%= t 'browse.changeset.changeset', :id => @changeset.id %>

    +
      +
    • <%= link_to(t('browse.changeset.changesetxml'), :controller => "changeset", :action => "read") %>
    • +
    • <%= link_to(t('browse.changeset.osmchangexml'), :controller => "changeset", :action => "download") %>
    • +
    +<% end %> + <%= render :partial => "navigation" %> -

    <%= t 'browse.changeset.changeset', :id => @changeset.id %>

    + <% if @changeset.has_valid_bbox? %> <%= render :partial => "map", :object => @changeset %> <% end %> -<%= render :partial => "changeset_details", :object => @changeset %> -
    -<%= link_to(t('browse.changeset.changesetxml'), :controller => "changeset", :action => "read") %> -| <%= link_to(t('browse.changeset.osmchangexml'), :controller => "changeset", :action => "download") %> +<%= render :partial => "changeset_details", :object => @changeset %> \ No newline at end of file diff --git a/app/views/browse/node.html.erb b/app/views/browse/node.html.erb index 8f0a2001b..f41562a7f 100644 --- a/app/views/browse/node.html.erb +++ b/app/views/browse/node.html.erb @@ -5,15 +5,23 @@ <% content_for :head do %> <%= stylesheet_link_tag 'browse' %> <% end %> + +<% content_for :heading do %> +

    <%= t'browse.node.node_title', :node_name => @name %>

    +
      +
    • <%= link_to(t('browse.node.download_xml'), :controller => "node", :action => "read") %>
    • +
    • <%= link_to(t('browse.node.view_history'), :action => "node_history") %>
    • + <% if @node.visible -%> +
    • <%= link_to(t('browse.node.edit'), :controller => "site", :action => "edit", :lat => @node.lat, :lon => @node.lon, :zoom => 18, :node => @node.id) %>
    • + <% end -%> +
    +<% end %> <%= render :partial => "navigation" %> -

    <%= t'browse.node.node_title', :node_name => @name %>

    + <% if @node.visible -%> <%= render :partial => "map", :object => @node %> <% end -%> -<%= render :partial => "node_details", :object => @node %> -
    -<%= link_to(t('browse.node.download_xml'), :controller => "node", :action => "read") %> -| <%= link_to(t('browse.node.view_history'), :action => "node_history") %> -<% if @node.visible -%> -| <%= link_to(t('browse.node.edit'), :controller => "site", :action => "edit", :lat => @node.lat, :lon => @node.lon, :zoom => 18, :node => @node.id) %> -<% end -%> + +
    + <%= render :partial => "node_details", :object => @node %> +
    \ No newline at end of file diff --git a/app/views/browse/node_history.html.erb b/app/views/browse/node_history.html.erb index 937ad7dc0..61fc83492 100644 --- a/app/views/browse/node_history.html.erb +++ b/app/views/browse/node_history.html.erb @@ -2,13 +2,20 @@ @name = printable_name @node @title = t('browse.node_history.node_history') + ' | ' + @name %> -

    <%= raw t'browse.node_history.node_history_title', :node_name => link_to(h(@name), :action => "node", :id => @node.id) %>

    +<% content_for :heading do %> +

    <%= raw t'browse.node_history.node_history_title', :node_name => link_to(h(@name), :action => "node", :id => @node.id) %>

    +
      +
    • <%= link_to(t('browse.node_history.download_xml'), :controller => "old_node", :action => "history") %>
    • +
    • <%= link_to(t('browse.node_history.view_details'), :action => "node") %>
    • +
    +<% end %> + <% if @node.visible -%> -<%= render :partial => "map", :object => @node %> + <%= render :partial => "map", :object => @node %> <% end -%> -<% @node.old_nodes.reverse.each do |node| %> - <%= render :partial => "node_details", :object => node %> -
    -<% end %> -<%= link_to(t('browse.node_history.download_xml'), :controller => "old_node", :action => "history") %> -| <%= link_to(t('browse.node_history.view_details'), :action => "node") %> + +
    + <% @node.old_nodes.reverse.each do |node| %> + <%= render :partial => "node_details", :object => node %> + <% end %> +
    diff --git a/app/views/browse/relation.html.erb b/app/views/browse/relation.html.erb index 28e251ac2..3ba355054 100644 --- a/app/views/browse/relation.html.erb +++ b/app/views/browse/relation.html.erb @@ -5,10 +5,17 @@ <% content_for :head do %> <%= stylesheet_link_tag 'browse' %> <% end %> + +<% content_for :heading do %> +

    <%= t'browse.relation.relation_title', :relation_name => @name %>

    +
      +
    • <%= link_to(t('browse.relation.download_xml'), :controller => "relation", :action => "read") %>
    • +
    • <%= link_to(t('browse.relation.view_history'), :action => "relation_history") %>
    • +
    +<% end %> <%= render :partial => "navigation" %> -

    <%= t'browse.relation.relation_title', :relation_name => @name %>

    <%= render :partial => "map", :object => @relation %> -<%= render :partial => "relation_details", :object => @relation %> -
    -<%= link_to(t('browse.relation.download_xml'), :controller => "relation", :action => "read") %> -| <%= link_to(t('browse.relation.view_history'), :action => "relation_history") %> + +
    + <%= render :partial => "relation_details", :object => @relation %> +
    \ No newline at end of file diff --git a/app/views/browse/relation_history.html.erb b/app/views/browse/relation_history.html.erb index 8fb08e6e9..022248fba 100644 --- a/app/views/browse/relation_history.html.erb +++ b/app/views/browse/relation_history.html.erb @@ -2,11 +2,18 @@ @name = printable_name @relation @title = t('browse.relation_history.relation_history') + ' | ' + @name %> -

    <%= raw t'browse.relation_history.relation_history_title', :relation_name => link_to(h(@name), :action => "relation", :id => @relation.id) %>

    + +<% content_for :heading do %> +

    <%= raw t'browse.relation_history.relation_history_title', :relation_name => link_to(h(@name), :action => "relation", :id => @relation.id) %>

    +
      +
    • <%= link_to(t('browse.relation_history.download_xml'), :controller => "old_relation", :action => "history") %>
    • +
    • <%= link_to(t('browse.relation_history.view_details'), :action => "relation") %>
    • +
    +<% end %> + <%= render :partial => "map", :object => @relation %> +
    <% @relation.old_relations.reverse.each do |relation| %> <%= render :partial => "relation_details", :object => relation %> -
    <% end %> -<%= link_to(t('browse.relation_history.download_xml'), :controller => "old_relation", :action => "history") %> -| <%= link_to(t('browse.relation_history.view_details'), :action => "relation") %> +
    \ No newline at end of file diff --git a/app/views/browse/start.html.erb b/app/views/browse/start.html.erb index b0315dad9..12012a029 100644 --- a/app/views/browse/start.html.erb +++ b/app/views/browse/start.html.erb @@ -1,13 +1,6 @@ -
    - - -
    -
    + +
    +
    diff --git a/app/views/browse/way.html.erb b/app/views/browse/way.html.erb index aa7b5d0b7..15a0dcad8 100644 --- a/app/views/browse/way.html.erb +++ b/app/views/browse/way.html.erb @@ -5,11 +5,19 @@ <% content_for :head do %> <%= stylesheet_link_tag 'browse' %> <% end %> + +<% content_for :heading do %> +

    <%= t'browse.way.way_title', :way_name => @name %>

    +
      +
    • <%= link_to(t('browse.way.download_xml'), :controller => "way", :action => "read") %>
    • +
    • <%= link_to(t('browse.way.view_history'), :action => "way_history") %>
    • +
    • <%= link_to(t('browse.way.edit'), :controller => "site", :action => "edit", :way => @way.id) %>
    • +
    +<% end %> + <%= render :partial => "navigation" %> -

    <%= t'browse.way.way_title', :way_name => @name %>

    <%= render :partial => "map", :object => @way %> -<%= render :partial => "way_details", :object => @way %> -
    -<%= link_to(t('browse.way.download_xml'), :controller => "way", :action => "read") %> -| <%= link_to(t('browse.way.view_history'), :action => "way_history") %> -| <%= link_to(t('browse.way.edit'), :controller => "site", :action => "edit", :way => @way.id) %> + +
    + <%= render :partial => "way_details", :object => @way %> +
    \ No newline at end of file diff --git a/app/views/browse/way_history.html.erb b/app/views/browse/way_history.html.erb index f581dd189..296ebb3dd 100644 --- a/app/views/browse/way_history.html.erb +++ b/app/views/browse/way_history.html.erb @@ -2,11 +2,18 @@ @name = printable_name @way @title = t('browse.way_history.way_history') + ' | ' + @name %> -

    <%= raw t'browse.way_history.way_history_title', :way_name => link_to(h(@name), :action => "way", :id => @way.id) %>

    + +<% content_for :heading do %> +

    <%= raw t'browse.way_history.way_history_title', :way_name => link_to(h(@name), :action => "way", :id => @way.id) %>

    +
      +
    • <%= link_to(t('browse.way_history.download_xml'), :controller => "old_way", :action => "history") %>
    • +
    • <%= link_to(t('browse.way_history.view_details'), :action => "way") %>
    • +
    +<% end %> + <%= render :partial => "map", :object => @way %> +
    <% @way.old_ways.reverse.each do |way| %> <%= render :partial => "way_details", :object => way %> -
    <% end %> -<%= link_to(t('browse.way_history.download_xml'), :controller => "old_way", :action => "history") %> -| <%= link_to(t('browse.way_history.view_details'), :action => "way") %> +
    \ No newline at end of file diff --git a/app/views/changeset/_changeset.html.erb b/app/views/changeset/_changeset.html.erb index ba963ea8e..3e4871ec0 100644 --- a/app/views/changeset/_changeset.html.erb +++ b/app/views/changeset/_changeset.html.erb @@ -12,39 +12,39 @@ end %> -<%= content_tag "tr", :class => cycle('table0', 'table1'), :id => "tr-changeset-#{changeset.id}", :data => {:changeset => changeset_data} do %> - - <%= - id_link = link_to(changeset.id, - {:controller => 'browse', :action => 'changeset', :id => changeset.id}, - {:title => t('changeset.changeset.view_changeset_details')}) - raw t 'changeset.changeset.id', :id => id_link - %> - +<%= content_tag "ul", :class => 'changeset_item', :id => "changeset_#{changeset.id}", :data => {:changeset => changeset_data} do %> +
  • - - + + <%= + link_to(changeset.id, + {:controller => 'browse', :action => 'changeset', :id => changeset.id}, + {:title => t('changeset.changeset.view_changeset_details')}) + %> + + + <% if changeset.closed_at > DateTime.now %> <%= t'changeset.changeset.still_editing' %> <% else %><%= l changeset.closed_at, :format => :long %><% end %> - + <%if showusername %> -
    - <% if changeset.user.data_public? %> - <%= link_to h(changeset.user.display_name), :controller => "changeset", :action => "list", :display_name => changeset.user.display_name %> - <% else %> - <%= t'changeset.changeset.anonymous' %> - <% end %> + <% if changeset.user.data_public? %> + <%= link_to h(changeset.user.display_name), :controller => "changeset", :action => "list", :display_name => changeset.user.display_name %> + <% else %> + <%= t'changeset.changeset.anonymous' %> + <% end %> <% end %> - - - +
  • + +
  • <% if changeset.tags['comment'].to_s != '' %> <%= linkify(h(changeset.tags['comment'])) %> <% else %> <%= t'changeset.changeset.no_comment' %> <% end %> - +
  • + <% end %> diff --git a/app/views/changeset/_changeset_paging_nav.html.erb b/app/views/changeset/_changeset_paging_nav.html.erb index 52c3decb8..46b4635c8 100644 --- a/app/views/changeset/_changeset_paging_nav.html.erb +++ b/app/views/changeset/_changeset_paging_nav.html.erb @@ -1,17 +1,15 @@ -

    - -<% if @page > 1 %> -<%= link_to t('changeset.changeset_paging_nav.previous'), params.merge({ :page => @page - 1 }) %> -<% else %> -<%= t('changeset.changeset_paging_nav.previous') %> -<% end %> - -| <%= t('changeset.changeset_paging_nav.showing_page', :page => @page) %> | - -<% if @edits.size < @page_size %> -<%= t('changeset.changeset_paging_nav.next') %> -<% else %> -<%= link_to t('changeset.changeset_paging_nav.next'), params.merge({ :page => @page + 1 }) %> -<% end %> - -

    +
      + <% if @page > 1 %> +
    • <%= link_to t('changeset.changeset_paging_nav.previous'), params.merge({ :page => @page - 1 }) %>
    • + <% else %> +
    • <%= t('changeset.changeset_paging_nav.previous') %>
    • + <% end %> + +
    • <%= t('changeset.changeset_paging_nav.showing_page', :page => @page) %>
    • + + <% if @edits.size < @page_size %> +
    • <%= t('changeset.changeset_paging_nav.next') %>
    • + <% else %> +
    • <%= link_to t('changeset.changeset_paging_nav.next'), params.merge({ :page => @page + 1 }) %>
    • + <% end %> +
    \ No newline at end of file diff --git a/app/views/changeset/_changesets.html.erb b/app/views/changeset/_changesets.html.erb index 2bd40dafc..fe8da2b38 100644 --- a/app/views/changeset/_changesets.html.erb +++ b/app/views/changeset/_changesets.html.erb @@ -1,4 +1,4 @@ <% showusername = true if showusername.nil? %> - +
    <%= render :partial => 'changeset', :locals => {:showusername => showusername}, :collection => @edits unless @edits.nil? %> -
    +
    diff --git a/app/views/changeset/list.html.erb b/app/views/changeset/list.html.erb index abeea654a..8ecdda946 100644 --- a/app/views/changeset/list.html.erb +++ b/app/views/changeset/list.html.erb @@ -2,28 +2,34 @@ <%= javascript_include_tag "changeset" %> <% end -%> -

    <%= @heading %>

    -

    <%= raw(@description) %>

    +<% content_for :heading do %> -<% if @edits.size > 0 %> - <%= render :partial => 'changeset_paging_nav' %> +

    <%= @heading %>

    +
      +
    • <%= raw(@description) %>
    • + <% unless params[:friends] or params[:nearby] -%> +
    • <%= atom_link_to params.merge({ :page => nil, :action => :feed }) %>
    • + <% end -%> +
    + +<% end %> + +<%= render :partial => 'changeset_paging_nav' %> -
    - <%= render :partial => 'map' %> +<% if @edits.size > 0 %> + <%= render :partial => 'map' %> +
    <%= render :partial => 'changesets', :locals => { :showusername => !params.has_key?(:display_name) } %>
    - <%= render :partial => 'changeset_paging_nav' %> <% elsif @user and @user.display_name == params[:display_name] %> -

    <%= t('changeset.list.empty_user_html') %>

    +

    <%= t('changeset.list.empty_user_html') %>

    <% else %> -

    <%= t('changeset.list.empty_anon_html') %>

    +

    <%= t('changeset.list.empty_anon_html') %>

    <% end %> <% unless params[:friends] or params[:nearby] -%> -<%= atom_link_to params.merge({ :page => nil, :action => :feed }) %> - -<% content_for :head do -%> -<%= auto_discovery_link_tag :atom, params.merge({ :page => nil, :action => :feed }) %> -<% end -%> -<% end -%> + <% content_for :head do -%> + <%= auto_discovery_link_tag :atom, params.merge({ :page => nil, :action => :feed }) %> + <% end -%> +<% end -%> \ No newline at end of file diff --git a/app/views/changeset/timeout.html.erb b/app/views/changeset/timeout.html.erb index a52255722..3ba59fae7 100644 --- a/app/views/changeset/timeout.html.erb +++ b/app/views/changeset/timeout.html.erb @@ -1 +1 @@ -

    <%= t'changeset.timeout.sorry' %>

    +

    <%= t'changeset.timeout.sorry' %>

    \ No newline at end of file diff --git a/app/views/diary_entry/_diary_comment.html.erb b/app/views/diary_entry/_diary_comment.html.erb index 163af888f..ccc1c744f 100644 --- a/app/views/diary_entry/_diary_comment.html.erb +++ b/app/views/diary_entry/_diary_comment.html.erb @@ -1,7 +1,8 @@ -<%= user_thumbnail diary_comment.user %> -

    <%= raw(t('diary_entry.diary_comment.comment_from', :link_user => (link_to h(diary_comment.user.display_name), :controller => 'user', :action => 'view', :display_name => diary_comment.user.display_name), :comment_created_at => l(diary_comment.created_at, :format => :friendly))) %>

    -<%= diary_comment.body.to_html %> -<%= if_administrator(:span) do %> - <%= link_to t('diary_entry.diary_comment.hide_link'), hide_diary_comment_path(:display_name => diary_comment.diary_entry.user.display_name, :id => diary_comment.diary_entry.id, :comment => diary_comment.id), :method => :post, :data=> { :confirm => t('diary_entry.diary_comment.confirm') } %> -<% end %> -
    +
    + <%= user_thumbnail diary_comment.user %> +

    <%= raw(t('diary_entry.diary_comment.comment_from', :link_user => (link_to h(diary_comment.user.display_name), :controller => 'user', :action => 'view', :display_name => diary_comment.user.display_name), :comment_created_at => l(diary_comment.created_at, :format => :friendly))) %>

    + <%= diary_comment.body.to_html %> + <%= if_administrator(:span) do %> + <%= link_to t('diary_entry.diary_comment.hide_link'), hide_diary_comment_path(:display_name => diary_comment.diary_entry.user.display_name, :id => diary_comment.diary_entry.id, :comment => diary_comment.id), :method => :post, :data=> { :confirm => t('diary_entry.diary_comment.confirm') } %> + <% end %> +
    \ No newline at end of file diff --git a/app/views/diary_entry/_diary_entry.html.erb b/app/views/diary_entry/_diary_entry.html.erb index eae60e822..a88e8adbc 100644 --- a/app/views/diary_entry/_diary_entry.html.erb +++ b/app/views/diary_entry/_diary_entry.html.erb @@ -1,30 +1,36 @@ -<%= link_to h(diary_entry.title), :action => 'view', :display_name => diary_entry.user.display_name, :id => diary_entry.id %>
    +
    +
    + <% if !@this_user %> + <%= user_thumbnail diary_entry.user %> + <% end %> -
    - <%= diary_entry.body.to_html %> -
    +

    <%= link_to h(diary_entry.title), :action => 'view', :display_name => diary_entry.user.display_name, :id => diary_entry.id %>

    +
    +
    + <%= diary_entry.body.to_html %> +
    + + <% if diary_entry.latitude and diary_entry.longitude %> + <%= render :partial => "location", :object => diary_entry %> + <% end %> -<% if diary_entry.latitude and diary_entry.longitude %> - <%= render :partial => "location", :object => diary_entry %> -
    -<% end %> + + <%= raw(t 'diary_entry.diary_entry.posted_by', :link_user => (link_to h(diary_entry.user.display_name), :controller => 'user', :action => 'view', :display_name => diary_entry.user.display_name), :created => l(diary_entry.created_at, :format => :friendly), :language_link => (link_to h(diary_entry.language.name), :controller => 'diary_entry', :action => 'list', :display_name => nil, :language => diary_entry.language_code)) %> + -<%= raw(t 'diary_entry.diary_entry.posted_by', :link_user => (link_to h(diary_entry.user.display_name), :controller => 'user', :action => 'view', :display_name => diary_entry.user.display_name), :created => l(diary_entry.created_at, :format => :friendly), :language_link => (link_to h(diary_entry.language.name), :controller => 'diary_entry', :action => 'list', :display_name => nil, :language => diary_entry.language_code)) %> +
      + <% if params[:action] == 'list' %> +
    • <%= link_to t('diary_entry.diary_entry.comment_link'), :action => 'view', :display_name => diary_entry.user.display_name, :id => diary_entry.id, :anchor => 'newcomment' %>
    • +
    • <%= link_to t('diary_entry.diary_entry.reply_link'), :controller => 'message', :action => 'new', :display_name => diary_entry.user.display_name, :title => "Re: #{diary_entry.title}" %>
    • +
    • <%= link_to t('diary_entry.diary_entry.comment_count', :count => diary_entry.visible_comments.count), :action => 'view', :display_name => diary_entry.user.display_name, :id => diary_entry.id, :anchor => 'comments' %>
    • + <% end %> -<% if params[:action] == 'list' %> -
      - <%= link_to t('diary_entry.diary_entry.comment_link'), :action => 'view', :display_name => diary_entry.user.display_name, :id => diary_entry.id, :anchor => 'newcomment' %> - | - <%= link_to t('diary_entry.diary_entry.reply_link'), :controller => 'message', :action => 'new', :display_name => diary_entry.user.display_name, :title => "Re: #{diary_entry.title}" %> - | - <%= link_to t('diary_entry.diary_entry.comment_count', :count => diary_entry.visible_comments.count), :action => 'view', :display_name => diary_entry.user.display_name, :id => diary_entry.id, :anchor => 'comments' %> -<% end %> -<%= if_user(diary_entry.user, :span) do %> - | <%= link_to t('diary_entry.diary_entry.edit_link'), :action => 'edit', :display_name => diary_entry.user.display_name, :id => diary_entry.id %> -<% end %> -<%= if_administrator(:span) do %> - | <%= link_to t('diary_entry.diary_entry.hide_link'), hide_diary_entry_path(:display_name => diary_entry.user.display_name, :id => diary_entry.id), :method => :post, :data => { :confirm => t('diary_entry.diary_entry.confirm') } %> -<% end %> + <%= if_user(diary_entry.user, :span) do %> +
    • <%= link_to t('diary_entry.diary_entry.edit_link'), :action => 'edit', :display_name => diary_entry.user.display_name, :id => diary_entry.id %>
    • + <% end %> -
      -
      + <%= if_administrator(:span) do %> +
    • <%= link_to t('diary_entry.diary_entry.hide_link'), hide_diary_entry_path(:display_name => diary_entry.user.display_name, :id => diary_entry.id), :method => :post, :data => { :confirm => t('diary_entry.diary_entry.confirm') } %>
    • + <% end %> +
    +
    diff --git a/app/views/diary_entry/_diary_list_entry.html.erb b/app/views/diary_entry/_diary_list_entry.html.erb index 496443272..ca583ef47 100644 --- a/app/views/diary_entry/_diary_list_entry.html.erb +++ b/app/views/diary_entry/_diary_list_entry.html.erb @@ -1,2 +1 @@ -<%= user_thumbnail diary_list_entry.user %> -<%= render :partial => "diary_entry", :object => diary_list_entry %> +<%= render :partial => "diary_entry", :object => diary_list_entry %> \ No newline at end of file diff --git a/app/views/diary_entry/comments.html.erb b/app/views/diary_entry/comments.html.erb index f477ab8b6..e486308ea 100644 --- a/app/views/diary_entry/comments.html.erb +++ b/app/views/diary_entry/comments.html.erb @@ -1,23 +1,24 @@ -

    <%= t('diary_entry.comments.has_commented_on', :display_name => @this_user.display_name) %>

    +<% content_for :heading do %> +

    <%= t('diary_entry.comments.has_commented_on', :display_name => @this_user.display_name) %>

    +<% end %> - +
    - - - + + + <% @comments.each do |comment| -%> <% cl = cycle('table0', 'table1') %> - - - + + + <% end -%>
    <%= t 'diary_entry.comments.post' %><%= t 'diary_entry.comments.when' %><%= t 'diary_entry.comments.comment' %><%= t 'diary_entry.comments.post' %><%= t 'diary_entry.comments.when' %><%= t 'diary_entry.comments.comment' %>
    <%= link_to comment.diary_entry.title, :action => :view, :display_name => comment.diary_entry.user.display_name, :id => comment.diary_entry.id %><%= t 'diary_entry.comments.ago', :ago => time_ago_in_words(comment.created_at) %><%= comment.body.to_html %><%= link_to comment.diary_entry.title, :action => :view, :display_name => comment.diary_entry.user.display_name, :id => comment.diary_entry.id %><%= t 'diary_entry.comments.ago', :ago => time_ago_in_words(comment.created_at) %><%= comment.body.to_html %>
    -<%= link_to t('diary_entry.comments.older_comments') , { :page => @comment_pages.current.next} if @comment_pages.current.next %> -<% if @comment_pages.current.next and @comment_pages.current.previous %> -| -<% end %> -<%= link_to t('diary_entry.comments.newer_comments'), { :page => @comment_pages.current.previous } if @comment_pages.current.previous %> +
      +
    • <%= link_to t('diary_entry.comments.older_comments') , { :page => @comment_pages.current.next} if @comment_pages.current.next %>
    • +
    • <%= link_to t('diary_entry.comments.newer_comments'), { :page => @comment_pages.current.previous } if @comment_pages.current.previous %>
    • +
    \ No newline at end of file diff --git a/app/views/diary_entry/edit.html.erb b/app/views/diary_entry/edit.html.erb index 0cdd3b098..0c83ef4ce 100644 --- a/app/views/diary_entry/edit.html.erb +++ b/app/views/diary_entry/edit.html.erb @@ -2,7 +2,9 @@ <%= javascript_include_tag "diary_entry" %> <% end %> -

    <%= @title %>

    +<% content_for :heading do %> +

    <%= @title %>

    +<% end %> <%= error_messages_for 'diary_entry' %> diff --git a/app/views/diary_entry/list.html.erb b/app/views/diary_entry/list.html.erb index 9de2efea5..3353fef79 100644 --- a/app/views/diary_entry/list.html.erb +++ b/app/views/diary_entry/list.html.erb @@ -1,43 +1,47 @@ -<% if @this_user %> - <%= user_image @this_user %> +<% content_for :heading do %> +
    id="userinformation"<% end %> > + <% if @this_user %> + <%= user_image @this_user %> + <% end %> +

    <%= h(@title) %>

    + +
      + <% unless params[:friends] or params[:nearby] -%> +
    • <%= rss_link_to :action => 'rss', :language => params[:language] %>
    • + <% end -%> + + <% if @this_user %> + <%= if_user(@this_user) do %> +
    • <%= link_to image_tag("new.png", :class => "small_icon", :border=>0) + t('diary_entry.list.new'), {:controller => 'diary_entry', :action => 'new'}, {:title => t('diary_entry.list.new_title')} %>
    • + <% end %> + <% else %> + <%= if_logged_in do %> +
    • <%= link_to image_tag("new.png", :class => "small_icon", :border=>0) + t('diary_entry.list.new'), {:controller => 'diary_entry', :action => 'new'}, {:title => t('diary_entry.list.new_title')} %>
    • + <% end %> + <% end %> +
    +
    <% end %> -

    <%= h(@title) %>

    +<% if @entries.empty? %> +

    <%= t 'diary_entry.list.no_entries' %>

    +<% else %> +

    <%= t 'diary_entry.list.recent_entries' %>

    <% if @this_user %> - <%= if_user(@this_user) do %> - <%= link_to image_tag("new.png", :border=>0) + t('diary_entry.list.new'), {:controller => 'diary_entry', :action => 'new'}, {:title => t('diary_entry.list.new_title')} %> - <% end %> + <%= render :partial => 'diary_entry', :collection => @entries %> <% else %> - <%= if_logged_in do %> - <%= link_to image_tag("new.png", :border=>0) + t('diary_entry.list.new'), {:controller => 'diary_entry', :action => 'new'}, {:title => t('diary_entry.list.new_title')} %> - <% end %> + <%= render :partial => 'diary_list_entry', :collection => @entries %> <% end %> -<% if @entries.empty? %> -

    <%= t 'diary_entry.list.no_entries' %>

    -<% else %> -

    <%= t 'diary_entry.list.recent_entries' %>

    - -
    - - <% if @this_user %> - <%= render :partial => 'diary_entry', :collection => @entries %> - <% else %> - <%= render :partial => 'diary_list_entry', :collection => @entries %> - <% end %> - - <%= link_to t('diary_entry.list.older_entries'), { :page => @entry_pages.current.next, :language => params[:language] } if @entry_pages.current.next %> - <% if @entry_pages.current.next and @entry_pages.current.previous %>|<% end %> - <%= link_to t('diary_entry.list.newer_entries'), { :page => @entry_pages.current.previous, :language => params[:language] } if @entry_pages.current.previous %> +<%= link_to t('diary_entry.list.older_entries'), { :page => @entry_pages.current.next, :language => params[:language] } if @entry_pages.current.next %> +<% if @entry_pages.current.next and @entry_pages.current.previous %>|<% end %> +<%= link_to t('diary_entry.list.newer_entries'), { :page => @entry_pages.current.previous, :language => params[:language] } if @entry_pages.current.previous %> -
    <% end %> <% unless params[:friends] or params[:nearby] -%> -<%= rss_link_to :action => 'rss', :language => params[:language] %> - -<% content_for :head do -%> -<%= auto_discovery_link_tag :atom, :action => 'rss', :language => params[:language] %> -<% end -%> + <% content_for :head do -%> + <%= auto_discovery_link_tag :atom, :action => 'rss', :language => params[:language] %> + <% end -%> <% end -%> diff --git a/app/views/diary_entry/no_such_entry.html.erb b/app/views/diary_entry/no_such_entry.html.erb index eef0e47d2..ff9a811c7 100644 --- a/app/views/diary_entry/no_such_entry.html.erb +++ b/app/views/diary_entry/no_such_entry.html.erb @@ -1,2 +1,5 @@ -

    <%= t 'diary_entry.no_such_entry.heading', :id => h(params[:id]) %>

    +<% content_for :heading do %> +

    <%= t 'diary_entry.no_such_entry.heading', :id => h(params[:id]) %>

    +<% end %> +

    <%= t 'diary_entry.no_such_entry.body', :id => h(params[:id]) %>

    diff --git a/app/views/diary_entry/view.html.erb b/app/views/diary_entry/view.html.erb index 1bce441b4..5735188a7 100644 --- a/app/views/diary_entry/view.html.erb +++ b/app/views/diary_entry/view.html.erb @@ -1,26 +1,27 @@ -<%= user_image @entry.user %> - -

    <%= link_to t('diary_entry.view.user_title', :user => h(@entry.user.display_name)), :action => :list %>

    +<% content_for :heading do %> +
    + <%= user_image @entry.user %> +

    <%= link_to t('diary_entry.view.user_title', :user => h(@entry.user.display_name)), :action => :list %>

    +
    +<% end %> <%= render :partial => 'diary_entry', :object => @entry %> - +
    <%= render :partial => 'diary_comment', :collection => @entry.visible_comments %> - +
    <%= if_logged_in(:div) do %> -

    <%= t 'diary_entry.view.leave_a_comment' %>

    +

    <%= t 'diary_entry.view.leave_a_comment' %>

    <%= error_messages_for 'diary_comment' %> <%= form_for :diary_comment, :url => { :action => 'comment' } do |f| %> <%= richtext_area :diary_comment, :body, :cols => 80, :rows => 15 %> -
    -
    <%= submit_tag t('diary_entry.view.save_button') %> <% end %> <% end %> <%= if_not_logged_in(:div) do %> -

    <%= raw t("diary_entry.view.login_to_leave_a_comment", :login_link => link_to(t("diary_entry.view.login"), :controller => 'user', :action => 'login', :referer => request.fullpath)) %>

    -<% end %> +

    <%= raw t("diary_entry.view.login_to_leave_a_comment", :login_link => link_to(t("diary_entry.view.login"), :controller => 'user', :action => 'login', :referer => request.fullpath)) %>

    +<% end %> \ No newline at end of file diff --git a/app/views/export/start.html.erb b/app/views/export/start.html.erb index 539c6f448..f5dcb1462 100644 --- a/app/views/export/start.html.erb +++ b/app/views/export/start.html.erb @@ -1,73 +1,69 @@ <%= form_tag :action => "finish" do %> -

    <%= t'export.start.area_to_export' %>

    - -
    - <%= text_field_tag('maxlat', nil, :size => 10, :class => "export_bound") %> -
    - <%= text_field_tag('minlon', nil, :size => 10, :class => "export_bound") %> - <%= text_field_tag('maxlon', nil, :size => 10, :class => "export_bound") %> -
    - <%= text_field_tag('minlat', nil, :size => 10, :class => "export_bound") %> -

    - <%= t'export.start.manually_select' %> -

    -
    - -

    <%= t'export.start.format_to_export' %>

    +

    <%= t'export.start.area_to_export' %>

    -
    -

    - <%= radio_button_tag("format", "osm") %> <%= t'export.start.osm_xml_data' %> +

    +
    + <%= text_field_tag('maxlat', nil, :size => 10, :class => "export_bound") %>
    - <%= radio_button_tag("format", "mapnik") %> <%= t'export.start.map_image' %> + <%= text_field_tag('minlon', nil, :size => 10, :class => "export_bound") %> + <%= text_field_tag('maxlon', nil, :size => 10, :class => "export_bound") %>
    - <%= radio_button_tag("format", "html") %> <%= t'export.start.embeddable_html' %> -

    + <%= text_field_tag('minlat', nil, :size => 10, :class => "export_bound") %> +
    + <%= t'export.start.manually_select' %>
    +

    <%= t'export.start.format_to_export' %>

    + +
      +
    • <%= radio_button_tag("format", "osm") %> <%= t'export.start.osm_xml_data' %>
    • +
    • <%= radio_button_tag("format", "mapnik") %> <%= t'export.start.map_image' %>
    • +
    • <%= radio_button_tag("format", "html") %> <%= t'export.start.embeddable_html' %>
    • +
    +
    -

    <%= t'export.start.licence' %>

    +

    <%= t'export.start.licence' %>

    -
    +

    <%= raw t'export.start.export_details' %>

    -

    <%= t'export.start.too_large.heading' %>

    +

    <%= t'export.start.too_large.heading' %>

    -
    +

    <%= t'export.start.too_large.body' %>

    -

    <%= t'export.start.options' %>

    +

    <%= t'export.start.options' %>

    -
    -

    <%= t'export.start.format' %> <%= select_tag("mapnik_format", options_for_select([["PNG", "png"], ["JPEG", "jpeg"], ["SVG", "svg"], ["PDF", "pdf"]], "png")) %>

    -

    <%= t'export.start.scale' %> 1 : <%= text_field_tag("mapnik_scale", nil, :size => 8) %> (<%= t'export.start.max' %> 1 : )

    -

    <%= t'export.start.image_size' %> x

    -
    +
      +
    • <%= t'export.start.format' %> <%= select_tag("mapnik_format", options_for_select([["PNG", "png"], ["JPEG", "jpeg"], ["SVG", "svg"], ["PDF", "pdf"]], "png")) %>
    • +
    • <%= t'export.start.scale' %> 1 : <%= text_field_tag("mapnik_scale", nil) %>

      (<%= t'export.start.max' %> 1 : )

    • +
    • <%= t'export.start.image_size' %> x
    • +
    -

    <%= t'export.start.options' %>

    - -
    -

    <%= t'export.start.add_marker' %>

    - +

    <%= t'export.start.options' %>

    + +
    + + <%= t'export.start.add_marker' %>
    -

    <%= t'export.start.output' %>

    +

    <%= t'export.start.output' %>

    -
    -

    -

    <%= t'export.start.paste_html' %>

    +
    + +

    <%= t'export.start.paste_html' %>

    diff --git a/app/views/geocoder/description.html.erb b/app/views/geocoder/description.html.erb index a01954d72..018f77765 100644 --- a/app/views/geocoder/description.html.erb +++ b/app/views/geocoder/description.html.erb @@ -1,10 +1,10 @@ <% @sources.each do |source| %> <% if source[:types] %> -

    <%= raw(t("geocoder.description.title.#{source[:name]}", :types => t("geocoder.description.types.#{source[:types]}"))) %>

    +

    <%= raw(t("geocoder.description.title.#{source[:name]}", :types => t("geocoder.description.types.#{source[:types]}"))) %>

    <% else %> -

    <%= raw(t("geocoder.description.title.#{source[:name]}")) %>

    +

    <%= raw(t("geocoder.description.title.#{source[:name]}")) %>

    <% end %> -
    +
    <%= image_tag "searching.gif", :class => "search_searching" %>
    <% end %> <% end %> diff --git a/app/views/geocoder/search.html.erb b/app/views/geocoder/search.html.erb index 7bc8fcd76..8674c9580 100644 --- a/app/views/geocoder/search.html.erb +++ b/app/views/geocoder/search.html.erb @@ -1,5 +1,5 @@ <% @sources.each do |source| %> -

    <%= raw(t "geocoder.search.title.#{source}") %>

    +

    <%= raw(t "geocoder.search.title.#{source}") %>

    "> <%= image_tag "searching.gif", :class => "search_searching" %>
    diff --git a/app/views/layouts/_flash.html.erb b/app/views/layouts/_flash.html.erb index 0380a5094..a3cbbc207 100644 --- a/app/views/layouts/_flash.html.erb +++ b/app/views/layouts/_flash.html.erb @@ -1,11 +1,11 @@ <% if flash[:error] %> -
    <%= raw flash[:error] %>
    +
    <%=image_tag("notice.png", :class => "small_icon", :border=>0)%><%= raw flash[:error] %>
    <% end %> <% if flash[:warning] %> -
    <%= raw flash[:warning] %>
    +
    <%=image_tag("notice.png", :class => "small_icon", :border=>0)%><%= raw flash[:warning] %>
    <% end %> <% if flash[:notice] %> -
    <%= raw flash[:notice] %>
    +
    <%=image_tag("notice.png", :class => "small_icon", :border=>0)%><%= raw flash[:notice] %>
    <% end %> diff --git a/app/views/layouts/site.html.erb b/app/views/layouts/site.html.erb index f1ae440e7..d36681d97 100644 --- a/app/views/layouts/site.html.erb +++ b/app/views/layouts/site.html.erb @@ -6,66 +6,7 @@ <%= link_to(image_tag("osm_logo.png", :size => "16x16", :alt => t('layouts.logo.alt_text')), root_path) %>

    <%= t 'layouts.project_name.h1' %>

    -
    - <%= render :partial => "layouts/flash", :locals => { :flash => flash } %> - <%= yield %> -
    -
    - - <% if @user and @user.id %> - <%= raw(t 'layouts.welcome_user', :user_link => (link_to h(@user.display_name), user_path(:display_name => @user.display_name), :title => t('layouts.welcome_user_link_tooltip'))) %> - <%= link_to t('layouts.welcome_user_link_tooltip'), user_path(:display_name => @user.display_name) %> | - <%= yield :greeting %> - <%= render :partial => "layouts/inbox" %> | - <%= link_to t('layouts.logout'), logout_path(:session => request.session_options[:id], :referer => request.fullpath), {:id => 'logoutanchor', :title => t('layouts.logout_tooltip')}%> - <% else %> - <%= link_to t('layouts.log_in'), login_path(:referer => request.fullpath), {:id => 'loginanchor', :title => t('layouts.log_in_tooltip')} %> | - <%= link_to t('layouts.sign_up'), user_new_path, {:id => 'registeranchor', :title => t('layouts.sign_up_tooltip')} %> - <% end %> - -
      -
    • <%= link_to t('layouts.view'), root_path, { - :id => 'viewanchor', - :title => t('layouts.view_tooltip'), - :class => 'geolink llz layers' - } %>
    • -
    • <%= link_to h(t('layouts.edit')) + content_tag(:span, "▾", :class => "menuicon"), edit_path, { - :id => 'editanchor', - :title => t('javascripts.site.edit_tooltip'), - :data => { :minzoom => 13, :editor => preferred_editor }, - :class => 'geolink llz object disabled' - } %>
    • -
    • <%= link_to t('layouts.history'), browse_changesets_path, { - :id => 'historyanchor', - :data => { :minzoom => 11 }, - :title => t('javascripts.site.history_tooltip'), - :class => 'geolink bbox' - } %>
    • -
    • <%= link_to t('layouts.export'), export_path, { - :id => 'exportanchor', - :title => t('layouts.export_tooltip'), - :data => { :url => url_for(:controller => :export, :action => :start) }, - :class => 'geolink llz layers' - } %>
    • -
    -
    - - -
    +
    +
    +
      + <% if @user and @user.id %> +
    • <%=link_to h(@user.display_name), user_path(:display_name => @user.display_name), :title => t('layouts.welcome_user_link_tooltip') %>
    • +
    • <%= yield :greeting %>
    • +
    • <%= render :partial => "layouts/inbox" %>
    • +
    • <%= link_to t('layouts.logout'), logout_path(:session => request.session_options[:id], :referer => request.fullpath), {:id => 'logoutanchor', :title => t('layouts.logout_tooltip')}%>
    • + <% else %> +
    • <%= link_to t('layouts.log_in'), login_path(:referer => request.fullpath), {:id => 'loginanchor', :title => t('layouts.log_in_tooltip')} %>
    • +
    • <%= link_to t('layouts.sign_up'), user_new_path, {:id => 'registeranchor', :title => t('layouts.sign_up_tooltip')} %>
    • + <% end %> +
    +
      +
    • <%= link_to t('layouts.view'), root_path, { + :id => 'viewanchor', + :title => t('layouts.view_tooltip'), + :class => 'geolink llz layers' + } %>
    • +
    • <%= link_to h(t('layouts.edit')) + content_tag(:span, "▾", :class => "menuicon"), edit_path, { + :id => 'editanchor', + :title => t('javascripts.site.edit_tooltip'), + :data => { :minzoom => 13, :editor => preferred_editor }, + :class => 'geolink llz object disabled' + } %>
    • +
    • <%= link_to t('layouts.history'), browse_changesets_path, { + :id => 'historyanchor', + :data => { :minzoom => 11 }, + :title => t('javascripts.site.history_tooltip'), + :class => 'geolink bbox' + } %>
    • +
    • <%= link_to t('layouts.export'), export_path, { + :id => 'exportanchor', + :title => t('layouts.export_tooltip'), + :data => { :url => url_for(:controller => :export, :action => :start) }, + :class => 'geolink llz layers' + } %>
    • +
    +
    + + +
    + <%= render :partial => "layouts/flash", :locals => { :flash => flash } %> + <% if content_for? :heading %> +
    + <%= yield :heading %> +
    + <% end %> +
    + <%= yield %> +
    +
    <% if defined?(PIWIK_LOCATION) and defined?(PIWIK_SITE) -%> <% end -%> diff --git a/app/views/message/_message_summary.html.erb b/app/views/message/_message_summary.html.erb index b52eb1f1b..26001c0bd 100644 --- a/app/views/message/_message_summary.html.erb +++ b/app/views/message/_message_summary.html.erb @@ -1,7 +1,7 @@ "> <%= link_to h(message_summary.sender.display_name), :controller => 'user', :action => 'view', :display_name => message_summary.sender.display_name %> <%= link_to h(message_summary.title), :controller => 'message', :action => 'read', :message_id => message_summary.id %> - <%= l message_summary.sent_on, :format => :friendly %> + <%= l message_summary.sent_on, :format => :friendly %> <%= button_to t('message.message_summary.unread_button'), {:controller => 'message', :action => 'mark', :message_id => message_summary.id, :mark => 'unread'}, { :remote => true } %> <%= button_to t('message.message_summary.read_button'), {:controller => 'message', :action => 'mark', :message_id => message_summary.id, :mark => 'read'}, { :remote => true } %> <%= button_to t('message.message_summary.delete_button'), :controller => 'message', :action => 'delete', :message_id => message_summary.id, :referer => request.fullpath %> diff --git a/app/views/message/_sent_message_summary.html.erb b/app/views/message/_sent_message_summary.html.erb index 962cf0a5d..3580822ae 100644 --- a/app/views/message/_sent_message_summary.html.erb +++ b/app/views/message/_sent_message_summary.html.erb @@ -1,6 +1,6 @@ <%= link_to h(sent_message_summary.recipient.display_name), :controller => 'user', :action => 'view', :display_name => sent_message_summary.recipient.display_name %> <%= link_to h(sent_message_summary.title), :controller => 'message', :action => 'read', :message_id => sent_message_summary.id %> - <%= l sent_message_summary.sent_on, :format => :friendly %> + <%= l sent_message_summary.sent_on, :format => :friendly %> <%= button_to t('message.sent_message_summary.delete_button'), :controller => 'message', :action => 'delete', :message_id => sent_message_summary.id, :referer => request.fullpath %> diff --git a/app/views/message/inbox.html.erb b/app/views/message/inbox.html.erb index ec1460745..4a898c085 100644 --- a/app/views/message/inbox.html.erb +++ b/app/views/message/inbox.html.erb @@ -1,7 +1,8 @@ -
    -

    <%= t'message.inbox.my_inbox'%>/<%= link_to t('message.inbox.outbox'), outbox_path(@user.display_name) %>

    +<% content_for :heading do %> +

    <%= t'message.inbox.my_inbox'%>/<%= link_to t('message.inbox.outbox'), outbox_path(@user.display_name) %>

    +<% end %> -<%= render :partial => "message_count" %> +

    <%= render :partial => "message_count" %>

    <% if @user.messages.size > 0 %> @@ -21,4 +22,3 @@ <% else %>
    <%= raw(t'message.inbox.no_messages_yet', :people_mapping_nearby_link => link_to(t('message.inbox.people_mapping_nearby'), :controller => 'user', :action => 'view', :display_name => @user.display_name)) %>
    <% end %> - diff --git a/app/views/message/new.html.erb b/app/views/message/new.html.erb index ed95e2252..96f6b080d 100644 --- a/app/views/message/new.html.erb +++ b/app/views/message/new.html.erb @@ -1,4 +1,6 @@ -

    <%= raw(t'message.new.send_message_to', :name => link_to(h(@this_user.display_name), {:controller => 'user', :action => 'view', :display_name => @this_user.display_name})) %>

    +<% content_for :heading do %> +

    <%= raw(t'message.new.send_message_to', :name => link_to(h(@this_user.display_name), {:controller => 'user', :action => 'view', :display_name => @this_user.display_name})) %>

    +<% end %> <%= error_messages_for 'message' %> diff --git a/app/views/message/no_such_message.html.erb b/app/views/message/no_such_message.html.erb index 6fd52124a..9bf6ddbea 100644 --- a/app/views/message/no_such_message.html.erb +++ b/app/views/message/no_such_message.html.erb @@ -1,2 +1,5 @@ -

    <%= t'message.no_such_message.heading' %>

    +<% content_for :heading do %> +

    <%= t'message.no_such_message.heading' %>

    +<% end %> +

    <%= t'message.no_such_message.body' %>

    diff --git a/app/views/message/outbox.html.erb b/app/views/message/outbox.html.erb index 30d55e1aa..ebf04c9fb 100644 --- a/app/views/message/outbox.html.erb +++ b/app/views/message/outbox.html.erb @@ -1,6 +1,8 @@ -

    <%= raw(t'message.outbox.my_inbox', :inbox_link => link_to(t('message.outbox.inbox'), inbox_path(@user.display_name))) %>/<%= t'message.outbox.outbox' %>

    +<% content_for :heading do %> +

    <%= raw(t'message.outbox.my_inbox', :inbox_link => link_to(t('message.outbox.inbox'), inbox_path(@user.display_name))) %>/<%= t'message.outbox.outbox' %>

    +<% end %> -

    <%= t'message.outbox.messages', :count => @user.sent_messages.size %>

    +

    <%= t'message.outbox.messages', :count => @user.sent_messages.size %>

    <% if @user.sent_messages.size > 0 %>
    diff --git a/app/views/message/read.html.erb b/app/views/message/read.html.erb index de36cafe8..e62873ad4 100644 --- a/app/views/message/read.html.erb +++ b/app/views/message/read.html.erb @@ -1,37 +1,36 @@ -
    <% if @user == @message.recipient %> - + <% content_for :heading do %>

    <%= h(@message.title) %>

    - -
    - <%= user_thumbnail_tiny @message.sender %> - <%= link_to h(@message.sender.display_name), :controller => 'user', :action => 'view', :display_name => @message.sender.display_name %> -
    - <%= l @message.sent_on, :format => :friendly %> - <%= button_to t('message.read.reply_button'), :controller => 'message', :action => 'reply', :message_id => @message.id %> - <%= button_to t('message.read.unread_button'), :controller => 'message', :action => 'mark', :message_id => @message.id, :mark => 'unread' %> -
    + <% end %> + +
    + <%= user_thumbnail_tiny @message.sender %> + <%= link_to h(@message.sender.display_name), :controller => 'user', :action => 'view', :display_name => @message.sender.display_name %> +
    + <%= l @message.sent_on, :format => :friendly %> + <%= button_to t('message.read.reply_button'), :controller => 'message', :action => 'reply', :message_id => @message.id %> + <%= button_to t('message.read.unread_button'), :controller => 'message', :action => 'mark', :message_id => @message.id, :mark => 'unread' %>
    +
    - <%= @message.body.to_html %> + <%= @message.body.to_html %> - <%= link_to t('message.read.back_to_inbox'), :controller => 'message', :action => 'inbox', :display_name => @user.display_name %> + <%= link_to t('message.read.back_to_inbox'), :controller => 'message', :action => 'inbox', :display_name => @user.display_name %> <% else %> -

    <%= h(@message.title) %>

    +

    <%= h(@message.title) %>

    -
    - <%= user_thumbnail_tiny @message.recipient %> - <%= link_to h(@message.recipient.display_name), :controller => 'user', :action => 'view', :display_name => @message.recipient.display_name %> -
    - <%= l @message.sent_on, :format => :friendly %> -
    +
    + <%= user_thumbnail_tiny @message.recipient %> + <%= link_to h(@message.recipient.display_name), :controller => 'user', :action => 'view', :display_name => @message.recipient.display_name %> +
    + <%= l @message.sent_on, :format => :friendly %>
    +
    - <%= @message.body.to_html %> + <%= @message.body.to_html %> - <%= link_to t('message.read.back_to_outbox'), :controller => 'message', :action => 'outbox', :display_name => @user.display_name %> + <%= link_to t('message.read.back_to_outbox'), :controller => 'message', :action => 'outbox', :display_name => @user.display_name %> -<% end %> -
    +<% end %> \ No newline at end of file diff --git a/app/views/oauth/authorize.html.erb b/app/views/oauth/authorize.html.erb index eaf43f9d1..31729d4f0 100644 --- a/app/views/oauth/authorize.html.erb +++ b/app/views/oauth/authorize.html.erb @@ -1,5 +1,8 @@ -

    Authorize access to your account

    -

    <%= raw t('oauth.oauthorize.request_access', :app_name => link_to(@token.client_application.name, @token.client_application.url), :user => link_to(@user.display_name, :controller => :user, :action => :view, :display_name => @user.display_name)) %>

    +<% content_for :heading do %> +

    Authorize access to your account

    +

    <%= raw t('oauth.oauthorize.request_access', :app_name => link_to(@token.client_application.name, @token.client_application.url), :user => link_to(@user.display_name, :controller => :user, :action => :view, :display_name => @user.display_name)) %>

    +<% end %> + <%= form_tag authorize_url do %> <%= hidden_field_tag "oauth_token", @token.token %> <%- if params[:oauth_callback] -%> diff --git a/app/views/oauth/authorize_failure.html.erb b/app/views/oauth/authorize_failure.html.erb index d8110c94f..d5e53e4c4 100644 --- a/app/views/oauth/authorize_failure.html.erb +++ b/app/views/oauth/authorize_failure.html.erb @@ -1 +1,3 @@ -

    You have disallowed this request

    +<% content_for :heading do %> +

    You have disallowed this request

    +<% end %> \ No newline at end of file diff --git a/app/views/oauth/authorize_success.html.erb b/app/views/oauth/authorize_success.html.erb index 89512db31..aa2a52f66 100644 --- a/app/views/oauth/authorize_success.html.erb +++ b/app/views/oauth/authorize_success.html.erb @@ -1,4 +1,6 @@ -

    You have allowed this request

    +<% content_for :heading do %> +

    You have allowed this request

    +<% end %> <% if @token.oob? and not @token.oauth10? %>

    The verification code is <%= @token.verifier %>

    diff --git a/app/views/oauth_clients/edit.html.erb b/app/views/oauth_clients/edit.html.erb index b27f9b8fc..99aab0ed0 100644 --- a/app/views/oauth_clients/edit.html.erb +++ b/app/views/oauth_clients/edit.html.erb @@ -1,4 +1,7 @@ -

    <%= t'oauth_clients.edit.title' %>

    +<% content_for :heading do %> +

    <%= t'oauth_clients.edit.title' %>

    +<% end %> + <%= form_for @client_application, :url => oauth_client_path(@client_application.user.display_name, @client_application), :html => { :method => :put } do |f| %> <%= render :partial => "form", :locals => { :f => f } %>
    diff --git a/app/views/oauth_clients/index.html.erb b/app/views/oauth_clients/index.html.erb index d698728f5..80dbc6079 100644 --- a/app/views/oauth_clients/index.html.erb +++ b/app/views/oauth_clients/index.html.erb @@ -1,4 +1,7 @@ -

    <%= t'oauth_clients.index.title' %>

    +<% content_for :heading do %> +

    <%= t'oauth_clients.index.title' %>

    +<% end %> + <% unless @tokens.empty? %>

    <%= t'oauth_clients.index.my_tokens' %>

    <%= t'oauth_clients.index.list_tokens' %>

    @@ -16,7 +19,7 @@ <% end %> <% end %> - <% end %> + <% end %>
    <% end %>

    <%= t'oauth_clients.index.my_apps' %>

    @@ -30,4 +33,4 @@ <% end %> <% end %> <% end %> -

    <%= link_to t('oauth_clients.index.register_new'), :action => :new %>

    +

    <%= link_to t('oauth_clients.index.register_new'), :action => :new %>

    \ No newline at end of file diff --git a/app/views/oauth_clients/new.html.erb b/app/views/oauth_clients/new.html.erb index 2cd748ac6..1c18857b1 100644 --- a/app/views/oauth_clients/new.html.erb +++ b/app/views/oauth_clients/new.html.erb @@ -1,6 +1,9 @@ -

    <%= t'oauth_clients.new.title' %>

    +<% content_for :heading do %> +

    <%= t'oauth_clients.new.title' %>

    +<% end %> + <%= form_for :client_application, :url => { :action => :create } do |f| %> <%= render :partial => "form", :locals => { :f => f } %>
    <%= submit_tag t('oauth_clients.new.submit') %> -<% end %> +<% end %> \ No newline at end of file diff --git a/app/views/oauth_clients/show.html.erb b/app/views/oauth_clients/show.html.erb index 8139a2d73..6b9169211 100644 --- a/app/views/oauth_clients/show.html.erb +++ b/app/views/oauth_clients/show.html.erb @@ -1,4 +1,6 @@ -

    <%= t('oauth_clients.show.title', :app_name => @client_application.name) %>

    +<% content_for :heading do %> +

    <%= t('oauth_clients.show.title', :app_name => @client_application.name) %>

    +<% end %>

    <%= t'oauth_clients.show.key' %> <%=@client_application.key %>

    diff --git a/app/views/redactions/edit.html.erb b/app/views/redactions/edit.html.erb index 2a5e69d0a..2dd63c9cb 100644 --- a/app/views/redactions/edit.html.erb +++ b/app/views/redactions/edit.html.erb @@ -1,5 +1,8 @@ <% @title = t 'redaction.edit.title' %> -

    <%= t 'redaction.edit.heading' %>

    + +<% content_for :heading do %> +

    <%= t 'redaction.edit.heading' %>

    +<% end %> <%= form_for(@redaction) do |f| %> <%= f.error_messages %> diff --git a/app/views/redactions/index.html.erb b/app/views/redactions/index.html.erb index 1fa683de8..a5a85c38d 100644 --- a/app/views/redactions/index.html.erb +++ b/app/views/redactions/index.html.erb @@ -1,5 +1,7 @@ <% @title = t('redaction.index.title') %> -

    <%= t('redaction.index.heading') %>

    +<% content_for :heading do %> +

    <%= t('redaction.index.heading') %>

    +<% end %> <% unless @redactions.empty? %> <%= render :partial => 'redactions' %> diff --git a/app/views/redactions/new.html.erb b/app/views/redactions/new.html.erb index c714acdbc..5004c0e1e 100644 --- a/app/views/redactions/new.html.erb +++ b/app/views/redactions/new.html.erb @@ -1,5 +1,7 @@ <% @title = t 'redaction.new.title' %> -

    <%= t 'redaction.new.heading' %>

    +<% content_for :heading do %> +

    <%= t 'redaction.new.heading' %>

    +<% end %> <%= form_for(@redaction) do |f| %> <%= f.error_messages %> diff --git a/app/views/redactions/show.html.erb b/app/views/redactions/show.html.erb index 1a24f15b4..798ed962a 100644 --- a/app/views/redactions/show.html.erb +++ b/app/views/redactions/show.html.erb @@ -1,5 +1,7 @@ <% @title = t('redaction.show.title') %> -

    <%= t('redaction.show.heading', :title => @redaction.title) %>

    +<% content_for :heading do %> +

    <%= t('redaction.show.heading', :title => @redaction.title) %>

    +<% end %>

    <%= t 'redaction.show.user' %> diff --git a/app/views/site/_home_link.html.erb b/app/views/site/_home_link.html.erb index 615200b5e..4d781c123 100644 --- a/app/views/site/_home_link.html.erb +++ b/app/views/site/_home_link.html.erb @@ -1,5 +1,5 @@ <% if @user and !@user.home_lon.nil? and !@user.home_lat.nil? %> <% content_for :greeting do %> - <%= link_to t("layouts.home"), "#", :class => "set_position", :data => { :lat => @user.home_lat, :lon => @user.home_lon, :zoom => 15 }, :title => t("layouts.home_tooltip") %> | + <%= link_to t("layouts.home"), "#", :class => "set_position", :data => { :lat => @user.home_lat, :lon => @user.home_lon, :zoom => 15 }, :title => t("layouts.home_tooltip") %> <% end %> <% end %> diff --git a/app/views/site/_sidebar.html.erb b/app/views/site/_sidebar.html.erb index bea37d0d9..60d057512 100644 --- a/app/views/site/_sidebar.html.erb +++ b/app/views/site/_sidebar.html.erb @@ -1,10 +1,8 @@

    diff --git a/app/views/site/copyright.html.erb b/app/views/site/copyright.html.erb index 2f44386da..160dfea7c 100644 --- a/app/views/site/copyright.html.erb +++ b/app/views/site/copyright.html.erb @@ -1,35 +1,39 @@ +<% content_for :heading do %> <% if @locale == 'en' %> - <% if t('license_page.legal_babble', :locale => I18n.locale) != t('license_page.legal_babble', :locale => :en) %> -

    <%= t 'license_page.native.title' %>

    -

    - <%= raw t 'license_page.native.text', - :native_link => link_to(t('license_page.native.native_link'), - :controller => 'site', - :action => 'copyright', - :copyright_locale => nil), - :mapping_link => link_to(t('license_page.native.mapping_link'), - :controller => 'site', - :action => 'index') %> -

    -
    - <% end %> -<% else %> - - <% if t('license_page.legal_babble', :locale => @locale) != t('license_page.legal_babble', :locale => :en) %> -

    <%= t 'license_page.foreign.title' %>

    -

    - <%= raw t 'license_page.foreign.text', - :english_original_link => link_to(t('license_page.foreign.english_link'), - :controller => 'site', - :action => 'copyright', - :copyright_locale => 'en') %> -

    -
    + + <% if t('license_page.legal_babble', :locale => I18n.locale) != t('license_page.legal_babble', :locale => :en) %> +

    <%= t 'license_page.native.title' %>

    +

    + <%= raw t 'license_page.native.text', + :native_link => link_to(t('license_page.native.native_link'), + :controller => 'site', + :action => 'copyright', + :copyright_locale => nil), + :mapping_link => link_to(t('license_page.native.mapping_link'), + :controller => 'site', + :action => 'index') %> +

    +
    + <% end %> + <% else %> + + <% if t('license_page.legal_babble', :locale => @locale) != t('license_page.legal_babble', :locale => :en) %> +

    <%= t 'license_page.foreign.title' %>

    +

    + <%= raw t 'license_page.foreign.text', + :english_original_link => link_to(t('license_page.foreign.english_link'), + :controller => 'site', + :action => 'copyright', + :copyright_locale => 'en') %> +

    +
    + <% end %> <% end %> -<% end %> -

    <%= t "license_page.legal_babble.title_html", :locale => @locale %>

    +

    <%= t "license_page.legal_babble.title_html", :locale => @locale %>

    + +<% end %>

    <%= t "license_page.legal_babble.intro_1_html", :locale => @locale %>

    <%= t "license_page.legal_babble.intro_2_html", :locale => @locale %>

    @@ -42,8 +46,6 @@

    <%= image_tag("attribution_example.png", :alt => t('license_page.legal_babble.attribution_example.alt'), :border => 0, - :width => 193, - :height => 69, :title => t('license_page.legal_babble.attribution_example.title')) %>

    <%= t "license_page.legal_babble.more_title_html", :locale => @locale %>

    @@ -66,4 +68,4 @@

    <%= t "license_page.legal_babble.infringement_title_html", :locale => @locale %>

    <%= t "license_page.legal_babble.infringement_1_html", :locale => @locale %>

    -

    <%= t "license_page.legal_babble.infringement_2_html", :locale => @locale %>

    +

    <%= t "license_page.legal_babble.infringement_2_html", :locale => @locale %>

    \ No newline at end of file diff --git a/app/views/trace/_trace.html.erb b/app/views/trace/_trace.html.erb index 32717d824..ac5233669 100644 --- a/app/views/trace/_trace.html.erb +++ b/app/views/trace/_trace.html.erb @@ -10,21 +10,21 @@ <% end %> <%= link_to trace.name, {:controller => 'trace', :action => 'view', :display_name => trace.user.display_name, :id => trace.id} %> - ... - <% if trace.inserted %> + ... + <% if trace.inserted %> (<%= t'trace.trace.count_points', :count => trace.size.to_s.gsub(/(\d)(?=(\d{3})+$)/,'\1,') %>) - <% end %> + <% end %> ... <%= t'trace.trace.ago', :time_in_words_ago => time_ago_in_words(trace.timestamp) %> <%= link_to t('trace.trace.more'), {:controller => 'trace', :action => 'view', :display_name => trace.user.display_name, :id => trace.id}, {:title => t('trace.trace.trace_details')} %> / <%= link_to_if trace.inserted?, t('trace.trace.map'), {:controller => 'site', :action => 'index', :lat => trace.latitude, :lon => trace.longitude, :zoom => 14}, {:title => t('trace.trace.view_map')} %> / <%= link_to t('trace.trace.edit'), {:controller => 'site', :action => 'edit', :gpx => trace.id }, {:title => t('trace.trace.edit_map')} %> <%= t('trace.trace.' + trace.visibility) %>
    - <%= h(trace.description) %> + <%= t('trace.list.description') %>
    <%= t'trace.trace.by' %> <%=link_to h(trace.user.display_name), {:controller => 'user', :action => 'view', :display_name => trace.user.display_name} %> <% if !trace.tags.empty? %> - <%= t'trace.trace.in' %> + <%= t'trace.trace.in' %> <%= raw(trace.tags.collect { |tag| link_to_tag tag.tag }.join(", ")) %> <% end %> diff --git a/app/views/trace/_trace_optionals.html.erb b/app/views/trace/_trace_optionals.html.erb index d541c985b..a20091c07 100644 --- a/app/views/trace/_trace_optionals.html.erb +++ b/app/views/trace/_trace_optionals.html.erb @@ -1,7 +1,6 @@ <% content_for :optionals do %>
    -

    <%= t'trace.trace_optionals.tags' %>

    -
    +

    <%= t'trace.trace_optionals.tags' %>

    <% if @all_tags %> <% @all_tags.each do |tag| %> <%= link_to_tag tag %>
    diff --git a/app/views/trace/create.html.erb b/app/views/trace/create.html.erb index 23346a951..1f91ef801 100644 --- a/app/views/trace/create.html.erb +++ b/app/views/trace/create.html.erb @@ -1,4 +1,6 @@ -

    <%= t'trace.create.upload_trace' %>

    +<% content_for :heading do %> +

    <%= t'trace.create.upload_trace' %>

    +<% end %> <%= error_messages_for 'trace' %> diff --git a/app/views/trace/edit.html.erb b/app/views/trace/edit.html.erb index a694d55bb..32c07db75 100644 --- a/app/views/trace/edit.html.erb +++ b/app/views/trace/edit.html.erb @@ -1,4 +1,6 @@ -

    <%= t 'trace.edit.heading', :name => h(@trace.name) %>

    +<% content_for :heading do %> +

    <%= t 'trace.edit.heading', :name => h(@trace.name) %>

    +<% end %> @@ -8,7 +10,7 @@ <%= t'trace.edit.filename' %> <%= @trace.name %> (<%= link_to t('trace.edit.download'), :controller => 'trace', :action => 'data', :id => @trace.id %>) - + <%= t'trace.edit.uploaded_at' %> <%= l @trace.timestamp, :format => :friendly %> diff --git a/app/views/trace/list.html.erb b/app/views/trace/list.html.erb index 5a33defc8..c600df110 100644 --- a/app/views/trace/list.html.erb +++ b/app/views/trace/list.html.erb @@ -1,25 +1,27 @@ -

    <%= h(@title) %>

    +<% content_for :heading do %> +

    <%= h(@title) %>

    +
      +
    • <%= t('trace.list.description') %>
    • +
    • <%= rss_link_to :action => 'georss', :display_name => @display_name, :tag => @tag %>
    • +
    • <%= link_to t('trace.trace_header.upload_trace'), :action => 'create' %>
    • + <% if @tag %> +
    • <%= link_to t('trace.trace_header.see_all_traces'), :controller => 'trace', :action => 'list', :display_name => nil, :tag => nil, :page => nil %>
    • +
    • <%= link_to t('trace.trace_header.see_your_traces'), :action => 'mine', :tag => nil, :page => nil %>
    • + <% else %> + <% if @display_name %> +
    • <%= link_to t('trace.trace_header.see_all_traces'), :controller => 'trace', :action => 'list', :display_name => nil, :tag => nil, :page => nil %>
    • + <% end %> + <%= unless_user(@target_user, :li) do %> + <%= link_to t('trace.trace_header.see_your_traces'), :action => 'mine', :tag => nil, :page => nil %> + <% end %> + <% end %> +
    +<% end %> <% content_for :head do %> <%= auto_discovery_link_tag :atom, :action => 'georss', :display_name => @display_name, :tag => @tag %> <% end %> -

    - <%= rss_link_to :action => 'georss', :display_name => @display_name, :tag => @tag %> - | <%= link_to t('trace.trace_header.upload_trace'), :action => 'create' %> - <% if @tag %> - | <%= link_to t('trace.trace_header.see_all_traces'), :controller => 'trace', :action => 'list', :display_name => nil, :tag => nil, :page => nil %> - | <%= link_to t('trace.trace_header.see_your_traces'), :action => 'mine', :tag => nil, :page => nil %> - <% else %> - <% if @display_name %> - | <%= link_to t('trace.trace_header.see_all_traces'), :controller => 'trace', :action => 'list', :display_name => nil, :tag => nil, :page => nil %> - <% end %> - <%= unless_user(@target_user, :span) do %> - | <%= link_to t('trace.trace_header.see_your_traces'), :action => 'mine', :tag => nil, :page => nil %> - <% end %> - <% end %> -

    - <% if @traces.size > 0 %> <%= render :partial => 'trace_paging_nav' %> @@ -33,7 +35,7 @@ <%= render :partial => 'trace_paging_nav' %> <% else %> -

    <%= t 'trace.list.empty_html', :upload_link => trace_create_path %>

    +

    <%= t 'trace.list.empty_html', :upload_link => trace_create_path %>

    <% end %> <%= render :partial => 'trace_optionals' %> diff --git a/app/views/trace/offline.html.erb b/app/views/trace/offline.html.erb index d9cfb3926..ed6c1c58d 100644 --- a/app/views/trace/offline.html.erb +++ b/app/views/trace/offline.html.erb @@ -1,2 +1,5 @@ +<% content_for :heading do %>

    <%= t 'trace.offline.heading' %>

    +<% end %> +

    <%= t 'trace.offline.message' %>

    diff --git a/app/views/trace/view.html.erb b/app/views/trace/view.html.erb index 5a7c5bcc6..0887e5605 100644 --- a/app/views/trace/view.html.erb +++ b/app/views/trace/view.html.erb @@ -1,4 +1,6 @@ -

    <%= t 'trace.view.heading', :name => h(@trace.name) %>

    +<% content_for :heading do %> +

    <%= t 'trace.view.heading', :name => h(@trace.name) %>

    +<% end %> <% if STATUS != :gpx_offline %> <% if @trace.inserted %> @@ -12,7 +14,7 @@ <%= t'trace.view.filename' %> <%= @trace.name %> (<%= link_to t('trace.view.download'), :controller => 'trace', :action => 'data', :id => @trace.id %>) - + <%= t'trace.view.uploaded' %> <%= l @trace.timestamp, :format => :friendly %> diff --git a/app/views/user/_contact.html.erb b/app/views/user/_contact.html.erb index 1a28c21bd..e723af9e7 100644 --- a/app/views/user/_contact.html.erb +++ b/app/views/user/_contact.html.erb @@ -1,4 +1,4 @@ - +
    <% user_data = { :lon => contact.home_lon, @@ -10,41 +10,41 @@ <%= content_tag "td", :rowspan => 3, :data => {:user => user_data} do %> <%= user_thumbnail contact %> <% end %> - - <%= link_to h(contact.display_name), :controller => 'user', :action => 'view', :display_name => contact.display_name %> - <% if @this_user.home_lon and @this_user.home_lat and contact.home_lon and contact.home_lat %> - <% distance = @this_user.distance(contact) %> - <% if distance < 1 %> - (<%= t 'user.view.m away', :count => (distance * 1000).round %>) +
    +

    + <%= link_to h(contact.display_name), :controller => 'user', :action => 'view', :display_name => contact.display_name %> + <% if @this_user.home_lon and @this_user.home_lat and contact.home_lon and contact.home_lat %> + <% distance = @this_user.distance(contact) %> + <% if distance < 1 %> + (<%= t 'user.view.m away', :count => (distance * 1000).round %>) + <% else %> + (<%= t 'user.view.km away', :count => distance.round %>) + <% end %> + <% end %> +

    +

    + <% changeset = contact.changesets.first %> + <% if changeset %> + <%= t('user.view.latest edit', :ago => t('user.view.ago', :time_in_words_ago => time_ago_in_words(changeset.created_at))) %> + <% comment = changeset.tags['comment'].to_s != '' ? changeset.tags['comment'] : t('changeset.changeset.no_comment') %> + "<%= link_to(comment, + {:controller => 'browse', :action => 'changeset', :id => changeset.id}, + {:title => t('changeset.changeset.view_changeset_details')}) + %>" <% else %> - (<%= t 'user.view.km away', :count => distance.round %>) + <%= t'changeset.changeset.no_edits' %> + <% end %> +

    + +
      +
    • <%= link_to t('user.view.send message'), :controller => 'message', :action => 'new', :display_name => contact.display_name %>
    • +
    • + <% if @user.is_friends_with?(contact) %> + <%= link_to t('user.view.remove as friend'), remove_friend_path(:display_name => contact.display_name, :referer => request.fullpath), :method => :post %> + <% else %> + <%= link_to t('user.view.add as friend'), make_friend_path(:display_name => contact.display_name, :referer => request.fullpath), :method => :post %> <% end %> - <% end %> - - - - - <% changeset = contact.changesets.first %> - <% if changeset %> - <%= t('user.view.latest edit', :ago => t('user.view.ago', :time_in_words_ago => time_ago_in_words(changeset.created_at))) %> - <% comment = changeset.tags['comment'].to_s != '' ? changeset.tags['comment'] : t('changeset.changeset.no_comment') %> - "<%= link_to(comment, - {:controller => 'browse', :action => 'changeset', :id => changeset.id}, - {:title => t('changeset.changeset.view_changeset_details')}) - %>" - <% else %> - <%= t'changeset.changeset.no_edits' %> - <% end %> - - - - - <%= link_to t('user.view.send message'), :controller => 'message', :action => 'new', :display_name => contact.display_name %> - | - <% if @user.is_friends_with?(contact) %> - <%= link_to t('user.view.remove as friend'), remove_friend_path(:display_name => contact.display_name, :referer => request.fullpath), :method => :post %> - <% else %> - <%= link_to t('user.view.add as friend'), make_friend_path(:display_name => contact.display_name, :referer => request.fullpath), :method => :post %> - <% end %> - - +
    • +
    +
    +
    diff --git a/app/views/user/account.html.erb b/app/views/user/account.html.erb index 179e1b2f6..2782fc808 100644 --- a/app/views/user/account.html.erb +++ b/app/views/user/account.html.erb @@ -1,7 +1,10 @@ -

    <%= t 'user.account.my settings' %>

    - -<%= link_to t('user.account.return to profile'), :controller => 'user', :action => 'view', :display_name => @user.display_name %> | -<%= link_to t('user.view.oauth settings'), :controller => 'oauth_clients', :action => 'index' %> +<% content_for :heading do %> +

    <%= t 'user.account.my settings' %>

    +
      +
    • <%= link_to t('user.account.return to profile'), :controller => 'user', :action => 'view', :display_name => @user.display_name %>
    • +
    • <%= link_to t('user.view.oauth settings'), :controller => 'oauth_clients', :action => 'index' %>
    • +
    +<% end %> <%= error_messages_for 'user' %> <%= form_for :user, :html => { :multipart => true } do |f| %> @@ -86,7 +89,7 @@ <%= user_image @user %> - +
    <% if @user.image.file? %> @@ -130,7 +133,7 @@ <% content_for :head do %> <%= javascript_include_tag "user" %> <% end %> - <%= content_tag "div", "", :id => "map", :class => "user_map set_location" %> + <%= content_tag "div", "", :id => "map", :class => "content_map settings_map set_location" %> @@ -146,4 +149,4 @@

    <%= t 'user.account.public editing note.heading' %>

    <%= raw t 'user.account.public editing note.text' %> <%= button_to t('user.account.make edits public button'), :action => :go_public %> -<% end %> +<% end %> \ No newline at end of file diff --git a/app/views/user/blocked.html.erb b/app/views/user/blocked.html.erb index 69e700634..f175fe18a 100644 --- a/app/views/user/blocked.html.erb +++ b/app/views/user/blocked.html.erb @@ -1,4 +1,6 @@ -

    <%= t 'user.new.heading' %>

    +<% content_for :heading do %> +

    <%= t 'user.new.heading' %>

    +<% end %>

    <%= t 'user.new.no_auto_account_create' %>

    diff --git a/app/views/user/confirm.html.erb b/app/views/user/confirm.html.erb index f48cd8867..3b68ddd5b 100644 --- a/app/views/user/confirm.html.erb +++ b/app/views/user/confirm.html.erb @@ -2,7 +2,9 @@ $("#content").hide(); -

    <%= t 'user.confirm.heading' %>

    +<% content_for :heading do %> +

    <%= t 'user.confirm.heading' %>

    +<% end %>

    <%= t 'user.confirm.press confirm button' %>

    diff --git a/app/views/user/confirm_email.html.erb b/app/views/user/confirm_email.html.erb index 5efc6a2c5..1170631ca 100644 --- a/app/views/user/confirm_email.html.erb +++ b/app/views/user/confirm_email.html.erb @@ -2,7 +2,9 @@ $("#content").hide(); -

    <%= t 'user.confirm_email.heading' %>

    +<% content_for :heading do %> +

    <%= t 'user.confirm_email.heading' %>

    +<% end %>

    <%= t 'user.confirm_email.press confirm button' %>

    diff --git a/app/views/user/list.html.erb b/app/views/user/list.html.erb index 398debe1e..240a7590d 100644 --- a/app/views/user/list.html.erb +++ b/app/views/user/list.html.erb @@ -1,6 +1,8 @@ <% @title = t('user.list.title') %> -

    <%= t('user.list.heading') %>

    +<% content_for :heading do %> +

    <%= t('user.list.heading') %>

    +<% end %> <% unless @users.empty? %> <%= form_tag do %> diff --git a/app/views/user/login.html.erb b/app/views/user/login.html.erb index 5208d0a7f..c2deada5c 100644 --- a/app/views/user/login.html.erb +++ b/app/views/user/login.html.erb @@ -1,67 +1,61 @@ -
    -
    -

    <%= t 'user.login.heading' %>

    +
    +<% content_for :heading do %> +

    <%= t 'user.login.heading' %>

    +<% end %> - <%= form_tag({ :action => "login" }, { :id => "login_form" }) do %> - <%= hidden_field_tag('referer', h(params[:referer])) %> + <%= form_tag({ :action => "login" }, { :id => "login_form" }) do %> + <%= hidden_field_tag('referer', h(params[:referer])) %> -

    <%= t 'user.login.no account' %> <%= link_to t('user.login.register now'), :action => :new, :referer => params[:referer] %>

    +

    <%= t 'user.login.no account' %> <%= link_to t('user.login.register now'), :action => :new, :referer => params[:referer] %>

    -
    <%= radio_button_tag "image_action", "keep", !@user.image_use_gravatar %>
    - - - - - - - - - - -
    <%= t 'user.login.email or username' %><%= text_field_tag "username", params[:username], :size => 28, :maxlength => 255, :tabindex => 1 %>
    <%= t 'user.login.password' %><%= password_field_tag "password", "", :size => 28, :maxlength => 255, :tabindex => 2 %> (<%= link_to t('user.login.lost password link'), :controller => 'user', :action => 'lost_password' %>)
    <%= check_box_tag "remember_me", "yes", false, :tabindex => 3 %> - -
    - <%= submit_tag t('user.login.login_button'), :tabindex => 4 %> -
    + + + + + + + + + + + +
    <%= t 'user.login.email or username' %><%= text_field_tag "username", params[:username], :size => 28, :maxlength => 255, :tabindex => 1 %>
    <%= t 'user.login.password' %><%= password_field_tag "password", "", :size => 28, :maxlength => 255, :tabindex => 2 %> (<%= link_to t('user.login.lost password link'), :controller => 'user', :action => 'lost_password' %>)
    <%= check_box_tag "remember_me", "yes", false, :tabindex => 3 %> + +
    + <%= submit_tag t('user.login.login_button'), :tabindex => 4 %> +
    +

    <%= t 'user.login.with openid' %>

    -
    +
      +
    • <%= link_to image_tag("openid.png", :alt => t("user.login.openid_providers.openid.title")), "#", :id => "openid_open_url", :title => t("user.login.openid_providers.openid.title") %>
    • +
    • <%= openid_button "google", "gmail.com" %>
    • +
    • <%= openid_button "yahoo", "me.yahoo.com" %>
    • +
    • <%= openid_button "myopenid", "myopenid.com" %>
    • +
    • <%= openid_button "wordpress", "wordpress.com" %>
    • +
    • <%= openid_button "aol", "aol.com" %>
    • +
    -

    <%= t 'user.login.with openid' %>

    + + + + + + + + + +
    + <%= raw t 'user.login.openid', :logo => openid_logo %> + + <%= url_field_tag("openid_url", "", { :size => 28, :maxlength => 255, :tabindex => 3, :class => "openid_url" }) %> + (<%= t 'user.account.openid.link text' %>) +
    <%= check_box_tag "remember_me", "yes", false, :tabindex => 5 %>
    - - - - - - - - - -
    <%= link_to image_tag("openid.png", :alt => t("user.login.openid_providers.openid.title")), "#", :id => "openid_open_url", :title => t("user.login.openid_providers.openid.title") %><%= openid_button "google", "gmail.com" %><%= openid_button "yahoo", "me.yahoo.com" %><%= openid_button "myopenid", "myopenid.com" %><%= openid_button "wordpress", "wordpress.com" %><%= openid_button "aol", "aol.com" %>
    + <%= submit_tag t('user.login.login_button'), :tabindex => 6, :id => "login_openid_submit" %> + <% end %> - - - - - - - - - -
    - <%= raw t 'user.login.openid', :logo => openid_logo %> - - <%= url_field_tag("openid_url", "", { :size => 28, :maxlength => 255, :tabindex => 3, :class => "openid_url" }) %> - (<%= t 'user.account.openid.link text' %>) -
    <%= check_box_tag "remember_me", "yes", false, :tabindex => 5 %>
    - - <%= submit_tag t('user.login.login_button'), :tabindex => 6, :id => "login_openid_submit" %> - <% end %> - -
    -