Commit 46437a83 by Juho Juopperi

Merge branch 'master' of dev.insomnia.fi:/data/bortal

2 parents 67906a73 f2ae3181
...@@ -59,4 +59,10 @@ public class ActionLogBean implements ActionLogBeanLocal { ...@@ -59,4 +59,10 @@ public class ActionLogBean implements ActionLogBeanLocal {
public List<Role> getAssignableRoles() { public List<Role> getAssignableRoles() {
return roleBean.listRoles(); return roleBean.listRoles();
} }
@Override
public ActionLogMessage find(Integer id) {
return actionLogFacade.find(id);
}
} }
...@@ -11,4 +11,5 @@ public interface ActionLogBeanLocal { ...@@ -11,4 +11,5 @@ public interface ActionLogBeanLocal {
public List<ActionLogMessage> getAllActionLogEvents(); public List<ActionLogMessage> getAllActionLogEvents();
public List<Role> getAssignableRoles(); public List<Role> getAssignableRoles();
public void createActionLogEvent(String message, Role crew, boolean isTask); public void createActionLogEvent(String message, Role crew, boolean isTask);
public ActionLogMessage find(Integer id);
} }
...@@ -19,7 +19,7 @@ public class GenericEntity extends EntityEquals implements ModelInterface<Intege ...@@ -19,7 +19,7 @@ public class GenericEntity extends EntityEquals implements ModelInterface<Intege
@Id @Id
@Column(name = ID_COLUMN, nullable = false) @Column(name = ID_COLUMN, nullable = false)
@ReturnInsert(returnOnly=true) // @ReturnInsert(returnOnly=true)
@GeneratedValue(strategy = GenerationType.IDENTITY) @GeneratedValue(strategy = GenerationType.IDENTITY)
private Integer id; private Integer id;
......
...@@ -4,8 +4,7 @@ ...@@ -4,8 +4,7 @@
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:ui="http://java.sun.com/jsf/facelets" <html xmlns="http://www.w3.org/1999/xhtml" xmlns:ui="http://java.sun.com/jsf/facelets"
xmlns:h="http://java.sun.com/jsf/html" xmlns:users="http://java.sun.com/jsf/composite/cditools/user" xmlns:h="http://java.sun.com/jsf/html" xmlns:users="http://java.sun.com/jsf/composite/cditools/user"
xmlns:tools="http://java.sun.com/jsf/composite/cditools" xmlns:f="http://java.sun.com/jsf/core" xmlns:tools="http://java.sun.com/jsf/composite/cditools" xmlns:f="http://java.sun.com/jsf/core"
xmlns:p="http://primefaces.org/ui" xmlns:p="http://primefaces.org/ui">
>
<h:body> <h:body>
<ui:composition template="/layout/#{sessionHandler.layout}/template.xhtml"> <ui:composition template="/layout/#{sessionHandler.layout}/template.xhtml">
...@@ -13,7 +12,7 @@ ...@@ -13,7 +12,7 @@
<!-- f:event type="preRenderView" listener="#{newsListView.initView}" /--> <!-- f:event type="preRenderView" listener="#{newsListView.initView}" /-->
</f:metadata> </f:metadata>
<ui:define name="content"> <ui:define name="content">
<h:outputStylesheet library="style" name="insomnia2/css/actionlog.css"></h:outputStylesheet> <h:outputStylesheet library="style" name="insomnia2/css/actionlog.css" />
<h1>#{i18n['actionlog.messagelist.header']}</h1> <h1>#{i18n['actionlog.messagelist.header']}</h1>
<p>#{i18n['actionlog.messagelist.description']}</p> <p>#{i18n['actionlog.messagelist.description']}</p>
<h:form id="actionlog_create"> <h:form id="actionlog_create">
...@@ -40,7 +39,8 @@ ...@@ -40,7 +39,8 @@
<h:selectBooleanCheckbox value="#{actionLogCreateView.task}"/> <h:selectBooleanCheckbox value="#{actionLogCreateView.task}"/>
</div> </div>
<h:commandButton class="sendbutton" action="#{actionLogCreateView.send}" value="#{i18n['actionlog.create.submitbutton']}" /> <h:commandButton class="sendbutton" action="#{actionLogCreateView.send}" value="#{i18n['actionlog.create.submitbutton']}">
</h:commandButton>
</div> </div>
</h:form> </h:form>
<div class="clearfix"></div> <div class="clearfix"></div>
...@@ -77,7 +77,9 @@ ...@@ -77,7 +77,9 @@
<h:outputText value="#{message.message}" /> <h:outputText value="#{message.message}" />
</h:column> </h:column>
<h:column> <h:column>
x <h:link rendered="#{!empty message.state}" >
Näytä tehtävä
</h:link>
</h:column> </h:column>
</h:dataTable> </h:dataTable>
</h:form> </h:form>
......
<!DOCTYPE html
PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:ui="http://java.sun.com/jsf/facelets"
xmlns:h="http://java.sun.com/jsf/html" xmlns:users="http://java.sun.com/jsf/composite/cditools/user"
xmlns:tools="http://java.sun.com/jsf/composite/cditools" xmlns:f="http://java.sun.com/jsf/core"
>
<h:body>
<ui:composition template="/layout/#{sessionHandler.layout}/template.xhtml">
<f:metadata>
<f:viewParam name="id" value="#{taskModificationView.id}"></f:viewParam>
<f:event type="preRenderView" listener="#{taskModificationView.initView}" />
</f:metadata>
<ui:define name="content">
<h:outputStylesheet library="style" name="insomnia2/css/actionlog.css"></h:outputStylesheet>
<h1>Task: insert id<!-- #{i18n['actionlog.messagelist.header']} --></h1>
<!-- <p>Mo #{i18n['actionlog.messagelist.description']} </p> -->
<table>
<tr>
<td><h:outputText class="taskHeader" value="Submit time/date: " /></td>
<td><h:outputText value="#{taskModification.message.time}" /></td>
</tr>
<tr>
<td><h:outputText class="taskHeader" value="Submitter: " /></td>
<td><h:outputText value="infopoika69" /></td>
</tr>
<tr>
<td><h:outputText class="taskHeader" value="Target crew: " /></td>
<td><h:outputText value="net" /></td>
</tr>
<tr>
<td><h:outputText class="taskHeader" value="State: " /></td>
<td><h:outputText value="odottaa nappaamista" /></td>
</tr>
<tr>
<td><h:outputText class="taskHeader" value="Message: " /></td>
<td><h:outputText value="verkko ei toimi." /></td>
</tr>
</table>
<div class="clearfix"></div>
<div id="actionlog">
</div>
</ui:define>
</ui:composition>
</h:body>
</html>
\ No newline at end of file
...@@ -43,11 +43,6 @@ ...@@ -43,11 +43,6 @@
</div> </div>
<div id="container" class="top" /> <div id="container" class="top" />
<div id="container" class="clearfix"> <div id="container" class="clearfix">
<div id="left">
<ui:insert name="title" />
<h:messages globalOnly="true" />
<ui:insert name="content" />
</div>
<c:if test="#{menuView.submenu.size() > 1}"> <c:if test="#{menuView.submenu.size() > 1}">
<div id="right"> <div id="right">
...@@ -61,6 +56,12 @@ ...@@ -61,6 +56,12 @@
</ul> </ul>
</div> </div>
</c:if> </c:if>
<div id="left">
<ui:insert name="title" />
<h:messages globalOnly="true" />
<ui:insert name="content" />
</div>
</div> </div>
<div id="container" class="bottom"></div> <div id="container" class="bottom"></div>
</div> </div>
......
...@@ -78,3 +78,9 @@ ...@@ -78,3 +78,9 @@
#actionlog tr.rowodd { #actionlog tr.rowodd {
background-color: #9a9a9a; background-color: #9a9a9a;
} }
.taskHeader {
color: #7DAC0C;
font-size: 120%;
font-weight: bold;
}
\ No newline at end of file
...@@ -14,11 +14,11 @@ body, html {width: 100%; height: 100%; color: #343434; font-family: trebuchet m ...@@ -14,11 +14,11 @@ body, html {width: 100%; height: 100%; color: #343434; font-family: trebuchet m
a {color: #0037bc;} a {color: #0037bc;}
a:hover {color: #7dac0c;} a:hover {color: #7dac0c;}
#container {width: 100%; background:url(../img/container.png) repeat-y; font-size: 13px;} #container {width: 100%; background:url(../img/container.png) repeat-y; font-size: 13px;}
#container #left {width: 680px; float: left; padding: 10px 20px;} #container #left {padding: 10px 20px;}
#left h1 {color:#7dac0c; font-size: 24px; padding-top:0px; margin-top: 0px;} #left h1 {color:#7dac0c; font-size: 24px; padding-top:0px; margin-top: 0px;}
#left h2 {color:#7dac0c; font-size: 18px;} #left h2 {color:#7dac0c; font-size: 18px;}
#left h3 {color:#7dac0c; font-size: 16px;} #left h3 {color:#7dac0c; font-size: 16px;}
#right {float:left; border-left: 1px dotted #c0c0c0; padding: 10px 20px; width: 200px;} #right {float:right; border-left: 1px dotted #c0c0c0; padding: 10px 20px; width: 200px;}
#right h1, #right h1 a {color:#7dac0c; font-size: 18px; padding-top: 0px; margin-top:0px; text-decoration:none;} #right h1, #right h1 a {color:#7dac0c; font-size: 18px; padding-top: 0px; margin-top:0px; text-decoration:none;}
#container.top {width: 100%; background:url(../img/container-top.png) no-repeat; height: 15px;} #container.top {width: 100%; background:url(../img/container-top.png) no-repeat; height: 15px;}
......
package fi.insomnia.bortal.web.cdiview.actionlog;
import javax.ejb.EJB;
import javax.enterprise.context.ConversationScoped;
import javax.inject.Named;
import fi.insomnia.bortal.beans.ActionLogBeanLocal;
import fi.insomnia.bortal.model.ActionLogMessage;
import fi.insomnia.bortal.web.cdiview.GenericCDIView;
@Named
@ConversationScoped
public class TaskModificationView extends GenericCDIView {
private Integer id;
private ActionLogMessage message;
@EJB
private ActionLogBeanLocal logbean;
public void initView(){
if(message == null) {
super.beginConversation();
message = logbean.find(id);
}
}
public Integer getId() {
return id;
}
public void setId(Integer id) {
this.id = id;
}
}
package fi.insomnia.bortal.web.converter;
import javax.enterprise.context.RequestScoped;
import javax.faces.component.UIComponent;
import javax.faces.context.FacesContext;
import javax.faces.convert.Converter;
import javax.inject.Named;
@Named("taskTypeConverter")
@RequestScoped
public class ActionlogTaskTypeConverter implements Converter {
@Override
public Object getAsObject(FacesContext context, UIComponent component,
String value) {
// TODO Auto-generated method stub
return null;
}
@Override
public String getAsString(FacesContext context, UIComponent component,
Object value) {
if(value == null) {
return "";
}
else {
return "x";
}
}
}
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!