Skip to content

Commit 61d1867

Browse files
committed
Merge remote-tracking branch 'origin/V4.0' into V5
2 parents 5bc20b5 + 301f772 commit 61d1867

File tree

12 files changed

+143
-121
lines changed

12 files changed

+143
-121
lines changed

publiccms-parent/publiccms-core/src/main/java/com/publiccms/logic/component/template/TemplateComponent.java

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -252,6 +252,7 @@ public boolean createContentFile(SysSite site, CmsContent entity, CmsCategory ca
252252
contentService.updateUrl(entity.getId(), quote.getUrl(), false);
253253
}
254254
}
255+
return true;
255256
} else {
256257
if (null == category) {
257258
category = categoryService.getEntity(entity.getCategoryId());
@@ -260,14 +261,15 @@ public boolean createContentFile(SysSite site, CmsContent entity, CmsCategory ca
260261
categoryModel = categoryModelService
261262
.getEntity(new CmsCategoryModelId(entity.getCategoryId(), entity.getModelId()));
262263
}
263-
CmsModel model = modelComponent.getModel(site, entity.getModelId());
264-
if (null != categoryModel && null != category && null != model) {
264+
265+
if (null != categoryModel && null != category) {
265266
String contentPath = null;
266267
String templatePath = null;
267268
if (categoryModel.isCustomContentPath()) {
268269
contentPath = categoryModel.getContentPath();
269270
templatePath = categoryModel.getTemplatePath();
270271
} else {
272+
CmsModel model = modelComponent.getModel(site, entity.getModelId());
271273
templatePath = model.getTemplatePath();
272274
if (category.isCustomContentPath()) {
273275
contentPath = category.getContentPath();
@@ -391,7 +393,7 @@ public void createContentFile(SysSite site, List<Serializable> idList, CmsCatego
391393

392394
/**
393395
* 生成页面片段路径
394-
*
396+
*
395397
* @param filepath
396398
* @param category
397399
* @param model
@@ -640,7 +642,7 @@ public Configuration getTaskConfiguration() {
640642
}
641643

642644
/**
643-
*
645+
*
644646
* PublishTask 静态化线程
645647
*
646648
*/

publiccms-parent/publiccms-core/src/main/java/com/publiccms/views/directive/cms/CmsCategoryDirective.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ public void execute(RenderHandler handler) throws IOException, TemplateException
7474
CmsUrlUtils.initCategoryUrl(site, entity);
7575
}
7676
if (containsAttribute) {
77-
entity.setAttribute(ExtendUtils.getAttributeMap(attributeService.getEntity(id)));
77+
entity.setAttribute(ExtendUtils.getAttributeMap(attributeService.getEntity(entity.getId())));
7878
}
7979
handler.put("object", entity);
8080
handler.render();

publiccms-parent/publiccms-core/src/main/java/com/publiccms/views/directive/sys/SysDeptDirective.java

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,9 +47,15 @@ public class SysDeptDirective extends AbstractTemplateDirective {
4747
@Override
4848
public void execute(RenderHandler handler) throws IOException, TemplateException {
4949
Integer id = handler.getInteger("id");
50+
String code = handler.getString("code");
5051
SysSite site = getSite(handler);
51-
if (CommonUtils.notEmpty(id)) {
52-
SysDept entity = service.getEntity(id);
52+
if (CommonUtils.notEmpty(id) || CommonUtils.notEmpty(code)) {
53+
SysDept entity;
54+
if (CommonUtils.notEmpty(id)) {
55+
entity = service.getEntity(id);
56+
} else {
57+
entity = service.getEntityByCode(site.getId(), code);
58+
}
5359
if (null != entity && site.getId() == entity.getSiteId()) {
5460
handler.put("object", entity).render();
5561
}

publiccms-parent/publiccms/src/main/resources/language/page_en.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -252,6 +252,7 @@ page.content.parent.url=Parent content URL
252252
page.content.parent=Parent content
253253
page.content.please_select=Please select content
254254
page.content.promulgator=Promulgator
255+
page.content.quote=Quote
255256
page.content.score=Score
256257
page.content.search=Content search
257258
page.content.select=Select content
@@ -383,7 +384,6 @@ page.extend_field.use.place=Call with the recommendation data extension place.at
383384
page.extend_field=Extension field
384385
page.facet_search=Facet search
385386
page.fail=Fail
386-
page.field.source=Source field
387387
page.field.source_url=Source URL field
388388
page.field.title=Title field
389389
page.field.url=URL field

publiccms-parent/publiccms/src/main/resources/language/page_ja.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -252,6 +252,7 @@ page.content.parent.url=\u89AA\u30B3\u30F3\u30C6\u30F3\u30C4URL
252252
page.content.parent=\u89AA\u30B3\u30F3\u30C6\u30F3\u30C4
253253
page.content.please_select=\u30B3\u30F3\u30C6\u30F3\u30C4\u3092\u9078\u629E\u3057\u3066\u304F\u3060\u3055\u3044
254254
page.content.promulgator=\u767A\u884C\u8005
255+
page.content.quote=\u5F15\u7528
255256
page.content.score=\u30B9\u30B3\u30A2
256257
page.content.search=\u30B3\u30F3\u30C6\u30F3\u30C4\u691C\u7D22
257258
page.content.select=\u30B3\u30F3\u30C6\u30F3\u30C4\u3092\u9078\u629E
@@ -383,7 +384,6 @@ page.extend_field.use.place=\u63A8\u5968\u30D3\u30C3\u30C8\u3092\u4F7F\u7528\u30
383384
page.extend_field=\u62E1\u5F35\u30D5\u30A3\u30FC\u30EB\u30C9
384385
page.facet_search=\u30D5\u30A1\u30BB\u30C3\u30C8\u691C\u7D22
385386
page.fail=\u5931\u6557
386-
page.field.source=\u30BD\u30FC\u30B9\u30D5\u30A3\u30FC\u30EB\u30C9
387387
page.field.source_url=\u30BD\u30FC\u30B9\u30B5\u30A4\u30C8\u30D5\u30A3\u30FC\u30EB\u30C9
388388
page.field.title=\u30BF\u30A4\u30C8\u30EB\u30D5\u30A3\u30FC\u30EB\u30C9
389389
page.field.url=\u30EA\u30F3\u30AF\u30D5\u30A3\u30FC\u30EB\u30C9

publiccms-parent/publiccms/src/main/resources/language/page_zh.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -252,6 +252,7 @@ page.content.parent.url=\u7236\u5185\u5BB9URL
252252
page.content.parent=\u7236\u5185\u5BB9
253253
page.content.please_select=\u8BF7\u9009\u62E9\u5185\u5BB9
254254
page.content.promulgator=\u53D1\u5E03\u8005
255+
page.content.quote=\u5F15\u7528
255256
page.content.score=\u5206\u6570
256257
page.content.search=\u5185\u5BB9\u641C\u7D22
257258
page.content.select=\u9009\u62E9\u5185\u5BB9
@@ -383,7 +384,6 @@ page.extend_field.use.place=\u4F7F\u7528\u63A8\u8350\u4F4D\u6269\u5C55\u5C5E\u60
383384
page.extend_field=\u6269\u5C55\u5B57\u6BB5
384385
page.facet_search=\u5206\u9762\u641C\u7D22
385386
page.fail=\u5931\u8D25
386-
page.field.source=\u6765\u6E90\u5B57\u6BB5
387387
page.field.source_url=\u6765\u6E90\u7F51\u5740\u5B57\u6BB5
388388
page.field.title=\u6807\u9898\u5B57\u6BB5
389389
page.field.url=\u94FE\u63A5\u5B57\u6BB5

publiccms-parent/publiccms/src/main/resources/templates/admin/cmsContent/add.html

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -87,8 +87,8 @@
8787
$('input[name=\'categoryName\']',navTab.getCurrentPanel()).on('change',function(){
8888
addCategory($('input[name=\'quoteCategoryId\']',navTab.getCurrentPanel()).val(), $(this).val(), null);
8989
});
90-
<#if a?has_content>
91-
<@cms.contentQuoteList quoteId=a.id>
90+
<#if id?has_content>
91+
<@cms.contentQuoteList quoteId=id>
9292
<#list list as a>
9393
<@cms.category id=a.categoryId>
9494
addCategory('${a.categoryId}','${object.name}','${a.id}');
@@ -118,9 +118,10 @@
118118
<#else>
119119
<input name="sort" type="hidden" value="${(a.sort)!0}"/>
120120
</#if>
121+
<#if a.quoteContentId?has_content && !a.parentId?has_content><san class="statusText orange"><@t.page "content.quote"/></span></#if>
121122
</dd>
122123
</dl>
123-
<dl class="copied hide">
124+
<dl<#if !fieldList?seq_contains('source')> class="copied hide"</#if>>
124125
<dt>${(model.fieldTextMap['source'])!}:</dt>
125126
<dd><input name="source" autocomplete="on" type="text"<#if requiredFieldList?seq_contains('source')> data-required="true"</#if> maxlength="50" size="20" value="${(attribute.source)!}"/></dd>
126127
</dl>
@@ -313,10 +314,10 @@
313314
$('input[name=copied]',navTab.getCurrentPanel()).on("click", function(){
314315
if($(this).is(':checked')) {
315316
$('.copied',navTab.getCurrentPanel()).show();
316-
$('.copied input[data-required=true]',navTab.getCurrentPanel()).addClass('required');
317+
$('input[data-copied-required=true]',navTab.getCurrentPanel()).addClass('required');
317318
} else {
318319
$('.copied',navTab.getCurrentPanel()).hide();
319-
$('.copied input[data-required=true]',navTab.getCurrentPanel()).removeClass('required').val('');
320+
$('input[data-copied-required=true]',navTab.getCurrentPanel()).removeClass('required').val('');
320321
}
321322
});
322323
<#if a?has_content && a.copied>

publiccms-parent/publiccms/src/main/resources/templates/admin/cmsContent/content_list.html

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -196,6 +196,7 @@ <h3>
196196
${(a.copied?then('['+t.pageMessage('copied')+']',''))!}
197197
<a href="cmsContent/view.html?id=${a.id}" class="exclude-translate" target="dialog" rel="viewContent${a.id}" width="1200" height="600">${(a.title)!}</a>
198198
<#if a.url?has_content><a href="${a.url!}" target="_blank"><i class="icon-external-link"></i></a></#if>
199+
<#if a.quoteContentId?has_content && !a.parentId?has_content><span class="statusText orange"><@t.page "content.quote"/></span></#if>
199200
</h3>
200201
<p>
201202
<#if modelMap[a.modelId]?has_content&&modelMap[a.modelId].hasChild>

publiccms-parent/publiccms/src/main/resources/templates/admin/cmsContent/uncheck_list.html

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,8 @@ <h3>
115115
</#if>
116116
[<span class="exclude-translate">${(categoryMap[a.categoryId?string].name)!}</span>]
117117
${(a.copied?then('['+t.pageMessage('copied')+']',''))!}
118-
<a href="cmsContent/view.html?id=${a.id}" class="exclude-translate" target="dialog" width="1200" height="600" rel="viewContent${a.id}">${(a.title)!}</a>
118+
<a href="cmsContent/view.html?id=${a.id}" class="exclude-translate" target="dialog" width="1200" height="600" rel="viewContent${a.id}">${(a.title)!}</a>
119+
<#if a.quoteContentId?has_content && !a.parentId?has_content><span class="statusText orange"><@t.page "content.quote"/></span></#if>
119120
</h3>
120121
<p>
121122
<#if modelMap[a.modelId]?has_content&&modelMap[a.modelId].hasChild>

0 commit comments

Comments
 (0)