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 0000000..45b64a7 Binary files /dev/null and b/www/media/idf/img/warning-large.png differ