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,14 +35,17 @@
/> />
</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;">
<p:graphicImage id="bigpix"
style="width: 132px;" style="width: 132px;"
src="/img/picture/#{recipeDetailBean.recipe.id}" value="/img/picture/#{recipeDetailBean.recipe.id}"
/> />
</p:column>
<p:column style="width: 18em;">
<p:panelGrid id="pnlButtons" <p:panelGrid id="pnlButtons"
columns="2" style="width: 220px;" columns="2"
> >
<!-- TODO: ask if we should save --> <!-- TODO: ask if we should save -->
<p:commandButton value="Home" <p:commandButton value="Home"
@ -60,7 +63,8 @@
/> />
<p:commandButton id="ctlShop" <p:commandButton id="ctlShop"
icon="ui-icon-cart" icon="ui-icon-cart"
value="Shop" immediate="true" value="Shop"
immediate="true"
styleClass="#{recipeDetailBean.shop ? 'greenButton' : null}" styleClass="#{recipeDetailBean.shop ? 'greenButton' : null}"
action="#{recipeDetailBean.doShop}" action="#{recipeDetailBean.doShop}"
update="ctlShop" update="ctlShop"
@ -73,26 +77,30 @@
<p:outputLabel for="@next" <p:outputLabel for="@next"
value="Categories:" value="Categories:"
/> />
<h:outputText label="Category: " <h:outputText
label="Category: "
value="#{userSession.formatCategories(recipeDetailBean.recipe)}" value="#{userSession.formatCategories(recipeDetailBean.recipe)}"
/> />
<p:outputLabel for="@next" <p:outputLabel for="@next"
value="Cuisine:" value="Cuisine:"
/> />
<h:outputText label="Cuisine: " <h:outputText
label="Cuisine: "
value="#{recipeDetailBean.recipe.cuisine}" value="#{recipeDetailBean.recipe.cuisine}"
/> />
<p:outputLabel for="@next" <p:outputLabel for="@next"
value="Prep Time:" value="Prep Time:"
/> />
<h:outputText label="Prep Time: " <h:outputText
label="Prep Time: "
value="#{recipeDetailBean.recipe.preptime}" value="#{recipeDetailBean.recipe.preptime}"
converter="com.mousetech.gourmetj.utils.TimeConverter" converter="com.mousetech.gourmetj.utils.TimeConverter"
/> />
<p:outputLabel for="@next" <p:outputLabel for="@next"
value="Cook Time:" value="Cook Time:"
/> />
<h:outputText label="Cook Time: " <h:outputText
label="Cook Time: "
value="#{recipeDetailBean.recipe.cooktime}" value="#{recipeDetailBean.recipe.cooktime}"
converter="com.mousetech.gourmetj.utils.TimeConverter" converter="com.mousetech.gourmetj.utils.TimeConverter"
/> />
@ -103,16 +111,22 @@
value="#{recipeDetailBean.recipe.servings}" value="#{recipeDetailBean.recipe.servings}"
/> />
</p:panelGrid> </p:panelGrid>
</p:panelGrid> </p:column>
<p:panel id="sources"> <p:column>
<h:outputText value="#{recipeDetailBean.recipe.source}"/> <p:panel id="sources" style="width: fit-content;">
<h:outputText
value="#{recipeDetailBean.recipe.source}"
/>
<br /> <br />
<h:outputLink value="#{recipeDetailBean.recipe.link}" <h:outputLink
value="#{recipeDetailBean.recipe.link}"
rendered="#{not empty 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">