<%@ taglib uri="webwork" prefix="webwork" %>
<%@ taglib uri="webwork" prefix="ui" %>
<%@ taglib uri="sitemesh-page" prefix="page" %>
<html>
<head>
    <meta content="issuesummary" name="decorator" />
    <webwork:if test="/multiple == true">
	    <title><webwork:text name="'attachfile.title.multiple'"/></title>
    </webwork:if>
    <webwork:else>
        <title><webwork:text name="'attachfile.title'"/></title>
    </webwork:else>
</head>
<body>
    <page:applyDecorator name="jiraform">
        <page:param name="title">
            <webwork:if test="/multiple == true">
                <webwork:text name="'attachfile.title.multiple'"/>
            </webwork:if>
            <webwork:else>
                <webwork:text name="'attachfile.title'"/>
            </webwork:else>
        </page:param>
        <page:param name="description">
            <webwork:if test="/multiple == true">
                <input type="hidden" name="multiple" value="true" >
                <webwork:text name="'attachfile.desc.multiple'"/>
                <p>
                <img src="<%= request.getContextPath() %>/images/icons/bullet_creme.gif" height=8 width=8 border=0 align=absmiddle>
                <webwork:text name="'attachfile.single'">
                <webwork:param name="'value0'"><b><a href="<%= request.getContextPath() %>/secure/AttachFile!default.jspa?id=<webwork:property value="issue/long('id')" />&multiple=false" rel="pageReload" ></webwork:param>
                <webwork:param name="'value1'"></a></b></webwork:param>
            </webwork:text>
                </p>
            </webwork:if>
            <webwork:else>
                <input type="hidden" name="multiple" value="false" >
                <webwork:text name="'attachfile.desc'"/>
                    <p>
                    <img src="<%= request.getContextPath() %>/images/icons/bullet_creme.gif" height=8 width=8 border=0 align=absmiddle>
                    <webwork:text name="'attachfile.multiple'">
                    <webwork:param name="'value0'"><b><a href="<%= request.getContextPath() %>/secure/AttachFile!default.jspa?id=<webwork:property value="issue/long('id')" />&multiple=true" rel="pageReload" ></webwork:param>
                    <webwork:param name="'value1'"></a></b></webwork:param>
                </webwork:text>
                </p>
            </webwork:else>
        </page:param>
        <page:param name="width">100%</page:param>
        <page:param name="action">AttachFile.jspa</page:param>
        <page:param name="cancelURI"><webwork:property value="issuePath" /></page:param>
        <page:param name="submitName"><webwork:property value="text('attachfile.submitname')"/></page:param>
        <page:param name="multipart">true</page:param>
        <page:param name="autoSelectFirst">false</page:param>
        <webwork:if test="/issueExists == true">
            <webwork:iterator value="paramNames" >
                <ui:component label="text('attachfile.attachment.label')" name="." template="filebrowse.jsp">
                    <ui:param name="'description'"><webwork:property value="attachmentFieldDescription" escape="false" /></ui:param>
                </ui:component>
            </webwork:iterator>
        <%@ include file="/includes/panels/updateissue_comment.jsp" %>
        <ui:component name="'id'" template="hidden.jsp" />
        </webwork:if>
    </page:applyDecorator>
</body>
</html>