Commit 2b2d50ee by Tuomas Riihimäki

Merge branch 'master' into 'master'

paikkakoodia ja infoilua

Tarttis oppia käyttää brancheja, mut täsä o
2 parents fe44ba6d 7cb69d31
......@@ -2,6 +2,8 @@ package fi.codecrew.moya.beans;
import java.io.IOException;
import java.io.InputStream;
import java.math.BigInteger;
import java.util.BitSet;
import javax.ejb.EJB;
import javax.ejb.LocalBean;
......@@ -10,6 +12,8 @@ import javax.ejb.Stateless;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import com.google.common.primitives.UnsignedBytes;
import fi.codecrew.moya.facade.PlaceFacade;
import fi.codecrew.moya.facade.PrintedCardFacade;
import fi.codecrew.moya.model.EventUser;
......@@ -25,9 +29,17 @@ import fi.codecrew.moya.utilities.BarcodeUtils;
@LocalBean
public class BarcodeBean implements BarcodeBeanLocal {
private static final String PRINTED_CARD_PREFIX = "277"; //2M
private static final String EVENTUSER_PREFIX = "279"; //2O
private static final String PLACE_PREFIX = "289"; //2Y
private static final String PRINTED_CARD_BARCODEPREFIX = "277"; //2M
private static final String EVENTUSER_BARCODEPREFIX = "279"; //2O
private static final String PLACE_BARCODEPREFIX = "289"; //2Y
private static final String PRINTED_CARD_TEXTCODEPREFIX = "10";
private static final String PLACE_TEXTCODEPREFIX = "11";
private static final String EVENTUSER_TEXTCODEPREFIX = "12";
private static final String TEXTCODE_CHARACTER_MAP = "23456789ABCDEFGHJKLMNPQRSTUVWXYZ";
private static final int TEXTCODE_ROTATE_COUNT = 64; // 8*8
//private static final String NEXT_PREFIX = "265"; //2A
private static final Logger logger = LoggerFactory.getLogger(BarcodeBean.class);
......@@ -53,61 +65,54 @@ public class BarcodeBean implements BarcodeBeanLocal {
}
public InputStream getUserBarcode(EventUser user) throws IOException {
StringBuilder sb = new StringBuilder();
sb.append(EVENTUSER_PREFIX);
String idStr = user.getId().toString();
for (int i = 12 - idStr.length() - sb.length(); i > 0; --i) {
sb.append("0");
}
sb.append(idStr);
String barcode = sb.toString();
String barcode = generateBarcodeNumbers(EVENTUSER_BARCODEPREFIX, user.getId());
logger.debug("Geneating barcode for user {} : {}", user, barcode);
return BarcodeUtils.getBarcodeEAN(barcode);
}
public InputStream getCardBarcode(PrintedCard printedCard) throws IOException {
StringBuilder sb = new StringBuilder();
sb.append(PRINTED_CARD_PREFIX);
String idStr = printedCard.getId().toString();
for (int i = 12 - idStr.length() - sb.length(); i > 0; --i) {
sb.append("0");
}
sb.append(idStr);
String barcode = sb.toString();
String barcode = generateBarcodeNumbers(PRINTED_CARD_BARCODEPREFIX, printedCard.getId());
logger.debug("Geneating barcode for card {} : {}", printedCard, barcode);
return BarcodeUtils.getBarcodeEAN(barcode);
}
public String getPlaceHexcode(Place place) {
StringBuilder sb = new StringBuilder();
sb.append(PLACE_PREFIX);
String idStr = place.getId().toString();
for (int i = 8 - idStr.length() - sb.length(); i > 0; --i) {
sb.append("0");
public String getPlaceTextCode(Place place) {
String barcode = generateBarcodeNumbers(PLACE_TEXTCODEPREFIX, place.getId(), 8);
BigInteger intCode;
try {
intCode = new BigInteger(barcode);
} catch(NumberFormatException x)
{
return "GenFail";
}
String textCode = generateTextcode(intCode, 3);
BigInteger checkCode = textcodeToNumber(textCode, 3);
logger.debug("CheckCode {} : Original {}", checkCode, intCode);
if(checkCode.compareTo(intCode) != 0) {
logger.error("CheckCode {} : Original {}", checkCode, intCode);
return "GenError"; // different error messages, so we can tell where the error was
}
sb.append(idStr);
String barcode = sb.toString();
String hexcode = Long.toHexString(Long.parseLong(barcode));
String checksum = Integer.toHexString(hexcode.hashCode());
checksum = checksum.substring(checksum.length() - 3);
hexcode += checksum;
logger.debug("Geneating hexcode for place {} : {}", place.getId(), hexcode);
// logger.debug("Geneating hexcode for place {} : {}", place.getId(), textCode);
return hexcode;
return textCode;
}
public String getVrAuthCodeForCard(PrintedCard printedCard) {
StringBuilder sb = new StringBuilder();
sb.append(PRINTED_CARD_PREFIX);
sb.append(PRINTED_CARD_BARCODEPREFIX);
if (printedCard == null)
return "";
String idStr = printedCard.getId().toString();
......@@ -139,7 +144,7 @@ public class BarcodeBean implements BarcodeBeanLocal {
code = Integer.toString(decimal);
String prefix = code.substring(0, 2);
int id = Integer.parseInt(code.substring(3, code.length() - 1));
if (prefix.equals(PRINTED_CARD_PREFIX) && id != 0) {
if (prefix.equals(PRINTED_CARD_BARCODEPREFIX) && id != 0) {
PrintedCard printedCard = printedCardFacade.find(id);
if (printedCard != null)
return printedCard.getUser().getNick();
......@@ -153,13 +158,14 @@ public class BarcodeBean implements BarcodeBeanLocal {
}
@Override
public Place getPlaceFromHexcode(String hexcode) {
public Place getPlaceFromTextCode(String textcode) {
String barcode = "" + Integer.parseInt(hexcode, 16);
BigInteger numbercode = textcodeToNumber(textcode, 3);
String barcode = numbercode.toString();
try {
if (barcode.startsWith(PLACE_PREFIX)) {
int id = Integer.parseInt(barcode.substring(3, barcode.length() - 1));
if (barcode.startsWith(PLACE_TEXTCODEPREFIX)) {
int id = Integer.parseInt(barcode.substring(PLACE_TEXTCODEPREFIX.length(), barcode.length()));
Place place = placeFacade.find(id);
return place;
......@@ -176,7 +182,7 @@ public class BarcodeBean implements BarcodeBeanLocal {
// it's our special front barcode
try {
if (barcode.startsWith(PRINTED_CARD_PREFIX)) {
if (barcode.startsWith(PRINTED_CARD_BARCODEPREFIX)) {
int id = Integer.parseInt(barcode.substring(3, barcode.length() - 1));
PrintedCard card = printedCardFacade.find(id);
......@@ -204,7 +210,7 @@ public class BarcodeBean implements BarcodeBeanLocal {
try {
// it's our special front barcode
if (barcode.startsWith(EVENTUSER_PREFIX)) {
if (barcode.startsWith(EVENTUSER_BARCODEPREFIX)) {
int id = Integer.parseInt(barcode.substring(3, barcode.length() - 1));
logger.debug("finding user with barcode {} and id {}", barcode, id);
EventUser user = userBean.findByEventUserId(id);
......@@ -229,5 +235,241 @@ public class BarcodeBean implements BarcodeBeanLocal {
// TODO: tarttee hakea se paikkakoodi, ja sen avulla paikka. Toivon että se on ny tämä eikä placecodehäsmäkkä, mikä se oikeasti on. Vittu lisää refactorointia
}
private String generateBarcodeNumbers(String prefix, Integer id) {
return generateBarcodeNumbers(prefix,id,12);
}
/**
* Reverse for generateTextcode
* @param original
* @param bytecount
* @return
*/
private BigInteger textcodeToNumber(String original, int bytecount) {
BigInteger number = BigInteger.ZERO;
BigInteger divnumber = BigInteger.valueOf(TEXTCODE_CHARACTER_MAP.length());
int curExponent = 0;
int curIndex = original.length() -1;
do {
char curChar = original.charAt(curIndex);
BigInteger curNumber = BigInteger.valueOf(TEXTCODE_CHARACTER_MAP.indexOf(curChar));
number = number.add(curNumber.multiply(divnumber.pow(curExponent++)));
} while(--curIndex >= 0);
BigInteger convertedNumber = new BigInteger(reverseLinearFeedbackShiftRegister(number.toByteArray(),bytecount, TEXTCODE_ROTATE_COUNT));
return convertedNumber;
}
/**
*
* @param original Original code to convert
* @param bytecount Code width in bytes
* @return
*/
private String generateTextcode(BigInteger original, int bytecount) {
if(original == null || original.compareTo(BigInteger.ZERO) <= 0) {
return "GenFail";
}
BigInteger numbersLeft = new BigInteger(linearFeedbackShiftRegister(original.toByteArray(),bytecount, TEXTCODE_ROTATE_COUNT));
String converted = "";
BigInteger divnumber = BigInteger.valueOf(TEXTCODE_CHARACTER_MAP.length());
do {
BigInteger div = numbersLeft.divide(divnumber);
converted = TEXTCODE_CHARACTER_MAP.charAt(numbersLeft.subtract(div.multiply(divnumber)).intValue()) + converted;
numbersLeft = div;
if(numbersLeft.compareTo(divnumber) < 0) {
converted = TEXTCODE_CHARACTER_MAP.charAt(numbersLeft.intValue()) + converted;
numbersLeft = BigInteger.ZERO;
}
} while(numbersLeft.compareTo(BigInteger.ZERO) > 0);
return converted;
}
private String generateBarcodeNumbers(String prefix, Integer id, int lenght) {
StringBuilder sb = new StringBuilder();
sb.append(prefix);
String idStr = id.toString();
for (int i = lenght - idStr.length() - sb.length(); i > 0; --i) {
sb.append("0");
}
sb.append(idStr);
return sb.toString();
}
/**
* http://en.wikipedia.org/wiki/Linear_feedback_shift_register
*
* @param bytes bytes to rotate
* @param bytecount How many bytes we rotate from array, counting from right side
* @param times how many times we do lfsr-rotate
* @return rotated bytearray, this does not touch original array
*/
private byte[] reverseLinearFeedbackShiftRegister(byte[] bytes,int bytecount, int times) {
// remove empty bytes from bytearray, this way this number wont bloat
int emptySize = bytes.length - bytecount;
if(emptySize < 0) emptySize = 0;
byte[] convertedBytes = new byte[bytes.length - emptySize];
int y = emptySize;
for(int n = 0; n < convertedBytes.length; n++) {
convertedBytes[n] = bytes[y++];
}
// empty part removed, let's do some lfsr-magic
for(int n = 0; n < times; n++) {
boolean curbit = (convertedBytes[0] & 0b10000000) != 0;
curbit = curbit ^ ((convertedBytes[convertedBytes.length-1] & 0b10) != 0); // 2. bit from right
curbit = curbit ^ ((convertedBytes[convertedBytes.length-1] & 0b100) != 0); // 3. bit from right
curbit = curbit ^ ((convertedBytes[convertedBytes.length-1] & 0b10000) != 0); // 5. bit from right
// sift left one
for(int z = convertedBytes.length-1; z >= 0; z--) {
boolean overflowBit = ((convertedBytes[z] & 0b10000000) != 0);
convertedBytes[z] = (byte) (convertedBytes[z] << 1);
if(curbit) {
convertedBytes[z] = (byte) (convertedBytes[z] | 0b00000001);
} else {
convertedBytes[z] = (byte) (convertedBytes[z] & 0b11111110);
}
curbit = overflowBit;
}
}
// add 1 zerobyte to the start, just to be sure that this number is now bigger than 0
byte[] returnBytes = new byte[convertedBytes.length+1];
for(int n = 0; n < convertedBytes.length; n++) {
returnBytes[n+1] = convertedBytes[n];
}
return returnBytes;
}
/**
* http://en.wikipedia.org/wiki/Linear_feedback_shift_register
*
* @param bytes bytes to rotate
* @param bytecount How many bytes we rotate from array, counting from right side
* @param times how many times we do lfsr-rotate
* @return rotated bytearray, this does not touch original array
*/
private byte[] linearFeedbackShiftRegister(byte[] bytes, int bytecount, int times) {
// remove empty bytes from bytearray, this way this number wont bloat
int emptySize = bytes.length - bytecount;
if(emptySize < 0) emptySize = 0;
byte[] convertedBytes = new byte[bytes.length - emptySize];
int y = emptySize;
for(int n = 0; n < convertedBytes.length; n++) {
convertedBytes[n] = bytes[y++];
}
// empty part removed, let's do some lfsr-magic
for(int n = 0; n < times; n++) {
boolean curbit = (convertedBytes[convertedBytes.length-1] & 0b1) != 0; // rightmost byte
curbit = curbit ^ ((convertedBytes[convertedBytes.length-1] & 0b100) != 0); // 3. bit from right
curbit = curbit ^ ((convertedBytes[convertedBytes.length-1] & 0b1000) != 0); // 4. bit from right
curbit = curbit ^ ((convertedBytes[convertedBytes.length-1] & 0b100000) != 0); // 6. bit from right
// sift right one
for(int z = 0; z < convertedBytes.length; z++) {
boolean overflowBit = ((convertedBytes[z] & 0b1) != 0);
// >> uses leftmost bit as filler >>> uses 0 as filler
convertedBytes[z] = (byte) (convertedBytes[z] >>> 1);
if(curbit) {
convertedBytes[z] = (byte) (convertedBytes[z] | 0b10000000);
} else {
convertedBytes[z] = (byte) (convertedBytes[z] & 0b01111111);
}
curbit = overflowBit;
}
}
// add 1 zerobyte to the start, just to be sure that this number is now bigger than 0
byte[] returnBytes = new byte[convertedBytes.length+1];
for(int n = 0; n < convertedBytes.length; n++) {
returnBytes[n+1] = convertedBytes[n];
}
return returnBytes;
}
}
......@@ -20,6 +20,7 @@ import fi.codecrew.moya.enums.apps.MapPermission;
import fi.codecrew.moya.enums.apps.PollPermission;
import fi.codecrew.moya.enums.apps.ShopPermission;
import fi.codecrew.moya.enums.apps.SpecialPermission;
import fi.codecrew.moya.enums.apps.TerminalPermission;
import fi.codecrew.moya.enums.apps.TournamentPermission;
import fi.codecrew.moya.enums.apps.UserPermission;
import fi.codecrew.moya.facade.MenuNavigationFacade;
......@@ -196,7 +197,7 @@ public class MenuBean implements MenuBeanLocal {
adminShopProducts.addPage(menuitemfacade.findOrCreate("/product/list"), ShopPermission.LIST_ALL_PRODUCTS);
adminShopProducts.addPage(menuitemfacade.findOrCreate("/product/create"), ShopPermission.MANAGE_PRODUCTS);
adminShopProducts.addPage(menuitemfacade.findOrCreate("/product/edit"), ShopPermission.MANAGE_PRODUCTS).setVisible(false);
;
MenuNavigation foodnavi = adminshop.addPage(null, null);
foodnavi.setKey("topnavi.foodwave");
......@@ -256,13 +257,14 @@ public class MenuBean implements MenuBeanLocal {
gamenavi.addPage(menuitemfacade.findOrCreate("/license/manageCodes"), LicensePermission.MANAGE);
adminevent.addPage(menuitemfacade.findOrCreate("/eventorg/editEvent"), EventPermission.MANAGE_PROPERTIES);
navifacade.create(adminmenu);
//MenuNavigation shopmenu = new MenuNavigation(ev, "topnavi.shopnavi", menusort = +10);
// shopnavi.addPage(menuitemfacade.findOrCreate("/index3"),
// UserPermission.ANYUSER);
// navifacade.create(shopmenu);
MenuNavigation tournamentsadm = adminmenu.addPage(null, null);
tournamentsadm.setKey("tournaments.menutitle");
......@@ -273,6 +275,32 @@ public class MenuBean implements MenuBeanLocal {
tournamentsadm.addPage(menuitemfacade.findOrCreate("/tournaments/admin/edit"), TournamentPermission.MANAGE_ALL).setVisible(false);
tournamentsadm.addPage(menuitemfacade.findOrCreate("/tournaments/admin/delete"), TournamentPermission.MANAGE_ALL).setVisible(false);
tournamentsadm.addPage(menuitemfacade.findOrCreate("/tournaments/admin/editrules"), TournamentPermission.MANAGE_ALL).setVisible(false);
MenuNavigation infoviews = adminmenu.addPage(null, null);
infoviews.setKey("topnavi.infoviews");
infoviews.addPage(menuitemfacade.findOrCreate("/admin/adduser/index"), UserPermission.CREATE_NEW);
MenuNavigation infonavi = infoviews.addPage(null, null);
infonavi.setKey("subnavi.info");
infonavi.addPage(menuitemfacade.findOrCreate("/info/index"), TerminalPermission.INFO);
infonavi.addPage(menuitemfacade.findOrCreate("/info/incoming"), TerminalPermission.INFO);
navifacade.create(adminmenu);
//MenuNavigation shopmenu = new MenuNavigation(ev, "topnavi.shopnavi", menusort = +10);
// shopnavi.addPage(menuitemfacade.findOrCreate("/index3"),
// UserPermission.ANYUSER);
// navifacade.create(shopmenu);
/*
* MenuNavigation profileTopmenu = new MenuNavigation(ev,
* "topnavi.profile", menusort = +10);
......
......@@ -590,7 +590,7 @@ public class PlaceBean implements PlaceBeanLocal {
font.setSize(font2);
textLine = new TextLine(font);
textLine.setText(barcodeBean.getPlaceHexcode(place));
textLine.setText(barcodeBean.getPlaceTextCode(place));
textLine.setPosition(currentX, (pagey / 2) + font1);
textLine.setColor(new int[] { 0, 0, 0 });
textLine.drawOn(page);
......
......@@ -18,8 +18,8 @@ public interface BarcodeBeanLocal {
public InputStream getUserBarcode(EventUser user) throws IOException;
public InputStream getCardBarcode(PrintedCard printedCard) throws IOException;
public String getPlaceHexcode(Place place);
public Place getPlaceFromHexcode(String hexcode);
public String getPlaceTextCode(Place place);
public Place getPlaceFromTextCode(String hexcode);
public String checkVrAuthCode(String code);
public Product getProduct(String barcode);
......
package fi.codecrew.moya.model;
import java.beans.Transient;
import java.util.Calendar;
import java.util.Date;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.EnumType;
import javax.persistence.Enumerated;
import javax.persistence.JoinColumn;
import javax.persistence.Lob;
import javax.persistence.ManyToOne;
......@@ -42,7 +43,7 @@ public class ReaderEvent extends GenericEntity {
private String notes;
@JoinColumn(name = "printed_cards_id", referencedColumnName = "id", nullable = true, updatable = false)
@ManyToOne(optional = false)
@ManyToOne()
private PrintedCard printedCard;
@JoinColumn(name = "readers_id", referencedColumnName = "id", nullable = false, updatable = false)
......@@ -50,17 +51,18 @@ public class ReaderEvent extends GenericEntity {
private Reader reader;
@JoinColumn(name = "event_users_id", referencedColumnName = "id", nullable = true, updatable = false)
@ManyToOne(optional = false)
@ManyToOne()
private EventUser user;
@JoinColumn(name = "places_id", referencedColumnName = "id", nullable = true, updatable = false)
@ManyToOne(optional = false)
@ManyToOne()
private Place place;
@JoinColumn(name = "products_id", referencedColumnName = "id", nullable = true, updatable = false)
@ManyToOne(optional = false)
@ManyToOne()
private Product product;
@Enumerated(EnumType.STRING)
private ReaderEventType type;
public ReaderEvent(Date eventTime, Reader reader, String value) {
......
......@@ -10,16 +10,16 @@
<f:viewParam name="userid" value="#{userView.userid}" />
<f:event type="preRenderView" listener="#{incomingView.initPrintCardView}" />
</f:metadata>
<ui:define name="content">
<ui:define name="content">
<h:outputScript library="primefaces" name="jquery/jquery.js" target="head" />
<h1>#{i18n['incomingflow.userdetails']} </h1>
<h1>#{i18n['incomingflow.userdetails']}</h1>
<h:panelGrid id="cropper" columns="3">
<h:panelGroup>
<user:edit id="usereditor" commitaction="#{incomingView.saveUser()}" commitvalue="#{i18n['user.save']}" camAlwaysOn="true" />
<user:edit id="usereditor" commitaction="#{incomingView.saveUser()}" commitvalue="#{i18n['user.save']}" camAlwaysOn="true" />
</h:panelGroup>
<h:panelGroup>
<h:form id="imgCropperForm" rendered="#{!empty userView.user.currentImage}">
<p:commandButton value="#{i18n['user.imageCropRefresh']}" ajax="false" update="imgCropperForm" />
<p:commandButton value="#{i18n['user.imageCropRefresh']}" ajax="false" update="imgCropperForm" />
<h:outputLabel value="#{i18n['user.cropUserImage']}:" />
<p:imageCropper id="imgCropper" value="#{userView.croppedImage}" aspectRatio="0.7317073170731707" image="/dydata/userimage/#{userView.user.currentImage.id}.img" />
<br />
......@@ -27,18 +27,19 @@
</h:form>
</h:panelGroup>
<h:panelGroup>
<h:form >
<p:graphicImage url="/dydata/usercard/#{userView.user.user.id}.png" width="300" /><br />
<h:commandButton action="#{incomingView.printCard}" value="#{i18n['print']}" /> (status: #{incomingView.printedStatus})
<h:form>
<p:graphicImage url="/dydata/usercard/#{userView.user.user.id}.png" width="300" />
<br />
<h:commandButton action="#{incomingView.printCard}" value="#{i18n['print']}" /> (status: #{incomingView.printedStatus})
</h:form>
</h:panelGroup>
</h:panelGrid>
<h:outputText rendered="#{empty incomingView.groupMemberships}" value="#{i18n['placegroupview.noMemberships']}" />
<h:form rendered="#{!empty incomingView.groupMemberships}" id="placelistform">
<h:form rendered="#{!empty incomingView.groupMemberships}" id="placelistform">
<p:dataTable value="#{incomingView.groupMemberships}" var="member" rowStyleClass="#{member.enteredEvent != null ? 'success':''}">
......@@ -83,15 +84,15 @@
<h:panelGrid columns="2">
<h:outputText value="#{i18n['incomingflow.barcode']}" />
<h:outputText value="#{i18n['incomingflow.multisearch']}" />
<p:autoComplete id="acs" value="#{incomingView.searchBarcode}" completeMethod="#{incomingView.matchBarcode}">
<p:ajax event="itemSelect" listener="#{incomingView.changeUser}" />
</p:autoComplete>
<p:autoComplete id="acsb" value="#{incomingView.searchMulti}" completeMethod="#{incomingView.matchMulti}" converter="#{eventUserConverter}" var="usrx" itemLabel="#{usrx.shortUserDescriptor}" itemValue="#{usrx}">
<p:ajax event="itemSelect" listener="#{incomingView.changeUser}" />
</p:autoComplete>
</h:panelGrid>
</h:panelGrid>
</h:form>
</ui:define>
......
......@@ -9,6 +9,7 @@
xmlns:p="http://primefaces.org/ui"
xmlns:shop="http://java.sun.com/jsf/composite/cditools/shop"
xmlns:reader="http://java.sun.com/jsf/composite/cditools/reader"
xmlns:infoview="http://java.sun.com/jsf/composite/cditools/infoview"
xmlns:tools="http://java.sun.com/jsf/composite/cditools">
<h:body>
<ui:composition
......@@ -22,6 +23,11 @@
<f:event type="preRenderView" listener="#{readerList.initReaderList}" />
</f:metadata>
<ui:define name="headercontent">
<infoview:userselector />
</ui:define>
<ui:define name="content">
<h:form>
......@@ -36,6 +42,7 @@
</ui:define>
</ui:composition>
</h:body>
......
<?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:h="http://java.sun.com/jsf/html"
xmlns:f="http://java.sun.com/jsf/core"
xmlns:composite="http://java.sun.com/jsf/composite"
xmlns:ui="http://java.sun.com/jsf/facelets"
xmlns:c="http://java.sun.com/jsp/jstl/core"
xmlns:p="http://primefaces.org/ui"
xmlns:reader="http://java.sun.com/jsf/composite/cditools/reader"
>
<composite:interface>
</composite:interface>
<composite:implementation>
<reader:bacendReader />
</composite:implementation>
</html>
\ No newline at end of file
......@@ -283,12 +283,29 @@ label {
text-decoration: none;
}
#header_left {
float: left;
width: 400px;
}
#header_center {
float: left;
widows: 300px;
}
#header_right {
text-align: right;
float: right;
width: 400px;
}
.success {
color: #006600;
}
\ No newline at end of file
}
\ No newline at end of file
......@@ -14,6 +14,7 @@
<link rel="icon" href="#{request.contextPath}/favicon.ico" type="image/x-icon" />
<link rel="stylesheet" type="text/css" href="#{request.contextPath}/resources/templates/blipview/css/style.css" />
<link rel="stylesheet" type="text/css" href="#{request.contextPath}/resources/templates/blipview/css/general.css" />
<link rel="stylesheet" type="text/css" href="#{request.contextPath}/resources/templates/custom_components.css" />
<ui:insert name="headerdata" />
</h:head>
......@@ -37,8 +38,17 @@
</h1>
</ui:fragment>
</c:otherwise>
</c:choose>
</h:link>
<div class="topmenu">
<h:form>
<p:menubar rendered="#{primeMenuView.hasSecondaryMenu}" model="#{primeMenuView.secondaryMenuModel}" />
</h:form>
</div>
</div>
<div id="header_center">
<ui:insert name="headercontent" />
</div>
<div id="header_right">
<img src="#{request.contextPath}/resources/templates/template1/img/moya_logo.png" />
......
......@@ -231,12 +231,17 @@ resetMail.username = Username
resetmailSent.body = Email has been sent containing a link where you can change the password.
resetmailSent.header = Email sent
submenu.NotImplementedYet = Not implemented
submenu.frontpage = Frontpage
submenu.NotImplementedYet = Not implemented
submenu.admin.adduser = K\u00E4ytt\u00E4j\u00E4nlis\u00E4ys
submenu.admin.adduser.index = K\u00E4ytt\u00E4j\u00E4nlis\u00E4ys
submenu.frontpage = Frontpage
submenu.info.incoming = Incomingview
submenu.info.index = Infon\u00E4kym\u00E4
subnavi.cards = \u0009\u0009
subnavi.info = Info
topnavi.license = Lisenssikoodit
topnavi.license = Lisenssikoodit
user.cropImage = Crop
user.imageUpload.imageNotFound = Select image to upload
......
......@@ -909,6 +909,8 @@ sitepagelist.header = Site pages
submenu.NotImplementedYet = Not implemented
submenu.actionlog.messagelist = ActionLog
submenu.actionlog.taskview = View tasks
submenu.admin.adduser = Adduser
submenu.admin.adduser.index = Adduser
submenu.admin.adduser.login = Login
submenu.admin.adduser.start = Welcome
submenu.admin.adduser.update = Update profile picture
......@@ -935,6 +937,8 @@ submenu.foodmanager.listFoodwaves = List active foodwaves
submenu.foodwave.list = Foodwaves
submenu.foodwave.listTemplates = Food provides
submenu.index = Frontpage
submenu.info.incoming = Sis\u00E4\u00E4ntulo
submenu.info.index = Infoview
submenu.license.manageCodes = Manage codes
submenu.license.viewCodes = View codes
submenu.map.create = Create map
......@@ -993,6 +997,7 @@ submenu.voting.submitEntry = Submit entry
subnavi.billing = Billing
subnavi.cards = Cards
subnavi.info = Info
subnavi.products = Products
subnavi.readers = Readers
subnavi.roles = Roles
......@@ -1025,6 +1030,7 @@ topnavi.event = Event
topnavi.foodwave = Food
topnavi.frontpage = Front page
topnavi.game = Gamecodes
topnavi.infoviews = Infoviews
topnavi.license = Licensecodes
topnavi.log = Log
topnavi.login = Login
......
......@@ -357,7 +357,7 @@ foodwavetemplate.actions = Toimet
foodwavetemplate.addproduct = Lis\u00E4\u00E4
foodwavetemplate.basicinfo = Tilauspohja
foodwavetemplate.createFoodwave = Luo ruokatilaus
foodwavetemplate.createwave = Luo tilauspohja
foodwavetemplate.createwave = Luo tilaus
foodwavetemplate.description = Kuvaus
foodwavetemplate.edit = Muokkaa tilauspohjaa
foodwavetemplate.editRow = Muokkaa
......@@ -891,6 +891,8 @@ sitepagelist.header = Sivuston sis\u00E4ll\u00F6t
submenu.NotImplementedYet = Toteuttamatta
submenu.actionlog.messagelist = ActionLog
submenu.actionlog.taskview = N\u00E4yt\u00E4 toiminnat
submenu.admin.adduser = K\u00E4ytt\u00E4j\u00E4nlis\u00E4ys
submenu.admin.adduser.index = K\u00E4ytt\u00E4j\u00E4nlis\u00E4ys
submenu.admin.adduser.login = Kirjaudu sis\u00E4\u00E4n
submenu.admin.adduser.start = Tervetuloa
submenu.admin.adduser.update = P\u00E4ivit\u00E4 profiilikuva
......@@ -917,6 +919,8 @@ submenu.foodmanager.listFoodwaves = Aktiiviset ruokatilaukset
submenu.foodwave.list = Ruokatilaukset
submenu.frontpage = Etusivu
submenu.index = Etusivu
submenu.info.incoming = Incomingview
submenu.info.index = Infon\u00E4kym\u00E4
submenu.license.manageCodes = Hallinnoi lisenssej\u00E4
submenu.license.viewCodes = N\u00E4yt\u00E4 koodit
submenu.map.create = Uusi kartta
......@@ -978,6 +982,7 @@ submenu.voting.submitEntry = L\u00E4het\u00E4 entry
subnavi.billing = Laskutus
subnavi.cards = Kortit
subnavi.info = Info
subnavi.products = Tuotteet
subnavi.readers = Lukijat
subnavi.roles = Roolit
......@@ -1010,6 +1015,7 @@ topnavi.event = Tapahtuma
topnavi.foodwave = Ruokatilaus
topnavi.frontpage = Etusivu
topnavi.game = Pelikoodit
topnavi.infoviews = Infon\u00E4kym\u00E4t
topnavi.license = Lisenssikoodit
topnavi.log = Logi
topnavi.login = Kirjaudu sis\u00E4\u00E4n
......
......@@ -273,7 +273,8 @@ public class PlaceMap extends HttpServlet {
logger.error("Cannot convert string {} to color.", p.getProduct().getColor());
}
} else {
logger.debug("Nothing special for this place. Color should be default.");
// too much debugging -TKjne
// logger.debug("Nothing special for this place. Color should be default.");
}
......
......@@ -63,7 +63,8 @@ public class MenuView {
public List<PageContent> getPagecontent(String pagekey)
{
String key = new StringBuilder(layoutview.getPagepath()).append(":").append(pagekey).toString();
logger.debug("Getting pagecontent for key {}. Matches: {}", key, contents.containsKey(key));
// Removed by tkfftk, enought is enought
// logger.debug("Getting pagecontent for key {}. Matches: {}", key, contents.containsKey(key));
if (!contents.containsKey(key)) {
contents.put(key, pagebean.findContentsForUser(key, sessionstore.getLocale()));
......
......@@ -187,6 +187,9 @@ public class IncomingView extends GenericCDIView {
ReaderEvent event = readerView.getReaderEvent();
if(event == null)
return null;
EventUser user = event.getUser();
memberlist = null;
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!