{strip} {* install_unavailable: shown near install links/buttons when installer is not accessible *} {if $install_pkg_accessible} {capture assign=install_unavailable}{/capture} {else} {capture assign=install_unavailable}

{tr}Installer not accessible — to install or upgrade packages, symlink the install directory into the web root, then reload this page.{/tr}

{/capture} {/if} {assign var=pageName value="kernel_`$page`"} {form class=$pageName|replace:'packages':'pkg'} {jstabs} {if $upgradable} {jstab title="Upgradable"} {legend legend="Upgradable packages"}

{biticon class="img-responsive" iname="large/dialog-warning" iexplain="Warning"} {tr}You seem to have at least one package that can be upgraded.{/tr} {if $install_pkg_accessible} {tr}We recommend you visit the installer now.{/tr} {else} {tr}Make the installer accessible to proceed with upgrades.{/tr} {/if}

{foreach from=$upgradable item=package key=name}
{forminput} {formhelp note=$package.info|default:'Missing'} {/forminput}
{/foreach} {/legend} {/jstab} {/if} {jstab title="Installed"} {legend legend="Packages installed on your system"}

{tr}Packages with checkmarks are currently enabled, packages without are disabled. To enable or disable a package, check or uncheck it, and click the 'Modify Activation' button.{/tr} {if $install_pkg_accessible} {tr}To uninstall or reinstall a package, visit the installer.{/tr} {else} {tr}You will need to enable the installer to manage packages.{/tr} {/if}

{$install_unavailable}
{foreach key=name item=package from=$gBitSystem->mPackages} {if $package.installed|default:false && !$package.service|default:false && !$package.required|default:true }
{forminput} {formhelp note=$package.info|default:'Missing' package=$name} {/forminput}
{/if} {/foreach}
{/legend} {legend legend="Services installed on your system"}

A service package is a package that allows you to extend the way you display bitweaver content - such as categorising your content. Activating more than one of any service type might lead to conflicts.
We therefore recommend that you enable only one of each service type.

{foreach key=name item=package from=$gBitSystem->mPackages} {if $package.installed && !empty($package.service) && !$package.required|default:false}
{if !$package.required|default:false}{/if}
{forminput} {formhelp note=$package.info|default:'Missing' package=$name} {/forminput}
{/if} {/foreach}
{/legend}
{/jstab} {jstab title="Required"} {legend legend="Required packages installed on your system"}
{foreach key=name item=package from=$gBitSystem->mPackages} {if $package.installed && !$package.service && $package.required|default:false }
{biticon class="img-responsive" ipackage=$name iname="pkg_`$name`" iexplain="$name" iforce=icon}
{forminput} {$name|capitalize} {formhelp note=$package.info|default:'Missing' package=$name} {/forminput}
{/if} {/foreach}
{/legend} {legend legend="Required services installed on your system"}
{foreach key=name item=package from=$gBitSystem->mPackages} {if $package.installed && !empty($package.service) && $package.required|default:false}
{biticon class="img-responsive" ipackage=$name iname="pkg_`$name`" iexplain="$name" iforce=icon}
{forminput} {formhelp note=$package.info|default:'Missing' package=$name} {/forminput}
{/if} {/foreach}
{/legend} {/jstab} {if !empty($requirementsMap) || !empty($requirements)} {jstab title="Dependencies"} {legend legend="Requirements"} {if !empty($requirementsMap)}

{tr}Below you will find an illustration of how packages depend on each other.{/tr}

{tr}A graphical representation of package requirements{/tr} {$requirementsMap}
{/if} {if !empty($requirements)}

{tr}Below you will find a detailed table with package requirements. If not all package requirements are met, consider trying to meet all package requirements. If you don't meet them, you may continue at your own peril.{/tr}

{foreach from=$requirements item=dep} {if $pkg != $dep.package} {assign var=pkg value=$dep.package} {/if} {if $dep.result == 'ok'} {assign var=class value=success} {elseif $dep.result == 'missing'} {assign var=class value=error} {elseif $dep.result == 'min_dep'} {assign var=class value=error} {elseif $dep.result == 'max_dep'} {assign var=class value=warning} {/if} {/foreach}
Package Requirements
Requirement Min Version Max Version Available Result
{$dep.package|ucfirst} requirements
{$dep.requires|ucfirst} {$dep.required_version.min} {$dep.required_version.max|default:''} {$dep.required_version.available|default:''} {if $dep.result == 'ok'} OK {elseif $dep.result == 'missing'} Package not installed or not activated {assign var=missing value=true} {elseif $dep.result == 'min_dep'} Minimum version not met {assign var=min_dep value=true} {elseif $dep.result == 'max_dep'} Maximum version exceeded {assign var=max_dep value=true} {/if}
{if $missing} {formfeedback warning="At least one required package is missing. Please activate or install the missing package." link="install/install.php?step=3/Install Package"} {/if} {if $min_dep} {formfeedback warning="At least one package did not meet the minimum version requirement. If possible, please upgrade to a newer version."} {/if} {if $max_dep} {formfeedback warning="At least one package recommend a version lower to the one you have installed. This might cause problems."} {/if} {if !$min_dep && !$max_dep && !$missing} {formfeedback success="All package requirements have been met."} {/if} {/if} {/legend} {/jstab} {/if} {jstab title="Not Installed"} {legend legend="bitweaver packages available for installation"} {if $install_pkg_accessible}

{tr}Install Packages{/tr}

{else}

{tr}Install Packages{/tr}

{$install_unavailable} {/if}
{foreach key=name item=package from=$gBitSystem->mPackages} {if ((1 || $package.tables) && !$package.required|default:false && !$package.installed|default:false) }
{biticon class="img-responsive" ipackage=$name iname="pkg_`$name`" iexplain="$name" iforce=icon}
{forminput} {$name|capitalize} {formhelp note=$package.info|default:'Missing' package=$name} {/forminput}
{/if} {/foreach} {/legend} {/jstab} {/jstabs} {/form} {/strip}