<%--
This JSP include prints a table (like the middle of view issue) with the issue description.
It requires that the issue is the top item on the value stack, and
that various beans / actions are already set. Use it like so:

<%@ taglib uri="jiratags" prefix="jira" %>
<webwork:property value="path/to/issueGenericValue">
    <%@ include this file %>
</webwork:property>
--%>
<%@ taglib uri="webwork" prefix="webwork" %>
<%@ taglib uri="jiratags" prefix="jira" %>
<webwork:property value="./long('project')">
<webwork:if test="@fieldVisibility/fieldHidden(., 'description', ../string('type')) == false && ../string('description') != null && ../string('description')/length > 0">
<br>

<div id="description-open">
<table cellpadding="2" cellspacing="0" border="0" width="100%" align="center">
<tr>
	<td bgcolor="#bbbbbb" width="1%" nowrap align="center">
			&nbsp;<font color="#ffffff"><b><webwork:text name="'issue.field.description'"/></b></font>&nbsp;
	</td>
    <td align="right"><a href="" onClick="toggleDivsWithCookie('description-closed', 'description-open'); return false;" class="smallgrey">&laquo; <webwork:text name="'admin.common.words.hide'"/></a></td>
</tr>
</table>

<table cellpadding="0" cellspacing="0" border="0" width="100%">
<tr>
	<td id="descriptionArea">
        <div id="description_full">
            <webwork:property value="/renderedContent('description', ../string('description'), @issue)" escape="'false'" /><br />
        </div>
    </td>
</tr>
</table>
</div>

<div id="description-closed" style="display:none;">
<table cellpadding="2" cellspacing="0" border="0" width="100%" align="center" class="table-layout: fixed;">
<tr>
	<td bgcolor="#bbbbbb" width="1%" nowrap align="center">
			&nbsp;<font color="#ffffff"><b><webwork:text name="'issue.field.description'"/></b></font>&nbsp;
	</td>
    <td style="padding: 1px; margin: 0px; border-bottom: #bbb 1px solid;"><div style="height: 1.2em; overflow: hidden; text-overflow: ellipsis;">&nbsp; &nbsp;<webwork:property value="/renderedContentNoBreaks('description', ../string('description'), @issue)" escape="'false'" /></div></td>
    <td width="1%" align="right" nowrap style="padding: 1px; margin: 0px; border-bottom: #bbb 1px solid;"><a href="" onClick="toggleDivsWithCookie('description-open', 'description-closed'); return false;" class="smallgrey"><webwork:text name="'admin.common.words.show'"/> &raquo;</a></td>
</tr>
</table>
</div>

<script language="JavaScript" type="text/javascript">
<!--
    restoreDivFromCookie('description-open', 'jira.viewissue.cong.cookie', '1');
    restoreDivFromCookie('description-closed', 'jira.viewissue.cong.cookie', '0');
//-->
</script>
</webwork:if>
</webwork:property>