zzwy2/view/manager/article/edit.html

431 lines
19 KiB
HTML
Executable File
Raw Blame History

This file contains ambiguous Unicode characters!

This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.

<form class="layui-form eject-layuiBox" data-action="{:url('manager.article/edit')}" >
<div class="layui-card-body eject-info">
<input type="hidden" name="__token__" value="{$_token}" />
<strong style="color: #f20000; font-size: 12px; display: block; line-height: 1;">注意*号为必填选项!</strong>
<hr style="margin: 20px 0;">
<div class="layui-form-itemBox3 between">
<div class="layui-form-item">
{php}
$title = '标题';
$titleNotice = '注建议60个字符长度以内';
switch ($category['id']) {
case 37:
$title = '年份';
break;
}
{/php}
<label class="layui-form-label">{$title}<em>*</em></label>
<div class="layui-input-block">
<input type="text" class="layui-input" name="item[title]" value="{$item.title??''}" maxlength="60"/>
<div class="layui-form-mid layui-word-aux">{$titleNotice}</div>
</div>
</div>
</div>
{if in_array($category['id'], [9,10,23,24,25,40,42])}
<div class="layui-form-itemBox3 between">
<div class="layui-form-item">
<label class="layui-form-label">英文标题</label>
<div class="layui-input-block">
<input type="text" class="layui-input" name="item[title_en]" value="{$item.title_en??''}" maxlength="60"/>
<div class="layui-form-mid layui-word-aux">建议60个字符长度以内</div>
</div>
</div>
</div>
{/if}
<!--
<div class="layui-form-item">
<label class="layui-form-label">标题颜色</label>
<div class="layui-input-block">
<input class="layui-input" type="text" name="item[title_color]" value="{$item.title_color}" maxlength="60" />
</div>
</div>
<div class="layui-form-item">
<label class="layui-form-label">标题下短线颜色</label>
<div class="layui-input-block">
<input class="layui-input" type="text" name="item[line_color]" value="{$item.line_color}" maxlength="60" />
</div>
</div>
<div class="layui-form-item">
<label class="layui-form-label">路由别名</label>
<div class="layui-input-block">
<input class="layui-input" type="text" name="item[alias]" value="{$item.alias??''}" maxlength="60" />
</div>
</div>
-->
{if !(in_array($category['id'],[4,5,7]))}
<div class="layui-form-item">
{php}
$subtitle = '副标题';
$titleNotice = '';
$titleValue = $item['sub_title'];
switch ($category['id']) {
case 37:
$subtitle = '月份';
$titleNotice = '月份必填 不填则默认为1月';
$titleValue = $item['sub_title'] ?: 1;
break;
}
{/php}
<label class="layui-form-label">{$subtitle ??''}</label>
<div class="layui-input-block">
<input class="layui-input" type="text" name="item[sub_title]" value="{$titleValue}" maxlength="60" />
<div class="layui-form-mid layui-word-aux">{$titleNotice}</div>
</div>
</div>
{/if}
{if !(in_array($category['id'],[5,37]))}
<div class="layui-form-item">
<label class="layui-form-label">封面图</label>
<div class="layui-input-block">
{php}
switch ($category['id']) {
case 37:
$imgSize = '545*200';
break;
}
{/php}
{:widget('manager.upload/image',['src' => $item.src??'', 'imgSize' => $imgSize ?: $coverSize])}
</div>
</div>
{/if}
{if !(in_array($category['id'],[5,37,42]))}
<div class="layui-form-item">
<label class="layui-form-label">手机封面图</label>
<div class="layui-input-block">
{:widget('manager.upload/image',['src' => $item.src_mobile??'','imgSize' => $mobileCoverSize, 'append' => '_mobile'])}
</div>
</div>
{/if}
<div class="layui-form-item">
<label class="layui-form-label">路由</label>
<div class="layui-input-block">
<input class="layui-input" type="text" name="item[route]" value="{$item.route}" maxlength="60" />
<div class="layui-form-mid layui-word-aux">以/开头,完全匹配 需保证全局唯一</div>
</div>
</div>
{if in_array($category['id'], [39,9,10,23,24,25,37])}
<div class="layui-form-item">
{php}
$imgName = 'PC组图';
$pcImgSize = $pcImgSize??'';
switch ($category['id']) {
case 37:
$imgName = '大事记';
$pcImgSize = $pcImgSize ?: '830*500';
break;
}
{/php}
<label class="layui-form-label">{$imgName}</label>
<div class="layui-input-block">
{:widget('manager.upload/multi',['append' => '_imgs', 'imgs' => $item.imgs??'', 'num' => $item.num??10, 'imgSize' => $pcImgSize, $item['id']??''])}
</div>
</div>
{/if}
{if in_array($category['id'], [39,9,10,23,24,25])}
<div class="layui-form-item">
<label class="layui-form-label">组图-手机端</label>
<div class="layui-input-block">
{:widget('manager.upload/multi',['append' => '_imgs_mobile','imgs' => $item.imgs_mobile??'', 'num' => $item.num??10, 'imgSize' => $mobileImgSize, $item['id']??''])}
</div>
</div>
{/if}
{if in_array($category['id'], [9,10,23,24,42])}
<div class="layui-form-item">
<label class="layui-form-label">资源优势PC组图</label>
<div class="layui-input-block">
{:widget('manager.upload/multi',['fields' => false,'append' => '_resource', 'imgs' => $item.other_text1??'', 'num' => 50, 'imgSize' => '1360*0px', $item['id']??''])}
</div>
</div>
<div class="layui-form-item">
<label class="layui-form-label">资源优势组图-手机端</label>
<div class="layui-input-block">
{:widget('manager.upload/multi',['append' => '_resource_mobile','imgs' => $item.other_text2??'', 'num' => 50, 'imgSize' => '365*0px', $item['id']??''])}
</div>
</div>
{/if}
{if $allowVideo ?? false}
<div class="layui-form-item">
<label class="layui-form-label">视频</label>
<div class="layui-input-block">
<input type="hidden" name="item[is_video]" value="1">
{:widget('manager.upload/video', ['src' => $item.video ?? ''])}
</div>
</div>
{/if}
<!--
<div class="layui-form-item">
<label class="layui-form-label">logo</label>
<div class="layui-input-block">
{:widget('manager.upload/image',['append' => '_logo', 'src' => $item.logo??''])}
</div>
</div>
<div class="layui-form-item">
<label class="layui-form-label">详情banner</label>
<div class="layui-input-block">
{:widget('manager.upload/image',['append' => '_banner', 'src' => $item.banner??''])}
</div>
</div>
<div class="layui-form-item">
<label class="layui-form-label">项目名称</label>
<div class="layui-input-block">
<input class="layui-input" type="text" name="item[project]" value="{$item.project??''}" maxlength="60" />
</div>
</div>
<div class="layui-form-item">
<label class="layui-form-label">服务内容</label>
<div class="layui-input-block">
<input class="layui-input" type="text" name="item[service]" value="{$item.service??''}" maxlength="60" />
</div>
</div>
<div class="layui-form-item">
<label class="layui-form-label">所属行业</label>
<div class="layui-input-block">
<input class="layui-input" type="text" name="item[industry]" value="{$item.industry??''}" maxlength="60" />
</div>
</div>
-->
{if !isset($allowSummary) || $allowSummary}
{if !(in_array($category['id'],[4,5,9,10,6,35,36,42]))}
<div class="layui-form-itemBox2 between">
<div class="layui-form-item">
{if $category['id'] == 37}
<label class="layui-form-label">大事记列表</label>
{elseif $category['id'] == 38}
<label class="layui-form-label">荣誉列表</label>
{else /}
<label class="layui-form-label">摘要</label>
{/if}
<div class="layui-input-block">
<textarea name="item[summary]" class="layui-textarea" {if in_array($category['id'],[37,38])}rows="10"{/if}>{$item.summary??''}</textarea>
<div class="layui-form-mid layui-word-aux">建议200字以内 {if $category['id'] == 37} 大事记月份后需使用空格分割 {/if}</div>
</div>
</div>
</div>
{/if}
{/if}
<!-- <div class="layui-form-itemBox3 between">-->
<!-- <div class="layui-form-item">-->
<!-- <label class="layui-form-label">链接</label>-->
<!-- <div class="layui-input-block">-->
<!-- <input type="text" class="layui-input" name="item[link]" value="{$item.link??''}" maxlength="250"/>-->
<!-- <div class="layui-form-mid layui-word-aux">注设置了链接则优先跳转到链接页面。非站内链接请以http://或者https://开头</div>-->
<!-- </div>-->
<!-- </div>-->
<!-- </div>-->
{if !empty($attributeList)}
<div class="layui-form-item layui-hide">
<label class="layui-form-label">属性</label>
<div class="layui-inline">
<div class="layui-select newStyle eject">
<em>请选择</em>
<div class="top_box"></div>
<div class="lower_box">
<ul>
<!--
<li data-id="" data-val="置顶" data-checkbox="1">置顶</li>
<li data-id="" data-val="热门" data-checkbox="1">热门</li>
<li data-id="" data-val="推荐" data-checkbox="1">推荐</li>
-->
{foreach $attributeList as $ki => $v}
<li data-id="{$ki}" data-val="{$ki}" data-checkbox="1">{$v}</li>
{/foreach}
</ul>
</div>
<input type="hidden" class="parameter" name="recommend_other_str" value="{$item.recommend_other_str ?? ''}" />
<!--
<div class="checkbox_list">
<input type="hidden" name="item[top]" data-val="置顶" value="<?php if($item['top']){echo '1';}?>" />
<input type="hidden" name="item[hot]" data-val="热门" value="<?php if($item['hot']){echo '1';}?>" />
<input type="hidden" name="item[recommend]" data-val="推荐" value="<?php if($item['recommend']){echo '1';}?>" />
</div>
-->
</div>
</div>
</div>
{/if}
<div class="layui-form-item">
<label class="layui-form-label">状态</label>
<div class="layui-inline new-inline">
<select name="item[status]">
<option value="0" {if $item['status'] == 0}selected{/if}>隐藏</option>
<option value="1" {if $item['status']}selected{/if}>正常</option>
</select>
</div>
</div>
{if $category['id'] == 39}
<div class="layui-form-item">
<label class="layui-form-label">活动预告</label>
<div class="layui-inline new-inline">
<select name="item[is_prev]">
<option value="0" {if $item['is_prev'] == 0}selected{/if}></option>
<option value="1" {if $item['is_prev']}selected{/if}></option>
</select>
</div>
</div>
{/if}
{if $category['id'] == 40}
<div class="layui-form-item">
<label class="layui-form-label">推荐展示在pc轮播和手机端集市下</label>
<div class="layui-inline new-inline">
<select name="item[recommend]">
<option value="0" {if $item['recommend'] == 0}selected{/if}></option>
<option value="1" {if $item['recommend']}selected{/if}></option>
</select>
</div>
</div>
{/if}
{if !(in_array($category['id'],[37,38]))}
{if !isset($allowContent) || $allowContent}
<div class="layui-form-item">
<label class="layui-form-label">内容</label>
<div class="layui-input-block ">
{if !(in_array($category['id'],[5]))}
<textarea name="item[content]" class="tinymce-editor layui-textarea min-fix-h200">{$item.content??''}</textarea>
{else/}
<textarea name="item[content]" class="codeEditor layui-textarea" >{$item.content??''}</textarea>
{/if}
</div>
</div>
{else /}
<div class="layui-form-item">
<label class="layui-form-label">内容</label>
<div class="layui-input-block editor-text">
{if !(in_array($category['id'],[5]))}
<textarea name="item[content]" class="tinymce-editor layui-textarea min-fix-h200">{$item.content??''}</textarea>
{else/}
<textarea name="item[content]" class="codeEditor layui-textarea" >{$item.content??''}</textarea>
{/if}
</div>
</div>
{/if}
{/if}
{if $allowTag ?? false}
<div class="layui-form-item">
<label class="layui-form-label">标签</label>
<div class="layui-input-block">
<input class="layui-input" type="text" name="item[tag]" value="{$item.tag??''}" placeholder="多个标签请用逗号分割" />
</div>
</div>
{/if}
<div class="layui-form-itemBox2 between">
<div class="layui-form-item">
<label class="layui-form-label">来源</label>
<div class="layui-input-block">
<input class="layui-input" type="text" name="item[source]" placeholder="在此填写来源" value="{$item.source??''}" />
</div>
</div>
<!-- <div class="layui-form-item">-->
<!-- <label class="layui-form-label">作者</label>-->
<!-- <div class="layui-input-block">-->
<!-- <input class="layui-input" type="text" name="item[author]" placeholder="请在此填写作者" value="{$item.author??''}" />-->
<!-- </div>-->
<!-- </div>-->
</div>
<!--
<div class="layui-form-itemBox2 between">
<div class="layui-form-item">
<label class="layui-form-label">来源网站</label>
<div class="layui-input-block">
<input class="layui-input" type="text" name="item[copy_site]" placeholder="请在此填写来源网站" value="{$item.copy_site??''}" />
</div>
</div>
<div class="layui-form-item">
<label class="layui-form-label">来源网址</label>
<div class="layui-input-block">
<input class="layui-input" type="text" name="item[copy_url]" value="{$item.copy_url??''}"
placeholder="请在此填写来源网址请以http://或者https://开头" />
</div>
</div>
</div>
-->
<!-- 自定义内容区 other_text* -->
{if isset($otherTextList)}
{foreach $otherTextList as $otherTextItem}
{if $otherTextItem['type'] == 'textarea'}
<div class="layui-form-item">
<label class="layui-form-label">{$otherTextItem['name']}</label>
<div class="layui-input-block">
<textarea class="layui-textarea" name="item[{$otherTextItem['field']}]" placeholder="{$otherTextItem['placeholder'] ?? ''}"
>{$item[$otherTextItem['field']] ??''}</textarea>
</div>
</div>
{else /}
<div class="layui-form-item">
<label class="layui-form-label">{$otherTextItem['name']}</label>
<div class="layui-input-block">
<input class="layui-input" type="text" name="item[{$otherTextItem['field']}]" value="{$item[$otherTextItem['field']] ?? ''}"
placeholder="{$otherTextItem['placeholder'] ?? ''}" />
</div>
</div>
{/if}
{/foreach}
{/if}
<!-- SEO 自定义区域 -->
{if !isset($seoRaw) || !$seoRaw}
<div class="system_title">SEO信息</div>
<div class="layui-form-itemBox3 between">
<div class="layui-form-item">
<label class="layui-form-label">seo_title</label>
<div class="layui-input-block">
<input class="layui-input" type="text" name="item[seo_title]" value="{$item.seo_title??''}"/>
</div>
</div>
</div>
<div class="layui-form-itemBox3 between">
<div class="layui-form-item">
<label class="layui-form-label">keywords</label>
<div class="layui-input-block">
<textarea class="layui-textarea" name="item[seo_keywords]" placeholder="请在此填写SEO keywords 内容">{$item['seo_keywords']??''}</textarea>
</div>
</div>
<div class="layui-form-item"><div class="layui-form-mid layui-word-aux">内容字符长度为60</div></div>
</div>
<div class="layui-form-itemBox3 between">
<div class="layui-form-item">
<label class="layui-form-label">description</label>
<div class="layui-input-block">
<textarea class="layui-textarea" name="item[seo_description]" placeholder="请在此填写SEO description 内容">{$item['seo_description']??''}</textarea>
</div>
</div>
<div class="layui-form-item"><div class="layui-form-mid layui-word-aux">内容字符长度为60</div></div>
</div>
<!-- SEO 添加内容区域 -->
{/if}
</div>
<div class="eject-btn mgt15">
<button type="button" class="layui-btn layui-btn-normal" lay-submit lay-filter="submitAll">保存</button>
</div>
<input type="hidden" class="layui-input" name="id" value="{$item.id}" />
<input type="hidden" class="layui-input" name="item[category_id]" value="{$item.category_id}" />
</form>