From 82ed55f1a03bd621e32110fb6ef6f74e3ae644cd Mon Sep 17 00:00:00 2001 From: Loic d'Anterroches Date: Tue, 25 Nov 2008 21:59:57 +0100 Subject: [PATCH] Fixed issue 55, improvements for the wiki. --- src/IDF/Views/Wiki.php | 7 ++++++- src/IDF/templates/idf/wiki/view.html | 8 +++++++- www/media/idf/css/style.css | 14 ++++++++++++++ www/media/idf/img/warning-large.png | Bin 0 -> 954 bytes 4 files changed, 27 insertions(+), 2 deletions(-) create mode 100644 www/media/idf/img/warning-large.png diff --git a/src/IDF/Views/Wiki.php b/src/IDF/Views/Wiki.php index fb5bcb9..a2ba561 100644 --- a/src/IDF/Views/Wiki.php +++ b/src/IDF/Views/Wiki.php @@ -228,6 +228,10 @@ class IDF_Views_Wiki throw new Pluf_HTTP_Error404($request); } } + $ptags = self::getWikiTags($prj); + $dtag = array_pop($ptags); // The last tag is the deprecated tag. + $tags = $page->get_tags_list(); + $dep = Pluf_Model_InArray($dtag, $tags); $title = $page->title; $revision = $page->get_current_revision(); $db = $page->getDbConnection(); @@ -241,7 +245,8 @@ class IDF_Views_Wiki 'oldrev' => $oldrev, 'rev' => $revision, 'revs' => $revs, - 'tags' => $page->get_tags_list(), + 'tags' => $tags, + 'deprecated' => $dep, ), $request); } diff --git a/src/IDF/templates/idf/wiki/view.html b/src/IDF/templates/idf/wiki/view.html index 838eaa2..96ae5cd 100644 --- a/src/IDF/templates/idf/wiki/view.html +++ b/src/IDF/templates/idf/wiki/view.html @@ -1,8 +1,14 @@ {extends "idf/wiki/base.html"} {block extraheader}{if $oldrev}{/if}{/block} {block docclass}yui-t3{assign $inView=true}{/block} -{block body} +{block body} +{if $deprecated}{* deprecated page *} +
+

{blocktrans}Attention! This page is marked as deprecated, +use it as reference only if you are sure you need these specific information.{/blocktrans}

+
+{/if} {if $oldrev} {assign $submitter = $oldrev.get_submitter()}{aurl 'url', 'IDF_Views_Wiki::view', array($project.shortname, $page.title)}
diff --git a/www/media/idf/css/style.css b/www/media/idf/css/style.css index 444066e..cf19cad 100644 --- a/www/media/idf/css/style.css +++ b/www/media/idf/css/style.css @@ -599,6 +599,20 @@ div.old-rev { -webkit-border-radius: 5px; } +div.deprecated-page { + padding: 1em 1em 0.1em 3em; + margin-bottom: 1em; + background: url("../img/warning-large.png"); + background-repeat: no-repeat; + background-position: 1em 1em; + font-size: 120%; + background-color: #bbe394; + width: 40%; + -moz-border-radius: 5px; + -webkit-border-radius: 5px; +} + + .delp { float: right; position: relative; diff --git a/www/media/idf/img/warning-large.png b/www/media/idf/img/warning-large.png new file mode 100644 index 0000000000000000000000000000000000000000..45b64a798ef3424ee3ed6af3e3abbcf9fbaeee07 GIT binary patch literal 954 zcmV;r14aCaP)uiL$5uuQc zi$WH))CSxL{R_J8s!$0u-4vuCbuod^p&AR)v?yq(24ZUxGdh{;VkV)9on&ec9Ny*L zcRu%f4~H*WYdXo(V08Mg)*3|z;fstPgXL+%xaW)XcT!_^0CnGhAKxAw4Xo5^;l|CI zH-Mh~>h@J^z*M-euhH)~j3$%Hw(V|T zf8B!kRjoH)NwEc=AIM~M@bP2J`J+@UT6VRHH!}ma z&FYymJV~ed;rjKbx0|Y;{wKw6!S}DlVk)@2OrTuGNG37jaqLowxCn<_*EHahwvyY- zZ1yvyp3R*+spnHE{adxFJS5PD6LcbNnWJ*EcYrtfeJ_ z=g*_UVO-b6^E^~n7r}`My4Kb>5{)VgraNkdFOuIhjQ;%L!-n42z?ql;z;#_**F{7K zo;}O+l@-Ru$IU^JkA0CN`-1Z@lN}l|jQjTqUbui*79xV@d4$7ZLveUbN- zWgQqicn~9#*#WKB>lBMc%H{GlR4GO1)F}vu$@TUsWmzd-nWUqo{7^|7NzE$-gM zotoMKFin%5o*oj3#P;6SdFUZuiGBRT4;G5m0K_@);6X2UZ<6TR!R%{YzwTl cuK!#83wh2#=*+j5WB>pF07*qoM6N<$f-^77nE(I) literal 0 HcmV?d00001