roller-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From snoopd...@apache.org
Subject roller git commit: Fix merge problems, switch to same version of Log4j2 that Struts uses and progress on Templates and TemplateEdit pages.
Date Mon, 03 Sep 2018 19:56:09 GMT
Repository: roller
Updated Branches:
  refs/heads/bootstrap-ui 7df1f1d0d -> 2ade07dd0


Fix merge problems, switch to same version of Log4j2 that Struts uses and progress on Templates and TemplateEdit pages.


Project: http://git-wip-us.apache.org/repos/asf/roller/repo
Commit: http://git-wip-us.apache.org/repos/asf/roller/commit/2ade07dd
Tree: http://git-wip-us.apache.org/repos/asf/roller/tree/2ade07dd
Diff: http://git-wip-us.apache.org/repos/asf/roller/diff/2ade07dd

Branch: refs/heads/bootstrap-ui
Commit: 2ade07dd0722cf21f5f5d9c4ddca49560c585474
Parents: 7df1f1d
Author: Dave Johnson <snoopdave@gmail.com>
Authored: Mon Sep 3 15:56:06 2018 -0400
Committer: Dave Johnson <snoopdave@gmail.com>
Committed: Mon Sep 3 15:56:06 2018 -0400

----------------------------------------------------------------------
 app/pom.xml                                     |   2 +-
 .../weblogger/ui/struts2/editor/FolderEdit.java |   2 +-
 app/src/main/resources/struts.xml               |  85 ++++-
 .../webapp/WEB-INF/jsps/editor/Bookmarks.jsp    | 358 +++++++++---------
 .../webapp/WEB-INF/jsps/editor/TemplateEdit.jsp | 365 ++++++++-----------
 .../webapp/WEB-INF/jsps/editor/Templates.jsp    | 143 ++++----
 .../WEB-INF/jsps/editor/TemplatesSidebar.jsp    |  59 +--
 .../WEB-INF/jsps/tiles/tiles-tabbedpage.jsp     |   2 +-
 8 files changed, 500 insertions(+), 516 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/roller/blob/2ade07dd/app/pom.xml
----------------------------------------------------------------------
diff --git a/app/pom.xml b/app/pom.xml
index f8dd75a..b490695 100644
--- a/app/pom.xml
+++ b/app/pom.xml
@@ -44,7 +44,7 @@ limitations under the License.
         <jsp-api.version>2.2</jsp-api.version>
         <jstl.version>1.2</jstl.version>
         <log4j.version>1.2.17</log4j.version>
-        <log4j2.version>2.8.2</log4j2.version>
+        <log4j2.version>2.10.0</log4j2.version>
         <lucene.version>4.10.4</lucene.version>
         <oauth-core.version>20100527</oauth-core.version>
         <maven-war.version>3.1.0</maven-war.version>

http://git-wip-us.apache.org/repos/asf/roller/blob/2ade07dd/app/src/main/java/org/apache/roller/weblogger/ui/struts2/editor/FolderEdit.java
----------------------------------------------------------------------
diff --git a/app/src/main/java/org/apache/roller/weblogger/ui/struts2/editor/FolderEdit.java b/app/src/main/java/org/apache/roller/weblogger/ui/struts2/editor/FolderEdit.java
index 8e0da96..c3658c2 100644
--- a/app/src/main/java/org/apache/roller/weblogger/ui/struts2/editor/FolderEdit.java
+++ b/app/src/main/java/org/apache/roller/weblogger/ui/struts2/editor/FolderEdit.java
@@ -140,7 +140,7 @@ public class FolderEdit extends UIAction implements ServletResponseAware {
 
     public void myValidate() {
         // make sure new name is not a duplicate of an existing folder
-        if((isAdd() || !folder.getName().equals(getBean().getName()))) {
+        if ( isAdd() || !getBean().getName().equals(folder.getName()) ) {
             if (folder.getWeblog().hasBookmarkFolder(getBean().getName())) {
                 addError("folderForm.error.duplicateName", getBean().getName());
             }

http://git-wip-us.apache.org/repos/asf/roller/blob/2ade07dd/app/src/main/resources/struts.xml
----------------------------------------------------------------------
diff --git a/app/src/main/resources/struts.xml b/app/src/main/resources/struts.xml
index b96672d..ac41d8d 100644
--- a/app/src/main/resources/struts.xml
+++ b/app/src/main/resources/struts.xml
@@ -420,18 +420,99 @@
                 class="org.apache.roller.weblogger.ui.struts2.editor.Categories">
             <result name="list" type="tiles">.Categories</result>
         </action>
-        
+
+        <action name="categoryAdd"
+                class="org.apache.roller.weblogger.ui.struts2.editor.CategoryEdit">
+            <param name="actionName">categoryAdd</param>
+            <param name="pageTitle">categoryForm.add.title</param>
+            <result name="input" type="tiles">.CategoryEdit</result>
+            <result name="success" type="chain">categories</result>
+            <result name="error" type="chain">categories</result>
+        </action>
+
+        <action name="categoryEdit"
+                class="org.apache.roller.weblogger.ui.struts2.editor.CategoryEdit">
+            <param name="actionName">categoryEdit</param>
+            <param name="pageTitle">categoryForm.edit.title</param>
+            <result name="input" type="tiles">.CategoryEdit</result>
+            <result name="success" type="chain">categories</result>
+            <result name="cancel" type="redirectAction">
+                <param name="actionName">categories</param>
+                <param name="weblog">${weblog}</param>
+            </result>
+        </action>
+
+        <action name="categoryRemove"
+                class="org.apache.roller.weblogger.ui.struts2.editor.CategoryRemove">
+            <result name="input" type="tiles">.CategoryRemove</result>
+            <result name="cancel" type="redirectAction">
+                <param name="actionName">categories</param>
+                <param name="weblog">${weblog}</param>
+            </result>
+            <result name="success" type="chain">categories</result>
+        </action>
         <action name="bookmarks"
                 class="org.apache.roller.weblogger.ui.struts2.editor.Bookmarks">
             <result name="list" type="tiles">.Bookmarks</result>
         </action>
 
+        <action name="bookmarkAdd"
+                class="org.apache.roller.weblogger.ui.struts2.editor.BookmarkEdit">
+            <param name="actionName">bookmarkAdd</param>
+            <param name="pageTitle">bookmarkForm.add.title</param>
+            <result name="input" type="tiles">.BookmarkEdit</result>
+            <result name="success" type="chain">bookmarks</result>
+            <result name="error" type="chain">bookmarks</result>
+        </action>
+
+        <action name="bookmarkEdit"
+                class="org.apache.roller.weblogger.ui.struts2.editor.BookmarkEdit">
+            <param name="actionName">bookmarkEdit</param>
+            <param name="pageTitle">bookmarkForm.edit.title</param>
+            <result name="input" type="tiles">.BookmarkEdit</result>
+            <result name="success" type="chain">bookmarks</result>
+            <result name="cancel" type="redirectAction">
+                <param name="actionName">bookmarks</param>
+                <param name="weblog">${weblog}</param>
+                <param name="folderId">${folderId}</param>
+            </result>
+            <result name="error" type="chain">bookmarkEdit</result>
+        </action>
+
         <action name="bookmarksImport"
                 class="org.apache.roller.weblogger.ui.struts2.editor.BookmarksImport">
             <result name="input" type="tiles">.BookmarksImport</result>
             <result name="success" type="chain">bookmarks</result>
         </action>
-        
+
+        <action name="folderAdd"
+                class="org.apache.roller.weblogger.ui.struts2.editor.FolderEdit">
+            <param name="actionName">folderAdd</param>
+            <param name="pageTitle">folderForm.add.title</param>
+            <result name="input" type="tiles">.FolderEdit</result>
+            <!-- redirect because switching to the newly created bookmarks folder -->
+            <result name="success" type="redirectAction">
+                <param name="actionName">bookmarks!folderCreated</param>
+                <param name="weblog">${weblog}</param>
+                <param name="folderId">${folderId}</param>
+            </result>
+            <result name="error" type="chain">bookmarks</result>
+        </action>
+
+        <action name="folderEdit"
+                class="org.apache.roller.weblogger.ui.struts2.editor.FolderEdit">
+            <param name="actionName">folderEdit</param>
+            <param name="pageTitle">folderForm.edit.title</param>
+            <result name="input" type="tiles">.FolderEdit</result>
+            <result name="success" type="chain">bookmarks</result>
+            <result name="cancel" type="redirectAction">
+                <param name="actionName">bookmarks</param>
+                <param name="weblog">${weblog}</param>
+                <param name="folderId">${folderId}</param>
+            </result>
+            <result name="error" type="chain">bookmarks</result>
+        </action>
+
         <action name="weblogConfig"
                 class="org.apache.roller.weblogger.ui.struts2.editor.WeblogConfig">
             <result name="input" type="tiles">.WeblogConfig</result>

http://git-wip-us.apache.org/repos/asf/roller/blob/2ade07dd/app/src/main/webapp/WEB-INF/jsps/editor/Bookmarks.jsp
----------------------------------------------------------------------
diff --git a/app/src/main/webapp/WEB-INF/jsps/editor/Bookmarks.jsp b/app/src/main/webapp/WEB-INF/jsps/editor/Bookmarks.jsp
index 8504ea2..3c2e364 100644
--- a/app/src/main/webapp/WEB-INF/jsps/editor/Bookmarks.jsp
+++ b/app/src/main/webapp/WEB-INF/jsps/editor/Bookmarks.jsp
@@ -28,19 +28,19 @@ We used to call them Bookmarks and Folders, now we call them Blogroll links and
 
 <%-- Main blogroll/folder management interface, a checkbox-table with some buttons  --%>
 
-<p class="subtitle"> <s:text name="bookmarksForm.subtitle" > <s:param value="weblog" /> </s:text> </p>
+<p class="subtitle"><s:text name="bookmarksForm.subtitle"> <s:param value="weblog"/> </s:text></p>
 
 <s:if test="folder.name == 'default'">
-    <p class="pagetip"> <s:text name="bookmarksForm.rootPrompt" /> </p>
+    <p class="pagetip"><s:text name="bookmarksForm.rootPrompt"/></p>
 </s:if>
 
 
 <%-- table of blogroll links with selection checkboxes, wrapped in a form --%>
 
 <s:form action="bookmarks!delete" theme="bootstrap" cssClass="form-horizontal">
-	<s:hidden name="salt" />
-    <s:hidden name="weblog" />
-    <s:hidden name="folderId" />
+    <s:hidden name="salt"/>
+    <s:hidden name="weblog"/>
+    <s:hidden name="folderId"/>
 
     <%-- for default blogroll, show page "tip" and read-only folder name --%>
 
@@ -51,7 +51,7 @@ We used to call them Bookmarks and Folders, now we call them Blogroll links and
                 <s:text name="bookmarksForm.blogrollName"/>
             </label>
             <div class="col-sm-9 controls">
-                <div class="form-control"> <s:text name="%{folder.name}"/> </div>
+                <div class="form-control"><s:text name="%{folder.name}"/></div>
             </div>
         </div>
 
@@ -72,17 +72,17 @@ We used to call them Bookmarks and Folders, now we call them Blogroll links and
                 <input style="width:55%; float:left" type="text" name="folder.name"
                        value="<s:text name='%{folder.name}'/>" id="bookmarks_folder_name" class="form-control"
                        onchange="nameChanged()"
-                       onkeyup="nameChanged()" />
+                       onkeyup="nameChanged()"/>
                 <button type="button" id="rename_button"
                         class="btn btn-success" style="float:left; margin-left:1em;"
                         onclick="renameFolder(); return false;"
-                        onsubmit="return false;" >
+                        onsubmit="return false;">
                     <s:text name="generic.rename"/>
                 </button>
                 <button type="button" id="rename_cancel"
                         class="btn btn-default" style="float:left; margin-left:1em;"
                         onclick="cancelRenameFolder(); return false;"
-                        onsubmit="return false;" >
+                        onsubmit="return false;">
                     <s:text name="generic.cancel"/>
                 </button>
             </div>
@@ -93,7 +93,7 @@ We used to call them Bookmarks and Folders, now we call them Blogroll links and
     <%-- allow user to select the bookmark folder to view --%>
 
     <s:select name="viewFolderId" list="allFolders" listKey="id" listValue="name"
-        label="%{getText('bookmarksForm.switchTo')}" onchange="viewChanged()" onmouseup="viewChanged()"/>
+              label="%{getText('bookmarksForm.switchTo')}" onchange="viewChanged()" onmouseup="viewChanged()"/>
 
     <table class="rollertable table table-striped">
 
@@ -101,72 +101,72 @@ We used to call them Bookmarks and Folders, now we call them Blogroll links and
             <th width="5%">
                 <input name="control" type="checkbox"
                        onclick="toggleFunctionAll(this.checked); selectionChanged()"
-                title="<s:text name="bookmarksForm.selectAllLabel"/>"/>
+                       title="<s:text name="bookmarksForm.selectAllLabel"/>"/>
             </th>
-            <th class="rollertable" width="25%"><s:text name="generic.name" /></th>
-            <th class="rollertable" width="70%"><s:text name="bookmarksForm.url" /></th>
-            <th class="rollertable" width="5%"><s:text name="generic.edit" /></th>
+            <th class="rollertable" width="25%"><s:text name="generic.name"/></th>
+            <th class="rollertable" width="70%"><s:text name="bookmarksForm.url"/></th>
+            <th class="rollertable" width="5%"><s:text name="generic.edit"/></th>
         </tr>
-        
+
         <s:if test="folder.bookmarks.size > 0">
-        
-        <%-- Bookmarks --%>
-        <s:iterator var="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>
-                
+
+            <%-- Bookmarks --%>
+            <s:iterator var="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 center" style="vertical-align:middle">
                     <input type="checkbox" name="selectedBookmarks" onchange="selectionChanged()"
-                        title="<s:text name="bookmarksForm.selectOneLabel"><s:param value="#bookmark.name"/></s:text>"
-                        value="<s:property value="#bookmark.id"/>" />
+                           title="<s:text name="bookmarksForm.selectOneLabel"><s:param value="#bookmark.name"/></s:text>"
+                           value="<s:property value="#bookmark.id"/>"/>
                 </td>
-                
+
                 <td>
-                    <str:truncateNicely lower="40" upper="50" >
-                        <s:property value="#bookmark.name" />
+                    <str:truncateNicely lower="40" upper="50">
+                        <s:property value="#bookmark.name"/>
                     </str:truncateNicely>
                 </td>
-                
+
                 <td>
-                    <s:if test="#bookmark.url != null" >
-                        <a href='<s:property value="#bookmark.url" />' target='_blank' >
-                            <str:truncateNicely lower="70" upper="90" >
-                                <s:property value="#bookmark.url" />
+                    <s:if test="#bookmark.url != null">
+                        <a href='<s:property value="#bookmark.url" />' target='_blank'>
+                            <str:truncateNicely lower="70" upper="90">
+                                <s:property value="#bookmark.url"/>
                             </str:truncateNicely>
                             <span class="glyphicon glyphicon-play-circle"></span>
                         </a>
                     </s:if>
 
                 </td>
-                
+
                 <td align="center">
 
                     <a href="#" onclick="editBookmark(
-                            '<s:property value="#bookmark.id" />',
+                            '<s:property value="#bookmark.id"/>',
                             '<s:property value="#bookmark.name"/>',
                             '<s:property value="#bookmark.url"/>',
                             '<s:property value="#bookmark.feedUrl"/>',
                             '<s:property value="#bookmark.description"/>',
-                            '<s:property value="#bookmark.image" />' )">
+                            '<s:property value="#bookmark.image"/>' )">
                         <span class="glyphicon glyphicon-edit"></span>
                     </a>
 
                 </td>
-                
-            </tr>
 
-        </s:iterator>
-        
+                </tr>
+
+            </s:iterator>
+
         </s:if>
 
         <s:else>
             <tr>
                 <td style="vertical-align:middle; padding-top: 1em;" colspan="7">
-                    <s:text name="bookmarksForm.noresults" />
+                    <s:text name="bookmarksForm.noresults"/>
                 </td>
             </tr>
         </s:else>
@@ -193,16 +193,16 @@ We used to call them Bookmarks and Folders, now we call them Blogroll links and
     <s:if test="folder.bookmarks.size > 0">
         <%-- Delete-selected button --%>
         <input id="delete_selected" value="<s:text name="bookmarksForm.delete"/>" type="button"
-            class="btn btn-danger" style="float:left;"
-            onclick="confirmDeleteSelected();return false;"/>
+               class="btn btn-danger" style="float:left;"
+               onclick="confirmDeleteSelected();return false;"/>
     </s:if>
 
     <s:if test="folder.name != 'default'">
         <%-- Delete the whole blogroll --%>
         <s:submit value="%{getText('bookmarksForm.deleteFolder')}" theme="simple"
-            cssClass="btn btn-danger" cssStyle="float:right; clear:left; margin-top:2em"
-            action="bookmarks!deleteFolder"
-            onclick="confirmDeleteFolder();return false;"/>
+                  cssClass="btn btn-danger" cssStyle="float:right; clear:left; margin-top:2em"
+                  action="bookmarks!deleteFolder"
+                  onclick="confirmDeleteFolder();return false;"/>
 
     </s:if>
 
@@ -223,56 +223,52 @@ We used to call them Bookmarks and Folders, now we call them Blogroll links and
     var viewSelector;
     var moveToSelector;
 
-    $( document ).ready(function() {
+    $(document).ready(function () {
 
         originalName = $("#bookmarks_folder_name:first").val();
 
-        if ( !originalName ) {
+        if (!originalName) {
             originalName = 'default';
         }
 
-        renameButton         = $("#rename_button:first");
-        renameCancel         = $("#rename_cancel:first");
+        renameButton = $("#rename_button:first");
+        renameCancel = $("#rename_cancel:first");
         deleteSelectedButton = $("#delete_selected:first");
-        moveSelectedButton   = $("#move_selected:first");
-        viewSelector         = $("#bookmarks_viewFolderId:first");
-        moveToSelector       = $("#bookmarks_targetFolderId:first");
+        moveSelectedButton = $("#move_selected:first");
+        viewSelector = $("#bookmarks_viewFolderId:first");
+        moveToSelector = $("#bookmarks_targetFolderId:first");
 
         nameChanged();
         selectionChanged();
 
         // add the "New Blogroll" option to blogroll selectors
-        viewSelector.append(
-                new Option('<s:text name="bookmarksForm.newBlogroll"/>', "new_blogroll" ));
-        //moveToSelector.append(
-                //new Option( '<s:text name="bookmarksForm.newBlogroll"/>', "new_blogroll" ));
+        viewSelector.append(new Option('<s:text name="bookmarksForm.newBlogroll"/>', "new_blogroll"));
     });
 
 
-
     function selectionChanged() {
         var checked = false;
         var selected = $("[name=selectedBookmarks]");
-        for ( var i in selected ) {
-            if ( selected[i].checked ) {
+        for (var i in selected) {
+            if (selected[i].checked) {
                 checked = true;
                 break;
             }
         }
-        if ( checked ) {
-            deleteSelectedButton.attr("disabled", false );
+        if (checked) {
+            deleteSelectedButton.attr("disabled", false);
             deleteSelectedButton.addClass("btn-danger");
 
-            moveSelectedButton.attr("disabled", false );
+            moveSelectedButton.attr("disabled", false);
             moveSelectedButton.addClass("btn-warning");
 
             moveToSelector.attr("disabled", false);
 
         } else {
-            deleteSelectedButton.attr("disabled", true );
+            deleteSelectedButton.attr("disabled", true);
             deleteSelectedButton.removeClass("btn-danger");
 
-            moveSelectedButton.attr("disabled", true );
+            moveSelectedButton.attr("disabled", true);
             moveSelectedButton.removeClass("btn-warning");
 
             moveToSelector.attr("disabled", true);
@@ -281,17 +277,17 @@ We used to call them Bookmarks and Folders, now we call them Blogroll links and
 
     function nameChanged() {
         var newName = $("#bookmarks_folder_name:first").val();
-        if ( newName && newName != originalName && newName.trim().length > 0 ) {
-            renameButton.attr("disabled", false );
+        if (newName && newName != originalName && newName.trim().length > 0) {
+            renameButton.attr("disabled", false);
             renameButton.addClass("btn-success");
 
-            renameCancel.attr("disabled", false );
+            renameCancel.attr("disabled", false);
 
         } else {
-            renameButton.attr("disabled", true );
+            renameButton.attr("disabled", true);
             renameButton.removeClass("btn-success");
 
-            renameCancel.attr("disabled", true );
+            renameCancel.attr("disabled", true);
         }
     }
 
@@ -328,8 +324,8 @@ We used to call them Bookmarks and Folders, now we call them Blogroll links and
         });
     }
 
-    function cancelRenameFolder( event ) {
-        $("#bookmarks_folder_name:first").val( originalName );
+    function cancelRenameFolder(event) {
+        $("#bookmarks_folder_name:first").val(originalName);
         nameChanged();
     }
 
@@ -342,14 +338,14 @@ We used to call them Bookmarks and Folders, now we call them Blogroll links and
     }
 
     function confirmDeleteFolder() {
-        $('#boomarks_delete_folder_folderId').val( $('#bookmarks_folderId:first').val() );
-        $('#deleteBlogrollName').html('<s:text name="%{folder.name}"/>');
+        $('#boomarks_delete_folder_folderId').val($('#bookmarks_folderId:first').val());
+        $('#deleteBlogrollName').html('<s:property value="%{folder.name}"/>');
         $('#delete-blogroll-modal').modal({show: true});
     }
 
     function onMoveToFolder() {
         var bookmarksForm = $("#bookmarks")[0];
-        bookmarksForm.action = "bookmarks!move.rol";
+       bookmarksForm.action = "bookmarks!move.rol";
         bookmarksForm.submit();
     }
 
@@ -358,7 +354,7 @@ We used to call them Bookmarks and Folders, now we call them Blogroll links and
         var bookmarksForm = $("#bookmarks")[0];
         var folderEditForm = $("#folderEditForm")[0];
 
-        if ( "new_blogroll" == bookmarksForm.viewFolderId.value ) {
+        if ("new_blogroll" == bookmarksForm.viewFolderId.value) {
             newBlogroll();
 
         } else {
@@ -370,17 +366,17 @@ We used to call them Bookmarks and Folders, now we call them Blogroll links and
 
     function newBlogroll() {
 
-      // user selected New Blogroll option, show the add/edit blogroll modal
-      $('#blogroll-edit-title').html('<s:text name="bookmarksForm.addBlogroll.title" />');
+        // user selected New Blogroll option, show the add/edit blogroll modal
+        $('#blogroll-edit-title').html('<s:text name="bookmarksForm.addBlogroll.title" />');
 
-      folderEditForm.action = "folderAdd!save.rol";
-      folderEditForm.actionName.value = "folderAdd";
+        folderEditForm.action = "folderAdd!save.rol";
+        folderEditForm.actionName.value = "folderAdd";
 
-      // disable save button until valid name is entered
+        // disable save button until valid name is entered
 
-      $('#addedit-bookmarkfolder-modal').modal({show: true});
+        $('#addedit-bookmarkfolder-modal').modal({show: true});
 
-      onBlogrollFormChanged();
+        onBlogrollFormChanged();
     }
 
 </script>
@@ -401,18 +397,18 @@ We used to call them Bookmarks and Folders, now we call them Blogroll links and
             </div>
 
             <div class="modal-body">
-                <s:form action="blogroll" id="folderEditForm" theme="bootstrap" cssClass="form-horizontal">
-                    <s:hidden name="salt" />
-                    <s:hidden name="actionName" />
-                    <s:hidden name="weblog" />
-                    <s:hidden name="bean.id" />
+                <s:form action="folderEdit" id="folderEditForm" theme="bootstrap" cssClass="form-horizontal">
+                    <s:hidden name="salt"/>
+                    <s:hidden name="actionName"/>
+                    <s:hidden name="weblog"/>
+                    <s:hidden name="bean.id"/>
 
                     <%-- action needed here because we are using AJAX to post this form --%>
                     <s:hidden name="action:folderEdit!save" value="save"/>
 
                     <s:textfield name="bean.name" label="%{getText('generic.name')}" maxlength="255"
-                        onchange="onBlogrollFormChanged()"
-                        onkeyup ="onBlogrollFormChanged()"
+                                 onchange="onBlogrollFormChanged()"
+                                 onkeyup="onBlogrollFormChanged()"
                     />
                 </s:form>
             </div> <!-- modal-body-->
@@ -439,18 +435,18 @@ We used to call them Bookmarks and Folders, now we call them Blogroll links and
 
     function onBlogrollFormChanged() {
 
-      var saveBlogrollButton = $('#save_blogroll:first');
+        var saveBlogrollButton = $('#save_blogroll:first');
 
-      var name = $('#folderEditForm_bean_name:first').val().trim();
+        var name = $('#folderEditForm_bean_name:first').val().trim();
 
-      if (name.length > 0) {
-        saveBlogrollButton.attr("disabled", false);
-        console.log("Button enabled!");
+        if (name.length > 0) {
+            saveBlogrollButton.attr("disabled", false);
+            console.log("Button enabled!");
 
-      } else {
-        saveBlogrollButton.attr("disabled", true);
-        console.log("Button disabled!");
-      }
+        } else {
+            saveBlogrollButton.attr("disabled", true);
+            console.log("Button disabled!");
+        }
 
     }
 
@@ -490,8 +486,8 @@ We used to call them Bookmarks and Folders, now we call them Blogroll links and
 
                 // kludge get folderId from response header send back by Struts action
                 var newFolderId = response.getResponseHeader('folderId');
-                viewSelector.append( new Option('', newFolderId ));
-                $("#bookmarks_viewFolderId").val( newFolderId );
+                viewSelector.append(new Option('', newFolderId));
+                $("#bookmarks_viewFolderId").val(newFolderId);
 
                 var bookmarksForm = $("#bookmarks")[0];
                 bookmarksForm.action = "bookmarks!view.rol";
@@ -519,7 +515,7 @@ We used to call them Bookmarks and Folders, now we call them Blogroll links and
 
             <div class="modal-header">
                 <h3>
-                    <s:text name="bookmarksForm.delete.confirm" />
+                    <s:text name="bookmarksForm.delete.confirm"/>
                 </h3>
             </div>
 
@@ -530,11 +526,11 @@ We used to call them Bookmarks and Folders, now we call them Blogroll links and
 
                 <div class="modal-footer">
                     <button type="button" class="btn" value="%{getText('generic.yes')}" onclick="deleteSelected()">
-                        <s:text name="generic.yes" />
+                        <s:text name="generic.yes"/>
                     </button>
                     &nbsp;
                     <button type="button" class="btn btn-default btn-primary" data-dismiss="modal">
-                        <s:text name="generic.no" />
+                        <s:text name="generic.no"/>
                     </button>
                 </div>
             </s:form>
@@ -561,7 +557,8 @@ We used to call them Bookmarks and Folders, now we call them Blogroll links and
                 </h3>
             </div>
 
-            <s:form id="boomarks_delete_folder" action="bookmarks!deleteFolder" theme="bootstrap" cssClass="form-horizontal">
+            <s:form id="boomarks_delete_folder" action="bookmarks!deleteFolder" theme="bootstrap"
+                    cssClass="form-horizontal">
                 <s:hidden name="salt"/>
                 <s:hidden name="weblog"/>
                 <s:hidden name="folderId"/>
@@ -574,7 +571,7 @@ We used to call them Bookmarks and Folders, now we call them Blogroll links and
                 <div class="modal-footer">
                     <s:submit cssClass="btn" value="%{getText('generic.yes')}"/>&nbsp;
                     <button type="button" class="btn btn-default btn-primary" data-dismiss="modal">
-                        <s:text name="generic.no" />
+                        <s:text name="generic.no"/>
                     </button>
                 </div>
 
@@ -608,72 +605,75 @@ We used to call them Bookmarks and Folders, now we call them Blogroll links and
                 </s:else>
 
                 <h3>
-                    <s:text name="%{#subtitleKey}" > </s:text> <span id="subtitle_folder_name"></span>
+                    <s:text name="%{#subtitleKey}"> </s:text> <span id="subtitle_folder_name"></span>
                 </h3>
 
                 <div id="bookmark_required_fields" role="alert" class="alert">
-                    <s:text name="bookmarkForm.requiredFields" />
+                    <s:text name="bookmarkForm.requiredFields"/>
                 </div>
 
-            </div> <%-- modal header --%>
+            </div>
+            <%-- modal header --%>
 
-                <div class="modal-body">
+            <div class="modal-body">
 
-                    <s:form action="bookmark" theme="bootstrap" cssClass="form-horizontal">
-                        <s:hidden name="salt" />
-                        <s:hidden name="weblog" />
-                            <%--
-                                Edit action uses folderId for redirection back to proper bookmarks folder on cancel
-                                (as configured in struts.xml); add action also, plus to know which folder to put new
-                                bookmark in.
-                            --%>
-                        <s:hidden name="folderId" />
-                        <s:hidden name="bean.id" />
-
-                        <s:textfield name="bean.name" maxlength="255"
-                                     onchange="onBookmarkFormChanged()"
-                                     onkeyup ="onBookmarkFormChanged()"
-                                     label="%{getText('generic.name')}" />
-
-                        <s:textfield name="bean.url" maxlength="255"
-                                     onchange="onBookmarkFormChanged()"
-                                     onkeyup ="onBookmarkFormChanged()"
-                                     label="%{getText('bookmarkForm.url')}" />
-
-                        <s:textfield name="bean.feedUrl" maxlength="255"
-                                     onchange="onBookmarkFormChanged()"
-                                     onkeyup ="onBookmarkFormChanged()"
-                                     label="%{getText('bookmarkForm.rssUrl')}" />
-
-                        <s:textfield name="bean.description" maxlength="255"
-                                     onchange="onBookmarkFormChanged()"
-                                     onkeyup ="onBookmarkFormChanged()"
-                                     label="%{getText('generic.description')}" />
-
-                        <s:textfield name="bean.image" maxlength="255"
-                                     onchange="onBookmarkFormChanged()"
-                                     onkeyup ="onBookmarkFormChanged()"
-                                     label="%{getText('bookmarkForm.image')}" />
-                    </s:form>
+                <s:form action="bookmarkEdit" theme="bootstrap" cssClass="form-horizontal">
+                    <s:hidden name="salt"/>
+                    <s:hidden name="weblog"/>
+                    <%--
+                        Edit action uses folderId for redirection back to proper bookmarks folder on cancel
+                        (as configured in struts.xml); add action also, plus to know which folder to put new
+                        bookmark in.
+                    --%>
+                    <s:hidden name="folderId"/>
+                    <s:hidden name="bean.id"/>
+
+                    <s:textfield name="bean.name" maxlength="255"
+                                 onchange="onBookmarkFormChanged()"
+                                 onkeyup="onBookmarkFormChanged()"
+                                 label="%{getText('generic.name')}"/>
+
+                    <s:textfield name="bean.url" maxlength="255"
+                                 onchange="onBookmarkFormChanged()"
+                                 onkeyup="onBookmarkFormChanged()"
+                                 label="%{getText('bookmarkForm.url')}"/>
+
+                    <s:textfield name="bean.feedUrl" maxlength="255"
+                                 onchange="onBookmarkFormChanged()"
+                                 onkeyup="onBookmarkFormChanged()"
+                                 label="%{getText('bookmarkForm.rssUrl')}"/>
+
+                    <s:textfield name="bean.description" maxlength="255"
+                                 onchange="onBookmarkFormChanged()"
+                                 onkeyup="onBookmarkFormChanged()"
+                                 label="%{getText('generic.description')}"/>
+
+                    <s:textfield name="bean.image" maxlength="255"
+                                 onchange="onBookmarkFormChanged()"
+                                 onkeyup="onBookmarkFormChanged()"
+                                 label="%{getText('bookmarkForm.image')}"/>
+                </s:form>
 
-                </div>
+            </div>
 
-                <div class="modal-body">
-                    <div class="modal-footer">
-                        <p id="feedback-area-edit"></p>
-                        <button type="button" id="save_bookmark" onclick="saveBookmark()" class="btn btn-primary">
-                            <s:text name="generic.save"/>
-                        </button>
-                        <button type="button" class="btn" data-dismiss="modal">
-                            <s:text name="generic.cancel"/>
-                        </button>
-                    </div>
+            <div class="modal-body">
+                <div class="modal-footer">
+                    <p id="feedback-area-edit"></p>
+                    <button type="button" id="save_bookmark" onclick="saveBookmark()" class="btn btn-primary">
+                        <s:text name="generic.save"/>
+                    </button>
+                    <button type="button" class="btn" data-dismiss="modal">
+                        <s:text name="generic.cancel"/>
+                    </button>
                 </div>
+            </div>
 
 
-        </div> <%-- modal content --%>
+        </div>
+        <%-- modal content --%>
 
-    </div> <%-- modal dialog --%>
+    </div>
+    <%-- modal dialog --%>
 
 </div> <%-- modal --%>
 
@@ -687,7 +687,7 @@ We used to call them Bookmarks and Folders, now we call them Blogroll links and
     function addBookmark() {
 
         var saveBookmarkButton = $('#save_bookmark:first');
-        saveBookmarkButton.attr("disabled", true );
+        saveBookmarkButton.attr("disabled", true);
 
         var elem = $('#bookmark_required_fields:first');
         elem.html('<s:text name="bookmarkForm.requiredFields" />');
@@ -709,7 +709,7 @@ We used to call them Bookmarks and Folders, now we call them Blogroll links and
     function editBookmark(id, name, url, feedUrl, description, image) {
 
         var saveBookmarkButton = $('#save_bookmark:first');
-        saveBookmarkButton.attr("disabled", true );
+        saveBookmarkButton.attr("disabled", true);
 
         var elem = $('#bookmark_required_fields:first');
         elem.html('<s:text name="bookmarkForm.requiredFields" />');
@@ -735,27 +735,27 @@ We used to call them Bookmarks and Folders, now we call them Blogroll links and
 
         var saveBookmarkButton = $('#save_bookmark:first');
 
-        var name    = $('#bookmark_bean_name:first').val().trim();
-        var url     = $('#bookmark_bean_url:first').val().trim();
-        var image   = $('#bookmark_bean_image:first').val().trim();
+        var name = $('#bookmark_bean_name:first').val().trim();
+        var url = $('#bookmark_bean_url:first').val().trim();
+        var image = $('#bookmark_bean_image:first').val().trim();
         var feedUrl = $('#bookmark_bean_feedUrl:first').val().trim();
 
         var badUrls = [];
 
-        if ( url.length > 0 ) {
-            if ( !isValidUrl(url) ) {
+        if (url.length > 0) {
+            if (!isValidUrl(url)) {
                 badUrls.push("Bookmark URL")
             }
         }
 
-        if ( image.length > 0 ) {
-            if ( !isValidUrl(image) ) {
+        if (image.length > 0) {
+            if (!isValidUrl(image)) {
                 badUrls.push("Image URL")
             }
         }
 
-        if ( feedUrl.length > 0 ) {
-            if ( !isValidUrl(feedUrl) ) {
+        if (feedUrl.length > 0) {
+            if (!isValidUrl(feedUrl)) {
                 badUrls.push("Newsfeed URL")
             }
         }
@@ -763,7 +763,7 @@ We used to call them Bookmarks and Folders, now we call them Blogroll links and
         var elem = $('#bookmark_required_fields:first');
         var message = '';
 
-        if ( name.length > 0 && url.length > 0 && badUrls.length == 0 ) {
+        if (name.length > 0 && url.length > 0 && badUrls.length == 0) {
             saveBookmarkButton.attr("disabled", false);
 
             message = '<s:text name="generic.looksGood" />';
@@ -775,15 +775,15 @@ We used to call them Bookmarks and Folders, now we call them Blogroll links and
         } else {
             saveBookmarkButton.attr("disabled", true);
 
-            if ( name.length == 0 || url.length == 0 ) {
+            if (name.length == 0 || url.length == 0) {
                 message = '<s:text name="bookmarkForm.required" />';
             }
-            if ( badUrls.length > 0 ) {
+            if (badUrls.length > 0) {
                 message = '<s:text name="bookmarkForm.badUrls" />';
                 var sep = " ";
-                for ( i in badUrls ) {
+                for (i in badUrls) {
                     message = message + sep + badUrls[i];
-                    sep  = ", ";
+                    sep = ", ";
                 }
             }
             elem.removeClass("alert-info");
@@ -793,8 +793,8 @@ We used to call them Bookmarks and Folders, now we call them Blogroll links and
         }
     }
 
-    function isValidUrl( url ) {
-        if(/^(http|https|ftp):\/\/[a-z0-9]+([\-\.]{1}[a-z0-9]+)*\.[a-z]{2,5}(:[0-9]{1,5})?(\/.*)?$/i.test(url)) {
+    function isValidUrl(url) {
+        if (/^(http|https|ftp):\/\/[a-z0-9]+([\-\.]{1}[a-z0-9]+)*\.[a-z]{2,5}(:[0-9]{1,5})?(\/.*)?$/i.test(url)) {
             return true;
         } else {
             return false;

http://git-wip-us.apache.org/repos/asf/roller/blob/2ade07dd/app/src/main/webapp/WEB-INF/jsps/editor/TemplateEdit.jsp
----------------------------------------------------------------------
diff --git a/app/src/main/webapp/WEB-INF/jsps/editor/TemplateEdit.jsp b/app/src/main/webapp/WEB-INF/jsps/editor/TemplateEdit.jsp
index 6bbb505..b3f1139 100644
--- a/app/src/main/webapp/WEB-INF/jsps/editor/TemplateEdit.jsp
+++ b/app/src/main/webapp/WEB-INF/jsps/editor/TemplateEdit.jsp
@@ -18,253 +18,198 @@
 <%@ include file="/WEB-INF/jsps/taglibs-struts2.jsp" %>
 
 <p class="subtitle">
-   <s:text name="pageForm.subtitle" >
-       <s:param value="bean.name" />
-       <s:param value="actionWeblog.handle" />
-   </s:text>
+    <s:text name="pageForm.subtitle">
+        <s:param value="bean.name"/>
+        <s:param value="actionWeblog.handle"/>
+    </s:text>
 </p>
 
 <s:if test="template.required">
-    <p class="pagetip"><s:text name="pageForm.tip.required" /></p>
+    <p class="pagetip"><s:text name="pageForm.tip.required"/></p>
 </s:if>
 <s:else>
-    <p class="pagetip"><s:text name="pageForm.tip" /></p>
+    <p class="pagetip"><s:text name="pageForm.tip"/></p>
 </s:else>
-                
-<s:form action="templateEdit!save" id="template">
-	<s:hidden name="salt" />
-    <s:hidden name="weblog" />
+
+<s:form action="templateEdit!save" id="template" theme="bootstrap" cssClass="form-vertical">
+    <s:hidden name="salt"/>
+    <s:hidden name="weblog"/>
     <s:hidden name="bean.id"/>
-    <s:hidden name ="bean.type"/>
-    
+    <s:hidden name="bean.type"/>
+
     <%-- ================================================================== --%>
     <%-- Name, link and description: disabled when page is a required page --%>
-    
-    <table cellspacing="5">
-        <tr>
-            <td class="label"><s:text name="generic.name" />&nbsp;</td>
-            <td class="field">
-                <s:if test="template.required || bean.mobile">
-                    <s:textfield name="bean.name" size="50" readonly="true" cssStyle="background: #e5e5e5" />
-                </s:if>
-                <s:else>
-                    <s:textfield name="bean.name" size="50"/>
-                </s:else>
-            </td>
-            <td class="description"></td>
-        </tr>
-        
-        <tr>
-            <td class="label"><s:text name="pageForm.action" />&nbsp;</td>
-            <td class="field">
-                 <s:textfield name="bean.action" size="50" readonly="true" cssStyle="background: #e5e5e5" />
-            </td>
-            <td class="description"></td>
-        </tr>
-        
-       <s:if test="!template.required && template.custom">
-            <tr>
-                <td class="label" valign="top"><s:text name="pageForm.link" />&nbsp;</td>
-                <td class="field">
-                    <s:textfield name="bean.link" size="50" onkeyup="updatePageURLDisplay()" />
-                    <br />
-                    <s:property value="actionWeblog.absoluteURL" />page/<span id="linkPreview" style="color:red"><s:property value="bean.link" /></span>
-                    <s:if test="template.link != null">
-                        [<a id="launchLink" onClick="launchPage()"><s:text name="pageForm.launch" /></a>]
-                    </s:if>
-                </td>
-                <td class="description"></td>
-            </tr>
+
+    <s:if test="template.required || bean.mobile">
+        <s:textfield name="bean.name" label="%{getText('generic.name')}" size="50"
+            readonly="true" cssStyle="background: #e5e5e5"/>
+    </s:if>
+    <s:else>
+        <s:textfield name="bean.name" label="%{getText('generic.name')}" size="50"/>
+    </s:else>
+
+    <s:textfield name="bean.action" label="%{getText('pageForm.action')}" size="50"
+        readonly="true" cssStyle="background: #e5e5e5"/>
+
+    <s:if test="!template.required && template.custom">
+
+        <s:text name="pageForm.link"/>
+        <s:textfield name="bean.link" label="%{getText('pageForm.link')}"
+            size="50" onkeyup="updatePageURLDisplay()"/>
+
+        <s:property value="actionWeblog.absoluteURL"/>page/
+        <span id="linkPreview" style="color:red"><s:property value="bean.link"/></span>
+        <s:if test="template.link != null">
+            [<a id="launchLink" onClick="launchPage()"><s:text name="pageForm.launch"/></a>]
         </s:if>
-        <tr>
-            <td class="label" valign="top" style="padding-top: 4px">
-                <s:text name="generic.description" />&nbsp;</td>
-            <td class="field">
-                <s:if test="template.required">
-                    <s:textarea name="bean.description" cols="50" rows="2" 
-                        readonly="true" cssStyle="background: #e5e5e5" />
-                </s:if>
-                <s:else>
-                    <s:textarea name="bean.description" cols="50" rows="2" />
-                </s:else>
-            </td>
-            <td class="description"></td>
-        </tr>
-        
-    </table>
+
+    </s:if>
+
+    <s:if test="template.required">
+        <s:textarea name="bean.description" label="%{getText('generic.description')}"
+            cols="50" rows="2" readonly="true" cssStyle="background: #e5e5e5"/>
+    </s:if>
+    <s:else>
+        <s:textarea name="bean.description" label="%{getText('generic.description')}" cols="50" rows="2"/>
+    </s:else>
 
     <%-- ================================================================== --%>
     <%-- Tabs for each of the two content areas: Standard and Mobile --%>
 
-    <div id="template-code-tabs">
-    <ul>
-        <li class="selected"><a href="#tabStandard"><em>Standard</em></a></li>
-        <s:if test="bean.contentsMobile != null">
-            <li><a href="#tabMobile"><em>Mobile</em></a></li>
-        </s:if>
-    </ul>
-    <div>
-        <div id="tabStandard">
-            <s:textarea name="bean.contentsStandard" cols="80" rows="30" cssStyle="width:100%" />
+    <div class="tab-content">
+
+        <div role="tabpanel" class="tab-pane active" id="tabStandard">
+            <s:textarea name="bean.contentsStandard" cols="80" rows="30" cssStyle="width:100%"/>
         </div>
+
         <s:if test="bean.contentsMobile != null">
-            <div id="tabMobile">
-                <s:textarea name="bean.contentsMobile" cols="80" rows="30" cssStyle="width:100%" />
+            <div role="tabpanel" class="tab-pane" id="tabMobile">
+                <s:textarea name="bean.contentsMobile" cols="80" rows="30" cssStyle="width:100%"/>
             </div>
         </s:if>
-    </div>
+
     </div>
 
     <%-- ================================================================== --%>
     <%-- Save, Close and Resize text area buttons--%>
 
-    <table style="width:100%">
-        <tr>
-            <td>
-                <s:submit value="%{getText('generic.save')}" />
-                <input type="button" value='<s:text name="generic.done"/>'
-                    onclick="window.location='<s:url action="templates"><s:param name="weblog" value="%{weblog}"/></s:url>'" />
-            </td>
-        </tr>
-    </table>
-
-  
+    <s:submit value="%{getText('generic.save')}"/>
+    <input type="button" value='<s:text name="generic.done"/>'
+        onclick="window.location='<s:url action="templates"><s:param name="weblog" value="%{weblog}"/></s:url>'"/>
+
     <%-- ================================================================== --%>
     <%-- Advanced settings inside a control toggle --%>
-    
+
     <s:if test="template.custom">
-        <br />
+        <br/>
         <div id="advancedControlToggle" class="controlToggle">
             <span id="iadvancedControl">+</span>
             <a class="controlToggle" onclick="javascript:toggleControl('advancedControlToggle','advancedControl')">
-            <s:text name="pageForm.advancedSettings" /></a>
+                <s:text name="pageForm.advancedSettings"/></a>
         </div>
-        
+
         <div id="advancedControl" class="advancedControl" style="display:none">
-            
-            <table cellspacing="6">
-                <tr>
-                    <td class="label" valign="top"><s:text name="pageForm.outputContentType" />&nbsp;</td>
-                    <td class="field">
-                        <script><!--
-                        function showContentTypeField() {
-                            if (document.getElementById('template_bean_autoContentType1').checked) {
-                                document.getElementById('template_bean_manualContentType').readOnly = true;
-                                document.getElementById('template_bean_manualContentType').style.background = '#e5e5e5';
-                            } else {
-                                document.getElementById('template_bean_manualContentType').readOnly = false;
-                                document.getElementById('template_bean_manualContentType').style.background = '#ffffff';
-                            }
-                        }
-                        // --></script>
-                        <s:if test="bean.autoContentType">
-                            <input type="radio" name="bean.autoContentType" 
-                                   value="true" checked="true" 
-                                   onchange="showContentTypeField()" 
-                                   id="template_bean_autoContentType1"/> 
-                            <s:text name="pageForm.useAutoContentType" /><br />
-                            
-                            <input type="radio" name="bean.autoContentType" 
-                                   value="false" 
-                                   onchange="showContentTypeField()" 
-                                   id="template_bean_autoContentType2"/>
-                            <s:text name="pageForm.useManualContentType" />
-                            <s:textfield name="bean.manualContentType" />
-                        </s:if>
-                        <s:else>
-                            <input type="radio" name="bean.autoContentType" 
-                                   value="true" 
-                                   onchange="showContentTypeField()" 
-                                   id="template_bean_autoContentType1"/> 
-                            <s:text name="pageForm.useAutoContentType" /><br />
-                            
-                            <input type="radio" name="bean.autoContentType" 
-                                   value="false" 
-                                   checked="true" 
-                                   onchange="showContentTypeField()" 
-                                   id="template_bean_autoContentType2"/>
-                            <s:text name="pageForm.useManualContentType" />
-                            <s:textfield name="bean.manualContentType" />
-                        </s:else>
-                        
-                        <br />
-                        <br />
-                        
-                        <script><!--
-                            showContentTypeField();
-                        // --></script> 
-                        
-                    </td>
-                    <td class="description"></td>
-                </tr>
-                
-                <tr>
-                    <td class="label"><s:text name="pageForm.navbar" />&nbsp;</td>
-                    <td class="field"><s:checkbox name="bean.navbar" /> 
-                        <s:text name="pageForm.navbar.tip" />
-                    </td>
-                    <td class="description"></td>
-                </tr>
-                
-                <tr>
-                    <td class="label"><s:text name="pageForm.hidden" />&nbsp;</td>
-                    <td class="field"><s:checkbox name="bean.hidden" />
-                        <s:text name="pageForm.hidden.tip" />
-                    </td>
-                    <td class="description"></td>                            
-                </tr>
-                
-                <tr>
-                    <td class="label"><s:text name="pageForm.templateLanguage" />&nbsp;</td>
-                    <td class="field">
-                        <s:select name="bean.templateLanguage" list="templateLanguages" size="1" />
-                    </td>
-                    <td class="description"></td>
-                </tr>
-                
-            </table>
-            
+
+            <s:text name="pageForm.outputContentType"/>
+
+            <s:if test="bean.autoContentType">
+                <input type="radio" name="bean.autoContentType"
+                       value="true" checked="true"
+                       onchange="showContentTypeField()"
+                       id="template_bean_autoContentType1"/>
+                <s:text name="pageForm.useAutoContentType"/><br/>
+
+                <input type="radio" name="bean.autoContentType"
+                       value="false"
+                       onchange="showContentTypeField()"
+                       id="template_bean_autoContentType2"/>
+                <s:text name="pageForm.useManualContentType"/>
+                <s:textfield name="bean.manualContentType"/>
+            </s:if>
+            <s:else>
+                <input type="radio" name="bean.autoContentType"
+                       value="true"
+                       onchange="showContentTypeField()"
+                       id="template_bean_autoContentType1"/>
+                <s:text name="pageForm.useAutoContentType"/><br/>
+
+                <input type="radio" name="bean.autoContentType"
+                       value="false"
+                       checked="true"
+                       onchange="showContentTypeField()"
+                       id="template_bean_autoContentType2"/>
+                <s:text name="pageForm.useManualContentType"/>
+                <s:textfield name="bean.manualContentType"/>
+            </s:else>
+
+            <script><!--
+            showContentTypeField();
+            // --></script>
+
+            <s:text name="pageForm.navbar"/>
+            <s:checkbox name="bean.navbar"/>
+            <s:text name="pageForm.navbar.tip"/>
+
+            <s:text name="pageForm.hidden"/>
+            <s:checkbox name="bean.hidden"/>
+            <s:text name="pageForm.hidden.tip"/>
+
+            <s:text name="pageForm.templateLanguage"/>
+            <s:select name="bean.templateLanguage" list="templateLanguages" size="1"/>
+
         </div>
     </s:if>
-    
+
 </s:form>
 
 
 <script>
-var weblogURL = '<s:property value="actionWeblog.absoluteURL" />';
-var originalLink = '<s:property value="bean.link" />';
-var type = '<s:property value="bean.type" /> ' ;
-
-// Update page URL when user changes link
-function updatePageURLDisplay() {
-    var previewSpan = document.getElementById('linkPreview');
-    var n1 = previewSpan.firstChild;
-    var n2 = document.createTextNode(document.getElementById('template_bean_link').value);
-    if (n1 == null) {
-        previewSpan.appendChild(n2);
-    } else {
-        previewSpan.replaceChild(n2, n1);
-    }           
-}
-// Don't launch page if user has changed link, it'll be a 404
-function launchPage() {
-    if (originalLink != document.getElementById('template_bean_link').value) {
-        window.alert("Link changed, not launching page");
-    } else {
-        window.open(weblogURL + 'page/' + originalLink+'?type='+type, '_blank');
+
+    var weblogURL = '<s:property value="actionWeblog.absoluteURL" />';
+    var originalLink = '<s:property value="bean.link" />';
+    var type = '<s:property value="bean.type" /> ';
+
+    // Update page URL when user changes link
+    function updatePageURLDisplay() {
+        var previewSpan = document.getElementById('linkPreview');
+        var n1 = previewSpan.firstChild;
+        var n2 = document.createTextNode(document.getElementById('template_bean_link').value);
+        if (n1 == null) {
+            previewSpan.appendChild(n2);
+        } else {
+            previewSpan.replaceChild(n2, n1);
+        }
     }
-}
-//Get cookie to determine state of control
-if (getCookie('control_advancedControl') != null) {
-    if(getCookie('control_advancedControl') == 'true'){
-        toggle('advancedControl');
-        togglePlusMinus('iadvancedControl');
+
+    // Don't launch page if user has changed link, it'll be a 404
+    function launchPage() {
+        if (originalLink != document.getElementById('template_bean_link').value) {
+            window.alert("Link changed, not launching page");
+        } else {
+            window.open(weblogURL + 'page/' + originalLink + '?type=' + type, '_blank');
+        }
     }
-}
-</script>
 
- <script>
-     $(function() {
-         $( "#template-code-tabs" ).tabs();
-     });
- </script>
+    //Get cookie to determine state of control
+    if (getCookie('control_advancedControl') != null) {
+        if (getCookie('control_advancedControl') == 'true') {
+            toggle('advancedControl');
+            togglePlusMinus('iadvancedControl');
+        }
+    }
+
+    $(function () {
+        $("#template-code-tabs").tabs();
+    });
+
+    function showContentTypeField() {
+        if (document.getElementById('template_bean_autoContentType1').checked) {
+            document.getElementById('template_bean_manualContentType').readOnly = true;
+            document.getElementById('template_bean_manualContentType').style.background = '#e5e5e5';
+        } else {
+            document.getElementById('template_bean_manualContentType').readOnly = false;
+            document.getElementById('template_bean_manualContentType').style.background = '#ffffff';
+        }
+    }
+
+</script>

http://git-wip-us.apache.org/repos/asf/roller/blob/2ade07dd/app/src/main/webapp/WEB-INF/jsps/editor/Templates.jsp
----------------------------------------------------------------------
diff --git a/app/src/main/webapp/WEB-INF/jsps/editor/Templates.jsp b/app/src/main/webapp/WEB-INF/jsps/editor/Templates.jsp
index 4d699fd..3fa7673 100644
--- a/app/src/main/webapp/WEB-INF/jsps/editor/Templates.jsp
+++ b/app/src/main/webapp/WEB-INF/jsps/editor/Templates.jsp
@@ -18,100 +18,79 @@
 <%@ include file="/WEB-INF/jsps/taglibs-struts2.jsp" %>
 
 <p class="subtitle">
-   <s:text name="pagesForm.subtitle" >
-       <s:param value="actionWeblog.handle" />
-   </s:text>
-</p>  
+    <s:text name="pagesForm.subtitle">
+        <s:param value="actionWeblog.handle"/>
+    </s:text>
+</p>
 <p class="pagetip">
-   <s:text name="pagesForm.tip" />
+    <s:text name="pagesForm.tip"/>
 </p>
 
 <s:if test="actionWeblog.editorTheme != 'custom'">
     <p><s:text name="pagesForm.themesReminder"><s:param value="actionWeblog.editorTheme"/></s:text></p>
 </s:if>
 
-<s:form action="templatesRemove">
-<s:hidden name="salt" />
-<s:hidden name="weblog" value="%{actionWeblog.handle}" />
+<s:form action="templatesRemove" theme="bootstrap" cssClass="form-horizontal">
+    <s:hidden name="salt"/>
+    <s:hidden name="weblog" value="%{actionWeblog.handle}"/>
 
-<%-- table of pages --%>
-<table class="rollertable">
+    <%-- table of pages --%>
+    <table class="rollertable table table-striped">
 
-<s:if test="!templates.isEmpty">
+        <s:if test="!templates.isEmpty">
+
+            <tr>
+                <th width="30%"><s:text name="generic.name"/></th>
+                <th width="10"><s:text name="pagesForm.action"/></th>
+                <th width="55%"><s:text name="generic.description"/></th>
+                <th width="10"><s:text name="pagesForm.remove"/></th>
+            </tr>
+
+            <s:iterator var="p" value="templates" status="rowstatus">
+                <tr>
+
+                    <td style="vertical-align:middle">
+                        <s:if test="! #p.hidden">
+                            <img src='<s:url value="/images/page_white.png"/>' border="0" alt="icon"/>
+                        </s:if>
+                        <s:else>
+                            <img src='<s:url value="/images/page_white_gear.png"/>' border="0" alt="icon"/>
+                        </s:else>
+                        <s:url var="edit" action="templateEdit">
+                            <s:param name="weblog" value="actionWeblog.handle"/>
+                            <s:param name="bean.id" value="#p.id"/>
+                        </s:url>
+                        <s:a href="%{edit}"><s:property value="#p.name"/></s:a>
+                    </td>
+
+                    <td style="vertical-align:middle"><s:property value="#p.action.readableName"/></td>
+
+                    <td style="vertical-align:middle"><s:property value="#p.description"/></td>
+
+                    <td class="center" style="vertical-align:middle">
+                        <s:if test="!#p.required || !customTheme">
+                            <s:url var="removeUrl" action="templateRemove">
+                                <s:param name="weblog" value="actionWeblog.handle"/>
+                                <s:param name="removeId" value="#p.id"/>
+                            </s:url>
+                            <s:a href="%{removeUrl}"> <span class="glyphicon glyphicon-remove"></span> </s:a>
+                        </s:if>
+                        <s:else>
+                            <span class="glyphicon glyphicon-lock"></span>
+                        </s:else>
+                    </td>
+
+                </tr>
+            </s:iterator>
 
-    <tr>
-        <th width="30%"><s:text name="generic.name" /></th>
-        <th width="10"><s:text name="pagesForm.action" /></th>
-        <th width="55%"><s:text name="generic.description" /></th>
-        <th width="10"><s:text name="pagesForm.remove" /></th>
-        <th width="5"><input type="checkbox" onclick="toggleFunction(this.checked,'idSelections');"/></th>
-    </tr>
-    <s:iterator var="p" value="templates" status="rowstatus">
-        <s:if test="#rowstatus.odd == true">
-            <tr class="rollertable_odd">
         </s:if>
         <s:else>
-            <tr class="rollertable_even">
+            <tr class="rollertable_odd">
+                <td style="vertical-align:middle" colspan="5">
+                    <s:text name="pageForm.notemplates"/>
+                </td>
+            </tr>
         </s:else>
-
-            <td style="vertical-align:middle">
-                <s:if test="! #p.hidden">
-                    <img src='<s:url value="/images/page_white.png"/>' border="0" alt="icon" />
-                </s:if>
-                <s:else>
-                    <img src='<s:url value="/images/page_white_gear.png"/>' border="0" alt="icon" />
-                </s:else>
-                <s:url var="edit" action="templateEdit">
-                    <s:param name="weblog" value="actionWeblog.handle" />
-                    <s:param name="bean.id" value="#p.id" />
-                </s:url>
-                <s:a href="%{edit}"><s:property value="#p.name" /></s:a>
-            </td>
-            
-            <td style="vertical-align:middle"><s:property value="#p.action.readableName" /></td>
-
-            <td style="vertical-align:middle"><s:property value="#p.description" /></td>
-
-            <td class="center" style="vertical-align:middle">
-                 <s:if test="!#p.required || !customTheme" >
-                     <s:url var="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>
-            <td class="center" style="vertical-align:middle">
-                <s:if test="!#p.required || !customTheme" >
-                    <input type="checkbox" name="idSelections" value="<s:property value="#p.id" />" />
-                </s:if>
-                 <s:else>
-                    <input type="checkbox" name="idSelections" value="<s:property value="#p.id" />" disabled="disabled"/>
-                 </s:else>
-            </td>
-        </tr>
-    </s:iterator>
-    
-</s:if>
-<s:else>
-    <tr class="rollertable_odd">
-        <td style="vertical-align:middle" colspan="5" >
-            <s:text name="pageForm.notemplates"/>
-        </td>
-    </tr>
-</s:else>
-</table>
-
-<br/>
-
-<s:if test="!templates.isEmpty">
-	<div class="control">
-		<s:submit value="%{getText('pagesForm.deleteselected')}" />
-	</div>
-</s:if>
+    </table>
 
 </s:form>

http://git-wip-us.apache.org/repos/asf/roller/blob/2ade07dd/app/src/main/webapp/WEB-INF/jsps/editor/TemplatesSidebar.jsp
----------------------------------------------------------------------
diff --git a/app/src/main/webapp/WEB-INF/jsps/editor/TemplatesSidebar.jsp b/app/src/main/webapp/WEB-INF/jsps/editor/TemplatesSidebar.jsp
index 0b8b6df..3fab32a 100644
--- a/app/src/main/webapp/WEB-INF/jsps/editor/TemplatesSidebar.jsp
+++ b/app/src/main/webapp/WEB-INF/jsps/editor/TemplatesSidebar.jsp
@@ -17,43 +17,22 @@
 --%>
 <%@ 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="templates!add">
-					<s:hidden name="salt" />
-					<s:hidden name="weblog" />
-                    
-                    <table cellpadding="0" cellspacing="6">
-                        <tr>
-                            <td><s:text name="generic.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 value="%{getText('pagesForm.add')}" /></td>
-                        </tr>
-                    </table>
-                    
-                </s:form>
-                <br />
-                
-            </div>
-        </div>
-    </div>
-</div>	
+<h3><s:text name="pagesForm.addNewPage"/></h3>
+<hr size="1" noshade="noshade"/>
+
+<s:form action="templates!add" theme="bootstrap" cssClass="form-horizontal">
+    <s:hidden name="salt"/>
+    <s:hidden name="weblog"/>
+
+    <s:text name="generic.name"/>
+    <s:textfield name="newTmplName"/>
+
+    <s:if test="!availableActions.isEmpty">
+        <s:text name="pagesForm.action"/>
+        <s:select name="newTmplAction" size="1" list="availableActions"/>
+    </s:if>
+
+    <s:submit class="btn" value="%{getText('pagesForm.add')}"/>
+
+</s:form>
+

http://git-wip-us.apache.org/repos/asf/roller/blob/2ade07dd/app/src/main/webapp/WEB-INF/jsps/tiles/tiles-tabbedpage.jsp
----------------------------------------------------------------------
diff --git a/app/src/main/webapp/WEB-INF/jsps/tiles/tiles-tabbedpage.jsp b/app/src/main/webapp/WEB-INF/jsps/tiles/tiles-tabbedpage.jsp
index 9d8d957..8cebafa 100644
--- a/app/src/main/webapp/WEB-INF/jsps/tiles/tiles-tabbedpage.jsp
+++ b/app/src/main/webapp/WEB-INF/jsps/tiles/tiles-tabbedpage.jsp
@@ -53,7 +53,7 @@
             </div>
         </div>
 
-        <c:if test="${sidebar == '/WEB-INF/jsps/tiles/empty.jsp'}">
+        <c:if test="${sidebar != '/WEB-INF/jsps/tiles/empty.jsp'}">
             <div class="panel panel-default">
                 <div class="panel-body">
                     <tiles:insertAttribute name="sidebar"/>


Mime
View raw message