<%@ page language="java" buffer="100kb" errorPage="/common/error.jsp"%>

<%@ taglib uri="struts-html" prefix="html"%>
<%@ taglib uri="struts-bean" prefix="bean"%>
<%@ taglib uri="struts-logic" prefix="logic"%>
<%@ taglib uri="vkc-taglib" prefix="vkc"%>
<%@ page import="vkc.view.TabId"%>
<vkc:checkLogin />
<vkc:init />
<html:html locale="true">
<head>
	<vkc:cssinclude />

	<meta http-equiv="content-type" content="text/html; charset=iso-8859-1" />
    <script type="text/javascript" src="<vkc:rewrite page='/common/utils.js'/>"></script>

    <script type="text/javascript">
    window.name = "MAINVIEW";
    var aclform = null;
    var associatedTabId = <%=TabId.ADMIN_LICENSE_TAB%>;

    function init() {
        var tabView = getTabView();
        var tabViewForm = tabView.document.forms[0];

        if (tabView && tabView.systemviewtype == "administrationview" && tabView.selectedTabId != associatedTabId) {
            tabView.location.replace("<%=ctxPath%>/adminTabView.do?selectedTabId=<%=TabId.ADMIN_LICENSE_TAB%>"
          						   + "&lastCategoryId=" + tabViewForm.lastCategoryId.value
          						   + "&lastFunctionalId=" + tabViewForm.lastFunctionalId.value
          						   + "&lastProjectId=" + tabViewForm.lastProjectId.value);
        }
        
        setAnchor();
	}

    function setAnchor() {
        <logic:present parameter="anchor">
        <bean:parameter id="anchor2" name="anchor"/>
        this.location.hash = '<%=anchor2%>';
        </logic:present>
    }
	
	function showLicense(id) {
        var form = document.forms[0];
        form.selectedId.value = id;

        if (form.action.indexOf('?') == -1) {
          form.action = form.action + "?action.show.license=true";
        } else {
          form.action = form.action + "&action.show.license=true";
        }

        form.submit();
    }
    
    function hideLicense(id) {
        var form = document.forms[0];
        form.selectedId.value = id;

        if (form.action.indexOf('?') == -1) {
          form.action = form.action + "?action.hide.license=true";
        } else {
          form.action = form.action + "&action.hide.license=true";
        }

        form.submit();
    }
	
	function showLicenseLanguage(id, lid) {
        var form = document.forms[0];
        form.selectedId.value = id;
        form.selectedLanguageId.value = lid;

        if (form.action.indexOf('?') == -1) {
          form.action = form.action + "?action.show.license.language=true";
        } else {
          form.action = form.action + "&action.show.license.language=true";
        }

        form.submit();
    }
    
    function hideLicenseLanguage(id, lid) {
        var form = document.forms[0];
        form.selectedId.value = id;
        form.selectedLanguageId.value = lid;
        
        if (form.action.indexOf('?') == -1) {
          form.action = form.action + "?action.hide.license.language=true";
        } else {
          form.action = form.action + "&action.hide.license.language=true";
        }
        
        form.submit();
    }

    function checkAll( mForm ) {
        for(var i=0 ; i<mForm.elements.length ; i++){
            var elem = mForm.elements[i];
            if(elem.name!='allItems') {
                elem.checked=mForm.allItems.checked;
            }
        }
    }

    function getNumberOfCheckedEntries() {
        var form  = document.forms[ 0 ];
        var field = form.selectedIds;

        if (!field) {
            return 0;
        }
        
        if (!field.length) {
            <%-- nur eine Checkbox auf der Seite --%>
            if (field.checked) {
                return 1;
            } else {
                return 0;
            }
        }

        var checked = 0;
        
        for (var i=0; i < field.length; i++) {
            if (field[i].checked) {
                checked++;
            }
        }
        
        return checked;
    }

    function modifyLicenses(elem) {
        var form = document.forms[0];
        var field = form.selectedCmdAction.value;

        if (field == "noaction" || field == "noaction1") {
               alert('<vkc:message javascript="true" filter="false" key="error.noaction_choosen"/>');
               
               return false;
        }

        if (field == "delete.licenses") {
            deleteLicenses(elem);
        }

        if (field == "activate.license") {
            activateLicense(elem);
        }
    }

    function deleteLicenses(elem) {
        var numChecked = getNumberOfCheckedEntries();

        if (numChecked == 0) {
            alert('<vkc:message javascript="true" filter="false" key="error.noitem_checked"/>');
            
            return;
        }

        if (!confirm('<vkc:message javascript="true" filter="false" key="vkc.administration.license.confirm.delete"/>')) {
            return;
        }
        
        var form  = document.forms[0];

        if (form.action.indexOf('?') == -1) {
          form.action = form.action + "?action.delete.licenses=true";
        } else {
          form.action = form.action + "&action.delete.licenses=true";
        }

        disableAllButtons(elem);
        form.submit();
    }

    function activateLicense(elem) {
        var numChecked = getNumberOfCheckedEntries();

        if (numChecked == 0) {
            alert('<vkc:message javascript="true" filter="false" key="error.noitem_checked"/>');
            
            return;
        }

        if (numChecked > 1) {
            alert('<vkc:message javascript="true" filter="false" key="vkc.administration.license.select.onlyone"/>');
            
            return;
        }

        if (!confirm('<vkc:message javascript="true" filter="false" key="vkc.administration.license.confirm.activate"/>')) {
            return;
        }
        
        var form  = document.forms[0];

        if (form.action.indexOf('?') == -1) {
          form.action = form.action + "?action.activate.license=true";
        } else {
          form.action = form.action + "&action.activate.license=true";
        }

        disableAllButtons(elem);
        form.submit();
    }
    </script>
</head>
<body onload="init();" topmargin="0" marginheight="0">
<table align='center' width='100%' cellspacing='0' cellpadding='0' border='0'>
  <tr>
    <td nowrap width="100%" align="right"><vkc:link page="/newLicense.do" style="font-weight:bold;"><vkc:message key="vkc.administration.license.newlicense" /></vkc:link>&nbsp;&nbsp;</td>
  </tr>
</table>

<table cellspacing="0" cellpadding="0" border="0" width="100%">
  <html:form action="/licenseList" method="post">
  <bean:define id="form" name="licenseListForm" scope="request" type="vkc.administration.form.LicenseListForm" />
  <vkc:hidden name="form" property="selectedId" />
  <vkc:hidden name="form" property="selectedLanguageId" />
  <logic:iterate id="sid" name="form" property="showLicenses" type="java.lang.Integer">
    <html:hidden property="showLicenses" name="form" value='<%=String.valueOf(sid.toString())%>' />
  </logic:iterate>
  <logic:iterate id="slid" name="form" property="dynaKeys" type="java.lang.String">
    <html:hidden name="form" property='<%="dynaValue(" + slid + ")"%>' value="true" />
  </logic:iterate>
  <logic:iterate id="did" name="form" property="selectedIds" type="java.lang.Integer">
    <html:hidden property="selectedIds" name="form" value='<%=String.valueOf(did.toString())%>' />
  </logic:iterate>

  <logic:notEmpty name="form" property="licenses">
  <logic:iterate id="license" name="form" property="licenses" type="vkc.db.entities.VKCLicense">
  <bean:define id="licenseId" name="license" property="licenseId" type="java.lang.Integer"/>

  <logic:equal name="license" property="valid" value="true">
  <tr><td><vkc:img page="/templates/${template.name}/gfx/trans.gif" width="20" height="20" border="0" alt="" /></td></tr>

  <logic:equal name="form" property='<%= "showLicense[" + licenseId + "]" %>' value="false">
  <tr>
    <td valign="top"><html:multibox name="form" property="selectedIds" onfocus="this.blur();"><vkc:write name="license" property="licenseId"/></html:multibox></td>
    <td width="100%" colspan="15">
      <a name='<%= licenseId %>'></a>
      <table cellspacing="3" cellpadding="0" border="0" width="100%">
        <tr>
          <td align="left" valign="top" width="20" nowrap="nowrap">
            <vkc:link href='<%= "javascript:showLicense(" + licenseId + ");" %>'>
              <vkc:img page="/templates/${template.name}/gfx/plus-big.gif" border="0" titleKey="vkc.tooltip.show.license" />
            </vkc:link>
          </td>
          <td width="100%" colspan="20">
            <table cellspacing="3" cellpadding="0" border="0" width="100%">
              <tr>
                <logic:notEmpty name="license" property="validFrom">
                <td align="left" nowrap="nowrap"><b><vkc:message key="vkc.administration.license.validfrom" />:</b>&nbsp;</td>
                <td align="left" width="50%" nowrap="nowrap"><vkc:write name="license" property="validFrom" formatKey="date.medium.format" /></td>
                <td align="left" nowrap="nowrap"><b><vkc:message key="vkc.administration.license.created" />:</b>&nbsp;</td>
                <td align="left" width="50%" nowrap="nowrap"><vkc:write name="license" property="created" formatKey="date.medium.format" /></td>
                </logic:notEmpty>
                <logic:empty name="license" property="validFrom">
                <td align="left" nowrap="nowrap"><b><vkc:message key="vkc.administration.license.created" />:</b>&nbsp;</td>
                <td align="left" width="100%" colspan="3" nowrap="nowrap"><vkc:write name="license" property="created" formatKey="date.medium.format" /></td>
                </logic:empty>
              </tr>
              <tr>
                <logic:notEmpty name="license" property="validUntil">
                <td align="left" nowrap="nowrap"><b><vkc:message key="vkc.administration.license.validuntil" />:</b>&nbsp;</td>
                <td align="left" width="50%" nowrap="nowrap"><vkc:write name="license" property="validUntil" formatKey="date.medium.format" /></td>
                <td align="left" nowrap="nowrap"><b><vkc:message key="vkc.administration.license.creator" />:</b>&nbsp;</td>
                <td align="left" width="50%" nowrap="nowrap"><vkc:write name="license" property="creator.fullName"/></td>
                </logic:notEmpty>
                <logic:empty name="license" property="validUntil">
                <td align="left" nowrap="nowrap"><b><vkc:message key="vkc.administration.license.creator" />:</b>&nbsp;</td>
                <td align="left" width="100%" colspan="3" nowrap="nowrap"><vkc:write name="license" property="creator.fullName"/></td>
                </logic:empty>
              </tr>
            </table>
          </td>
        </tr>
      </table>
    </td>
  </tr>
  </logic:equal>

  <logic:equal name="form" property='<%= "showLicense[" + licenseId + "]" %>' value="true">
  <tr>
    <td valign="top"><html:multibox name="form" property="selectedIds" onfocus="this.blur();"><vkc:write name="license" property="licenseId"/></html:multibox></td>
    <td width="100%" colspan="15">
      <a name='<%= licenseId %>'></a>
      <table cellspacing="3" cellpadding="0" border="0" width="100%">
        <tr>
          <td align="left" valign="top" width="20" nowrap="nowrap">
            <vkc:link href='<%= "javascript:hideLicense(" + licenseId + ");" %>'>
              <vkc:img page="/templates/${template.name}/gfx/minus-big.gif" border="0" titleKey="vkc.tooltip.hide.license" />
            </vkc:link>
          </td>
          <td width="100%" colspan="20">
            <table cellspacing="3" cellpadding="0" border="0" width="100%">
              <tr>
                <logic:notEmpty name="license" property="validFrom">
                <td align="left" nowrap="nowrap"><b><vkc:message key="vkc.administration.license.validfrom" />:</b>&nbsp;</td>
                <td align="left" width="50%" nowrap="nowrap"><vkc:write name="license" property="validFrom" formatKey="date.medium.format" /></td>
                <td align="left" nowrap="nowrap"><b><vkc:message key="vkc.administration.license.created" />:</b>&nbsp;</td>
                <td align="left" width="50%" nowrap="nowrap"><vkc:write name="license" property="created" formatKey="date.medium.format" /></td>
                </logic:notEmpty>
                <logic:empty name="license" property="validFrom">
                <td align="left" nowrap="nowrap"><b><vkc:message key="vkc.administration.license.created" />:</b>&nbsp;</td>
                <td align="left" width="100%" colspan="3" nowrap="nowrap"><vkc:write name="license" property="created" formatKey="date.medium.format" /></td>
                </logic:empty>
              </tr>
              <tr>
                <logic:notEmpty name="license" property="validUntil">
                <td align="left" nowrap="nowrap"><b><vkc:message key="vkc.administration.license.validuntil" />:</b>&nbsp;</td>
                <td align="left" width="50%" nowrap="nowrap"><vkc:write name="license" property="validUntil" formatKey="date.medium.format" /></td>
                <td align="left" nowrap="nowrap"><b><vkc:message key="vkc.administration.license.creator" />:</b>&nbsp;</td>
                <td align="left" width="50%" nowrap="nowrap"><vkc:write name="license" property="creator.fullName"/></td>
                </logic:notEmpty>
                <logic:empty name="license" property="validUntil">
                <td align="left" nowrap="nowrap"><b><vkc:message key="vkc.administration.license.creator" />:</b>&nbsp;</td>
                <td align="left" width="100%" colspan="3" nowrap="nowrap"><vkc:write name="license" property="creator.fullName"/></td>
                </logic:empty>
              </tr>
              
              <tr>
                <td nowrap="nowrap" valign="top"><b><vkc:message key="vkc.administration.license.terms" />:</b>&nbsp;</td>
                <td width="100%" valign="top" colspan="3">
                  <table cellspacing="3" cellpadding="0" border="0" width="100%">
                    <logic:iterate id="language" indexId="index" name="form" property="languages" type="vkc.db.entities.VKCLanguage">
                    <tr>
                      <td>&nbsp;</td>
                      <td width="100%" colspan="3">
                        <a name='<%= licenseId + "_" + language.getLanguageId() %>'></a>
                        <table cellspacing="3" cellpadding="0" border="0" width="100%">
                          <tr>
                            <td align="left" valign="top" nowrap="nowrap">
                              <logic:equal name="form" property='<%= "showLicenseLanguage(" + licenseId + "_" + language.getLanguageId() + ")" %>' value="false">
                              <vkc:link href='<%= "javascript:showLicenseLanguage(" + licenseId + "," + language.getLanguageId() + ");" %>'>
                                <vkc:img page="/templates/${template.name}/gfx/plus-big.gif" border="0" titleKey="vkc.tooltip.show.license.language" />
                              </vkc:link>
                              </logic:equal>
                              <logic:equal name="form" property='<%= "showLicenseLanguage(" + licenseId + "_" + language.getLanguageId() + ")" %>' value="true">
                              <vkc:link href='<%= "javascript:hideLicenseLanguage(" + licenseId + "," + language.getLanguageId() + ");" %>'>
                                <vkc:img page="/templates/${template.name}/gfx/minus-big.gif" border="0" titleKey="vkc.tooltip.hide.license.language" />
                              </vkc:link>
                              </logic:equal>
                            </td>
                            <td align="left" nowrap="nowrap" valign="top"><b><vkc:message name="language" property="name_key" /></b>&nbsp;</td>
                            <td width="100%">&nbsp;</td>
                          </tr>
                          <logic:equal name="form" property='<%= "showLicenseLanguage(" + licenseId + "_" + language.getLanguageId() + ")" %>' value="true">
                          <tr>
                            <td width="100%" colspan="3" class="color_doctitle">
                              <logic:equal name="form" property="tinyMCECompatible" value="true">
                              <vkc:write name="license" property='<%="license[" + language.getLanguageId() + "]"%>' displayAsHTML="true" renderNewLine="true" />
                              </logic:equal>
                              <logic:equal name="form" property="tinyMCECompatible" value="false">
                              <vkc:write name="license" property='<%="license[" + language.getLanguageId() + "]"%>' stripHTML="true" renderNewLine="true" />
                              </logic:equal>
                            </td>
                          </tr>
                          </logic:equal>
                        </table>
                      </td>
                    </tr>
                    </logic:iterate>
                  </table>                    
                </td>
              </tr>
            </table>
          </td>
        </tr>
      </table>
    </td>
  </tr>
  </logic:equal>
  </logic:equal>

  <logic:equal name="license" property="valid" value="false">
  <tr><td><vkc:img page="/templates/${template.name}/gfx/trans.gif" width="20" height="20" border="0" alt="" /></td></tr>

  <logic:equal name="form" property='<%= "showLicense[" + licenseId + "]" %>' value="false">
  <tr>
    <td valign="top"><html:multibox name="form" property="selectedIds" onfocus="this.blur();"><vkc:write name="license" property="licenseId"/></html:multibox></td>
    <td width="100%" colspan="15">
      <a name='<%= licenseId %>'></a>
      <table cellspacing="3" cellpadding="0" border="0" width="100%">
        <tr>
          <td align="left" valign="top" width="20" nowrap="nowrap">
            <vkc:link href='<%= "javascript:showLicense(" + licenseId + ");" %>'>
              <vkc:img page="/templates/${template.name}/gfx/plus-big.gif" border="0" titleKey="vkc.tooltip.show.license" />
            </vkc:link>
          </td>
          <td width="100%" colspan="20">
            <table cellspacing="3" cellpadding="0" border="0" width="100%">
              <tr>
                <logic:notEmpty name="license" property="validFrom">
                <td align="left" nowrap="nowrap" style="color:#aaaaaa"><b><vkc:message key="vkc.administration.license.validfrom" />:</b>&nbsp;</td>
                <td align="left" width="50%" nowrap="nowrap" style="color:#aaaaaa"><vkc:write name="license" property="validFrom" formatKey="date.medium.format" /></td>
                <td align="left" nowrap="nowrap" style="color:#aaaaaa"><b><vkc:message key="vkc.administration.license.created" />:</b>&nbsp;</td>
                <td align="left" width="50%" nowrap="nowrap" style="color:#aaaaaa"><vkc:write name="license" property="created" formatKey="date.medium.format" /></td>
                </logic:notEmpty>
                <logic:empty name="license" property="validFrom">
                <td align="left" nowrap="nowrap" style="color:#aaaaaa"><b><vkc:message key="vkc.administration.license.created" />:</b>&nbsp;</td>
                <td align="left" width="100%" colspan="3" nowrap="nowrap" style="color:#aaaaaa"><vkc:write name="license" property="created" formatKey="date.medium.format" /></td>
                </logic:empty>
              </tr>
              <tr>
                <logic:notEmpty name="license" property="validUntil">
                <td align="left" nowrap="nowrap" style="color:#aaaaaa"><b><vkc:message key="vkc.administration.license.validuntil" />:</b>&nbsp;</td>
                <td align="left" width="50%" nowrap="nowrap" style="color:#aaaaaa"><vkc:write name="license" property="validUntil" formatKey="date.medium.format" /></td>
                <td align="left" nowrap="nowrap" style="color:#aaaaaa"><b><vkc:message key="vkc.administration.license.creator" />:</b>&nbsp;</td>
                <td align="left" width="50%" nowrap="nowrap" style="color:#aaaaaa"><vkc:write name="license" property="creator.fullName"/></td>
                </logic:notEmpty>
                <logic:empty name="license" property="validUntil">
                <td align="left" nowrap="nowrap" style="color:#aaaaaa"><b><vkc:message key="vkc.administration.license.creator" />:</b>&nbsp;</td>
                <td align="left" width="100%" colspan="3" nowrap="nowrap" style="color:#aaaaaa"><vkc:write name="license" property="creator.fullName"/></td>
                </logic:empty>
              </tr>
            </table>
          </td>
        </tr>
      </table>
    </td>
  </tr>
  </logic:equal>

  <logic:equal name="form" property='<%= "showLicense[" + licenseId + "]" %>' value="true">
  <tr>
    <td valign="top"><html:multibox name="form" property="selectedIds" onfocus="this.blur();"><vkc:write name="license" property="licenseId"/></html:multibox></td>
    <td width="100%" colspan="15">
      <a name='<%= licenseId %>'></a>
      <table cellspacing="3" cellpadding="0" border="0" width="100%">
        <tr>
          <td align="left" valign="top" width="20" nowrap="nowrap">
            <vkc:link href='<%= "javascript:hideLicense(" + licenseId + ");" %>'>
              <vkc:img page="/templates/${template.name}/gfx/minus-big.gif" border="0" titleKey="vkc.tooltip.hide.license" />
            </vkc:link>
          </td>
          <td width="100%" colspan="20">
            <table cellspacing="3" cellpadding="0" border="0" width="100%">
              <tr>
                <logic:notEmpty name="license" property="validFrom">
                <td align="left" nowrap="nowrap" style="color:#aaaaaa"><b><vkc:message key="vkc.administration.license.validfrom" />:</b>&nbsp;</td>
                <td align="left" width="50%" nowrap="nowrap" style="color:#aaaaaa"><vkc:write name="license" property="validFrom" formatKey="date.medium.format" /></td>
                <td align="left" nowrap="nowrap" style="color:#aaaaaa"><b><vkc:message key="vkc.administration.license.created" />:</b>&nbsp;</td>
                <td align="left" width="50%" nowrap="nowrap" style="color:#aaaaaa"><vkc:write name="license" property="created" formatKey="date.medium.format" /></td>
                </logic:notEmpty>
                <logic:empty name="license" property="validFrom">
                <td align="left" nowrap="nowrap" style="color:#aaaaaa"><b><vkc:message key="vkc.administration.license.created" />:</b>&nbsp;</td>
                <td align="left" width="100%" colspan="3" nowrap="nowrap" style="color:#aaaaaa"><vkc:write name="license" property="created" formatKey="date.medium.format" /></td>
                </logic:empty>
              </tr>
              <tr>
                <logic:notEmpty name="license" property="validUntil">
                <td align="left" nowrap="nowrap" style="color:#aaaaaa"><b><vkc:message key="vkc.administration.license.validuntil" />:</b>&nbsp;</td>
                <td align="left" width="50%" nowrap="nowrap" style="color:#aaaaaa"><vkc:write name="license" property="validUntil" formatKey="date.medium.format" /></td>
                <td align="left" nowrap="nowrap" style="color:#aaaaaa"><b><vkc:message key="vkc.administration.license.creator" />:</b>&nbsp;</td>
                <td align="left" width="50%" nowrap="nowrap" style="color:#aaaaaa"><vkc:write name="license" property="creator.fullName"/></td>
                </logic:notEmpty>
                <logic:empty name="license" property="validUntil">
                <td align="left" nowrap="nowrap" style="color:#aaaaaa"><b><vkc:message key="vkc.administration.license.creator" />:</b>&nbsp;</td>
                <td align="left" width="100%" colspan="3" nowrap="nowrap" style="color:#aaaaaa"><vkc:write name="license" property="creator.fullName"/></td>
                </logic:empty>
              </tr>
              
              <tr>
                <td nowrap="nowrap" valign="top" style="color:#aaaaaa"><b><vkc:message key="vkc.administration.license.terms" />:</b>&nbsp;</td>
                <td width="100%" valign="top" colspan="3">
                  <table cellspacing="3" cellpadding="0" border="0" width="100%">
                    <logic:iterate id="language" indexId="index" name="form" property="languages" type="vkc.db.entities.VKCLanguage">
                    <tr>
                      <td>&nbsp;</td>
                      <td width="100%" colspan="3">
                        <a name='<%= licenseId + "_" + language.getLanguageId() %>'></a>
                        <table cellspacing="3" cellpadding="0" border="0" width="100%">
                          <tr>
                            <td align="left" valign="top" nowrap="nowrap">
                              <logic:equal name="form" property='<%= "showLicenseLanguage(" + licenseId + "_" + language.getLanguageId() + ")" %>' value="false">
                              <vkc:link href='<%= "javascript:showLicenseLanguage(" + licenseId + "," + language.getLanguageId() + ");" %>'>
                                <vkc:img page="/templates/${template.name}/gfx/plus-big.gif" border="0" titleKey="vkc.tooltip.show.license.language" />
                              </vkc:link>
                              </logic:equal>
                              <logic:equal name="form" property='<%= "showLicenseLanguage(" + licenseId + "_" + language.getLanguageId() + ")" %>' value="true">
                              <vkc:link href='<%= "javascript:hideLicenseLanguage(" + licenseId + "," + language.getLanguageId() + ");" %>'>
                                <vkc:img page="/templates/${template.name}/gfx/minus-big.gif" border="0" titleKey="vkc.tooltip.hide.license.language" />
                              </vkc:link>
                              </logic:equal>
                            </td>
                            <td align="left" nowrap="nowrap" valign="top" style="color:#aaaaaa"><b><vkc:message name="language" property="name_key" /></b>&nbsp;</td>
                            <td width="100%">&nbsp;</td>
                          </tr>
                          <logic:equal name="form" property='<%= "showLicenseLanguage(" + licenseId + "_" + language.getLanguageId() + ")" %>' value="true">
                          <tr>
                            <td width="100%" colspan="3" class="color_doctitle" style="color:#aaaaaa">
                              <logic:equal name="form" property="tinyMCECompatible" value="true">
                              <vkc:write name="license" property='<%="license[" + language.getLanguageId() + "]"%>' displayAsHTML="true" renderNewLine="true" />
                              </logic:equal>
                              <logic:equal name="form" property="tinyMCECompatible" value="false">
                              <vkc:write name="license" property='<%="license[" + language.getLanguageId() + "]"%>' stripHTML="true" renderNewLine="true" />
                              </logic:equal>
                            </td>
                          </tr>
                          </logic:equal>
                        </table>
                      </td>
                    </tr>
                    </logic:iterate>
                  </table>                    
                </td>
              </tr>
            </table>
          </td>
        </tr>
      </table>
    </td>
  </tr>
  </logic:equal>
  
  </logic:equal>

  </logic:iterate>
  
  <tr><td align="center"><vkc:img page="/templates/${template.name}/gfx/trans.gif" alt="" width="5" height="5" border="0"/></td></tr>
  <tr><td colspan="2">&nbsp;<input type="checkbox" name="allItems" value="allItems" onclick="javascript:checkAll(this.form);">&nbsp;<vkc:message key="vkc.string.checkAll"/></td></tr>
  <tr><td align="center"><vkc:img page="/templates/${template.name}/gfx/trans.gif" alt="" width="5" height="5" border="0"/></td></tr>
  <tr>
    <td colspan="2">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><vkc:img page="/templates/${template.name}/gfx/trans.gif" alt="" width="5" border="0"/><vkc:img page="/templates/${template.name}/gfx/function-arrow.gif" alt="-->" border="0"/></td>
          <td>
            <html:select name="form" property="selectedCmdAction" value="noaction">
              <html:option value="noaction"><vkc:message key="vkc.string.chooseFunction"/></html:option>
              <html:option value="noaction1">------------------------------------</html:option>
              <html:option value="delete.licenses"><vkc:message key="button.delete"/></html:option>
              <html:option value="activate.license"><vkc:message key="button.enable"/></html:option>
            </html:select>
          </td>
          <td>&nbsp;<vkc:button property="action.execute" onclick="modifyLicenses(this);"><vkc:message key="button.execute"/></vkc:button></td>
        </tr>
      </table>
    </td>
  </tr>
  
  <vkc:hline colspan="5" lineClass="hline" lineHeight="1" topSpace="5" bottomSpace="5" />
  </logic:notEmpty>

  <logic:empty name="form" property="licenses">
  <tr><td><b><vkc:message key="vkc.administration.license.nolicense" /></b></td></tr>
  </logic:empty>
  </html:form>
</table>
</body>
</html:html>