Preguntas y respuestas funcionando para médicos
This commit is contained in:
@@ -1,85 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
|
||||
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:ui="http://java.sun.com/jsf/facelets" xmlns:f="http://java.sun.com/jsf/core" xmlns:h="http://java.sun.com/jsf/html"
|
||||
xmlns:p="http://primefaces.org/ui">
|
||||
|
||||
<ui:composition template="../header.xhtml">
|
||||
<ui:define name="content">
|
||||
<h:form id="TestForm">
|
||||
<p:messages id="mesgs" showDetail="true" closable="true" autoupdate="true" />
|
||||
<p:panel id="panelPendingQuestions" header="Listado de preguntas pendientes de respuesta">
|
||||
<div class="ui-g ui-fluid">
|
||||
|
||||
<div class="ui-g-4 ui-md-4">
|
||||
<p:outputLabel for="campo" value="Etiqueta para campo de formulario:" />
|
||||
</div>
|
||||
<div class="ui-g-4 ui-md-4">
|
||||
<p:inputText id="campo" value="Valor del campo del formulario" required="true" requiredMessage="Por favor, especifique un valor" />
|
||||
</div>
|
||||
<div class="ui-g-4 ui-md-4">
|
||||
<p:message for="campo" display="text" />
|
||||
</div>
|
||||
|
||||
<div class="ui-g-4 ui-md-4">
|
||||
<p:outputLabel for="campo2" value="Etiqueta para campo 2 de formulario:" />
|
||||
</div>
|
||||
<div class="ui-g-4 ui-md-4">
|
||||
<p:inputText id="campo2" value="Valor del campo 2 del formulario" required="true" requiredMessage="Por favor, especifique un valor" />
|
||||
</div>
|
||||
<div class="ui-g-4 ui-md-4">
|
||||
<p:message for="campo" display="text" />
|
||||
</div>
|
||||
|
||||
<div class="ui-g-4 ui-md-4">
|
||||
<p:outputLabel for="campo3" value="Etiqueta para campo 3 de formulario:" />
|
||||
</div>
|
||||
<div class="ui-g-4 ui-md-4">
|
||||
<p:inputText id="campo3" value="Valor del campo 3 del formulario" required="true" requiredMessage="Por favor, especifique un valor" />
|
||||
</div>
|
||||
<div class="ui-g-4 ui-md-4">
|
||||
<p:message for="campo" display="text" />
|
||||
</div>
|
||||
|
||||
<p:dataTable widgetVar="dtPendingQuestions" var="qs" value="#{PendingQuestions.lazyDataModelQuestionList}" lazy="true" paginator="true" rows="10" paginatorPosition="bottom" paginatorAlwaysVisible="true"
|
||||
paginatorTemplate="{CurrentPageReport} {FirstPageLink} {PreviousPageLink} {PageLinks} {NextPageLink} {LastPageLink} {RowsPerPageDropdown}" rowsPerPageTemplate="10,20,30,40">
|
||||
<p:column headerText="Id" width="60px;">
|
||||
<h:outputText value="#{qs.id}" />
|
||||
</p:column>
|
||||
|
||||
<p:column headerText="Title" width="auto">
|
||||
<h:outputText value="#{qs.title}"/>
|
||||
</p:column>
|
||||
|
||||
<p:column headerText="Patient" width="auto">
|
||||
<h:outputText value="#{qs.patient.displayName}" />
|
||||
</p:column>
|
||||
|
||||
<p:column headerText="Status" width="90px;">
|
||||
<h:outputText value="#{qs.status}" />
|
||||
</p:column>
|
||||
<p:column headerText="Acción" width="80px;">
|
||||
<h:outputText value="Responder" />
|
||||
</p:column>
|
||||
|
||||
<f:facet name="paginatorBottomLeft">
|
||||
<p:commandButton type="button" icon="pi pi-refresh" onclick="PF('dtPendingQuestions').getPaginator().setPage(0);" />
|
||||
</f:facet>
|
||||
</p:dataTable>
|
||||
|
||||
<div class="ui-g-12 ui-g-nopad">
|
||||
<div class="ui-g-4 ui-md-4" />
|
||||
<div class="ui-g-2 ui-md-2 ">
|
||||
<p:commandButton validateClient="true" value="Guardar" update="TestForm" action="#{PendingQuestions.saveData}" icon="pi pi-check" />
|
||||
</div>
|
||||
<div class="ui-g-2 ui-md-2">
|
||||
<p:button value="Volver" outcome="/home" icon="pi pi-home" />
|
||||
</div>
|
||||
<div class="ui-g-4 ui-md-4" />
|
||||
</div>
|
||||
</div>
|
||||
</p:panel>
|
||||
</h:form>
|
||||
</ui:define>
|
||||
</ui:composition>
|
||||
</html>
|
||||
80
1.sources/MyHealth/docroot/medicaltest/Questions.xhtml
Normal file
80
1.sources/MyHealth/docroot/medicaltest/Questions.xhtml
Normal file
@@ -0,0 +1,80 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
|
||||
<html xmlns="http://www.w3.org/1999/xhtml"
|
||||
xmlns:ui="http://java.sun.com/jsf/facelets"
|
||||
xmlns:f="http://java.sun.com/jsf/core"
|
||||
xmlns:h="http://java.sun.com/jsf/html"
|
||||
xmlns:p="http://primefaces.org/ui" xmlns:o="http://omnifaces.org/ui">
|
||||
|
||||
<ui:composition template="../header.xhtml">
|
||||
<ui:define name="content">
|
||||
<h:form id="frmQuestions">
|
||||
<p:growl id="msgs" showDetail="true" closable="true"
|
||||
autoupdate="true" />
|
||||
<p:panel id="panelQuestions" header="Preguntas">
|
||||
<div class="ui-g ui-fluid">
|
||||
<div class="ui-g-3 ui-md-3">
|
||||
<p:commandButton rendered="#{Questions.showCreate}" action="#{Questions.create}" value="Nuevo" update="panelDetail"></p:commandButton>
|
||||
<p:orderList value="#{Questions.pendingQuestions}" var="pq"
|
||||
controlsLocation="none" itemValue="#{pq}">
|
||||
<o:converter converterId="omnifaces.ListConverter"
|
||||
list="#{Questions.pendingQuestions}" />
|
||||
<p:ajax event="select" listener="#{Questions.onSelect}"
|
||||
update="panelDetail"></p:ajax >
|
||||
<p:ajax event="unselect" listener="#{Questions.onUnSelect}"
|
||||
update="panelDetail"></p:ajax>
|
||||
<p:column>
|
||||
<h:graphicImage name="images/#{pq.status}.png"
|
||||
alt="#{pq.status}" styleClass="ui-theme" />
|
||||
</p:column>
|
||||
<p:column>
|
||||
<h:outputText value="#{pq.title}" />
|
||||
</p:column>
|
||||
</p:orderList>
|
||||
</div>
|
||||
<div class="ui-g-1 ui-md-1"></div>
|
||||
<div class="ui-g-8 ui-md-8">
|
||||
<p:panel id="panelDetail" visible="#{Questions.showPanelDetail}" header="Pregunta de #{Questions.selected.patient.name} #{Questions.selected.patient.surname} ">
|
||||
<h:outputText rendered="#{Questions.selected.status != 'NEW'}">#{Questions.selected.title}</h:outputText>
|
||||
<p:inputText rendered="#{Questions.selected.status == 'NEW'}"></p:inputText>
|
||||
<p:textEditor rendered="#{Questions.selected.status == 'NEW'}" value="#{Questions.selected.message}" ></p:textEditor>
|
||||
<h:outputText rendered="#{Questions.selected.status != 'NEW'}" value="#{Questions.selected.message}" escape="false"></h:outputText>
|
||||
<p:panel rendered="#{Questions.selected.status != 'NEW'}" style="border: 0px !important;">
|
||||
<h3>Respuesta:</h3>
|
||||
<p:textEditor rendered="#{Questions.selected.status == 'PENDING'}" value="#{Questions.selected.response}"></p:textEditor>
|
||||
<h:outputText rendered="#{Questions.selected.status == 'ANSWERED'}" value="#{Questions.selected.response}" escape="false"></h:outputText>
|
||||
</p:panel>
|
||||
<br/>
|
||||
<p:commandButton rendered="#{Questions.selected.status != 'ANSWERED'}" value="#{Questions.selected.status == 'NEW' ? 'Preguntar' : 'Responder'}" action="#{Questions.save}" update="frmQuestions" icon="pi pi-save" ></p:commandButton>
|
||||
</p:panel>
|
||||
<!--
|
||||
<p:panel id="panelDetail" visible="#{Questions.showPanelDetail}" header="Pregunta de #{Questions.selected.patient.name} #{Questions.selected.patient.surname} ">
|
||||
<h:div rendered="#{Questions.selected.status == 'NEW'}">
|
||||
<p:inputText rendered="#{Questions.selected.status == 'NEW'}" aria-placeholder="Título de la pregunta"></p:inputText>
|
||||
<p:textEditor rendered="#{Questions.selected.status == 'NEW'}" value="#{Questions.selected.message}" ></p:textEditor>
|
||||
<br/>
|
||||
<p:commandButton rendered="#{Questions.selected.status == 'NEW'}" value="Preguntar" action="#{Questions.save}" update="frmQuestions" icon="pi pi-save" ></p:commandButton>
|
||||
</h:div>
|
||||
|
||||
<h:div rendered="#{Questions.selected.status != 'NEW'}">
|
||||
<h:h3 rendered="#{Questions.selected.status != 'NEW'}">#{Questions.selected.title}</h:h3>
|
||||
<h:outputText rendered="#{Questions.selected.status != 'NEW'}" value="#{Questions.selected.message}" escape="false"></h:outputText>
|
||||
<p:panel visible="#{Questions.selected.status != 'NEW'}" style="border: 0px !important;">
|
||||
<h3>Respuesta:</h3>
|
||||
<p:textEditor rendered="#{Questions.enableResponseEditor}" value="#{Questions.selected.response}"></p:textEditor>
|
||||
<h:outputText visible="#{Questions.enableResponseOutput}" value="#{Questions.selected.response}" escape="false"></h:outputText>
|
||||
</p:panel>
|
||||
<br/>
|
||||
<p:commandButton rendered="#{Questions.selected.status != 'NEW'}" value="Responder" action="#{Questions.save}" update="frmQuestions,listQuestions" icon="pi pi-save" ></p:commandButton>
|
||||
</h:div>
|
||||
</p:panel>
|
||||
-->
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</p:panel>
|
||||
</h:form>
|
||||
</ui:define>
|
||||
</ui:composition>
|
||||
</html>
|
||||
Reference in New Issue
Block a user