Modified: roller/trunk/web/WEB-INF/classes/struts.xml URL: http://svn.apache.org/viewvc/roller/trunk/web/WEB-INF/classes/struts.xml?view=diff&rev=535947&r1=535946&r2=535947 ============================================================================== --- roller/trunk/web/WEB-INF/classes/struts.xml (original) +++ roller/trunk/web/WEB-INF/classes/struts.xml Mon May 7 11:33:12 2007 @@ -178,12 +178,46 @@ <result>/roller-ui/authoring/categories.do?method=selectCategory</result> </action> - <action name="bookmarks"> - <result>/roller-ui/authoring/bookmarks.do?method=selectFolder</result> + <action name="bookmarks!*" method="{1}" + class="org.apache.roller.ui.authoring.struts2.Bookmarks"> + <result name="list" type="tiles">.Bookmarks</result> + </action> + + <action name="bookmarkAdd!*" method="{1}" + class="org.apache.roller.ui.authoring.struts2.BookmarkAdd"> + <result name="input" type="tiles">.BookmarkAdd</result> + <result name="success" type="chain">bookmarks</result> + <result name="error" type="chain">bookmarks</result> + </action> + + <action name="bookmarkEdit!*" method="{1}" + class="org.apache.roller.ui.authoring.struts2.BookmarkEdit"> + <result name="input" type="tiles">.BookmarkEdit</result> + <result name="error" type="chain">bookmarks</result> + </action> + + <action name="bookmarksImport!*" method="{1}" + class="org.apache.roller.ui.authoring.struts2.BookmarksImport"> + <result name="input" type="tiles">.BookmarksImport</result> + <result name="success" type="chain">bookmarks</result> + </action> + + <action name="folderAdd!*" method="{1}" + class="org.apache.roller.ui.authoring.struts2.FolderAdd"> + <result name="input" type="tiles">.FolderAdd</result> + <result name="success" type="chain">bookmarks</result> + <result name="error" type="chain">bookmarks</result> + </action> + + <action name="folderEdit!*" method="{1}" + class="org.apache.roller.ui.authoring.struts2.FolderEdit"> + <result name="input" type="tiles">.FolderEdit</result> + <result name="error" type="chain">bookmarks</result> </action> - <action name="resources"> - <result>/roller-ui/authoring/uploadFiles.do</result> + <action name="resources!*" method="{1}" + class="org.apache.roller.ui.authoring.struts2.Resources"> + <result name="list" type="tiles">.Resources</result> </action> <action name="referrers"> @@ -209,16 +243,13 @@ <action name="templates!*" method="{1}" class="org.apache.roller.ui.authoring.struts2.Templates"> - <result name="success" type="tiles">.Templates</result> - <result name="list-ajax">/WEB-INF/jsps/authoring/struts2/Templates-list-ajax.jsp</result> - <result name="remove-success" type="tiles">.Templates</result> - <result name="remove-fail" type="tiles">.Templates</result> + <result name="list" type="tiles">.Templates</result> </action> - <action name="templateAdd!*" method="{1}" - class="org.apache.roller.ui.authoring.struts2.TemplateAdd"> - <result name="success">/WEB-INF/jsps/authoring/struts2/TemplateAdd-form-ajax.jsp</result> - <result name="addSuccess-ajax">/WEB-INF/jsps/authoring/struts2/TemplateAdd-success-ajax.jsp</result> + <action name="templateRemove!*" method="{1}" + class="org.apache.roller.ui.authoring.struts2.TemplateRemove"> + <result name="confirm" type="tiles">.TemplateRemove</result> + <result name="success" type="chain">templates</result> </action> <action name="template!*" method="{1}" @@ -271,11 +302,6 @@ <!-- - - <action name="importBookmarks!*" method="{1}" - class="org.apache.roller.ui.authoring.struts2.ImportBookmarksFormAction"> - <result name="importBookmarks.page">.import</result> - </action> <action name="importEntries!*" method="{1}" class="org.apache.roller.ui.authoring.struts2.ImportEntriesAction"> <result name="importEntries.page">.import-entries</result> @@ -285,21 +311,12 @@ class="org.apache.roller.ui.authoring.struts2.CategoryDeleteAction"> <result name="CategoryDeleteOK">.CategoryDeleteOK</result> </action> + <action name="categoryEdit!*" method="{1}" class="org.apache.roller.ui.authoring.struts2.CategoryEditAction"> <result name="CategoryForm">.CategoryForm</result> </action> - <action name="bookmarkEdit!*" method="{1}" - class="org.apache.roller.ui.authoring.struts2.BookmarkEditAction"> - <result name="BookmarkForm">.BookmarkForm</result> - </action> - - <action name="bookmarks!*" method="{1}" - class="org.apache.roller.ui.authoring.struts2.BookmarksAction"> - <result name="BookmarksForm">.BookmarksForm</result> - </action> - <action name="categorySave!*" method="{1}" class="org.apache.roller.ui.authoring.struts2.CategorySaveAction"> </action> @@ -320,23 +337,10 @@ <result name="referers.page">.referers</result> </action> - <action name="folderEdit!*" method="{1}" - class="org.apache.roller.ui.authoring.struts2.FolderEditAction"> - <result name="FolderForm">.FolderForm</result> - </action> - - <action name="folderSave!*" method="{1}" - class="org.apache.roller.ui.authoring.struts2.FolderSaveAction"> - <result name="Bookmarks" type="dispatcher">/roller-ui/authoring/bookmarks.action!selectFolder</result> - </action> <action name="toggleLinkback!*" method="{1}" class="org.apache.roller.ui.authoring.struts2.ToggleLinkbackDisplayAction"> </action> - <action name="bookmarkSave!*" method="{1}" - class="org.apache.roller.ui.authoring.struts2.BookmarkSaveAction"> - <result name="Bookmarks" type="dispatcher">/roller-ui/authoring/bookmarks.action!selectFolder</result> - <result name="BookmarkEdit" type="dispatcher">/roller-ui/authoring/bookmarkEdit.action</result> - </action> + <action name="commentManagement!*" method="{1}" class="org.apache.roller.ui.authoring.struts2.CommentManagementAction"> <result name="commentManagement.page">.CommentManagement</result> @@ -346,12 +350,6 @@ class="org.apache.roller.ui.authoring.struts2.CommentManagementAction"> <result name="commentManagement.page">.CommentManagement</result> <result name="commentManagementGlobal.page">.CommentManagementGlobal</result> - </action> - - - <action name="uploadFiles!*" method="{1}" - class="org.apache.roller.ui.authoring.struts2.UploadFileFormAction"> - <result name="uploadFiles.page">.upload-file</result> </action> --> </package>
Added: roller/trunk/web/WEB-INF/jsps/authoring/struts2/BookmarkAdd.jsp URL: http://svn.apache.org/viewvc/roller/trunk/web/WEB-INF/jsps/authoring/struts2/BookmarkAdd.jsp?view=auto&rev=535947 ============================================================================== --- roller/trunk/web/WEB-INF/jsps/authoring/struts2/BookmarkAdd.jsp (added) +++ roller/trunk/web/WEB-INF/jsps/authoring/struts2/BookmarkAdd.jsp Mon May 7 11:33:12 2007 @@ -0,0 +1,74 @@ +<%-- + Licensed to the Apache Software Foundation (ASF) under one or more + contributor license agreements. The ASF licenses this file to You + under the Apache License, Version 2.0 (the "License"); you may not + use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. For additional information regarding + copyright in this work, please see the NOTICE file in the top level + directory of this distribution. +--%> +<%@ include file="/WEB-INF/jsps/taglibs-struts2.jsp" %> + +<p class="subtitle"> + <s:text name="bookmarkForm.add.subtitle" > + <s:param value="folder.path" /> + </s:text> +</p> + +<s:form action="bookmarkAdd!save"> + <s:hidden name="weblog" /> + <s:hidden name="folderId" /> + + <table> + + <tr> + <td><s:text name="bookmarkForm.name" /></td> + <td><s:textfield name="bean.name" maxlength="255" size="70" /></td> + </tr> + + <tr> + <td><s:text name="bookmarkForm.description" /></td> + <td><s:textarea name="bean.description" rows="5" cols="50" /></td> + </tr> + + <tr> + <td><s:text name="bookmarkForm.url" /></td> + <td><s:textfield name="bean.url" maxlength="255" size="70" /></td> + </tr> + + <tr> + <td><s:text name="bookmarkForm.rssUrl" /></td> + <td><s:textfield name="bean.feedUrl" maxlength="255" size="70" /></td> + </tr> + + <tr> + <td><s:text name="bookmarkForm.image" /></td> + <td><s:textfield name="bean.image" maxlength="255" size="70" /></td> + </tr> + + <tr> + <td><s:text name="bookmarkForm.priority" /></td> + <td><s:textfield name="bean.priority" maxlength="255" size="5" /></td> + </tr> + + <tr> + <td><s:text name="bookmarkForm.weight" /></td> + <td><s:textfield name="bean.weight" maxlength="255" size="5" /></td> + </tr> + + </table> + + <p> + <s:submit key="bookmarkForm.save" /> + <s:submit key="bookmarkForm.cancel" action="bookmarks" /> + </p> + +</s:form> Added: roller/trunk/web/WEB-INF/jsps/authoring/struts2/BookmarkEdit.jsp URL: http://svn.apache.org/viewvc/roller/trunk/web/WEB-INF/jsps/authoring/struts2/BookmarkEdit.jsp?view=auto&rev=535947 ============================================================================== --- roller/trunk/web/WEB-INF/jsps/authoring/struts2/BookmarkEdit.jsp (added) +++ roller/trunk/web/WEB-INF/jsps/authoring/struts2/BookmarkEdit.jsp Mon May 7 11:33:12 2007 @@ -0,0 +1,77 @@ +<%-- + Licensed to the Apache Software Foundation (ASF) under one or more + contributor license agreements. The ASF licenses this file to You + under the Apache License, Version 2.0 (the "License"); you may not + use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. For additional information regarding + copyright in this work, please see the NOTICE file in the top level + directory of this distribution. +--%> +<%@ include file="/WEB-INF/jsps/taglibs-struts2.jsp" %> + +<p class="subtitle"> + <s:text name="bookmarkForm.edit.subtitle" > + <s:param value="bookmark.folder.path" /> + </s:text> +</p> + +<s:form action="bookmarkEdit!save"> + <s:hidden name="weblog" /> + <s:hidden name="bean.id" /> + + <%-- if we cancel then we need this attribute --%> + <s:hidden name="folderId" value="%{bookmark.folder.id}" /> + + <table> + + <tr> + <td><s:text name="bookmarkForm.name" /></td> + <td><s:textfield name="bean.name" maxlength="255" size="70" /></td> + </tr> + + <tr> + <td><s:text name="bookmarkForm.description" /></td> + <td><s:textarea name="bean.description" rows="5" cols="50" /></td> + </tr> + + <tr> + <td><s:text name="bookmarkForm.url" /></td> + <td><s:textfield name="bean.url" maxlength="255" size="70" /></td> + </tr> + + <tr> + <td><s:text name="bookmarkForm.rssUrl" /></td> + <td><s:textfield name="bean.feedUrl" maxlength="255" size="70" /></td> + </tr> + + <tr> + <td><s:text name="bookmarkForm.image" /></td> + <td><s:textfield name="bean.image" maxlength="255" size="70" /></td> + </tr> + + <tr> + <td><s:text name="bookmarkForm.priority" /></td> + <td><s:textfield name="bean.priority" maxlength="255" size="5" /></td> + </tr> + + <tr> + <td><s:text name="bookmarkForm.weight" /></td> + <td><s:textfield name="bean.weight" maxlength="255" size="5" /></td> + </tr> + + </table> + + <p> + <s:submit key="bookmarkForm.save" /> + <s:submit key="bookmarkForm.cancel" action="bookmarks" /> + </p> + +</s:form> Added: roller/trunk/web/WEB-INF/jsps/authoring/struts2/Bookmarks.jsp URL: http://svn.apache.org/viewvc/roller/trunk/web/WEB-INF/jsps/authoring/struts2/Bookmarks.jsp?view=auto&rev=535947 ============================================================================== --- roller/trunk/web/WEB-INF/jsps/authoring/struts2/Bookmarks.jsp (added) +++ roller/trunk/web/WEB-INF/jsps/authoring/struts2/Bookmarks.jsp Mon May 7 11:33:12 2007 @@ -0,0 +1,199 @@ +<%-- + Licensed to the Apache Software Foundation (ASF) under one or more + contributor license agreements. The ASF licenses this file to You + under the Apache License, Version 2.0 (the "License"); you may not + use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. For additional information regarding + copyright in this work, please see the NOTICE file in the top level + directory of this distribution. +--%> +<%@ include file="/WEB-INF/jsps/taglibs-struts2.jsp" %> + +<%-- JavaScript for bookmarks table --%> +<script type="text/javascript"> +<!-- +function setChecked(val) +{ + len = document.bookmarks.elements.length; + var i=0; + for( i=0 ; i<len ; i++) + { + document.bookmarks.elements[i].checked=val; + } +} +function onDelete() +{ + if ( confirm("<s:text name='bookmarksForm.delete.confirm' />") ) + { + document.bookmarksForm.method.value = "deleteSelected"; + document.bookmarksForm.submit(); + } + } +function onMove() +{ + if ( confirm("<s:text name='bookmarksForm.move.confirm' />") ) + { + document.bookmarksForm.method.value = "moveSelected"; + document.bookmarksForm.submit(); + } +} +//--> +</script> + +<s:if test="model.folderPath"> + <p class="subtitle"> + <s:text name="bookmarksForm.subtitle" > + <s:param value="weblog" /> + </s:text> + </p> + <p class="pagetip"> + <s:text name="bookmarksForm.rootPrompt" /> + </p> +</s:if> + +<s:else> + <p class="subtitle"> + <s:text name="bookmarksForm.path" />: / + <s:iterator id="pathItem" value="folderPath"> + <s:url id="pathUrl" action="bookmarks"> + <s:param name="weblog" value="%{actionWeblog.handle}" /> + <s:param name="folderId" value="#pathItem.id" /> + </s:url> + <s:a href="%{pathUrl}"><s:property value="#pathItem.name" /></s:a> / + </s:iterator> + <p> + <p><s:text name="bookmarksForm.folderPrompt" /></p> +</s:else> + + +<%-- Form is a table of folders followed by bookmarks, each with checkbox --%> +<s:form action="bookmarks!delete"> + <s:hidden name="weblog" /> + <s:hidden name="folderId" /> + + <%-- Select-all button --%> + <input type="button" value="<s:text name="bookmarksForm.checkAll"/>" onclick="setChecked(1)" /> + + <%-- Select-none button --%> + <input type="button" value="<s:text name="bookmarksForm.checkNone"/>" onclick="setChecked(0)" /> + + <%-- Delete-selected button --%> + <s:submit type="button" key="bookmarksForm.delete" onclick="onDelete()" /> + + <s:if test="!allFolders.isEmpty"> + <%-- Move-selected button --%> + <s:submit type="button" action="bookmarks!move" key="bookmarksForm.move" onclick="onMove()" /> + + <%-- Move-to combo-box --%> + <s:select name="targetFolderId" list="allFolders" listKey="id" listValue="path" /> + </s:if> + + <p /> + + <table class="rollertable"> + + <tr class="rHeaderTr"> + <th class="rollertable" width="5%"> </th> + <th class="rollertable" width="5%"> </th> + <th class="rollertable" width="30%"><s:text name="bookmarksForm.name" /></th> + <th class="rollertable" width="50%"><s:text name="bookmarksForm.description" /></th> + <th class="rollertable" width="5%"><s:text name="bookmarksForm.edit" /></th> + <th class="rollertable" width="5%"><s:text name="bookmarksForm.visitLink" /></th> + </tr> + + <%-- Folders --%> + <s:iterator id="folder" value="folder.folders" status="rowstatus"> + <s:if test="#rowstatus.odd == true"> + <tr class="rollertable_odd"> + </s:if> + <s:else> + <tr class="rollertable_even"> + </s:else> + + <td class="rollertable"> + <input type="checkbox" name="selectedFolders" value="<s:property value="#folder.id"/>" /> + </td> + + + <td class="rollertable" align="center"><img src='<s:url value="/images/folder.png"/>' alt="icon" /></td> + + <td class="rollertable"> + <s:url id="folderUrl" action="bookmarks"> + <s:param name="weblog" value="%{actionWeblog.handle}" /> + <s:param name="folderId" value="#folder.id" /> + </s:url> + <s:a href="%{folderUrl}"><str:truncateNicely lower="15" upper="20" ><s:property value="#folder.name" /></str:truncateNicely></s:a> + </td> + + <td class="rollertable"> + <str:truncateNicely lower="30" upper="35" ><s:property value="#folder.description" /></str:truncateNicely> + </td> + + <td class="rollertable" align="center"> + <s:url id="editUrl" action="folderEdit"> + <s:param name="weblog" value="%{actionWeblog.handle}" /> + <s:param name="bean.id" value="#folder.id" /> + </s:url> + <s:a href="%{editUrl}"><img src='<s:url value="/images/page_white_edit.png"/>' border="0" alt="icon" /></s:a> + </td> + + <td class="rollertable"> </td> + + </tr> + </s:iterator> + + <%-- Bookmarks --%> + <s:iterator id="bookmark" value="folder.bookmarks" status="rowstatus"> + <s:if test="#rowstatus.odd == true"> + <tr class="rollertable_odd"> + </s:if> + <s:else> + <tr class="rollertable_even"> + </s:else> + + <td class="rollertable"> + <input type="checkbox" name="selectedBookmarks" value="<s:property value="#bookmark.id"/>" /> + </td> + + <td class="rollertable" align="center"><img src='<s:url value="/images/link.png"/>' alt="icon" /></td> + + <td class="rollertable"> + <str:truncateNicely lower="15" upper="20" ><s:property value="#bookmark.name" /></str:truncateNicely> + </td> + + <td class="rollertable"> + <str:truncateNicely lower="30" upper="35" ><s:property value="#bookmark.description" /></str:truncateNicely> + </td> + + <td class="rollertable" align="center"> + <s:url id="editUrl" action="bookmarkEdit"> + <s:param name="weblog" value="%{actionWeblog.handle}" /> + <s:param name="bean.id" value="#bookmark.id" /> + </s:url> + <s:a href="%{editUrl}"><img src='<s:url value="/images/page_white_edit.png"/>' border="0" alt="icon" + title="<s:text name='bookmarksForm.edit.tip' />" /></s:a> + </td> + + <td class="rollertable" align="center"> + <s:if test="#bookmark.url != null" > + <a href="<s:property value="#bookmark.url" />"> + <img src='<s:url value="/images/world_go.png"/>' border="0" alt="icon" + title="<s:text name='bookmarksForm.visitLink.tip' />" /> + </a> + </s:if> + </td> + + </tr> + </s:iterator> + + </table> + +</s:form> Added: roller/trunk/web/WEB-INF/jsps/authoring/struts2/BookmarksImport.jsp URL: http://svn.apache.org/viewvc/roller/trunk/web/WEB-INF/jsps/authoring/struts2/BookmarksImport.jsp?view=auto&rev=535947 ============================================================================== --- roller/trunk/web/WEB-INF/jsps/authoring/struts2/BookmarksImport.jsp (added) +++ roller/trunk/web/WEB-INF/jsps/authoring/struts2/BookmarksImport.jsp Mon May 7 11:33:12 2007 @@ -0,0 +1,36 @@ +<%-- + Licensed to the Apache Software Foundation (ASF) under one or more + contributor license agreements. The ASF licenses this file to You + under the Apache License, Version 2.0 (the "License"); you may not + use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. For additional information regarding + copyright in this work, please see the NOTICE file in the top level + directory of this distribution. +--%> +<%@ include file="/WEB-INF/jsps/taglibs-struts2.jsp" %> + +<p class="subtitle"> + <s:text name="bookmarksImport.subtitle" > + <s:param value="actionWeblog.handle" /> + </s:text> +</p> + +<p class="pagetip"> + <s:text name="bookmarksImport.prompt" /> +</p> + +<s:form action="bookmarksImport!save" method="POST" enctype="multipart/form-data"> + <s:hidden name="weblog" /> + <s:file name="opmlFile" /> + <br /> + <br /> + <s:submit key="bookmarksImport.import" /> +</s:form> Added: roller/trunk/web/WEB-INF/jsps/authoring/struts2/BookmarksSidebar.jsp URL: http://svn.apache.org/viewvc/roller/trunk/web/WEB-INF/jsps/authoring/struts2/BookmarksSidebar.jsp?view=auto&rev=535947 ============================================================================== --- roller/trunk/web/WEB-INF/jsps/authoring/struts2/BookmarksSidebar.jsp (added) +++ roller/trunk/web/WEB-INF/jsps/authoring/struts2/BookmarksSidebar.jsp Mon May 7 11:33:12 2007 @@ -0,0 +1,67 @@ +<%-- + Licensed to the Apache Software Foundation (ASF) under one or more + contributor license agreements. The ASF licenses this file to You + under the Apache License, Version 2.0 (the "License"); you may not + use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. For additional information regarding + copyright in this work, please see the NOTICE file in the top level + directory of this distribution. +--%> +<%@ include file="/WEB-INF/jsps/taglibs-struts2.jsp" %> + +<div class="sidebarFade"> + <div class="menu-tr"> + <div class="menu-tl"> + + <div class="sidebarInner"> + + <h3><s:text name="mainPage.actions" /></h3> + <hr size="1" noshade="noshade" /> + + <p> + <%-- Add Bookmark link --%> + <img src='<s:url value="/images/link_add.png"/>' border="0"alt="icon" /> + <s:url id="addBookmark" action="bookmarkAdd"> + <s:param name="weblog" value="%{actionWeblog.handle}" /> + <s:param name="folderId" value="%{folder.id}" /> + </s:url> + <s:a href="%{addBookmark}"><s:text name="bookmarksForm.addBookmark" /></s:a> + </p> + + <p> + <%-- Add Folder link --%> + <img src='<s:url value="/images/folder_add.png"/>' border="0"alt="icon" /> + <s:url id="addFolder" action="folderAdd"> + <s:param name="weblog" value="%{actionWeblog.handle}" /> + <s:param name="folderId" value="%{folder.id}" /> + </s:url> + <s:a href="%{addFolder}"><s:text name="bookmarksForm.addFolder" /></s:a> + </p> + + <s:if test="folderPath.isEmpty"> + <%-- Import bookmarks --%> + <p> + <img src='<s:url value="/images/link_add.png"/>' border="0"alt="icon" /> + <s:url id="importBookmarks" action="bookmarksImport"> + <s:param name="weblog" value="%{actionWeblog.handle}" /> + <s:param name="folderId" /> + </s:url> + <s:a href="%{importBookmarks}"><s:text name="bookmarksForm.importBookmarks" /></s:a> + </p> + </s:if> + + <br /> + <br /> + </div> + + </div> + </div> +</div> Added: roller/trunk/web/WEB-INF/jsps/authoring/struts2/FolderAdd.jsp URL: http://svn.apache.org/viewvc/roller/trunk/web/WEB-INF/jsps/authoring/struts2/FolderAdd.jsp?view=auto&rev=535947 ============================================================================== --- roller/trunk/web/WEB-INF/jsps/authoring/struts2/FolderAdd.jsp (added) +++ roller/trunk/web/WEB-INF/jsps/authoring/struts2/FolderAdd.jsp Mon May 7 11:33:12 2007 @@ -0,0 +1,47 @@ +<%-- + Licensed to the Apache Software Foundation (ASF) under one or more + contributor license agreements. The ASF licenses this file to You + under the Apache License, Version 2.0 (the "License"); you may not + use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. For additional information regarding + copyright in this work, please see the NOTICE file in the top level + directory of this distribution. +--%> +<%@ include file="/WEB-INF/jsps/taglibs-struts2.jsp" %> + +<p class="subtitle"> + <s:text name="folderForm.add.subtitle" > + <s:param value="folder.path" /> + </s:text> +</p> + +<s:form action="folderAdd!save"> + <s:hidden name="weblog" /> + <s:hidden name="folderId" /> + + <table> + <tr> + <td><s:text name="folderForm.name" /></td> + <td><s:textfield name="bean.name" size="70" maxlength="255" /></td> + </tr> + + <tr> + <td><s:text name="folderForm.description" /></td> + <td><s:textarea name="bean.description" rows="5" cols="50" /></td> + </tr> + </table> + + <p> + <s:submit key="folderForm.save" /> + <s:submit key="folderForm.cancel" action="bookmarks" /> + </p> + +</s:form> Added: roller/trunk/web/WEB-INF/jsps/authoring/struts2/FolderEdit.jsp URL: http://svn.apache.org/viewvc/roller/trunk/web/WEB-INF/jsps/authoring/struts2/FolderEdit.jsp?view=auto&rev=535947 ============================================================================== --- roller/trunk/web/WEB-INF/jsps/authoring/struts2/FolderEdit.jsp (added) +++ roller/trunk/web/WEB-INF/jsps/authoring/struts2/FolderEdit.jsp Mon May 7 11:33:12 2007 @@ -0,0 +1,50 @@ +<%-- + Licensed to the Apache Software Foundation (ASF) under one or more + contributor license agreements. The ASF licenses this file to You + under the Apache License, Version 2.0 (the "License"); you may not + use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. For additional information regarding + copyright in this work, please see the NOTICE file in the top level + directory of this distribution. +--%> +<%@ include file="/WEB-INF/jsps/taglibs-struts2.jsp" %> + +<p class="subtitle"> + <s:text name="folderForm.edit.subtitle" > + <s:param value="folder.path" /> + </s:text> +</p> + +<s:form action="folderEdit!save"> + <s:hidden name="weblog" /> + <s:hidden name="bean.id" /> + + <%-- if we cancel then we need this attribute --%> + <s:hidden name="folderId" value="%{folder.parent.id}" /> + + <table> + <tr> + <td><s:text name="folderForm.name" /></td> + <td><s:textfield name="bean.name" size="70" maxlength="255" /></td> + </tr> + + <tr> + <td><s:text name="folderForm.description" /></td> + <td><s:textarea name="bean.description" rows="5" cols="50" /></td> + </tr> + </table> + + <p> + <s:submit key="folderForm.save" /> + <s:submit key="folderForm.cancel" action="bookmarks" /> + </p> + +</s:form> Added: roller/trunk/web/WEB-INF/jsps/authoring/struts2/Resources.jsp URL: http://svn.apache.org/viewvc/roller/trunk/web/WEB-INF/jsps/authoring/struts2/Resources.jsp?view=auto&rev=535947 ============================================================================== --- roller/trunk/web/WEB-INF/jsps/authoring/struts2/Resources.jsp (added) +++ roller/trunk/web/WEB-INF/jsps/authoring/struts2/Resources.jsp Mon May 7 11:33:12 2007 @@ -0,0 +1,209 @@ +<%-- + Licensed to the Apache Software Foundation (ASF) under one or more + contributor license agreements. The ASF licenses this file to You + under the Apache License, Version 2.0 (the "License"); you may not + use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. For additional information regarding + copyright in this work, please see the NOTICE file in the top level + directory of this distribution. +--%> +<%@ include file="/WEB-INF/jsps/taglibs-struts2.jsp" %> + +<script type="text/javascript"> +<!-- +function validate() { + valid = false; + for (i=0; i<5; i++) { + var field = document.getElementById("uploadFile" + i); + if (!isblank(field.value)) { + valid = true; + break; + } + } + if (!valid) window.alert('<s:text name="uploadFiles.noFilesSpecified" />'); + else document.forms[0].submit(); +} +// --> +</script> + +<p class="subtitle"> + <s:text name="uploadFiles.subtitle" > + <s:param value="actionWeblog.handle" /> + </s:text> +</p> +<p class="pagetip"> + <s:text name="uploadFiles.tip" /> +</p> +<p class="pagetip"> + <s:text name="uploadFiles.quotaNote"> + <s:param value="getProp('uploads.file.maxsize')" /> + <s:param value="getProp('uploads.dir.maxsize')" /> + </s:text> +</p> + +<%-- -------------------------- +File upload form, but only if it's enabled and weblog is under quota +--%> + +<s:if test="!getBooleanProp('uploads.enabled')"> + <span class="error"><s:text name="uploadFiles.uploadDisabled" /></span> +</s:if> +<s:elseif test="overQuota"> + <span class="error"><s:text name="uploadFiles.exceededQuota" /></span> + <br /> +</s:elseif> +<s:else> + <s:form name="uploadFiles" action="resources!upload" method="POST" enctype="multipart/form-data"> + <s:hidden name="weblog" /> + <s:hidden name="path" /> + + <br /> + + <s:file name="uploadedFiles" size="30" /><br /> + + <div id="fileControl1" class="miscControl"> + <s:file name="uploadedFiles" size="30" /><br /> + </div> + + <div id="fileControl2" class="miscControl"> + <s:file name="uploadedFiles" size="30" /><br /> + </div> + + <div id="fileControl3" class="miscControl"> + <s:file name="uploadedFiles" size="30" /><br /> + </div> + + <div id="fileControl4" class="miscControl"> + <s:file name="uploadedFiles" size="30" /><br /> + </div> + + <br /> + + <s:submit type="button" key="uploadFiles.upload" onclick="validate()" /> + <br /> + <br /> + + </s:form> +</s:else> + + +<h1><s:text name="uploadFiles.manageFiles" /></h1> + +<%-- -------------------------- +Create directory form +--%> +<s:if test="path == null"> + <s:form name="createSubdir" action="resources!createSubdir"> + <s:hidden name="weblog" /> + <s:hidden name="path" /> + + <b><s:text name="uploadFiles.createDir" /></b> <s:textfield name="newDir" size="20" /> + <s:submit key="uploadFiles.createDirButton" /> + + <br /> + <br /> + + </s:form> +</s:if> + + +<%-- -------------------------- +Table of files, each with link, size and checkbox +--%> +<s:form action="resources!remove"> + <s:hidden name="weblog" /> + <s:hidden name="path"/> + + <table class="rollertable"> + + <tr class="rHeaderTr"> + <th class="rollertable" width="95%">Filename</th> + <th class="rollertable">Size</td> + <th class="rollertable">Delete</td> + </tr> + + <s:if test="path != null"> + <tr class="rollertable_even"> + <td class="rollertable"> + <s:url id="dirUrl" action="resources"> + <s:param name="weblog" value="actionWeblog.handle" /> + </s:url> + <img src='<c:url value="/images/folder.png"/>' style="padding:0px" /> + <s:a href="%{dirUrl}">..</s:a> + </td> + <td class="rollertable" align="right"> + + </td> + <td class="rollertable" align="center"> + + </td> + </tr> + </s:if> + <s:iterator id="file" value="files" status="rowstatus"> + + <s:if test="#rowstatus.odd == true"> + <tr class="rollertable_odd"> + </s:if> + <s:else> + <tr class="rollertable_even"> + </s:else> + <td class="rollertable"> + <s:if test="#file.directory"> + <s:url id="dirUrl" action="resources"> + <s:param name="weblog" /> + <s:param name="path" value="#file.path" /> + </s:url> + <img src='<c:url value="/images/folder.png"/>' style="padding:0px" /> + <s:a href="%{dirUrl}"><s:property value="#file.name" /></s:a> + </s:if> + <s:else> + <img src='<s:url value="/images/image.png"/>' style="padding:0px" /> + <a href='<c:out value="${model.resourcesBaseURL}" /><s:property value="#file.path" />'> + <s:property value="#file.name" /> + </a> + </s:else> + </td> + <td class="rollertable" align="right"> + <fmt:formatNumber value="${ffile.length / 1024}" type="number" maxFractionDigits="2" /> KB + </td> + <td class="rollertable" align="center"> + <input type="checkbox" name="deleteIds" value="<s:property value="#file.path" />" /> + </td> + </tr> + + </s:iterator> + + <tr> + <td></td> + <td></td> + <td><fmt:formatNumber value="${model.totalSize / 1024}" type="number" maxFractionDigits="2" /> KB</td> + </tr> + </table> + + <table> + <tr> + <td align="left"> + <s:submit key="uploadFiles.button.delete" /> + </td> + </tr> + </table> + +</s:form> + +<%-- +Added by Matt Raible since the focus javascript generated by Struts uses +a name reference and IE seems to only focus on file inputs via elements[0]? +--%> +<script type="text/javascript"> +<!-- + document.forms[0].elements[0].focus(); +// --> +</script> Added: roller/trunk/web/WEB-INF/jsps/authoring/struts2/TemplateRemove.jsp URL: http://svn.apache.org/viewvc/roller/trunk/web/WEB-INF/jsps/authoring/struts2/TemplateRemove.jsp?view=auto&rev=535947 ============================================================================== --- roller/trunk/web/WEB-INF/jsps/authoring/struts2/TemplateRemove.jsp (added) +++ roller/trunk/web/WEB-INF/jsps/authoring/struts2/TemplateRemove.jsp Mon May 7 11:33:12 2007 @@ -0,0 +1,48 @@ +<%-- + Licensed to the Apache Software Foundation (ASF) under one or more + contributor license agreements. The ASF licenses this file to You + under the Apache License, Version 2.0 (the "License"); you may not + use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. For additional information regarding + copyright in this work, please see the NOTICE file in the top level + directory of this distribution. +--%> +<%@ include file="/WEB-INF/jsps/taglibs-struts2.jsp" %> + +<p class="subtitle"> + <s:text name="pageRemove.subtitle" /> +</p> + +<p> + <s:text name="pageRemove.youSure"> + <s:param value="template.name" /> + </s:text> +</p> + +<p> + <s:text name="pageRemove.pageId" /> = [<s:property value="template.id" />] + <br /> + <s:text name="pageRemove.pageName" /> = [<s:property value="template.name" />] +</p> + +<table> + <tr> + <td> + <s:form action="templateRemove!remove"> + <s:hidden name="removeId" /> + <s:hidden name="weblog" value="%{actionWeblog.handle}" /> + + <s:submit key="application.yes" /> + <s:submit key="application.no" action="templates" /> + </s:form> + </td> + </tr> +</table> Modified: roller/trunk/web/WEB-INF/jsps/authoring/struts2/Templates.jsp URL: http://svn.apache.org/viewvc/roller/trunk/web/WEB-INF/jsps/authoring/struts2/Templates.jsp?view=diff&rev=535947&r1=535946&r2=535947 ============================================================================== --- roller/trunk/web/WEB-INF/jsps/authoring/struts2/Templates.jsp (original) +++ roller/trunk/web/WEB-INF/jsps/authoring/struts2/Templates.jsp Mon May 7 11:33:12 2007 @@ -30,29 +30,59 @@ <p><s:text name="pagesForm.themesReminder"><s:param value="actionWeblog.editorTheme"/></s:text></p> </s:if> -<%-- table of templates via ajax --%> -<div class="tmplsHead"> - <table cellpadding="0"> - <tr> - <td><h2>Your Templates</h2> <img src="<s:url value="/images/help.png"/>"/></td> - <td align="right"> - <s:url id="addTmpl" action="templateAdd"> - <s:param name="weblog" value="actionWeblog.handle"/> +<%-- table of pages --%> +<table class="rollertable"> + <tr> + <th width="30%"><s:text name="pagesForm.name" /></th> + <th width="60%"><s:text name="pagesForm.description" /></th> + <th width="10"><s:text name="pagesForm.remove" /></th> + </tr> + <s:iterator id="p" value="templates" status="rowstatus"> + <s:if test="#rowstatus.odd == true"> + <tr class="rollertable_odd"> + </s:if> + <s:else> + <tr class="rollertable_even"> + </s:else> + + <td style="vertical-align:middle"> + <s:if test="! #p.hidden"> + <s:url id="editIcon" value="/images/page_white.png"/> + </s:if> + <s:else> + <s:url id="editIcon" value="/images/page_white_gear.png"/> + </s:else> + <img src='<s:url value="%{editIcon}"/>' border="0" alt="icon" /> + <s:url id="edit" action="template"> + <s:param name="weblog" value="actionWeblog.handle" /> + <s:param name="bean.id" value="#p.id" /> </s:url> - <img src="<s:url value="/images/add.png"/>"/> <s:a theme="ajax" href="%{addTmpl}" targets="addTmplForm">Add Template</s:a> + <s:a href="%{edit}"><s:property value="#p.name" /></s:a> + </td> + + <td style="vertical-align:middle"><s:property value="#p.description" /></td> + + <td class="center" style="vertical-align:middle"> + <s:if test="!#p.required"> + <s:url id="removeUrl" action="templateRemove"> + <s:param name="weblog" value="actionWeblog.handle"/> + <s:param name="removeId" value="#p.id"/> + </s:url> + <s:a href="%{removeUrl}"><img src='<s:url value="/images/delete.png"/>' /></s:a> + </s:if> + <s:else> + <img src='<s:url value="/images/lock.png"/>' border="0" alt="icon" + title='<s:text name="pagesForm.required"/>' /> + </s:else> </td> - </tr> - </table> -</div> -<script type="text/javascript" language="javascript"> -dojo.event.topic.subscribe("/refreshTmpls", function(nothing) { - // i don't need to do anything :/ -}); -</script> -<s:url id="listTmpls" action="templates" method="list"> - <s:param name="weblog" value="actionWeblog.handle"/> -</s:url> -<s:div theme="ajax" href="%{listTmpls}" listenTopics="/refreshTmpls" cssClass="tmplsList" /> - -<div id="addTmplForm"></div> + </tr> + </s:iterator> + <s:if test="templates.isEmpty"> + <tr class="rollertable_odd"> + <td style="vertical-align:middle" colspan="3" > + no templates defined + </td> + </tr> + </s:if> +</table> Added: roller/trunk/web/WEB-INF/jsps/authoring/struts2/TemplatesSidebar.jsp URL: http://svn.apache.org/viewvc/roller/trunk/web/WEB-INF/jsps/authoring/struts2/TemplatesSidebar.jsp?view=auto&rev=535947 ============================================================================== --- roller/trunk/web/WEB-INF/jsps/authoring/struts2/TemplatesSidebar.jsp (added) +++ roller/trunk/web/WEB-INF/jsps/authoring/struts2/TemplatesSidebar.jsp Mon May 7 11:33:12 2007 @@ -0,0 +1,58 @@ +<%-- + Licensed to the Apache Software Foundation (ASF) under one or more + contributor license agreements. The ASF licenses this file to You + under the Apache License, Version 2.0 (the "License"); you may not + use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. For additional information regarding + copyright in this work, please see the NOTICE file in the top level + directory of this distribution. +--%> +<%@ include file="/WEB-INF/jsps/taglibs-struts2.jsp" %> + +<div class="sidebarFade"> + <div class="menu-tr"> + <div class="menu-tl"> + +<div class="sidebarInner"> + <h3><s:text name="pagesForm.addNewPage" /></h3> + <hr size="1" noshade="noshade" /> + + <s:form action="templateAdd!save"> + <s:hidden name="weblog" value="%{actionWeblog.handle}" /> + + <table cellpadding="0" cellspacing="0"> + <tr> + <td><s:text name="pagesForm.name"/>:</td> + <td><s:textfield name="newTmplName" /></td> + </tr> + + <s:if test="!availableActions.isEmpty" > + <tr> + <td><s:text name="pagesForm.action"/>:</td> + <td> + <s:select name="newTmplAction" size="1" list="availableActions" /> + </td> + </tr> + </s:if> + + <tr> + <td></td> + <td><s:submit key="pagesForm.add" /></td> + </tr> + </table> + + </s:form> + <br /> + +</div> + </div> + </div> +</div> Modified: roller/trunk/web/WEB-INF/tiles.xml URL: http://svn.apache.org/viewvc/roller/trunk/web/WEB-INF/tiles.xml?view=diff&rev=535947&r1=535946&r2=535947 ============================================================================== --- roller/trunk/web/WEB-INF/tiles.xml (original) +++ roller/trunk/web/WEB-INF/tiles.xml Mon May 7 11:33:12 2007 @@ -184,29 +184,39 @@ <put name="styles" value="/WEB-INF/jsps/tiles/struts2/css-nosidebar.jsp" /> </definition> - <definition name=".BookmarksForm" extends=".tiles-tabbedpage" > - <put name="content" value="/WEB-INF/jsps/authoring/BookmarksForm.jsp" /> - <put name="sidebar" value="/WEB-INF/jsps/authoring/BookmarksSidebar.jsp" /> + <definition name=".Bookmarks" extends=".tiles-tabbedpage" > + <put name="content" value="/WEB-INF/jsps/authoring/struts2/Bookmarks.jsp" /> + <put name="sidebar" value="/WEB-INF/jsps/authoring/struts2/BookmarksSidebar.jsp" /> <put name="styles" value="/WEB-INF/jsps/tiles/struts2/css-sidebar.jsp" /> </definition> - <definition name=".BookmarkForm" extends=".tiles-tabbedpage" > - <put name="content" value="/WEB-INF/jsps/authoring/BookmarkForm.jsp" /> + <definition name=".BookmarkAdd" extends=".tiles-tabbedpage" > + <put name="content" value="/WEB-INF/jsps/authoring/struts2/BookmarkAdd.jsp" /> <put name="styles" value="/WEB-INF/jsps/tiles/struts2/css-nosidebar.jsp" /> </definition> - <definition name=".FolderForm" extends=".tiles-tabbedpage" > - <put name="content" value="/WEB-INF/jsps/authoring/FolderForm.jsp" /> + <definition name=".BookmarkEdit" extends=".tiles-tabbedpage" > + <put name="content" value="/WEB-INF/jsps/authoring/struts2/BookmarkEdit.jsp" /> <put name="styles" value="/WEB-INF/jsps/tiles/struts2/css-nosidebar.jsp" /> </definition> - <definition name=".import" extends=".tiles-tabbedpage" > - <put name="content" value="/WEB-INF/jsps/authoring/import.jsp" /> + <definition name=".BookmarksImport" extends=".tiles-tabbedpage" > + <put name="content" value="/WEB-INF/jsps/authoring/struts2/BookmarksImport.jsp" /> <put name="styles" value="/WEB-INF/jsps/tiles/struts2/css-nosidebar.jsp" /> </definition> - <definition name=".upload-file" extends=".tiles-tabbedpage" > - <put name="content" value="/WEB-INF/jsps/authoring/UploadFile.jsp" /> + <definition name=".FolderAdd" extends=".tiles-tabbedpage" > + <put name="content" value="/WEB-INF/jsps/authoring/struts2/FolderAdd.jsp" /> + <put name="styles" value="/WEB-INF/jsps/tiles/struts2/css-nosidebar.jsp" /> + </definition> + + <definition name=".FolderEdit" extends=".tiles-tabbedpage" > + <put name="content" value="/WEB-INF/jsps/authoring/struts2/FolderEdit.jsp" /> + <put name="styles" value="/WEB-INF/jsps/tiles/struts2/css-nosidebar.jsp" /> + </definition> + + <definition name=".Resources" extends=".tiles-tabbedpage" > + <put name="content" value="/WEB-INF/jsps/authoring/struts2/Resources.jsp" /> </definition> <definition name=".referers" extends=".tiles-tabbedpage" > @@ -230,6 +240,12 @@ <definition name=".Templates" extends=".tiles-tabbedpage" > <put name="content" value="/WEB-INF/jsps/authoring/struts2/Templates.jsp" /> + <put name="sidebar" value="/WEB-INF/jsps/authoring/struts2/TemplatesSidebar.jsp" /> + <put name="styles" value="/WEB-INF/jsps/tiles/struts2/css-sidebar.jsp" /> + </definition> + + <definition name=".TemplateRemove" extends=".tiles-tabbedpage" > + <put name="content" value="/WEB-INF/jsps/authoring/struts2/TemplateRemove.jsp" /> <put name="styles" value="/WEB-INF/jsps/tiles/struts2/css-nosidebar.jsp" /> </definition>
