<table width=100% cellpadding=0 cellspacing=0 border=0>
    <tr>
        <td valign=top width=25%>
            <table width=100% cellpadding=4 cellspacing=0 border=0 style="border-collapse: collapse;">
                <tr><th colspan=2>$action.getText("installed.libraries")</th></tr>

                #foreach ($library in $action.libraries)
                    #set ($libraryEnabled = false)
                    #if ($action.isLibraryEnabled($library.key))
                        #set ($libraryEnabled = true)
                    #end

                    ## separate the confluence user macro library into it's own section
                    #if ($library.key == "confluence.user")
                        <tr><th colspan=2><br>$action.getText("user.library")</th></tr>
                    #end

                    <tr>
                    #if ($library.key == $selectedLibrary.key)
                        <td style="border-width: 1px 0 1px 1px; border-style: solid; border-color: #ccc; background: #f0f0f0;" colspan=2>
                    #else
                        <td width=1><img src="$staticResourceUrlPrefix/images/border/spacer.gif" height=1 width=1></td>
                        <td style="border-width: 1px 0 1px 1px; border-style: solid; border-color: #ccc; background: #fff;">
                    #end

                    #if (!$libraryEnabled)
                        <div style="color: #666;">
                    #end

                    #if ($selectedLibrary.key == $library.key)<strong>#end
                    <a href="macrolibraries.action?library=$generalUtil.urlEncode($library.key)" #if (!$libraryEnabled) style="color: #666666;" #end>$library.name</a><br>
                    #if ($libraryEnabled)
                        <span class="smallfont">
                            #set ($numEnabled = $action.numEnabled($library))
                            #if ($numEnabled == 0)
                                $action.getText("no.macros.enabled")
                            #elseif ($numEnabled == $library.macros.size())
                                $action.getText("all.macros.enabled")
                            #else
                                $numEnabled of $library.macros.size() $action.getText("macros.enabled")
                            #end

                            #if ($library.key == "confluence.user")
                                <br>
                                <img src="$staticResourceUrlPrefix/images/icons/bullet_creme_6.gif" height="6" width="6"  border="0" alt=""/>
                                <a href="addusermacro-start.action?library=$generalUtil.urlEncode($selectedLibrary.key)">New user macro</a>
                            #end
                        </span>
                    #else
                        <span class="smalltext">$action.getText("library.disabled")</span>
                    #end
                    #if ($selectedLibrary == $library)</strong>#end
                    <br>

                    #if (!$libraryEnabled)</div>#end
                    </td></tr>
                #end
                <tr><td colspan=2>&nbsp;</td></tr>
            </table>
        </td>
    <td width=75% style="border: 1px solid #ccc;" valign=top>
        $body
    </td>
    </tr>

</table>