Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
jinli gu
MCMS
Commits
d712b3cc
Commit
d712b3cc
authored
Apr 08, 2019
by
ms group dev
Browse files
优化标签结构
parent
3629f7bb
Changes
3
Hide whitespace changes
Inline
Side-by-side
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
Supports
Markdown
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