Migrated Overvuiew tab to included template
This commit is contained in:
parent
e4bc1f9b7e
commit
91cefd5002
2
pom.xml
2
pom.xml
|
@ -7,7 +7,7 @@
|
|||
|
||||
<groupId>com.mousetech.gourmet</groupId>
|
||||
<artifactId>gourmetj</artifactId>
|
||||
<version>2.0.18</version>
|
||||
<version>2.0.23</version>
|
||||
<packaging>jar</packaging>
|
||||
|
||||
<name>GourmetJ</name>
|
||||
|
|
|
@ -0,0 +1,107 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE html>
|
||||
<ui:composition
|
||||
xmlns="http://www.w3.org/1999/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"
|
||||
>
|
||||
<!-- Overview tab body -->
|
||||
<p:panelGrid columns="2"
|
||||
columnClasses="deDescl, deDescr"
|
||||
>
|
||||
<f:facet name="header">Description</f:facet>
|
||||
<p:outputLabel for="@next" value="Title" />
|
||||
<p:inputText id="rtitle" size="45"
|
||||
required="true"
|
||||
placeholder="A recipe title is required."
|
||||
value="#{recipeDetailBean.recipe.title}"
|
||||
>
|
||||
<p:focus />
|
||||
<f:ajax execute="rtitle" render="editorPanel" />
|
||||
</p:inputText>
|
||||
<!-- -->
|
||||
<p:panel id="catPanel" styleClass="noBorders"
|
||||
style="display: flex; flex-direction: row; align-items: center;"
|
||||
>
|
||||
<p:outputLabel for="rcategory"
|
||||
value="Category" />
|
||||
</p:panel>
|
||||
<p:panel id="catEdit" styleClass="noBorders">
|
||||
<p:inputText id="rcategory"
|
||||
label="Category"
|
||||
value="#{recipeDetailBean.category}"
|
||||
tip="One or more categories, separated by commas (ex: Entree, Soup)" />
|
||||
<p:commandButton
|
||||
value="<- Suggest"
|
||||
>
|
||||
<f:ajax execute="rcategory bxCat"
|
||||
listener="#{recipeDetailBean.ajaxSuggestCategory}"
|
||||
render="rcategory" />
|
||||
</p:commandButton>
|
||||
<p:selectOneMenu id="bxCat"
|
||||
value="#{recipeDetailBean.catToAdd}"
|
||||
tip="Recipe category suggestions, based on previous selections"
|
||||
>
|
||||
<f:selectItems
|
||||
value="#{recipeDetailBean.suggestCategory}" />
|
||||
</p:selectOneMenu>
|
||||
</p:panel>
|
||||
<!-- -->
|
||||
<p:outputLabel for="@next" value="Cuisine" />
|
||||
<p:autoComplete id="rcuisine"
|
||||
value="#{recipeDetailBean.recipe.cuisine}"
|
||||
completeMethod="#{recipeDetailBean.cuisineSuggestions}" />
|
||||
<p:outputLabel for="@next"
|
||||
value="Prep Time" />
|
||||
<p:inputText id="rpreptime" max="10"
|
||||
value="#{recipeDetailBean.recipe.preptime}"
|
||||
>
|
||||
<f:converter
|
||||
converterId="com.mousetech.gourmetj.utils.TimeConverter" />
|
||||
</p:inputText>
|
||||
<p:outputLabel for="@next"
|
||||
value="Cooking Time" />
|
||||
<p:inputText id="rcooktime" max="10"
|
||||
value="#{recipeDetailBean.recipe.cooktime}"
|
||||
>
|
||||
<f:converter
|
||||
converterId="com.mousetech.gourmetj.utils.TimeConverter" />
|
||||
</p:inputText>
|
||||
<p:outputLabel for="@next" value="Servings" />
|
||||
<p:inputText id="rserves" max="10"
|
||||
value="#{recipeDetailBean.recipe.servings}" />
|
||||
<p:outputLabel for="@next" value="Rating" />
|
||||
<p:rating id="rrating" max="10"
|
||||
value="#{recipeDetailBean.recipe.rating}" />
|
||||
<p:outputLabel for="@next" value="Source" />
|
||||
<p:inputText id="rsource" size="45"
|
||||
value="#{recipeDetailBean.recipe.source}" />
|
||||
<p:outputLabel for="@next" value="URL" />
|
||||
<p:inputText id="rurl" size="45"
|
||||
value="#{recipeDetailBean.recipe.link}" />
|
||||
<p:outputLabel for="@next"
|
||||
value="Description" />
|
||||
<p:inputTextarea id="description"
|
||||
rows="10" cols="45"
|
||||
value="#{recipeDetailBean.recipe.description}" />
|
||||
</p:panelGrid>
|
||||
<p:panel id="picPanel">
|
||||
<img id="bigPix"
|
||||
src="/img/picture/?dt=#{recipeDetailBean.currentTime}" />
|
||||
</p:panel>
|
||||
<p:panelGrid id="picButtonPanel" columns="2">
|
||||
<p:fileUpload id="ctlUpload"
|
||||
label="Upload Image"
|
||||
listener="#{recipeDetailBean.ajaxUploadImage}"
|
||||
global="true" mode="advanced" multiple="false"
|
||||
update="picPanel" auto="true" sizeLimit="1000000"
|
||||
allowTypes="/(\.|\/)(gif|jpe?g|png|webp)$/" />
|
||||
<p:commandButton id="ctlDelImg"
|
||||
value="Delete Image"
|
||||
action="#{recipeDetailBean.ajaxDeleteImage}"
|
||||
update="picPanel" immediate="true" />
|
||||
</p:panelGrid>
|
||||
</ui:composition>
|
|
@ -59,145 +59,8 @@
|
|||
<p:tab id="overviewTab"
|
||||
title="Description"
|
||||
>
|
||||
<p:panelGrid columns="2"
|
||||
columnClasses="deDescl, deDescr"
|
||||
>
|
||||
<f:facet name="header">Description</f:facet>
|
||||
<p:outputLabel for="@next"
|
||||
value="Title"
|
||||
/>
|
||||
<p:inputText id="rtitle"
|
||||
size="45" required="true"
|
||||
placeholder="A recipe title is required."
|
||||
value="#{recipeDetailBean.recipe.title}"
|
||||
>
|
||||
<p:focus />
|
||||
<f:ajax execute="rtitle"
|
||||
render="editorPanel"
|
||||
/>
|
||||
</p:inputText>
|
||||
<!-- -->
|
||||
<p:panel id="catPanel"
|
||||
styleClass="noBorders"
|
||||
style="display: flex; flex-direction: row; align-items: center;"
|
||||
>
|
||||
<p:outputLabel for="rcategory"
|
||||
value="Category"
|
||||
/>
|
||||
</p:panel>
|
||||
<p:panel id="catEdit" styleClass="noBorders">
|
||||
<p:inputText id="rcategory"
|
||||
label="Category"
|
||||
value="#{recipeDetailBean.category}"
|
||||
tip="One or more categories, separated by commas (ex: Entree, Soup)"
|
||||
/>
|
||||
<p:commandButton
|
||||
value="<- Suggest"
|
||||
>
|
||||
<f:ajax
|
||||
execute="rcategory bxCat"
|
||||
listener="#{recipeDetailBean.ajaxSuggestCategory}"
|
||||
render="rcategory"
|
||||
/>
|
||||
</p:commandButton>
|
||||
<p:selectOneMenu id="bxCat"
|
||||
value="#{recipeDetailBean.catToAdd}"
|
||||
tip="Recipe category suggestions, based on previous selections"
|
||||
>
|
||||
<f:selectItems
|
||||
value="#{recipeDetailBean.suggestCategory}"
|
||||
/>
|
||||
</p:selectOneMenu>
|
||||
</p:panel>
|
||||
<!-- -->
|
||||
<p:outputLabel for="@next"
|
||||
value="Cuisine"
|
||||
/>
|
||||
<p:autoComplete id="rcuisine"
|
||||
value="#{recipeDetailBean.recipe.cuisine}"
|
||||
completeMethod="#{recipeDetailBean.cuisineSuggestions}"
|
||||
/>
|
||||
<p:outputLabel for="@next"
|
||||
value="Prep Time"
|
||||
/>
|
||||
<p:inputText id="rpreptime"
|
||||
max="10"
|
||||
value="#{recipeDetailBean.recipe.preptime}"
|
||||
>
|
||||
<f:converter
|
||||
converterId="com.mousetech.gourmetj.utils.TimeConverter"
|
||||
/>
|
||||
</p:inputText>
|
||||
<p:outputLabel for="@next"
|
||||
value="Cooking Time"
|
||||
/>
|
||||
<p:inputText id="rcooktime"
|
||||
max="10"
|
||||
value="#{recipeDetailBean.recipe.cooktime}"
|
||||
>
|
||||
<f:converter
|
||||
converterId="com.mousetech.gourmetj.utils.TimeConverter"
|
||||
/>
|
||||
</p:inputText>
|
||||
<p:outputLabel for="@next"
|
||||
value="Servings"
|
||||
/>
|
||||
<p:inputText id="rserves"
|
||||
max="10"
|
||||
value="#{recipeDetailBean.recipe.servings}"
|
||||
/>
|
||||
<p:outputLabel for="@next"
|
||||
value="Rating"
|
||||
/>
|
||||
<p:rating id="rrating" max="10"
|
||||
value="#{recipeDetailBean.recipe.rating}"
|
||||
/>
|
||||
<p:outputLabel for="@next"
|
||||
value="Source"
|
||||
/>
|
||||
<p:inputText id="rsource"
|
||||
size="45"
|
||||
value="#{recipeDetailBean.recipe.source}"
|
||||
/>
|
||||
<p:outputLabel for="@next"
|
||||
value="URL"
|
||||
/>
|
||||
<p:inputText id="rurl" size="45"
|
||||
value="#{recipeDetailBean.recipe.link}"
|
||||
/>
|
||||
<p:outputLabel for="@next"
|
||||
value="Description"
|
||||
/>
|
||||
<p:inputTextarea id="description"
|
||||
rows="10" cols="45"
|
||||
value="#{recipeDetailBean.recipe.description}"
|
||||
/>
|
||||
</p:panelGrid>
|
||||
<p:panel id="picPanel">
|
||||
<img id="bigPix"
|
||||
src="/img/picture/?dt=#{recipeDetailBean.currentTime}"
|
||||
/>
|
||||
</p:panel>
|
||||
<p:panelGrid id="picButtonPanel"
|
||||
columns="2"
|
||||
>
|
||||
<p:fileUpload id="ctlUpload"
|
||||
label="Upload Image"
|
||||
listener="#{recipeDetailBean.ajaxUploadImage}"
|
||||
global="true" mode="advanced"
|
||||
multiple="false"
|
||||
update=":messages picPanel"
|
||||
auto="true"
|
||||
sizeLimit="1000000"
|
||||
allowTypes="/(\.|\/)(gif|jpe?g|png|webp)$/"
|
||||
/>
|
||||
<p:commandButton id="ctlDelImg"
|
||||
value="Delete Image"
|
||||
action="#{recipeDetailBean.ajaxDeleteImage}"
|
||||
update="picPanel"
|
||||
immediate="true"
|
||||
/>
|
||||
</p:panelGrid>
|
||||
<ui:include
|
||||
src="/WEB-INF/layout/panels/editRecipe/overview.xhtml"/>
|
||||
</p:tab>
|
||||
<p:tab id="ingredientsTab"
|
||||
title="Ingredients"
|
||||
|
|
Loading…
Reference in New Issue
Block a user