<%@ include file="/common/taglibs.jsp" %>
<head>
    <title>
        <fmt:message key="title.issues.time"/>
    </title>
</head>

<style type="text/css">

body > ul > li {
    font-size: 14px;
}

body > ul > li > a {
    padding-left: 54px;
    padding-right: 40px;
    min-height: 34px;
    font-size: 0.9em;
}

</style>

<div class="toolbar">
      <h1 id="pageTitle">
          <fmt:message key="title.issues.time"/>
      </h1>
      <a id="backButton" class="button" href="${ctx}/iphone/issues/${id}">${type.name} #${id}</a>
      <c:if test="${!closed && resolution == null}"><a id="logtimeButton" class="button" href="#addTime"><fmt:message key="action.logTime"/></a></c:if>
</div>

    <ul id="comments" title="<fmt:message key="title.issues.time"/>" selected="true">
        <s:iterator value="timeLogList" status="status" id="timelog">
            <li>
                <h3 style="display:inline;float:left;margin:0;padding:0;">${effort}<br/>
                <span style="font-size:0.65em;text-align:center;"><fmt:message key="text.hours"/></span></h3>
                <a class="nolink">
                  ${description}
                    <span class="time">
                        ${createdBy.fullName}
                    </span>
                </a>
            </li>
        </s:iterator>
    </ul>



    <c:if test="${!closed && resolution == null}">
     <form id="addTime" class="dialog" action="${ctx}/iphone/issues/${id}/logTime" method="POST">
         <input type="hidden" name="_method" value="put"/>

        <fieldset>
            <h1><fmt:message key="action.cancel"/></h1>
            <a class="button leftButton" type="cancel"><fmt:message key="action.cancel"/></a>
            <a class="button blueButton" type="submit"><fmt:message key="action.logTime"/></a>

            <input type="hidden" name="frmTimeLog.createdBy.id" value="${currentUser.id}"/>
            <s:set name="frmTimeLogCreatedAt"><s:date name="%{frmTimeLog.createdAt}" format="%{getText('i18n.date.key')}"/></s:set>
            <s:textfield key="label.issue.time.date" name="frmTimeLog_createdAt" cssClass="text" value="%{frmTimeLogCreatedAt}" theme="xhtml"/>
            <s:textfield key="frmTimeLog.effort" maxlength="6" name="frmTimeLog_effort" cssClass="text" label="Hours" theme="xhtml"/>
            <s:textarea key="frmTimeLog.description" cssClass="textarea" label="Description" theme="xhtml"/>
        </fieldset>
    </form>
    </c:if>