<?php
/* Smarty version 3.1.33, created on 2022-10-31 23:45:22
  from '/home/responsi/writers19.com/content/themes/dashboard/customize/paperFormats.tpl' */

/* @var Smarty_Internal_Template $_smarty_tpl */
if ($_smarty_tpl->_decodeProperties($_smarty_tpl, array (
  'version' => '3.1.33',
  'unifunc' => 'content_63605e125e04e0_09241181',
  'has_nocache_code' => false,
  'file_dependency' => 
  array (
    'be4384211609eaba4f060aed55f9047a66f2b689' => 
    array (
      0 => '/home/responsi/writers19.com/content/themes/dashboard/customize/paperFormats.tpl',
      1 => 1656689818,
      2 => 'file',
    ),
  ),
  'includes' => 
  array (
  ),
),false)) {
function content_63605e125e04e0_09241181 (Smarty_Internal_Template $_smarty_tpl) {
if (count($_smarty_tpl->tpl_vars['paper_formats']->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>Actions</th>
                </tr>
            </thead>
            <tbody>
                <?php
$_from = $_smarty_tpl->smarty->ext->_foreach->init($_smarty_tpl, $_smarty_tpl->tpl_vars['paper_formats']->value, 'paper_format');
if ($_from !== null) {
foreach ($_from as $_smarty_tpl->tpl_vars['paper_format']->value) {
?>
                    <tr>
                        <td><?php echo htmlspecialchars($_smarty_tpl->tpl_vars['paper_format']->value['paper_format_id'], ENT_QUOTES, 'UTF-8');?>
</td>
                        <td><?php echo htmlspecialchars($_smarty_tpl->tpl_vars['paper_format']->value['title'], ENT_QUOTES, 'UTF-8');?>
</td>
                        <td width="200px">
                            <?php if ($_smarty_tpl->tpl_vars['paper_format']->value['paper_format_id'] != '4') {?>
                                <button data-toggle="tooltip" data-placement="top" title="Delete" class="btn btn-xs btn-danger js_admin-deleter" data-handle="paper_format" data-id="<?php echo htmlspecialchars($_smarty_tpl->tpl_vars['paper_format']->value['paper_format_id'], ENT_QUOTES, 'UTF-8');?>
">
                                    <i class="fa fa-trash-alt"></i>
                                </button>
                            <?php }?>
                            <button type="button" data-toggle="modal" data-url="#editPaperFormatModal" data-size="small" data-options='<?php echo call_user_func_array($_smarty_tpl->registered_plugins[ 'modifier' ][ 'json_encode' ][ 0 ], array( $_smarty_tpl->tpl_vars['paper_format']->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 paper formats to show</strong></p>
    </div>
<?php }?>

<!-- Add Paper Format -->
<?php echo '<script'; ?>
 id="addPaperFormatModal" type="text/template">
    <form class="js_ajax-forms p0 m0" data-url="/preferences?do=addPaperFormat" method="POST" autocomplete="off">
        <div class="modal-header">
            <h5 class="modal-title">Add Paper Format</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" required>
            </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 Paper Format</button>
        </div>
    </form>
<?php echo '</script'; ?>
>
<!-- Add Paper Format -->

<!-- Edit Paper Format -->
<?php echo '<script'; ?>
 id="editPaperFormatModal" type="text/template">
    <form class="js_ajax-forms p0 m0" data-url="/preferences?do=editPaperFormat" method="POST" autocomplete="off">
        <input type="hidden" name="paper_format_id" value="{{paper_format_id}}">
        <div class="modal-header">
            <h5 class="modal-title">Edit Paper Format</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}}" required>
            </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 Paper Format --><?php }
}
