From 448d34757e0723e8076c9fe3efa86c31d324b9d1 Mon Sep 17 00:00:00 2001 From: Naomi Guyer Date: Fri, 17 Aug 2012 14:08:43 +1200 Subject: [PATCH] ENHANCEMENT: UI Improvements Replaced the old page icons, and moved where the blog specific fields appear in the CMS to above the content area --- .gitignore | 2 ++ code/BlogEntry.php | 2 +- code/BlogHolder.php | 8 ++++---- code/BlogTree.php | 11 ++++++++--- images/blogholder-file.gif | Bin 297 -> 0 bytes images/blogholder-file.png | Bin 0 -> 1054 bytes images/blogpage-file.gif | Bin 189 -> 0 bytes images/blogpage-file.png | Bin 0 -> 1181 bytes images/blogtree-file.png | Bin 0 -> 1115 bytes 9 files changed, 15 insertions(+), 8 deletions(-) create mode 100644 .gitignore delete mode 100644 images/blogholder-file.gif create mode 100644 images/blogholder-file.png delete mode 100644 images/blogpage-file.gif create mode 100644 images/blogpage-file.png create mode 100644 images/blogtree-file.png diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..88007e7 --- /dev/null +++ b/.gitignore @@ -0,0 +1,2 @@ + +images/.DS_Store diff --git a/code/BlogEntry.php b/code/BlogEntry.php index 292b6e9..79a3cf2 100644 --- a/code/BlogEntry.php +++ b/code/BlogEntry.php @@ -15,7 +15,7 @@ class BlogEntry extends Page { static $can_be_root = false; - static $icon = "blog/images/blogpage"; + static $icon = "blog/images/blogpage-file.png"; static $has_one = array(); diff --git a/code/BlogHolder.php b/code/BlogHolder.php index 7ad3e27..1b4f7f5 100644 --- a/code/BlogHolder.php +++ b/code/BlogHolder.php @@ -12,7 +12,7 @@ * BlogHolders have a form on them for easy posting, and an owner that can post to them, BlogTrees don't */ class BlogHolder extends BlogTree implements PermissionProvider { - static $icon = "blog/images/blogholder"; + static $icon = "blog/images/blogholder-file.png"; static $db = array( 'TrackBacksEnabled' => 'Boolean', @@ -34,9 +34,9 @@ class BlogHolder extends BlogTree implements PermissionProvider { $fields = parent::getCMSFields(); SiteTree::enableCMSFieldsExtensions(); - $fields->addFieldToTab('Root.Main', new CheckboxField('TrackBacksEnabled', 'Enable TrackBacks')); - $fields->addFieldToTab('Root.Main', new DropdownField('OwnerID', 'Blog owner', array_merge(array('' => "(None)"), $blogOwners->map('ID', 'Name')->toArray()))); - $fields->addFieldToTab('Root.Main', new CheckboxField('AllowCustomAuthors', 'Allow non-admins to have a custom author field')); + $fields->addFieldToTab('Root.Main', new CheckboxField('TrackBacksEnabled', 'Enable TrackBacks'), "Content"); + $fields->addFieldToTab('Root.Main', new DropdownField('OwnerID', 'Blog owner', array_merge(array('' => "(None)"), $blogOwners->map('ID', 'Name')->toArray())), "Content"); + $fields->addFieldToTab('Root.Main', new CheckboxField('AllowCustomAuthors', 'Allow non-admins to have a custom author field'), "Content"); $this->extend('updateCMSFields', $fields); diff --git a/code/BlogTree.php b/code/BlogTree.php index 32758f4..2d37663 100644 --- a/code/BlogTree.php +++ b/code/BlogTree.php @@ -5,10 +5,13 @@ */ /** - * Blog tree allows a tree of Blog Holders. Viewing branch nodes shows all blog entries from all blog holder children + * Blog tree is a way to group Blogs. It allows a tree of "Blog Holders". + * Viewing branch nodes shows all blog entries from all blog holder children */ class BlogTree extends Page { + + static $icon = "blog/images/blogtree-file.png"; // Default number of blog entries to show static $default_entries_limit = 10; @@ -31,6 +34,8 @@ class BlogTree extends Page { 'BlogTree', 'BlogHolder' ); + + /* * Finds the BlogTree object most related to the current page. * - If this page is a BlogTree, use that @@ -96,7 +101,7 @@ class BlogTree extends Page { function getCMSFields() { $fields = parent::getCMSFields(); - $fields->addFieldToTab("Root.Main", new TextField("Name", "Name of blog")); + $fields->addFieldToTab("Root.Main", new TextField("Name", "Name of blog"), "Content"); $fields->addFieldToTab('Root.Main', new DropdownField('LandingPageFreshness', 'When you first open the blog, how many entries should I show', array( "" => "All entries", "1" => "Last month's entries", @@ -112,7 +117,7 @@ class BlogTree extends Page { "11" => "Last 11 months' entries", "12" => "Last year's entries", "INHERIT" => "Take value from parent Blog Tree" - ))); + )), "Content"); if(class_exists('WidgetArea')) { $fields->addFieldToTab("Root.Widgets", new CheckboxField("InheritSideBar", 'Inherit Sidebar From Parent')); $fields->addFieldToTab("Root.Widgets", new WidgetAreaEditor("SideBar")); diff --git a/images/blogholder-file.gif b/images/blogholder-file.gif deleted file mode 100644 index 4b5b00fdd4c286bedec36c920126ac71b1932e86..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 297 zcmZ?wbhEHb6k-r!I3mfAALrGS8@7IO@qZvVGczT?eqLL~=j~Mt3=GDqatD_*xSQ)- zT;F1BZ2a=*%rj?ZKHA-TW@ehEti+i!XBvD=&Tj1Xw=+sJHlA9a1T+As3k@j#WMO1r zkYvySiG%EPU|p7=)|X<*#48{m@L0egFtj1_e)ANQlR+$9?k;Hxyaqgn6w?+2=rNr+ zU}5M{vWNA6fu^KXLYu|6iqI}4=T?P)BOGBaPK|QD25lTJl76Wl?Dco7eZhv`wh&&`*v?L1fmFYo;x-}n9gzMG?|3!NRV z4uT*$lL;Y>_apXlw&VYag!?_-j-yx>jln!BNhTm73d{jAsYwNp29h#6wE+eR!a=E- zEXs-_ybLvuWMe#K&A@De7z~#UNuB_R%z=Wcho~PfUs0s0gs4lL$cRQ16xGC>3C8A9 z8F_9(4k}dmJULkAv494UM3%Kl-Qvq3s;0~1vwcldWDSBQLeySRS#gw%LKBdjhjGh{ zpCSFMhxH8v0)exnmth&2@zSi<%?5a%muDEV{!!SQspR>z5U=~fR){JhWbiayDwRAX zp9h)+nhgenwuaa1#t64Ht0SrG)~()#f&eVpR1Ks;owOCD9GpfW3P-w^f@U;jb*o+` zTrj#U88qu*?35ZnQT#tt)0$`trNMr@{}i?|vj(8kz=G4Jj2oBlwOtu})C3ZOW(LB^ zMiobk5J9U54Kg~$k)kB4x^36+qR1z83rV^Rl0t~W3LaHecz--N9N+{-hzB{Ajj<7S zfQtxhlnq4LVSzi>;0jQl)_{&0TxFljw&dEQpc&Y+08DiTC~*^NWG!W0Z5c~6)>5y| zRa(Xpjkn~|I2hV)>|c#;T;b`lkIk{gMsx6ij;GzkW4(B>X8}Kn+esmkDSygs@9u^j z!K(*_L^AoyvEmq-97?=?UfAsV>Z(*KM;GSj`?t2XsweyUKEJ7MtgkEK#dl8g@#^Z% zmHYV{FW?vN_RjC_CrjTq@A+Ka-MeAy+u^nN`1ts(IYnu!g7)kZ;be%_kux9txjQNQ#U^7Z;py<@YkvTMrdNCb literal 0 HcmV?d00001 diff --git a/images/blogpage-file.gif b/images/blogpage-file.gif deleted file mode 100644 index 73cc55b3758ab7876c6163c28d337e4cfa395d94..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 189 zcmZ?wbhEHb6k-r!*v!N5|NsA)GiRPTbLQ2nS5;M2PoF;Bx^-(~W8=ez57)0>pO%)k zW5*7l8U`3p{K>+|z`(pGzuHB6jN4xSg@NXRZo<1!G@oU49H$%7@&lE*x8!K}3noX5_{`DQ$0 j`u#JR`H56x&ZU`rpPU$(MOh`1qJ?Z3IXZef1R1OW-K9t# diff --git a/images/blogpage-file.png b/images/blogpage-file.png new file mode 100644 index 0000000000000000000000000000000000000000..f9b261040d01c7aa860216307cfc5a162f549e5e GIT binary patch literal 1181 zcmeAS@N?(olHy`uVBq!ia0vp^d?3uh1|;P@bT0xa$r9IylHmNblJdl&R0hYC{G?O` z&)mfH)S%SFl*+=BsWuD@%u1Od5hW46K32*3xq68pHF_1f1wh>l3^w)^1&PVosU-?Y zsp*+{wo31J?^jaDOtDo8H}y5}EpSfF$n>ZxN)4{^3rViZPPR-@vbR&PsjvbXkegbP zs8ErclUHn2VXFi-*9yo63F|80+w{G(j&jGsViq(8$!p(#XQqz{teV(ACh<(8Scy#n9Q%+}Y5{ z#nb|(*Cju>G&eP`1g19yq1O_pUQklVEdbi=l3J8mmYU*Ll%J~r_Oewb7Ppu=yBQm} zIT_+K52`l>i(8<2jd1GK2RcR{6tPGV4HE*U9uO0rY=Inj!cWZuruHIWvW_e2=4N1E z6!dg)45_#^=h8-RrbLP3AMbH2bQGE1;=<4F=$JKWfon$Aglz>S0^h$eiRYJQf8`fY zm5y4!_uxUr0>g|61qB%%1s40?f4uXtDuzq0#^T-H@5evi`8=;E_WO$o-mT4EE48*; z$4H%4-m~GmcEm+T&hQI|h2~ed%IE($CjTa3f6F-)6Gz$9lnHKp;T1<@&Zk{C#$#^L z`%7iXg(-cj>H_RbCfqQdEOczw?&L_1N9?O@9skxbp61{8SnToPxP+n$X;33C^gSuYJm2PRf5;1%GNw^JeRMzOCx7)vc{Ve zPxcsJUd;c#b5+Jk`9<0$i^axKMDCZ_T{Zk)Q&@)78&qol`;+0F&F6 A?f?J) literal 0 HcmV?d00001 diff --git a/images/blogtree-file.png b/images/blogtree-file.png new file mode 100644 index 0000000000000000000000000000000000000000..f73e0081c6faa966bfd30529ee53fd75963c86b7 GIT binary patch literal 1115 zcmaJ=O-K|`9G}(JLNLlm&4OMdK~%dlZ$DgjaC6rkbvGK3b)mgP&d$7b2c3D-%(Go3 zLM24INkNB-s4jgGeO!cy4(&w>BIr~EB@`Ws@K8z}?2WnBp>5#Jd;iDp_xpdonZDkh zy4vPihGFWG2{A?Y&Cc3XL;t%Io|kmnLAo-eALmFxwh$9jaTbB3E)Sv*id zLj7aCX=Q9k39D?!A<$kFsDO@$42t@&VGG3wyQ(YDvvbX{U=>1!BJA&=GEyIiV+(6$5L;WniEoD_nI$iMc6zcroeH9 zLcv?`d$Bdh!EiY2X!v{{ityN@29b*%!)_@nh{#qf%_JH&fTJj9@d$~qG}7NG=;pet zVXu{m7K|&(CI`K|lTsNdN&koH`a0SsDfB1ae+t{_Q4?_~WaAM_p^eM6IIc_~ZXuaq zD~<7Rxr%*xOt78DCW!Y3fg~%M;n=HqNfMHVO=LqsNio7w1+S*5Lf9Yk2gEkm#rq(H zT`&d%!I%i+FcgQKVz8~u6|pj+BZHK=>L0GJBG(xO-K3sHWN9an+HGMStfnkz6=Ml? zSJYeMs+D8mD{?s+4CgfVuSS=z==3$* zOzrgBiA>Y-dYaz3 z7Cg~iOzFbRiTw}uT$xx7zZ&o9TYPpVFnR5L}r1DT0Fk*XML-ian&$izKiFsKD;sMJojW* KuXwj}VDc9sZEJ1- literal 0 HcmV?d00001