[MKDoc-commit] [1.6] Search results now show hidden documents to
editors
bruno at mkdoc.demon.co.uk
bruno at mkdoc.demon.co.uk
Thu Sep 8 14:22:25 BST 2005
Log Message:
-----------
[1.6] Search results now show hidden documents to editors
Tags:
----
mkdoc-1-6
Modified Files:
--------------
mkd/flo/plugin:
Search.pm
mkd/templates/search:
en.html
-------------- next part --------------
Index: Search.pm
===================================================================
RCS file: /var/spool/cvs/mkd/flo/plugin/Search.pm,v
retrieving revision 1.6.2.17
retrieving revision 1.6.2.18
diff -Lflo/plugin/Search.pm -Lflo/plugin/Search.pm -u -r1.6.2.17 -r1.6.2.18
--- flo/plugin/Search.pm
+++ flo/plugin/Search.pm
@@ -134,6 +134,7 @@
my $doc = $doc_t->get ($arryref->[0]);
$doc->{score} = $arryref->[1];
push @res, $doc if ($doc->is_showable());
+ push @res, $doc if ($doc->is_hidden and $self->user and $self->user->is_editor);
}
$self->{'.number_of_results'} = scalar @res;
Index: en.html
===================================================================
RCS file: /var/spool/cvs/mkd/templates/search/Attic/en.html,v
retrieving revision 1.1.2.17
retrieving revision 1.1.2.18
diff -Ltemplates/search/en.html -Ltemplates/search/en.html -u -r1.1.2.17 -r1.1.2.18
--- templates/search/en.html
+++ templates/search/en.html
@@ -261,6 +261,19 @@
>
<dt>
<a
+ petal:condition="false: result/is_hidden"
+ class="showable"
+ href="#"
+ lang="en"
+ xml:lang="en"
+ hreflang="en"
+ dir="ltr"
+ petal:attributes="href result/uri; lang result/lang; xml:lang result/lang; hreflang result/lang; dir result/dir"
+ petal:content="result/title"
+ >Some Result</a>
+ <a
+ petal:condition="true: result/is_hidden"
+ class="not-showable"
href="#"
lang="en"
xml:lang="en"
More information about the MKDoc-commit
mailing list