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>
<artifactId>gourmetj</artifactId>
<version>2.0.30</version>
<version>2.0.37</version>
<packaging>jar</packaging>
<name>GourmetJ</name>

View File

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