@extends('Myadmin::layout.basic') @section('header') @stop @section('content')
{{ Form::model($product, array( 'route'=> array($_CONST["CONTROLLER_ROUTE"].'.update', $product->id), 'class'=>'form-horizontal well', 'method' => 'put', 'files' => true ))}} @if($errors->has()) @endif
@if ($product->type == "集量商品")

@elseif ($product->type == "限時商品")

@else
{{ Form::select('category_id', $option, '', array('class' => 'form-control'))}}
@endif
{{ Form::text('product_code', null, array('class' => 'form-control'))}}
{{ Form::text('title', null, array('class' => 'form-control'))}}
{{ Form::text('format', 'red / S', array('class' => 'form-control'))}}
{{ Form::text('price', null, array('class' => 'form-control'))}}
{{ Form::text('selling_price', null, array('class' => 'form-control'))}}
{{ Form::text('available_amount', null, array('class' => 'form-control'))}}
{{ Form::text('stock_amount', null, array('class' => 'form-control'))}}
{{ Form::text('video_url', null, array('class' => 'form-control'))}}
{{ Form::select('special_case', array('無' => '無', '限量商品' => '限量商品', '熱銷商品' => '熱銷商品') , null, array('class' => 'form-control'))}}
{{ Form::select('bonus_category_id', $bonusoption, null, array('class' => 'form-control'))}}
{{ Form::radio('is_available', '上架' )}}上架
{{ Form::radio('is_available', '下架', true )}}下架
{{--
{{ Form::radio('is_available', '隱藏' )}}隱藏
--}}
{{ Form::select('type', array('一般商品' => '一般商品', '集量商品' => '集量商品', '限時商品' => '限時商品') , null, array('class' => 'form-control'))}}
{{ Form::text('stock_threshold', null, array('class' => 'form-control'))}}
@for ($i=0 ; $i < count($detail) ; $i++)
{{ Form::file('image'.$i)}} @if (strlen($product["image".$i] ) > 0) @else asset('images/photoshop.jpg') }}"> @endif

{{Form::hidden('id'.$i, null, array('class' => 'form-control'))}}
Name : {{Form::text('img_title'.$i, null, array('class' => 'form-control'))}}
Contents : {{Form::textarea('img_description'.$i, null, array('class' => 'input-xlarge form-control'))}}
@endfor

{{ Form::textarea('description', null, array('class' => 'input-xxlarge form-control'))}} {{--origin_content -> description--}}

{{ Form::close()}}
@stop @section('js-snippet') @include('Myadmin::js.preview', array('bind' => 'input[name=image]','target' => '#preview')) @include('Myadmin::js.ckeditor', array( 'target' => 'origin_content', )) @stop