<%@ taglib uri="webwork" prefix="webwork" %>
<%@ taglib uri="webwork" prefix="ui" %>
<%@ taglib uri="sitemesh-page" prefix="page" %>

<table class="grid" width="100%">
<tr><td class="jiraformheader">
	<h5><webwork:text name="'admin.projects.components'"/></h5>
	<webwork:if test="/hasProjectAdminPermission == true">
        <ul class="square">
            <li>
                <webwork:text name="'admin.projects.addcomponent'">
                    <webwork:param name="'value0'"><a id="add_component" href="<webwork:url page="AddComponent!default.jspa"><webwork:param name="'pid'" value="./long('id')"/></webwork:url>"></webwork:param>
                    <webwork:param name="'value1'"></a></webwork:param>
                </webwork:text>
            </li>
            <webwork:if test="/enterprise == true && /projectManager/components(.)/size > 0"><li>
                <webwork:text name="'admin.projects.select.assignees.for.components'">
                    <webwork:param name="'value0'"><a id="select_component_assignees" href="<webwork:url page="/secure/project/SelectComponentAssignees!default.jspa"><webwork:param name="'projectId'" value="./long('id')"/></webwork:url>"></webwork:param>
                    <webwork:param name="'value1'"></a></webwork:param>
                </webwork:text>
            </li></webwork:if>
        </ul>
	</webwork:if>
</td></tr>
<tr><td>
		<webwork:property value="/projectManager/components(.)">
		<webwork:iterator value=".">
			<webwork:if test="/hasProjectAdminPermission == true">
				<span style="float: right;" class="subText">
				(<a id="edit_comp_<webwork:property value="string('name')"/>" href="EditComponent!default.jspa?id=<webwork:url value="long('id')" />&pid=<webwork:property value="project/long('id')"/>"><webwork:text name="'common.words.edit'"/></a>
                | <a id="del_comp_<webwork:property value="string('name')"/>" href="DeleteComponent!default.jspa?cid=<webwork:url value="long('id')" />"><webwork:text name="'common.words.delete'"/></a>)</span>
			</webwork:if>
            <span title="<webwork:property value="./string('name')" /> <webwork:property value="./string('description')" ><webwork:if test="."> - <webwork:property value="." /></webwork:if></webwork:property>">
            <img src="<%= request.getContextPath() %>/images/icons/component.gif" height=16 width=16 border=0 align="absmiddle" alt="Component">
			<webwork:property value="./string('name')" />
            <webwork:if test="/enterprise == true && ./string('lead') != null">
                <span class="subText">(<b><webwork:text name="'common.concepts.lead'"/>:</b> <webwork:property value="/userFullName(./string('lead'))"/>)</span>
            </webwork:if>
            </span>
			<br />
		</webwork:iterator>
		<webwork:if test=". && size == 0">
			<webwork:text name="'admin.projects.no.components'"/>
		</webwork:if>
		</webwork:property>
</td></tr>
</table>