summaryrefslogtreecommitdiff
path: root/demos/quickstart/protected/pages
diff options
context:
space:
mode:
authorwei <>2006-05-11 11:35:35 +0000
committerwei <>2006-05-11 11:35:35 +0000
commitcc61c2d74e151a7fb75303f8740edfe74cdd9eb8 (patch)
tree3d57f3db231469caaadf42eabe095cc6f17b9950 /demos/quickstart/protected/pages
parent90e706cda83d3b64a5508ed182956a1e3110ff26 (diff)
Update api docs and add API search
Diffstat (limited to 'demos/quickstart/protected/pages')
-rw-r--r--demos/quickstart/protected/pages/Search.page29
-rw-r--r--demos/quickstart/protected/pages/Search.php14
2 files changed, 35 insertions, 8 deletions
diff --git a/demos/quickstart/protected/pages/Search.page b/demos/quickstart/protected/pages/Search.page
index d2aee66e..d3391222 100644
--- a/demos/quickstart/protected/pages/Search.page
+++ b/demos/quickstart/protected/pages/Search.page
@@ -3,10 +3,29 @@
<div class="search">
<com:SearchBox ID="search" />
</div>
- <com:TRepeater id="results">
+
+ <com:TRepeater id="api_results">
<prop:HeaderTemplate>
<div class="searchHeader">
- Found <%# $this->Parent->Data->Count %> results.
+ Found <%# $this->Parent->Data->Count %> classes in API documentation.
+ </div>
+ </prop:HeaderTemplate>
+ <prop:ItemTemplate>
+ <div class="searchAPIItem">
+ <div class="searchItemLink">
+ <%# $this->ItemIndex + 1 %>.
+ <a href="http://www.pradosoft.com/docs/manual/<%# $this->DataItem->link %>">
+ <%# $this->DataItem->title %>
+ </a>
+ </div>
+ </div>
+ </prop:ItemTemplate>
+ </com:TRepeater>
+
+ <com:TRepeater id="quickstart_results">
+ <prop:HeaderTemplate>
+ <div class="searchHeader">
+ Found <%# $this->Parent->Data->Count %> results in quickstart tutorial.
</div>
</prop:HeaderTemplate>
<prop:ItemTemplate>
@@ -20,9 +39,9 @@
<p class="searchItemBody"><%# $this->Page->HighlightSearch($this->DataItem->text) %></p>
</div>
</prop:ItemTemplate>
- <prop:EmptyTemplate>
- Unable to find "<%= htmlentities($this->Page->search->Text) %>".
- </prop:EmptyTemplate>
</com:TRepeater>
+ <com:TPanel id="emptyResult" CssClass="empty_search_result" Visible="false">
+ No results available for "<%= htmlentities($this->Page->search->Text) %>".
+ </com:TPanel>
</div>
</com:TContent> \ No newline at end of file
diff --git a/demos/quickstart/protected/pages/Search.php b/demos/quickstart/protected/pages/Search.php
index c7bdce89..297d2f50 100644
--- a/demos/quickstart/protected/pages/Search.php
+++ b/demos/quickstart/protected/pages/Search.php
@@ -9,9 +9,17 @@ class Search extends TPage
{
if(!$this->IsPostBack && strlen($text = $this->search->getText()) > 0)
{
- $search = $this->getApplication()->getModule("search");
- $this->results->setDataSource($search->find($text));
- $this->results->dataBind();
+ $quickstart = $this->getApplication()->getModule("quickstart_search");
+ $hits_1 = $quickstart->find($text);
+ $this->quickstart_results->setDataSource($hits_1);
+ $this->quickstart_results->dataBind();
+
+ $api = $this->getApplication()->getModule("api_search");
+ $hits_2 = $api->find($text);
+ $this->api_results->setDataSource($hits_2);
+ $this->api_results->dataBind();
+
+ $this->emptyResult->setVisible(count($hits_1)+count($hits_2) == 0);
}
}