Sfoglia il codice sorgente

优化标签结构

ms group dev 6 anni fa
parent
commit
d712b3ccfe

+ 3 - 0
src/main/java/net/mingsoft/cms/action/ArticleAction.java

@@ -229,6 +229,7 @@ public class ArticleAction extends BaseAction {
 		// 添加一个空的article实体
 		ArticleEntity article = new ArticleEntity();
 		mode.addAttribute("article", article);
+		mode.addAttribute("action", "save");
 		// 返回路径
 		return "/cms/article/article_form"; // 这里表示显示/manager/cms/article/article_save.ftl
 	}
@@ -496,6 +497,8 @@ public class ArticleAction extends BaseAction {
 		int appId = BasicUtil.getAppId();
 		model.addAttribute("appId", appId);
 		model.addAttribute("articleImagesUrl", "/upload/"+BasicUtil.getAppId()+"/");
+		model.addAttribute("action", "update");
+
 		if (categoryId > 0) { // 分类获取文章
 			articleEntity = articleBiz.getByCategoryId(categoryId);
 			ColumnEntity column = articleEntity.getColumn();

+ 3 - 3
src/main/java/net/mingsoft/cms/action/ColumnAction.java

@@ -71,7 +71,7 @@ public class ColumnAction extends BaseAction{
 	@RequiresPermissions("cms:column:view")
 	public String index(HttpServletResponse response,HttpServletRequest request,ModelMap model){
 		model.addAttribute("model", "cms");
-		return view ("/column/index");
+		return "/basic/column/index";
 	}
 	/**
 	 * 栏目添加跳转页面
@@ -89,7 +89,7 @@ public class ColumnAction extends BaseAction{
 		model.addAttribute("column",new ColumnEntity());
 		model.addAttribute("listColumn", JSONArray.toJSONString(list));
 		model.addAttribute("model", "cms");
-		return "/column/form";
+		return "/basic/column/form";
 	}
 
 	/**
@@ -210,7 +210,7 @@ public class ColumnAction extends BaseAction{
 		model.addAttribute("columnSuper", columnSuper);
 		model.addAttribute("listColumn", JSONArray.toJSONString(list));
 		model.addAttribute("model", "cms");
-		return "/column/form";
+		return "/basic/column/form";
 	}
 	
 	/**

+ 1 - 1
src/main/webapp/WEB-INF/manager/cms/article/article_form.ftl

@@ -7,7 +7,7 @@
 	 	</#if>
 	</@ms.nav>
 	<@ms.panel>
-		<@ms.form isvalidation=true name="articleForm" action="${managerPath}/cms/article/${autoCURD}.do">
+		<@ms.form isvalidation=true name="articleForm" action="${managerPath}/cms/article/${action}.do">
 			<@ms.text name="basicTitle" colSm="2" width="400" label="文章标题"	title="文章标题" size="5"  placeholder="请输入文章标题"  value="${article.basicTitle?default('')}"  validation={"maxlength":"300","required":"true", "data-bv-notempty-message":"文章标题不能为空","data-bv-stringlength-message":"标题在300个字符以内!", "data-bv-notempty-message":"必填项目"}/>
 			<@ms.text name="basicSort"  colSm="2" width="200" label="自定义顺序" title="自定义顺序" size="5"  placeholder="请输入文章顺序" value="${article.basicSort?c?default(0)}" validation={"data-bv-between":"true","required":"true", "data-bv-between-message":"自定义顺序必须大于0","data-bv-between-min":"0", "data-bv-between-max":"99999999","data-bv-notempty-message":"自定义顺序不能为空"}/>
 			<#if articleType?has_content>