<div class="container-fluid">
    <div class="row">
        <div class="col-sm-5 well">
            <ol>
                <?php foreach ($seo_list as $item) { ?>
                    <li><a href="<?php echo site_url('seo/detail/' . $item->seo_id); ?>" ><?php echo $item->seo_url; ?></a></li>
                <?php } ?>
            </ol>
        </div>


        <div class="col-sm-18" >
            <div class="panel panel-default">
                <div class="panel-heading">SEO设置 <a class="btn btn-success" href="<?php echo site_url('seo/add'); ?>">新建</a></div> 
                <div class="panel-body">

                    <div class="col-sm-18">
                        <form id="form_seo_edit" class="form-horizontal" name="form_seo_edit" method="post" action="<?php echo site_url('seo/edit_save') ?>">

                            <div class="form-group">
                                <label class="col-sm-5 control-label">URL</label>
                                <div class="col-sm-19">
                                    <input type="text" name="seo_url" id="seo_url"  class="form-control"  value="<?php echo isset($seo_detail) ? $seo_detail->seo_url : false; ?>" />
                                </div>
                            </div>

                            <div class="form-group">
                                <label class="col-sm-5 control-label">H1标题</label>
                                <div class="col-sm-19">
                                    <input type="text" name="seo_h1" id="seo_h1"  class="form-control"  value="<?php echo isset($seo_detail) ? $seo_detail->seo_h1 : false; ?>" />
                                </div>
                            </div>

                            <div class="form-group">
                                <label class="col-sm-5 control-label">SEO标题</label>
                                <div class="col-sm-19">
                                    <input type="text" name="seo_title" id="seo_title"  class="form-control"  value="<?php echo isset($seo_detail) ? $seo_detail->seo_title : false; ?>" />
                                </div>
                            </div>

                            <div class="form-group">
                                <label class="col-sm-5 control-label">SEO关键词</label>
                                <div class="col-sm-19">
                                    <input type="text" name="seo_keywords" id="seo_keywords"  class="form-control"  value="<?php echo isset($seo_detail) ? $seo_detail->seo_keywords : false; ?>" />
                                </div>
                            </div>

                            <div class="form-group">
                                <label class="col-sm-5 control-label">SEO描述</label>
                                <div class="col-sm-19">
                                    <textarea name="seo_description" id="seo_description"  rows="5" class="form-control" ><?php echo isset($seo_detail) ? $seo_detail->seo_description : false; ?> </textarea>
                                </div>
                            </div>
                            <div class="form-group">
                                <label class="col-sm-5 control-label">页面介绍</label>
                                <div class="col-sm-19">
                                    <textarea name="seo_summary" id="seo_summary"  rows="5" class="form-control" ><?php echo isset($seo_detail) ? $seo_detail->seo_summary : false; ?></textarea>
                                </div>
                            </div>

                            <input type="hidden" id="seo_id" name="seo_id" value="<?php echo isset($seo_detail) ? $seo_detail->seo_id : false; ?>" />

                        </form>

                        <div class="row">
                            <div class="col-sm-24">
                                <a href="javascript:void(0);" class="btn btn-info pull-right" onclick="submitForm('form_seo_edit');" >保存</a>
                                <?php if (isset($seo_detail)) { ?>
                                    <a href="<?php echo site_url('seo/delete/' . $seo_detail->seo_id); ?>" class="btn btn-default"  >删除</a>
                                <?php } ?>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>

</div>









