Created
January 27, 2012 21:56
-
-
Save lincolnthree/1691148 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" | |
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> | |
<html xml:lang="en" lang="en" xmlns="http://www.w3.org/1999/xhtml" | |
xmlns:f="http://java.sun.com/jsf/core" | |
xmlns:h="http://java.sun.com/jsf/html" | |
xmlns:ocp="http://java.sun.com/jsf/composite/ocpcommon" | |
xmlns:ui="http://java.sun.com/jsf/facelets"> | |
<ui:composition template="/WEB-INF/view/templates/project-active.xhtml"> | |
<ui:param name="title" value="#{project.name} | Story #{stories.current.number}" /> | |
<ui:define name="topnav-post-project"> | |
<li> | |
<div class="linkball">◗</div> | |
<a href="#" | |
onclick="return false;" | |
style="padding-left: 15px; cursor: default;"> | |
Story #{stories.current.number} | |
</a> | |
</li> | |
</ui:define> | |
<ui:define name="header"> | |
<h2 style="display: inline;">Story #{story.number}</h2> | |
</ui:define> | |
<ui:define name="header-right"> | |
<h:form> | |
<h:commandLink value="Close" action="#{stories.closeStoryAjax}" styleClass="btn primary" rendered="#{story.open}"> | |
<f:ajax execute="@this" render="@form"/> | |
</h:commandLink> | |
<h:commandLink value="Reopen" action="#{stories.openStoryAjax}" styleClass="btn secondary" rendered="#{!story.open}"> | |
<f:ajax execute="@this" render="@form"/> | |
</h:commandLink> | |
</h:form> | |
</ui:define> | |
<ui:define name="content"> | |
<div class="row"> | |
<div class="span11 columns"> | |
<h:form id="validations" prependId="false"> | |
<div class="well edit-container"> | |
<h3>As a <ocp:editText value="#{story.role}" action="#{stories.saveAjax}" />, I want <ocp:editText value="#{story.objective}" action="#{stories.saveAjax}" />, so that <ocp:editText value="#{story.result}" action="#{stories.saveAjax}" />.</h3> | |
</div> | |
<h3>Validation Criteria ( #{stories.current.validationCount} ) <ocp:modalControl text="+1" for="addVC" styleClass="fr btn"/></h3> | |
<h:panelGroup id="list"> | |
<ul class="plain clear"> | |
<ui:repeat var="v" value="#{stories.current.validations}"> | |
<li> | |
<div class="box edit-container" style="margin-bottom: 8px;"> | |
<div class="row"> | |
<div class="span1 columns"> | |
<h:commandLink id="approveVC" action="#{validations.acceptAjax(v)}" value="Pending" rendered="${!v.accepted}" styleClass="btn info" title="Click to Approve"> | |
<f:ajax execute="@this @form" render="@form" /> | |
</h:commandLink> | |
<h:commandLink id="rejectVC" action="#{validations.rejectAjax(v)}" value="Approved" rendered="${v.accepted}" styleClass="btn success" title="Click to Reject"> | |
<f:ajax execute="@this @form" render="@form" /> | |
</h:commandLink> | |
</div> | |
<div class="span6 columns offset1" style="padding-top: 5px;"> | |
<ocp:editText value="#{v.text}" action="#{stories.saveAjax}" execute="@form" /> | |
</div> | |
<div class="span2 columns" style="padding-top: 5px;"> | |
<h:panelGroup rendered="#{v.accepted}"> | |
<ocp:tooltip placement="below" title="#{v.acceptedOn}" trigger="hover"> | |
<div> | |
<b>Approved by </b> | |
<ocp:profileLink profile="#{v.acceptedBy}" /> <br/> | |
<h:outputText value="#{v.acceptedOn}" style="position: relative; top: -5px;"> | |
<f:converter converterId="com.ocpsoft.PrettyTimeConverter"/> | |
</h:outputText> | |
</div> | |
</ocp:tooltip> | |
</h:panelGroup> | |
</div> | |
</div> | |
</div> | |
</li> | |
</ui:repeat> | |
</ul> | |
</h:panelGroup> | |
<h:panelGroup layout="block" rendered="${empty stories.current.validations}" styleClass="box" style="margin-bottom: 20px;"> | |
This story has no validation criteria. You should <ocp:modalControl text="add one" for="addVC" /> to get started. | |
</h:panelGroup> | |
</h:form> | |
<h:form id="tasks"> | |
<h3>Tasks ( #{stories.current.taskCount} ) <ocp:modalControl text="+1" for="addTasks" styleClass="fr btn"/></h3> | |
<ul class="plain clear"> | |
<ui:repeat var="t" value="#{stories.current.tasks}"> | |
<li> | |
<div class="box edit-container" style="margin-bottom: 8px;"> | |
<div class="row"> | |
<div class="span1 columns"> | |
<h:selectOneMenu id="status" value="#{t.status}" style="width: 100px;" styleClass="#{t.status}"> | |
<f:selectItems value="#{taskStatuses}"/> | |
<f:ajax execute="@form :tasks:saveTask" render="@form :impeded" /> | |
<f:valueChangeListener binding="#{taskStatusChanged}" /> | |
</h:selectOneMenu> | |
</div> | |
<div class="span6 columns offset1" style="padding-top: 5px;"> | |
<ocp:editText value="#{t.text}" execute="@form :tasks:saveTask" /> | |
</div> | |
<div class="span2 columns" style="padding-top: 5px;"> | |
<h:inputText value="#{t.hoursRemain}" size="3" style="width: 30px;"> | |
<f:ajax execute="@form :tasks:saveTask" render="@form :impeded" /> | |
<f:valueChangeListener binding="#{taskHoursChanged}" /> | |
</h:inputText><b> hours remain</b> | |
for <br/> | |
<ocp:profileLink profile="#{t.assignee}" /> | |
</div> | |
</div> | |
<h:panelGroup layout="block" styleClass="row" rendered="#{t.status == 'IMPEDED'}"> | |
<div> | |
<div class="span10 columns" style="width: 100%; margin-top: 5px; padding-top: 10px; border-top: 1px solid #DDD; position: relative; right: 10px;"> | |
<h:panelGroup id="imdp" layout="block" class="clearfix"> | |
<label for="imped"><b>Impeded because</b></label> | |
<div class="imped"> | |
<h:inputTextarea value="#{t.impediments}" rows="2" styleClass="span8" style="margin-left: 20px; height: 40px;"> | |
<f:ajax execute="@form :tasks:saveTask" render="@this" /> | |
</h:inputTextarea> | |
<span class="help-inline"><br/><ocp:message for="desc" /></span> | |
</div> | |
</h:panelGroup> | |
</div> | |
</div> | |
</h:panelGroup> | |
</div> | |
</li> | |
</ui:repeat> | |
<h:commandLink id="saveTask" value="saveTask" style="display:none;"> | |
<f:setPropertyActionListener target="#{tasks.current}" value="#{t}"/> | |
<f:actionListener binding="#{taskHoursChanged}"/> | |
<f:actionListener binding="#{taskStatusChanged}"/> | |
<f:actionListener binding="#{saveStory}"/> | |
</h:commandLink> | |
</ul> | |
<h:panelGroup layout="block" rendered="${empty stories.current.tasks}" styleClass="box" style="margin-bottom: 20px;"> | |
This story has no tasks. You should | |
<ocp:modalControl text="add one" for="addTasks" /> to get started. | |
</h:panelGroup> | |
</h:form> | |
</div> | |
<div class="span5 columns" style="padding: 0px;"> | |
<h:panelGroup id="impeded"> | |
<h3> | |
<h:panelGroup layout="block" class="alert-message error" rendered="#{stories.current.impeded}"> | |
<center>This story is impeded.</center> | |
</h:panelGroup> | |
</h3> | |
</h:panelGroup> | |
<ocp:box title="Details" tooltip="Refresh" padding="15" action="rewrite:" > | |
<f:param name="profile" value="#{project.owner.username}" /> | |
<f:param name="project" value="#{project.slug}" /> | |
<f:param name="story" value="#{stories.current.number}" /> | |
<f:facet name="actionContent"> | |
</f:facet> | |
<f:facet name="content"> | |
<h:form prependId="false" styleClass="form-stacked"> | |
<h:panelGroup id="pr" layout="block" class="clearfix"> | |
<label for="priority">Priority</label> | |
<div class="input"> | |
<h:inputText id="priority" value="#{stories.current.priority}" class="span1"> | |
<f:ajax execute="@this saveStory" render="pr"/> | |
</h:inputText> | |
<span class="help-inline"><br/><ocp:message id="prmsg" for="priority" /></span> | |
</div> | |
</h:panelGroup> | |
<h:panelGroup id="br" layout="block" class="clearfix"> | |
<label for="burner">Front burner</label> | |
<div class="input"> | |
<h:selectBooleanCheckbox id="burner" value="#{stories.current.frontBurner}"> | |
<f:ajax execute="@this saveStory" render="br" /> | |
</h:selectBooleanCheckbox> | |
<span class="help-inline"><br/><ocp:message id="brmsg" for="burner" /></span> | |
</div> | |
</h:panelGroup> | |
<h:panelGroup id="sp" layout="block" class="clearfix"> | |
<label for="points">Story points</label> | |
<div class="input"> | |
<h:selectOneMenu id="points" value="#{stories.current.storyPoints}" style="width: 65px;"> | |
<f:selectItems value="#{points}" /> | |
<f:ajax execute="@this saveStory" render="sp"/> | |
</h:selectOneMenu> | |
<span class="help-inline"><br/><ocp:message id="spmsg" for="points" /></span> | |
</div> | |
</h:panelGroup> | |
<h:panelGroup id="bv" layout="block" class="clearfix"> | |
<label for="value">Business value</label> | |
<div class="input"> | |
<h:selectOneMenu id="value" value="#{stories.current.businessValue}" style="width: 65px;"> | |
<f:selectItems value="#{points}" /> | |
<f:ajax execute="@this saveStory" render="bv"/> | |
</h:selectOneMenu> | |
<span class="help-inline"><br/><ocp:message id="bvmsg" for="value" /></span> | |
</div> | |
</h:panelGroup> | |
<h:panelGroup id="iter" layout="block" class="clearfix"> | |
<label for="value">Iteration</label> | |
<div class="input"> | |
<h:selectOneMenu id="iteration" value="#{stories.current.iteration}"> | |
<f:selectItems value="#{stories.current.project.iterations}" itemLabel="#{i.number} - #{i.title}" itemValue="#{i}" var="i" /> | |
<f:ajax execute="@this saveIteration" render="iter"/> | |
</h:selectOneMenu> | |
<span class="help-inline"><br/><ocp:message id="itrmsg" for="iteration" /></span> | |
</div> | |
</h:panelGroup> | |
<h:commandLink id="saveIteration" value="SaveIteration" action="#{stories.saveIterationAjax()}" style="display: none;" /> | |
<h:commandLink id="saveStory" value="Save" action="#{stories.saveAjax()}" style="display:none;"/> | |
</h:form> | |
</f:facet> | |
</ocp:box> | |
</div> | |
</div> | |
<ocp:modal id="addVC" title="Add validation criteria" fade="true" focusId="desc"> | |
<h:form prependId="false" id="VCmodal"> | |
<p/> | |
<h:panelGroup id="dscp" layout="block" class="clearfix"> | |
<label for="desc">Description<br/><span class="help-inline"><br/><ocp:message for="desc" /></span></label> | |
<div class="input"> | |
<h:inputTextarea id="desc" required="true" tabindex="100" | |
value="#{validation.text}" styleClass="span6" style="margin-left: 15px;" /> | |
</div> | |
</h:panelGroup> | |
<br/> | |
<div class="fr"> | |
<h:commandLink value="Add validation" action="#{validations.createAjax}" styleClass="btn primary" | |
tabindex="101"> | |
<f:ajax execute="desc @this" render=":validations dscp @form" /> | |
</h:commandLink> | |
<a class="btn secondary" tabindex="102" onclick="$('#addVC').modal('hide');">Done</a> | |
</div> | |
<div style="clear:both;"></div> | |
</h:form> | |
<f:facet name="footer"> | |
</f:facet> | |
</ocp:modal> | |
<ocp:modal id="addTasks" title="Add tasks" focusId="desc"> | |
<h:form prependId="false" id="TaskModal"> | |
<p/> | |
<h:panelGroup id="dscp" layout="block" class="clearfix"> | |
<label for="desc">Description</label> | |
<div class="input"> | |
<h:inputTextarea id="desc" value="#{tasks.current.text}" styleClass="span6" required="true" | |
tabindex="200"/> | |
<span class="help-inline"><br/><ocp:message for="desc" /></span> | |
</div> | |
</h:panelGroup> | |
<div class="row"> | |
<div class="span4 columns"> | |
<h:panelGroup id="hrp" layout="block" class="clearfix"> | |
<label for="hrs">Hours Remaining</label> | |
<div class="input"> | |
<h:inputText id="hrs" value="#{tasks.current.initialHours}" styleClass="span1" | |
tabindex="201"/> | |
<span class="help-inline"><br/><ocp:message for="hrs" /></span> | |
</div> | |
</h:panelGroup> | |
</div> | |
<div class="span5 columns"> | |
<h:panelGroup id="asp" layout="block" styleClass="clearfix" style="position: relative; right: 60px;"> | |
<label for="assignee">Assignee</label> | |
<div class="input"> | |
<h:selectOneMenu id="assignee" value="${tasks.current.assignee}" style="width: 160px" | |
tabindex="202"> | |
<f:selectItems value="#{assignees}" /> | |
</h:selectOneMenu> | |
<span class="help-inline"><br/><ocp:message for="assignee" /></span> | |
</div> | |
</h:panelGroup> | |
</div> | |
</div> | |
<div class="fr"> | |
<h:commandLink value="Add task" action="#{tasks.createAjax}" styleClass="btn primary" | |
tabindex="203"> | |
<f:ajax execute="@form" render="@form :tasks" /> | |
</h:commandLink> | |
<a class="btn secondary" onclick="$('#addTasks').modal('hide');" tabindex="204">Done</a> | |
</div> | |
</h:form> | |
<f:facet name="footer"> | |
</f:facet> | |
</ocp:modal> | |
</ui:define> | |
<ui:define name="side-items"> | |
#{projects.current.name} | |
</ui:define> | |
</ui:composition> | |
</html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment