Author: agilliland
Date: Wed May 2 09:54:35 2007
New Revision: 534545
URL: http://svn.apache.org/viewvc?view=rev&rev=534545
Log:
struts2 versions of weblog settings, weblog removal, and maintenance pages.
Added:
roller/trunk/src/org/apache/roller/ui/authoring/struts2/Maintenance.java
roller/trunk/src/org/apache/roller/ui/authoring/struts2/WeblogConfig.java
roller/trunk/src/org/apache/roller/ui/authoring/struts2/WeblogConfigForm.java
roller/trunk/src/org/apache/roller/ui/authoring/struts2/WeblogRemove.java
roller/trunk/web/WEB-INF/jsps/authoring/struts2/Maintenance.jsp
roller/trunk/web/WEB-INF/jsps/authoring/struts2/WeblogConfig.jsp
roller/trunk/web/WEB-INF/jsps/authoring/struts2/WeblogRemoveConfirm.jsp
Modified:
roller/trunk/src/org/apache/roller/ui/authoring/struts2/editor-menu.xml
roller/trunk/web/WEB-INF/classes/struts.xml
roller/trunk/web/WEB-INF/tiles.xml
Added: roller/trunk/src/org/apache/roller/ui/authoring/struts2/Maintenance.java
URL:
http://svn.apache.org/viewvc/roller/trunk/src/org/apache/roller/ui/authoring/struts2/Maintenance.java?view=auto&rev=534545
==============================================================================
--- roller/trunk/src/org/apache/roller/ui/authoring/struts2/Maintenance.java
(added)
+++ roller/trunk/src/org/apache/roller/ui/authoring/struts2/Maintenance.java
Wed May 2 09:54:35 2007
@@ -0,0 +1,109 @@
+/*
+ * 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.
+ */
+
+package org.apache.roller.ui.authoring.struts2;
+
+import java.util.Date;
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+import org.apache.roller.business.search.IndexManager;
+import org.apache.roller.business.RollerFactory;
+import org.apache.roller.business.UserManager;
+import org.apache.roller.pojos.PermissionsData;
+import org.apache.roller.pojos.WebsiteData;
+import org.apache.roller.ui.core.util.struts2.UIAction;
+import org.apache.roller.util.cache.CacheManager;
+
+
+/**
+ * Allows user to perform maintenence operations such as flushing
+ * the page cache or re-indexing the search index.
+ */
+public class Maintenance extends UIAction {
+
+ private static Log log = LogFactory.getLog(Maintenance.class);
+
+
+ public Maintenance() {
+ this.actionName = "maintenance";
+ this.desiredMenu = "editor";
+ this.pageTitle = "maintenance.title";
+ }
+
+
+ // admin perms required
+ public short requiredWeblogPermissions() {
+ return PermissionsData.ADMIN;
+ }
+
+
+ public String execute() {
+ return SUCCESS;
+ }
+
+
+ /**
+ * Rebuild search index for weblog.
+ */
+ public String index() {
+
+ try {
+ IndexManager manager = RollerFactory.getRoller().getIndexManager();
+ manager.rebuildWebsiteIndex(getActionWeblog());
+
+ addMessage("maintenance.message.indexed");
+ } catch (Exception ex) {
+ log.error("Error doing index rebuild", ex);
+ // TODO: i18n
+ addError("Error rebuilding search index");
+ }
+
+ return SUCCESS;
+ }
+
+
+ /**
+ * Flush page cache for weblog.
+ */
+ public String flushCache() {
+
+ try {
+ WebsiteData weblog = getActionWeblog();
+
+ // some caches are based on weblog last-modified, so update it
+ weblog.setLastModified(new Date());
+
+ UserManager umgr = RollerFactory.getRoller().getUserManager();
+ umgr.saveWebsite(weblog);
+ RollerFactory.getRoller().flush();
+
+ // also notify cache manager
+ CacheManager.invalidate(weblog);
+
+ addMessage("maintenance.message.flushed");
+
+ } catch (Exception ex) {
+ log.error("Error saving weblog - "+getActionWeblog().getHandle(),
ex);
+ // TODO: i18n
+ addError("Error flushing page cache");
+ }
+
+ return SUCCESS;
+ }
+
+}
Added: roller/trunk/src/org/apache/roller/ui/authoring/struts2/WeblogConfig.java
URL:
http://svn.apache.org/viewvc/roller/trunk/src/org/apache/roller/ui/authoring/struts2/WeblogConfig.java?view=auto&rev=534545
==============================================================================
--- roller/trunk/src/org/apache/roller/ui/authoring/struts2/WeblogConfig.java
(added)
+++ roller/trunk/src/org/apache/roller/ui/authoring/struts2/WeblogConfig.java
Wed May 2 09:54:35 2007
@@ -0,0 +1,251 @@
+/*
+ * 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.
+ */
+
+package org.apache.roller.ui.authoring.struts2;
+
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.Collections;
+import java.util.Iterator;
+import java.util.List;
+import java.util.Map;
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+import org.apache.roller.business.PluginManager;
+import org.apache.roller.business.RollerFactory;
+import org.apache.roller.business.UserManager;
+import org.apache.roller.business.WeblogManager;
+import org.apache.roller.config.RollerRuntimeConfig;
+import org.apache.roller.pojos.PermissionsData;
+import org.apache.roller.pojos.WebsiteData;
+import org.apache.roller.ui.core.RollerContext;
+import org.apache.roller.ui.core.plugins.UIPluginManager;
+import org.apache.roller.ui.core.util.struts2.KeyValueObject;
+import org.apache.roller.ui.core.util.struts2.UIAction;
+import org.apache.roller.util.Blacklist;
+import org.apache.roller.util.cache.CacheManager;
+
+
+/**
+ * Action for modifying weblog configuration.
+ */
+public class WeblogConfig extends UIAction {
+
+ private static Log log = LogFactory.getLog(WeblogConfig.class);
+
+ // bean for managing submitted data
+ private WeblogConfigForm bean = new WeblogConfigForm();
+
+ // categories list
+ private List weblogCategories = Collections.EMPTY_LIST;
+
+ // list of available editors
+ private List editorsList = Collections.EMPTY_LIST;
+
+ // list of available plugins
+ private List pluginsList = Collections.EMPTY_LIST;
+
+
+ public WeblogConfig() {
+ this.actionName = "weblogConfig";
+ this.desiredMenu = "editor";
+ this.pageTitle = "websiteSettings.title";
+ }
+
+
+ // admin perms required
+ public short requiredWeblogPermissions() {
+ return PermissionsData.ADMIN;
+ }
+
+
+ public void myPrepare() {
+
+ try {
+ WeblogManager wmgr = RollerFactory.getRoller().getWeblogManager();
+
+ // set categories list
+ setWeblogCategories(wmgr.getWeblogCategories(getActionWeblog(),
false));
+
+ // set the Editor Page list
+ UIPluginManager pmgr = RollerContext.getUIPluginManager();
+ List editorsList = pmgr.getWeblogEntryEditors();
+ if(editorsList != null) {
+ setEditorsList(editorsList);
+ }
+
+ // set plugins list
+ PluginManager ppmgr =
RollerFactory.getRoller().getPagePluginManager();
+ Map pluginsMap = ppmgr.getWeblogEntryPlugins(getActionWeblog());
+ List plugins = new ArrayList();
+ Iterator iter = pluginsMap.values().iterator();
+ while(iter.hasNext()) {
+ plugins.add(iter.next());
+ }
+ // sort
+ setPluginsList(plugins);
+
+ } catch (Exception ex) {
+ log.error("Error preparing weblog config action", ex);
+ }
+ }
+
+
+ public String execute() {
+
+ // load bean with data from weblog
+ getBean().copyFrom(getActionWeblog());
+
+ return INPUT;
+ }
+
+
+ /**
+ * Save weblog configuration.
+ */
+ public String save() {
+
+ // run validation
+ myValidate();
+
+ if(!hasActionErrors()) try {
+ WeblogManager wmgr = RollerFactory.getRoller().getWeblogManager();
+ UserManager umgr = RollerFactory.getRoller().getUserManager();
+
+ WebsiteData weblog = getActionWeblog();
+
+ getBean().copyTo(weblog);
+
+ // if blogger category changed then lookup new cat and set it
+ if(getBean().getBloggerCategoryId() != null &&
+
!weblog.getBloggerCategory().getId().equals(getBean().getBloggerCategoryId())) {
+
weblog.setBloggerCategory(wmgr.getWeblogCategory(getBean().getBloggerCategoryId()));
+ }
+
+ // ROL-485: comments not allowed on inactive weblogs
+ if(!weblog.getActive()) {
+ weblog.setAllowComments(Boolean.FALSE);
+ addMessage("websiteSettings.commentsOffForInactiveWeblog");
+ }
+
+ // save config
+ umgr.saveWebsite(weblog);
+
+ // ROL-1050: apply comment defaults to existing entries
+ if(getBean().getApplyCommentDefaults()) {
+ wmgr.applyCommentDefaultsToEntries(weblog);
+ }
+
+ // apply referer filters
+
RollerFactory.getRoller().getRefererManager().applyRefererFilters(weblog);
+
+ // flush
+ RollerFactory.getRoller().flush();
+
+ addMessage("websiteSettings.savedChanges");
+
+ // Clear cache entries associated with website
+ CacheManager.invalidate(weblog);
+
+ } catch (Exception ex) {
+ log.error("Error updating weblog config", ex);
+ // TODO: i18n
+ addError("Error updating configuration");
+ }
+
+ return INPUT;
+ }
+
+
+ // validation
+ private void myValidate() {
+
+ // make sure user didn't enter an invalid entry display count
+ int maxEntries =
RollerRuntimeConfig.getIntProperty("site.pages.maxEntries");
+ if(getBean().getEntryDisplayCount() > maxEntries) {
+ addError("websiteSettings.error.entryDisplayCount");
+ }
+
+ // check blacklist
+ List regexRules = new ArrayList();
+ List stringRules = new ArrayList();
+ try {
+ // just for testing/counting, this does not persist rules in any
way
+ Blacklist.populateSpamRules(getBean().getBlacklist(), stringRules,
regexRules, null);
+ addMessage("websiteSettings.acceptedBlacklist",
+ Arrays.asList(new String[] {""+stringRules.size(),
""+regexRules.size()}));
+ } catch (Throwable e) {
+ addError("websiteSettings.error.processingBlacklist",
e.getMessage());
+ }
+ }
+
+
+ public List getCommentDaysOptions() {
+
+ List opts = new ArrayList();
+
+ opts.add(new KeyValueObject("0",
getText("weblogEdit.unlimitedCommentDays")));
+ opts.add(new KeyValueObject("1", getText("weblogEdit.days1")));
+ opts.add(new KeyValueObject("2", getText("weblogEdit.days2")));
+ opts.add(new KeyValueObject("3", getText("weblogEdit.days3")));
+ opts.add(new KeyValueObject("4", getText("weblogEdit.days4")));
+ opts.add(new KeyValueObject("5", getText("weblogEdit.days5")));
+ opts.add(new KeyValueObject("7", getText("weblogEdit.days7")));
+ opts.add(new KeyValueObject("10", getText("weblogEdit.days10")));
+ opts.add(new KeyValueObject("20", getText("weblogEdit.days20")));
+ opts.add(new KeyValueObject("30", getText("weblogEdit.days30")));
+ opts.add(new KeyValueObject("60", getText("weblogEdit.days60")));
+ opts.add(new KeyValueObject("90", getText("weblogEdit.days90")));
+
+ return opts;
+ }
+
+
+ public WeblogConfigForm getBean() {
+ return bean;
+ }
+
+ public void setBean(WeblogConfigForm bean) {
+ this.bean = bean;
+ }
+
+ public List getWeblogCategories() {
+ return weblogCategories;
+ }
+
+ public void setWeblogCategories(List weblogCategories) {
+ this.weblogCategories = weblogCategories;
+ }
+
+ public List getEditorsList() {
+ return editorsList;
+ }
+
+ public void setEditorsList(List editorsList) {
+ this.editorsList = editorsList;
+ }
+
+ public List getPluginsList() {
+ return pluginsList;
+ }
+
+ public void setPluginsList(List pluginsList) {
+ this.pluginsList = pluginsList;
+ }
+
+}
Added:
roller/trunk/src/org/apache/roller/ui/authoring/struts2/WeblogConfigForm.java
URL:
http://svn.apache.org/viewvc/roller/trunk/src/org/apache/roller/ui/authoring/struts2/WeblogConfigForm.java?view=auto&rev=534545
==============================================================================
---
roller/trunk/src/org/apache/roller/ui/authoring/struts2/WeblogConfigForm.java
(added)
+++
roller/trunk/src/org/apache/roller/ui/authoring/struts2/WeblogConfigForm.java
Wed May 2 09:54:35 2007
@@ -0,0 +1,349 @@
+/*
+ * 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.
+ */
+
+package org.apache.roller.ui.authoring.struts2;
+
+import java.sql.Timestamp;
+import java.util.Date;
+import org.apache.commons.lang.StringUtils;
+import org.apache.roller.RollerException;
+import org.apache.roller.business.RollerFactory;
+import org.apache.roller.business.WeblogManager;
+import org.apache.roller.pojos.WeblogCategoryData;
+import org.apache.roller.pojos.WebsiteData;
+import org.apache.roller.util.DateUtil;
+
+
+/**
+ * Bean used to manage data submitted to WeblogConfig action.
+ */
+public class WeblogConfigForm {
+
+ private String id = null;
+ private String handle = null;
+ private String name = null;
+ private String description = null;
+ private boolean enableBloggerApi = false;
+ private String editorPage = null;
+ private String blacklist = null;
+ private boolean allowComments = false;
+ private boolean defaultAllowComments = false;
+ private String defaultCommentDays = "0";
+ private boolean moderateComments = false;
+ private boolean emailComments = false;
+ private String emailFromAddress = null;
+ private String emailAddress = null;
+ private String locale = null;
+ private String timeZone = null;
+ private String defaultPlugins = null;
+ private int entryDisplayCount = 15;
+ private boolean active = true;
+ private boolean commentModerationRequired = false;
+ private boolean enableMultiLang = false;
+ private boolean showAllLangs = true;
+ private String pageModels = null;
+ private String customStylesheetPath = null;
+ private String bloggerCategoryId = null;
+ private String defaultCategoryId = null;
+ private String[] defaultPluginsArray = null;
+ private boolean applyCommentDefaults = false;
+
+
+ public void setId( String id ) {
+ this.id = id;
+ }
+
+ public String getHandle() {
+ return this.handle;
+ }
+
+ public void setHandle( String handle ) {
+ this.handle = handle;
+ }
+
+ public String getName() {
+ return this.name;
+ }
+
+ public void setName( String name ) {
+ this.name = name;
+ }
+
+ public String getDescription() {
+ return this.description;
+ }
+
+ public void setDescription( String description ) {
+ this.description = description;
+ }
+
+ public boolean getEnableBloggerApi() {
+ return this.enableBloggerApi;
+ }
+
+ public void setEnableBloggerApi( boolean enableBloggerApi ) {
+ this.enableBloggerApi = enableBloggerApi;
+ }
+
+ public String getEditorPage() {
+ return this.editorPage;
+ }
+
+ public void setEditorPage( String editorPage ) {
+ this.editorPage = editorPage;
+ }
+
+ public String getBlacklist() {
+ return this.blacklist;
+ }
+
+ public void setBlacklist( String blacklist ) {
+ this.blacklist = blacklist;
+ }
+
+ public boolean getAllowComments() {
+ return this.allowComments;
+ }
+
+ public void setAllowComments( boolean allowComments ) {
+ this.allowComments = allowComments;
+ }
+
+ public boolean getDefaultAllowComments() {
+ return this.defaultAllowComments;
+ }
+
+ public void setDefaultAllowComments( boolean defaultAllowComments ) {
+ this.defaultAllowComments = defaultAllowComments;
+ }
+
+ public String getDefaultCommentDays() {
+ return this.defaultCommentDays;
+ }
+
+ public void setDefaultCommentDays( String defaultCommentDays ) {
+ this.defaultCommentDays = defaultCommentDays;
+ }
+
+ public boolean getModerateComments() {
+ return this.moderateComments;
+ }
+
+ public void setModerateComments( boolean moderateComments ) {
+ this.moderateComments = moderateComments;
+ }
+
+ public boolean getEmailComments() {
+ return this.emailComments;
+ }
+
+ public void setEmailComments( boolean emailComments ) {
+ this.emailComments = emailComments;
+ }
+
+ public String getEmailFromAddress() {
+ return this.emailFromAddress;
+ }
+
+ public void setEmailFromAddress( String emailFromAddress ) {
+ this.emailFromAddress = emailFromAddress;
+ }
+
+ public String getEmailAddress() {
+ return this.emailAddress;
+ }
+
+ public void setEmailAddress( String emailAddress ) {
+ this.emailAddress = emailAddress;
+ }
+
+ public String getLocale() {
+ return this.locale;
+ }
+
+ public void setLocale( String locale ) {
+ this.locale = locale;
+ }
+
+ public String getTimeZone() {
+ return this.timeZone;
+ }
+
+ public void setTimeZone( String timeZone ) {
+ this.timeZone = timeZone;
+ }
+
+ public int getEntryDisplayCount() {
+ return this.entryDisplayCount;
+ }
+
+ public void setEntryDisplayCount( int entryDisplayCount ) {
+ this.entryDisplayCount = entryDisplayCount;
+ }
+
+ public boolean getCommentModerationRequired() {
+ return this.commentModerationRequired;
+ }
+
+ public void setCommentModerationRequired( boolean
commentModerationRequired ) {
+ this.commentModerationRequired = commentModerationRequired;
+ }
+
+ public boolean isEnableMultiLang() {
+ return this.enableMultiLang;
+ }
+
+ public void setEnableMultiLang( boolean enableMultiLang ) {
+ this.enableMultiLang = enableMultiLang;
+ }
+
+ public boolean isShowAllLangs() {
+ return this.showAllLangs;
+ }
+
+ public void setShowAllLangs( boolean showAllLangs ) {
+ this.showAllLangs = showAllLangs;
+ }
+
+ public String getPageModels() {
+ return this.pageModels;
+ }
+
+ public void setPageModels( String pageModels ) {
+ this.pageModels = pageModels;
+ }
+
+ public String getCustomStylesheetPath() {
+ return this.customStylesheetPath;
+ }
+
+ public void setCustomStylesheetPath( String customStylesheetPath ) {
+ this.customStylesheetPath = customStylesheetPath;
+ }
+
+ public String getBloggerCategoryId() {
+ return bloggerCategoryId;
+ }
+
+ public void setBloggerCategoryId(String bloggerCategoryId) {
+ this.bloggerCategoryId = bloggerCategoryId;
+ }
+
+ public String getDefaultCategoryId() {
+ return defaultCategoryId;
+ }
+
+ public void setDefaultCategoryId(String defeaultCategoryId) {
+ this.defaultCategoryId = defeaultCategoryId;
+ }
+
+ public String[] getDefaultPluginsArray() {
+ return defaultPluginsArray;
+ }
+
+ public void setDefaultPluginsArray(String[] strings) {
+ defaultPluginsArray = strings;
+ }
+
+ public boolean getApplyCommentDefaults() {
+ return applyCommentDefaults;
+ }
+
+ public void setApplyCommentDefaults(boolean applyCommentDefaults) {
+ this.applyCommentDefaults = applyCommentDefaults;
+ }
+
+ public boolean getActive() {
+ return active;
+ }
+
+ public void setActive(boolean active) {
+ this.active = active;
+ }
+
+
+ public void copyFrom(WebsiteData dataHolder) {
+
+ this.id = dataHolder.getId();
+ this.handle = dataHolder.getHandle();
+ this.name = dataHolder.getName();
+ this.description = dataHolder.getDescription();
+ this.enableBloggerApi = dataHolder.getEnableBloggerApi();
+ this.editorPage = dataHolder.getEditorPage();
+ this.blacklist = dataHolder.getBlacklist();
+ this.allowComments = dataHolder.getAllowComments();
+ this.defaultAllowComments = dataHolder.getDefaultAllowComments();
+ this.defaultCommentDays = ""+dataHolder.getDefaultCommentDays();
+ this.moderateComments = dataHolder.getModerateComments();
+ this.emailComments = dataHolder.getEmailComments();
+ this.emailFromAddress = dataHolder.getEmailFromAddress();
+ this.emailAddress = dataHolder.getEmailAddress();
+ this.locale = dataHolder.getLocale();
+ this.timeZone = dataHolder.getTimeZone();
+ this.defaultPlugins = dataHolder.getDefaultPlugins();
+ this.entryDisplayCount = dataHolder.getEntryDisplayCount();
+ this.setActive(dataHolder.getActive());
+ this.commentModerationRequired =
dataHolder.getCommentModerationRequired();
+ this.enableMultiLang = dataHolder.isEnableMultiLang();
+ this.showAllLangs = dataHolder.isShowAllLangs();
+ this.pageModels = dataHolder.getPageModels();
+ this.customStylesheetPath = dataHolder.getCustomStylesheetPath();
+
+ if (dataHolder.getDefaultCategory() != null) {
+ defaultCategoryId = dataHolder.getDefaultCategory().getId();
+ }
+ if (dataHolder.getBloggerCategory() != null) {
+ bloggerCategoryId = dataHolder.getBloggerCategory().getId();
+ }
+ if (dataHolder.getDefaultPlugins() != null) {
+ defaultPluginsArray =
StringUtils.split(dataHolder.getDefaultPlugins(), ",");
+ }
+ }
+
+
+ public void copyTo(WebsiteData dataHolder) {
+
+ dataHolder.setName(this.name);
+ dataHolder.setDescription(this.description);
+ dataHolder.setEnableBloggerApi(this.enableBloggerApi);
+ dataHolder.setEditorPage(this.editorPage);
+ dataHolder.setBlacklist(this.blacklist);
+ dataHolder.setAllowComments(this.allowComments);
+ dataHolder.setDefaultAllowComments(this.defaultAllowComments);
+ dataHolder.setModerateComments(this.moderateComments);
+ dataHolder.setEmailComments(this.emailComments);
+ dataHolder.setEmailFromAddress(this.emailFromAddress);
+ dataHolder.setEmailAddress(this.emailAddress);
+ dataHolder.setLocale(this.locale);
+ dataHolder.setTimeZone(this.timeZone);
+ dataHolder.setDefaultPlugins(this.defaultPlugins);
+ dataHolder.setEntryDisplayCount(this.entryDisplayCount);
+ dataHolder.setActive(this.getActive());
+
dataHolder.setCommentModerationRequired(this.commentModerationRequired);
+ dataHolder.setEnableMultiLang(this.enableMultiLang);
+ dataHolder.setShowAllLangs(this.showAllLangs);
+ dataHolder.setPageModels(this.pageModels);
+ dataHolder.setCustomStylesheetPath(this.customStylesheetPath);
+ dataHolder.setDefaultPlugins(
StringUtils.join(this.defaultPluginsArray,",") );
+
+
dataHolder.setDefaultCommentDays(Integer.parseInt(this.defaultCommentDays));
+
+
dataHolder.setDefaultPlugins(StringUtils.join(this.defaultPluginsArray, ","));
+ }
+
+}
Added: roller/trunk/src/org/apache/roller/ui/authoring/struts2/WeblogRemove.java
URL:
http://svn.apache.org/viewvc/roller/trunk/src/org/apache/roller/ui/authoring/struts2/WeblogRemove.java?view=auto&rev=534545
==============================================================================
--- roller/trunk/src/org/apache/roller/ui/authoring/struts2/WeblogRemove.java
(added)
+++ roller/trunk/src/org/apache/roller/ui/authoring/struts2/WeblogRemove.java
Wed May 2 09:54:35 2007
@@ -0,0 +1,87 @@
+/*
+ * 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.
+ */
+
+package org.apache.roller.ui.authoring.struts2;
+
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+import org.apache.roller.business.RollerFactory;
+import org.apache.roller.business.UserManager;
+import org.apache.roller.pojos.PermissionsData;
+import org.apache.roller.ui.core.util.struts2.UIAction;
+import org.apache.roller.util.cache.CacheManager;
+
+
+/**
+ * Action for removing a weblog.
+ */
+public class WeblogRemove extends UIAction {
+
+ private static Log log = LogFactory.getLog(WeblogRemove.class);
+
+
+ public WeblogRemove() {
+ this.actionName = "weblogRemove";
+ this.desiredMenu = "editor";
+ this.pageTitle = "websiteRemove.title";
+ }
+
+
+ // admin perms required
+ public short requiredWeblogPermissions() {
+ return PermissionsData.ADMIN;
+ }
+
+
+ /**
+ * Show weblog remove confirmation.
+ */
+ public String execute() {
+ return "confirm";
+ }
+
+
+ /**
+ * Remove a weblog.
+ */
+ public String remove() {
+
+ try {
+ UserManager umgr = RollerFactory.getRoller().getUserManager();
+
+ // remove website
+ umgr.removeWebsite(getActionWeblog());
+ RollerFactory.getRoller().flush();
+
+ CacheManager.invalidate(getActionWeblog());
+
+ // TODO: i18n
+ addMessage("Successfully removed weblog
["+getActionWeblog().getName()+"]");
+
+ return SUCCESS;
+
+ } catch (Exception ex) {
+ log.error("Error removing weblog -
"+getActionWeblog().getHandle(), ex);
+ // TODO: i18n
+ addError("Error removing weblog");
+ }
+
+ return "confirm";
+ }
+
+}
Modified:
roller/trunk/src/org/apache/roller/ui/authoring/struts2/editor-menu.xml
URL:
http://svn.apache.org/viewvc/roller/trunk/src/org/apache/roller/ui/authoring/struts2/editor-menu.xml?view=diff&rev=534545&r1=534544&r2=534545
==============================================================================
--- roller/trunk/src/org/apache/roller/ui/authoring/struts2/editor-menu.xml
(original)
+++ roller/trunk/src/org/apache/roller/ui/authoring/struts2/editor-menu.xml Wed
May 2 09:54:35 2007
@@ -66,10 +66,11 @@
<menu name="tabbedmenu.website" perms="admin" roles="editor">
- <menu-item action="settings"
+ <menu-item action="weblogConfig"
name="tabbedmenu.website.settings"
roles="editor"
- perms="admin" />
+ perms="admin"
+ subactions="weblogRemove" />
<menu-item action="themeEdit"
name="tabbedmenu.website.themes"
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=534545&r1=534544&r2=534545
==============================================================================
--- roller/trunk/web/WEB-INF/classes/struts.xml (original)
+++ roller/trunk/web/WEB-INF/classes/struts.xml Wed May 2 09:54:35 2007
@@ -111,9 +111,9 @@
<result name="cancel" type="redirect-action">userAdmin</result>
</action>
- <action name="cacheInfo!*" method="{1}"
- class="org.apache.roller.ui.admin.struts2.CacheInfo">
- <result name="success" type="tiles">.CacheInfo</result>
+ <action name="globalCommentManagement!*" method="{1}"
+
class="org.apache.roller.ui.admin.struts2.GlobalCommentManagement">
+ <result name="list" type="tiles">.GlobalCommentManagement</result>
</action>
<action name="commonPingTargets!*" method="{1}"
@@ -134,19 +134,13 @@
<result name="error" type="chain">commonPingTargets</result>
</action>
- <!--
- <action name="commentManagement!*" method="{1}"
-
class="org.apache.roller.ui.authoring.struts2.CommentManagementAction">
- <result name="commentManagement.page">.CommentManagement</result>
- <result
name="commentManagementGlobal.page">.CommentManagementGlobal</result>
+ <action name="cacheInfo!*" method="{1}"
+ class="org.apache.roller.ui.admin.struts2.CacheInfo">
+ <result name="success" type="tiles">.CacheInfo</result>
</action>
- <action name="commentQuery!*" method="{1}"
-
class="org.apache.roller.ui.authoring.struts2.CommentManagementAction">
- <result name="commentManagement.page">.CommentManagement</result>
- <result
name="commentManagementGlobal.page">.CommentManagementGlobal</result>
- </action>
+ <!--
<action name="planetConfig!*" method="{1}"
class="org.apache.roller.planet.ui.admin.struts2.PlanetConfigAction">
<result name="planetConfig.page">.PlanetConfig</result>
@@ -168,28 +162,6 @@
<!-- Weblogger Authoring UI -->
<package name="weblogger-authoring" namespace="/roller-ui/authoring"
extends="weblogger">
- <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>
- </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>
-
- <action name="template!*" method="{1}"
- class="org.apache.roller.ui.authoring.struts2.TemplateEdit">
- <result name="list" type="chain">templates</result>
- <result name="success" type="tiles">.TemplateEditForm</result>
- <result name="cancel" type="redirect-action">templates</result>
- </action>
-
-
<action name="postEntry">
<result>/roller-ui/authoring/weblog.do?method=create</result>
</action>
@@ -219,8 +191,15 @@
</action>
- <action name="settings">
- <result>/roller-ui/authoring/website.do?method=edit</result>
+ <action name="weblogConfig!*" method="{1}"
+ class="org.apache.roller.ui.authoring.struts2.WeblogConfig">
+ <result name="input" type="tiles">.WeblogConfig</result>
+ </action>
+
+ <action name="weblogRemove!*" method="{1}"
+ class="org.apache.roller.ui.authoring.struts2.WeblogRemove">
+ <result name="confirm" type="tiles">.WeblogRemoveConfirm</result>
+ <result name="success" type="chain">menu</result>
</action>
<action name="themeEdit!*" method="{1}"
@@ -228,6 +207,27 @@
<result name="success" type="tiles">.ThemeEdit</result>
</action>
+ <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>
+ </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>
+
+ <action name="template!*" method="{1}"
+ class="org.apache.roller.ui.authoring.struts2.TemplateEdit">
+ <result name="list" type="chain">templates</result>
+ <result name="success" type="tiles">.TemplateEditForm</result>
+ <result name="cancel" type="redirect-action">templates</result>
+ </action>
+
<action name="members">
<result>/roller-ui/authoring/memberPermissions.do</result>
</action>
@@ -254,8 +254,9 @@
<result name="error" type="chain">customPingTargets</result>
</action>
- <action name="maintenance">
- <result>/roller-ui/authoring/maintenance.do</result>
+ <action name="maintenance!*" method="{1}"
+ class="org.apache.roller.ui.authoring.struts2.Maintenance">
+ <result name="success" type="tiles">.Maintenance</result>
</action>
@@ -283,10 +284,7 @@
class="org.apache.roller.ui.authoring.struts2.CategoryEditAction">
<result name="CategoryForm">.CategoryForm</result>
</action>
- <action name="maintenance!*" method="{1}"
-
class="org.apache.roller.ui.authoring.struts2.MaintenanceAction">
- <result name="maintenance.page">.Maintenance</result>
- </action>
+
<action name="bookmarkEdit!*" method="{1}"
class="org.apache.roller.ui.authoring.struts2.BookmarkEditAction">
<result name="BookmarkForm">.BookmarkForm</result>
@@ -314,10 +312,6 @@
class="org.apache.roller.ui.authoring.struts2.WeblogEntryManagementAction">
<result
name="weblogEntryManagement.page">.WeblogEntryManagement</result>
</action>
- <action name="themeEditor!*" method="{1}"
-
class="org.apache.roller.ui.authoring.struts2.ThemeEditorAction">
- <result name="editTheme.page">.theme-editor</result>
- </action>
<action name="memberPermissions!*" method="{1}"
class="org.apache.roller.ui.authoring.struts2.MemberPermissionsAction">
@@ -361,11 +355,7 @@
<result
name="commentManagementGlobal.page">.CommentManagementGlobal</result>
</action>
- <action name="website!*" method="{1}"
-
class="org.apache.roller.ui.authoring.struts2.WebsiteFormAction">
- <result name="editWebsite.page">.edit-website</result>
- <result name="removeWebsite.page">.WebsiteRemove</result>
- </action>
+
<action name="uploadFiles!*" method="{1}"
class="org.apache.roller.ui.authoring.struts2.UploadFileFormAction">
<result name="uploadFiles.page">.upload-file</result>
Added: roller/trunk/web/WEB-INF/jsps/authoring/struts2/Maintenance.jsp
URL:
http://svn.apache.org/viewvc/roller/trunk/web/WEB-INF/jsps/authoring/struts2/Maintenance.jsp?view=auto&rev=534545
==============================================================================
--- roller/trunk/web/WEB-INF/jsps/authoring/struts2/Maintenance.jsp (added)
+++ roller/trunk/web/WEB-INF/jsps/authoring/struts2/Maintenance.jsp Wed May 2
09:54:35 2007
@@ -0,0 +1,34 @@
+<%--
+ 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="maintenance.subtitle" /></p>
+
+<s:form action="maintenance">
+ <s:hidden name="weblog" value="%{actionWeblog.handle}" />
+
+ <s:text name="maintenance.prompt.flush" /><br /><br />
+ <s:submit key="maintenance.button.flush" action="maintenance!flushCache" />
+
+ <s:if test="getProp('search.enabled')">
+ <br /><br />
+ <s:text name="maintenance.prompt.index" /><br /><br />
+ <s:submit key="maintenance.button.index" action="maintenance!index" />
+ </s:if>
+
+</s:form>
Added: roller/trunk/web/WEB-INF/jsps/authoring/struts2/WeblogConfig.jsp
URL:
http://svn.apache.org/viewvc/roller/trunk/web/WEB-INF/jsps/authoring/struts2/WeblogConfig.jsp?view=auto&rev=534545
==============================================================================
--- roller/trunk/web/WEB-INF/jsps/authoring/struts2/WeblogConfig.jsp (added)
+++ roller/trunk/web/WEB-INF/jsps/authoring/struts2/WeblogConfig.jsp Wed May 2
09:54:35 2007
@@ -0,0 +1,275 @@
+<%--
+ 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="websiteSettings.subtitle" >
+ <s:param value="actionWeblog.handle" />
+ </s:text>
+</p>
+
+<s:form action="weblogConfig!save">
+
+ <s:hidden name="weblog" value="%{actionWeblog.handle}" />
+ <s:hidden name="bean.defaultCategoryId" />
+
+<table class="formtableNoDesc">
+
+ <%-- ***** General settings ***** --%>
+
+ <tr>
+ <td colspan="3"><h2><s:text name="websiteSettings.generalSettings"
/></h2></td>
+ </tr>
+
+ <tr>
+ <td class="label"><s:text name="websiteSettings.websiteTitle" />
+ <td class="field"><s:textfield name="bean.name" size="40"/></td>
+ <td class="description"><%-- <s:text name="websiteSettings.tip." />
--%></td>
+ </tr>
+
+ <tr>
+ <td class="label"><s:text name="websiteSettings.websiteDescription"
/></td>
+ <td class="field"><s:textarea name="bean.description" rows="3"
cols="40"/></td>
+ <td class="description"><%-- <s:text name="websiteSettings.tip." />
--%></td>
+ </tr>
+
+ <tr>
+ <td class="label"><s:text name="websiteSettings.emailAddress" />
+ <td class="field"><s:textfield name="bean.emailAddress"
size="40"/></td>
+ <td class="description"><%-- <s:text name="websiteSettings.tip." />
--%></td>
+ </tr>
+
+ <tr>
+ <td class="label"><s:text name="websiteSettings.editor" /></td>
+ <td class="field">
+ <s:select name="bean.editorPage" size="1" list="editorsList"
listKey="id" listValue="name" />
+ </td>
+ <td class="description"><%-- <s:text name="websiteSettings.tip." />
--%></td>
+ </tr>
+
+ <tr>
+ <td class="label"><s:text name="websiteSettings.active" /></td>
+ <td class="field"><s:checkbox name="bean.active" /></td>
+ <td class="description"></td>
+ </tr>
+
+ <tr>
+ <td class="label"><s:text name="websiteSettings.entryDisplayCount"
/></td>
+ <td class="field"><s:textfield name="bean.entryDisplayCount"
size="4"/></td>
+ <td class="description"><%-- <s:text name="websiteSettings.tip." />
--%></td>
+ </tr>
+
+
+ <%-- ***** Language/i18n settings ***** --%>
+
+
+ <tr>
+ <td colspan="3"><h2><s:text name="websiteSettings.languageSettings"
/></h2></td>
+ </tr>
+
+ <tr>
+ <td class="label"><s:text name="websiteSettings.enableMultiLang"
/></td>
+ <td class="field"><s:checkbox name="bean.enableMultiLang" /></td>
+ <td class="description"><%-- <s:text name="websiteSettings.tip." />
--%></td>
+ </tr>
+
+ <tr>
+ <td class="label"><s:text name="websiteSettings.showAllLangs" /></td>
+ <td class="field"><s:checkbox name="bean.showAllLangs" /></td>
+ <td class="description"><%-- <s:text name="websiteSettings.tip." />
--%></td>
+ </tr>
+
+ <tr>
+ <td class="label"><s:text name="createWebsite.locale" />
+ <td class="field">
+ <s:select name="bean.locale" size="1" list="localesList"
listValue="displayName" />
+ </td>
+ <td class="description"><%-- <s:text name="websiteSettings.tip." />
--%></td>
+ </tr>
+
+ <tr>
+ <td class="label"><s:text name="createWebsite.timeZone" />
+ <td class="field">
+ <s:select name="bean.timeZone" size="1" list="timeZonesList" />
+ </td>
+ <td class="description"><%-- <s:text name="websiteSettings.tip." />
--%></td>
+ </tr>
+
+
+ <%-- ***** Comment settings ***** --%>
+
+
+ <tr>
+ <td colspan="3"><h2><s:text name="websiteSettings.commentSettings"
/></h2></td>
+ </tr>
+
+ <tr>
+ <td class="label"><s:text name="websiteSettings.allowComments" /></td>
+ <td class="field"><s:checkbox name="bean.allowComments" /></td>
+ <td class="description"><%-- <s:text name="websiteSettings.tip." />
--%></td>
+ </tr>
+
+ <s:if test="!getBooleanProp('users.moderation.required')">
+ <tr>
+ <td class="label"><s:text name="websiteSettings.moderateComments"
/></td>
+ <td class="field"><s:checkbox name="bean.moderateComments" /></td>
+ <td class="description"><%-- <s:text name="websiteSettings.tip." />
--%></td>
+ </tr>
+ </s:if>
+
+ <s:if test="getBooleanProp('users.comments.emailnotify')">
+ <tr>
+ <td class="label"><s:text name="websiteSettings.emailComments"
/></td>
+ <td class="field"><s:checkbox name="bean.emailComments"
onclick="toggleNextRow(this)" /></td>
+ <td class="description"><%-- <s:text name="websiteSettings.tip."
/> --%></td>
+ </tr>
+
+ <tr <s:if test="emailComments">style="display: none"</s:if>>
+ <td class="label"><s:text name="websiteSettings.emailFromAddress"
/></td>
+ <td class="field"><s:textfield name="bean.emailFromAddress"
size="50"/></td>
+ <td class="description"><%-- <s:text name="websiteSettings.tip."
/> --%></td>
+ </tr>
+ </s:if>
+
+ <%-- ***** Default entry comment settings ***** --%>
+
+ <tr>
+ <td colspan="3"><h2><s:text
name="websiteSettings.defaultCommentSettings" /></h2></td>
+ </tr>
+
+ <tr>
+ <td class="label"><s:text name="websiteSettings.defaultAllowComments"
/></td>
+ <td class="field"><s:checkbox name="bean.defaultAllowComments" /></td>
+ <td class="description"><%-- <s:text name="websiteSettings.tip." />
--%></td>
+ </tr>
+
+ <tr>
+ <td class="label"><s:text name="websiteSettings.defaultCommentDays"
/></td>
+ <td class="field">
+ <s:select name="bean.defaultCommentDays" list="commentDaysOptions"
size="1" listKey="key" listValue="value" />
+ <td class="description"><%-- <s:text name="websiteSettings.tip." />
--%></td>
+ </tr>
+
+ <tr>
+ <td class="label"><s:text name="websiteSettings.applyCommentDefaults"
/></td>
+ <td class="field"><s:checkbox name="bean.applyCommentDefaults" /></td>
+ <td class="description"><%-- <s:text name="websiteSettings.tip." />
--%></td>
+ </tr>
+
+ <%-- ***** Blogger API setting settings ***** --%>
+
+ <tr>
+ <td colspan="3"><h2><s:text name="websiteSettings.bloggerApi"
/></h2></td>
+ </tr>
+
+ <tr>
+ <td class="label"><s:text name="websiteSettings.enableBloggerApi"
/></td>
+ <td class="field"><s:checkbox name="bean.enableBloggerApi" /></td>
+ <td class="description"><%-- <s:text name="websiteSettings.tip." />
--%></td>
+ </tr>
+
+ <tr>
+ <td class="label"><s:text name="websiteSettings.bloggerApiCategory"
/></td>
+ <td class="field">
+ <s:select name="bean.bloggerCategoryId" list="weblogCategories"
size="1" listKey="id" listValue="path" />
+ </td>
+ <td class="description"><%-- <s:text name="websiteSettings.tip." />
--%></td>
+ </tr>
+
+ <%-- ***** Plugins "formatting" settings ***** --%>
+
+ <tr>
+ <td colspan="3"><h2><s:text name="websiteSettings.formatting"
/></h2></td>
+ </tr>
+
+ <s:if test="!pluginsList.isEmpty">
+ <tr>
+ <td class="label"><s:text name="websiteSettings.label1" /> <br
/><s:text name="websiteSettings.label2" /></td>
+ <td class="field">
+ <s:checkboxlist list="pluginsList"
name="bean.defaultPluginsArray" listKey="name" listValue="name" />
+
+ </td>
+ <td class="description"><%-- <s:text name="websiteSettings.tip."
/> --%></td>
+ </tr>
+ </s:if>
+ <s:else>
+ <s:hidden name="defaultPlugins" />
+ </s:else>
+
+
+ <%-- ***** Spam prevention settings ***** --%>
+
+ <tr>
+ <td colspan="3"><h2><s:text name="websiteSettings.spamPrevention"
/></h2></td>
+ </tr>
+
+ <tr>
+ <td class="label"><s:text name="websiteSettings.ignoreUrls" /></td>
+ <td class="field"><s:textarea name="bean.blacklist" rows="7"
cols="40"/></td>
+ <td class="description"><%-- <s:text name="websiteSettings.tip." />
--%></td>
+ </tr>
+
+ <%-- ***** Global admin only settings ***** --%>
+ <s:if test="authenticatedUser.hasRole('admin')">
+ <tr>
+ <td colspan="3"><h2><s:text name="websiteSettings.adminSettings"
/></h2></td>
+ </tr>
+ <tr>
+ <td class="label"><s:text name="websiteSettings.pageModels" /></td>
+ <td class="field"><s:textarea name="bean.pageModels" rows="7"
cols="40"/></td>
+ <td class="description"><%-- <s:text name="websiteSettings.tip."
/> --%></td>
+ </tr>
+ </s:if>
+ <s:else>
+ <s:hidden name="pageModels" />
+ </s:else>
+
+</table>
+
+<br />
+<div class="control">
+ <s:submit key="websiteSettings.button.update" />
+</div>
+
+<br />
+<br />
+
+</s:form>
+
+
+<s:form action="weblogRemove">
+ <s:hidden name="weblog" value="%{actionWeblog.handle}" />
+
+ <h2><s:text name="websiteSettings.removeWebsiteHeading" /></h2>
+
+ <p>
+ <s:text name="websiteSettings.removeWebsite" /><br/><br/>
+ <span class="warning">
+ <s:text name="websiteSettings.removeWebsiteWarning" />
+ </span>
+ </p>
+
+ <br />
+
+ <s:submit key="websiteSettings.button.remove" />
+
+ <br />
+ <br />
+ <br />
+
+</s:form>
Added: roller/trunk/web/WEB-INF/jsps/authoring/struts2/WeblogRemoveConfirm.jsp
URL:
http://svn.apache.org/viewvc/roller/trunk/web/WEB-INF/jsps/authoring/struts2/WeblogRemoveConfirm.jsp?view=auto&rev=534545
==============================================================================
--- roller/trunk/web/WEB-INF/jsps/authoring/struts2/WeblogRemoveConfirm.jsp
(added)
+++ roller/trunk/web/WEB-INF/jsps/authoring/struts2/WeblogRemoveConfirm.jsp Wed
May 2 09:54:35 2007
@@ -0,0 +1,56 @@
+<%--
+ 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="websiteRemove.subtitle" />
+</p>
+
+<p>
+ <s:text name="websiteRemove.youSure">
+ <s:param value="actionWeblog.name" />
+ </s:text>
+ <br/>
+ <br/>
+ <span class="warning">
+ <s:text name="websiteSettings.removeWebsiteWarning" />
+ </span>
+</p>
+
+<p>
+ <s:text name="websiteRemove.websiteId" /> = [<s:property
value="actionWeblog.id" />]
+ <br />
+ <s:text name="websiteRemove.websiteName" /> = [<s:property
value="actionWeblog.name" />]
+</p>
+
+<table>
+ <tr>
+ <td>
+ <s:form action="weblogRemove!remove">
+ <s:hidden name="weblog" value="%{actionWeblog.handle}" />
+ <s:submit key="application.yes" />
+ </s:form>
+ </td>
+ <td>
+ <s:form action="weblogConfig" method="post">
+ <s:hidden name="weblog" value="%{actionWeblog.handle}" />
+ <s:submit key="application.no" />
+ </s:form>
+ </td>
+ </tr>
+</table>
Modified: roller/trunk/web/WEB-INF/tiles.xml
URL:
http://svn.apache.org/viewvc/roller/trunk/web/WEB-INF/tiles.xml?view=diff&rev=534545&r1=534544&r2=534545
==============================================================================
--- roller/trunk/web/WEB-INF/tiles.xml (original)
+++ roller/trunk/web/WEB-INF/tiles.xml Wed May 2 09:54:35 2007
@@ -98,6 +98,12 @@
<put name="content" value="/WEB-INF/jsps/admin/struts2/ModifyUser.jsp"
/>
</definition>
+ <definition name=".GlobalCommentManagement" extends=".tiles-tabbedpage" >
+ <put name="content"
value="/WEB-INF/jsps/admin/struts2/GlobalCommentManagement.jsp" />
+ <put name="sidebar"
value="/WEB-INF/jsps/admin/struts2/GlobalCommentManagementSidebar.jsp" />
+ <put name="styles" value="/WEB-INF/jsps/tiles/struts2/css-sidebar.jsp"
/>
+ </definition>
+
<definition name=".CommonPingTargets" extends=".tiles-tabbedpage" >
<put name="content"
value="/WEB-INF/jsps/admin/struts2/CommonPingTargets.jsp" />
</definition>
@@ -156,6 +162,7 @@
</definition>
<definition name=".CommentManagementGlobal" extends=".tiles-tabbedpage" >
+ <put name="head" value="/WEB-INF/jsps/tiles/struts2/head-ajax.jsp" />
<put name="content"
value="/WEB-INF/jsps/authoring/CommentManagement.jsp" />
<put name="sidebar"
value="/WEB-INF/jsps/authoring/CommentManagementSidebar.jsp" />
<put name="styles" value="/WEB-INF/jsps/tiles/struts2/css-sidebar.jsp"
/>
@@ -208,12 +215,12 @@
<!-- weblog admin pages (and associates) -->
- <definition name=".edit-website" extends=".tiles-tabbedpage" >
- <put name="content" value="/WEB-INF/jsps/authoring/edit-website.jsp" />
+ <definition name=".WeblogConfig" extends=".tiles-tabbedpage" >
+ <put name="content"
value="/WEB-INF/jsps/authoring/struts2/WeblogConfig.jsp" />
</definition>
- <definition name=".WebsiteRemove" extends=".tiles-tabbedpage" >
- <put name="content" value="/WEB-INF/jsps/authoring/WebsiteRemove.jsp"
/>
+ <definition name=".WeblogRemoveConfirm" extends=".tiles-tabbedpage" >
+ <put name="content"
value="/WEB-INF/jsps/authoring/struts2/WeblogRemoveConfirm.jsp" />
<put name="styles"
value="/WEB-INF/jsps/tiles/struts2/css-nosidebar.jsp" />
</definition>
@@ -269,7 +276,7 @@
</definition>
<definition name=".Maintenance" extends=".tiles-tabbedpage" >
- <put name="content" value="/WEB-INF/jsps/authoring/Maintenance.jsp" />
+ <put name="content"
value="/WEB-INF/jsps/authoring/struts2/Maintenance.jsp" />
</definition>