Přidána agenda Budovy.
This commit is contained in:
@@ -0,0 +1,7 @@
|
|||||||
|
package info.bukova.isspst.dao;
|
||||||
|
|
||||||
|
import info.bukova.isspst.data.Building;
|
||||||
|
|
||||||
|
public interface BuildingDao extends BaseDao<Building> {
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,12 @@
|
|||||||
|
package info.bukova.isspst.dao.jpa;
|
||||||
|
|
||||||
|
import info.bukova.isspst.dao.BuildingDao;
|
||||||
|
import info.bukova.isspst.data.Building;
|
||||||
|
|
||||||
|
public class BuildingDaoJPA extends BaseDaoJPA<Building> implements BuildingDao {
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String getEntityName() {
|
||||||
|
return "Building";
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,121 @@
|
|||||||
|
package info.bukova.isspst.data;
|
||||||
|
|
||||||
|
import java.util.Date;
|
||||||
|
|
||||||
|
import javax.persistence.Column;
|
||||||
|
import javax.persistence.Entity;
|
||||||
|
import javax.persistence.GeneratedValue;
|
||||||
|
import javax.persistence.Id;
|
||||||
|
import javax.persistence.Table;
|
||||||
|
|
||||||
|
@Entity
|
||||||
|
@Table(name="BUILDING")
|
||||||
|
public class Building implements DataModel {
|
||||||
|
|
||||||
|
@Id
|
||||||
|
@Column(name="ID")
|
||||||
|
@GeneratedValue
|
||||||
|
private int id;
|
||||||
|
|
||||||
|
@Column(name="CODE", unique=true)
|
||||||
|
private String code;
|
||||||
|
|
||||||
|
@Column(name="NAME")
|
||||||
|
private String name;
|
||||||
|
|
||||||
|
@Column(name="DESCRIPTION")
|
||||||
|
private String description;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @return the id
|
||||||
|
*/
|
||||||
|
public int getId() {
|
||||||
|
return id;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param id the id to set
|
||||||
|
*/
|
||||||
|
public void setId(int id) {
|
||||||
|
this.id = id;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @return the code
|
||||||
|
*/
|
||||||
|
public String getCode() {
|
||||||
|
return code;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param code the code to set
|
||||||
|
*/
|
||||||
|
public void setCode(String code) {
|
||||||
|
this.code = code;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @return the name
|
||||||
|
*/
|
||||||
|
public String getName() {
|
||||||
|
return name;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param name the name to set
|
||||||
|
*/
|
||||||
|
public void setName(String name) {
|
||||||
|
this.name = name;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @return the description
|
||||||
|
*/
|
||||||
|
public String getDescription() {
|
||||||
|
return description;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param description the description to set
|
||||||
|
*/
|
||||||
|
public void setDescription(String description) {
|
||||||
|
this.description = description;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void setCreated(Date created) {
|
||||||
|
// TODO Auto-generated method stub
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Date getCreated() {
|
||||||
|
// TODO Auto-generated method stub
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void setModified(Date modified) {
|
||||||
|
// TODO Auto-generated method stub
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Date getModified() {
|
||||||
|
// TODO Auto-generated method stub
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean isValid() {
|
||||||
|
// TODO Auto-generated method stub
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void setValid(boolean valid) {
|
||||||
|
// TODO Auto-generated method stub
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,7 @@
|
|||||||
|
package info.bukova.isspst.services;
|
||||||
|
|
||||||
|
import info.bukova.isspst.data.Building;
|
||||||
|
|
||||||
|
public interface BuildingService extends Service<Building> {
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,7 @@
|
|||||||
|
package info.bukova.isspst.services;
|
||||||
|
|
||||||
|
import info.bukova.isspst.data.Building;
|
||||||
|
|
||||||
|
public class BuildingServiceImpl extends AbstractService<Building> implements BuildingService{
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,14 @@
|
|||||||
|
package info.bukova.isspst.ui;
|
||||||
|
|
||||||
|
import info.bukova.isspst.data.Building;
|
||||||
|
|
||||||
|
import org.zkoss.bind.annotation.Init;
|
||||||
|
|
||||||
|
public class BuildingForm extends FormViewModel<Building> {
|
||||||
|
|
||||||
|
@Init(superclass = true)
|
||||||
|
public void init() {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,21 @@
|
|||||||
|
package info.bukova.isspst.ui;
|
||||||
|
|
||||||
|
import info.bukova.isspst.data.Building;
|
||||||
|
import info.bukova.isspst.services.BuildingService;
|
||||||
|
|
||||||
|
import org.zkoss.bind.annotation.Init;
|
||||||
|
import org.zkoss.zk.ui.select.annotation.WireVariable;
|
||||||
|
|
||||||
|
public class BuildingList extends ListViewModel<Building> {
|
||||||
|
|
||||||
|
@WireVariable
|
||||||
|
private BuildingService buildingService;
|
||||||
|
|
||||||
|
@Init
|
||||||
|
public void init() {
|
||||||
|
service = buildingService;
|
||||||
|
dataClass = Building.class;
|
||||||
|
formZul = "buildingForm.zul";
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
@@ -7,5 +7,6 @@
|
|||||||
<session-factory>
|
<session-factory>
|
||||||
<mapping class="info.bukova.isspst.data.User"></mapping>
|
<mapping class="info.bukova.isspst.data.User"></mapping>
|
||||||
<mapping class="info.bukova.isspst.data.Role"></mapping>
|
<mapping class="info.bukova.isspst.data.Role"></mapping>
|
||||||
|
<mapping class="info.bukova.isspst.data.Building"></mapping>
|
||||||
</session-factory>
|
</session-factory>
|
||||||
</hibernate-configuration>
|
</hibernate-configuration>
|
||||||
@@ -89,12 +89,12 @@
|
|||||||
</bean>
|
</bean>
|
||||||
|
|
||||||
<!-- Business logic -->
|
<!-- Business logic -->
|
||||||
<bean id="userService" class="info.bukova.isspst.services.UserServiceImpl">
|
<bean id="userService" class="info.bukova.isspst.services.users.UserServiceImpl">
|
||||||
<property name="dao" ref="userDao"/>
|
<property name="dao" ref="userDao"/>
|
||||||
<property name="encoder" ref="passwordEncoder"/>
|
<property name="encoder" ref="passwordEncoder"/>
|
||||||
</bean>
|
</bean>
|
||||||
|
|
||||||
<bean id="roleService" class="info.bukova.isspst.services.RoleServiceImpl">
|
<bean id="roleService" class="info.bukova.isspst.services.users.RoleServiceImpl">
|
||||||
<property name="dao" ref="roleDao"/>
|
<property name="dao" ref="roleDao"/>
|
||||||
</bean>
|
</bean>
|
||||||
|
|
||||||
|
|||||||
@@ -0,0 +1,21 @@
|
|||||||
|
# Default file
|
||||||
|
AgendaBuildings=Budovy
|
||||||
|
|
||||||
|
BuildingsFormCode=Kód
|
||||||
|
BuildingsFormCodeConstr=Zadejte kód budovy...
|
||||||
|
BuildingsFormName=Název
|
||||||
|
BuildingsFormDescription=Popis
|
||||||
|
|
||||||
|
BuildingsGridColumnCode=Kód
|
||||||
|
BuildingsGridColumnName=Název
|
||||||
|
BuildingsGridColumnDescription=Popis
|
||||||
|
|
||||||
|
ButtonStorno=Storno
|
||||||
|
ButtonSave=Uložit
|
||||||
|
|
||||||
|
FormBuilding=Budova
|
||||||
|
|
||||||
|
ToolbarRecNew=Nový záznam
|
||||||
|
ToolbarRecEdit=Úprava aktuálního záznamu
|
||||||
|
ToolbarRecDelete=Odstranit aktuální záznam
|
||||||
|
ToolbarRecFilter=Filtr záznamů
|
||||||
@@ -29,7 +29,7 @@
|
|||||||
<menubar orient="vertical">
|
<menubar orient="vertical">
|
||||||
<menuitem label="Uživatelé" href="/admin/users" width="120px"/>
|
<menuitem label="Uživatelé" href="/admin/users" width="120px"/>
|
||||||
<menuitem label="Střediska" href="/admin/users" disabled="${not sec:isAllGranted('ROLE_ADMIN')}"/>
|
<menuitem label="Střediska" href="/admin/users" disabled="${not sec:isAllGranted('ROLE_ADMIN')}"/>
|
||||||
<menuitem label="Budovy" href="/admin/users"/>
|
<menuitem label="${labels.AgendaBuildings}" href="/buildings"/>
|
||||||
<menuitem label="Místnosti" href="/admin/users"/>
|
<menuitem label="Místnosti" href="/admin/users"/>
|
||||||
</menubar>
|
</menubar>
|
||||||
</tabpanel>
|
</tabpanel>
|
||||||
|
|||||||
@@ -1,10 +1,15 @@
|
|||||||
body {
|
/*body {
|
||||||
font-family: sans-serif;
|
font-family: sans-serif;
|
||||||
|
}*/
|
||||||
|
|
||||||
|
#container {
|
||||||
|
min-height:100%;
|
||||||
|
position:relative;
|
||||||
}
|
}
|
||||||
|
|
||||||
#header{
|
#header{
|
||||||
width: auto;
|
width: auto;
|
||||||
height:70px;
|
height:40px;
|
||||||
border: 1px solid #ccc;
|
border: 1px solid #ccc;
|
||||||
padding:10px;
|
padding:10px;
|
||||||
}
|
}
|
||||||
@@ -23,15 +28,30 @@ body {
|
|||||||
|
|
||||||
#maincolumn{
|
#maincolumn{
|
||||||
padding:10px;
|
padding:10px;
|
||||||
|
padding-bottom:20px; /* Height of the footer */
|
||||||
margin: 0px 0px 0px 160px;
|
margin: 0px 0px 0px 160px;
|
||||||
border: 1px solid #ccc;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#footer{
|
#footer{
|
||||||
clear:both;
|
clear:both;
|
||||||
width:auto;
|
position:absolute;
|
||||||
|
bottom:0;
|
||||||
|
width:100%;
|
||||||
|
height:20px; /* Height of the footer */
|
||||||
|
|
||||||
border: 1px solid #ccc;
|
border: 1px solid #ccc;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.form-caption {
|
||||||
|
--1overflow:hidden;
|
||||||
|
font-weight: bold;
|
||||||
|
font-size: 20px;
|
||||||
|
}
|
||||||
|
/*aaa*/
|
||||||
|
.form-caption-content {
|
||||||
|
float:left;
|
||||||
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
a:link,a:visited {
|
a:link,a:visited {
|
||||||
font-size: 12px;
|
font-size: 12px;
|
||||||
|
|||||||
@@ -0,0 +1,30 @@
|
|||||||
|
<?page title="${labels.AgendaBuildings}" contentType="text/html;charset=UTF-8"?>
|
||||||
|
<zk>
|
||||||
|
<?variable-resolver class="org.zkoss.zkplus.spring.DelegatingVariableResolver"?>
|
||||||
|
<window title="${labels.AgendaBuildings}" border="normal" apply="org.zkoss.bind.BindComposer" viewModel="@id('vm') @init('info.bukova.isspst.ui.BuildingList')">
|
||||||
|
|
||||||
|
<toolbar>
|
||||||
|
<toolbarbutton image="/img/add.png" tooltiptext="${labels.ToolbarRecNew}" id="btnNew" onClick="@command('addNew')" disabled="@load(vm.filter)" />
|
||||||
|
<toolbarbutton image="/img/edit.png" tooltiptext="${labels.ToolbarRecEdit}" id="btnEdit" onClick="@command('edit')" disabled="@load(empty vm.dataBean ? 'true' : 'false')" />
|
||||||
|
<toolbarbutton image="/img/delete.png" tooltiptext="${labels.ToolbarRecDelete}" id="btnDelete" onClick="@command('delObject')" disabled="@load(empty vm.dataBean ? 'true' : 'false')" />
|
||||||
|
<toolbarbutton image="/img/funnel.png" tooltiptext="${labels.ToolbarRecFilter}" id="btnFilter" onClick="@command('filter')" />
|
||||||
|
</toolbar>
|
||||||
|
|
||||||
|
|
||||||
|
<listbox model="@load(vm.dataList)" selectedItem="@bind(vm.dataBean)">
|
||||||
|
<listhead>
|
||||||
|
<listheader label="${labels.BuildingsGridColumnCode}" width="10%" />
|
||||||
|
<listheader label="${labels.BuildingsGridColumnName}" width="30%" />
|
||||||
|
<listheader label="${labels.BuildingsGridColumnDescription}" width="60%" />
|
||||||
|
</listhead>
|
||||||
|
<template name="model">
|
||||||
|
<listitem>
|
||||||
|
<listcell label="@load(each.code)" />
|
||||||
|
<listcell label="@load(each.name)" />
|
||||||
|
<listcell label="@load(each.description)" />
|
||||||
|
</listitem>
|
||||||
|
</template>
|
||||||
|
</listbox>
|
||||||
|
|
||||||
|
</window>
|
||||||
|
</zk>
|
||||||
@@ -0,0 +1,42 @@
|
|||||||
|
<?page title="${labels.AgendaBuildings}" contentType="text/html;charset=UTF-8"?>
|
||||||
|
<!--?link rel="stylesheet" type="text/css" href="/app/page.css"?-->
|
||||||
|
<zk>
|
||||||
|
<window id="editWin" closable="true" border="normal" position="center" apply="org.zkoss.bind.BindComposer" viewModel="@id('vm') @init('info.bukova.isspst.ui.BuildingForm')">
|
||||||
|
<caption src="/img/building.png" zclass="form-caption" label="${labels.FormBuilding}" />
|
||||||
|
<vlayout>
|
||||||
|
<grid hflex="min">
|
||||||
|
<columns>
|
||||||
|
<column align="right" hflex="min" />
|
||||||
|
<column />
|
||||||
|
</columns>
|
||||||
|
<rows>
|
||||||
|
<row>
|
||||||
|
<cell sclass="row-title">${labels.BuildingsFormCode} :</cell>
|
||||||
|
<cell>
|
||||||
|
<textbox constraint="no empty: ${labels.BuildingsFormCodeConstr}" width="200px" value="@bind(vm.dataBean.code)" />
|
||||||
|
</cell>
|
||||||
|
</row>
|
||||||
|
<row>
|
||||||
|
<cell sclass="row-title">${labels.BuildingsFormName} :</cell>
|
||||||
|
<cell>
|
||||||
|
<textbox width="200px" value="@bind(vm.dataBean.name)" />
|
||||||
|
</cell>
|
||||||
|
</row>
|
||||||
|
<row>
|
||||||
|
<cell sclass="row-title">${labels.BuildingsFormDescription} :</cell>
|
||||||
|
<cell>
|
||||||
|
<textbox width="300px" value="@bind(vm.dataBean.description)" />
|
||||||
|
</cell>
|
||||||
|
</row>
|
||||||
|
</rows>
|
||||||
|
</grid>
|
||||||
|
<hlayout>
|
||||||
|
<div hflex="1"></div>
|
||||||
|
<div>
|
||||||
|
<button label="${labels.ButtonStorno}" onClick="editWin.detach();"/>
|
||||||
|
<button label="${labels.ButtonSave}" onClick="@command('save', window=editWin)"/>
|
||||||
|
</div>
|
||||||
|
</hlayout>
|
||||||
|
</vlayout>
|
||||||
|
</window>
|
||||||
|
</zk>
|
||||||
@@ -0,0 +1,10 @@
|
|||||||
|
<?page title="${labels.agenda.buildings}" contentType="text/html;charset=UTF-8"?>
|
||||||
|
<zk>
|
||||||
|
|
||||||
|
<zscript>
|
||||||
|
String gridZul = "building.zul";
|
||||||
|
</zscript>
|
||||||
|
|
||||||
|
<include src="/app/template.zhtml"/>
|
||||||
|
|
||||||
|
</zk>
|
||||||
Binary file not shown.
|
After Width: | Height: | Size: 5.5 KiB |
Reference in New Issue
Block a user