Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
C
cms_sys
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
西魏
cms_sys
Commits
d712b3cc
Commit
d712b3cc
authored
Apr 08, 2019
by
ms group dev
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
优化标签结构
parent
3629f7bb
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
7 additions
and
4 deletions
+7
-4
ArticleAction.java
src/main/java/net/mingsoft/cms/action/ArticleAction.java
+3
-0
ColumnAction.java
src/main/java/net/mingsoft/cms/action/ColumnAction.java
+3
-3
article_form.ftl
src/main/webapp/WEB-INF/manager/cms/article/article_form.ftl
+1
-1
No files found.
src/main/java/net/mingsoft/cms/action/ArticleAction.java
View file @
d712b3cc
...
@@ -229,6 +229,7 @@ public class ArticleAction extends BaseAction {
...
@@ -229,6 +229,7 @@ public class ArticleAction extends BaseAction {
// 添加一个空的article实体
// 添加一个空的article实体
ArticleEntity
article
=
new
ArticleEntity
();
ArticleEntity
article
=
new
ArticleEntity
();
mode
.
addAttribute
(
"article"
,
article
);
mode
.
addAttribute
(
"article"
,
article
);
mode
.
addAttribute
(
"action"
,
"save"
);
// 返回路径
// 返回路径
return
"/cms/article/article_form"
;
// 这里表示显示/manager/cms/article/article_save.ftl
return
"/cms/article/article_form"
;
// 这里表示显示/manager/cms/article/article_save.ftl
}
}
...
@@ -496,6 +497,8 @@ public class ArticleAction extends BaseAction {
...
@@ -496,6 +497,8 @@ public class ArticleAction extends BaseAction {
int
appId
=
BasicUtil
.
getAppId
();
int
appId
=
BasicUtil
.
getAppId
();
model
.
addAttribute
(
"appId"
,
appId
);
model
.
addAttribute
(
"appId"
,
appId
);
model
.
addAttribute
(
"articleImagesUrl"
,
"/upload/"
+
BasicUtil
.
getAppId
()+
"/"
);
model
.
addAttribute
(
"articleImagesUrl"
,
"/upload/"
+
BasicUtil
.
getAppId
()+
"/"
);
model
.
addAttribute
(
"action"
,
"update"
);
if
(
categoryId
>
0
)
{
// 分类获取文章
if
(
categoryId
>
0
)
{
// 分类获取文章
articleEntity
=
articleBiz
.
getByCategoryId
(
categoryId
);
articleEntity
=
articleBiz
.
getByCategoryId
(
categoryId
);
ColumnEntity
column
=
articleEntity
.
getColumn
();
ColumnEntity
column
=
articleEntity
.
getColumn
();
...
...
src/main/java/net/mingsoft/cms/action/ColumnAction.java
View file @
d712b3cc
...
@@ -71,7 +71,7 @@ public class ColumnAction extends BaseAction{
...
@@ -71,7 +71,7 @@ public class ColumnAction extends BaseAction{
@RequiresPermissions
(
"cms:column:view"
)
@RequiresPermissions
(
"cms:column:view"
)
public
String
index
(
HttpServletResponse
response
,
HttpServletRequest
request
,
ModelMap
model
){
public
String
index
(
HttpServletResponse
response
,
HttpServletRequest
request
,
ModelMap
model
){
model
.
addAttribute
(
"model"
,
"cms"
);
model
.
addAttribute
(
"model"
,
"cms"
);
return
view
(
"/column/index"
)
;
return
"/basic/column/index"
;
}
}
/**
/**
* 栏目添加跳转页面
* 栏目添加跳转页面
...
@@ -89,7 +89,7 @@ public class ColumnAction extends BaseAction{
...
@@ -89,7 +89,7 @@ public class ColumnAction extends BaseAction{
model
.
addAttribute
(
"column"
,
new
ColumnEntity
());
model
.
addAttribute
(
"column"
,
new
ColumnEntity
());
model
.
addAttribute
(
"listColumn"
,
JSONArray
.
toJSONString
(
list
));
model
.
addAttribute
(
"listColumn"
,
JSONArray
.
toJSONString
(
list
));
model
.
addAttribute
(
"model"
,
"cms"
);
model
.
addAttribute
(
"model"
,
"cms"
);
return
"/column/form"
;
return
"/
basic/
column/form"
;
}
}
/**
/**
...
@@ -210,7 +210,7 @@ public class ColumnAction extends BaseAction{
...
@@ -210,7 +210,7 @@ public class ColumnAction extends BaseAction{
model
.
addAttribute
(
"columnSuper"
,
columnSuper
);
model
.
addAttribute
(
"columnSuper"
,
columnSuper
);
model
.
addAttribute
(
"listColumn"
,
JSONArray
.
toJSONString
(
list
));
model
.
addAttribute
(
"listColumn"
,
JSONArray
.
toJSONString
(
list
));
model
.
addAttribute
(
"model"
,
"cms"
);
model
.
addAttribute
(
"model"
,
"cms"
);
return
"/column/form"
;
return
"/
basic/
column/form"
;
}
}
/**
/**
...
...
src/main/webapp/WEB-INF/manager/cms/article/article_form.ftl
View file @
d712b3cc
...
@@ -7,7 +7,7 @@
...
@@ -7,7 +7,7 @@
</#if>
</#if>
</@ms.nav>
</@ms.nav>
<@ms.panel>
<@ms.panel>
<@ms.form isvalidation=true name="articleForm" action="${managerPath}/cms/article/${a
utoCURD
}.do">
<@ms.form isvalidation=true name="articleForm" action="${managerPath}/cms/article/${a
ction
}.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="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":"自定义顺序不能为空"}/>
<@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>
<#if articleType?has_content>
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment