<?php
/* Smarty version 4.5.6, created on 2025-12-20 15:57:35
  from '/var/www/html/tivi/panel/templates/admin/updates.tpl' */

/* @var Smarty_Internal_Template $_smarty_tpl */
if ($_smarty_tpl->_decodeProperties($_smarty_tpl, array (
  'version' => '4.5.6',
  'unifunc' => 'content_6946b95f361440_07666571',
  'has_nocache_code' => false,
  'file_dependency' => 
  array (
    'f62bed78c181324393b4294f63b9305698b16db3' => 
    array (
      0 => '/var/www/html/tivi/panel/templates/admin/updates.tpl',
      1 => 1766242412,
      2 => 'file',
    ),
  ),
  'includes' => 
  array (
  ),
),false)) {
function content_6946b95f361440_07666571 (Smarty_Internal_Template $_smarty_tpl) {
$_smarty_tpl->_loadInheritance();
$_smarty_tpl->inheritance->init($_smarty_tpl, true);
?>


<?php 
$_smarty_tpl->inheritance->instanceBlock($_smarty_tpl, 'Block_6418200056946b95f35cab3_98949189', "content");
?>

<?php $_smarty_tpl->inheritance->endChild($_smarty_tpl, "layout.tpl");
}
/* {block "content"} */
class Block_6418200056946b95f35cab3_98949189 extends Smarty_Internal_Block
{
public $subBlocks = array (
  'content' => 
  array (
    0 => 'Block_6418200056946b95f35cab3_98949189',
  ),
);
public function callBlock(Smarty_Internal_Template $_smarty_tpl) {
?>

<div class="container-fluid">
    <div class="d-flex justify-content-between align-items-center mb-4">
        <div>
            <h4 class="mb-1">Aktualizacje</h4>
            <p class="text-muted mb-0">Sprawdź dostępność nowych wersji</p>
        </div>
    </div>

    <div class="row">
        <div class="col-lg-6">
            <div class="card mb-4">
                <div class="card-header">
                    <h5 class="card-title mb-0"><i class="bi bi-info-circle me-2"></i>Aktualna wersja</h5>
                </div>
                <div class="card-body">
                    <div class="d-flex align-items-center">
                        <div class="display-4 text-primary me-3">
                            <i class="bi bi-box-seam"></i>
                        </div>
                        <div>
                            <h2 class="mb-0">v<?php echo $_smarty_tpl->tpl_vars['currentVersion']->value;?>
</h2>
                            <p class="text-muted mb-0">Zainstalowana wersja systemu</p>
                        </div>
                    </div>
                </div>
            </div>
            
            <?php if ($_smarty_tpl->tpl_vars['updateAvailable']->value) {?>
            <div class="card border-success mb-4">
                <div class="card-header bg-success text-white">
                    <h5 class="card-title mb-0"><i class="bi bi-download me-2"></i>Dostępna aktualizacja!</h5>
                </div>
                <div class="card-body">
                    <div class="d-flex align-items-center mb-3">
                        <div class="display-4 text-success me-3">
                            <i class="bi bi-arrow-up-circle"></i>
                        </div>
                        <div>
                            <h2 class="mb-0 text-success">v<?php echo $_smarty_tpl->tpl_vars['latestVersion']->value['version'];?>
</h2>
                            <p class="text-muted mb-0">
                                Data wydania: <?php echo $_smarty_tpl->tpl_vars['latestVersion']->value['release_date'];?>

                            </p>
                        </div>
                    </div>
                    <div class="alert alert-info">
                        <i class="bi bi-info-circle me-2"></i>
                        Aby zaktualizować system, pobierz najnowszą wersję z repozytorium i zastąp pliki.
                    </div>
                </div>
            </div>
            <?php } else { ?>
            <div class="card border-success mb-4">
                <div class="card-body text-center py-4">
                    <i class="bi bi-check-circle text-success" style="font-size: 3rem;"></i>
                    <h4 class="mt-3 text-success">System aktualny!</h4>
                    <p class="text-muted mb-0">Masz zainstalowaną najnowszą wersję.</p>
                </div>
            </div>
            <?php }?>
        </div>
        
        <div class="col-lg-6">
            <div class="card">
                <div class="card-header">
                    <h5 class="card-title mb-0"><i class="bi bi-journal-text me-2"></i>Historia zmian</h5>
                </div>
                <div class="card-body p-0">
                    <div class="accordion" id="changelogAccordion">
                        <?php
$_from = $_smarty_tpl->smarty->ext->_foreach->init($_smarty_tpl, $_smarty_tpl->tpl_vars['changelog']->value, 'changes', false, 'version');
$_smarty_tpl->tpl_vars['changes']->index = -1;
$_smarty_tpl->tpl_vars['changes']->do_else = true;
if ($_from !== null) foreach ($_from as $_smarty_tpl->tpl_vars['version']->value => $_smarty_tpl->tpl_vars['changes']->value) {
$_smarty_tpl->tpl_vars['changes']->do_else = false;
$_smarty_tpl->tpl_vars['changes']->index++;
$_smarty_tpl->tpl_vars['changes']->first = !$_smarty_tpl->tpl_vars['changes']->index;
$__foreach_changes_0_saved = $_smarty_tpl->tpl_vars['changes'];
?>
                        <div class="accordion-item">
                            <h2 class="accordion-header">
                                <button class="accordion-button <?php if (!$_smarty_tpl->tpl_vars['changes']->first) {?>collapsed<?php }?>" type="button" 
                                        data-bs-toggle="collapse" 
                                        data-bs-target="#changelog-<?php echo $_smarty_tpl->tpl_vars['changes']->index;?>
">
                                    <span class="badge bg-primary me-2">v<?php echo $_smarty_tpl->tpl_vars['version']->value;?>
</span>
                                    <?php if ($_smarty_tpl->tpl_vars['version']->value == $_smarty_tpl->tpl_vars['currentVersion']->value) {?>
                                    <span class="badge bg-success">Zainstalowana</span>
                                    <?php }?>
                                </button>
                            </h2>
                            <div id="changelog-<?php echo $_smarty_tpl->tpl_vars['changes']->index;?>
" 
                                 class="accordion-collapse collapse <?php if ($_smarty_tpl->tpl_vars['changes']->first) {?>show<?php }?>"
                                 data-bs-parent="#changelogAccordion">
                                <div class="accordion-body">
                                    <ul class="mb-0">
                                        <?php
$_from = $_smarty_tpl->smarty->ext->_foreach->init($_smarty_tpl, $_smarty_tpl->tpl_vars['changes']->value, 'change');
$_smarty_tpl->tpl_vars['change']->do_else = true;
if ($_from !== null) foreach ($_from as $_smarty_tpl->tpl_vars['change']->value) {
$_smarty_tpl->tpl_vars['change']->do_else = false;
?>
                                        <li><?php echo $_smarty_tpl->tpl_vars['change']->value;?>
</li>
                                        <?php
}
$_smarty_tpl->smarty->ext->_foreach->restore($_smarty_tpl, 1);?>
                                    </ul>
                                </div>
                            </div>
                        </div>
                        <?php
$_smarty_tpl->tpl_vars['changes'] = $__foreach_changes_0_saved;
}
$_smarty_tpl->smarty->ext->_foreach->restore($_smarty_tpl, 1);?>
                    </div>
                </div>
            </div>
        </div>
    </div>
</div>
<?php
}
}
/* {/block "content"} */
}
