<?php
/* Smarty version 3.1.33, created on 2020-08-11 07:30:58
  from '/Users/codeworldweb.com/websites/uvocorp/content/themes/dashboard/customize/uploadTypes.tpl' */

/* @var Smarty_Internal_Template $_smarty_tpl */
if ($_smarty_tpl->_decodeProperties($_smarty_tpl, array (
  'version' => '3.1.33',
  'unifunc' => 'content_5f324932a38155_83867913',
  'has_nocache_code' => false,
  'file_dependency' => 
  array (
    '163afa1aa3accc5753a9524545d90dd17b377819' => 
    array (
      0 => '/Users/codeworldweb.com/websites/uvocorp/content/themes/dashboard/customize/uploadTypes.tpl',
      1 => 1592297058,
      2 => 'file',
    ),
  ),
  'includes' => 
  array (
  ),
),false)) {
function content_5f324932a38155_83867913 (Smarty_Internal_Template $_smarty_tpl) {
if (count($_smarty_tpl->tpl_vars['uploadTypes']->value)) {?>
    <div class="table-responsive">
        <table class="table <?php if ($_smarty_tpl->tpl_vars['theme_mode_night']->value) {?>table-dark<?php }?> table-striped table-bordered table-hover js_dataTable">
            <thead>
                <tr>
                    <th>ID</th>
                    <th>Title</th>
                    <th>Customer</th>
                    <th>Writer</th>
                    <th>Editor</th>
                    <th>Actions</th>
                </tr>
            </thead>
            <tbody>
                <?php
$_from = $_smarty_tpl->smarty->ext->_foreach->init($_smarty_tpl, $_smarty_tpl->tpl_vars['uploadTypes']->value, 'upload_type');
if ($_from !== null) {
foreach ($_from as $_smarty_tpl->tpl_vars['upload_type']->value) {
?>
                    <tr>
                        <td><?php echo htmlspecialchars($_smarty_tpl->tpl_vars['upload_type']->value['upload_type_id'], ENT_QUOTES, 'UTF-8');?>
</td>
                        <td><?php echo htmlspecialchars($_smarty_tpl->tpl_vars['upload_type']->value['title'], ENT_QUOTES, 'UTF-8');?>
</td>
                        <td>
                            <?php if ($_smarty_tpl->tpl_vars['upload_type']->value['customer']) {?>
                                <span class="fa fa-check text-success"></span>
                            <?php } else { ?>
                                <span class="fa fa-times text-danger"></span>
                            <?php }?>
                        </td>
                        <td>
                            <?php if ($_smarty_tpl->tpl_vars['upload_type']->value['writer']) {?>
                                <span class="fa fa-check text-success"></span>
                            <?php } else { ?>
                                <span class="fa fa-times text-danger"></span>
                            <?php }?>
                        </td>
                        <td>
                            <?php if ($_smarty_tpl->tpl_vars['upload_type']->value['editor']) {?>
                                <span class="fa fa-check text-success"></span>
                            <?php } else { ?>
                                <span class="fa fa-times text-danger"></span>
                            <?php }?>
                        </td>
                        <td>
                            <?php if ($_smarty_tpl->tpl_vars['upload_type']->value['upload_type_id'] != '39') {?>
                                <button data-toggle="tooltip" data-placement="top" title="Delete" class="btn btn-xs btn-danger js_admin-deleter" data-handle="upload_type" data-id="<?php echo htmlspecialchars($_smarty_tpl->tpl_vars['upload_type']->value['upload_type_id'], ENT_QUOTES, 'UTF-8');?>
">
                                    <i class="fa fa-trash-alt"></i>
                                </button>
                            <?php }?>
                            <button type="button" data-toggle="modal" data-url="#editUploadTypeModal" data-size="small" data-options='<?php echo call_user_func_array($_smarty_tpl->registered_plugins[ 'modifier' ][ 'json_encode' ][ 0 ], array( $_smarty_tpl->tpl_vars['upload_type']->value ));?>
' class="btn btn-xs btn-info">
                                <i class="fa fa-pencil-alt"></i>
                            </button>
                        </td>
                    </tr>
                <?php
}
}
$_smarty_tpl->smarty->ext->_foreach->restore($_smarty_tpl, 1);?>
            </tbody>
        </table>

        <?php echo $_smarty_tpl->tpl_vars['pager']->value;?>

    </div>
<?php } else { ?>
    <div class="text-center x-muted"> 
        <img class="mb20" width="15%" src="/static/images/no_results.png">
        <p class="mb10"><strong>No upload types to show</strong></p>
    </div>
<?php }?>

<!-- Add Upload Type -->
<?php echo '<script'; ?>
 id="addUploadTypeModal" type="text/template">
    <form class="js_ajax-forms p0 m0" data-url="/preferences?do=addUploadType" method="POST" autocomplete="off">
        <div class="modal-header">
            <h5 class="modal-title">Add Upload Type</h5>
            <span class="modal-close" data-dismiss="modal" aria-label="Close">
                <i class="fa fa-times"></i>
            </span>
        </div>

        <div class="modal-body">
            <div class="form-group">
                <label class="control-label">Title</label>
                <input name="title" type="text" class="form-control">
            </div>

            <div class="form-table-row"> 
                <div> 
                    <div class="form-control-label h5">Customer</div> 
                    <div class="form-text d-none d-sm-block">Show this option to customers</div> 
                </div> 
                <div class="text-right"> 
                    <label class="switch" for="customer"> 
                        <input type="checkbox" name="customer" id="customer"> 
                        <span class="slider round"></span> 
                    </label> 
                </div> 
            </div>

            <div class="form-table-row"> 
                <div> 
                    <div class="form-control-label h5">Writer</div> 
                    <div class="form-text d-none d-sm-block">Show this option to writers</div> 
                </div> 
                <div class="text-right"> 
                    <label class="switch" for="writer"> 
                        <input type="checkbox" name="writer" id="writer"> 
                        <span class="slider round"></span> 
                    </label> 
                </div> 
            </div>

            <div class="form-table-row mb10"> 
                <div> 
                    <div class="form-control-label h5">Editor</div> 
                    <div class="form-text d-none d-sm-block">Show this option to editors</div> 
                </div> 
                <div class="text-right"> 
                    <label class="switch" for="editor"> 
                        <input type="checkbox" name="editor" id="editor"> 
                        <span class="slider round"></span> 
                    </label> 
                </div> 
            </div>

            <!-- success -->
            <div class="alert alert-success mt10 x-hidden" role="alert"></div>
            <!-- success -->

            <!-- error -->
            <div class="alert alert-danger mt10 x-hidden" role="alert"></div>
            <!-- error -->
        </div>
        
        <div class="modal-footer">
            <button type="button" class="btn btn-default" data-dismiss="modal">Cancel</button>
            <button type="submit" class="btn btn-info" id="modal-confirm-ok">Add Upload Type</button>
        </div>
    </form>
<?php echo '</script'; ?>
>
<!-- Add Upload Type -->

<!-- Edit Upload Type -->
<?php echo '<script'; ?>
 id="editUploadTypeModal" type="text/template">
    <form class="js_ajax-forms p0 m0" data-url="/preferences?do=editUploadType" method="POST" autocomplete="off">
        <input type="hidden" name="upload_type_id" value="{{upload_type_id}}">
        <div class="modal-header">
            <h5 class="modal-title">Edit Upload Type</h5>
            <span class="modal-close" data-dismiss="modal" aria-label="Close">
                <i class="fa fa-times"></i>
            </span>
        </div>

        <div class="modal-body">
            <div class="form-group">
                <label class="control-label">Title</label>
                <input name="title" type="text" class="form-control" value="{{title}}">
            </div>

            <div class="form-table-row"> 
                <div> 
                    <div class="form-control-label h5">Customer</div> 
                    <div class="form-text d-none d-sm-block">Show this option to customers</div> 
                </div> 
                <div class="text-right"> 
                    <label class="switch" for="customer"> 
                        <input type="checkbox" name="customer" id="customer" {{#customer}}checked=""{{/customer}}> 
                        <span class="slider round"></span> 
                    </label> 
                </div> 
            </div>

            <div class="form-table-row"> 
                <div> 
                    <div class="form-control-label h5">Writer</div> 
                    <div class="form-text d-none d-sm-block">Show this option to writers</div> 
                </div> 
                <div class="text-right"> 
                    <label class="switch" for="writer"> 
                        <input type="checkbox" name="writer" id="writer" {{#writer}}checked=""{{/writer}}> 
                        <span class="slider round"></span> 
                    </label> 
                </div> 
            </div>

            <div class="form-table-row mb10"> 
                <div> 
                    <div class="form-control-label h5">Editor</div> 
                    <div class="form-text d-none d-sm-block">Show this option to editors</div> 
                </div> 
                <div class="text-right"> 
                    <label class="switch" for="editor"> 
                        <input type="checkbox" name="editor" id="editor" {{#editor}}checked=""{{/editor}}> 
                        <span class="slider round"></span> 
                    </label> 
                </div> 
            </div>

            <!-- success -->
            <div class="alert alert-success mt10 x-hidden" role="alert"></div>
            <!-- success -->

            <!-- error -->
            <div class="alert alert-danger mt10 x-hidden" role="alert"></div>
            <!-- error -->
        </div>
        
        <div class="modal-footer">
            <button type="button" class="btn btn-default" data-dismiss="modal">Cancel</button>
            <button type="submit" class="btn btn-info" id="modal-confirm-ok">Save Changes</button>
        </div>
    </form>
<?php echo '</script'; ?>
>
<!-- Edit Upload Type --><?php }
}
