You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@roller.apache.org by ag...@apache.org on 2006/08/04 01:48:27 UTC

svn commit: r428572 - in /incubator/roller/branches/roller_3.0/src/org/apache/roller/ui/rendering/model: PageModel.java SearchResultsModel.java

Author: agilliland
Date: Thu Aug  3 16:48:26 2006
New Revision: 428572

URL: http://svn.apache.org/viewvc?rev=428572&view=rev
Log:
adding method isSearchResults() to page model so that templates can reliably determine if the view is for search results or not.


Modified:
    incubator/roller/branches/roller_3.0/src/org/apache/roller/ui/rendering/model/PageModel.java
    incubator/roller/branches/roller_3.0/src/org/apache/roller/ui/rendering/model/SearchResultsModel.java

Modified: incubator/roller/branches/roller_3.0/src/org/apache/roller/ui/rendering/model/PageModel.java
URL: http://svn.apache.org/viewvc/incubator/roller/branches/roller_3.0/src/org/apache/roller/ui/rendering/model/PageModel.java?rev=428572&r1=428571&r2=428572&view=diff
==============================================================================
--- incubator/roller/branches/roller_3.0/src/org/apache/roller/ui/rendering/model/PageModel.java (original)
+++ incubator/roller/branches/roller_3.0/src/org/apache/roller/ui/rendering/model/PageModel.java Thu Aug  3 16:48:26 2006
@@ -113,6 +113,15 @@
     
     
     /**
+     * Is this page showing search results?
+     */
+    public boolean isSearchResults() {
+        // the search results model will extend this class and override this
+        return false;
+    }
+    
+    
+    /**
      * Get weblog entry being displayed or null if none specified by request.
      */
     public WeblogEntryDataWrapper getWeblogEntry() {

Modified: incubator/roller/branches/roller_3.0/src/org/apache/roller/ui/rendering/model/SearchResultsModel.java
URL: http://svn.apache.org/viewvc/incubator/roller/branches/roller_3.0/src/org/apache/roller/ui/rendering/model/SearchResultsModel.java?rev=428572&r1=428571&r2=428572&view=diff
==============================================================================
--- incubator/roller/branches/roller_3.0/src/org/apache/roller/ui/rendering/model/SearchResultsModel.java (original)
+++ incubator/roller/branches/roller_3.0/src/org/apache/roller/ui/rendering/model/SearchResultsModel.java Thu Aug  3 16:48:26 2006
@@ -121,6 +121,13 @@
         pager = new SearchResultsPager(searchRequest, results, (hits > (offset+limit)));
     }
     
+    /**
+     * Is this page showing search results?
+     */
+    public boolean isSearchResults() {
+        return true;
+    }
+    
     // override page model and return search results pager
     public WeblogEntriesPager getWeblogEntriesPager() {
         return pager;