portals-jetspeed-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From shins...@apache.org
Subject svn commit: r462589 - in /portals/jetspeed-2/trunk: layout-portlets/src/java/org/apache/jetspeed/portlets/layout/MultiColumnPortlet.java src/webapp/WEB-INF/templates/layout/html/columns/layout.vm src/webapp/WEB-INF/templates/layout/html/tcolumns/layout.vm
Date Tue, 10 Oct 2006 21:42:58 GMT
Author: shinsuke
Date: Tue Oct 10 14:42:57 2006
New Revision: 462589

URL: http://svn.apache.org/viewvc?view=rev&rev=462589
Log:
modified page edit layout and added page delete button

Modified:
    portals/jetspeed-2/trunk/layout-portlets/src/java/org/apache/jetspeed/portlets/layout/MultiColumnPortlet.java
    portals/jetspeed-2/trunk/src/webapp/WEB-INF/templates/layout/html/columns/layout.vm
    portals/jetspeed-2/trunk/src/webapp/WEB-INF/templates/layout/html/tcolumns/layout.vm

Modified: portals/jetspeed-2/trunk/layout-portlets/src/java/org/apache/jetspeed/portlets/layout/MultiColumnPortlet.java
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/trunk/layout-portlets/src/java/org/apache/jetspeed/portlets/layout/MultiColumnPortlet.java?view=diff&rev=462589&r1=462588&r2=462589
==============================================================================
--- portals/jetspeed-2/trunk/layout-portlets/src/java/org/apache/jetspeed/portlets/layout/MultiColumnPortlet.java
(original)
+++ portals/jetspeed-2/trunk/layout-portlets/src/java/org/apache/jetspeed/portlets/layout/MultiColumnPortlet.java
Tue Oct 10 14:42:57 2006
@@ -19,8 +19,8 @@
 import java.io.UnsupportedEncodingException;
 import java.net.URLEncoder;
 import java.util.ArrayList;
-import java.util.List;
 import java.util.Iterator;
+import java.util.List;
 import java.util.StringTokenizer;
 
 import javax.portlet.ActionRequest;
@@ -291,6 +291,20 @@
                 }
                 return;
             }
+
+            if ( request.getParameter("jsDeletePage" ) != null )
+            {
+                try
+                {
+                    pageManager.removePage(requestPage);
+                }
+                catch (Exception e)
+                {
+                    throw new PortletException("Unable to access page for removing: "+e.getMessage(),
e);
+                }
+                return;
+            }
+
             
             String theme = request.getParameter("theme");
             if ( theme != null && theme.length() > 0 && !theme.equals(requestPage.getDefaultDecorator(Fragment.LAYOUT))
)

Modified: portals/jetspeed-2/trunk/src/webapp/WEB-INF/templates/layout/html/columns/layout.vm
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/trunk/src/webapp/WEB-INF/templates/layout/html/columns/layout.vm?view=diff&rev=462589&r1=462588&r2=462589
==============================================================================
--- portals/jetspeed-2/trunk/src/webapp/WEB-INF/templates/layout/html/columns/layout.vm (original)
+++ portals/jetspeed-2/trunk/src/webapp/WEB-INF/templates/layout/html/columns/layout.vm Tue
Oct 10 14:42:57 2006
@@ -58,9 +58,11 @@
     #if($isRoot)
       #getBoolProperty($allowChangePageTheme $rootDecorator "allow.change.page.theme" true)
       #getBoolProperty($allowAddPage $rootDecorator "allow.add.page" true)
+      #getBoolProperty($allowDeletePage $rootDecorator "allow.delete.page" true)
     #else
       #set($allowChangePageTheme=false)
       #set($allowAddPage=false)
+      #set($allowDeletePage=false)
     #end
 
     #getIntProperty($maxLayoutNesting $rootDecorator "max.layout.nesting" 2)
@@ -80,21 +82,29 @@
       #set($submit = ".submit()")
 
       <form name="$form" action="$formAction" method='post'>
+        #if($allowAddLayout||$allowChangeLayout)
+          <div class="layout-title">Layout Configuration</div>
+          <div class="layout-content">
+        #end
         #if ($allowChangePageTheme)
-          <label>$messages.getString("portal.page.editing.theme")</label>
+          <div>
+          <label for="theme">$messages.getString("portal.page.editing.theme")</label>
           <select id='theme' name='theme' onChange="$form$submit">
             #foreach($td in $decorationFactory.getPageDecorations($rc))
               <option value='$td' #if($rootDecorator.Name == $td) SELECTED #end>$td
             #end
           </select>   
+          </div>
         #end
         #if($allowAddLayout||$allowChangeLayout)
-          <label>$messages.getString("portal.page.editing.layout")</label>
+          <div>
+          <label for="layout">$messages.getString("portal.page.editing.layout")</label>
           <select id='layout' name='layout'>
             #foreach($ld in $decorationFactory.getLayouts($rc))     
               <option value='$ld.Name' #if($myFragment.Name == $ld.Name) SELECTED #end>$ld.DisplayName
             #end
           </select>
+          </div>
         #end
         #if ($allowChangeLayout)
           <input type="submit" name="jsChangeLayout" value="$messages.getString("portal.page.editing.changelayout")"
/>
@@ -102,10 +112,29 @@
         #if($allowAddLayout)
           <input type="submit" name="jsAddLayout" value="$messages.getString("portal.page.editing.addlayout")"
/>
         #end    
+        #if($allowAddLayout||$allowChangeLayout)
+          </div>
+        #end
+
+        #if($allowAddPage||$allowDeletePage)
+          <div class="page-title">Page Configuration</div>
+          <div class="page-content">
+        #end
         #if($allowAddPage)
-          <label>$messages.getString("portal.page.editing.page")</label>
+          <div>
+          <label for="newpage">$messages.getString("portal.page.editing.page")</label>
           <input id='newpage' name='jsPageName'/>
           <input type="submit" name="jsSubmitPage" value="$messages.getString("portal.page.editing.addpage")"/>
+          </div>
+        #end
+        #if($allowDeletePage)
+          <div>
+          <label for="deletepage">Delete this page:</label>
+          <input id="deletepage" type="submit" name="jsDeletePage" value="Delete" onclick="if(window.confirm('Do
you want to delete this page?')){return true;}return false;"/>
+          </div>
+        #end
+        #if($allowAddPage||$allowDeletePage)
+          </div>
         #end
       </form>
     </div>    

Modified: portals/jetspeed-2/trunk/src/webapp/WEB-INF/templates/layout/html/tcolumns/layout.vm
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/trunk/src/webapp/WEB-INF/templates/layout/html/tcolumns/layout.vm?view=diff&rev=462589&r1=462588&r2=462589
==============================================================================
--- portals/jetspeed-2/trunk/src/webapp/WEB-INF/templates/layout/html/tcolumns/layout.vm (original)
+++ portals/jetspeed-2/trunk/src/webapp/WEB-INF/templates/layout/html/tcolumns/layout.vm Tue
Oct 10 14:42:57 2006
@@ -61,9 +61,11 @@
     #if($isRoot)
       #getBoolProperty($allowChangePageTheme $rootDecorator "allow.change.page.theme" true)
       #getBoolProperty($allowAddPage $rootDecorator "allow.add.page" true)
+      #getBoolProperty($allowDeletePage $rootDecorator "allow.delete.page" true)
     #else
       #set($allowChangePageTheme=false)
       #set($allowAddPage=false)
+      #set($allowDeletePage=false)
     #end
 
     #getIntProperty($maxLayoutNesting $rootDecorator "max.layout.nesting" 2)
@@ -83,21 +85,29 @@
       #set($submit = ".submit()")
 
       <form name="$form" action="$formAction" method='post'>
+        #if($allowAddLayout||$allowChangeLayout)
+          <div class="layout-title">Layout Configuration</div>
+          <div class="layout-content">
+        #end
         #if ($allowChangePageTheme)
-          <label>$messages.getString("portal.page.editing.theme")</label>
+          <div>
+          <label for="theme">$messages.getString("portal.page.editing.theme")</label>
           <select id='theme' name='theme' onChange="$form$submit">
             #foreach($td in $decorationFactory.getPageDecorations($rc))
               <option value='$td' #if($rootDecorator.Name == $td) SELECTED #end>$td
             #end
           </select>   
+          </div>
         #end
         #if($allowAddLayout||$allowChangeLayout)
-          <label>$messages.getString("portal.page.editing.layout")</label>
+          <div>
+          <label for="layout">$messages.getString("portal.page.editing.layout")</label>
           <select id='layout' name='layout'>
             #foreach($ld in $decorationFactory.getLayouts($rc))     
               <option value='$ld.Name' #if($myFragment.Name == $ld.Name) SELECTED #end>$ld.DisplayName
             #end
           </select>
+          </div>
         #end
         #if ($allowChangeLayout)
           <input type="submit" name="jsChangeLayout" value="$messages.getString("portal.page.editing.changelayout")"
/>
@@ -105,10 +115,29 @@
         #if($allowAddLayout)
           <input type="submit" name="jsAddLayout" value="$messages.getString("portal.page.editing.addlayout")"
/>
         #end    
+        #if($allowAddLayout||$allowChangeLayout)
+          </div>
+        #end
+
+        #if($allowAddPage||$allowDeletePage)
+          <div class="page-title">Page Configuration</div>
+          <div class="page-content">
+        #end
         #if($allowAddPage)
-          <label>$messages.getString("portal.page.editing.page")</label>
+          <div>
+          <label for="newpage">$messages.getString("portal.page.editing.page")</label>
           <input id='newpage' name='jsPageName'/>
           <input type="submit" name="jsSubmitPage" value="$messages.getString("portal.page.editing.addpage")"/>
+          </div>
+        #end
+        #if($allowDeletePage)
+          <div>
+          <label for="deletepage">Delete this page:</label>
+          <input id="deletepage" type="submit" name="jsDeletePage" value="Delete" onclick="if(window.confirm('Do
you want to delete this page?')){return true;}return false;"/>
+          </div>
+        #end
+        #if($allowAddPage||$allowDeletePage)
+          </div>
         #end
       </form>
     </div>    



---------------------------------------------------------------------
To unsubscribe, e-mail: jetspeed-dev-unsubscribe@portals.apache.org
For additional commands, e-mail: jetspeed-dev-help@portals.apache.org


Mime
View raw message