@extends('admin.master')

@section('top')
	<div class="top-breadcrumb pull-left">
	    <h5>添加分类</h5>
	    <a class="btn btn-xs btn-default goback" onclick="javascript:history.go(-1);">
	        <i class="iconfont icon-back-copy"></i><span>返回</span>
	    </a>
	</div>
@endsection

@section('content')
{!! Form::open(['route' => 'admin.page-cate.store', 'class'=>'form-horizontal form-detail']) !!}
	<div class="tab-content">
		<div role="tabpanel" class="tab-pane active" id="language-{{ $managerLang }}">
    		<div class="form-group {{ $managerLang == config('setting.lang') ? 'form-item-required' : ''}}">
    			<label class="col-sm-2 control-label label-width">标题：</label>
    			<div class="col-sm-5">
    				{!! Form::text("description[{$managerLang}][cname]", '', ['class'=>'form-control']) !!}
    			</div>
    		</div>
    		<div class="form-group">
				<label class="col-sm-2 control-label label-width">摘要：</label>
				<div class="col-sm-5">
					{!! Form::textarea("description[{$managerLang}][summary]", '', ['class'=>'form-control', 'rows'=>3]) !!}
				</div>
			</div>
			<div class="form-group">
				<label class="col-sm-2 control-label label-width">图片：</label>
				<div class="col-sm-5">
					<div class="upload-wrap" data-name="description[{{ $managerLang }}][img]">
						<div class="upload-wrap-btn">
							<span class="btn btn-default" data-toggle="modal" data-target="#media-dialog-modal">媒体上传</span>
							<span class="text-muted pl-10">(允许上传的媒体类型：jpg、gif、png)</span>
						</div>
						<ul id="picfram" class="upload-wrap-lists attachments clearfix"></ul>
					</div>
				</div>
			</div>
      <div class="form-group">
        <label class="col-sm-2 control-label label-width">产品详情模板：</label>
        <div class="col-sm-5">
          <div class="pretty-box">
            <div class="pretty p-default">
              {!! Form::checkbox('is_product_detail', 1, false) !!}
              <div class="state p-success"><label>开启</label></div>
            </div>
          </div>
        </div>
      </div>
		</div>
	</div>
	<div class="form-group">
        <label class="col-sm-3 control-label label-width"></label>
        <div class="col-sm-5">
          {!! Form::submit(inject('setting')->config('auto_translate') == 1 ? '提交并翻译' : '提交', ['class'=>'btn btn-primary']) !!}
        </div>
    </div>
{!! Form::close() !!}
@endsection


@section('foot')
{{--媒体库 start--}}
@include('admin.common.media', ['type' => 'jpg,gif,png'])
{{--媒体库 end--}}
@endsection