roller-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From gma...@apache.org
Subject svn commit: r1570830 - in /roller/trunk: app/src/main/webapp/WEB-INF/velocity/ app/src/main/webapp/themes/basic/ docs/
Date Sat, 22 Feb 2014 12:36:51 GMT
Author: gmazza
Date: Sat Feb 22 12:36:50 2014
New Revision: 1570830

URL: http://svn.apache.org/r1570830
Log:
Simplified velocity macros to remove subcategory stuff.

Modified:
    roller/trunk/app/src/main/webapp/WEB-INF/velocity/weblog.vm
    roller/trunk/app/src/main/webapp/themes/basic/permalink.vm
    roller/trunk/app/src/main/webapp/themes/basic/searchresults.vm
    roller/trunk/app/src/main/webapp/themes/basic/weblog.vm
    roller/trunk/docs/roller-template-guide.odt

Modified: roller/trunk/app/src/main/webapp/WEB-INF/velocity/weblog.vm
URL: http://svn.apache.org/viewvc/roller/trunk/app/src/main/webapp/WEB-INF/velocity/weblog.vm?rev=1570830&r1=1570829&r2=1570830&view=diff
==============================================================================
--- roller/trunk/app/src/main/webapp/WEB-INF/velocity/weblog.vm (original)
+++ roller/trunk/app/src/main/webapp/WEB-INF/velocity/weblog.vm Sat Feb 22 12:36:50 2014
@@ -35,8 +35,8 @@ These are the documented macros in order
 
     #showWeblogEntryLinksList($entries)
     #showBookmarkLinksList($folderObj $expanding $subfolders)
-    #showWeblogCategoryLinksList($categoryObj $expanding $subcats)
-    #showMobileCategoryLinksList($categoryObj)
+    #showWeblogCategoryLinksList()
+    #showMobileCategoryLinksList()
     #showReferrersList($weblog)
     #showAtomFeedsList($weblog)
     #showRSSFeedsList($weblog)
@@ -555,32 +555,27 @@ Recursively display a bookmark folder an
 #** 
 Show weblog's categories in specified parent category.
 *#
-#macro(showWeblogCategoryLinksList $categoryObject $subcats $expanding )
-    #if ($expanding) #_showCommonJavascript() #end
-    #if(!$expanding && !$subcats)
-        <ul class="rCategory">
-        #if ($model.weblogCategory || $model.permalink)
-            <li><a href="$url.home">$text.get("macro.weblog.allcategories")</a></li>
+#macro(showWeblogCategoryLinksList)
+    <ul class="rCategory">
+    #if ($model.weblogCategory || $model.permalink)
+        <li><a href="$url.home">$text.get("macro.weblog.allcategories")</a></li>
+    #else
+        <li class="selected"><a href="$url.home">$text.get("macro.weblog.allcategories")</a></li>
+    #end
+    #set($cats = $model.weblog.getWeblogCategories())
+    #foreach($cat in $cats)
+        #if ($model.weblogCategory && $model.weblogCategory.name == $cat.name ||
($model.permalink && $model.weblogEntry.category.name == $cat.name))
+            <li class="selected"><a href="$url.category($cat.name)">$cat.name</a></li>
         #else
-            <li class="selected"><a href="$url.home">$text.get("macro.weblog.allcategories")</a></li>
-        #end
-        #set($cats = $categoryObject.website.getWeblogCategories())
-        #foreach($cat in $cats)
-            #if ($model.weblogCategory && $model.weblogCategory.name == $cat.name
|| ($model.permalink && $model.weblogEntry.category.name == $cat.name))
-                <li class="selected"><a href="$url.category($cat.name)">$cat.name</a></li>
-            #else
-                <li><a href="$url.category($cat.name)">$cat.name</a></li>
-            #end
+            <li><a href="$url.category($cat.name)">$cat.name</a></li>
         #end
-        </ul>
-    #else
-        <ul class="rCategory">
-        #_showWeblogCategoryLinksList($categoryObject $subcats $expanding )
-        </ul>
     #end
+    </ul>
 #end
+
+
 ## Mobile version
-#macro(showMobileCategoryLinksList $categoryObject)
+#macro(showMobileCategoryLinksList)
     <!-- showMobileCategoryLinksList -->
     <div data-role="popup" id="categories" data-theme="none">
       <div data-role="collapsible-set" data-theme="b" data-content-theme="c" data-collapsed-icon="arrow-r"
data-expanded-icon="arrow-d" style="margin:0; width:250px;">
@@ -593,7 +588,7 @@ Show weblog's categories in specified pa
               <li class="ui-btn-active"><a href="$url.home" data-transition="fade">$text.get("macro.weblog.allcategories")</a></li>
             #end
             #set($active = $text.get("macro.weblog.allcategories"))
-            #set($cats = $categoryObject.website.getWeblogCategories())
+            #set($cats = $model.weblog.getWeblogCategories())
             #foreach($cat in $cats)
               #if ($model.weblogCategory && $model.weblogCategory.name == $cat.name
|| ($model.permalink && $model.weblogEntry.category.name == $cat.name))
                 <li class="ui-btn-active"><a href="$url.category($cat.name)" data-transition="fade">$cat.name</a></li>
@@ -610,48 +605,6 @@ Show weblog's categories in specified pa
 #end
 
 #**
-Recursively display a bookmark folder and children as HTML ul list (undocumented).
-*#
-#macro(_showWeblogCategoryLinksList $categoryObject $subcats $expanding )
-    #if ($categoryObject.name != "root")
-        #if ($expanding && $subcats && $categoryObject.weblogCategories.size()
> 0)
-            #set($divId = "div_$categoryObject.name")
-            <div class="rCategory">
-            <li><a href="javascript:toggleFolder('$divId')">
-                <span id="i$divId">+</span></a><a href="$url.category($categoryObject.name)">$categoryObject.name</a></li>
-            <ul id="$divId" class="rCategory" style="display:none">
-        #elseif ($subcats && $categoryObject.weblogCategories.size() > 0)
-            <li><a href="$url.category($categoryObject.name)">$categoryObject.name</a></li>
-            <ul class="rCategory">
-        #else
-            #if ($model.weblogCategory && $model.weblogCategory.name == $categoryObject.name)
-                <li class="selected">$categoryObject.name</li>
-            #else
-                <li><a href="$url.category($categoryObject.name)">$categoryObject.name</a></li>
-            #end
-        #end
-    #end
-    #if ($subcats || $categoryObject.name == "root") 
-        #set($cats = $categoryObject.getWeblogCategories())
-        #foreach($cat in $cats)
-            #_showWeblogCategoryLinksList($cat $subcats $expanding)
-        #end
-    #end
-    #if ($categoryObject.name != "root" && $subcats && $categoryObject.weblogCategories.size()
> 0)
-        </ul>
-    #end
-    #if ($expanding && $subcats && $categoryObject.weblogCategories.size()
> 0)
-    </div>
-    <script type="text/javascript">
-    <!-- 
-    folderPreference("$divId");
-    // -->
-    </script>
-    #end
-#end
-
-
-#**
  * Display list of referrers.
  *#
 #macro(showReferrersList $refs $max $maxWidth $includeHits)

Modified: roller/trunk/app/src/main/webapp/themes/basic/permalink.vm
URL: http://svn.apache.org/viewvc/roller/trunk/app/src/main/webapp/themes/basic/permalink.vm?rev=1570830&r1=1570829&r2=1570830&view=diff
==============================================================================
--- roller/trunk/app/src/main/webapp/themes/basic/permalink.vm (original)
+++ roller/trunk/app/src/main/webapp/themes/basic/permalink.vm Sat Feb 22 12:36:50 2014
@@ -14,8 +14,7 @@
     <h1 class="weblogName">$utils.escapeHTML($model.weblog.name)</h1>
 
         <center>
-        #set($rootCategory = $model.weblog.getWeblogCategory("nil"))
-        #showWeblogCategoryLinksList($rootCategory false false)
+        #showWeblogCategoryLinksList()
         </center>
 
         ## show next/previous paging controls

Modified: roller/trunk/app/src/main/webapp/themes/basic/searchresults.vm
URL: http://svn.apache.org/viewvc/roller/trunk/app/src/main/webapp/themes/basic/searchresults.vm?rev=1570830&r1=1570829&r2=1570830&view=diff
==============================================================================
--- roller/trunk/app/src/main/webapp/themes/basic/searchresults.vm (original)
+++ roller/trunk/app/src/main/webapp/themes/basic/searchresults.vm Sat Feb 22 12:36:50 2014
@@ -13,8 +13,7 @@
     <h1 class="weblogName">$utils.escapeHTML($model.weblog.name)</h1>
 
         <center>
-        #set($rootCategory = $model.weblog.getWeblogCategory("nil"))
-        #showWeblogCategoryLinksList($rootCategory false false)
+        #showWeblogCategoryLinksList()
         </center>
 
         ## show next/previous paging controls

Modified: roller/trunk/app/src/main/webapp/themes/basic/weblog.vm
URL: http://svn.apache.org/viewvc/roller/trunk/app/src/main/webapp/themes/basic/weblog.vm?rev=1570830&r1=1570829&r2=1570830&view=diff
==============================================================================
--- roller/trunk/app/src/main/webapp/themes/basic/weblog.vm (original)
+++ roller/trunk/app/src/main/webapp/themes/basic/weblog.vm Sat Feb 22 12:36:50 2014
@@ -23,8 +23,7 @@ setCookie("roller_user_request_type","st
     <h1 class="weblogName">$model.weblog.name</h1>
 
         <center>
-        #set($rootCategory = $model.weblog.getWeblogCategory("nil"))
-        #showWeblogCategoryLinksList($rootCategory false false)
+        #showWeblogCategoryLinksList()
         </center>
 
         ## show next/previous paging controls

Modified: roller/trunk/docs/roller-template-guide.odt
URL: http://svn.apache.org/viewvc/roller/trunk/docs/roller-template-guide.odt?rev=1570830&r1=1570829&r2=1570830&view=diff
==============================================================================
Binary files - no diff available.



Mime
View raw message