Commit f71032c4 by Tuomas Riihimäki

Random minor versioninfo, placemove, etc changes

1 parent d0eba7a0
......@@ -20,6 +20,7 @@
<!-- this is false by default, forces the plugin to generate the git.properties
file -->
<generateGitPropertiesFile>true</generateGitPropertiesFile>
<generateGitPropertiesFilename>./target/classes/git.properties</generateGitPropertiesFilename>
<!-- The path for the to be generated properties file, it's relative
to ${project.basedir} -->
......
......@@ -26,8 +26,6 @@ public enum MapPermission implements IAppPermission {
VIEW, // ("View maps"),
MANAGE_MAPS,
MOVE_PLACES,
//RELEASE_PLACE, // ("Create and modify maps")
;
public static final String S_MANAGE_OTHERS = "MAP/MANAGE_OTHERS";
......
......@@ -10,6 +10,7 @@
<f:event type="preRenderView" listener="#{billListView.initUsersBills}" />
</f:metadata>
<h1><h:outputText value="#{i18n['bill.list.header']}" />></h1>
<ui:define name="content">
<h:form id="billList" styleClass="moya_datatable3">
......
......@@ -28,9 +28,17 @@
<h3>
<h:outputText value="#{i18n['placemove.header']}"/>
</h3>
<p:fragment id="placeselector">
<h:form>
<h:outputText value="#{i18n['placemove.noMovablePlaces']}" rendered="#{mapPlacechangeView.slots.rowCount == 0}"/>
<p:fragment id="placeselector" rendered="#{mapPlacechangeView.slots.rowCount > 0}">
<ui:fragment rendered="#{!mapPlacechangeView.movingForSelf}">
<h2><h:link outcome="/useradmin/edit" value="#{i18n['placemove.movingFor']}: #{mapPlacechangeView.user.wholeName}">
<f:param value="#{mapPlacechangeView.user.user.id}" name="userid"/>
</h:link></h2>
</ui:fragment>
<h:form>
<p:dataTable id="slottable" tableStyle="width: auto;" var="slot"
value="#{mapPlacechangeView.slots}">
<!-- rowStyleClass="#{mapPlacechangeView.srcPlace.contains(slot.place) ? 'selected' : 'unselected'}" -->
......@@ -46,7 +54,7 @@
</p:column>
<p:column headerText="#{i18n['placemove.placeuser']}">
<h:outputText rendered="#{!empty slot.src.place.currentUser}"
value="#{slot.src.place.currentUser.wholeNmae}"/>
value="#{slot.src.place.currentUser.wholeName}"/>
<h:outputText rendered="#{empty slot.src.place.currentUser}"
value="-"/>
</p:column>
......@@ -83,7 +91,6 @@
<h:form id="placemove">
<p:commandButton
disabled="#{!mapPlacechangeView.isReadyForCommit()}"
rendered="#{ajaxMapView.canUserBuy()}"
value="#{i18n['placemove.commitMove']}"
action="#{mapPlacechangeView.commitMove()}" ajax="false"/>
</h:form>
......
......@@ -22,9 +22,7 @@
</ui:define>
<ui:define name="content">
<h:link outcome="/neomap/moveplaces" value="#{i18n['placegroupview.moveUsersPlaces']}">
<f:param name="userId" value="#{userView.user.user.id}"/>
</h:link>
<h:outputText rendered="#{empty placeGroupView.groupMemberships}"
value="#{i18n['placegroupview.noMemberships']}"/>
......@@ -76,6 +74,10 @@
value="#{i18n['placegroup.printPdf']}"/>
</p>
<h:link outcome="/neomap/moveplaces" value="#{i18n['placegroupview.moveUsersPlaces']}">
<f:param name="userId" value="#{userView.user.user.id}"/>
</h:link>
<h2>#{i18n['placetoken.pageHeader']}</h2>
<p>#{i18n['placetoken.topText']}</p>
<h:form id="placeTokenForm">
......
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
"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:f="http://java.sun.com/jsf/core"
xmlns:c="http://java.sun.com/jsp/jstl/core">
xmlns:c="http://java.sun.com/jsp/jstl/core">
<h:body>
<ui:composition template="#{sessionHandler.template}">
<ui:define name="content">
#{sessionHandler.flushCache()}
<h:form>
<!-- Enable only when needed: -->
<h:commandButton action="#{testView.sendMultibuggageSpam}" value="MULTIUSERSPAM" onclick="return confirm('SPAMSPAMSPAMS?!');" />
<h:commandButton action="#{testView.resetMenu()}" value="Reset to newui menu" onclick="return confirm('THIS WILL RESET ALL MODIFICATIONS TO DEFAULT MENU!!\n Are you really sure?!');" />
<h:commandButton action="#{testView.resetOldMenu()}" value="Reset to old menu" onclick="return confirm('THIS WILL RESET ALL MODIFICATIONS TO DEFAULT MENU!!\n Are you really sure?!');" />
</h:form>
Buttons have moved to <h:link outcome="/utils/index/"/> This page just clears cache.. Use with caution!
#{sessionHandler.flushCache()}
<ul>
<li>Build time #{testView.gitProps.getProperty('git.build.time')}</li>
<li>Build user: #{testView.gitProps.getProperty('git.build.user.name')}</li>
<li>Commit time #{testView.gitProps.getProperty('git.commit.time')}</li>
<li>Git id #{testView.gitProps.getProperty('git.commit.id.abbrev')}</li>
</ul>
</ui:define>
</ui:composition>
</h:body>
......
<!DOCTYPE html
PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<!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:f="http://java.sun.com/jsf/core"
xmlns:users="http://java.sun.com/jsf/composite/tools/user" xmlns:c="http://java.sun.com/jsp/jstl/core">
xmlns:users="http://java.sun.com/jsf/composite/tools/user" xmlns:c="http://java.sun.com/jsp/jstl/core">
<h:body>
<ui:composition template="#{sessionHandler.template}">
<ui:param name="thispage" value="page.eventorg.edit" />
<ui:define name="content">
<h:form>
<h1>Random utility stuff</h1>
<h:form>
<ul>
<li><h:commandButton action="#{sessionHandler.flushCache()}" value="Flush cache"/></li>
<li><h:commandButton action="#{testView.makeTestData()}" value="Make test data"/></li>
<li><h:commandButton action="#{testView.resetMenu()}" value="Reset to newui menu"
onclick="return confirm('THIS WILL RESET ALL MODIFICATIONS TO DEFAULT MENU!!\n Are you really sure?!');"/></li>
<li><h:commandButton action="#{testView.resetOldMenu()}" value="Reset to old menu"
onclick="return confirm('THIS WILL RESET ALL MODIFICATIONS TO DEFAULT MENU!!\n Are you really sure?!');"/></li>
<li><h:commandButton action="#{testView.sendMultibuggageSpam}" value="MULTIUSERSPAM" onclick="return confirm('SPAMSPAMSPAMS?!');"/></li>
<h:commandButton action="#{sessionHandler.flushCache()}" value="Flush cache" />
<h:commandButton action="#{testView.makeTestData()}" value="Make test data" />
<h:commandButton action="#{testView.resetMenu()}" value="Reset menu" onclick="return confirm('THIS WILL RESET ALL MODIFICATIONS TO DEFAULT MENU!!\n Are you really sure?!');" />
<h:commandButton action="#{sessionHandler.reindexCompass()}" value="Reindex Compass" />
</ul>
</h:form>
<h2>Version data</h2>
<ul>
<li>Build time #{testView.gitProps.getProperty('git.build.time')}</li>
<li>Build user: #{testView.gitProps.getProperty('git.build.user.name')}</li>
<li>Commit time #{testView.gitProps.getProperty('git.commit.time')}</li>
<li>Git id #{testView.gitProps.getProperty('git.commit.id.abbrev')}</li>
</ul>
</ui:define>
</ui:composition>
</h:body>
......
<!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:f="http://java.sun.com/jsf/core"
xmlns:users="http://java.sun.com/jsf/composite/tools/user"
xmlns:c="http://java.sun.com/jsp/jstl/core">
<h:body>
<ui:composition template="#{sessionHandler.template}">
<ui:param name="thispage" value="page.eventorg.edit" />
<ui:define name="content">
#{sessionHandler.reindexCompass()}
</ui:define>
</ui:composition>
</h:body>
</html>
\ No newline at end of file
......@@ -21,7 +21,9 @@ package fi.codecrew.moya.web;
import java.io.PrintWriter;
import java.io.Serializable;
import java.io.StringWriter;
import java.nio.ByteBuffer;
import java.util.Arrays;
import java.util.Base64;
import java.util.Map;
import java.util.zip.CRC32;
......@@ -86,7 +88,13 @@ public class ErrorPageView implements Serializable {
}
public String getTime() {
String stamp = "0x" + Long.toHexString(System.currentTimeMillis());
ByteBuffer buffer = ByteBuffer.allocate(Integer.BYTES);
// Casting to int will give us millisecond precision for about 24 days
// which should be enough for our purposes..
buffer.putInt((int)System.currentTimeMillis());
String stamp = Base64.getEncoder().encodeToString(buffer.array());
// We don't need padding.. get rid of them.
stamp = stamp.replace("=","");
logger.error("Error occured at {} trail {}", stamp, getTrail());
return stamp;
}
......
......@@ -119,6 +119,10 @@ public class MapPlacechangeView extends GenericCDIView {
}
}
public boolean isMovingForSelf(){
return permbean.getCurrentUser().equals(user);
}
public String commitMove() {
HashMap<Place, Place> change = new HashMap<Place, Place>();
......
......@@ -83,7 +83,6 @@ bortalApplication.license.VIEW_OWN_CODES = Can view own licenses
bortalApplication.map.BUY_PLACES = Reserve and buy places from map
bortalApplication.map.MANAGE_MAPS = Create and modify maps
bortalApplication.map.MANAGE_OTHERS = Manage other users reservations in map
bortalApplication.map.RELEASE_PLACE = Can release place
bortalApplication.map.VIEW = View maps
bortalApplication.poll.ANSWER = Can answer and view availabe polls
bortalApplication.poll.CREATE = Create and manage polls
......@@ -1610,3 +1609,6 @@ product.dependency.MAX_SUPPORTED_COUNT=Only up to same number of products can be
submenu.neomap.moveplaces=Change places
mapEdit.removeSelectedPlaces=Delete places
bortalApplication.map.MOVE_PLACES =Selfservice place moving
bill.list.header =Orders
placemove.noMovablePlaces =No movable places
......@@ -171,7 +171,6 @@ bortalApplication.license.VIEW_OWN_CODES = Can view
bortalApplication.map.BUY_PLACES = Reserve and buy places from map
bortalApplication.map.MANAGE_MAPS = Create and modify maps
bortalApplication.map.MANAGE_OTHERS = Manage other users reservations in map
bortalApplication.map.RELEASE_PLACE = Can release place
bortalApplication.map.VIEW = View maps
bortalApplication.networkauthentication.CAN_ADMINISTER_ASSOCIATIONS = Can manage network associations
bortalApplication.networkauthentication.CAN_ASSOCIATE = Can associate to network
......@@ -1891,3 +1890,6 @@ placemove.alreadyTaken=Moving the places was cancelled because place {0} was alr
placegroupview.moveUsersPlaces=Move users places
submenu.neomap.moveplaces=Change places
mapEdit.removeSelectedPlaces=Delete places
bortalApplication.map.MOVE_PLACES = Selfservice place moving
bill.list.header = Orders
placemove.noMovablePlaces = No movable places
......@@ -172,8 +172,7 @@ bortalApplication.license.VIEW_OWN_CODES = Voi katse
bortalApplication.map.BUY_PLACES = Voi varata ja ostaa konepaikkoja kartalta
bortalApplication.map.MANAGE_MAPS = Saa luoda ja muokata karttoja
bortalApplication.map.MANAGE_OTHERS = Saa hallita muiden k\u00E4ytt\u00E4jien varauksia kartalla
bortalApplication.map.RELEASE_PLACE = Voi vapauttaa paikan
bortalApplication.map.VIEW = Saa n\u00E4hd\u00E4 kartat
bortalApplication.map.RELEASE_PLACE = Voi vapauttaa paikanbortalApplication.map.VIEW = Saa n\u00E4hd\u00E4 kartat
bortalApplication.networkauthentication.CAN_ADMINISTER_ASSOCIATIONS = Saa hallinnoida verkkoon liittymisi\u00E4
bortalApplication.networkauthentication.CAN_ASSOCIATE = Saa liitty\u00E4 verkkoon
bortalApplication.networkauthentication.CAN_ASSOCIATE_MANY_PER_PLACE = Saa liitt\u00E4\u00E4 useamman laitteen samaan paikkaan
......@@ -1877,3 +1876,7 @@ placemove.alreadyTaken=Paikkojen siirto peruuntui koska paikka {0} oli jo varatt
placegroupview.moveUsersPlaces=Siirr\u00E4 k\u00E4ytt\u00E4j\u00E4n paikkoja
submenu.neomap.moveplaces=Vaihda paikkoja
mapEdit.removeSelectedPlaces=Poista paikat
bortalApplication.map.MOVE_PLACES = Paikkojen itsepalvelusiirto
bill.list.header = Tilaukset
placemove.noMovablePlaces = Ei siirrett\u00E4vi\u00E4 paikkoja
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!