Web implementation of the Gourmet Recipe Manager
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 

127 lines
5.0 KiB

<?xml version="1.0"?>
<ui:composition template="/WEB-INF/layout/layout.xhtml"
xmlns:h="http://xmlns.jcp.org/jsf/html"
xmlns:f="http://xmlns.jcp.org/jsf/core"
xmlns:ui="http://java.sun.com/jsf/facelets"
xmlns:p="http://primefaces.org/ui"
xmlns:c="http://xmlns.jcp.org/jstl"
>
<!-- Print Recipe -->
<ui:define name="title">Gourmet Recipe Manager</ui:define>
<ui:define name="content">
<h:form id="printForm">
<h:messages />
<p:panelGrid
style="margin-bottom: 5px; border-style: none"
>
<p:column>
<img id="bigpix"
SRC="/img/picture/#{recipeDetailBean.recipe.id}"
/>
</p:column>
<p:column
style="vertical-align: middle; text-align: left; border: none"
>
<p:commandButton value="Back"
icon="ui-icon-arrowthick-1-w"
style="margin-left: 2em" immediate="true"
action="/main.jsf"
/>
</p:column>
</p:panelGrid>
<p:panelGrid columns="2">
<h:outputLabel for="@next" value="Category: " />
<h:outputText
value="#{userSession.formatCategories(recipeDetailBean.recipe)}"
/>
<h:outputLabel for="@next" value="Cuisine: " />
<h:outputText
value="#{recipeDetailBean.recipe.cuisine}"
/>
<h:outputLabel for="@next" value="Prep Time: " />
<h:outputText
value="#{userSession.formatTime(recipeDetailBean.recipe.preptime)}"
/>
<h:outputLabel for="@next" value="Cook Time: " />
<h:outputText label="Cook Time: "
value="#{userSession.formatTime(recipeDetailBean.recipe.cooktime)}"
/>
</p:panelGrid>
<!-- -->
<p:panelGrid id="ingredientsc">
<f:facet name="header">
<h:outputText styleClass="subtitle"
value="Ingredients"
/>
</f:facet>
<p:column style="padding: 0px 4px">
<p:dataTable id="ingredients"
showDirectLinksArrows="true"
value="#{recipeDetailBean.ingredients}"
var="ingredient"
>
<p:column
style="text-align: right; width: 2em"
>
<f:facet name="header">
Amt.
</f:facet>
<h:outputText
value="#{ingredient.displayAmount}"
/>
</p:column>
<p:column style="width: 6em">
<f:facet name="header">Units</f:facet>
<h:outputText
value="#{ingredient.unit}"
/>
</p:column>
<p:column>
<f:facet name="header">
Item
</f:facet>
<h:outputText
value="#{ingredient.item}"
/>
</p:column>
<p:column align="center"
style="width: 2em"
>
<f:facet name="header">
Opt.
</f:facet>
<p:selectBooleanCheckbox
readonly="true"
value="#{ingredient.optionalCB}"
/>
</p:column>
</p:dataTable>
</p:column>
</p:panelGrid>
<h:outputText
value="Recipe ID: #{recipeDetailBean.recipe.id}"
/>
<p:panelGrid columns="1">
<f:facet name="header">
<h:outputText styleClass="subtitle"
value="Instructions"
/>
</f:facet>
<!-- -->
<h:outputText id="instructions" escape="false"
value="#{recipeDetailBean.instructions}"
/>
</p:panelGrid>
<p:panelGrid columns="1">
<f:facet name="header">
<h:outputText styleClass="subtitle"
value="Notes"
/>
</f:facet>
<h:outputText escape="false"
value="#{recipeDetailBean.modifications}"
/>
</p:panelGrid>
</h:form>
</ui:define>
</ui:composition>