Cleanup on Recipe View page

This commit is contained in:
tim holloway 2024-09-21 17:21:57 -04:00
parent 3817173e5c
commit 3e5b622f51
2 changed files with 89 additions and 75 deletions

View File

@ -7,7 +7,7 @@
<groupId>com.mousetech.gourmet</groupId> <groupId>com.mousetech.gourmet</groupId>
<artifactId>gourmetj</artifactId> <artifactId>gourmetj</artifactId>
<version>2.0.30</version> <version>2.0.37</version>
<packaging>jar</packaging> <packaging>jar</packaging>
<name>GourmetJ</name> <name>GourmetJ</name>

View File

@ -35,84 +35,98 @@
/> />
</f:facet> </f:facet>
<p:panel id="leftCol" style="width: auto;"> <p:panel id="leftCol" style="width: auto;">
<p:panelGrid columns="2"> <p:panelGrid>
<p:panelGrid id="picButtons" columns="2"> <p:row>
<img id="bigpix" <p:column style="width: 136px;">
style="width: 132px;" <p:graphicImage id="bigpix"
src="/img/picture/#{recipeDetailBean.recipe.id}" style="width: 132px;"
/> value="/img/picture/#{recipeDetailBean.recipe.id}"
<p:panelGrid id="pnlButtons"
columns="2" style="width: 220px;"
>
<!-- TODO: ask if we should save -->
<p:commandButton value="Home"
ajax="false"
icon="ui-icon-home"
action="home"
immediate="true"
/> />
<p:commandButton ajax="false" </p:column>
value="Print" <p:column style="width: 18em;">
icon="ui-icon-print" <p:panelGrid id="pnlButtons"
action="/recipePrint.jsf?faces-redirect=true" columns="2"
styleClass="ui-button-print"
immediate="true"
/>
<p:commandButton id="ctlShop"
icon="ui-icon-cart"
value="Shop" immediate="true"
styleClass="#{recipeDetailBean.shop ? 'greenButton' : null}"
action="#{recipeDetailBean.doShop}"
update="ctlShop"
/>
<p:commandButton
icon="ui-icon-wrench"
value="Edit"
action="#{recipeDetailBean.editDescription}"
/>
<p:outputLabel for="@next"
value="Categories:"
/>
<h:outputText label="Category: "
value="#{userSession.formatCategories(recipeDetailBean.recipe)}"
/>
<p:outputLabel for="@next"
value="Cuisine:"
/>
<h:outputText label="Cuisine: "
value="#{recipeDetailBean.recipe.cuisine}"
/>
<p:outputLabel for="@next"
value="Prep Time:"
/>
<h:outputText label="Prep Time: "
value="#{recipeDetailBean.recipe.preptime}"
converter="com.mousetech.gourmetj.utils.TimeConverter"
/>
<p:outputLabel for="@next"
value="Cook Time:"
/>
<h:outputText label="Cook Time: "
value="#{recipeDetailBean.recipe.cooktime}"
converter="com.mousetech.gourmetj.utils.TimeConverter"
/>
<p:outputLabel for="@next"
value="Servings:"
/>
<h:outputText
value="#{recipeDetailBean.recipe.servings}"
/>
</p:panelGrid>
</p:panelGrid>
<p:panel id="sources">
<h:outputText value="#{recipeDetailBean.recipe.source}"/>
<br/>
<h:outputLink value="#{recipeDetailBean.recipe.link}"
rendered="#{not empty recipeDetailBean.recipe.link}"
> >
<!-- TODO: ask if we should save -->
<p:commandButton value="Home"
ajax="false"
icon="ui-icon-home"
action="home"
immediate="true"
/>
<p:commandButton ajax="false"
value="Print"
icon="ui-icon-print"
action="/recipePrint.jsf?faces-redirect=true"
styleClass="ui-button-print"
immediate="true"
/>
<p:commandButton id="ctlShop"
icon="ui-icon-cart"
value="Shop"
immediate="true"
styleClass="#{recipeDetailBean.shop ? 'greenButton' : null}"
action="#{recipeDetailBean.doShop}"
update="ctlShop"
/>
<p:commandButton
icon="ui-icon-wrench"
value="Edit"
action="#{recipeDetailBean.editDescription}"
/>
<p:outputLabel for="@next"
value="Categories:"
/>
<h:outputText
label="Category: "
value="#{userSession.formatCategories(recipeDetailBean.recipe)}"
/>
<p:outputLabel for="@next"
value="Cuisine:"
/>
<h:outputText
label="Cuisine: "
value="#{recipeDetailBean.recipe.cuisine}"
/>
<p:outputLabel for="@next"
value="Prep Time:"
/>
<h:outputText
label="Prep Time: "
value="#{recipeDetailBean.recipe.preptime}"
converter="com.mousetech.gourmetj.utils.TimeConverter"
/>
<p:outputLabel for="@next"
value="Cook Time:"
/>
<h:outputText
label="Cook Time: "
value="#{recipeDetailBean.recipe.cooktime}"
converter="com.mousetech.gourmetj.utils.TimeConverter"
/>
<p:outputLabel for="@next"
value="Servings:"
/>
<h:outputText
value="#{recipeDetailBean.recipe.servings}"
/>
</p:panelGrid>
</p:column>
<p:column>
<p:panel id="sources" style="width: fit-content;">
<h:outputText
value="#{recipeDetailBean.recipe.source}"
/>
<br />
<h:outputLink
value="#{recipeDetailBean.recipe.link}"
rendered="#{not empty recipeDetailBean.recipe.link}"
>
#{recipeDetailBean.recipe.link} #{recipeDetailBean.recipe.link}
</h:outputLink> </h:outputLink>
</p:panel> </p:panel>
</p:column>
</p:row>
</p:panelGrid> </p:panelGrid>
<!-- --> <!-- -->
<p:panel id="pnlInstr"> <p:panel id="pnlInstr">