First mainpage display

version2
Tim Holloway 2 years ago
parent 4bcf8b911f
commit 3083b2596c
  1. 9
      src/main/resources/META-INF/resources/WEB-INF/layout/layout.xhtml
  2. 79
      src/main/resources/META-INF/resources/main.xhtml

@ -5,24 +5,21 @@
xmlns:tc="http://myfaces.apache.org/tobago/component"
>
<f:view>
<tc:page id="page">
<title><ui:insert name="title">Gourmet Recipe Manager (web version)</ui:insert></title>
<link rel="icon" type="image/vnd.microsoft.icon"
href="#{pageContext.contextPath}/favicon.ico"
/>
<tc:style file="css/style.css" />
<h1>
<ui:insert name="title">Gourmet Recipe Manager (web version)</ui:insert>
</h1>
<ui:insert name="content">
<ui:include src="content.xhtml" />
</ui:insert>
<tc:footer fixed="true">
© 2021 Tim Holloway, Licensed under the <a
(C) 2021 Tim Holloway, Licensed under the <a
href="http://www.apache.org/licenses/LICENSE-2.0"
>Apache License, Version 2.0</a>.
<p>Based on Gourmet Recipe Manager by T. Hinkle</p>
</tc:footer>
</tc:page>
</f:view>
</ui:composition>

@ -1,67 +1,66 @@
<?xml version="1.0" encoding="UTF-8"?>
<ui:composition template="/WEB-INF/layout/layout.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:tc="http://myfaces.apache.org/tobago/component"
xmlns:p="http://primefaces.org/ui">
>
<ui:define name="title">Gourmet Recipe Manager</ui:define>
<ui:define name="content">
<tc:messages />
<tc:form id="form1">
<tc:section label="Find a Recipe" level="2">
<tc:gridLayout id="gfinder"
columns="60em auto auto"
>
<tc:in id="searchFor" focus="true"
<h:form id="form1">
<p:panelGrid label="Find a Recipe" columns="1">
<p:panelGrid columns="3">
<p:inputText id="searchFor" focus="true"
placeholder="Recipe title (todo) cuisine, etc."
value="#{adminMainBean.searchText}"
/>
<tc:button id="find" label="Find"
<p:button id="find" label="Find"
defaultCommand="true"
action="#{adminMainBean.doFind}"
>
<tc:style minWidth="58px" height="40px" />
</tc:button>
<tc:button label="New Recipe"
</p:button>
<p:button label="New Recipe"
action="#{adminMainBean.doNewRecipe}"
>
<tc:style minWidth="58px" height="40px" />
</tc:button>
</tc:gridLayout>
</tc:section>
</tc:form>
<tc:sheet id="table1" rows="30"
</p:button>
</p:panelGrid>
</p:panelGrid>
</h:form>
<p:dataTable id="table1" rows="30"
value="#{adminMainBean.searchResults}" var="row"
>
<tc:column label="Icon">
<tc:image width="64" height="64"
<p:column headerText="Icon">
<image width="64" height="64"
value="/gourmetj/img/thumb/#{row.id}"
/>
</tc:column>
<tc:column label="Recipe">
<tc:link action="#{adminMainBean.showRecipe}"
</p:column>
<p:column headerText="Recipe">
<h:commandLink action="#{adminMainBean.showRecipe}"
label="#{row.title}"
/>
</tc:column>
<tc:column label="Category">
<tc:out
</p:column>
<p:column headerText="Category">
<h:outputText
value="#{adminMainBean.formatCategories(row)}"
/>
</tc:column>
<tc:column label="Cuisine">
<tc:out value="#{row.cuisine}" />
</tc:column>
<tc:column label="Rating">
<tc:stars value="#{row.rating}" readonly="true" />
</tc:column>
<tc:column label="Source">
<tc:out value="#{row.source}" />
</tc:column>
<tc:column label="Prep Time">
<tc:out
</p:column>
<p:column headerText="Cuisine">
<h:outputText value="#{row.cuisine}" />
</p:column>
<p:column headerText="Rating">
<p:rating value="#{row.rating}" readonly="true" />
</p:column>
<p:column headerText="Source">
<h:outputText value="#{row.source}" />
</p:column>
<p:column headerText="Prep Time">
<h:outputText
value="#{adminMainBean.formatPreptime(row.preptime)}"
/>
</tc:column>
</tc:sheet>
</p:column>
</p:dataTable>
</ui:define>
</ui:composition>

Loading…
Cancel
Save