gourmetj-springboot/src/main/resources/META-INF/resources/recipePrint.xhtml

127 lines
5.0 KiB
HTML
Raw Normal View History

<?xml version="1.0"?>
<ui:composition template="/WEB-INF/layout/layout.xhtml"
2021-12-29 19:30:25 +00:00
xmlns:h="http://xmlns.jcp.org/jsf/html"
xmlns:f="http://xmlns.jcp.org/jsf/core"
xmlns:ui="http://java.sun.com/jsf/facelets"
2021-12-29 19:30:25 +00:00
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">
2022-01-06 14:49:07 +00:00
<h:form id="printForm">
<h:messages />
<p:panelGrid
style="margin-bottom: 5px; border-style: none"
2021-12-29 19:30:25 +00:00
>
2022-01-06 14:49:07 +00:00
<p:column>
<img id="bigpix"
SRC="/img/picture/#{recipeDetailBean.recipe.id}"
/>
2021-12-29 19:30:25 +00:00
</p:column>
2022-01-06 14:49:07 +00:00
<p:column
style="vertical-align: middle; text-align: left; border: none"
>
2022-01-06 15:15:26 +00:00
<p:commandButton value="Back"
icon="ui-icon-arrowthick-1-w"
2022-01-06 14:49:07 +00:00
style="margin-left: 2em" immediate="true"
action="/main.jsf"
/>
2021-12-29 19:30:25 +00:00
</p:column>
2022-01-06 14:49:07 +00:00
</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}"
/>
2022-01-06 14:49:07 +00:00
<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>
2021-12-29 19:30:25 +00:00
<!-- -->
2022-01-06 14:49:07 +00:00
<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}"
2021-12-29 19:30:25 +00:00
/>
2022-01-06 14:49:07 +00:00
<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>