<!-- BEGIN CONTENT -->
<div class="page-content-wrapper">
    <div class="page-content">
        <div class="row">
            <div class="col-md-12">
                <!-- BEGIN SAMPLE TABLE PORTLET-->
                <div class="portlet light">
                    <div class="portlet-body">
                        <div class="table-scrollable">
                            <table class="table table-striped table-bordered table-advance table-hover">
                                <tbody>

                                    <tr id="headsection">
                                        <td class="highlight wds20">
                                            <div class="danger">
                                            </div>
                                            <a href="javascript:;">
                                                Head Name </a>
                                        </td>
                                        {if !empty($headuser)}
                                        <td class="hidden-xs">
                                            <p style="padding-left: 1px;font-size: 16px; text-transform: capitalize;">
                                                {$headuser.namehead}
                                            </p>
                                        </td>
                                        <td class="wds10">
                                            <a href="javascript:;" class="btn wds100 default btn-xs purple btnEdit" data-status="0" data-id="{$headuser.id}" data-userid="{$headuser.userid}">
                                                <i class="fa fa-edit"></i> Edit </a>
                                        </td>
                                        {else}
                                        <td class="hidden-xs">
                                            <select class="form-control select2me userstuff"  id="headID" data-status ="0" data-placeholder="Select User Name" required>
                                                <option value=""></option>
                                                {foreach $allusers as $user}
                                                <option value="{$user.user_id}">{$user.name}</option>
                                                {/foreach}
                                            </select>
                                        </td>
                                        {/if}
                                    </tr>


                                    <tr id="aminsection">
                                        <td class="highlight wds20">
                                            <div class="success">
                                            </div>
                                            <a href="javascript:;">
                                                Amin Name </a>
                                        </td>
                                        {if !empty($aminuser)}
                                        <td class="hidden-xs">
                                            <p style="padding-left: 1px; font-size: 16px; text-transform: capitalize;">
                                                {$aminuser.nameamin}
                                            </p>
                                        </td>
                                        <td class="wds10">
                                            <a href="javascript:;" class="btn wds100 default btn-xs purple btnEdit" data-status="1" data-id="{$aminuser.id}" data-userid="{$aminuser.userid}">
                                                <i class="fa fa-edit"></i> Edit </a>
                                        </td>
                                        {else}
                                        <td class="hidden-xs">
                                            <select class="form-control select2me userstuffamin"  id="aminID" data-status ="1" data-placeholder="Select User Name" required>
                                                <option value=""></option>
                                                {foreach $allusers as $user}
                                                <option value="{$user.user_id}">{$user.name}</option>
                                                {/foreach}
                                            </select>
                                        </td>
                                        {/if}
                                    </tr>
                                </tbody>
                            </table>
                        </div>
                    </div>
                </div>
                <!-- END SAMPLE TABLE PORTLET-->
            </div>
        </div>
        <div class="row">
            <div class="col-md-12">
                <!-- BEGIN SAMPLE TABLE PORTLET-->
                <div class="portlet light">
                    <div class="actions" id="nestable_list_menu">
                        <a class="btn blue-madison pull-right plusboardstuff" id="plusboardstuff">
                            <i class="fa fa-plus"></i>
                            Add new
                        </a>
                    </div>
                    <div class="portlet-body">
                        <div class="table-scrollable">
                            <table class="table table-striped table-bordered table-advance table-hover">
                                <tbody id="boardstuff">


                                    {if !empty($boardStuff)}
                                    {foreach $boardStuff as $row}

                                    <tr>
                                        <td class="highlight wds20">
                                            <div class="warning">
                                            </div>
                                            <a href="javascript:;">
                                                User Name </a>
                                        </td>

                                        <td class="hidden-xs" id="boardstuffsection{$row->id}">
                                            <p style="padding-left: 1px;font-size: 16px; text-transform: capitalize;">
                                                {$row->stuffname}
                                            </p>
                                        </td>
                                        <td class="wds10" >
                                            <a href="javascript:;" class="btn wds100 default btn-xs purple btnEditBoard" data-status="2" data-id="{$row->id}" data-userid="{$row->userid}">
                                                <i class="fa fa-edit"></i> Edit </a>
                                        </td>
                                        <td class="wds5">
                                            <a class="btn btn-danger btn-xs deleteboard" data-id="{$row->id}">Delete </a>
                                        </td>

                                        {/foreach}
                                        {else}
                                        <td class="highlight wds20">
                                            <div class="warning">
                                            </div>
                                            <a href="javascript:;">
                                                User Name </a>
                                        </td>
                                        <td class="hidden-xs">
                                            <select class="form-control select2me addboardstuff" name="boardstuffadd1" data-itr="1" id="boardstuffname1" data-status ="2" data-placeholder="Select User Name">
                                                {foreach $allusers as $user}
                                                <option value="{$user.user_id}">{$user.name}</option>
                                                {/foreach}
                                            </select>
                                        </td>
                                    </tr>

                                    {/if}
                                </tbody>
                                <input type="hidden" id="boardstuffnum" name="boardstuffnum" value="1" />


                            </table>
                        </div>
                    </div>
                </div>
                <!-- END SAMPLE TABLE PORTLET-->
            </div>
        </div>
    </div>
    <!-- END PAGE CONTENT-->
</div>

<!-- END CONTENT -->
<div id="stuffboard" style="display: none;">

    {foreach $allusers as $user}
    <option value="{$user.user_id}">{$user.name}</option>
    {/foreach}
</div>
