From b2ddaf805c2179f92d5322239d09d0460d87dd22 Mon Sep 17 00:00:00 2001 From: did Date: Thu, 7 Jul 2011 18:03:55 +0200 Subject: [PATCH] show page kind: templatized or redirect --- app/models/page.rb | 2 +- app/views/admin/pages/_page.html.haml | 2 +- doc/TODO | 6 ++--- public/images/admin/list/icons/redirect.png | Bin 0 -> 720 bytes public/images/admin/list/icons/template.png | Bin 0 -> 862 bytes public/stylesheets/admin/application.css | 23 +++++++++++++------- 6 files changed, 20 insertions(+), 13 deletions(-) create mode 100644 public/images/admin/list/icons/redirect.png create mode 100644 public/images/admin/list/icons/template.png diff --git a/app/models/page.rb b/app/models/page.rb index fe2dba03..e0bca03e 100644 --- a/app/models/page.rb +++ b/app/models/page.rb @@ -45,7 +45,7 @@ class Page scope :not_found, :where => { :slug => '404', :depth => 0 } scope :published, :where => { :published => true } scope :fullpath, lambda { |fullpath| { :where => { :fullpath => fullpath } } } - scope :minimal_attributes, :only => %w(title slug fullpath position depth published templatized listed parent_id created_at updated_at) + scope :minimal_attributes, :only => %w(title slug fullpath position depth published templatized redirect listed parent_id created_at updated_at) ## methods ## diff --git a/app/views/admin/pages/_page.html.haml b/app/views/admin/pages/_page.html.haml index 9724292c..ff88c451 100644 --- a/app/views/admin/pages/_page.html.haml +++ b/app/views/admin/pages/_page.html.haml @@ -1,4 +1,4 @@ -%li{ :id => "item-#{page.id}", :class => "#{'not-found' if page.not_found? } #{'templatized' if page.templatized?}"} +%li{ :id => "item-#{page.id}", :class => "#{'not-found' if page.not_found? } #{'templatized' if page.templatized?} #{'redirect' if page.redirect?}"} - children = can?(:manage, page) ? page.children : page.children.find_all { |p| !p.templatized? } diff --git a/doc/TODO b/doc/TODO index 50588466..8d350e05 100644 --- a/doc/TODO +++ b/doc/TODO @@ -69,12 +69,12 @@ x admin role is not correctly set when creating a new website x the required star for file field is not shown x Rights to set roles (ticket #104) x export: problems with templatized pages (source => multi levels pages) -- do not rename files for fonts -- test and/or convert existing templates (the 2 of the themes section) +x do not rename files for fonts +x icon for redirection page in the pages section (back-office) - tooltip to explain the difference between 1.) Admin 2.) Author 3.) Designer? +- test and/or convert existing templates (the 2 of the themes section) - overide sort for contents -- icon for redirection page in the pages section (back-office) - [bushido] guiders / welcome page / devise cas authentication (SSO) diff --git a/public/images/admin/list/icons/redirect.png b/public/images/admin/list/icons/redirect.png new file mode 100644 index 0000000000000000000000000000000000000000..8e5073066b46211f7d03138ab8d231927cd11370 GIT binary patch literal 720 zcmV;>0x$iEP)e@gU+|5b-Ad1s?RE7Y}-<)-*{4t7ue^g2jV}A{DC$ zDz!GzYDm;18V(P$eKW64P-^jLYv=MGj&v6^s2-;XMNPIeR|41j}|AX%YNVb;bU&ZqbcjrNN5K7Eih7R zIM_Dr6N;jESXrTgo+Thnf&NmdR9aCKS2h|QOakdL=qjzYSVqhX!ePoc%d7SGci#rx zRX_vU5OzhvL4xs^^R`_R0Tz$65pvu%74 zwvT!?`_*QtZnyZ8S!=bLytw$<>-523I3ThtAM^PFsLSUo$M%m=Ml}0+yPr4Dh)}$i zUBAJ0*}m(!drwbe%#Fg}P_W0p20D(dgVnfu>DBvG@ke<;*L75>{K_>N<}B#Ha0Ksz z{>Q!EF2wV+9@)9=ibqq=xArK39=UTAB0zS&YYy3LT@8~z0t^5q4G$%4#tHiX0000~xDYOD* zR45Mxp#%*OA8AN1YD=gd&Lu9IyRb-#D$0qkc0n|dr$9BV&Gr$UDWNAvH~| zG7L-7=`=B!GPjl%SN3YUev;^V*km?0pX)sS4Q*+|SzaFB0&i<=HjboHidRY~UXJ6l zO0(HaWLdc^*z*X>T8N?~MT%rPL3Ir&8ktZ4&%5`5k+_sBK>^AsiXs*ZD=SKhGw!%- zR(7Sap}K>n&13k~$V89Dq_EQ=OdC!F!4|FaRJ;L$n5w3^>93*2Xf)wMox{NgmzN_y zM6qbSCR9(~@Lf1}+aX;+uwz8MsiEqLAaJ)q?gLapHWw$S{9T!h#>lcv;_)cSWHPUy zYb}@wBMAIatCb^IL`>OaqEg`C4(MJ0G{79tQdx#>OKR#4j^m&+=QHat^X|zlVN?xsL(@84 z43JinS5CFJ-ax9x*i-xK_boY{`LSGkSF5W^KH-pIt#Gd>7yS;0u!MS^=aU{!RoDn- z%n2!T?+O+cI{PD$_<_klgNn@<)IH01vo3I7c0$%m4rY07*qoM6N<$f|Q4j%K!iX literal 0 HcmV?d00001 diff --git a/public/stylesheets/admin/application.css b/public/stylesheets/admin/application.css index df890fce..f96b6cb2 100644 --- a/public/stylesheets/admin/application.css +++ b/public/stylesheets/admin/application.css @@ -162,11 +162,6 @@ ul.theme-assets li.hidden strong a { font-style: italic; color: #8B8D9A; font-we cursor: move; } -#pages-list ul.folder li.templatized em { - background-position: left -62px; - cursor: pointer; -} - #pages-list li .toggler { position: absolute; top: 9px; @@ -183,7 +178,7 @@ ul.theme-assets li.hidden strong a { font-style: italic; color: #8B8D9A; font-we #pages-list li strong a { position: relative; - top: 3px; + top: 2px; text-decoration: none; color: #1f82bc; font-size: 0.9em; @@ -195,12 +190,24 @@ ul.theme-assets li.hidden strong a { font-style: italic; color: #8B8D9A; font-we #pages-list li.hidden strong a { font-style: italic; font-weight: normal; } +#pages-list ul.folder li.templatized strong a { + padding-right: 24px; + background: transparent url(/images/admin/list/icons/template.png) no-repeat right 2px; +} + +#pages-list ul.folder li.redirect strong a { + padding-right: 24px; + background: transparent url(/images/admin/list/icons/redirect.png) no-repeat right 1px; +} + #pages-list li .more { position: absolute; - top: 6px; + top: 0px; right: 20px; font-size: 0.7em; color: #8b8d9a; + height: 31px; + line-height: 31px; } #pages-list li .more a { @@ -211,7 +218,7 @@ ul.theme-assets li.hidden strong a { font-style: italic; color: #8B8D9A; font-we } #pages-list li.not-found { border-top: 1px dotted #bbbbbd; padding-top: 10px; margin-left: 0px; } -#pages-list li.not-found .more { top: 16px; } +#pages-list li.not-found .more { top: 10px; } /* ___ Progress bar ___ */