Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
c5dff82da7 | ||
|
|
d7e2ffdace | ||
|
|
ed229ac7c7 | ||
|
|
0adb07d75b | ||
|
|
d61faf2e71 | ||
|
|
397d2de94f | ||
|
|
5fd6c68b4f | ||
|
|
2fc74c0677 | ||
|
|
9b45fd3700 | ||
|
|
a76848e1da | ||
|
|
57c42d1398 | ||
|
|
2250fb9743 | ||
|
|
d72147c012 | ||
|
|
4bc8dd8280 | ||
|
|
82dea5800d | ||
|
|
25505757a6 | ||
|
|
b21a6beffd | ||
|
|
66f017567e | ||
|
|
4f5c8b0f0a | ||
|
|
125a7bba56 | ||
|
|
ac4b994398 | ||
|
|
1bb98f2515 | ||
|
|
93095c630c | ||
|
|
c549f7b131 | ||
|
|
3072ef1a9c | ||
|
|
52d7ee4ba1 | ||
|
|
8d2fa0be77 |
+12
-1
@@ -1,5 +1,16 @@
|
|||||||
*~
|
*~
|
||||||
__pycache__/
|
__pycache__/
|
||||||
compare_*
|
|
||||||
*.txt
|
*.txt
|
||||||
*.bak
|
*.bak
|
||||||
|
*.pot
|
||||||
|
*.mo
|
||||||
|
compare_*
|
||||||
|
|
||||||
|
# Debian package build artifacts
|
||||||
|
/debian/.debhelper/
|
||||||
|
/debian/debhelper-build-stamp
|
||||||
|
/debian/files
|
||||||
|
/debian/*.debhelper
|
||||||
|
/debian/*.debhelper.log
|
||||||
|
/debian/*.substvars
|
||||||
|
/debian/yms/
|
||||||
|
|||||||
@@ -1,6 +1,22 @@
|
|||||||
CHANGELOG
|
CHANGELOG
|
||||||
=========
|
=========
|
||||||
|
|
||||||
|
0.2.2 - 2026-09-21
|
||||||
|
------------------
|
||||||
|
|
||||||
|
* native gui: prepared list views for main objects
|
||||||
|
* added position to equipment
|
||||||
|
* box improved with dimensions, net weight and price
|
||||||
|
* experimental signalk integration
|
||||||
|
* added config for currency symbol support
|
||||||
|
* database prepared for lazy record locking feature
|
||||||
|
* some small database improvements
|
||||||
|
* webgui: some improvements and fixes
|
||||||
|
* work on native gui: display data lists
|
||||||
|
* prepare dynamic language support for webgui
|
||||||
|
* improve image uploading and scaling code
|
||||||
|
* added date formatting code
|
||||||
|
|
||||||
0.2.1 - 2026-08-28
|
0.2.1 - 2026-08-28
|
||||||
------------------
|
------------------
|
||||||
|
|
||||||
|
|||||||
@@ -62,10 +62,10 @@ Optional import some sample data
|
|||||||
4. Initialize document storage
|
4. Initialize document storage
|
||||||
Customize path and access rights to your needs
|
Customize path and access rights to your needs
|
||||||
|
|
||||||
mkdir /var/local/yms
|
mkdir /var/local/lib/yms
|
||||||
mkdir /var/local/yms/thumb
|
mkdir /var/local/lib/yms/thumb
|
||||||
chown -R www-data /var/local/yms
|
chown -R www-data /var/local/lib/yms
|
||||||
chmod -R 750 /var/local/yms
|
chmod -R 750 /var/local/lib/yms
|
||||||
|
|
||||||
To grant access for the local gui the directory has to be writeable by a special
|
To grant access for the local gui the directory has to be writeable by a special
|
||||||
group (here as example 'yms'). The user which runs the local gui (here
|
group (here as example 'yms'). The user which runs the local gui (here
|
||||||
@@ -75,8 +75,8 @@ group (here as example 'yms'). The user which runs the local gui (here
|
|||||||
groupadd yms
|
groupadd yms
|
||||||
usermod -aG yms www-data
|
usermod -aG yms www-data
|
||||||
usermod -aG yms guiuser
|
usermod -aG yms guiuser
|
||||||
chgrp yms /var/local/yms
|
chgrp yms /var/local/lib/yms
|
||||||
chgrp yms /var/local/yms/thumb
|
chgrp yms /var/local/lib/yms/thumb
|
||||||
chmod -R 770 /var/local/yms
|
chmod -R 770 /var/local/yms
|
||||||
|
|
||||||
4. Setup local GUI
|
4. Setup local GUI
|
||||||
|
|||||||
@@ -1,9 +1,34 @@
|
|||||||
# Translation helper
|
# Targets
|
||||||
|
.PHONY: all prepare translation orig deb clean
|
||||||
|
|
||||||
|
# Package information
|
||||||
|
VERSION := $(shell dpkg-parsechangelog -S Version | sed 's/-.*//')
|
||||||
|
PACKAGE := yms
|
||||||
|
|
||||||
|
# Default target
|
||||||
|
all: prepare
|
||||||
|
|
||||||
|
# Debian source archive
|
||||||
|
orig:
|
||||||
|
git archive \
|
||||||
|
--format=tar \
|
||||||
|
--prefix=$(PACKAGE)-$(VERSION)/ \
|
||||||
|
HEAD \
|
||||||
|
':(exclude)debian' \
|
||||||
|
':(exclude)locale/*.pot' \
|
||||||
|
':(exclude)locale/de/LC_MESSAGES' \
|
||||||
|
| xz -9 > ../$(PACKAGE)_$(VERSION).orig.tar.xz
|
||||||
|
|
||||||
|
# Debian package
|
||||||
|
deb: orig
|
||||||
|
dpkg-buildpackage -us -uc
|
||||||
|
|
||||||
|
# Translation files
|
||||||
prepare: ymsgui.py yms/*.py yms/ui/*.ui
|
prepare: ymsgui.py yms/*.py yms/ui/*.ui
|
||||||
xgettext -L Python -o locale/program.pot ymsgui.py yms/*.py
|
xgettext -L Python -o locale/program.pot ymsgui.py yms/*.py
|
||||||
|
xgettext -L Python -o locale/views.pot ymsgui.py yms/view/*.py
|
||||||
xgettext -L Glade -o locale/ui.pot yms/ui/*.ui
|
xgettext -L Glade -o locale/ui.pot yms/ui/*.ui
|
||||||
msgcat -o locale/combined.pot locale/program.pot locale/ui.pot
|
msgcat -o locale/combined.pot locale/program.pot locale/views.pot locale/ui.pot
|
||||||
msgmerge -U locale/de.po locale/combined.pot
|
msgmerge -U locale/de.po locale/combined.pot
|
||||||
|
|
||||||
translation: locale/de/LC_MESSAGES/ymsgui.mo
|
translation: locale/de/LC_MESSAGES/ymsgui.mo
|
||||||
@@ -11,3 +36,13 @@ translation: locale/de/LC_MESSAGES/ymsgui.mo
|
|||||||
locale/de/LC_MESSAGES/ymsgui.mo: locale/de.po
|
locale/de/LC_MESSAGES/ymsgui.mo: locale/de.po
|
||||||
mkdir -p locale/de/LC_MESSAGES
|
mkdir -p locale/de/LC_MESSAGES
|
||||||
msgfmt locale/de.po -o locale/de/LC_MESSAGES/ymsgui.mo
|
msgfmt locale/de.po -o locale/de/LC_MESSAGES/ymsgui.mo
|
||||||
|
|
||||||
|
# Clean generated files
|
||||||
|
clean:
|
||||||
|
find . -type d -name "__pycache__" -prune -exec rm -rf {} +
|
||||||
|
find . -type f -name "*.pyc" -delete
|
||||||
|
rm -f locale/program.pot
|
||||||
|
rm -f locale/ui.pot
|
||||||
|
rm -f locale/combined.pot
|
||||||
|
rm -f locale/de/LC_MESSAGES/ymsgui.mo
|
||||||
|
dh_clean
|
||||||
|
|||||||
@@ -24,6 +24,8 @@ For users using idesktop there is a prepared link file "yms.lnk".
|
|||||||
Copy it to your private .idesktop directory to create a
|
Copy it to your private .idesktop directory to create a
|
||||||
desktop link.
|
desktop link.
|
||||||
|
|
||||||
For further information go to https://computerclub.hoogi.de/yms
|
For further information go to the international project site:
|
||||||
(currently german only)
|
https://yms.hoogi.de/yms
|
||||||
|
|
||||||
|
Documentation in german language is available at:
|
||||||
|
https://computerclub.hoogi.de/yms
|
||||||
|
|||||||
@@ -0,0 +1,13 @@
|
|||||||
|
Alias /yms /usr/share/yms/webgui
|
||||||
|
|
||||||
|
<Directory /usr/share/yms/webgui>
|
||||||
|
Options FollowSymLinks
|
||||||
|
AllowOverride None
|
||||||
|
Require all granted
|
||||||
|
|
||||||
|
<FilesMatch "\.inc$">
|
||||||
|
Require all denied
|
||||||
|
</FilesMatch>
|
||||||
|
|
||||||
|
DirectoryIndex index.php
|
||||||
|
</Directory>
|
||||||
@@ -0,0 +1,15 @@
|
|||||||
|
location ^~ /yms/ {
|
||||||
|
alias /usr/share/yms/webgui/;
|
||||||
|
index index.php;
|
||||||
|
}
|
||||||
|
|
||||||
|
location ~ ^/yms/.*\.inc$ {
|
||||||
|
deny all;
|
||||||
|
}
|
||||||
|
|
||||||
|
location ~ ^/yms/(.+\.php)$ {
|
||||||
|
include fastcgi_params;
|
||||||
|
fastcgi_param SCRIPT_FILENAME /usr/share/yms/webgui/$1;
|
||||||
|
fastcgi_param SCRIPT_NAME /yms/$1;
|
||||||
|
fastcgi_pass unix:@PHP_FPM_SOCKET@;
|
||||||
|
}
|
||||||
+164
@@ -0,0 +1,164 @@
|
|||||||
|
/* Generic data suitable for all kind of boats
|
||||||
|
* SPDX-License-Identifier: WTFPL
|
||||||
|
|
||||||
|
Add this data additionally after applying minmal.sql
|
||||||
|
|
||||||
|
*/
|
||||||
|
|
||||||
|
INSERT INTO user (userid, login, pass, displayname, role) VALUES
|
||||||
|
(2, 'helmsman', '$2y$10$LFl2jvrt2kB.c2KXBLaCI.RF2XAGNmFsoRc.V2tzLKrfCPiBCbI0e', 'Helmsman', 'helmsman'),
|
||||||
|
(3, 'sailor', '$2y$10$H5ZKd9r3KLAzI7W5u3ocgOCcXF4aDgjMAFYCzVC9Q9/Q9BqAV0MKS', 'Sailor', 'sailor');
|
||||||
|
|
||||||
|
INSERT INTO vessel (vid, vesselname, model, loa, lwl, beam, draught, displacement, ballast) VALUES
|
||||||
|
(1, 'Generic vessel', 'Generic model', 10.0, 9.5, 3.0, 1.8, 4000, 1200);
|
||||||
|
|
||||||
|
INSERT INTO storage (sid, vid, sname, stype, x, y, z, remarks) VALUES
|
||||||
|
(0, 1, 'An Bord', 0, 0, 0, 0, 'Alles wo der Ort nicht spezifiziert werden kann');
|
||||||
|
|
||||||
|
INSERT INTO dropdown (ddid, ddval, ddtext) VALUES
|
||||||
|
(1, 1, 'Mono'),
|
||||||
|
(1, 2, 'Katamaran'),
|
||||||
|
(1, 3, 'Trimaran');
|
||||||
|
|
||||||
|
INSERT INTO dropdown (ddid, ddval, ddtext, flags) VALUES
|
||||||
|
(2, 4, 'Dienstleister', NULL), -- Service
|
||||||
|
(2, 5, 'Segelmacher', NULL), -- Sailmaker
|
||||||
|
(2, 6, 'Yachthafen', NULL); -- Marina
|
||||||
|
|
||||||
|
INSERT INTO dropdown (ddid, ddval, ddtext, flags) VALUES
|
||||||
|
(3, 2, 'Bilge', NULL),
|
||||||
|
(3, 3, 'Schwalbennest', NULL);
|
||||||
|
|
||||||
|
INSERT INTO dropdown (ddid, ddval, ddtext) VALUES
|
||||||
|
(4, 1, 'Rumpf'),
|
||||||
|
(4, 2, 'Deck'),
|
||||||
|
(4, 3, 'Rigg'),
|
||||||
|
(4, 4, 'Segel'),
|
||||||
|
(4, 5, 'Motor'),
|
||||||
|
(4, 6, 'Elektrik'),
|
||||||
|
(4, 7, 'Elektronik'),
|
||||||
|
(4, 8, 'Navigation'),
|
||||||
|
(4, 9, 'Pantry');
|
||||||
|
|
||||||
|
INSERT INTO dropdown (ddid, ddval, ddtext) VALUES
|
||||||
|
(5, 1, 'Allgemein'),
|
||||||
|
(5, 2, 'Frischware'),
|
||||||
|
(5, 3, 'Trockenware'),
|
||||||
|
(5, 4, 'Konserven'),
|
||||||
|
(5, 5, 'Gefriergetrocknet'),
|
||||||
|
(5, 6, 'Snacks (süß)'),
|
||||||
|
(5, 7, 'Snacks (salzig)'),
|
||||||
|
(5, 8, 'Getränke');
|
||||||
|
|
||||||
|
INSERT INTO dropdown (ddid, ddval, ddtext, ddshort) VALUES
|
||||||
|
(6, 1, 'kg', 'kg'),
|
||||||
|
(6, 2, 'Liter', 'L'),
|
||||||
|
(6, 3, 'Stück', 'St'),
|
||||||
|
(6, 4, 'Packung', 'Pkg'),
|
||||||
|
(6, 5, 'Dose', 'Ds'),
|
||||||
|
(6, 6, 'Flasche', 'Fl'),
|
||||||
|
(6, 7, 'Tüte', 'Tue'),
|
||||||
|
(6, 8, 'Tafel', 'Ta'),
|
||||||
|
(6, 9, 'Glas', 'Gl');
|
||||||
|
|
||||||
|
INSERT INTO dropdown (ddid, ddval, ddtext, ddshort) VALUES
|
||||||
|
(7, 1, 'ATO/ATC-Stecksicherung', 'ATO'),
|
||||||
|
(7, 2, 'MAXI-Stecksicherung', 'Max'),
|
||||||
|
(7, 3, 'MIDI/AMI-Sicherung', 'MIDI'),
|
||||||
|
(7, 4, 'MEGA/AMG-Sicherung', 'MEGA'),
|
||||||
|
(7, 5, 'MRBF-Sicherung', 'MRBF'),
|
||||||
|
(7, 6, 'ANL-Sicherung', 'ANL'),
|
||||||
|
(7, 7, 'Class-T-Sicherung', 'Class T'),
|
||||||
|
(7, 8, 'Feinsicherung 5×20 mm', 'Fein'),
|
||||||
|
(7, 9, 'Glassicherung inline', 'Glas'),
|
||||||
|
(7, 10, 'Automat / Leitungsschutzschalter', 'Auto'),
|
||||||
|
(7, 11, 'Torpedosicherung', 'Torp'),
|
||||||
|
(7, 12, 'Streifensicherung', 'Str');
|
||||||
|
|
||||||
|
INSERT INTO dropdown (ddid, ddval, ddtext, ddshort) VALUES
|
||||||
|
(8, 1, 'Millimeter', 'mm'),
|
||||||
|
(8, 2, 'Zentimeter', 'cm'),
|
||||||
|
(8, 3, 'Meter', 'm'),
|
||||||
|
(8, 4, 'Gramm', 'g'),
|
||||||
|
(8, 5, 'Kilogramm', 'kg'),
|
||||||
|
(8, 6, 'Watt', 'W'),
|
||||||
|
(8, 7, 'Kilowatt', 'kW'),
|
||||||
|
(8, 8, 'Ampere', 'A');
|
||||||
|
|
||||||
|
INSERT INTO dropdown (ddid, ddval, ddtext) VALUES
|
||||||
|
(9, 1, 'Plastikbox, klein'),
|
||||||
|
(9, 2, 'Plastikbox, groß'),
|
||||||
|
(9, 3, 'Sortimentskasten'),
|
||||||
|
(9, 4, 'Werkzeugkiste');
|
||||||
|
|
||||||
|
INSERT INTO dropdown (ddid, ddval, ddtext) VALUES
|
||||||
|
(11, 1, 'Einzelader'),
|
||||||
|
(11, 2, 'Steuerleitung'),
|
||||||
|
(11, 3, 'Datenkabel'),
|
||||||
|
(11, 4, 'Netzwerkkabel'),
|
||||||
|
(11, 5, 'Koaxialkabel'),
|
||||||
|
(11, 6, 'Antennenkabel'),
|
||||||
|
(11, 7, 'Lautsprecherkabel'),
|
||||||
|
(11, 8, 'Mikrofonkabel'),
|
||||||
|
(11, 9, 'Batteriekabel'),
|
||||||
|
(11, 10, 'Solarkabel'),
|
||||||
|
(11, 11, 'Gummileitung'),
|
||||||
|
(11, 12, 'Flachbandkabel'),
|
||||||
|
(11, 13, 'Telefonkabel'),
|
||||||
|
(11, 14, 'NMEA-Kabel'),
|
||||||
|
(11, 15, 'CAN-Bus-Kabel'),
|
||||||
|
(11, 16, 'USB-Kabel');
|
||||||
|
|
||||||
|
INSERT INTO dropdown (ddid, ddval, ddtext) VALUES
|
||||||
|
(12, 1, 'H05V-K'),
|
||||||
|
(12, 2, 'H07V-K'),
|
||||||
|
(12, 3, 'H05VV-F'),
|
||||||
|
(12, 4, 'H07RN-F'),
|
||||||
|
(12, 5, 'LiYY'),
|
||||||
|
(12, 6, 'LiYCY'),
|
||||||
|
(12, 7, 'LiYCY-TP'),
|
||||||
|
(12, 8, 'Cat 5e'),
|
||||||
|
(12, 9, 'Cat 6'),
|
||||||
|
(12, 10, 'RG-58'),
|
||||||
|
(12, 11, 'RG-213'),
|
||||||
|
(12, 12, 'RG-316'),
|
||||||
|
(12, 13, 'H-155'),
|
||||||
|
(12, 14, 'Aircell 5'),
|
||||||
|
(12, 15, 'Aircell 7'),
|
||||||
|
(12, 16, 'Ecoflex 10');
|
||||||
|
|
||||||
|
/* supplier */
|
||||||
|
INSERT INTO company (comptype, compname, street, zip, city, country, phone, email, web) VALUES
|
||||||
|
(1, 'Compass24', NULL, NULL, 'Ascheberg', 'Deutschland', NULL, NULL, 'compass24.de'),
|
||||||
|
(1, 'Gründl', NULL, NULL, NULL, 'Deutschland', NULL, NULL, 'gruendl.de'),
|
||||||
|
(1, 'KlabauterShop', NULL, NULL, NULL, 'Deutschland', NULL, 'info@klabautershop.de', 'klabautershop.de'),
|
||||||
|
(1, 'SVB', NULL, NULL, 'Bremen', 'Deutschland', NULL, NULL, 'svb.de'),
|
||||||
|
(1, 'Toplicht', 'Notkestraße 97', '22607', 'Hamburg', 'Deutschland', '040 8890100', 'toplicht@toplicht.de', 'toplicht.de');
|
||||||
|
|
||||||
|
/* manufacturer */
|
||||||
|
INSERT INTO company (comptype, compname, street, zip, city, country, contact, phone, email, web) VALUES
|
||||||
|
(2, 'Airmar', NULL, NULL, NULL, 'USA', 'Sales', NULL, 'sales@airmar.com', 'airmar.com'),
|
||||||
|
(2, 'B&G', 'Marienthaler Str. 17', '24340', 'Eckernförde', 'Deutschland', 'Sales', '+49 4351 883290', 'sales.de@navico.com', 'bandg.com'),
|
||||||
|
(2, 'Blue Sea Systems', 'N85 W12545 Westbrook Crossing', '53051', 'Menomonee Falls', 'USA', 'Customer Service', '+1 800 307 6702', NULL, 'bluesea.com'),
|
||||||
|
(2, 'Dometic', 'Hemvärnsgatan 15', '171 54', 'Solna', 'Schweden', 'Customer Service', '+49 511 474046-400', 'contact.eu@dometic.com', 'dometic.com'),
|
||||||
|
(2, 'Garmin', 'Parkring 35', '85748', 'Garching', 'Deutschland', 'Zentrale', '+49 89 541999-700', 'impressum@garmin.de', 'garmin.com'),
|
||||||
|
(2, 'Harken', NULL, NULL, 'Pewaukee', 'USA', 'Customer Service', NULL, NULL, 'harken.com'),
|
||||||
|
(2, 'Hella Marine', NULL, NULL, 'Auckland', 'Neuseeland', 'Marine', NULL, NULL, 'hellamarine.com'),
|
||||||
|
(2, 'Icom', NULL, NULL, NULL, 'Japan', 'Marine', NULL, NULL, 'icomjapan.com'),
|
||||||
|
(2, 'Isotherm', NULL, NULL, NULL, 'Italien', 'Marine', NULL, NULL, 'indelwebastomarine.com'),
|
||||||
|
(2, 'Jabsco', '301 Water Street SE, Suite 200', '20003', 'Washington', 'USA', 'Xylem', '+1 978 281 0440', NULL, 'xylem.com'),
|
||||||
|
(2, 'Johnson Pump', NULL, NULL, NULL, 'Schweden', 'Marine', NULL, NULL, 'johnson-pump.com'),
|
||||||
|
(2, 'Lewmar', 'Southmoor Lane', 'PO9 1JJ', 'Havant', 'Vereinigtes Königreich', 'Customer Service', '+44 23 9247 1841', 'info@lewmar.com', 'lewmar.com'),
|
||||||
|
(2, 'Lofrans', 'Via Leonardo Da Vinci 6', '20040', 'Cambiago (MI)', 'Italien', 'Customer Service', '+39 02 36640684', NULL, 'lofrans.it'),
|
||||||
|
(2, 'Mastervolt', 'Snijdersbergweg 93', '1105 AN', 'Amsterdam', 'Niederlande', 'Customer Service', '+31 20 3422100', 'info.emea@OneASG.com', 'mastervolt.com'),
|
||||||
|
(2, 'Plastimo', NULL, NULL, 'Lorient', 'Frankreich', 'Marine', NULL, NULL, 'plastimo.com'),
|
||||||
|
(2, 'Quick', 'Via Piangipane 120/A', '48124', 'Piangipane (RA)', 'Italien', 'Headquarters', '+39 0544 415061', 'quick@quickitaly.com', 'quickitaly.com'),
|
||||||
|
(2, 'Raymarine', 'Atlantic-Haus, Zirkusweg 1', '20359', 'Hamburg', 'Deutschland', 'Support', '+49 40 2378080', NULL, 'raymarine.com'),
|
||||||
|
(2, 'Ronstan', NULL, NULL, 'Melbourne', 'Australien', 'Marine', NULL, NULL, 'ronstan.com'),
|
||||||
|
(2, 'Selden', 'Redegatan 11', '421 21', 'Västra Frölunda', 'Schweden', 'Headquarters', '+46 31 696900', 'info@seldenmast.com', 'seldenmast.com'),
|
||||||
|
(2, 'Simrad', NULL, NULL, NULL, 'Norwegen', 'Marine', NULL, NULL, 'simrad-yachting.com'),
|
||||||
|
(2, 'Spinlock', 'Birmingham Road', 'PO31 7BH', 'Cowes', 'Vereinigtes Königreich', 'Customer Service', '+44 1983 295555', NULL, 'spinlock.co.uk'),
|
||||||
|
(2, 'Torqeedo', NULL, NULL, NULL, 'Deutschland', 'Marine', NULL, NULL, 'torqeedo.com'),
|
||||||
|
(2, 'Vetus', 'Havenstraat 11', '3115 HC', 'Schiedam', 'Niederlande', 'Headquarters', '+31 884 884700', 'info@vetus.com', 'vetus.com'),
|
||||||
|
(2, 'Victron Energy', 'De Paal 35', '1351 JG', 'Almere', 'Niederlande', 'Headquarters', NULL, NULL, 'victronenergy.com'),
|
||||||
|
(2, 'Whale', NULL, NULL, NULL, 'Vereinigtes Königreich', 'Marine', NULL, NULL, 'whalepumps.com');
|
||||||
+114
-33
@@ -3,9 +3,11 @@
|
|||||||
/* MariaDB Scheme
|
/* MariaDB Scheme
|
||||||
Version: 1 */
|
Version: 1 */
|
||||||
|
|
||||||
/* TODO
|
/* REMARKS
|
||||||
|
- there are by design no created_at, updated_at, updates_by or similar fields
|
||||||
|
|
||||||
|
TODO
|
||||||
- check all values if unsigned can be used or not
|
- check all values if unsigned can be used or not
|
||||||
- implement foreign keys where missing and possible
|
|
||||||
- add referential actions where appropriate
|
- add referential actions where appropriate
|
||||||
- rename provisions to provision(?)
|
- rename provisions to provision(?)
|
||||||
- review defaults
|
- review defaults
|
||||||
@@ -66,6 +68,7 @@ CREATE TABLE dropdown (
|
|||||||
PRIMARY KEY (ddid, ddval)
|
PRIMARY KEY (ddid, ddval)
|
||||||
) ENGINE=InnoDB;
|
) ENGINE=InnoDB;
|
||||||
|
|
||||||
|
/* compid is signed because negative values needed for special purpose */
|
||||||
CREATE TABLE company (
|
CREATE TABLE company (
|
||||||
compid smallint(6) NOT NULL AUTO_INCREMENT,
|
compid smallint(6) NOT NULL AUTO_INCREMENT,
|
||||||
compname varchar(60) NOT NULL,
|
compname varchar(60) NOT NULL,
|
||||||
@@ -94,6 +97,7 @@ CREATE TABLE vessel (
|
|||||||
vesselname varchar(40) NOT NULL,
|
vesselname varchar(40) NOT NULL,
|
||||||
model varchar(20) DEFAULT NULL,
|
model varchar(20) DEFAULT NULL,
|
||||||
shipyard smallint(6) DEFAULT NULL,
|
shipyard smallint(6) DEFAULT NULL,
|
||||||
|
year_built year DEFAULT NULL,
|
||||||
loa float(4,2) UNSIGNED DEFAULT NULL,
|
loa float(4,2) UNSIGNED DEFAULT NULL,
|
||||||
lwl float(4,2) UNSIGNED DEFAULT NULL,
|
lwl float(4,2) UNSIGNED DEFAULT NULL,
|
||||||
beam float(4,2) UNSIGNED DEFAULT NULL,
|
beam float(4,2) UNSIGNED DEFAULT NULL,
|
||||||
@@ -109,6 +113,7 @@ CREATE TABLE vessel (
|
|||||||
PRIMARY KEY (vid),
|
PRIMARY KEY (vid),
|
||||||
FOREIGN KEY fk_vessel_shipyard (shipyard)
|
FOREIGN KEY fk_vessel_shipyard (shipyard)
|
||||||
REFERENCES company(compid)
|
REFERENCES company(compid)
|
||||||
|
ON DELETE RESTRICT
|
||||||
) ENGINE=InnoDB;
|
) ENGINE=InnoDB;
|
||||||
|
|
||||||
CREATE TABLE storage (
|
CREATE TABLE storage (
|
||||||
@@ -117,7 +122,7 @@ CREATE TABLE storage (
|
|||||||
sname varchar(40) NOT NULL,
|
sname varchar(40) NOT NULL,
|
||||||
stype tinyint(3) NOT NULL DEFAULT 0, -- ddid=3
|
stype tinyint(3) NOT NULL DEFAULT 0, -- ddid=3
|
||||||
capacity smallint(6) DEFAULT NULL,
|
capacity smallint(6) DEFAULT NULL,
|
||||||
capaunit enum('kg','l') DEFAULT NULL,
|
capaunit enum('kg','l','pcs') DEFAULT NULL,
|
||||||
x smallint(6) UNSIGNED NOT NULL DEFAULT 0,
|
x smallint(6) UNSIGNED NOT NULL DEFAULT 0,
|
||||||
y smallint(6) NOT NULL DEFAULT 0,
|
y smallint(6) NOT NULL DEFAULT 0,
|
||||||
z smallint(6) NOT NULL DEFAULT 0,
|
z smallint(6) NOT NULL DEFAULT 0,
|
||||||
@@ -130,13 +135,15 @@ CREATE TABLE storage (
|
|||||||
PRIMARY KEY (sid),
|
PRIMARY KEY (sid),
|
||||||
FOREIGN KEY fk_storage_vessel (vid)
|
FOREIGN KEY fk_storage_vessel (vid)
|
||||||
REFERENCES vessel(vid)
|
REFERENCES vessel(vid)
|
||||||
|
ON DELETE RESTRICT
|
||||||
) ENGINE=InnoDB;
|
) ENGINE=InnoDB;
|
||||||
|
|
||||||
/* intentionally after storage creation */
|
/* intentionally after storage creation */
|
||||||
ALTER TABLE vessel
|
ALTER TABLE vessel
|
||||||
ADD CONSTRAINT fk_vessel_storage
|
ADD CONSTRAINT fk_vessel_storage
|
||||||
FOREIGN KEY (sid_default)
|
FOREIGN KEY (sid_default)
|
||||||
REFERENCES storage(sid);
|
REFERENCES storage(sid)
|
||||||
|
ON DELETE RESTRICT;
|
||||||
|
|
||||||
CREATE TABLE tag (
|
CREATE TABLE tag (
|
||||||
tagid smallint(6) UNSIGNED NOT NULL AUTO_INCREMENT,
|
tagid smallint(6) UNSIGNED NOT NULL AUTO_INCREMENT,
|
||||||
@@ -152,13 +159,14 @@ CREATE TABLE tagref (
|
|||||||
objid int(10) UNSIGNED NOT NULL,
|
objid int(10) UNSIGNED NOT NULL,
|
||||||
objtype enum('equip','inv','prov','doc', 'proj', 'task', 'maint') NOT NULL,
|
objtype enum('equip','inv','prov','doc', 'proj', 'task', 'maint') NOT NULL,
|
||||||
PRIMARY KEY (tagid, objid, objtype),
|
PRIMARY KEY (tagid, objid, objtype),
|
||||||
|
INDEX ix_tagref_obj (objid, objtype),
|
||||||
FOREIGN KEY fk_tagref_tag (tagid)
|
FOREIGN KEY fk_tagref_tag (tagid)
|
||||||
REFERENCES tag(tagid)
|
REFERENCES tag(tagid)
|
||||||
ON DELETE CASCADE
|
ON DELETE CASCADE
|
||||||
) ENGINE=InnoDB;
|
) ENGINE=InnoDB;
|
||||||
|
|
||||||
/* TODO Boxes can be nested via parent
|
/* TODO Boxes can be nested via parent,
|
||||||
TODO boxsize: (LxWxH) in cm? */
|
very low priority because perhaps rarely used */
|
||||||
CREATE TABLE box (
|
CREATE TABLE box (
|
||||||
boxid smallint(6) UNSIGNED NOT NULL AUTO_INCREMENT,
|
boxid smallint(6) UNSIGNED NOT NULL AUTO_INCREMENT,
|
||||||
sid smallint(6) UNSIGNED NOT NULL,
|
sid smallint(6) UNSIGNED NOT NULL,
|
||||||
@@ -168,11 +176,20 @@ CREATE TABLE box (
|
|||||||
color char(6) DEFAULT NULL,
|
color char(6) DEFAULT NULL,
|
||||||
content varchar(60) DEFAULT NULL,
|
content varchar(60) DEFAULT NULL,
|
||||||
weight float(5,2) UNSIGNED DEFAULT NULL,
|
weight float(5,2) UNSIGNED DEFAULT NULL,
|
||||||
|
weight_net float(5,2) UNSIGNED DEFAULT NULL,
|
||||||
|
wx smallint(6) UNSIGNED NOT NULL DEFAULT 0, -- length
|
||||||
|
wy smallint(6) UNSIGNED NOT NULL DEFAULT 0, -- width
|
||||||
|
wz smallint(6) UNSIGNED NOT NULL DEFAULT 0, -- height
|
||||||
|
price decimal(12,2) DEFAULT NULL,
|
||||||
remarks varchar(150) DEFAULT NULL,
|
remarks varchar(150) DEFAULT NULL,
|
||||||
PRIMARY KEY (boxid),
|
PRIMARY KEY (boxid),
|
||||||
INDEX ix_label (label),
|
INDEX ix_label (label),
|
||||||
FOREIGN KEY fk_box_storage (sid)
|
FOREIGN KEY fk_box_storage (sid)
|
||||||
REFERENCES storage(sid)
|
REFERENCES storage(sid)
|
||||||
|
ON DELETE RESTRICT,
|
||||||
|
FOREIGN KEY fk_box_parent (parent)
|
||||||
|
REFERENCES box(boxid)
|
||||||
|
ON DELETE RESTRICT
|
||||||
) ENGINE=InnoDB;
|
) ENGINE=InnoDB;
|
||||||
|
|
||||||
CREATE TABLE equipment (
|
CREATE TABLE equipment (
|
||||||
@@ -188,6 +205,9 @@ CREATE TABLE equipment (
|
|||||||
purchdate date DEFAULT NULL,
|
purchdate date DEFAULT NULL,
|
||||||
price decimal(12,2) DEFAULT NULL,
|
price decimal(12,2) DEFAULT NULL,
|
||||||
weight float(5,2) UNSIGNED DEFAULT NULL,
|
weight float(5,2) UNSIGNED DEFAULT NULL,
|
||||||
|
x smallint(6) UNSIGNED NOT NULL DEFAULT 0,
|
||||||
|
y smallint(6) NOT NULL DEFAULT 0,
|
||||||
|
z smallint(6) NOT NULL DEFAULT 0,
|
||||||
remarks varchar(150) DEFAULT NULL,
|
remarks varchar(150) DEFAULT NULL,
|
||||||
flags set('ordered','removed','deleted') DEFAULT NULL,
|
flags set('ordered','removed','deleted') DEFAULT NULL,
|
||||||
PRIMARY KEY(eid),
|
PRIMARY KEY(eid),
|
||||||
@@ -196,16 +216,25 @@ CREATE TABLE equipment (
|
|||||||
ON DELETE RESTRICT,
|
ON DELETE RESTRICT,
|
||||||
FOREIGN KEY fk_equipment_supplier (supplier)
|
FOREIGN KEY fk_equipment_supplier (supplier)
|
||||||
REFERENCES company(compid)
|
REFERENCES company(compid)
|
||||||
ON DELETE RESTRICT
|
ON DELETE RESTRICT,
|
||||||
|
FOREIGN KEY fk_equipment_manufacturer (manufacturer)
|
||||||
|
REFERENCES company(compid)
|
||||||
|
ON DELETE RESTRICT,
|
||||||
|
CONSTRAINT chk_equipment_pos CHECK (
|
||||||
|
(x IS NULL AND y IS NULL AND z IS NULL)
|
||||||
|
OR
|
||||||
|
(x IS NOT NULL AND y IS NOT NULL AND z IS NOT NULL)
|
||||||
|
)
|
||||||
) ENGINE=InnoDB;
|
) ENGINE=InnoDB;
|
||||||
|
|
||||||
CREATE TABLE inventory (
|
CREATE TABLE inventory (
|
||||||
invid int(10) UNSIGNED NOT NULL AUTO_INCREMENT,
|
invid int(10) UNSIGNED NOT NULL AUTO_INCREMENT,
|
||||||
invname varchar(80) NOT NULL,
|
invname varchar(80) NOT NULL,
|
||||||
|
icat tinyint(3) DEFAULT NULL,
|
||||||
conttype enum('storage','box') NOT NULL DEFAULT 'storage',
|
conttype enum('storage','box') NOT NULL DEFAULT 'storage',
|
||||||
sid smallint(6) UNSIGNED DEFAULT NULL,
|
sid smallint(6) UNSIGNED DEFAULT NULL,
|
||||||
boxid smallint(6) UNSIGNED DEFAULT NULL,
|
boxid smallint(6) UNSIGNED DEFAULT NULL,
|
||||||
eid smallint(6) UNSIGNED DEFAULT NULL,
|
eid smallint(6) UNSIGNED DEFAULT NULL, -- spare part reference to equipment
|
||||||
number smallint(6) UNSIGNED NOT NULL DEFAULT 1,
|
number smallint(6) UNSIGNED NOT NULL DEFAULT 1,
|
||||||
weight float(5,2) UNSIGNED DEFAULT NULL,
|
weight float(5,2) UNSIGNED DEFAULT NULL,
|
||||||
price decimal(12,2) DEFAULT NULL,
|
price decimal(12,2) DEFAULT NULL,
|
||||||
@@ -216,12 +245,15 @@ CREATE TABLE inventory (
|
|||||||
PRIMARY KEY (invid),
|
PRIMARY KEY (invid),
|
||||||
INDEX ix_invname (invname),
|
INDEX ix_invname (invname),
|
||||||
FOREIGN KEY fk_inventory_storage (sid)
|
FOREIGN KEY fk_inventory_storage (sid)
|
||||||
REFERENCES storage(sid),
|
REFERENCES storage(sid)
|
||||||
|
ON DELETE RESTRICT,
|
||||||
FOREIGN KEY fk_inventory_box (boxid)
|
FOREIGN KEY fk_inventory_box (boxid)
|
||||||
REFERENCES box(boxid),
|
REFERENCES box(boxid)
|
||||||
|
ON DELETE RESTRICT,
|
||||||
FOREIGN KEY fk_inventory_equipment (eid)
|
FOREIGN KEY fk_inventory_equipment (eid)
|
||||||
REFERENCES equipment(eid),
|
REFERENCES equipment(eid)
|
||||||
CHECK (
|
ON DELETE RESTRICT,
|
||||||
|
CONSTRAINT chk_inventory_stor CHECK (
|
||||||
(sid IS NOT NULL AND boxid IS NULL)
|
(sid IS NOT NULL AND boxid IS NULL)
|
||||||
OR
|
OR
|
||||||
(sid IS NULL AND boxid IS NOT NULL)
|
(sid IS NULL AND boxid IS NOT NULL)
|
||||||
@@ -232,9 +264,10 @@ CREATE TABLE cable (
|
|||||||
cableid smallint(6) UNSIGNED NOT NULL AUTO_INCREMENT,
|
cableid smallint(6) UNSIGNED NOT NULL AUTO_INCREMENT,
|
||||||
vid smallint(6) NOT NULL DEFAULT 1,
|
vid smallint(6) NOT NULL DEFAULT 1,
|
||||||
cablename varchar(80) NOT NULL,
|
cablename varchar(80) NOT NULL,
|
||||||
cabletype varchar(40) DEFAULT NULL, -- e.g. H07RN-F
|
cabletype tinyint(3) DEFAULT NULL, -- from dropdown id 11 e.g. antenna cable
|
||||||
|
techname tinyint(3) DEFAULT NULL, -- from dropdown id 12 e.g. H07RN-F
|
||||||
length float(5,2) UNSIGNED NOT NULL DEFAULT 0, -- total length in m
|
length float(5,2) UNSIGNED NOT NULL DEFAULT 0, -- total length in m
|
||||||
conductors TINYINT(3) UNSIGNED NOT NULL DEFAULT 1,
|
conductors tinyint(3) UNSIGNED NOT NULL DEFAULT 1,
|
||||||
diameter float(5,2) UNSIGNED DEFAULT NULL, -- outer diameter in mm
|
diameter float(5,2) UNSIGNED DEFAULT NULL, -- outer diameter in mm
|
||||||
xsection float(5,2) UNSIGNED DEFAULT NULL, -- cross section in mm²
|
xsection float(5,2) UNSIGNED DEFAULT NULL, -- cross section in mm²
|
||||||
weight float(5,2) UNSIGNED DEFAULT NULL, -- kg/meter
|
weight float(5,2) UNSIGNED DEFAULT NULL, -- kg/meter
|
||||||
@@ -246,11 +279,14 @@ CREATE TABLE cable (
|
|||||||
PRIMARY KEY (cableid),
|
PRIMARY KEY (cableid),
|
||||||
INDEX ix_cablename (vid, cablename),
|
INDEX ix_cablename (vid, cablename),
|
||||||
FOREIGN KEY fk_cable_vessel (vid)
|
FOREIGN KEY fk_cable_vessel (vid)
|
||||||
REFERENCES vessel(vid),
|
REFERENCES vessel(vid)
|
||||||
|
ON DELETE RESTRICT,
|
||||||
FOREIGN KEY fk_cable_supplier (supplier)
|
FOREIGN KEY fk_cable_supplier (supplier)
|
||||||
REFERENCES company(compid),
|
REFERENCES company(compid)
|
||||||
|
ON DELETE RESTRICT,
|
||||||
FOREIGN KEY fk_cable_manufacturer (manufacturer)
|
FOREIGN KEY fk_cable_manufacturer (manufacturer)
|
||||||
REFERENCES company(compid)
|
REFERENCES company(compid)
|
||||||
|
ON DELETE RESTRICT
|
||||||
) ENGINE=InnoDB;
|
) ENGINE=InnoDB;
|
||||||
|
|
||||||
CREATE table fuse (
|
CREATE table fuse (
|
||||||
@@ -267,11 +303,14 @@ CREATE table fuse (
|
|||||||
PRIMARY KEY (fuseid),
|
PRIMARY KEY (fuseid),
|
||||||
UNIQUE INDEX ix_fusenumber (vid, fnumber),
|
UNIQUE INDEX ix_fusenumber (vid, fnumber),
|
||||||
FOREIGN KEY fk_fuse_vessel (vid)
|
FOREIGN KEY fk_fuse_vessel (vid)
|
||||||
REFERENCES vessel(vid),
|
REFERENCES vessel(vid)
|
||||||
|
ON DELETE RESTRICT,
|
||||||
FOREIGN KEY fk_fuse_cable (cableid)
|
FOREIGN KEY fk_fuse_cable (cableid)
|
||||||
REFERENCES cable(cableid),
|
REFERENCES cable(cableid)
|
||||||
|
ON DELETE RESTRICT,
|
||||||
FOREIGN KEY fk_fuse_equipment (eid)
|
FOREIGN KEY fk_fuse_equipment (eid)
|
||||||
REFERENCES equipment(eid)
|
REFERENCES equipment(eid)
|
||||||
|
ON DELETE RESTRICT
|
||||||
) ENGINE=InnoDB;
|
) ENGINE=InnoDB;
|
||||||
|
|
||||||
-- change vals to decimal(12,4)?
|
-- change vals to decimal(12,4)?
|
||||||
@@ -290,9 +329,11 @@ CREATE TABLE measurement (
|
|||||||
note varchar(80) DEFAULT NULL,
|
note varchar(80) DEFAULT NULL,
|
||||||
PRIMARY KEY (mid),
|
PRIMARY KEY (mid),
|
||||||
FOREIGN KEY fk_measurement_vessel (vid)
|
FOREIGN KEY fk_measurement_vessel (vid)
|
||||||
REFERENCES vessel(vid),
|
REFERENCES vessel(vid)
|
||||||
|
ON DELETE RESTRICT,
|
||||||
FOREIGN KEY fk_measurement_equipment (eid)
|
FOREIGN KEY fk_measurement_equipment (eid)
|
||||||
REFERENCES equipment(eid)
|
REFERENCES equipment(eid)
|
||||||
|
ON DELETE RESTRICT
|
||||||
) ENGINE=InnoDB;
|
) ENGINE=InnoDB;
|
||||||
|
|
||||||
CREATE TABLE provisions (
|
CREATE TABLE provisions (
|
||||||
@@ -313,9 +354,11 @@ CREATE TABLE provisions (
|
|||||||
remarks varchar(150) DEFAULT NULL,
|
remarks varchar(150) DEFAULT NULL,
|
||||||
PRIMARY KEY (provid),
|
PRIMARY KEY (provid),
|
||||||
FOREIGN KEY fk_provisions_storage (sid)
|
FOREIGN KEY fk_provisions_storage (sid)
|
||||||
REFERENCES storage(sid),
|
REFERENCES storage(sid)
|
||||||
|
ON DELETE RESTRICT,
|
||||||
FOREIGN KEY fk_provisions_box (boxid)
|
FOREIGN KEY fk_provisions_box (boxid)
|
||||||
REFERENCES box(boxid)
|
REFERENCES box(boxid)
|
||||||
|
ON DELETE RESTRICT
|
||||||
) ENGINE=InnoDB;
|
) ENGINE=InnoDB;
|
||||||
|
|
||||||
/* TODO
|
/* TODO
|
||||||
@@ -343,19 +386,19 @@ CREATE TABLE document (
|
|||||||
|
|
||||||
CREATE TABLE docref (
|
CREATE TABLE docref (
|
||||||
drid int(10) NOT NULL AUTO_INCREMENT,
|
drid int(10) NOT NULL AUTO_INCREMENT,
|
||||||
reftype enum('vessel','box','equipment','project','task','user','company') NOT NULL DEFAULT 'vessel',
|
reftype enum('vessel','box','equipment','project','maint', 'task','user','company') NOT NULL DEFAULT 'vessel',
|
||||||
docid smallint(6) NOT NULL,
|
docid smallint(6) NOT NULL,
|
||||||
refid int(10) NOT NULL,
|
refid int(10) NOT NULL,
|
||||||
PRIMARY KEY (drid),
|
PRIMARY KEY (drid),
|
||||||
UNIQUE INDEX ix_docref (docid, refid, reftype),
|
UNIQUE INDEX ix_docref (docid, refid, reftype),
|
||||||
|
INDEX ix_docref_ref (refid, reftype),
|
||||||
FOREIGN KEY fk_docref_doc (docid)
|
FOREIGN KEY fk_docref_doc (docid)
|
||||||
REFERENCES document (docid)
|
REFERENCES document (docid)
|
||||||
ON DELETE RESTRICT
|
ON DELETE CASCADE
|
||||||
ON UPDATE CASCADE
|
|
||||||
) ENGINE=InnoDB;
|
) ENGINE=InnoDB;
|
||||||
|
|
||||||
/* TODO optional fields: plan date, target date, completion date
|
/* TODO optional fields: target date?
|
||||||
interval_hours, last_hours
|
responsible?
|
||||||
signalk: operating hours current vs maint every n operating hours in separate
|
signalk: operating hours current vs maint every n operating hours in separate
|
||||||
*/
|
*/
|
||||||
CREATE TABLE maintenance (
|
CREATE TABLE maintenance (
|
||||||
@@ -372,13 +415,14 @@ CREATE TABLE maintenance (
|
|||||||
maintstate enum('new','plan','ongoing','done') NOT NULL DEFAULT 'new',
|
maintstate enum('new','plan','ongoing','done') NOT NULL DEFAULT 'new',
|
||||||
PRIMARY KEY (maintid),
|
PRIMARY KEY (maintid),
|
||||||
FOREIGN KEY fk_maintenance_vessel (vid)
|
FOREIGN KEY fk_maintenance_vessel (vid)
|
||||||
REFERENCES vessel(vid),
|
REFERENCES vessel(vid)
|
||||||
|
ON DELETE RESTRICT,
|
||||||
FOREIGN KEY fk_maintenance_equipment (eid)
|
FOREIGN KEY fk_maintenance_equipment (eid)
|
||||||
REFERENCES equipment(eid)
|
REFERENCES equipment(eid)
|
||||||
|
ON DELETE RESTRICT
|
||||||
) ENGINE=InnoDB;
|
) ENGINE=InnoDB;
|
||||||
|
|
||||||
/* TODO? time recording */
|
/* TODO time recording? */
|
||||||
|
|
||||||
CREATE TABLE project (
|
CREATE TABLE project (
|
||||||
projid smallint(6) NOT NULL AUTO_INCREMENT,
|
projid smallint(6) NOT NULL AUTO_INCREMENT,
|
||||||
projname varchar(40) NOT NULL,
|
projname varchar(40) NOT NULL,
|
||||||
@@ -392,9 +436,11 @@ CREATE TABLE project (
|
|||||||
projstate enum('new','plan','ongoing','paused','finished') NOT NULL DEFAULT 'new',
|
projstate enum('new','plan','ongoing','paused','finished') NOT NULL DEFAULT 'new',
|
||||||
PRIMARY KEY (projid),
|
PRIMARY KEY (projid),
|
||||||
FOREIGN KEY fk_project_vessel (vid)
|
FOREIGN KEY fk_project_vessel (vid)
|
||||||
REFERENCES vessel(vid),
|
REFERENCES vessel(vid)
|
||||||
|
ON DELETE RESTRICT,
|
||||||
FOREIGN KEY fk_project_user (responsible)
|
FOREIGN KEY fk_project_user (responsible)
|
||||||
REFERENCES user(userid)
|
REFERENCES user(userid)
|
||||||
|
ON DELETE RESTRICT
|
||||||
) ENGINE=InnoDB;
|
) ENGINE=InnoDB;
|
||||||
|
|
||||||
/* TODO executed_by : company or user? or both? */
|
/* TODO executed_by : company or user? or both? */
|
||||||
@@ -411,13 +457,17 @@ CREATE TABLE task (
|
|||||||
started datetime DEFAULT NULL,
|
started datetime DEFAULT NULL,
|
||||||
finished datetime DEFAULT NULL,
|
finished datetime DEFAULT NULL,
|
||||||
responsible smallint(6) NOT NULL,
|
responsible smallint(6) NOT NULL,
|
||||||
|
remarks varchar(150) DEFAULT NULL,
|
||||||
PRIMARY KEY (taskid),
|
PRIMARY KEY (taskid),
|
||||||
FOREIGN KEY fk_task_user (responsible)
|
FOREIGN KEY fk_task_user (responsible)
|
||||||
REFERENCES user(userid),
|
REFERENCES user(userid)
|
||||||
|
ON DELETE RESTRICT,
|
||||||
FOREIGN KEY fk_task_vessel (vid)
|
FOREIGN KEY fk_task_vessel (vid)
|
||||||
REFERENCES vessel(vid),
|
REFERENCES vessel(vid)
|
||||||
|
ON DELETE RESTRICT,
|
||||||
FOREIGN KEY fk_task_project (projid)
|
FOREIGN KEY fk_task_project (projid)
|
||||||
REFERENCES project(projid)
|
REFERENCES project(projid)
|
||||||
|
ON DELETE RESTRICT
|
||||||
) ENGINE=InnoDB;
|
) ENGINE=InnoDB;
|
||||||
|
|
||||||
/* Notes can be assigned to tasks, maintenances and equipment */
|
/* Notes can be assigned to tasks, maintenances and equipment */
|
||||||
@@ -426,7 +476,12 @@ CREATE TABLE note (
|
|||||||
notetype enum('task','maint','equip') NOT NULL DEFAULT 'task',
|
notetype enum('task','maint','equip') NOT NULL DEFAULT 'task',
|
||||||
refid int(10) NOT NULL,
|
refid int(10) NOT NULL,
|
||||||
annotation text NOT NULL,
|
annotation text NOT NULL,
|
||||||
PRIMARY KEY (noteid)
|
created_at timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
|
||||||
|
created_by smallint(6) DEFAULT NULL,
|
||||||
|
PRIMARY KEY (noteid),
|
||||||
|
FOREIGN KEY fk_note_user (created_by)
|
||||||
|
REFERENCES user(userid)
|
||||||
|
ON DELETE RESTRICT
|
||||||
) ENGINE=InnoDB;
|
) ENGINE=InnoDB;
|
||||||
|
|
||||||
CREATE TABLE checklist (
|
CREATE TABLE checklist (
|
||||||
@@ -437,6 +492,7 @@ CREATE TABLE checklist (
|
|||||||
PRIMARY KEY (clid),
|
PRIMARY KEY (clid),
|
||||||
FOREIGN KEY fk_checklist_parent (parent)
|
FOREIGN KEY fk_checklist_parent (parent)
|
||||||
REFERENCES checklist(clid)
|
REFERENCES checklist(clid)
|
||||||
|
ON DELETE RESTRICT
|
||||||
) ENGINE=InnoDB;
|
) ENGINE=InnoDB;
|
||||||
|
|
||||||
CREATE TABLE checkgroup (
|
CREATE TABLE checkgroup (
|
||||||
@@ -453,6 +509,7 @@ CREATE TABLE checkitem (
|
|||||||
PRIMARY KEY (checkid),
|
PRIMARY KEY (checkid),
|
||||||
FOREIGN KEY fk_checkitem_group (groupid)
|
FOREIGN KEY fk_checkitem_group (groupid)
|
||||||
REFERENCES checkgroup(groupid)
|
REFERENCES checkgroup(groupid)
|
||||||
|
ON DELETE RESTRICT
|
||||||
) ENGINE=InnoDB;
|
) ENGINE=InnoDB;
|
||||||
|
|
||||||
CREATE TABLE checkref (
|
CREATE TABLE checkref (
|
||||||
@@ -468,7 +525,7 @@ CREATE TABLE checkref (
|
|||||||
ON DELETE CASCADE
|
ON DELETE CASCADE
|
||||||
) ENGINE=InnoDB;
|
) ENGINE=InnoDB;
|
||||||
|
|
||||||
/* Expansion for future use: signalk mapping (just an idea) */
|
/* Expansion for future use: signalk mapping (experimental) */
|
||||||
CREATE TABLE signalk (
|
CREATE TABLE signalk (
|
||||||
skid int(10) NOT NULL AUTO_INCREMENT,
|
skid int(10) NOT NULL AUTO_INCREMENT,
|
||||||
vid smallint(6) NOT NULL,
|
vid smallint(6) NOT NULL,
|
||||||
@@ -476,9 +533,33 @@ CREATE TABLE signalk (
|
|||||||
objid int(10) NOT NULL,
|
objid int(10) NOT NULL,
|
||||||
datatype enum('engine_hours','tank_level') NOT NULL,
|
datatype enum('engine_hours','tank_level') NOT NULL,
|
||||||
skpath varchar(255) NOT NULL,
|
skpath varchar(255) NOT NULL,
|
||||||
|
mid smallint(6) DEFAULT NULL,
|
||||||
PRIMARY KEY (skid),
|
PRIMARY KEY (skid),
|
||||||
UNIQUE KEY ix_signalk
|
UNIQUE KEY ix_signalk
|
||||||
(vid, objtype, objid, datatype),
|
(vid, objtype, objid, datatype),
|
||||||
FOREIGN KEY fk_signalk_vessel (vid)
|
FOREIGN KEY fk_signalk_vessel (vid)
|
||||||
REFERENCES vessel(vid)
|
REFERENCES vessel(vid)
|
||||||
|
ON DELETE RESTRICT
|
||||||
) ENGINE=InnoDB;
|
) ENGINE=InnoDB;
|
||||||
|
|
||||||
|
/* Token
|
||||||
|
- Python: secrets.token_hex(8)
|
||||||
|
- PHP: bin2hex(random_bytes(8)) */
|
||||||
|
CREATE TABLE recordlock (
|
||||||
|
lock_table varchar(40) NOT NULL,
|
||||||
|
lock_key int(10) NOT NULL,
|
||||||
|
token varchar(16) NOT NULL,
|
||||||
|
userid smallint(6) NOT NULL,
|
||||||
|
created_at timestamp NOT NULL DEFAULT current_timestamp,
|
||||||
|
last_seen timestamp NOT NULL DEFAULT current_timestamp,
|
||||||
|
PRIMARY KEY (lock_table, lock_key),
|
||||||
|
UNIQUE KEY ix_lock_token (token)
|
||||||
|
) ENGINE=MEMORY;
|
||||||
|
|
||||||
|
/* Use with: UPDATE revision SET changed=CURRENT_TIMESTAMP WHERE revid=? */
|
||||||
|
CREATE TABLE revision (
|
||||||
|
revid smallint(6) UNSIGNED NOT NULL,
|
||||||
|
changed timestamp NOT NULL,
|
||||||
|
PRIMARY KEY (revid),
|
||||||
|
INDEX ix_revision_ts (changed) -- for select by timestamp
|
||||||
|
) ENGINE=MEMORY;
|
||||||
|
|||||||
@@ -0,0 +1,30 @@
|
|||||||
|
INSERT INTO measurement (mname, val1, accuracy) VALUES
|
||||||
|
('SA - Segelflaeche', 0, 'unknown'),
|
||||||
|
('P - Großsegel-Vorliek', 0, 'unknown'),
|
||||||
|
('E - Großsegel-Unterliek', 0, 'unknown'),
|
||||||
|
('I - Höhe des Vorsegeldreiecks', 0, 'unknown'),
|
||||||
|
('J - Basis des Vorsegeldreiecks', 0, 'unknown'),
|
||||||
|
('ISP - Höhe des Spinnakerfalls', 0, 'unknown'),
|
||||||
|
('SPL - Länge des Spinnakerbaums', 0, 'unknown'),
|
||||||
|
('TPS - Abstand Tackpunkt - Mast', 0, 'unknown'),
|
||||||
|
('FL - Vorstaglänge', 0, 'unknown'),
|
||||||
|
('IG - Höhe des inneren Vorsegelfalls', 0, 'unknown'),
|
||||||
|
('JH - Höhe des Vorsegelfalls', 0, 'unknown'),
|
||||||
|
('BAS - Großbaumhöhe', 0, 'unknown'),
|
||||||
|
('LP - Abstand Schothorn - Vorliek Fock', 0, 'unknown'),
|
||||||
|
('LPG - Abstand Schothorn Vorliek Genua', 0, 'unknown'),
|
||||||
|
('MW - Großsegelbreite', 0, 'unknown')
|
||||||
|
('MUW - Obere Großsegelbreite', 0, 'unknown')
|
||||||
|
('MTW - Großsegelbreite am Kopf', 0, 'unknown')
|
||||||
|
('MGU - Großsegel oberer Meßpunkt', 0, 'unknown')
|
||||||
|
('MGM - Großsegel mittlerer Meßpunkt', 0, 'unknown')
|
||||||
|
('MGL - Großsegel unterer Meßpunkt', 0, 'unknown')
|
||||||
|
('SHW - Halbe Spinnakerbreite', 0, 'unknown')
|
||||||
|
('SMG - Spinnaker Mid-Girth', 0, 'unknown')
|
||||||
|
('SFL - Spinnaker-Unterliekslänge', 0, 'unknown')
|
||||||
|
('LOA - Länge ueber alles', 0, 'unknown')
|
||||||
|
('LWL - Wasserlinienlänge', 0, 'unknown')
|
||||||
|
('BOA - Grösste Breite', 0, 'unknown')
|
||||||
|
('BWL - Breite an der Wasserlinie', 0, 'unknown')
|
||||||
|
('D - Tiefgang', 0, 'unknown')
|
||||||
|
('DISP - Verdrängung', 0, 'unknown');
|
||||||
+19
-7
@@ -11,18 +11,25 @@ UPDATE user SET userid=0 WHERE userid=1;
|
|||||||
INSERT INTO user (userid, login, pass, displayname, role) VALUES
|
INSERT INTO user (userid, login, pass, displayname, role) VALUES
|
||||||
(1, 'captain', '$2y$10$naVMnC4S6bZ3IakxLJPJK.iSazlkYxVLeiRt9CB/j0jSExQZU1SCK', 'Captain', 'captain');
|
(1, 'captain', '$2y$10$naVMnC4S6bZ3IakxLJPJK.iSazlkYxVLeiRt9CB/j0jSExQZU1SCK', 'Captain', 'captain');
|
||||||
|
|
||||||
INSERT INTO settings (userid, sno, valint) VALUES
|
INSERT INTO settings (userid, sno, valint, valstr) VALUES
|
||||||
(0, 0, 1), -- Database schema version
|
(0, 0, 1, NULL), -- Database schema version
|
||||||
(0, 1, 0), -- No vessel assignment to SYSTEM
|
(0, 1, 0, NULL), -- No vessel assignment to SYSTEM
|
||||||
(1, 1, 0), -- No vessel assignment to user "captain"
|
(1, 1, 0, NULL), -- No vessel assignment to user "captain"
|
||||||
(0, 20, 1280), -- Image width limit
|
(0, 20, 1280, NULL), -- Image width limit
|
||||||
(0, 21, 1024); -- Image height limit
|
(0, 21, 1024, NULL), -- Image height limit
|
||||||
|
(0, 4, NULL, '€'), -- Currency symbol
|
||||||
|
(0, 5, 0, 'http://127.0.0.1:3000'), -- Signal K: to enable set valint=1
|
||||||
|
(0, 6, 0, 'localhost:2597'); -- NMEA2000 (for future use)
|
||||||
|
|
||||||
/* setting descriptions */
|
/* setting descriptions */
|
||||||
INSERT INTO settings (userid, sno, valstr) VALUES
|
INSERT INTO settings (userid, sno, valstr) VALUES
|
||||||
|
(-1, 0, 'database schema version'),
|
||||||
(-1, 1, 'vessel id'),
|
(-1, 1, 'vessel id'),
|
||||||
(-1, 2, 'date format'),
|
(-1, 2, 'date format'),
|
||||||
(-1, 3, 'user menu'),
|
(-1, 3, 'user menu'),
|
||||||
|
(-1, 4, 'currency symbol e.g. €, $, £, ¥'),
|
||||||
|
(-1, 5, 'signalk connection'),
|
||||||
|
(-1, 6, 'nmea2000 connection'),
|
||||||
(-1, 10, 'rows in table'),
|
(-1, 10, 'rows in table'),
|
||||||
(-1, 20, 'maximum image width'),
|
(-1, 20, 'maximum image width'),
|
||||||
(-1, 21, 'maximum image height'),
|
(-1, 21, 'maximum image height'),
|
||||||
@@ -66,7 +73,9 @@ INSERT INTO dropdown (ddid, ddval, ddtext) VALUES
|
|||||||
(0, 8, 'Einheiten'),
|
(0, 8, 'Einheiten'),
|
||||||
(0, 9, 'Kistentypen'),
|
(0, 9, 'Kistentypen'),
|
||||||
(0, 10, 'Sicherungsblöcke'), -- fuse locations
|
(0, 10, 'Sicherungsblöcke'), -- fuse locations
|
||||||
(0, 11, 'Kabeltypen');
|
(0, 11, 'Kabeltypen'),
|
||||||
|
(0, 12, 'Technische Kabel-Bezeichnung'),
|
||||||
|
(0, 13, 'Inventarkategorien');
|
||||||
|
|
||||||
INSERT INTO dropdown (ddid, ddval, ddtext, flags) VALUES
|
INSERT INTO dropdown (ddid, ddval, ddtext, flags) VALUES
|
||||||
(2, 1, 'Lieferant', 'fixed'),
|
(2, 1, 'Lieferant', 'fixed'),
|
||||||
@@ -78,3 +87,6 @@ INSERT INTO dropdown (ddid, ddval, ddtext, flags) VALUES
|
|||||||
(3, 0, 'Stauraum allgemein', 'fixed'),
|
(3, 0, 'Stauraum allgemein', 'fixed'),
|
||||||
(3, 1, 'Tank', 'fixed'),
|
(3, 1, 'Tank', 'fixed'),
|
||||||
(3, 2, 'Extern', 'fixed'); -- not on board
|
(3, 2, 'Extern', 'fixed'); -- not on board
|
||||||
|
|
||||||
|
INSERT INTO company (compid, compname, comptype) VALUES
|
||||||
|
(-3, 'Eigenbau', 3);
|
||||||
|
|||||||
+20
-9
@@ -11,18 +11,24 @@ UPDATE user SET userid=0 WHERE userid=1;
|
|||||||
INSERT INTO user (userid, login, pass, displayname, role) VALUES
|
INSERT INTO user (userid, login, pass, displayname, role) VALUES
|
||||||
(1, 'captain', '$2y$10$naVMnC4S6bZ3IakxLJPJK.iSazlkYxVLeiRt9CB/j0jSExQZU1SCK', 'Captain', 'captain');
|
(1, 'captain', '$2y$10$naVMnC4S6bZ3IakxLJPJK.iSazlkYxVLeiRt9CB/j0jSExQZU1SCK', 'Captain', 'captain');
|
||||||
|
|
||||||
INSERT INTO settings (userid, sno, valint) VALUES
|
INSERT INTO settings (userid, sno, valint, valstr) VALUES
|
||||||
(0, 0, 1), -- Database schema version
|
(0, 0, 1, NULL), -- Database schema version
|
||||||
(0, 1, 0), -- No vessel assignment to SYSTEM
|
(0, 1, 0, NULL), -- No vessel assignment to SYSTEM
|
||||||
(1, 1, 0), -- No vessel assignment to user "captain"
|
(1, 1, 0, NULL), -- No vessel assignment to user "captain"
|
||||||
(0, 20, 1280), -- Image width limit
|
(0, 20, 1280, NULL), -- Image width limit
|
||||||
(0, 21, 1024); -- Image height limit
|
(0, 21, 1024, NULL), -- Image height limit
|
||||||
|
(0, 4, NULL, '€'), -- Currency symbol
|
||||||
|
(0, 5, 0, 'http://127.0.0.1:3000'), -- Signal K: to enable set valint=1
|
||||||
|
(0, 6, 0, 'localhost:2597'); -- NMEA2000 (for future use)
|
||||||
|
|
||||||
/* setting descriptions */
|
/* setting descriptions */
|
||||||
INSERT INTO settings (userid, sno, valstr) VALUES
|
INSERT INTO settings (userid, sno, valstr) VALUES
|
||||||
(-1, 1, 'vessel id'),
|
(-1, 1, 'vessel id'),
|
||||||
(-1, 2, 'date format'),
|
(-1, 2, 'date format'),
|
||||||
(-1, 3, 'user menu'),
|
(-1, 3, 'user menu'),
|
||||||
|
(-1, 4, 'currency symbol e.g. €, $, £, ¥'),
|
||||||
|
(-1, 5, 'signalk connection'),
|
||||||
|
(-1, 6, 'nmea2000 connection'),
|
||||||
(-1, 10, 'rows in table'),
|
(-1, 10, 'rows in table'),
|
||||||
(-1, 20, 'maximum image width'),
|
(-1, 20, 'maximum image width'),
|
||||||
(-1, 21, 'maximum image height'),
|
(-1, 21, 'maximum image height'),
|
||||||
@@ -63,10 +69,12 @@ INSERT INTO dropdown (ddid, ddval, ddtext) VALUES
|
|||||||
(0, 5, 'provision category'),
|
(0, 5, 'provision category'),
|
||||||
(0, 6, 'provision unit'),
|
(0, 6, 'provision unit'),
|
||||||
(0, 7, 'fuse type'),
|
(0, 7, 'fuse type'),
|
||||||
(0, 8 , 'unit');
|
(0, 8, 'unit'),
|
||||||
(0, 9, 'box types'),
|
(0, 9, 'box types'),
|
||||||
(0.10, 'fuse blocks'),
|
(0, 10, 'fuse blocks'),
|
||||||
(0,11, 'cable types');
|
(0, 11, 'cable types'),
|
||||||
|
(0, 12, 'cable desc. technical'),
|
||||||
|
(0, 13, 'inventory category');
|
||||||
|
|
||||||
INSERT INTO dropdown (ddid, ddval, ddtext, flags) VALUES
|
INSERT INTO dropdown (ddid, ddval, ddtext, flags) VALUES
|
||||||
(2, 1, 'Supplier', 'fixed'),
|
(2, 1, 'Supplier', 'fixed'),
|
||||||
@@ -78,3 +86,6 @@ INSERT INTO dropdown (ddid, ddval, ddtext, flags) VALUES
|
|||||||
(3, 0, 'Generic storage', 'fixed'),
|
(3, 0, 'Generic storage', 'fixed'),
|
||||||
(3, 1, 'Tank', 'fixed'),
|
(3, 1, 'Tank', 'fixed'),
|
||||||
(3, 2, 'External', 'fixed');
|
(3, 2, 'External', 'fixed');
|
||||||
|
|
||||||
|
INSERT INTO company (compid, compname, comptype) VALUES
|
||||||
|
(-3, 'Custom built', 3);
|
||||||
|
|||||||
@@ -85,6 +85,50 @@ INSERT INTO dropdown (ddid, ddval, ddtext) VALUES
|
|||||||
(9, 3, 'Sortimentskasten'),
|
(9, 3, 'Sortimentskasten'),
|
||||||
(9, 4, 'Werkzeugkiste');
|
(9, 4, 'Werkzeugkiste');
|
||||||
|
|
||||||
|
INSERT INTO dropdown (ddid, ddval, ddtext) VALUES
|
||||||
|
(10, 1, 'Kabel-Inline'),
|
||||||
|
(10, 2, 'BlueSea innen'),
|
||||||
|
(10, 3, 'Bluesea außen'),
|
||||||
|
(10, 4, 'Panel 1 (STV 103)'),
|
||||||
|
(10, 5, 'Panel 2 (STV 108)'),
|
||||||
|
(10, 6, 'Reihenklemme 1'),
|
||||||
|
(10, 7, 'Reihenklemme 2');
|
||||||
|
|
||||||
|
INSERT INTO dropdown (ddid, ddval, ddtext) VALUES
|
||||||
|
(11, 1, 'Einzelader'),
|
||||||
|
(11, 2, 'Steuerleitung'),
|
||||||
|
(11, 3, 'Datenkabel'),
|
||||||
|
(11, 4, 'Netzwerkkabel'),
|
||||||
|
(11, 5, 'Koaxialkabel'),
|
||||||
|
(11, 6, 'Antennenkabel'),
|
||||||
|
(11, 7, 'Lautsprecherkabel'),
|
||||||
|
(11, 8, 'Mikrofonkabel'),
|
||||||
|
(11, 9, 'Batteriekabel'),
|
||||||
|
(11, 10, 'Solarkabel'),
|
||||||
|
(11, 11, 'Gummileitung'),
|
||||||
|
(11, 12, 'Flachbandkabel'),
|
||||||
|
(11, 13, 'Telefonkabel'),
|
||||||
|
(11, 14, 'NMEA-Kabel'),
|
||||||
|
(11, 15, 'CAN-Bus-Kabel'),
|
||||||
|
(11, 16, 'USB-Kabel');
|
||||||
|
|
||||||
|
INSERT INTO dropdown (ddid, ddval, ddtext) VALUES
|
||||||
|
(12, 1, 'H05V-K'),
|
||||||
|
(12, 2, 'H07V-K'),
|
||||||
|
(12, 3, 'H05VV-F'),
|
||||||
|
(12, 4, 'H07RN-F'),
|
||||||
|
(12, 5, 'LiYY'),
|
||||||
|
(12, 6, 'LiYCY'),
|
||||||
|
(12, 7, 'LiYCY-TP'),
|
||||||
|
(12, 8, 'Cat 5e'),
|
||||||
|
(12, 9, 'Cat 6'),
|
||||||
|
(12, 10, 'RG-58'),
|
||||||
|
(12, 11, 'RG-213'),
|
||||||
|
(12, 12, 'RG-316'),
|
||||||
|
(12, 13, 'H-155'),
|
||||||
|
(12, 14, 'Aircell 5'),
|
||||||
|
(12, 15, 'Aircell 7'),
|
||||||
|
(12, 16, 'Ecoflex 10');
|
||||||
|
|
||||||
INSERT INTO storage (sid, vid, sname, stype, x, y, z, remarks) VALUES
|
INSERT INTO storage (sid, vid, sname, stype, x, y, z, remarks) VALUES
|
||||||
(0, 1, 'An Bord', 0, 0, 0, 0, 'Alles wo der Ort nicht spezifiziert werden kann');
|
(0, 1, 'An Bord', 0, 0, 0, 0, 'Alles wo der Ort nicht spezifiziert werden kann');
|
||||||
|
|||||||
@@ -0,0 +1,116 @@
|
|||||||
|
/* Generic data suitable for all kind of boats
|
||||||
|
* SPDX-License-Identifier: WTFPL
|
||||||
|
*/
|
||||||
|
|
||||||
|
-- minimal vessel
|
||||||
|
INSERT INTO vessel (vid, vesselname) VALUES (1, 'Generic vessel');
|
||||||
|
|
||||||
|
INSERT INTO user (userid, login, pass, displayname, role) VALUES
|
||||||
|
(2, 'helmsman', '$2y$10$4keuVm.WD/JeRmAqp2h4MeSxxKITsKv2q07XZrxPUuT/V80CTPbje', 'Helmsman', 'helmsman'),
|
||||||
|
(3, 'sailor', '$2y$10$4keuVm.WD/JeRmAqp2h4MeSxxKITsKv2q07XZrxPUuT/V80CTPbje', 'Sailor', 'sailor');
|
||||||
|
|
||||||
|
INSERT INTO settings (userid, sno, valint) VALUES
|
||||||
|
(2, 1, 1), -- Vessel 1 for helmsman
|
||||||
|
(3, 1, 1); -- Vessel 1 for sailor
|
||||||
|
|
||||||
|
INSERT INTO dropdown (ddid, ddval, ddtext) VALUES
|
||||||
|
(1, 1, 'Monohull'),
|
||||||
|
(1, 2, 'Catamaran'),
|
||||||
|
(1, 3, 'Trimaran');
|
||||||
|
|
||||||
|
INSERT INTO dropdown (ddid, ddval, ddtext) VALUES
|
||||||
|
(2, 4, 'Service'),
|
||||||
|
(2, 5, 'Sailmaker'),
|
||||||
|
(2, 6, 'Marina');
|
||||||
|
|
||||||
|
INSERT INTO dropdown (ddid, ddval, ddtext) VALUES
|
||||||
|
(3, 3, 'Bilge'),
|
||||||
|
(3, 4, 'Quarter Berth');
|
||||||
|
|
||||||
|
INSERT INTO dropdown (ddid, ddval, ddtext) VALUES
|
||||||
|
(4, 1, 'Hull'),
|
||||||
|
(4, 2, 'Deck'),
|
||||||
|
(4, 3, 'Rigging'),
|
||||||
|
(4, 4, 'Sails'),
|
||||||
|
(4, 5, 'Engine'),
|
||||||
|
(4, 6, 'Electrical'),
|
||||||
|
(4, 7, 'Electronics'),
|
||||||
|
(4, 8, 'Navigation'),
|
||||||
|
(4, 9, 'Galley'),
|
||||||
|
(4, 10, 'Solar'),
|
||||||
|
(4, 11, 'Safety'),
|
||||||
|
(4, 12, 'Running Rigging');
|
||||||
|
|
||||||
|
INSERT INTO dropdown (ddid, ddval, ddtext) VALUES
|
||||||
|
(5, 1, 'General'),
|
||||||
|
(5, 2, 'Drinks'),
|
||||||
|
(5, 3, 'Sweets'),
|
||||||
|
(5, 4, 'Tinned Food'),
|
||||||
|
(5, 5, 'Fresh Food'),
|
||||||
|
(5, 6, 'Dry Goods'),
|
||||||
|
(5, 7, 'Freeze-Dried Food'),
|
||||||
|
(5, 8, 'Savoury Snacks');
|
||||||
|
|
||||||
|
INSERT INTO dropdown (ddid, ddval, ddtext, ddshort) VALUES
|
||||||
|
(6, 1, 'kg', 'kg'),
|
||||||
|
(6, 2, 'Litre', 'L'),
|
||||||
|
(6, 3, 'Piece', 'pc'),
|
||||||
|
(6, 4, 'Pack', 'pk'),
|
||||||
|
(6, 5, 'Tin', 'tin'),
|
||||||
|
(6, 6, 'Bottle', 'btl'),
|
||||||
|
(6, 7, 'Bag', 'bag'),
|
||||||
|
(6, 8, 'Bar', 'bar'),
|
||||||
|
(6, 9, 'Jar', 'jar');
|
||||||
|
|
||||||
|
INSERT INTO dropdown (ddid, ddval, ddshort, ddtext) VALUES
|
||||||
|
(8, 1, 'mm', 'Millimetre'),
|
||||||
|
(8, 2, 'cm', 'Centimetre'),
|
||||||
|
(8, 3, 'g', 'Gram'),
|
||||||
|
(8, 4, 'kg', 'Kilogram'),
|
||||||
|
(8, 5, 'm', 'Metre'),
|
||||||
|
(8, 6, 'kW', 'Kilowatt'),
|
||||||
|
(8, 7, 'A', 'Ampere'),
|
||||||
|
(8, 8, 'L', 'Litre');
|
||||||
|
-- TODO add inch, feet, ...
|
||||||
|
|
||||||
|
INSERT INTO dropdown (ddid, ddval, ddtext) VALUES
|
||||||
|
(9, 1, 'Small Plastic Box'),
|
||||||
|
(9, 2, 'Large Plastic Box'),
|
||||||
|
(9, 3, 'Parts Organiser'),
|
||||||
|
(9, 4, 'Toolbox');
|
||||||
|
|
||||||
|
INSERT INTO dropdown (ddid, ddval, ddtext) VALUES
|
||||||
|
(11, 1, 'Single-Core Cable'),
|
||||||
|
(11, 2, 'Control Cable'),
|
||||||
|
(11, 3, 'Data Cable'),
|
||||||
|
(11, 4, 'Network Cable'),
|
||||||
|
(11, 5, 'Coaxial Cable'),
|
||||||
|
(11, 6, 'Aerial Cable'),
|
||||||
|
(11, 7, 'Speaker Cable'),
|
||||||
|
(11, 8, 'Microphone Cable'),
|
||||||
|
(11, 9, 'Battery Cable'),
|
||||||
|
(11, 10, 'Solar Cable'),
|
||||||
|
(11, 11, 'Rubber Cable'),
|
||||||
|
(11, 12, 'Ribbon Cable'),
|
||||||
|
(11, 13, 'Telephone Cable'),
|
||||||
|
(11, 14, 'NMEA Cable'),
|
||||||
|
(11, 15, 'CAN Bus Cable'),
|
||||||
|
(11, 16, 'USB Cable');
|
||||||
|
|
||||||
|
INSERT INTO dropdown (ddid, ddval, ddtext) VALUES
|
||||||
|
(12, 1, 'H05V-K'),
|
||||||
|
(12, 2, 'H07V-K'),
|
||||||
|
(12, 3, 'H05VV-F'),
|
||||||
|
(12, 4, 'H07RN-F'),
|
||||||
|
(12, 5, 'LiYY'),
|
||||||
|
(12, 6, 'LiYCY'),
|
||||||
|
(12, 7, 'LiYCY-TP'),
|
||||||
|
(12, 8, 'Cat 5e'),
|
||||||
|
(12, 9, 'Cat 6'),
|
||||||
|
(12, 10, 'RG-58'),
|
||||||
|
(12, 11, 'RG-213'),
|
||||||
|
(12, 12, 'RG-316'),
|
||||||
|
(12, 13, 'H-155'),
|
||||||
|
(12, 14, 'Aircell 5'),
|
||||||
|
(12, 15, 'Aircell 7'),
|
||||||
|
(12, 16, 'Ecoflex 10');
|
||||||
Vendored
+22
@@ -0,0 +1,22 @@
|
|||||||
|
yms (0.2.2-1) unstable; urgency=medium
|
||||||
|
|
||||||
|
* native gui: prepared list views for main objects
|
||||||
|
* added position to equipment
|
||||||
|
* box improved with dimensions, net weight and price
|
||||||
|
* experimental signalk integration
|
||||||
|
* added config for currency symbol support
|
||||||
|
* database prepared for lazy record locking feature
|
||||||
|
* some small database improvements
|
||||||
|
* webgui: some improvements and fixes
|
||||||
|
* work on native gui: display data lists
|
||||||
|
* prepare dynamic language support for webgui
|
||||||
|
* improve image uploading and scaling code
|
||||||
|
* added date formatting code
|
||||||
|
|
||||||
|
-- Thomas Hooge <thomas@hoogi.de> Mon, 21 Sep 2026 19:00:00 +0200
|
||||||
|
|
||||||
|
yms (0.2.1-1) unstable; urgency=medium
|
||||||
|
|
||||||
|
* Initial Debian packaging.
|
||||||
|
|
||||||
|
-- Thomas Hooge <thomas@hoogi.de> Fri, 28 Aug 2026 11:30:00 +0200
|
||||||
+12
@@ -0,0 +1,12 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
set -e
|
||||||
|
|
||||||
|
. /usr/share/debconf/confmodule
|
||||||
|
|
||||||
|
db_input high yms/db-name || true
|
||||||
|
db_input high yms/db-user || true
|
||||||
|
db_input high yms/db-password || true
|
||||||
|
|
||||||
|
db_input high yms/webgui || true
|
||||||
|
|
||||||
|
db_go
|
||||||
Vendored
+35
@@ -0,0 +1,35 @@
|
|||||||
|
Source: yms
|
||||||
|
Section: misc
|
||||||
|
Priority: optional
|
||||||
|
Maintainer: Thomas Hooge <thomas@hoogi.de>
|
||||||
|
Build-Depends:
|
||||||
|
debhelper-compat (= 13),
|
||||||
|
gettext
|
||||||
|
Standards-Version: 4.7.2
|
||||||
|
Rules-Requires-Root: no
|
||||||
|
|
||||||
|
Package: yms
|
||||||
|
Architecture: all
|
||||||
|
Depends:
|
||||||
|
mariadb-server,
|
||||||
|
python3,
|
||||||
|
python3-gi,
|
||||||
|
gir1.2-gtk-3.0,
|
||||||
|
gir1.2-rsvg-2.0,
|
||||||
|
python3-mysqldb,
|
||||||
|
python3-bcrypt,
|
||||||
|
php (>= 8.0),
|
||||||
|
php-mysql,
|
||||||
|
php-xml,
|
||||||
|
gettext,
|
||||||
|
mupdf-tools
|
||||||
|
Description: Yacht Management Software
|
||||||
|
Yacht Management Software (YMS) is an application for managing yachts and
|
||||||
|
sailboats. It provides a native GTK desktop interface and a web interface.
|
||||||
|
.
|
||||||
|
YMS helps manage vessel equipment, inventory, provisions, documents,
|
||||||
|
maintenance work and tasks. It uses MariaDB for data storage and is
|
||||||
|
designed to be self-hosted.
|
||||||
|
.
|
||||||
|
The software is suitable for private boats, crews, sailing clubs and
|
||||||
|
boat projects.
|
||||||
Vendored
+2
@@ -0,0 +1,2 @@
|
|||||||
|
README
|
||||||
|
INSTALL
|
||||||
Vendored
+33
@@ -0,0 +1,33 @@
|
|||||||
|
# Database
|
||||||
|
db/*.sql usr/share/yms/db/
|
||||||
|
|
||||||
|
# Native GUI
|
||||||
|
ymsgui.py usr/lib/yms/
|
||||||
|
yms/*.py usr/lib/yms/yms/
|
||||||
|
|
||||||
|
# GTK UI
|
||||||
|
yms/ui/* usr/share/yms/ui/
|
||||||
|
|
||||||
|
# Web-GUI
|
||||||
|
webgui/*.php usr/share/yms/webgui/
|
||||||
|
webgui/globals.inc usr/share/yms/webgui/
|
||||||
|
webgui/lib/*.inc usr/share/yms/webgui/lib/
|
||||||
|
webgui/css/* usr/share/yms/webgui/css/
|
||||||
|
webgui/js/* usr/share/yms/webgui/js/
|
||||||
|
webgui/img/* usr/share/yms/webgui/img/
|
||||||
|
webgui/bootstrap usr/share/yms/webgui/
|
||||||
|
webgui/locale/de_DE/LC_MESSAGES/yms.mo usr/share/yms/webgui/locale/de_DE/LC_MESSAGES/
|
||||||
|
webgui/sailboat.svg usr/share/yms/webgui/
|
||||||
|
webgui/config.inc-sample usr/share/yms/
|
||||||
|
|
||||||
|
# Shared static data
|
||||||
|
shapes/* usr/share/yms/shapes/
|
||||||
|
|
||||||
|
# Desktop entry
|
||||||
|
yms.desktop usr/share/applications/
|
||||||
|
|
||||||
|
# Idesktop link file
|
||||||
|
yms.lnk usr/share/yms/
|
||||||
|
|
||||||
|
# Webserver
|
||||||
|
config/apache/yms.conf /etc/apache2/conf-available/
|
||||||
Vendored
+1
@@ -0,0 +1 @@
|
|||||||
|
yms.1
|
||||||
+105
@@ -0,0 +1,105 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
set -e
|
||||||
|
|
||||||
|
. /usr/share/debconf/confmodule
|
||||||
|
|
||||||
|
detect_webservers()
|
||||||
|
{
|
||||||
|
WEB_SERVERS=""
|
||||||
|
|
||||||
|
if dpkg-query -W -f='${Status}' apache2 2>/dev/null |
|
||||||
|
grep -q 'install ok installed'; then
|
||||||
|
WEB_SERVERS="$WEB_SERVERS apache2"
|
||||||
|
fi
|
||||||
|
|
||||||
|
if dpkg-query -W -f='${Status}' nginx 2>/dev/null |
|
||||||
|
grep -q 'install ok installed'; then
|
||||||
|
WEB_SERVERS="$WEB_SERVERS nginx"
|
||||||
|
fi
|
||||||
|
|
||||||
|
if dpkg-query -W -f='${Status}' lighttpd 2>/dev/null |
|
||||||
|
grep -q 'install ok installed'; then
|
||||||
|
WEB_SERVERS="$WEB_SERVERS lighttpd"
|
||||||
|
fi
|
||||||
|
|
||||||
|
WEB_SERVERS="${WEB_SERVERS# }"
|
||||||
|
}
|
||||||
|
|
||||||
|
db_get yms/db-name
|
||||||
|
DB_NAME="$RET"
|
||||||
|
|
||||||
|
db_get yms/db-user
|
||||||
|
DB_USER="$RET"
|
||||||
|
|
||||||
|
db_get yms/db-password
|
||||||
|
DB_PASSWORD="$RET"
|
||||||
|
|
||||||
|
echo "Configuring YMS..."
|
||||||
|
echo "Checking MariaDB database '${DB_NAME}'..."
|
||||||
|
|
||||||
|
if mariadb -N -B -e "SELECT SCHEMA_NAME FROM INFORMATION_SCHEMA.SCHEMATA WHERE SCHEMA_NAME = '${DB_NAME}'" | grep -Fxq "${DB_NAME}"; then
|
||||||
|
echo "Database '${DB_NAME}' already exists."
|
||||||
|
else
|
||||||
|
echo "Database '${DB_NAME}' does not exist."
|
||||||
|
echo "Creating database '${DB_NAME}'..."
|
||||||
|
mariadb -e "CREATE DATABASE \`${DB_NAME}\`"
|
||||||
|
echo "Database '${DB_NAME}' created."
|
||||||
|
echo "Initializing database schema..."
|
||||||
|
mariadb "${DB_NAME}" < /usr/share/yms/db/mariadb.sql
|
||||||
|
mariadb "${DB_NAME}" < /usr/share/yms/db/minimal.sql
|
||||||
|
echo "Database schema initialized."
|
||||||
|
mariadb -e "CREATE USER IF NOT EXISTS '${DB_USER}'@'localhost' IDENTIFIED BY '${DB_PASSWORD}'"
|
||||||
|
mariadb -e "GRANT SELECT, INSERT, UPDATE, DELETE ON \`${DB_NAME}\`.* TO '${DB_USER}'@'localhost'"
|
||||||
|
fi
|
||||||
|
|
||||||
|
echo "Initializing document storage..."
|
||||||
|
if ! getent group yms >/dev/null; then
|
||||||
|
addgroup --system yms
|
||||||
|
fi
|
||||||
|
if ! id -nG www-data | tr ' ' '\n' | grep -qx yms; then
|
||||||
|
adduser www-data yms
|
||||||
|
fi
|
||||||
|
mkdir -p /var/lib/yms/thumb
|
||||||
|
chown -R www-data:yms /var/lib/yms
|
||||||
|
|
||||||
|
db_get yms/webgui
|
||||||
|
if [ "$RET" = "true" ]; then
|
||||||
|
|
||||||
|
detect_webservers
|
||||||
|
case "$WEB_SERVERS" in
|
||||||
|
"")
|
||||||
|
echo "No supported webserver installed."
|
||||||
|
;;
|
||||||
|
apache2)
|
||||||
|
echo "Apache detected."
|
||||||
|
a2enconf yms
|
||||||
|
invoke-rc.d apache2 reload
|
||||||
|
echo "Web GUI for apache2 enabled."
|
||||||
|
;;
|
||||||
|
nginx)
|
||||||
|
echo "nginx detected."
|
||||||
|
;;
|
||||||
|
lighttpd)
|
||||||
|
echo "lighttpd detected."
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
echo "Multiple webservers detected: $WEB_SERVERS"
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
|
||||||
|
if [ ! -f /etc/yms/config.inc ]; then
|
||||||
|
# create initial configuration
|
||||||
|
sed \
|
||||||
|
-e "s|@DB_USERNAME@|$DB_USER|g" \
|
||||||
|
-e "s|@DB_PASSWORD@|$DB_PASSWORD|g" \
|
||||||
|
-e "s|@DB_SCHEMA@|$DB_NAME|g" \
|
||||||
|
/usr/share/yms/config.inc-sample \
|
||||||
|
> /etc/yms/config.inc
|
||||||
|
chmod 0640 /etc/yms/config.inc
|
||||||
|
chown root:www-data /etc/yms/config.inc
|
||||||
|
ln -s /etc/yms/config.inc /usr/share/yms/webgui/config.inc
|
||||||
|
fi
|
||||||
|
|
||||||
|
fi
|
||||||
|
|
||||||
|
exit 0
|
||||||
Vendored
+13
@@ -0,0 +1,13 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
set -e
|
||||||
|
|
||||||
|
. /usr/share/debconf/confmodule
|
||||||
|
|
||||||
|
case "$1" in
|
||||||
|
remove|purge)
|
||||||
|
db_input high yms/remove-info || true
|
||||||
|
db_go || true
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
|
||||||
|
exit 0
|
||||||
+26
@@ -0,0 +1,26 @@
|
|||||||
|
#!/usr/bin/make -f
|
||||||
|
|
||||||
|
# Standard Debian build
|
||||||
|
%:
|
||||||
|
dh $@
|
||||||
|
|
||||||
|
# No build via Makefile
|
||||||
|
override_dh_auto_build:
|
||||||
|
|
||||||
|
# Generate translation and install generated files
|
||||||
|
override_dh_install:
|
||||||
|
mkdir -p debian/yms/usr/share/locale/de/LC_MESSAGES
|
||||||
|
msgfmt locale/de.po -o debian/yms/usr/share/locale/de/LC_MESSAGES/ymsgui.mo
|
||||||
|
install -D -m 0644 icons/yms.svg debian/yms/usr/share/icons/hicolor/scalable/apps/yms.svg
|
||||||
|
install -D -m 0644 icons/yms48.png debian/yms/usr/share/icons/hicolor/48x48/apps/yms.png
|
||||||
|
install -D -m 0644 icons/yms64.png debian/yms/usr/share/icons/hicolor/64x64/apps/yms.png
|
||||||
|
install -D -m 0755 debian/yms-launcher debian/yms/usr/bin/yms
|
||||||
|
dh_install
|
||||||
|
sed -i 's#@PREFIX@#/usr#g' debian/yms/usr/share/applications/yms.desktop
|
||||||
|
sed -i 's#@PREFIX@#/usr#g' debian/yms/usr/share/yms/yms.lnk
|
||||||
|
|
||||||
|
# Installation is handled by debian/install
|
||||||
|
override_dh_auto_install:
|
||||||
|
|
||||||
|
override_dh_installdebconf:
|
||||||
|
dh_installdebconf
|
||||||
Vendored
+1
@@ -0,0 +1 @@
|
|||||||
|
3.0 (quilt)
|
||||||
Vendored
+34
@@ -0,0 +1,34 @@
|
|||||||
|
Template: yms/db-name
|
||||||
|
Type: string
|
||||||
|
Default: yms
|
||||||
|
Description: Database name:
|
||||||
|
Please enter the name of the MariaDB database used by YMS.
|
||||||
|
|
||||||
|
Template: yms/db-user
|
||||||
|
Type: string
|
||||||
|
Default: ymsweb
|
||||||
|
Description: Web GUI database user:
|
||||||
|
Please enter the MariaDB user used by the YMS web interface.
|
||||||
|
|
||||||
|
Template: yms/db-password
|
||||||
|
Type: password
|
||||||
|
Description: Web GUI database password:
|
||||||
|
Please enter the password for the YMS web interface database user.
|
||||||
|
|
||||||
|
Template: yms/webgui
|
||||||
|
Type: boolean
|
||||||
|
Default: false
|
||||||
|
Description: Enable the YMS web interface?
|
||||||
|
The YMS package includes a web interface that can be served
|
||||||
|
by a web server.
|
||||||
|
.
|
||||||
|
Do you want to enable the web interface?
|
||||||
|
|
||||||
|
Template: yms/remove-info
|
||||||
|
Type: note
|
||||||
|
Description: YMS document storage was not removed
|
||||||
|
The YMS package has been removed, but the document storage
|
||||||
|
remains on the system.
|
||||||
|
.
|
||||||
|
The directory /var/lib/yms and its contents have not been
|
||||||
|
deleted.
|
||||||
+2
@@ -0,0 +1,2 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
exec /usr/bin/python3 /usr/lib/yms/ymsgui.py "$@"
|
||||||
+18
-7
@@ -15,6 +15,13 @@ SOURCEDIR=$(CDPATH= cd -- "$(dirname -- "$0")" && pwd)
|
|||||||
if [ "$1" = "uninstall" ]; then
|
if [ "$1" = "uninstall" ]; then
|
||||||
echo "Uninstalling YMS..."
|
echo "Uninstalling YMS..."
|
||||||
|
|
||||||
|
if [ "$(id -u)" -ne 0 ]; then
|
||||||
|
echo "Error: this script must be run as root."
|
||||||
|
echo "Please use:"
|
||||||
|
echo " sudo $0"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
rm -f "${BINDIR}/yms"
|
rm -f "${BINDIR}/yms"
|
||||||
rm -rf "${LIBDIR}"
|
rm -rf "${LIBDIR}"
|
||||||
rm -rf "${SHAREDIR}"
|
rm -rf "${SHAREDIR}"
|
||||||
@@ -60,15 +67,17 @@ rm -rf "${LIBDIR}/yms/ui"
|
|||||||
# Static resources
|
# Static resources
|
||||||
install -d "${SHAREDIR}"
|
install -d "${SHAREDIR}"
|
||||||
install -d "${SHAREDIR}/ui"
|
install -d "${SHAREDIR}/ui"
|
||||||
install -m 0644 \
|
cp -a \
|
||||||
"${SOURCEDIR}/yms/ui/main.ui" \
|
"${SOURCEDIR}/yms/ui/." \
|
||||||
"${SHAREDIR}/ui/main.ui"
|
"${SHAREDIR}/ui/"
|
||||||
cp -a \
|
cp -a \
|
||||||
"${SOURCEDIR}/shapes/." \
|
"${SOURCEDIR}/shapes/." \
|
||||||
"${SHAREDIR}/shapes/"
|
"${SHAREDIR}/shapes/"
|
||||||
install -m 0644 \
|
sed "s#@PREFIX@#${PREFIX}#g" \
|
||||||
"${SOURCEDIR}/yms.lnk" \
|
"${SOURCEDIR}/yms.lnk" \
|
||||||
"${SHAREDIR}/yms.lnk"
|
> "${SHAREDIR}/yms.lnk"
|
||||||
|
chmod 0644 "${SHAREDIR}/yms.lnk"
|
||||||
|
chown -R root:root ${SHAREDIR}
|
||||||
|
|
||||||
# Documentation
|
# Documentation
|
||||||
echo "Installing documentation..."
|
echo "Installing documentation..."
|
||||||
@@ -117,9 +126,11 @@ chmod 0755 "${BINDIR}/yms"
|
|||||||
|
|
||||||
echo "Installing desktop entry..."
|
echo "Installing desktop entry..."
|
||||||
install -d "${DESKTOPDIR}"
|
install -d "${DESKTOPDIR}"
|
||||||
install -m 0644 \
|
sed "s#@PREFIX@#${PREFIX}#g" \
|
||||||
"${SOURCEDIR}/yms.desktop" \
|
"${SOURCEDIR}/yms.desktop" \
|
||||||
"${DESKTOPDIR}/yms.desktop"
|
> "${DESKTOPDIR}/yms.desktop"
|
||||||
|
chmod 0644 "${DESKTOPDIR}/yms.desktop"
|
||||||
|
|
||||||
|
|
||||||
# TODO webgui? or separately?
|
# TODO webgui? or separately?
|
||||||
|
|
||||||
|
|||||||
+437
-57
@@ -7,7 +7,7 @@ msgid ""
|
|||||||
msgstr ""
|
msgstr ""
|
||||||
"Project-Id-Version: YMS 0.1\n"
|
"Project-Id-Version: YMS 0.1\n"
|
||||||
"Report-Msgid-Bugs-To: \n"
|
"Report-Msgid-Bugs-To: \n"
|
||||||
"POT-Creation-Date: 2026-05-07 11:50+0200\n"
|
"POT-Creation-Date: 2026-09-07 16:36+0200\n"
|
||||||
"PO-Revision-Date: 2025-05-15 09:05+0200\n"
|
"PO-Revision-Date: 2025-05-15 09:05+0200\n"
|
||||||
"Last-Translator: Thomas Hooge <thomas@hoogi.de>\n"
|
"Last-Translator: Thomas Hooge <thomas@hoogi.de>\n"
|
||||||
"Language-Team: de <thomas@hoogi.de>\n"
|
"Language-Team: de <thomas@hoogi.de>\n"
|
||||||
@@ -16,80 +16,460 @@ msgstr ""
|
|||||||
"Content-Type: text/plain; charset=UTF-8\n"
|
"Content-Type: text/plain; charset=UTF-8\n"
|
||||||
"Content-Transfer-Encoding: 8bit\n"
|
"Content-Transfer-Encoding: 8bit\n"
|
||||||
|
|
||||||
#: ymsgui.py:150
|
#: ymsgui.py:217
|
||||||
msgid "Configuration file not found"
|
msgid ""
|
||||||
msgstr "Konfigurationsdatei nicht gefunden"
|
"Configuration file '{}' not found.\n"
|
||||||
|
"Default configuration has been created.\n"
|
||||||
#: ymsgui.py:172
|
"Please edit that file according to your needs.\n"
|
||||||
msgid "Database connection cannot be established"
|
"\n"
|
||||||
msgstr "Datenbankverbindung kann nicht hergestellt werden"
|
"Then restart this program."
|
||||||
|
|
||||||
#: yms/ui/main.ui:7
|
|
||||||
msgid "YMS"
|
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
"Konfigurationsdatei '{}' nicht gefunden.\n"
|
||||||
|
"Standardkonfiguration wurde angelegt.\n"
|
||||||
|
"Bitte bearbeiten Sie diese Datei entsprechend Ihren Anforderungen.\n"
|
||||||
|
"\n"
|
||||||
|
"Anschließend starten Sie dieses Programm neu."
|
||||||
|
|
||||||
#: yms/ui/main.ui:28
|
#: ymsgui.py:246
|
||||||
msgid "empty"
|
msgid ""
|
||||||
msgstr "leer"
|
"Database connection cannot be established.\n"
|
||||||
|
"\n"
|
||||||
#: yms/ui/main.ui:56
|
"Server: {}\n"
|
||||||
msgid "Name"
|
"Database: {}\n"
|
||||||
|
"Error: {} ({})"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
"Datenbankverbindung kann nicht hergestellt werden.\n"
|
||||||
|
"\n"
|
||||||
|
"Server: {}\n"
|
||||||
|
"Datenbank: {}\n"
|
||||||
|
"Fehler: {} ({})"
|
||||||
|
|
||||||
#: yms/ui/main.ui:77
|
#: yms/view/base.py:18
|
||||||
msgid "Model"
|
#, fuzzy
|
||||||
msgstr "Modell"
|
msgid "Base Data"
|
||||||
|
|
||||||
#: yms/ui/main.ui:119
|
|
||||||
msgid "Vessel"
|
|
||||||
msgstr "Boot"
|
|
||||||
|
|
||||||
#: yms/ui/main.ui:148
|
|
||||||
msgid "Lists"
|
|
||||||
msgstr "Listen"
|
|
||||||
|
|
||||||
#: yms/ui/main.ui:186
|
|
||||||
msgid "Ok"
|
|
||||||
msgstr ""
|
|
||||||
|
|
||||||
#: yms/ui/main.ui:207
|
|
||||||
msgid "User"
|
|
||||||
msgstr "Benutzer"
|
|
||||||
|
|
||||||
#: yms/ui/main.ui:220
|
|
||||||
msgid "Base data"
|
|
||||||
msgstr "Basisdaten"
|
msgstr "Basisdaten"
|
||||||
|
|
||||||
#: yms/ui/main.ui:230
|
#: yms/view/base.py:121
|
||||||
msgid ""
|
msgid ""
|
||||||
"Equipment\n"
|
"Delete user!\n"
|
||||||
"Here be dragons"
|
"Are you sure?"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
"Lösche Benutzer!\n"
|
||||||
|
"Sind Sie sicher?"
|
||||||
|
|
||||||
#: yms/ui/main.ui:241
|
#: yms/view/documents.py:11 yms/ui/main_v0.ui:2731
|
||||||
|
msgid "Documents"
|
||||||
|
msgstr "Dokumente"
|
||||||
|
|
||||||
|
#: yms/view/equipment.py:11 yms/ui/main_v0.ui:1516 yms/ui/main_v0.ui:2130
|
||||||
|
#: yms/ui/maintenance.ui:65
|
||||||
msgid "Equipment"
|
msgid "Equipment"
|
||||||
msgstr "Ausrüstung"
|
msgstr "Ausrüstung"
|
||||||
|
|
||||||
#: yms/ui/main.ui:252
|
#: yms/view/inventory.py:11 yms/ui/main_v0.ui:1846
|
||||||
msgid "label"
|
|
||||||
msgstr ""
|
|
||||||
|
|
||||||
#: yms/ui/main.ui:262
|
|
||||||
msgid "Inventory"
|
msgid "Inventory"
|
||||||
msgstr "Inventar"
|
msgstr "Inventar"
|
||||||
|
|
||||||
#: yms/ui/main.ui:292
|
#: yms/view/maintenance.py:11 yms/ui/main_v0.ui:2271
|
||||||
msgid "Provisions"
|
|
||||||
msgstr "Verpflegung"
|
|
||||||
|
|
||||||
#: yms/ui/main.ui:322
|
|
||||||
msgid "Maintenance"
|
msgid "Maintenance"
|
||||||
msgstr "Wartung"
|
msgstr "Wartung"
|
||||||
|
|
||||||
#: yms/ui/main.ui:352
|
#: yms/view/projects.py:11 yms/ui/main_v0.ui:2501
|
||||||
msgid "Projects"
|
msgid "Projects"
|
||||||
msgstr "Projekte"
|
msgstr "Projekte"
|
||||||
|
|
||||||
#: yms/ui/main.ui:382
|
#: yms/view/provisions.py:11 yms/ui/main_v0.ui:2062
|
||||||
msgid "Documents"
|
msgid "Provisions"
|
||||||
msgstr "Dokumente"
|
msgstr "Verpflegung"
|
||||||
|
|
||||||
|
#: yms/view/status.py:11 yms/ui/main_v0.ui:2350 yms/ui/main_v0.ui:2747
|
||||||
|
#: yms/ui/main_v0.ui:2808 yms/ui/projects.ui:76 yms/ui/status.ui:13
|
||||||
|
msgid "Status"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: yms/ui/base.ui:21 yms/ui/main_v0.ui:31
|
||||||
|
msgid "empty"
|
||||||
|
msgstr "leer"
|
||||||
|
|
||||||
|
#: yms/ui/base.ui:56 yms/ui/base.ui:850 yms/ui/equipment.ui:455
|
||||||
|
#: yms/ui/main_v0.ui:64 yms/ui/main_v0.ui:1225 yms/ui/main_v0.ui:2339
|
||||||
|
#: yms/ui/projects.ui:65
|
||||||
|
msgid "Name"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: yms/ui/base.ui:81 yms/ui/equipment.ui:508 yms/ui/main_v0.ui:89
|
||||||
|
#: yms/ui/main_v0.ui:1278
|
||||||
|
msgid "Model"
|
||||||
|
msgstr "Modell"
|
||||||
|
|
||||||
|
#: yms/ui/base.ui:102 yms/ui/main_v0.ui:141
|
||||||
|
msgid "LoA"
|
||||||
|
msgstr "LüA"
|
||||||
|
|
||||||
|
#: yms/ui/base.ui:113 yms/ui/main_v0.ui:152
|
||||||
|
msgid "LWL"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: yms/ui/base.ui:124
|
||||||
|
msgid "Beam"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: yms/ui/base.ui:135
|
||||||
|
msgid "Draught"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: yms/ui/base.ui:146
|
||||||
|
msgid "Draught, min"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: yms/ui/base.ui:212
|
||||||
|
#, fuzzy
|
||||||
|
msgid "Displacement"
|
||||||
|
msgstr "Anzeigename"
|
||||||
|
|
||||||
|
#: yms/ui/base.ui:223
|
||||||
|
msgid "Ballast"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: yms/ui/base.ui:254 yms/ui/base.ui:1035 yms/ui/equipment.ui:645
|
||||||
|
#: yms/ui/main_v0.ui:110 yms/ui/main_v0.ui:1415 yms/ui/main_v0.ui:2361
|
||||||
|
#: yms/ui/projects.ui:87
|
||||||
|
msgid "Remarks"
|
||||||
|
msgstr "Bemerkungen"
|
||||||
|
|
||||||
|
#: yms/ui/base.ui:293
|
||||||
|
#, fuzzy
|
||||||
|
msgid "Default Storage"
|
||||||
|
msgstr "Stauraum"
|
||||||
|
|
||||||
|
#: yms/ui/base.ui:304
|
||||||
|
msgid "Shipyard"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: yms/ui/base.ui:336 yms/ui/main_v0.ui:257
|
||||||
|
msgid "Add"
|
||||||
|
msgstr "Hinzufügen"
|
||||||
|
|
||||||
|
#: yms/ui/base.ui:350 yms/ui/base.ui:677 yms/ui/equipment.ui:696
|
||||||
|
#: yms/ui/main_v0.ui:270 yms/ui/main_v0.ui:596 yms/ui/main_v0.ui:1466
|
||||||
|
msgid "Save"
|
||||||
|
msgstr "Speichern"
|
||||||
|
|
||||||
|
#: yms/ui/base.ui:375 yms/ui/main_v0.ui:294
|
||||||
|
msgid "Vessel"
|
||||||
|
msgstr "Boot"
|
||||||
|
|
||||||
|
#: yms/ui/base.ui:419 yms/ui/documents.ui:168 yms/ui/equipment.ui:248
|
||||||
|
#: yms/ui/inventory.ui:169 yms/ui/main_v0.ui:338 yms/ui/main_v0.ui:1018
|
||||||
|
#: yms/ui/main_v0.ui:1688 yms/ui/main_v0.ui:2003 yms/ui/main_v0.ui:2212
|
||||||
|
#: yms/ui/main_v0.ui:2442 yms/ui/main_v0.ui:2672 yms/ui/maintenance.ui:147
|
||||||
|
#: yms/ui/projects.ui:168 yms/ui/provisions.ui:154
|
||||||
|
msgid "New"
|
||||||
|
msgstr "Neu"
|
||||||
|
|
||||||
|
#: yms/ui/base.ui:433 yms/ui/documents.ui:194 yms/ui/equipment.ui:387
|
||||||
|
#: yms/ui/main_v0.ui:352 yms/ui/main_v0.ui:1157 yms/ui/main_v0.ui:2029
|
||||||
|
#: yms/ui/main_v0.ui:2238 yms/ui/main_v0.ui:2468 yms/ui/main_v0.ui:2698
|
||||||
|
#: yms/ui/maintenance.ui:173 yms/ui/projects.ui:194 yms/ui/provisions.ui:180
|
||||||
|
msgid "Delete"
|
||||||
|
msgstr "Löschen"
|
||||||
|
|
||||||
|
#: yms/ui/base.ui:472 yms/ui/main_v0.ui:391
|
||||||
|
msgid "Login"
|
||||||
|
msgstr "Anmeldung"
|
||||||
|
|
||||||
|
#: yms/ui/base.ui:483 yms/ui/main_v0.ui:402
|
||||||
|
msgid "Displayname"
|
||||||
|
msgstr "Anzeigename"
|
||||||
|
|
||||||
|
#: yms/ui/base.ui:514 yms/ui/main_v0.ui:433
|
||||||
|
msgid "Role"
|
||||||
|
msgstr "Rolle"
|
||||||
|
|
||||||
|
#: yms/ui/base.ui:525 yms/ui/main_v0.ui:444
|
||||||
|
msgid "Language"
|
||||||
|
msgstr "Sprache"
|
||||||
|
|
||||||
|
#: yms/ui/base.ui:556 yms/ui/main_v0.ui:475
|
||||||
|
msgid "Password"
|
||||||
|
msgstr "Kennwort"
|
||||||
|
|
||||||
|
#: yms/ui/base.ui:575 yms/ui/main_v0.ui:494
|
||||||
|
msgid "Create"
|
||||||
|
msgstr "Anlegen"
|
||||||
|
|
||||||
|
#: yms/ui/base.ui:588 yms/ui/main_v0.ui:507
|
||||||
|
msgid "Locked"
|
||||||
|
msgstr "Gesperrt"
|
||||||
|
|
||||||
|
#: yms/ui/base.ui:601 yms/ui/main_v0.ui:520
|
||||||
|
msgid "Deleted"
|
||||||
|
msgstr "Gelöscht"
|
||||||
|
|
||||||
|
#: yms/ui/base.ui:711 yms/ui/main_v0.ui:630
|
||||||
|
msgid "User"
|
||||||
|
msgstr "Benutzer"
|
||||||
|
|
||||||
|
#: yms/ui/base.ui:751 yms/ui/equipment.ui:276 yms/ui/inventory.ui:195
|
||||||
|
#: yms/ui/main_v0.ui:670 yms/ui/main_v0.ui:1045 yms/ui/main_v0.ui:1714
|
||||||
|
msgid "Details"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: yms/ui/base.ui:764 yms/ui/documents.ui:181 yms/ui/equipment.ui:262
|
||||||
|
#: yms/ui/equipment.ui:402 yms/ui/inventory.ui:182 yms/ui/main_v0.ui:683
|
||||||
|
#: yms/ui/main_v0.ui:1031 yms/ui/main_v0.ui:1171 yms/ui/main_v0.ui:1701
|
||||||
|
#: yms/ui/main_v0.ui:2016 yms/ui/main_v0.ui:2225 yms/ui/main_v0.ui:2455
|
||||||
|
#: yms/ui/main_v0.ui:2685 yms/ui/maintenance.ui:160 yms/ui/projects.ui:181
|
||||||
|
#: yms/ui/provisions.ui:167
|
||||||
|
msgid "Edit"
|
||||||
|
msgstr "Bearbeiten"
|
||||||
|
|
||||||
|
#: yms/ui/base.ui:791 yms/ui/main_v0.ui:710
|
||||||
|
msgid "Lists"
|
||||||
|
msgstr "Listen"
|
||||||
|
|
||||||
|
#: yms/ui/base.ui:819 yms/ui/base.ui:1292 yms/ui/documents.ui:215
|
||||||
|
#: yms/ui/equipment.ui:297 yms/ui/inventory.ui:216 yms/ui/main_v0.ui:739
|
||||||
|
#: yms/ui/main_v0.ui:1067 yms/ui/main_v0.ui:1735 yms/ui/main_v0.ui:2050
|
||||||
|
#: yms/ui/main_v0.ui:2259 yms/ui/main_v0.ui:2489 yms/ui/main_v0.ui:2719
|
||||||
|
#: yms/ui/maintenance.ui:194 yms/ui/projects.ui:215 yms/ui/provisions.ui:201
|
||||||
|
msgid "page0"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: yms/ui/base.ui:839 yms/ui/documents.ui:65 yms/ui/main_v0.ui:2569
|
||||||
|
msgid "Type"
|
||||||
|
msgstr "Typ"
|
||||||
|
|
||||||
|
#: yms/ui/base.ui:872
|
||||||
|
msgid "Type2"
|
||||||
|
msgstr "Typ2"
|
||||||
|
|
||||||
|
#: yms/ui/base.ui:903 yms/ui/equipment.ui:466 yms/ui/main_v0.ui:1236
|
||||||
|
msgid "Short name"
|
||||||
|
msgstr "Kurzname"
|
||||||
|
|
||||||
|
#: yms/ui/base.ui:925
|
||||||
|
msgid "Street"
|
||||||
|
msgstr "Straße"
|
||||||
|
|
||||||
|
#: yms/ui/base.ui:936
|
||||||
|
msgid "ZIP"
|
||||||
|
msgstr "PLZ"
|
||||||
|
|
||||||
|
#: yms/ui/base.ui:947
|
||||||
|
msgid "City"
|
||||||
|
msgstr "Stadt"
|
||||||
|
|
||||||
|
#: yms/ui/base.ui:958
|
||||||
|
msgid "Country"
|
||||||
|
msgstr "Land"
|
||||||
|
|
||||||
|
#: yms/ui/base.ui:969
|
||||||
|
msgid "Contact"
|
||||||
|
msgstr "Kontakt"
|
||||||
|
|
||||||
|
#: yms/ui/base.ui:980
|
||||||
|
msgid "Phone"
|
||||||
|
msgstr "Telefon"
|
||||||
|
|
||||||
|
#: yms/ui/base.ui:991
|
||||||
|
msgid "Email"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: yms/ui/base.ui:1002
|
||||||
|
msgid "Web"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: yms/ui/base.ui:1013
|
||||||
|
msgid "Customer no."
|
||||||
|
msgstr "Kundennr."
|
||||||
|
|
||||||
|
#: yms/ui/base.ui:1024
|
||||||
|
msgid "Contract no."
|
||||||
|
msgstr "Kontraktnr."
|
||||||
|
|
||||||
|
#: yms/ui/base.ui:1221 yms/ui/base.ui:1234 yms/ui/base.ui:1247
|
||||||
|
#: yms/ui/inventory.ui:246 yms/ui/inventory.ui:259 yms/ui/inventory.ui:272
|
||||||
|
#: yms/ui/main_v0.ui:1765 yms/ui/main_v0.ui:1778 yms/ui/main_v0.ui:1791
|
||||||
|
msgid "button"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: yms/ui/base.ui:1269 yms/ui/equipment.ui:437 yms/ui/inventory.ui:293
|
||||||
|
#: yms/ui/main_v0.ui:1503 yms/ui/main_v0.ui:1812
|
||||||
|
msgid "page1"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: yms/ui/base.ui:1282 yms/ui/main_v0.ui:751
|
||||||
|
msgid "Companies"
|
||||||
|
msgstr "Firmen"
|
||||||
|
|
||||||
|
#: yms/ui/documents.ui:30 yms/ui/equipment.ui:30 yms/ui/inventory.ui:30
|
||||||
|
#: yms/ui/main_v0.ui:797 yms/ui/main_v0.ui:1549 yms/ui/main_v0.ui:1928
|
||||||
|
#: yms/ui/main_v0.ui:2095 yms/ui/main_v0.ui:2304 yms/ui/main_v0.ui:2534
|
||||||
|
#: yms/ui/maintenance.ui:30 yms/ui/projects.ui:30 yms/ui/provisions.ui:79
|
||||||
|
msgid "Clear"
|
||||||
|
msgstr "Löschen"
|
||||||
|
|
||||||
|
#: yms/ui/documents.ui:43 yms/ui/equipment.ui:43 yms/ui/inventory.ui:43
|
||||||
|
#: yms/ui/main_v0.ui:810 yms/ui/main_v0.ui:1562 yms/ui/main_v0.ui:1941
|
||||||
|
#: yms/ui/main_v0.ui:2108 yms/ui/main_v0.ui:2317 yms/ui/main_v0.ui:2547
|
||||||
|
#: yms/ui/maintenance.ui:43 yms/ui/projects.ui:43 yms/ui/provisions.ui:92
|
||||||
|
msgid "Apply"
|
||||||
|
msgstr "Anwenden"
|
||||||
|
|
||||||
|
#: yms/ui/documents.ui:76 yms/ui/main_v0.ui:2580
|
||||||
|
msgid "Reference"
|
||||||
|
msgstr "Referenz"
|
||||||
|
|
||||||
|
#: yms/ui/documents.ui:87 yms/ui/equipment.ui:98 yms/ui/inventory.ui:87
|
||||||
|
#: yms/ui/main_v0.ui:865 yms/ui/main_v0.ui:1606 yms/ui/main_v0.ui:1900
|
||||||
|
#: yms/ui/main_v0.ui:2141 yms/ui/main_v0.ui:2591 yms/ui/maintenance.ui:76
|
||||||
|
#: yms/ui/provisions.ui:51
|
||||||
|
msgid "Text"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: yms/ui/documents.ui:130 yms/ui/main_v0.ui:2634
|
||||||
|
msgid "Filter Documents"
|
||||||
|
msgstr "Filter Dokumente"
|
||||||
|
|
||||||
|
#: yms/ui/equipment.ui:65 yms/ui/equipment.ui:634 yms/ui/main_v0.ui:832
|
||||||
|
#: yms/ui/main_v0.ui:1404
|
||||||
|
msgid "Category"
|
||||||
|
msgstr "Kategorie"
|
||||||
|
|
||||||
|
#: yms/ui/equipment.ui:76 yms/ui/equipment.ui:497 yms/ui/main_v0.ui:843
|
||||||
|
#: yms/ui/main_v0.ui:1267
|
||||||
|
msgid "Manufacturer"
|
||||||
|
msgstr "Hersteller"
|
||||||
|
|
||||||
|
#: yms/ui/equipment.ui:87 yms/ui/equipment.ui:623 yms/ui/main_v0.ui:854
|
||||||
|
#: yms/ui/main_v0.ui:1393
|
||||||
|
msgid "Supplier"
|
||||||
|
msgstr "Lieferant"
|
||||||
|
|
||||||
|
#: yms/ui/equipment.ui:109 yms/ui/main_v0.ui:876
|
||||||
|
msgid "Flags"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: yms/ui/equipment.ui:158 yms/ui/main_v0.ui:925
|
||||||
|
msgid "ordered"
|
||||||
|
msgstr "bestellt"
|
||||||
|
|
||||||
|
#: yms/ui/equipment.ui:171 yms/ui/main_v0.ui:938
|
||||||
|
msgid "removed"
|
||||||
|
msgstr "entfernt"
|
||||||
|
|
||||||
|
#: yms/ui/equipment.ui:184 yms/ui/main_v0.ui:951
|
||||||
|
msgid "deleted"
|
||||||
|
msgstr "gelöscht"
|
||||||
|
|
||||||
|
#: yms/ui/equipment.ui:213 yms/ui/main_v0.ui:980
|
||||||
|
msgid "Filter Equipment"
|
||||||
|
msgstr "Filter Ausrüstung"
|
||||||
|
|
||||||
|
#: yms/ui/equipment.ui:309 yms/ui/main_v0.ui:1079
|
||||||
|
msgid "Equipment details"
|
||||||
|
msgstr "Ausrüstungsdetails"
|
||||||
|
|
||||||
|
#: yms/ui/equipment.ui:326 yms/ui/equipment.ui:337 yms/ui/equipment.ui:348
|
||||||
|
#: yms/ui/main_v0.ui:1096 yms/ui/main_v0.ui:1107 yms/ui/main_v0.ui:1118
|
||||||
|
msgid "label"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: yms/ui/equipment.ui:415 yms/ui/main_v0.ui:1185
|
||||||
|
msgid "Close"
|
||||||
|
msgstr "Schließen"
|
||||||
|
|
||||||
|
#: yms/ui/equipment.ui:519 yms/ui/main_v0.ui:1289
|
||||||
|
msgid "Serial no."
|
||||||
|
msgstr "Seriennummer"
|
||||||
|
|
||||||
|
#: yms/ui/equipment.ui:530 yms/ui/main_v0.ui:1300
|
||||||
|
msgid "Weight, kg"
|
||||||
|
msgstr "Gewicht, kg"
|
||||||
|
|
||||||
|
#: yms/ui/equipment.ui:541 yms/ui/main_v0.ui:1311
|
||||||
|
msgid "Price, €"
|
||||||
|
msgstr "Preis, €"
|
||||||
|
|
||||||
|
#: yms/ui/equipment.ui:552 yms/ui/main_v0.ui:1322
|
||||||
|
msgid "Date puchase"
|
||||||
|
msgstr "Kaufdatum"
|
||||||
|
|
||||||
|
#: yms/ui/equipment.ui:710 yms/ui/main_v0.ui:1480
|
||||||
|
msgid "Cancel"
|
||||||
|
msgstr "Abbruch"
|
||||||
|
|
||||||
|
#: yms/ui/equipment.ui:733 yms/ui/inventory.ui:314 yms/ui/main_v0.ui:1207
|
||||||
|
#: yms/ui/main_v0.ui:1833
|
||||||
|
msgid "page2"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: yms/ui/inventory.ui:65 yms/ui/main_v0.ui:1584
|
||||||
|
msgid "Storage"
|
||||||
|
msgstr "Stauraum"
|
||||||
|
|
||||||
|
#: yms/ui/inventory.ui:76 yms/ui/main_v0.ui:1595
|
||||||
|
msgid "Condition"
|
||||||
|
msgstr "Zustand"
|
||||||
|
|
||||||
|
#: yms/ui/inventory.ui:130 yms/ui/main_v0.ui:1649
|
||||||
|
msgid "Filter Inventory"
|
||||||
|
msgstr "Filter Inventar"
|
||||||
|
|
||||||
|
#: yms/ui/inventory.ui:228 yms/ui/main_v0.ui:1747
|
||||||
|
msgid "Inventory details"
|
||||||
|
msgstr "Inventardetails"
|
||||||
|
|
||||||
|
#: yms/ui/main.ui:7 yms/ui/main_v0.ui:7
|
||||||
|
msgid "YMS"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: yms/ui/main_v0.ui:163
|
||||||
|
msgid "Width"
|
||||||
|
msgstr "Breite"
|
||||||
|
|
||||||
|
#: yms/ui/main_v0.ui:174
|
||||||
|
msgid "Depth"
|
||||||
|
msgstr "Tiefgang"
|
||||||
|
|
||||||
|
#: yms/ui/main_v0.ui:185
|
||||||
|
msgid "Depth min"
|
||||||
|
msgstr "Tiefgang min"
|
||||||
|
|
||||||
|
#: yms/ui/main_v0.ui:764
|
||||||
|
msgid "Base data"
|
||||||
|
msgstr "Basisdaten"
|
||||||
|
|
||||||
|
#: yms/ui/main_v0.ui:1877 yms/ui/provisions.ui:28
|
||||||
|
msgid "Kategorie"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: yms/ui/main_v0.ui:1965 yms/ui/provisions.ui:116
|
||||||
|
msgid "Filter Providions (here selection description)"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: yms/ui/main_v0.ui:2174 yms/ui/maintenance.ui:109
|
||||||
|
msgid "Filter Maintenance"
|
||||||
|
msgstr "Filter Wartung"
|
||||||
|
|
||||||
|
#: yms/ui/main_v0.ui:2404 yms/ui/projects.ui:130
|
||||||
|
msgid "Filter Projects"
|
||||||
|
msgstr "Filter Projekte"
|
||||||
|
|
||||||
|
#: yms/ui/main_v0.ui:2762 yms/ui/status.ui:28
|
||||||
|
msgid ""
|
||||||
|
"This is an early release of YMS native GUI.\n"
|
||||||
|
"Please use the web frontend wich is already \n"
|
||||||
|
"in an usable state.\n"
|
||||||
|
"\n"
|
||||||
|
"For further assistance please consult the related\n"
|
||||||
|
"thread in \"Segeln Forum\"\n"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: yms/ui/main_v0.ui:2791 yms/ui/status.ui:57
|
||||||
|
msgid "YMS-GUI version 0.2.1"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#~ msgid "Configuration file not found"
|
||||||
|
#~ msgstr "Konfigurationsdatei nicht gefunden"
|
||||||
|
|||||||
+45
-6
@@ -14,6 +14,7 @@ There can be a difference because not all items have a weight entered
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
require 'globals.inc';
|
require 'globals.inc';
|
||||||
|
require 'lib/db.inc';
|
||||||
require 'lib/gpc.inc';
|
require 'lib/gpc.inc';
|
||||||
|
|
||||||
$pagetitle = _('Boxes');
|
$pagetitle = _('Boxes');
|
||||||
@@ -59,7 +60,12 @@ switch ($submit = form_get_action()) {
|
|||||||
$p[':label'] = gpc_get_string($_POST, 'label');
|
$p[':label'] = gpc_get_string($_POST, 'label');
|
||||||
$p[':content'] = gpc_get_string($_POST, 'content');
|
$p[':content'] = gpc_get_string($_POST, 'content');
|
||||||
$p[':color'] = gpc_get_color($_POST, 'color');
|
$p[':color'] = gpc_get_color($_POST, 'color');
|
||||||
|
$p[':wx'] = gpc_get_int($_POST, 'wx');
|
||||||
|
$p[':wy'] = gpc_get_int($_POST, 'wy');
|
||||||
|
$p[':wz'] = gpc_get_int($_POST, 'wz');
|
||||||
$p[':weight'] = min(gpc_get_float($_POST, 'weight'), 99.99);
|
$p[':weight'] = min(gpc_get_float($_POST, 'weight'), 99.99);
|
||||||
|
$p[':weight_net'] = min(gpc_get_float($_POST, 'weight_net'), 99.99);
|
||||||
|
$p[':price'] = gpc_get_currency($_POST, 'price');
|
||||||
$p[':sid'] = gpc_get_uint($_POST, 'sid');
|
$p[':sid'] = gpc_get_uint($_POST, 'sid');
|
||||||
$p[':remarks'] = gpc_get_string($_POST, 'remarks', 150);
|
$p[':remarks'] = gpc_get_string($_POST, 'remarks', 150);
|
||||||
db_exec_update('box', $p, 'boxid');
|
db_exec_update('box', $p, 'boxid');
|
||||||
@@ -116,9 +122,6 @@ foreach ($res as $row) {
|
|||||||
echo "</td>\n";
|
echo "</td>\n";
|
||||||
echo "</tr>\n";
|
echo "</tr>\n";
|
||||||
}
|
}
|
||||||
// Table summary
|
|
||||||
$numrows = count($res);
|
|
||||||
table_rec_summary($i, $numrows, $numrows, 5);
|
|
||||||
echo "</table>\n";
|
echo "</table>\n";
|
||||||
|
|
||||||
form_add_button('box.php');
|
form_add_button('box.php');
|
||||||
@@ -162,7 +165,8 @@ foreach ($opt_storage as $k => $v) {
|
|||||||
elseif ($action == ACT_VIEW):
|
elseif ($action == ACT_VIEW):
|
||||||
// ========== VARIANT: view single record =====================================
|
// ========== VARIANT: view single record =====================================
|
||||||
|
|
||||||
$sql = "SELECT boxtype, label, content, box.color, weight, box.remarks, box.sid, sname "
|
$sql = "SELECT boxtype, label, content, box.color, weight, weight_net, price, "
|
||||||
|
. "box.wx, box.wy, box.wz, box.sid, box.remarks, sname "
|
||||||
. "FROM box LEFT JOIN storage USING (sid) "
|
. "FROM box LEFT JOIN storage USING (sid) "
|
||||||
. "WHERE boxid=?";
|
. "WHERE boxid=?";
|
||||||
$sth = $pdo->prepare($sql);
|
$sth = $pdo->prepare($sql);
|
||||||
@@ -180,7 +184,11 @@ echo '<table class="table">', "\n";
|
|||||||
echo '<tr><th style="width:20%">', _('Box type'),"</th><td>", ($opt_boxtype[$box->boxtype] ?? ''), "</td></tr>\n";
|
echo '<tr><th style="width:20%">', _('Box type'),"</th><td>", ($opt_boxtype[$box->boxtype] ?? ''), "</td></tr>\n";
|
||||||
echo '<tr><th>', _('Content'),"</th><td>", $box->content, "</td></tr>\n";
|
echo '<tr><th>', _('Content'),"</th><td>", $box->content, "</td></tr>\n";
|
||||||
echo '<tr><th>', _('Color'), '</th><td>', format_color($box->color), "</td></tr>\n";
|
echo '<tr><th>', _('Color'), '</th><td>', format_color($box->color), "</td></tr>\n";
|
||||||
|
echo '<tr><th>', _('Dimensions'), '</th><td>', format_measurement(3, 'mm', $box->wx, $box->wy, $box->wz), "</td></tr>\n";
|
||||||
|
# TODO also show sum of content weights for comparison
|
||||||
echo '<tr><th>', _('Weight'), '</th><td>', format_float($box->weight, 2, 'kg'), "</td></tr>\n";
|
echo '<tr><th>', _('Weight'), '</th><td>', format_float($box->weight, 2, 'kg'), "</td></tr>\n";
|
||||||
|
echo '<tr><th>', _('Empty Weight'), '</th><td>', format_float($box->weight_net, 2, 'kg'), "</td></tr>\n";
|
||||||
|
echo '<tr><th>', _('Price'),"</th><td>", format_currency($box->price), "</td></tr>\n";
|
||||||
echo '<tr><th>', _('Storage'),"</th><td>", $box->sname, ' ';
|
echo '<tr><th>', _('Storage'),"</th><td>", $box->sname, ' ';
|
||||||
echo '<a title="', _('View'), '" href="storage.php?f=view&id=', $box->sid, '"><i class="bi-eye"></i></a>';
|
echo '<a title="', _('View'), '" href="storage.php?f=view&id=', $box->sid, '"><i class="bi-eye"></i></a>';
|
||||||
echo "</td></tr>\n";
|
echo "</td></tr>\n";
|
||||||
@@ -275,10 +283,13 @@ if ($res) {
|
|||||||
echo '<p>', _('Box is empty'), "</p>\n";
|
echo '<p>', _('Box is empty'), "</p>\n";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
# TODO provisions in box
|
||||||
|
|
||||||
elseif ($action == ACT_EDIT):
|
elseif ($action == ACT_EDIT):
|
||||||
// ========== VARIANT: edit single record =====================================
|
// ========== VARIANT: edit single record =====================================
|
||||||
|
|
||||||
$sql = "SELECT boxtype, label, content, color, weight, sid, remarks "
|
$sql = "SELECT boxtype, label, content, color, weight, weight_net, price, "
|
||||||
|
. "sid, wx, wy, wz, remarks "
|
||||||
. "FROM box "
|
. "FROM box "
|
||||||
. "WHERE boxid=?";
|
. "WHERE boxid=?";
|
||||||
$sth = $pdo->prepare($sql);
|
$sth = $pdo->prepare($sql);
|
||||||
@@ -304,14 +315,42 @@ echo '<h2>', _('Edit Box'), "</h2>\n";
|
|||||||
<label for="color"><?=_('Color')?></label>
|
<label for="color"><?=_('Color')?></label>
|
||||||
<input type="color" class="form-control" id="color" name="color" value="#<?=$box->color ?>">
|
<input type="color" class="form-control" id="color" name="color" value="#<?=$box->color ?>">
|
||||||
</div>
|
</div>
|
||||||
|
<div class="mb-3">
|
||||||
|
<label class="form-label"><?=_('Dimensions (L × W × H)')?></label>
|
||||||
|
<div class="input-group">
|
||||||
|
<input type="number" class="form-control" name="wx"
|
||||||
|
value="<?=$box->wx;?>" min="0" step="1"
|
||||||
|
aria-label="<?=_('Length')?>">
|
||||||
|
<span class="input-group-text">×</span>
|
||||||
|
<input type="number" class="form-control" name="wy"
|
||||||
|
value="<?=$box->wy;?>" min="0" step="1"
|
||||||
|
aria-label="<?=_('Width')?>">
|
||||||
|
<span class="input-group-text">×</span>
|
||||||
|
<input type="number" class="form-control" name="wz"
|
||||||
|
value="<?=$box->wz;?>" min="0" step="1"
|
||||||
|
aria-label="<?=_('Height')?>">
|
||||||
|
<span class="input-group-text">mm</span>
|
||||||
|
</div>
|
||||||
|
<div class="form-text">
|
||||||
|
<?=_('Length × Width × Height')?>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
<div class="mb-3">
|
<div class="mb-3">
|
||||||
<label for="weight" class="form-label"><?=_('Weight, kg')?></label>
|
<label for="weight" class="form-label"><?=_('Weight, kg')?></label>
|
||||||
<input type="text" class="form-control" id="weight" name="weight" value="<?=format_float($box->weight); ?>">
|
<input type="text" class="form-control" id="weight" name="weight" value="<?=format_float($box->weight); ?>">
|
||||||
</div>
|
</div>
|
||||||
|
<div class="mb-3">
|
||||||
|
<label for="weight_net" class="form-label"><?=_('Weight net, kg')?></label>
|
||||||
|
<input type="text" class="form-control" id="weight_net" name="weight_net" value="<?=format_float($box->weight_net); ?>">
|
||||||
|
</div>
|
||||||
|
<div class="mb-3">
|
||||||
|
<label for="price" class="form-label"><?=sprintf(_('Price, %s'), $g_lconv['currency_symbol']); ?></label>
|
||||||
|
<input type="text" class="form-control" id="price" name="price" value="<?=format_float($box->price) ?>">
|
||||||
|
</div>
|
||||||
<?php form_create_select('sid', _('Storage'), $opt_storage, $box->sid); ?>
|
<?php form_create_select('sid', _('Storage'), $opt_storage, $box->sid); ?>
|
||||||
<div class="mb-3">
|
<div class="mb-3">
|
||||||
<label for="remarks" class="form-label"><?=_('Remarks')?></label>
|
<label for="remarks" class="form-label"><?=_('Remarks')?></label>
|
||||||
<textarea class="form-control" id="remarks" name="remarks" rows="3"><?=h($box->remarks, br:true)?></textarea>
|
<textarea class="form-control" id="remarks" name="remarks" rows="3"><?=h($box->remarks)?></textarea>
|
||||||
</div>
|
</div>
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
|
|||||||
+14
-9
@@ -7,6 +7,7 @@
|
|||||||
******************************************************************************/
|
******************************************************************************/
|
||||||
|
|
||||||
require 'globals.inc';
|
require 'globals.inc';
|
||||||
|
require 'lib/db.inc';
|
||||||
require 'lib/gpc.inc';
|
require 'lib/gpc.inc';
|
||||||
|
|
||||||
$pagetitle = _('Cables');
|
$pagetitle = _('Cables');
|
||||||
@@ -14,6 +15,7 @@ $pagetitle = _('Cables');
|
|||||||
$id = gpc_get_int($_REQUEST, 'id', 0);
|
$id = gpc_get_int($_REQUEST, 'id', 0);
|
||||||
|
|
||||||
$opt_cabletype = db_get_options(11);
|
$opt_cabletype = db_get_options(11);
|
||||||
|
$opt_techname = db_get_options(12);
|
||||||
$opt_cablecond = db_load_enum('cable', 'cablecond', true, true);
|
$opt_cablecond = db_load_enum('cable', 'cablecond', true, true);
|
||||||
|
|
||||||
// ========== ACTIONS START ===================================================
|
// ========== ACTIONS START ===================================================
|
||||||
@@ -52,6 +54,7 @@ switch ($submit = form_get_action()) {
|
|||||||
$p[':cableid'] = $id;
|
$p[':cableid'] = $id;
|
||||||
$p[':cablename'] = gpc_get_string($_POST, 'cablename');
|
$p[':cablename'] = gpc_get_string($_POST, 'cablename');
|
||||||
$p[':cabletype'] = gpc_get_int($_POST, 'cabletype');
|
$p[':cabletype'] = gpc_get_int($_POST, 'cabletype');
|
||||||
|
$p[':techname'] = gpc_get_int($_POST, 'techname');
|
||||||
$p[':length'] = gpc_get_float($_POST, 'length');
|
$p[':length'] = gpc_get_float($_POST, 'length');
|
||||||
$p[':conductors'] = gpc_get_int($_POST, 'conductors');
|
$p[':conductors'] = gpc_get_int($_POST, 'conductors');
|
||||||
$p[':xsection'] = gpc_get_float($_POST, 'xsection');
|
$p[':xsection'] = gpc_get_float($_POST, 'xsection');
|
||||||
@@ -146,14 +149,14 @@ foreach ($res as $row) {
|
|||||||
echo "<td>", $row['length'], "m</td>\n";
|
echo "<td>", $row['length'], "m</td>\n";
|
||||||
echo "<td>", $row['xsection'], "mm²</td>\n";
|
echo "<td>", $row['xsection'], "mm²</td>\n";
|
||||||
echo "<td>", format_color($row['color']), "</td>\n";
|
echo "<td>", format_color($row['color']), "</td>\n";
|
||||||
echo "<td>", $row['condition'], "</td>\n";
|
echo "<td>", get_enum($row['cablecond']), "</td>\n";
|
||||||
echo "<td>";
|
echo "<td>";
|
||||||
echo '<a title="', _('Edit'), '" href="', $g_scriptname, '?f=edit&id=', $row['cableid'], '"><i class="bi-pencil"></i></a>', "\n";
|
echo '<a title="', _('Edit'), '" href="', $g_scriptname, '?f=edit&id=', $row['cableid'], '"><i class="bi-pencil"></i></a>', "\n";
|
||||||
echo "</td>\n";
|
echo "</td>\n";
|
||||||
echo "</tr>\n";
|
echo "</tr>\n";
|
||||||
}
|
}
|
||||||
// Table summary
|
// Table summary
|
||||||
table_rec_summary($i0, $i, $numrows, 6);
|
table_rec_summary(1, $i, $i, 9);
|
||||||
echo "</table>\n";
|
echo "</table>\n";
|
||||||
|
|
||||||
form_add_button($g_scriptname);
|
form_add_button($g_scriptname);
|
||||||
@@ -177,8 +180,8 @@ echo '<h2>', _('Add Cable'), "</h2>\n";
|
|||||||
form_create_select('cabletype', _('Type'), $g_opt_none + $opt_cabletype);
|
form_create_select('cabletype', _('Type'), $g_opt_none + $opt_cabletype);
|
||||||
?>
|
?>
|
||||||
<div class="mb-3">
|
<div class="mb-3">
|
||||||
<label for="note" class="form-label"><?=_('Conductors')?></label>
|
<label for="note" class="form-label"><?=_('Number of conductors')?></label>
|
||||||
<input type="text" class="form-control" id="conductors" name="conductors">
|
<input type="number" class="form-control" id="conductors" name="conductors">
|
||||||
</div>
|
</div>
|
||||||
<div class="mb-3">
|
<div class="mb-3">
|
||||||
<label for="note" class="form-label"><?=_('Cross section, mm²')?></label>
|
<label for="note" class="form-label"><?=_('Cross section, mm²')?></label>
|
||||||
@@ -191,7 +194,7 @@ echo "</form>\n";
|
|||||||
elseif ($action == ACT_VIEW):
|
elseif ($action == ACT_VIEW):
|
||||||
// ========== VARIANT: view single record =====================================
|
// ========== VARIANT: view single record =====================================
|
||||||
|
|
||||||
$sql = "SELECT cablename, cabletype, length, conductors, diameter, xsection,"
|
$sql = "SELECT cablename, cabletype, techname, length, conductors, diameter, xsection,"
|
||||||
. " weight, color, supplier, manufacturer, cablecond, remarks "
|
. " weight, color, supplier, manufacturer, cablecond, remarks "
|
||||||
. "FROM cable "
|
. "FROM cable "
|
||||||
. "WHERE cableid=?";
|
. "WHERE cableid=?";
|
||||||
@@ -204,6 +207,7 @@ echo '<h2>', _('View cable'), "</h2>\n";
|
|||||||
echo '<table class="table">', "\n";
|
echo '<table class="table">', "\n";
|
||||||
echo '<tr><th style="width:20%">', _('Cable'),"</th><td>", $cable->cablename, "</td></tr>\n";
|
echo '<tr><th style="width:20%">', _('Cable'),"</th><td>", $cable->cablename, "</td></tr>\n";
|
||||||
echo '<tr><th>', _('Type'),"</th><td>", $opt_cabletype[$cable->cabletype], "</td></tr>\n";
|
echo '<tr><th>', _('Type'),"</th><td>", $opt_cabletype[$cable->cabletype], "</td></tr>\n";
|
||||||
|
echo '<tr><th>', _('Techname'),"</th><td>", $opt_techname[$cable->techname], "</td></tr>\n";
|
||||||
echo '<tr><th>', _('Length'),"</th><td>", format_float($cable->length, 1, 'm'), "</td></tr>\n";
|
echo '<tr><th>', _('Length'),"</th><td>", format_float($cable->length, 1, 'm'), "</td></tr>\n";
|
||||||
echo '<tr><th>', _('Conductors'),"</th><td>", $cable->conductors, "</td></tr>\n";
|
echo '<tr><th>', _('Conductors'),"</th><td>", $cable->conductors, "</td></tr>\n";
|
||||||
echo '<tr><th>', _('Diameter'),"</th><td>", format_float($cable->diameter, 1, 'mm'), "</td></tr>\n";
|
echo '<tr><th>', _('Diameter'),"</th><td>", format_float($cable->diameter, 1, 'mm'), "</td></tr>\n";
|
||||||
@@ -219,7 +223,7 @@ form_view_buttons($g_scriptname, $id);
|
|||||||
elseif ($action == ACT_EDIT):
|
elseif ($action == ACT_EDIT):
|
||||||
// ========== VARIANT: edit single record =====================================
|
// ========== VARIANT: edit single record =====================================
|
||||||
|
|
||||||
$sql = "SELECT cablename, cabletype, length, conductors, diameter, xsection,"
|
$sql = "SELECT cablename, cabletype, techname, length, conductors, diameter, xsection,"
|
||||||
. " weight, color, supplier, manufacturer, cablecond, remarks "
|
. " weight, color, supplier, manufacturer, cablecond, remarks "
|
||||||
. "FROM cable "
|
. "FROM cable "
|
||||||
. "WHERE cableid=?";
|
. "WHERE cableid=?";
|
||||||
@@ -237,14 +241,15 @@ echo '<h2>', _('Edit cable'), "</h2>\n";
|
|||||||
</div>
|
</div>
|
||||||
<?php
|
<?php
|
||||||
form_create_select('cabletype', _('Type'), $g_opt_none + $opt_cabletype, $cable->cabletype);
|
form_create_select('cabletype', _('Type'), $g_opt_none + $opt_cabletype, $cable->cabletype);
|
||||||
|
form_create_select('techname', _('Techname'), $g_opt_none + $opt_techname, $cable->techname);
|
||||||
?>
|
?>
|
||||||
<div class="mb-3">
|
<div class="mb-3">
|
||||||
<label for="note" class="form-label"><?=_('Length, m')?></label>
|
<label for="note" class="form-label"><?=_('Length, m')?></label>
|
||||||
<input type="text" class="form-control" id="length" name="length" value="<?=format_float($cable->length, 1);?>">
|
<input type="text" class="form-control" id="length" name="length" value="<?=format_float($cable->length, 1);?>">
|
||||||
</div>
|
</div>
|
||||||
<div class="mb-3">
|
<div class="mb-3">
|
||||||
<label for="note" class="form-label"><?=_('Conductors')?></label>
|
<label for="note" class="form-label"><?=_('Number of conductors')?></label>
|
||||||
<input type="text" class="form-control" id="conductors" name="conductors" value="<?=$cable->conductors;?>">
|
<input type="number" class="form-control" id="conductors" name="conductors" value="<?=$cable->conductors;?>">
|
||||||
</div>
|
</div>
|
||||||
<div class="mb-3">
|
<div class="mb-3">
|
||||||
<label for="note" class="form-label"><?=_('Diameter, mm')?></label>
|
<label for="note" class="form-label"><?=_('Diameter, mm')?></label>
|
||||||
@@ -267,7 +272,7 @@ form_create_select('cablecond', _('Condition'), $opt_cablecond, $cable->cablecon
|
|||||||
?>
|
?>
|
||||||
<div class="mb-3">
|
<div class="mb-3">
|
||||||
<label for="remarks" class="form-label"><?=_('Remarks')?></label>
|
<label for="remarks" class="form-label"><?=_('Remarks')?></label>
|
||||||
<textarea class="form-control" id="remarks" name="remarks" rows="3"><?=h($cable->remarks, br:true)?></textarea>
|
<textarea class="form-control" id="remarks" name="remarks" rows="3"><?=h($cable->remarks)?></textarea>
|
||||||
</div>
|
</div>
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
|
|||||||
@@ -7,6 +7,7 @@
|
|||||||
******************************************************************************/
|
******************************************************************************/
|
||||||
|
|
||||||
require 'globals.inc';
|
require 'globals.inc';
|
||||||
|
require 'lib/db.inc';
|
||||||
require 'lib/gpc.inc';
|
require 'lib/gpc.inc';
|
||||||
|
|
||||||
$pagetitle = _('Checklists');
|
$pagetitle = _('Checklists');
|
||||||
|
|||||||
+5
-4
@@ -7,6 +7,7 @@
|
|||||||
******************************************************************************/
|
******************************************************************************/
|
||||||
|
|
||||||
require 'globals.inc';
|
require 'globals.inc';
|
||||||
|
require 'lib/db.inc';
|
||||||
require 'lib/gpc.inc';
|
require 'lib/gpc.inc';
|
||||||
|
|
||||||
$pagetitle=_('Company');
|
$pagetitle=_('Company');
|
||||||
@@ -298,10 +299,10 @@ echo "</table>\n";
|
|||||||
|
|
||||||
form_view_buttons($g_scriptname, $id);
|
form_view_buttons($g_scriptname, $id);
|
||||||
|
|
||||||
// show referenced equipment
|
// show referenced equipment for current vessel
|
||||||
$sql = "SELECT eid, ename FROM equipment WHERE supplier=:id OR manufacturer=:id";
|
$sql = "SELECT eid, ename FROM equipment WHERE vid=:vid AND (supplier=:id OR manufacturer=:id)";
|
||||||
$sth = $pdo->prepare($sql);
|
$sth = $pdo->prepare($sql);
|
||||||
$sth->execute([':id' => $id]);
|
$sth->execute([':vid' => $user->vid, ':id' => $id]);
|
||||||
if ($sth->rowCount() > 0) {
|
if ($sth->rowCount() > 0) {
|
||||||
echo '<p>', _('Referenced in equipment'), ":</p>\n";
|
echo '<p>', _('Referenced in equipment'), ":</p>\n";
|
||||||
echo "<ul>\n";
|
echo "<ul>\n";
|
||||||
@@ -418,7 +419,7 @@ form_create_select('comptype2', _('Secondary company type'), $g_opt_none + $opt_
|
|||||||
</div>
|
</div>
|
||||||
<div class="mb-3">
|
<div class="mb-3">
|
||||||
<label for="remarks" class="form-label"><?=_('Remarks')?></label>
|
<label for="remarks" class="form-label"><?=_('Remarks')?></label>
|
||||||
<textarea class="form-control" id="remarks" name="remarks" rows="3"><?=h($company->remarks, br:true)?></textarea>
|
<textarea class="form-control" id="remarks" name="remarks" rows="3"><?=h($company->remarks)?></textarea>
|
||||||
</div>
|
</div>
|
||||||
<?php
|
<?php
|
||||||
$opt_flags = db_load_enum('company', 'flags', true, true, false);
|
$opt_flags = db_load_enum('company', 'flags', true, true, false);
|
||||||
|
|||||||
@@ -17,9 +17,9 @@ define('APP_ILLUSTRATION', 'sailboat.svg');
|
|||||||
|
|
||||||
// database connection
|
// database connection
|
||||||
$g_db_host = 'localhost';
|
$g_db_host = 'localhost';
|
||||||
$g_db_username = 'ymsweb';
|
$g_db_username = '@DB_USERNAME@';
|
||||||
$g_db_password = 'changeme!';
|
$g_db_password = '@DB_PASSWORD@';
|
||||||
$g_db_schema = 'yms';
|
$g_db_schema = '@DB_SCHEMA@';
|
||||||
|
|
||||||
// mail settings
|
// mail settings
|
||||||
$g_mail_enable = FALSE;
|
$g_mail_enable = FALSE;
|
||||||
@@ -29,13 +29,13 @@ $g_mailto_webmaster = 'webmaster@example.com';
|
|||||||
// localization
|
// localization
|
||||||
$g_textdomain = 'yms';
|
$g_textdomain = 'yms';
|
||||||
$g_timezone = 'Europe/Berlin';
|
$g_timezone = 'Europe/Berlin';
|
||||||
$g_locale = 'de_DE.UTF-8';
|
$g_locale = 'en_GB.UTF-8';
|
||||||
|
|
||||||
// vessel base shapes directory
|
// vessel base shapes directory
|
||||||
$g_shapedir = '/usr/local/share/yms/shapes';
|
$g_shapedir = '/usr/local/share/yms/shapes';
|
||||||
|
|
||||||
// documents and images
|
// documents and images
|
||||||
$g_doc_basepath = '/var/local/yms';
|
$g_doc_basepath = '/var/local/lib/yms';
|
||||||
$g_doc_maxsize = 1024*1024*16; // 16 MB, please adjust php.ini accordingly!
|
$g_doc_maxsize = 1024*1024*16; // 16 MB, please adjust php.ini accordingly!
|
||||||
$g_doc_typemap = array(
|
$g_doc_typemap = array(
|
||||||
'generic' => 'doc',
|
'generic' => 'doc',
|
||||||
@@ -50,4 +50,3 @@ $g_storage_limit = 1024; // MB
|
|||||||
$g_thumb_size = 120;
|
$g_thumb_size = 120;
|
||||||
|
|
||||||
$g_rows_pp = 10; // pagination limit
|
$g_rows_pp = 10; // pagination limit
|
||||||
|
|
||||||
|
|||||||
@@ -18,6 +18,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
require 'globals.inc';
|
require 'globals.inc';
|
||||||
|
require 'lib/db.inc';
|
||||||
require 'lib/gpc.inc';
|
require 'lib/gpc.inc';
|
||||||
require 'lib/fileutils.inc';
|
require 'lib/fileutils.inc';
|
||||||
|
|
||||||
|
|||||||
+19
-4
@@ -15,6 +15,7 @@ doctype icons
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
require 'globals.inc';
|
require 'globals.inc';
|
||||||
|
require 'lib/db.inc';
|
||||||
require 'lib/gpc.inc';
|
require 'lib/gpc.inc';
|
||||||
require 'lib/fileutils.inc';
|
require 'lib/fileutils.inc';
|
||||||
|
|
||||||
@@ -89,7 +90,21 @@ switch ($submit = form_get_action()) {
|
|||||||
$g_warning->Add(sprintf(_("Mimetype mismatch: '%s'."), $file_type));
|
$g_warning->Add(sprintf(_("Mimetype mismatch: '%s'."), $file_type));
|
||||||
}
|
}
|
||||||
|
|
||||||
// TODO for images check maximum size and scale down if needed
|
// for images check maximum size and scale down if needed
|
||||||
|
if (($file_mimetype == 'image/png') or ($file_mimetype == 'image/jpeg')) {
|
||||||
|
if (isset($_POST['noscale'])) {
|
||||||
|
$g_message->Add(_('Image has not been scaled down'));
|
||||||
|
} else {
|
||||||
|
// scale down if dimensions exceed limits
|
||||||
|
$img_maxx= $pdo->query("SELECT valint FROM settings WHERE userid=0 AND sno=20")->fetchColumn();
|
||||||
|
$img_maxy= $pdo->query("SELECT valint FROM settings WHERE userid=0 AND sno=21")->fetchColumn();
|
||||||
|
[$width, $height] = getimagesize($file_tmp);
|
||||||
|
$factor = min($img_maxx / $width, $img_maxy / $height);
|
||||||
|
if ($factor < 1) {
|
||||||
|
image_scale($file_tmp, $file_mimetype, $width, $height, $factor);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// ok let's go
|
// ok let's go
|
||||||
$file_hash = md5_file($file_tmp);
|
$file_hash = md5_file($file_tmp);
|
||||||
@@ -577,9 +592,9 @@ foreach ($sth->fetchAll() as $row) {
|
|||||||
$eids = array();
|
$eids = array();
|
||||||
$sql = "SELECT drid, reftype, refid, ename AS target "
|
$sql = "SELECT drid, reftype, refid, ename AS target "
|
||||||
. "FROM docref INNER JOIN equipment ON (docref.reftype='equipment' AND docref.refid=equipment.eid) "
|
. "FROM docref INNER JOIN equipment ON (docref.reftype='equipment' AND docref.refid=equipment.eid) "
|
||||||
. "WHERE docid=?";
|
. "WHERE docid=? AND vid=?";
|
||||||
$sth = $pdo->prepare($sql);
|
$sth = $pdo->prepare($sql);
|
||||||
$sth->execute([$id]);
|
$sth->execute([$id, $user->vid]);
|
||||||
foreach ($sth->fetchAll() as $row) {
|
foreach ($sth->fetchAll() as $row) {
|
||||||
$references[] = $row;
|
$references[] = $row;
|
||||||
$eids[] = $row['refid'];
|
$eids[] = $row['refid'];
|
||||||
@@ -780,7 +795,7 @@ if ($document->mimetype == 'application/pdf') {
|
|||||||
?>
|
?>
|
||||||
<div class="mb-3">
|
<div class="mb-3">
|
||||||
<label for="remarks" class="form-label"><?=_('Remarks')?></label>
|
<label for="remarks" class="form-label"><?=_('Remarks')?></label>
|
||||||
<textarea class="form-control" id="remarks" name="remarks" rows="3"><?=h($document->remarks, br:true)?></textarea>
|
<textarea class="form-control" id="remarks" name="remarks" rows="3"><?=h($document->remarks)?></textarea>
|
||||||
</div>
|
</div>
|
||||||
<button type="submit" name="submit[update]" class="btn btn-primary"><?=_('Save')?></button>
|
<button type="submit" name="submit[update]" class="btn btn-primary"><?=_('Save')?></button>
|
||||||
<a href="<?=$g_scriptname?>?f=view&id=<?=$id?>" class="btn btn-secondary"><?=_('Back')?></a>
|
<a href="<?=$g_scriptname?>?f=view&id=<?=$id?>" class="btn btn-secondary"><?=_('Back')?></a>
|
||||||
|
|||||||
@@ -7,6 +7,7 @@
|
|||||||
******************************************************************************/
|
******************************************************************************/
|
||||||
|
|
||||||
require 'globals.inc';
|
require 'globals.inc';
|
||||||
|
require 'lib/db.inc';
|
||||||
require 'lib/gpc.inc';
|
require 'lib/gpc.inc';
|
||||||
|
|
||||||
$pagetitle = _('Lists');
|
$pagetitle = _('Lists');
|
||||||
|
|||||||
+61
-5
@@ -7,8 +7,10 @@
|
|||||||
******************************************************************************/
|
******************************************************************************/
|
||||||
|
|
||||||
require 'globals.inc';
|
require 'globals.inc';
|
||||||
|
require 'lib/db.inc';
|
||||||
require 'lib/gpc.inc';
|
require 'lib/gpc.inc';
|
||||||
require 'lib/fileutils.inc';
|
require 'lib/fileutils.inc';
|
||||||
|
require 'lib/signalk.inc';
|
||||||
|
|
||||||
$pagetitle = _('Equipment');
|
$pagetitle = _('Equipment');
|
||||||
|
|
||||||
@@ -73,6 +75,9 @@ switch ($submit = form_get_action()) {
|
|||||||
if ($p[':manufacturer'] <= 0) $p[':manufacturer'] = NULL;
|
if ($p[':manufacturer'] <= 0) $p[':manufacturer'] = NULL;
|
||||||
$p[':ecat'] = gpc_get_int($_POST, 'category');
|
$p[':ecat'] = gpc_get_int($_POST, 'category');
|
||||||
if ($p[':ecat'] <= 0) $p[':ecat'] = NULL;
|
if ($p[':ecat'] <= 0) $p[':ecat'] = NULL;
|
||||||
|
$p[':x'] = gpc_get_uint($_POST, 'x');
|
||||||
|
$p[':y'] = gpc_get_int($_POST, 'y');
|
||||||
|
$p[':z'] = gpc_get_int($_POST, 'z');
|
||||||
$p[':remarks'] = gpc_get_string($_POST, 'remarks', 150);
|
$p[':remarks'] = gpc_get_string($_POST, 'remarks', 150);
|
||||||
$allowed = db_load_enum('equipment', 'flags');
|
$allowed = db_load_enum('equipment', 'flags');
|
||||||
$p[':flags'] = gpc_get_set($_POST, 'flags', $allowed, true, NULL);
|
$p[':flags'] = gpc_get_set($_POST, 'flags', $allowed, true, NULL);
|
||||||
@@ -393,7 +398,7 @@ foreach ($res as $row) {
|
|||||||
echo "<td>", $row['model'], "</td>\n";
|
echo "<td>", $row['model'], "</td>\n";
|
||||||
echo "<td>", $row['serial'], "</td>\n";
|
echo "<td>", $row['serial'], "</td>\n";
|
||||||
echo "<td>", $age, "</td>\n";
|
echo "<td>", $age, "</td>\n";
|
||||||
echo "<td>", $row['remarks'], "</td>\n";
|
echo "<td>", h($row['remarks'], br:true), "</td>\n";
|
||||||
// Edit current record button
|
// Edit current record button
|
||||||
echo "<td>";
|
echo "<td>";
|
||||||
echo '<a title="', _('Edit'), '" href="', $g_scriptname, '?f=edit&id=', $row['eid'], '"><i class="bi-pencil"></i></a>', "\n";
|
echo '<a title="', _('Edit'), '" href="', $g_scriptname, '?f=edit&id=', $row['eid'], '"><i class="bi-pencil"></i></a>', "\n";
|
||||||
@@ -441,7 +446,8 @@ elseif ($action == ACT_VIEW):
|
|||||||
// ========== VARIANT: view single record =====================================
|
// ========== VARIANT: view single record =====================================
|
||||||
|
|
||||||
$sql = "SELECT eid, ename, model, serial, purchdate, price, weight, "
|
$sql = "SELECT eid, ename, model, serial, purchdate, price, weight, "
|
||||||
. " supplier, manufacturer, ecat, shortname, remarks, flags "
|
. "supplier, manufacturer, ecat, shortname, x, y, z, flags, "
|
||||||
|
. "remarks "
|
||||||
. "FROM equipment "
|
. "FROM equipment "
|
||||||
. "WHERE eid=?";
|
. "WHERE eid=?";
|
||||||
$sth = $pdo->prepare($sql);
|
$sth = $pdo->prepare($sql);
|
||||||
@@ -463,9 +469,12 @@ echo '<tr><th>', _('Model'),"</th><td>", h($equipment->model), "</td></tr>\n";
|
|||||||
echo '<tr><th>', _('Serial'),"</th><td>", h($equipment->serial), "</td></tr>\n";
|
echo '<tr><th>', _('Serial'),"</th><td>", h($equipment->serial), "</td></tr>\n";
|
||||||
echo '<tr><th>', _('Weight'),"</th><td>", format_float($equipment->weight, 2, 'kg'), "</td></tr>\n";
|
echo '<tr><th>', _('Weight'),"</th><td>", format_float($equipment->weight, 2, 'kg'), "</td></tr>\n";
|
||||||
echo '<tr><th>', _('Price'),"</th><td>", format_currency($equipment->price), "</td></tr>\n";
|
echo '<tr><th>', _('Price'),"</th><td>", format_currency($equipment->price), "</td></tr>\n";
|
||||||
echo '<tr><th>', _('Purchase date'),"</th><td>", $equipment->purchdate, "</td></tr>\n";
|
echo '<tr><th>', _('Purchase date'),"</th><td>", format_date($equipment->purchdate), "</td></tr>\n";
|
||||||
echo '<tr><th>', _('Supplier'),"</th><td>", $equipment->supplier ? $opt_supplier[$equipment->supplier] : 'n/a', "</td></tr>\n";
|
echo '<tr><th>', _('Supplier'),"</th><td>", $equipment->supplier ? $opt_supplier[$equipment->supplier] : 'n/a', "</td></tr>\n";
|
||||||
echo '<tr><th>', _('Category'),"</th><td>", $opt_ecat[$equipment->ecat], "</td></tr>\n";
|
echo '<tr><th>', _('Category'),"</th><td>", $opt_ecat[$equipment->ecat], "</td></tr>\n";
|
||||||
|
if (!empty($equipment->x)) {
|
||||||
|
echo '<tr><th>', _('Location (x, y, z)'),"</th><td>(", $equipment->x, ', ', $equipment->y, ', ', $equipment->z, ")</td></tr>\n";
|
||||||
|
}
|
||||||
echo '<tr><th>', _('Remarks'),"</th><td>", h($equipment->remarks, br:true), "</td></tr>\n";
|
echo '<tr><th>', _('Remarks'),"</th><td>", h($equipment->remarks, br:true), "</td></tr>\n";
|
||||||
echo '<tr><th>', _('Flags'),"</th><td>", $equipment->flags, "</td></tr>\n";
|
echo '<tr><th>', _('Flags'),"</th><td>", $equipment->flags, "</td></tr>\n";
|
||||||
echo "</table>\n";
|
echo "</table>\n";
|
||||||
@@ -614,6 +623,39 @@ echo '<a href="measurement.php?f=add&id=', $id, '" class="btn btn-primary" role=
|
|||||||
echo _('Add measurement'), "</a>\n";
|
echo _('Add measurement'), "</a>\n";
|
||||||
echo "</div>\n";
|
echo "</div>\n";
|
||||||
|
|
||||||
|
// Signal-K Integration
|
||||||
|
$res = $pdo->query("SELECT valint, valstr FROM settings WHERE userid=0 AND sno=5");
|
||||||
|
$sk_active = false;
|
||||||
|
$sk_url = NULL;
|
||||||
|
if ($res !== false) {
|
||||||
|
$row = $res->fetch(PDO::FETCH_ASSOC);
|
||||||
|
if ($row !== false && $row['valint'] == 1
|
||||||
|
&& !empty($row['valstr'])
|
||||||
|
&& filter_var($settings['valstr'], FILTER_VALIDATE_URL))
|
||||||
|
{
|
||||||
|
$sk_active = true;
|
||||||
|
$sk_url = rtrim($row['valstr'], '/');
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if ($sk_active) {
|
||||||
|
// TODO this ist just experimental
|
||||||
|
$sql = "SELECT skpath FROM signalk WHERE vid=? AND objid=? AND objtype='equipment'";
|
||||||
|
$sth = $pdo->prepare($sql);
|
||||||
|
$sth->execute([$user->vid, $id]);
|
||||||
|
if ($sth->rowCount() > 0) {
|
||||||
|
echo '<h3>', _('Signal K data'), "</h3>";
|
||||||
|
$skpath = $sth->fetchColumn();
|
||||||
|
// REST Example:
|
||||||
|
// GET http://127.0.0.1:3000/signalk/v1/api/vessels/self/propulsion/mainEngine/runTime
|
||||||
|
try {
|
||||||
|
$data = signalk_get($url, $skpath);
|
||||||
|
print_r($data);
|
||||||
|
} catch (Exception $e) {
|
||||||
|
echo "<p>signalk-timeout!</p>\n";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// Spare parts
|
// Spare parts
|
||||||
echo '<h3>', _('Spare parts'), "</h3>";
|
echo '<h3>', _('Spare parts'), "</h3>";
|
||||||
|
|
||||||
@@ -661,7 +703,7 @@ foreach ($sth->fetchAll() as $row) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
$sql = "SELECT eid, ename, model, serial, weight, price, purchdate, "
|
$sql = "SELECT eid, ename, model, serial, weight, price, purchdate, "
|
||||||
. " supplier, manufacturer, ecat, shortname, remarks, flags "
|
. "supplier, manufacturer, ecat, shortname, x, y, z, remarks, flags "
|
||||||
. "FROM equipment "
|
. "FROM equipment "
|
||||||
. "WHERE eid=?";
|
. "WHERE eid=?";
|
||||||
$sth = $pdo->prepare($sql);
|
$sth = $pdo->prepare($sql);
|
||||||
@@ -704,9 +746,23 @@ $equipment = $sth->fetch(PDO::FETCH_OBJ);
|
|||||||
form_create_select('supplier', _('Supplier'), $opt_supplier, $equipment->supplier);
|
form_create_select('supplier', _('Supplier'), $opt_supplier, $equipment->supplier);
|
||||||
form_create_select('category', _('Category'), $g_opt_unknown + $opt_ecat, $equipment->ecat);
|
form_create_select('category', _('Category'), $g_opt_unknown + $opt_ecat, $equipment->ecat);
|
||||||
?>
|
?>
|
||||||
|
<div class="mb-3">
|
||||||
|
<label class="form-label"><?=_('Position (x, y, z) in mm')?></label>
|
||||||
|
<div class="row">
|
||||||
|
<div class="col">
|
||||||
|
<input type="number" class="form-control" id="x" name="x" min="0" value="<?=$equipment->x ?>">
|
||||||
|
</div>
|
||||||
|
<div class="col">
|
||||||
|
<input type="number" class="form-control" id="y" name="y" value="<?=$equipment->y ?>">
|
||||||
|
</div>
|
||||||
|
<div class="col">
|
||||||
|
<input type="number" class="form-control" id="z" name="z" value="<?=$equipment->z ?>">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
<div class="mb-3">
|
<div class="mb-3">
|
||||||
<label for="remarks" class="form-label"><?=_('Remarks')?></label>
|
<label for="remarks" class="form-label"><?=_('Remarks')?></label>
|
||||||
<textarea class="form-control" id="remarks" name="remarks" rows="3"><?=h($equipment->remarks, br:true)?></textarea>
|
<textarea class="form-control" id="remarks" name="remarks" rows="3"><?=h($equipment->remarks, br:false)?></textarea>
|
||||||
</div>
|
</div>
|
||||||
<?php
|
<?php
|
||||||
$opt_flags = db_load_enum('equipment', 'flags', true, true, false);
|
$opt_flags = db_load_enum('equipment', 'flags', true, true, false);
|
||||||
|
|||||||
+22
-6
@@ -7,6 +7,7 @@
|
|||||||
******************************************************************************/
|
******************************************************************************/
|
||||||
|
|
||||||
require 'globals.inc';
|
require 'globals.inc';
|
||||||
|
require 'lib/db.inc';
|
||||||
require 'lib/gpc.inc';
|
require 'lib/gpc.inc';
|
||||||
|
|
||||||
$pagetitle = _('Fuses');
|
$pagetitle = _('Fuses');
|
||||||
@@ -57,11 +58,10 @@ switch ($submit = form_get_action()) {
|
|||||||
$p[':current'] = gpc_get_float($_POST, 'current');
|
$p[':current'] = gpc_get_float($_POST, 'current');
|
||||||
$p[':cableid'] = gpc_get_int($_POST, 'cableid');
|
$p[':cableid'] = gpc_get_int($_POST, 'cableid');
|
||||||
$p[':eid'] = gpc_get_int($_POST, 'id');
|
$p[':eid'] = gpc_get_int($_POST, 'id');
|
||||||
$p[':weight'] = min(gpc_get_float($_POST, 'weight'), 9.99); // limit max value
|
|
||||||
$p[':location'] = gpc_get_int($_POST, 'location');
|
$p[':location'] = gpc_get_int($_POST, 'location');
|
||||||
$p[':description'] = gpc_get_string($_POST, 'description');
|
$p[':description'] = gpc_get_string($_POST, 'description');
|
||||||
$p[':remarks'] = gpc_get_string($_POST, 'remarks');
|
$p[':remarks'] = gpc_get_string($_POST, 'remarks');
|
||||||
db_exec_update('tag', $p, 'tagid');
|
db_exec_update('fuse', $p, 'fuseid');
|
||||||
$action = ACT_VIEW;
|
$action = ACT_VIEW;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
@@ -219,9 +219,9 @@ elseif ($action == ACT_VIEW):
|
|||||||
|
|
||||||
$sql = "SELECT fnumber, ftype, current, cableid, eid, location, description, remarks "
|
$sql = "SELECT fnumber, ftype, current, cableid, eid, location, description, remarks "
|
||||||
. "FROM fuse "
|
. "FROM fuse "
|
||||||
. "WHERE fuseid=?";
|
. "WHERE vid=? AND fuseid=?";
|
||||||
$sth = $pdo->prepare($sql);
|
$sth = $pdo->prepare($sql);
|
||||||
$sth->execute([$id]);
|
$sth->execute([$user->vid, $id]);
|
||||||
$fuse = $sth->fetch(PDO::FETCH_OBJ);
|
$fuse = $sth->fetch(PDO::FETCH_OBJ);
|
||||||
|
|
||||||
echo '<h2>', _('View fuse'), "</h2>\n";
|
echo '<h2>', _('View fuse'), "</h2>\n";
|
||||||
@@ -242,7 +242,10 @@ form_view_buttons($g_scriptname, $id);
|
|||||||
elseif ($action == ACT_EDIT):
|
elseif ($action == ACT_EDIT):
|
||||||
// ========== VARIANT: edit single record =====================================
|
// ========== VARIANT: edit single record =====================================
|
||||||
|
|
||||||
$sql = "SELECT fnumber, description "
|
$opt_cable = db_get_opt_cable($user->vid);
|
||||||
|
$opt_equipment = db_get_opt_equip($user->vid);
|
||||||
|
|
||||||
|
$sql = "SELECT fnumber, ftype, current, cableid, eid, location, description, remarks "
|
||||||
. "FROM fuse "
|
. "FROM fuse "
|
||||||
. "WHERE fuseid=?";
|
. "WHERE fuseid=?";
|
||||||
$sth = $pdo->prepare($sql);
|
$sth = $pdo->prepare($sql);
|
||||||
@@ -254,13 +257,26 @@ echo '<h2>', _('Edit fuse'), "</h2>\n";
|
|||||||
<form method="post" action="<?=$g_scriptname?>">
|
<form method="post" action="<?=$g_scriptname?>">
|
||||||
<input type="hidden" name="id" value="<?=$id?>">
|
<input type="hidden" name="id" value="<?=$id?>">
|
||||||
<div class="mb-3">
|
<div class="mb-3">
|
||||||
<label for="mname" class="form-label"><?=pgettext('number', 'Number')?></label>
|
<label for="fnumber" class="form-label"><?=_('Fuse number')?></label>
|
||||||
<input type="text" class="form-control" id="fnumber" name="fnumber" value="<?=$fuse->fnumber ?>">
|
<input type="text" class="form-control" id="fnumber" name="fnumber" value="<?=$fuse->fnumber ?>">
|
||||||
</div>
|
</div>
|
||||||
<div class="mb-3">
|
<div class="mb-3">
|
||||||
<label for="note" class="form-label"><?=_('Description')?></label>
|
<label for="note" class="form-label"><?=_('Description')?></label>
|
||||||
<input type="text" class="form-control" id="description" name="description" value="<?=h($fuse->description)?>">
|
<input type="text" class="form-control" id="description" name="description" value="<?=h($fuse->description)?>">
|
||||||
</div>
|
</div>
|
||||||
|
<div class="mb-3">
|
||||||
|
<label for="current" class="form-label"><?=_('Current')?></label>
|
||||||
|
<input type="text" class="form-control" id="current" name="current" value="<?=format_float($fuse->current) ?>">
|
||||||
|
</div>
|
||||||
|
<?php
|
||||||
|
form_create_select('location', _('Location'), $g_opt_none + $opt_location, $fuse->location);
|
||||||
|
form_create_select('cableid', _('Cable'), $g_opt_none + $opt_cable, $fuse->cableid);
|
||||||
|
form_create_select('eid', _('Equipment'), $g_opt_none + $opt_equipment, $fuse->eid);
|
||||||
|
?>
|
||||||
|
<div class="mb-3">
|
||||||
|
<label for="remarks" class="form-label"><?=_('Remarks')?></label>
|
||||||
|
<textarea class="form-control" id="remarks" name="remarks" rows="3"><?=h($fuse->remarks)?></textarea>
|
||||||
|
</div>
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
form_edit_buttons($g_scriptname, $id);
|
form_edit_buttons($g_scriptname, $id);
|
||||||
|
|||||||
+84
-14
@@ -14,6 +14,7 @@
|
|||||||
* 0.1.0 2024-03-12 Started development tho
|
* 0.1.0 2024-03-12 Started development tho
|
||||||
* 0.2.0 2026-08-18 First public release tho
|
* 0.2.0 2026-08-18 First public release tho
|
||||||
* 0.2.1 2026-08-28 Foreign keys, bugfixes and output sanitation tho
|
* 0.2.1 2026-08-28 Foreign keys, bugfixes and output sanitation tho
|
||||||
|
* 0.2.2 2026-09-21 Lots of improvements and fixes tho
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
@@ -49,13 +50,16 @@ define('ROLE_SAILOR', 'sailor');
|
|||||||
// ========== PAGE START CODE =================================================
|
// ========== PAGE START CODE =================================================
|
||||||
|
|
||||||
// global version string
|
// global version string
|
||||||
$g_version = 'v0.2.1';
|
$g_version = 'v0.2.2';
|
||||||
|
|
||||||
$g_scriptname = basename($_SERVER['SCRIPT_NAME']);
|
$g_scriptname = basename($_SERVER['SCRIPT_NAME']);
|
||||||
|
|
||||||
require 'config.inc';
|
require 'config.inc';
|
||||||
|
|
||||||
// Localization
|
// Localization
|
||||||
|
|
||||||
|
$lang = get_browser_lang(['de', 'en']);
|
||||||
|
|
||||||
setlocale(LC_ALL, $g_locale);
|
setlocale(LC_ALL, $g_locale);
|
||||||
$g_lconv = localeconv();
|
$g_lconv = localeconv();
|
||||||
$g_lang = substr($g_locale, 0, 2); // short language identifier
|
$g_lang = substr($g_locale, 0, 2); // short language identifier
|
||||||
@@ -111,14 +115,37 @@ try {
|
|||||||
$sth = $pdo->query("SELECT valint FROM settings WHERE userid=0 AND sno=0");
|
$sth = $pdo->query("SELECT valint FROM settings WHERE userid=0 AND sno=0");
|
||||||
} catch (PDOException $e) {
|
} catch (PDOException $e) {
|
||||||
if ($e->getCode() == 1146) {
|
if ($e->getCode() == 1146) {
|
||||||
echo '<pre>';
|
echo "<pre>\n";
|
||||||
echo 'Settings table not found! Perhaps database is not initialized';
|
echo "Settings table not found! Perhaps database is not initialized?\n";
|
||||||
echo '</pre>';
|
echo "</pre>\n";
|
||||||
exit(1);
|
exit(1);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
$g_db_scheme_version = $sth->fetchColumn();
|
$g_db_scheme_version = $sth->fetchColumn();
|
||||||
// TODO Check version
|
$g_db_scheme_required = 1;
|
||||||
|
// Schema version check
|
||||||
|
if ($g_db_scheme_version !== $g_db_scheme_required) {
|
||||||
|
echo "<pre>\n";
|
||||||
|
echo "Database schema is wrong: detected version $g_db_scheme_version, but required version $g_db_scheme_required!\n";
|
||||||
|
echo "</pre>\n";
|
||||||
|
exit(1);
|
||||||
|
}
|
||||||
|
|
||||||
|
// currency symbol is global
|
||||||
|
$sth = $pdo->query("SELECT valint FROM settings WHERE userid=0 AND sno=4");
|
||||||
|
$g_currsym = $sth->fetchColumn();
|
||||||
|
|
||||||
|
// allowed date formats
|
||||||
|
$g_opt_datefmt = array(
|
||||||
|
'Y-m-d' => _('YYYY-MM-DD'), // ISO / international /technical
|
||||||
|
'd.m.Y' => _('DD.MM.YYYY'), // Germany / Central & Northern Europe
|
||||||
|
'd/m/Y' => _('DD/MM/YYYY'), // UK / France / Spain / Italy / Australia / NZ
|
||||||
|
'd-m-Y' => _('DD-MM-YYYY'), // Netherlands / Denmark / Belgium
|
||||||
|
'd M Y' => _('DD Mon YYYY'), // nautical documents / logbooks / unambiguous
|
||||||
|
'm.d.Y' => _('MM.DD.YYYY'), // USA
|
||||||
|
'm/d/Y' => _('MM/DD/YYYY'), // USA
|
||||||
|
'Y/m/d' => _('YYYY/MM/DD') // Japan / China
|
||||||
|
);
|
||||||
|
|
||||||
$user = User::GetInstance(); // There can be only one
|
$user = User::GetInstance(); // There can be only one
|
||||||
if ($g_scriptname != 'login.php') {
|
if ($g_scriptname != 'login.php') {
|
||||||
@@ -244,6 +271,7 @@ class User {
|
|||||||
public $datefmt;
|
public $datefmt;
|
||||||
public $rows_pp;
|
public $rows_pp;
|
||||||
public $menu;
|
public $menu;
|
||||||
|
public $language;
|
||||||
|
|
||||||
private function __construct() {
|
private function __construct() {
|
||||||
global $g_rows_pp;
|
global $g_rows_pp;
|
||||||
@@ -255,6 +283,7 @@ class User {
|
|||||||
$this->datefmt = 'Y-m-d';
|
$this->datefmt = 'Y-m-d';
|
||||||
$this->rows_pp = $g_rows_pp;
|
$this->rows_pp = $g_rows_pp;
|
||||||
$this->menu = [1, 2, 3, 4, 5, 6];
|
$this->menu = [1, 2, 3, 4, 5, 6];
|
||||||
|
$this->language = 'en';
|
||||||
}
|
}
|
||||||
|
|
||||||
public static function getInstance() {
|
public static function getInstance() {
|
||||||
@@ -317,13 +346,14 @@ class User {
|
|||||||
}
|
}
|
||||||
|
|
||||||
$this->id = $_SESSION['userid'];
|
$this->id = $_SESSION['userid'];
|
||||||
$sql = "SELECT displayname, role FROM user WHERE userid=?";
|
$sql = "SELECT displayname, role, language FROM user WHERE userid=?";
|
||||||
$sth = $pdo->prepare($sql);
|
$sth = $pdo->prepare($sql);
|
||||||
$sth->execute([$this->id]);
|
$sth->execute([$this->id]);
|
||||||
$row = $sth->fetch();
|
$row = $sth->fetch();
|
||||||
if ($row) {
|
if ($row) {
|
||||||
$this->displayname = $row['displayname'];
|
$this->displayname = $row['displayname'];
|
||||||
$this->role = $row['role'];
|
$this->role = $row['role'];
|
||||||
|
$this->language = $row['language'];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -945,7 +975,8 @@ function db_get_opt_cable($vid, $default=NULL) {
|
|||||||
$list = array();
|
$list = array();
|
||||||
}
|
}
|
||||||
$sql = "SELECT cableid, cablename FROM cable WHERE vid=? ORDER BY cablename";
|
$sql = "SELECT cableid, cablename FROM cable WHERE vid=? ORDER BY cablename";
|
||||||
$sth = $pdo->query($sql);
|
$sth = $pdo->prepare($sql);
|
||||||
|
$sth->execute([$vid]);
|
||||||
foreach ($sth->fetchAll(PDO::FETCH_NUM) as $row) {
|
foreach ($sth->fetchAll(PDO::FETCH_NUM) as $row) {
|
||||||
$list[$row[0]] = h($row[1]);
|
$list[$row[0]] = h($row[1]);
|
||||||
}
|
}
|
||||||
@@ -1250,16 +1281,31 @@ function format_currency($val) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function format_date($date) {
|
function format_date($date) {
|
||||||
|
// date is string in ISO format
|
||||||
global $user;
|
global $user;
|
||||||
// $user->datefmt;
|
if (empty($date)) {
|
||||||
/*'Y-m-d' => _('YYYY-MM-DD'). $curdate->format(' - Y-m-d'),
|
|
||||||
'Y/m/d' => _('YYYY/MM/DD'). $curdate->format(' - Y/m/d'),
|
|
||||||
'd.m.Y' => _('DD.MM.YYYY'). $curdate->format(' - d.m.Y'),
|
|
||||||
'd/m/Y' => _('DD/MM/YYYY'). $curdate->format(' - d/m/Y'),
|
|
||||||
'm-d-Y' => _('MM/DD/YYYY'). $curdate->format(' - m-d-Y') */
|
|
||||||
|
|
||||||
return '';
|
return '';
|
||||||
}
|
}
|
||||||
|
$timestamp = strtotime($date);
|
||||||
|
if ($timestamp === false) {
|
||||||
|
return '';
|
||||||
|
}
|
||||||
|
return date($user->datefmt, $timestamp);
|
||||||
|
}
|
||||||
|
|
||||||
|
function format_datetime($datetime, $seconds=false) {
|
||||||
|
// datetime is string in ISO format
|
||||||
|
global $user;
|
||||||
|
if (empty($datetime)) {
|
||||||
|
return '';
|
||||||
|
}
|
||||||
|
$timestamp = strtotime($datetime);
|
||||||
|
if ($timestamp === false) {
|
||||||
|
return '';
|
||||||
|
}
|
||||||
|
$timefmt = $seconds ? 'H:i:s' : 'H:i';
|
||||||
|
return date($user->datefmt. ' ' . $timefmt, $timestamp);
|
||||||
|
}
|
||||||
|
|
||||||
function format_color($color) {
|
function format_color($color) {
|
||||||
$colstr = '<span style="';
|
$colstr = '<span style="';
|
||||||
@@ -1344,6 +1390,30 @@ function header_location($location, $message=NULL) {
|
|||||||
exit;
|
exit;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function get_browser_lang($allowed, $default='en') {
|
||||||
|
$h = $_SERVER['HTTP_ACCEPT_LANGUAGE'] ?? '';
|
||||||
|
if (!$h) {
|
||||||
|
return $def;
|
||||||
|
}
|
||||||
|
$langs = [];
|
||||||
|
foreach (explode(',', $h) as $p) {
|
||||||
|
$p = explode(';q=', trim($p));
|
||||||
|
$l = strtolower($p[0]);
|
||||||
|
$q = isset($p[1]) ? (float) $p[1] : 1.0;
|
||||||
|
$langs[$l] = $q;
|
||||||
|
}
|
||||||
|
arsort($langs);
|
||||||
|
foreach ($langs as $bl => $q) {
|
||||||
|
foreach ($allowed as $l) {
|
||||||
|
$l = strtolower($l);
|
||||||
|
if ($bl === $l || str_starts_with($bl, $l . '-')) {
|
||||||
|
return $l;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return $default;
|
||||||
|
}
|
||||||
|
|
||||||
function pgettext($context, $msgid) {
|
function pgettext($context, $msgid) {
|
||||||
// implement missing function
|
// implement missing function
|
||||||
global $g_textdomain;
|
global $g_textdomain;
|
||||||
|
|||||||
+55
-9
@@ -7,6 +7,7 @@
|
|||||||
******************************************************************************/
|
******************************************************************************/
|
||||||
|
|
||||||
require 'globals.inc';
|
require 'globals.inc';
|
||||||
|
require 'lib/db.inc';
|
||||||
require 'lib/gpc.inc';
|
require 'lib/gpc.inc';
|
||||||
require 'lib/svg.inc';
|
require 'lib/svg.inc';
|
||||||
|
|
||||||
@@ -80,6 +81,10 @@ switch ($submit = form_get_action()) {
|
|||||||
$p[':shapefile'] = NULL;
|
$p[':shapefile'] = NULL;
|
||||||
}
|
}
|
||||||
$p[':shipyard'] = gpc_get_int($_POST, 'shipyard');
|
$p[':shipyard'] = gpc_get_int($_POST, 'shipyard');
|
||||||
|
if ($p[':shipyard'] == '-1') {
|
||||||
|
$p[':shipyard'] = NULL;
|
||||||
|
}
|
||||||
|
$p[':year_built'] = gpc_get_int($_POST, 'year_built');
|
||||||
$p[':sid_default'] = gpc_get_uint($_POST, 'sid');
|
$p[':sid_default'] = gpc_get_uint($_POST, 'sid');
|
||||||
$p[':remarks'] = gpc_get_string($_POST, 'remarks', 150);
|
$p[':remarks'] = gpc_get_string($_POST, 'remarks', 150);
|
||||||
db_exec_update('vessel', $p, 'vid');
|
db_exec_update('vessel', $p, 'vid');
|
||||||
@@ -115,7 +120,7 @@ $vid = ($res[0]);
|
|||||||
// Get current vessel data
|
// Get current vessel data
|
||||||
$sql = "SELECT vesselname, model, loa, lwl, beam, draught, draught_min,"
|
$sql = "SELECT vesselname, model, loa, lwl, beam, draught, draught_min,"
|
||||||
. " displacement, ballast, beltpos_aft, beltpos_bow, shapefile,"
|
. " displacement, ballast, beltpos_aft, beltpos_bow, shapefile,"
|
||||||
. " shipyard, remarks "
|
. " shipyard, year_built, remarks "
|
||||||
. "FROM vessel "
|
. "FROM vessel "
|
||||||
. "WHERE vid=?";
|
. "WHERE vid=?";
|
||||||
$sth = $pdo->prepare($sql);
|
$sth = $pdo->prepare($sql);
|
||||||
@@ -161,15 +166,19 @@ echo '<div class="col-1"></div>', "\n";
|
|||||||
echo '<div class="col">';
|
echo '<div class="col">';
|
||||||
if ($vessel->shipyard && $vessel->shipyard > 0) {
|
if ($vessel->shipyard && $vessel->shipyard > 0) {
|
||||||
if ($vessel->shipyard == -3) {
|
if ($vessel->shipyard == -3) {
|
||||||
echo _('Custom-build');
|
echo sprintf(_('Custom-build %d'), ($vessel->year_built ?? ''));
|
||||||
} else {
|
} else {
|
||||||
$sql = "SELECT compname FROM company WHERE compid=?";
|
$sql = "SELECT compname FROM company WHERE compid=?";
|
||||||
$sth = $pdo->prepare($sql);
|
$sth = $pdo->prepare($sql);
|
||||||
$sth->execute([$vessel->shipyard]);
|
$sth->execute([$vessel->shipyard]);
|
||||||
echo sprintf(_('Built by %s'), $sth->fetchColumn());
|
echo sprintf(_('Built %d by %s'), ($vessel->year_built ?? ''), $sth->fetchColumn());
|
||||||
// TODO year of build?
|
}
|
||||||
|
} else {
|
||||||
|
if ($vessel->year_built && $vessel->year_built >= 1901) {
|
||||||
|
echo sprintf(_('Year built %d'), $vessel->year_built);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (strlen($vessel->remarks) > 0) {
|
if (strlen($vessel->remarks) > 0) {
|
||||||
echo h($vessel->remarks, br:true);
|
echo h($vessel->remarks, br:true);
|
||||||
}
|
}
|
||||||
@@ -310,7 +319,13 @@ echo substr($xml, strpos($xml, "\n") + 1);
|
|||||||
<tr><td><?=_('Lwl')?></td><td><?=format_float($vessel->lwl, 2, 'm')?></td></tr>
|
<tr><td><?=_('Lwl')?></td><td><?=format_float($vessel->lwl, 2, 'm')?></td></tr>
|
||||||
<tr><td><?=_('Beam')?></td><td><?=format_float($vessel->beam, 2, 'm')?></td></tr>
|
<tr><td><?=_('Beam')?></td><td><?=format_float($vessel->beam, 2, 'm')?></td></tr>
|
||||||
<tr><td><?=_('Draught')?></td><td><?=format_float($vessel->draught, 2, 'm')?></td></tr>
|
<tr><td><?=_('Draught')?></td><td><?=format_float($vessel->draught, 2, 'm')?></td></tr>
|
||||||
<tr><td><?=_('Draught, min.')?></td><td><?=format_float($vessel->draught_min, 2, 'm')?></td></tr>
|
<?php
|
||||||
|
if ($vessel->draught_min) {
|
||||||
|
echo '<tr><td>', _('Draught, min.'), '</td><td>';
|
||||||
|
format_float($vessel->draught_min, 2, 'm');
|
||||||
|
echo "</td></tr>\n";
|
||||||
|
}
|
||||||
|
?>
|
||||||
<tr><td><?=_('Displacement')?></td><td><?=$vessel->displacement?> kg</td></tr>
|
<tr><td><?=_('Displacement')?></td><td><?=$vessel->displacement?> kg</td></tr>
|
||||||
<tr><td><?=_('Ballast')?></td><td><?=$vessel->ballast?> kg</td></tr>
|
<tr><td><?=_('Ballast')?></td><td><?=$vessel->ballast?> kg</td></tr>
|
||||||
<tr><td><?=_('Belt position aft')?></td><td><?=format_float($vessel->beltpos_aft, 2, 'm')?></td></tr>
|
<tr><td><?=_('Belt position aft')?></td><td><?=format_float($vessel->beltpos_aft, 2, 'm')?></td></tr>
|
||||||
@@ -360,6 +375,8 @@ echo '<tr><td> </td><td>', _('Boxes'), '</td><td>', $sth->fetchColumn(), "<
|
|||||||
$sth = $pdo->prepare("SELECT COUNT(*), SUM(weight) FROM equipment WHERE vid=?");
|
$sth = $pdo->prepare("SELECT COUNT(*), SUM(weight) FROM equipment WHERE vid=?");
|
||||||
$sth->execute([$user->vid]);
|
$sth->execute([$user->vid]);
|
||||||
$row = $sth->fetch(PDO::FETCH_NUM);
|
$row = $sth->fetch(PDO::FETCH_NUM);
|
||||||
|
$weight_equip = $row[1];
|
||||||
|
|
||||||
echo '<tr><td colspan="3">', _('Equipment') , "</td>";
|
echo '<tr><td colspan="3">', _('Equipment') , "</td>";
|
||||||
echo '<tr><td> </td><td>', _('Count'), '</td><td>', $row[0], "</td></tr>\n";
|
echo '<tr><td> </td><td>', _('Count'), '</td><td>', $row[0], "</td></tr>\n";
|
||||||
echo '<tr><td> </td><td>', _('Weight'), '</td><td>', format_float($row[1], 1, 'kg'), "</td></tr>\n";
|
echo '<tr><td> </td><td>', _('Weight'), '</td><td>', format_float($row[1], 1, 'kg'), "</td></tr>\n";
|
||||||
@@ -375,16 +392,41 @@ $sth = $pdo->prepare($sql);
|
|||||||
$sth->bindValue(':vid', $user->vid, PDO::PARAM_INT);
|
$sth->bindValue(':vid', $user->vid, PDO::PARAM_INT);
|
||||||
$sth->execute();
|
$sth->execute();
|
||||||
$row = $sth->fetch(PDO::FETCH_NUM);
|
$row = $sth->fetch(PDO::FETCH_NUM);
|
||||||
|
$weight_inv = $row[1];
|
||||||
|
|
||||||
echo '<tr><td colspan="3">', _('Inventory') , "</td>";
|
echo '<tr><td colspan="3">', _('Inventory') , "</td>";
|
||||||
echo '<tr><td> </td><td>', _('Count'), '</td><td>', $row[0], "</td></tr>\n";
|
echo '<tr><td> </td><td>', _('Count'), '</td><td>', $row[0], "</td></tr>\n";
|
||||||
echo '<tr><td> </td><td>', _('Weight'), '</td><td>', format_float($row[1], 1, 'kg'), "</td></tr>\n";
|
echo '<tr><td> </td><td>', _('Weight'), '</td><td>', format_float($row[1], 1, 'kg'), "</td></tr>\n";
|
||||||
|
|
||||||
|
// Provisions
|
||||||
|
/*$sql = "SELECT SUM(n), SUM(w) FROM ("
|
||||||
|
. "SELECT COUNT(*) AS n, SUM(p.weight * p.number) as w FROM provisions AS p JOIN storage USING (sid) WHERE conttype='storage' AND vid=:vid "
|
||||||
|
. "UNION "
|
||||||
|
. "SELECT COUNT(*) AS n, SUM(p.weight * p.number) as w FROM provisions AS p JOIN box USING (boxid) JOIN storage ON (box.sid=storage.sid) WHERE conttype='box' AND vid=:vid"
|
||||||
|
. ") AS x"; */
|
||||||
|
|
||||||
|
// only storage assignment at the moment
|
||||||
|
$sql = "SELECT SUM(n), SUM(w) FROM ("
|
||||||
|
. "SELECT COUNT(*) AS n, SUM(p.weight * p.number) as w FROM provisions AS p JOIN storage USING (sid) WHERE storage.vid=:vid "
|
||||||
|
. ") AS x";
|
||||||
|
$sth = $pdo->prepare($sql);
|
||||||
|
$sth->bindValue(':vid', $user->vid, PDO::PARAM_INT);
|
||||||
|
$sth->execute();
|
||||||
|
$row = $sth->fetch(PDO::FETCH_NUM);
|
||||||
|
$weight_prov = $row[1];
|
||||||
|
|
||||||
|
echo '<tr><td colspan="3">', _('Provisions') , "</td>";
|
||||||
|
echo '<tr><td> </td><td>', _('Count'), '</td><td>', $row[0], "</td></tr>\n";
|
||||||
|
echo '<tr><td> </td><td>', _('Weight'), '</td><td>', format_float($row[1], 1, 'kg'), "</td></tr>\n";
|
||||||
|
|
||||||
// Documents
|
// Documents
|
||||||
$sth = $pdo->query("SELECT COUNT(*) FROM document");
|
$sth = $pdo->query("SELECT COUNT(*) FROM document");
|
||||||
echo '<tr><td colspan="3">', _('Documents') , "</td>";
|
echo '<tr><td colspan="3">', _('Documents') , "</td>";
|
||||||
echo '<tr><td> </td><td>', _('Count'), '</td><td>', $sth->fetchColumn(), "</td></tr>\n";
|
echo '<tr><td> </td><td>', _('Count'), '</td><td>', $sth->fetchColumn(), "</td></tr>\n";
|
||||||
|
|
||||||
|
$weight_total = $weight_equip + $weight_inv + $weight_prov;
|
||||||
|
echo '<tr><td colspan="2">', _('Total weight'), '</td>';
|
||||||
|
echo '<td>', format_float($weight_total, 1, 'kg'), "</td></tr>\n";
|
||||||
|
|
||||||
echo "</table>\n";
|
echo "</table>\n";
|
||||||
|
|
||||||
@@ -447,7 +489,7 @@ echo '<h2>', _('Add additional yacht'), "</h2>\n";
|
|||||||
</div>
|
</div>
|
||||||
<div class="mb-3">
|
<div class="mb-3">
|
||||||
<label for="remarks" class="form-label"><?=_('Remarks')?></label>
|
<label for="remarks" class="form-label"><?=_('Remarks')?></label>
|
||||||
<textarea class="form-control" id="remarks" name="remarks" rows="3"><?=$project->remarks ?></textarea>
|
<textarea class="form-control" id="remarks" name="remarks" rows="3"></textarea>
|
||||||
</div>
|
</div>
|
||||||
<div class="container-fluid px-0 my-3">
|
<div class="container-fluid px-0 my-3">
|
||||||
<button type="submit" name="submit[insert]" class="btn btn-primary"><?=_('Save')?></button>
|
<button type="submit" name="submit[insert]" class="btn btn-primary"><?=_('Save')?></button>
|
||||||
@@ -478,7 +520,7 @@ if (!file_exists($shapeindexfile)) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
$opt_shapefiles = $g_opt_none + $shapeindex;
|
$opt_shapefiles = $g_opt_none + ($shapeindex ?? []);
|
||||||
|
|
||||||
$opt_storage = db_get_opt_storage($user->vid);
|
$opt_storage = db_get_opt_storage($user->vid);
|
||||||
|
|
||||||
@@ -491,7 +533,7 @@ foreach ($sth->fetchAll(PDO::FETCH_NUM) as $row) {
|
|||||||
|
|
||||||
$sql = "SELECT vesselname, vtype, model, loa, lwl, beam, draught, draught_min,"
|
$sql = "SELECT vesselname, vtype, model, loa, lwl, beam, draught, draught_min,"
|
||||||
. " displacement, ballast, beltpos_aft, beltpos_bow, shapefile,"
|
. " displacement, ballast, beltpos_aft, beltpos_bow, shapefile,"
|
||||||
. " shipyard, sid_default, remarks "
|
. " shipyard, year_built, sid_default, remarks "
|
||||||
. "FROM vessel "
|
. "FROM vessel "
|
||||||
. "WHERE vid=?";
|
. "WHERE vid=?";
|
||||||
$sth = $pdo->prepare($sql);
|
$sth = $pdo->prepare($sql);
|
||||||
@@ -509,6 +551,10 @@ $vessel = $sth->fetch(PDO::FETCH_OBJ);
|
|||||||
<label for="model" class="form-label"><?=_('Model')?></label>
|
<label for="model" class="form-label"><?=_('Model')?></label>
|
||||||
<input type="text" class="form-control" id="model" name="model" value="<?=$vessel->model ?>">
|
<input type="text" class="form-control" id="model" name="model" value="<?=$vessel->model ?>">
|
||||||
</div>
|
</div>
|
||||||
|
<div class="mb-3">
|
||||||
|
<label for="year_built" class="form-label"><?=_('Year built')?></label>
|
||||||
|
<input type="number" class="form-control" id="year_built" name="year_built" value="<?=$vessel->year_built ?>">
|
||||||
|
</div>
|
||||||
<div class="mb-3">
|
<div class="mb-3">
|
||||||
<label for="loa" class="form-label"><?=_('LoA')?>, m</label>
|
<label for="loa" class="form-label"><?=_('LoA')?>, m</label>
|
||||||
<input type="text" class="form-control" id="loa" name="loa" value="<?=format_float($vessel->loa, 2) ?>">
|
<input type="text" class="form-control" id="loa" name="loa" value="<?=format_float($vessel->loa, 2) ?>">
|
||||||
@@ -557,7 +603,7 @@ form_create_select('sid', _('Default Storage'), $g_opt_none + $opt_storage, $ves
|
|||||||
?>
|
?>
|
||||||
<div class="mb-3">
|
<div class="mb-3">
|
||||||
<label for="remarks" class="form-label"><?=_('Remarks')?></label>
|
<label for="remarks" class="form-label"><?=_('Remarks')?></label>
|
||||||
<textarea class="form-control" id="remarks" name="remarks" rows="3"><?=$vessel->remarks ?></textarea>
|
<textarea class="form-control" id="remarks" name="remarks" rows="3"><?=h($vessel->remarks)?></textarea>
|
||||||
</div>
|
</div>
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
|
|||||||
+12
-4
@@ -7,6 +7,7 @@
|
|||||||
******************************************************************************/
|
******************************************************************************/
|
||||||
|
|
||||||
require 'globals.inc';
|
require 'globals.inc';
|
||||||
|
require 'lib/db.inc';
|
||||||
require 'lib/gpc.inc';
|
require 'lib/gpc.inc';
|
||||||
|
|
||||||
$pagetitle=_('Inventory');
|
$pagetitle=_('Inventory');
|
||||||
@@ -17,6 +18,7 @@ $opt_storage = db_get_opt_storage($user->vid);
|
|||||||
$opt_box = db_get_opt_box($user->vid);
|
$opt_box = db_get_opt_box($user->vid);
|
||||||
$opt_invcond = db_load_enum('inventory', 'invcond', true, true);
|
$opt_invcond = db_load_enum('inventory', 'invcond', true, true);
|
||||||
$opt_equipment = db_get_opt_equip($user->vid, [-1 => _('― none ―')]);
|
$opt_equipment = db_get_opt_equip($user->vid, [-1 => _('― none ―')]);
|
||||||
|
$opt_icat = db_get_options(13);
|
||||||
|
|
||||||
// ========== ACTIONS START ===================================================
|
// ========== ACTIONS START ===================================================
|
||||||
|
|
||||||
@@ -94,6 +96,8 @@ switch ($submit = form_get_action()) {
|
|||||||
$p[':price'] = gpc_get_currency($_POST, 'price');
|
$p[':price'] = gpc_get_currency($_POST, 'price');
|
||||||
$p[':purchdate'] = gpc_get_date($_POST, 'purchdate');
|
$p[':purchdate'] = gpc_get_date($_POST, 'purchdate');
|
||||||
$p[':invcond'] = gpc_get_string($_POST, 'invcond');
|
$p[':invcond'] = gpc_get_string($_POST, 'invcond');
|
||||||
|
$p[':icat'] = gpc_get_int($_POST, 'icat');
|
||||||
|
if ($p[':icat'] <= 0) $p[':icat'] = NULL;
|
||||||
$p[':remarks'] = gpc_get_string($_POST, 'remarks', 150);
|
$p[':remarks'] = gpc_get_string($_POST, 'remarks', 150);
|
||||||
$p[':eid'] = gpc_get_int($_POST, 'eid');
|
$p[':eid'] = gpc_get_int($_POST, 'eid');
|
||||||
if ($p[':eid'] <= 0) $p[':eid'] = NULL;
|
if ($p[':eid'] <= 0) $p[':eid'] = NULL;
|
||||||
@@ -342,7 +346,7 @@ elseif ($action == ACT_VIEW):
|
|||||||
// ========== VARIANT: view single record =====================================
|
// ========== VARIANT: view single record =====================================
|
||||||
|
|
||||||
$sql = "SELECT invname, conttype, sid, boxid, number, weight, price, purchdate,"
|
$sql = "SELECT invname, conttype, sid, boxid, number, weight, price, purchdate,"
|
||||||
. " invcond, remarks "
|
. " invcond, icat, remarks "
|
||||||
. "FROM inventory "
|
. "FROM inventory "
|
||||||
. "WHERE invid=?";
|
. "WHERE invid=?";
|
||||||
$sth = $pdo->prepare($sql);
|
$sth = $pdo->prepare($sql);
|
||||||
@@ -394,8 +398,9 @@ echo "<tr><th>", _('Location ID'), "</th><td>", $inventory->locationid, "</td></
|
|||||||
echo "<tr><th>", _('Number'), "</th><td>", $inventory->number, "</td></tr>\n";
|
echo "<tr><th>", _('Number'), "</th><td>", $inventory->number, "</td></tr>\n";
|
||||||
echo "<tr><th>", _('Weight'), "</th><td>", format_float($inventory->weight, 2, 'kg'), "</td></tr>\n";
|
echo "<tr><th>", _('Weight'), "</th><td>", format_float($inventory->weight, 2, 'kg'), "</td></tr>\n";
|
||||||
echo "<tr><th>", _('Price'), "</th><td>", format_currency($inventory->price), "</td></tr>\n";
|
echo "<tr><th>", _('Price'), "</th><td>", format_currency($inventory->price), "</td></tr>\n";
|
||||||
echo "<tr><th>", _('Purchase date'), "</th><td>", $inventory->purchdate, "</td></tr>\n";
|
echo "<tr><th>", _('Purchase date'), "</th><td>", format_date($inventory->purchdate), "</td></tr>\n";
|
||||||
echo "<tr><th>", _('Condition'), "</th><td>", $opt_invcond[$inventory->invcond], "</td></tr>\n";
|
echo "<tr><th>", _('Condition'), "</th><td>", $opt_invcond[$inventory->invcond], "</td></tr>\n";
|
||||||
|
echo "<tr><th>", _('Category'), "</th><td>", $opt_icat[$inventory->icat], "</td></tr>\n";
|
||||||
echo "<tr><th>", _('Remarks'), "</th><td>", h($inventory->remarks, br:true), "</td></tr>\n";
|
echo "<tr><th>", _('Remarks'), "</th><td>", h($inventory->remarks, br:true), "</td></tr>\n";
|
||||||
|
|
||||||
$tags = db_load_taglist('inv', $id);
|
$tags = db_load_taglist('inv', $id);
|
||||||
@@ -461,10 +466,13 @@ foreach ($cond as $k => $v) {
|
|||||||
?>
|
?>
|
||||||
</select>
|
</select>
|
||||||
</div>
|
</div>
|
||||||
<?php form_create_select('eid', _('Equipment'), $opt_equipment, $inventory->eid); ?>
|
<?php
|
||||||
|
form_create_select('icat', _('Category'), $g_opt_none + $opt_icat, $inventory->icat);
|
||||||
|
form_create_select('eid', _('Equipment'), $opt_equipment, $inventory->eid);
|
||||||
|
?>
|
||||||
<div class="mb-3">
|
<div class="mb-3">
|
||||||
<label for="remarks" class="form-label"><?=_('Remarks')?></label>
|
<label for="remarks" class="form-label"><?=_('Remarks')?></label>
|
||||||
<textarea class="form-control" id="remarks" name="remarks" rows="3"><?=h($inventory->remarks, br:true)?></textarea>
|
<textarea class="form-control" id="remarks" name="remarks" rows="3"><?=h($inventory->remarks)?></textarea>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<?php
|
<?php
|
||||||
|
|||||||
@@ -8,3 +8,77 @@
|
|||||||
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
function db_get_setting($sno, $userid, $autocreate=false, $default=NULL) {
|
||||||
|
global $pdo;
|
||||||
|
global $g_error;
|
||||||
|
global $g_warning;
|
||||||
|
$sql = "SELECT valint, valstr FROM settings WHERE userid=? AND sno=?";
|
||||||
|
$sth = $pdo->prepare($sql);
|
||||||
|
try {
|
||||||
|
$sth->execute([$userid, $sno]);
|
||||||
|
} catch (Exception $e) {
|
||||||
|
$g_error->Add('SQL-Error: '. $e->getMessage());
|
||||||
|
$g_error->Add($sql);
|
||||||
|
$g_error->Add("userid=$userid, sno=$sno", true);
|
||||||
|
return $default;
|
||||||
|
}
|
||||||
|
$row = $sth->fetch();
|
||||||
|
if ($row === false) {
|
||||||
|
if ($autocreate) {
|
||||||
|
// create empty settings record if it not exists
|
||||||
|
$p[':userid'] = $userid;
|
||||||
|
$p[':sno'] = $sno;
|
||||||
|
db_exec_insert('settings', $p);
|
||||||
|
$g_warning->Add("Added missing settings record with id=$sno");
|
||||||
|
}
|
||||||
|
return $default;
|
||||||
|
}
|
||||||
|
return $row;
|
||||||
|
}
|
||||||
|
|
||||||
|
function db_lock_acquire($table, $key, $userid) {
|
||||||
|
global $pdo;
|
||||||
|
$token = bin2hex(random_bytes(8));
|
||||||
|
// first try new lock
|
||||||
|
$sql = "INSERT INTO recordlock (lock_table, lock_key, token, userid) "
|
||||||
|
. "VALUES (?, ?, ?, ?)";
|
||||||
|
try {
|
||||||
|
$sth = $pdo->prepare($sql);
|
||||||
|
$sth->execute([$table, $key, $token, $userid]);
|
||||||
|
return $token;
|
||||||
|
} catch (PDOException $e) {
|
||||||
|
if ($e->errorInfo[1] != 1062) {
|
||||||
|
throw $e;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
// lazy locking: lock exists but is old, so we use it
|
||||||
|
$sql = "UPDATE recordlock "
|
||||||
|
. "SET token=?, userid=?, "
|
||||||
|
. "created_at=CURRENT_TIMESTAMP, last_seen=CURRENT_TIMESTAMP "
|
||||||
|
. "WHERE lock_table=? AND lock_key=? "
|
||||||
|
. "AND last_seen<CURRENT_TIMESTAMP-INTERVAL 5 MINUTE";
|
||||||
|
$sth = $pdo->prepare($sql);
|
||||||
|
$sth->execute([$token, $userid, $table, $key]);
|
||||||
|
if ($stmt->rowCount() === 1) {
|
||||||
|
return $token;
|
||||||
|
}
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
function db_lock_refresh($token) {
|
||||||
|
global $pdo;
|
||||||
|
$sql = "UPDATE recordlock "
|
||||||
|
. "SET last_seen=CURRENT_TIMESTAMP "
|
||||||
|
. "WHERE token=?";
|
||||||
|
$sth = $pdo->prepare($sql);
|
||||||
|
$sth->execute([$token]);
|
||||||
|
return $sth->rowCount() === 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
function db_lock_release($token) {
|
||||||
|
global $pdo;
|
||||||
|
$sql = "DELETE FROM recordlock WHERE token=?";
|
||||||
|
$sth = $pdo->prepare($sql);
|
||||||
|
$sth->execute([$token]);
|
||||||
|
return $sth->rowCount() === 1;
|
||||||
|
}
|
||||||
|
|||||||
@@ -43,3 +43,73 @@ function dir_get_size($path) {
|
|||||||
}
|
}
|
||||||
return $total;
|
return $total;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function image_scale($imagefile, $mimetype, $width, $height, $factor) {
|
||||||
|
// scales down image in place
|
||||||
|
// returns size in bytes for new scaled image or -1 in case of error
|
||||||
|
global $g_message, $g_error;
|
||||||
|
|
||||||
|
if ($factor <= 0 || $factor >= 1) {
|
||||||
|
$g_error->Add("Internal error: Invalid image scale factor");
|
||||||
|
return -1;
|
||||||
|
}
|
||||||
|
$width = (int)($width * $factor);
|
||||||
|
$height = (int)($height * $factor);
|
||||||
|
if ($width < 1 || $height < 1) {
|
||||||
|
$g_error->Add("Internal error: Scaled image dimensions are too small");
|
||||||
|
return -1;
|
||||||
|
}
|
||||||
|
if ($mimetype == 'image/jpeg') {
|
||||||
|
$orig = imagecreatefromjpeg($imagefile);
|
||||||
|
if ($orig === false) {
|
||||||
|
$g_error->Add("Internal error: imagecreatefromjpeg failed");
|
||||||
|
return -1;
|
||||||
|
}
|
||||||
|
$scaled = imagescale($orig, $width, $height, IMG_BICUBIC); // TODO IMG_BICUBIC_FIXED?
|
||||||
|
if ($scaled === false) {
|
||||||
|
imagedestroy($orig);
|
||||||
|
$g_error->Add("Internal error: jpeg imagescale failed");
|
||||||
|
return -1;
|
||||||
|
}
|
||||||
|
if (!imagejpeg($scaled, $imagefile, 85)) {
|
||||||
|
imagedestroy($scaled);
|
||||||
|
imagedestroy($orig);
|
||||||
|
$g_error->Add("Internal error: imagejpeg failed");
|
||||||
|
return -1;
|
||||||
|
}
|
||||||
|
} else if ($mimetype == 'image/png') {
|
||||||
|
$orig = imagecreatefrompng($imagefile);
|
||||||
|
if ($orig === false) {
|
||||||
|
$g_error->Add("Internal error: imagecreatefrompng failed");
|
||||||
|
return -1;
|
||||||
|
}
|
||||||
|
$scaled = imagescale($orig, $width, $height, IMG_BICUBIC);
|
||||||
|
if ($scaled === false) {
|
||||||
|
imagedestroy($orig);
|
||||||
|
$g_error->Add("Internal error: png imagescale failed");
|
||||||
|
return -1;
|
||||||
|
}
|
||||||
|
// Preserve PNG transparency
|
||||||
|
imagealphablending($scaled, false);
|
||||||
|
imagesavealpha($scaled, true);
|
||||||
|
if (!imagepng($scaled, $imagefile, 9)) {
|
||||||
|
imagedestroy($scaled);
|
||||||
|
imagedestroy($orig);
|
||||||
|
$g_error->Add("Internal error: imagepng failed");
|
||||||
|
return -1;
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
$g_error->Add(sprintf(_('Internal error: Unknown mimetype %s!'), $mimetype));
|
||||||
|
return -1;
|
||||||
|
}
|
||||||
|
$g_message->add(sprintf(_('Image scaled down to %dx%d'), $width, $height));
|
||||||
|
imagedestroy($scaled);
|
||||||
|
imagedestroy($orig);
|
||||||
|
clearstatcache(true, $imagefile);
|
||||||
|
$size = filesize($imagefile);
|
||||||
|
if ($size === false) {
|
||||||
|
$g_error->Add("Internal error: filesize failed");
|
||||||
|
return -1;
|
||||||
|
}
|
||||||
|
return $size;
|
||||||
|
}
|
||||||
|
|||||||
+45
-12
@@ -13,7 +13,7 @@
|
|||||||
function gpc_get_string(&$GPC, $varname, $maxlen = NULL, $default = NULL) {
|
function gpc_get_string(&$GPC, $varname, $maxlen = NULL, $default = NULL) {
|
||||||
// TODO Parameter nullval: single value or array of values which considered as null
|
// TODO Parameter nullval: single value or array of values which considered as null
|
||||||
// Default value for nullval is "-1"
|
// Default value for nullval is "-1"
|
||||||
if (!isset($GPC[$varname]) or (strlen(trim($GPC[$varname])) == 0)) {
|
if (!isset($GPC[$varname]) || (strlen(trim($GPC[$varname])) == 0)) {
|
||||||
return $default;
|
return $default;
|
||||||
}
|
}
|
||||||
$s = trim($GPC[$varname]);
|
$s = trim($GPC[$varname]);
|
||||||
@@ -24,14 +24,14 @@ function gpc_get_string(&$GPC, $varname, $maxlen = NULL, $default = NULL) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function gpc_get_int(&$GPC, $varname, $default = NULL) {
|
function gpc_get_int(&$GPC, $varname, $default = NULL) {
|
||||||
if (!isset($GPC[$varname])) {
|
if (!isset($GPC[$varname]) || $GPC[$varname] === '') {
|
||||||
return $default;
|
return $default;
|
||||||
}
|
}
|
||||||
return (int)$GPC[$varname];
|
return (int)$GPC[$varname];
|
||||||
}
|
}
|
||||||
|
|
||||||
function gpc_get_uint(&$GPC, $varname, $default = NULL) {
|
function gpc_get_uint(&$GPC, $varname, $default = NULL) {
|
||||||
if (!isset($GPC[$varname])) {
|
if (!isset($GPC[$varname]) || $GPC[$varname] === '') {
|
||||||
return $default;
|
return $default;
|
||||||
}
|
}
|
||||||
$val = (int)$GPC[$varname];
|
$val = (int)$GPC[$varname];
|
||||||
@@ -43,7 +43,7 @@ function gpc_get_uint(&$GPC, $varname, $default = NULL) {
|
|||||||
|
|
||||||
function gpc_get_float(&$GPC, $varname, $default = NULL) {
|
function gpc_get_float(&$GPC, $varname, $default = NULL) {
|
||||||
global $g_lconv;
|
global $g_lconv;
|
||||||
if (!isset($GPC[$varname]) or (strlen(trim($GPC[$varname])) == 0)) {
|
if (!isset($GPC[$varname]) || (strlen(trim($GPC[$varname])) == 0)) {
|
||||||
return $default;
|
return $default;
|
||||||
}
|
}
|
||||||
$var = str_replace($g_lconv['thousands_sep'], '', $GPC[$varname]);
|
$var = str_replace($g_lconv['thousands_sep'], '', $GPC[$varname]);
|
||||||
@@ -55,7 +55,7 @@ function gpc_get_float(&$GPC, $varname, $default = NULL) {
|
|||||||
|
|
||||||
function gpc_get_currency(&$GPC, $varname, $default = NULL) {
|
function gpc_get_currency(&$GPC, $varname, $default = NULL) {
|
||||||
global $g_lconv;
|
global $g_lconv;
|
||||||
if (!isset($GPC[$varname]) or (strlen(trim($GPC[$varname])) == 0)) {
|
if (!isset($GPC[$varname]) || (strlen(trim($GPC[$varname])) == 0)) {
|
||||||
return $default;
|
return $default;
|
||||||
}
|
}
|
||||||
$var = str_replace($g_lconv['thousands_sep'], '', $GPC[$varname]);
|
$var = str_replace($g_lconv['thousands_sep'], '', $GPC[$varname]);
|
||||||
@@ -83,11 +83,44 @@ function gpc_get_bool(&$GPC, $varname, $default = FALSE) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function gpc_get_date(&$GPC, $varname, $default = NULL) {
|
function gpc_get_date(&$GPC, $varname, $default = NULL) {
|
||||||
// TODO improve
|
global $g_opt_datefmt;
|
||||||
if (!isset($GPC[$varname]) || $GPC[$varname] == '') {
|
if (!isset($GPC[$varname]) || !is_scalar($GPC[$varname])) {
|
||||||
return $default;
|
return $default;
|
||||||
}
|
}
|
||||||
return $GPC[$varname];
|
$value = trim((string)$GPC[$varname]);
|
||||||
|
if ($value === '') {
|
||||||
|
return $default;
|
||||||
|
}
|
||||||
|
foreach (array_keys($g_opt_datefmt) as $format) {
|
||||||
|
if (preg_match_all('/[Ymd]/', $format, $tokens) !== 3) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
$regex = preg_quote($format, '/');
|
||||||
|
$regex = str_replace('d', '(\d{2})', $regex);
|
||||||
|
$regex = str_replace('m', '(\d{2})', $regex);
|
||||||
|
$regex = str_replace('Y', '(\d{4})', $regex);
|
||||||
|
if (!preg_match('/^' . $regex . '$/', $value, $matches)) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
$year = $month = $day = NULL;
|
||||||
|
foreach ($tokens[0] as $i => $token) {
|
||||||
|
switch ($token) {
|
||||||
|
case 'Y':
|
||||||
|
$year = (int)$matches[$i + 1];
|
||||||
|
break;
|
||||||
|
case 'm':
|
||||||
|
$month = (int)$matches[$i + 1];
|
||||||
|
break;
|
||||||
|
case 'd':
|
||||||
|
$day = (int)$matches[$i + 1];
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (checkdate($month, $day, $year)) {
|
||||||
|
return sprintf('%04d-%02d-%02d', $year, $month, $day);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return $default;
|
||||||
}
|
}
|
||||||
|
|
||||||
function gpc_get_datetime(&$GPC, $varname, $default = NULL) {
|
function gpc_get_datetime(&$GPC, $varname, $default = NULL) {
|
||||||
@@ -99,21 +132,21 @@ function gpc_get_datetime(&$GPC, $varname, $default = NULL) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function gpc_get_color(&$GPC, $varname, $default = NULL) {
|
function gpc_get_color(&$GPC, $varname, $default = NULL) {
|
||||||
if (!isset($GPC[$varname]) or (strlen(trim($GPC[$varname])) == 0)) {
|
if (!isset($GPC[$varname]) || (strlen(trim($GPC[$varname])) == 0)) {
|
||||||
return $default;
|
return $default;
|
||||||
}
|
}
|
||||||
$color = $GPC[$varname];
|
$color = $GPC[$varname];
|
||||||
if ((strlen($color) == 7) and (substr($color, 0, 1) == '#')) {
|
if ((strlen($color) == 7) && (substr($color, 0, 1) == '#')) {
|
||||||
$color = substr($color, 1);
|
$color = substr($color, 1);
|
||||||
}
|
}
|
||||||
if ((strlen($color) != 6) or (! ctype_xdigit($color))) {
|
if ((strlen($color) != 6) || (! ctype_xdigit($color))) {
|
||||||
return $default;
|
return $default;
|
||||||
}
|
}
|
||||||
return strtoupper($color);
|
return strtoupper($color);
|
||||||
}
|
}
|
||||||
|
|
||||||
function gpc_get_enum(&$GPC, $varname, $values, $default = NULL) {
|
function gpc_get_enum(&$GPC, $varname, $values, $default = NULL) {
|
||||||
if (!isset($GPC[$varname]) or (strlen(trim($GPC[$varname])) == 0)) {
|
if (!isset($GPC[$varname]) || (strlen(trim($GPC[$varname])) == 0)) {
|
||||||
return $default;
|
return $default;
|
||||||
}
|
}
|
||||||
if (! in_array($GPC[$varname], $values)) {
|
if (! in_array($GPC[$varname], $values)) {
|
||||||
|
|||||||
@@ -0,0 +1,31 @@
|
|||||||
|
<?php
|
||||||
|
/******************************************************************************
|
||||||
|
* YMS - Yacht Management Software
|
||||||
|
* Copyright (C) 2024-2026 Thomas Hooge
|
||||||
|
*
|
||||||
|
* SPDX-License-Identifier: WTFPL
|
||||||
|
******************************************************************************
|
||||||
|
|
||||||
|
*/
|
||||||
|
|
||||||
|
function signalk_get($server, $skpath) {
|
||||||
|
|
||||||
|
$url = "$server/signalk/v1/api/" . str_replace('.', '/', $skpath);
|
||||||
|
var_dump($url);
|
||||||
|
$ch = curl_init($url);
|
||||||
|
curl_setopt_array($ch, [
|
||||||
|
CURLOPT_RETURNTRANSFER => true,
|
||||||
|
CURLOPT_CONNECTTIMEOUT => 3,
|
||||||
|
CURLOPT_TIMEOUT => 5,
|
||||||
|
]);
|
||||||
|
$json = curl_exec($ch);
|
||||||
|
if ($json === false) {
|
||||||
|
throw new RuntimeException('Signal K error: ' . curl_error($ch));
|
||||||
|
}
|
||||||
|
$httpCode = curl_getinfo($ch, CURLINFO_HTTP_CODE);
|
||||||
|
curl_close($ch);
|
||||||
|
if ($httpCode !== 200) {
|
||||||
|
throw new RuntimeException('Signal K HTTP-error: ' . $httpCode);
|
||||||
|
}
|
||||||
|
return json_decode($json, true, 512, JSON_THROW_ON_ERROR);
|
||||||
|
}
|
||||||
@@ -13,6 +13,7 @@
|
|||||||
function create_shapeindex($shapeindexfile) {
|
function create_shapeindex($shapeindexfile) {
|
||||||
// an existing index file will be overwritten
|
// an existing index file will be overwritten
|
||||||
global $g_shapedir;
|
global $g_shapedir;
|
||||||
|
$shapeindex = array();
|
||||||
foreach (glob($g_shapedir.'/*.svg') as $f) {
|
foreach (glob($g_shapedir.'/*.svg') as $f) {
|
||||||
$fh = fopen($f, 'r');
|
$fh = fopen($f, 'r');
|
||||||
$fname = basename($f);
|
$fname = basename($f);
|
||||||
|
|||||||
+5
-5
@@ -71,13 +71,13 @@ if (isset($err)) {
|
|||||||
?>
|
?>
|
||||||
<button type="submit" class="btn btn-primary" title="<?php printf(_('Logon to %s'), APP_TITLE_SHORT); ?>" name="login" value="1">
|
<button type="submit" class="btn btn-primary" title="<?php printf(_('Logon to %s'), APP_TITLE_SHORT); ?>" name="login" value="1">
|
||||||
<span class="bi bi-caret-right"></span>
|
<span class="bi bi-caret-right"></span>
|
||||||
<?=_('Login')?>
|
<?=_('Login'), "\n"?>
|
||||||
</button>
|
</button>
|
||||||
</form>
|
</form>
|
||||||
</div> <?php /* card body */?>
|
</div><?="\n" /* card body */ ?>
|
||||||
</div> <?php /* columns */?>
|
</div><?="\n" /* columns */ ?>
|
||||||
</div> <?php /* rows */?>
|
</div><?="\n" /* rows */ ?>
|
||||||
</div> <?phph /* card */?>
|
</div><?="\n" /* card */ ?>
|
||||||
</section>
|
</section>
|
||||||
</div>
|
</div>
|
||||||
</body>
|
</body>
|
||||||
|
|||||||
+31
-5
@@ -7,6 +7,7 @@
|
|||||||
******************************************************************************/
|
******************************************************************************/
|
||||||
|
|
||||||
require 'globals.inc';
|
require 'globals.inc';
|
||||||
|
require 'lib/db.inc';
|
||||||
require 'lib/gpc.inc';
|
require 'lib/gpc.inc';
|
||||||
|
|
||||||
$pagetitle = _('Maintenance');
|
$pagetitle = _('Maintenance');
|
||||||
@@ -54,6 +55,8 @@ switch ($submit = form_get_action()) {
|
|||||||
$p[':activities'] = gpc_get_string($_POST, 'activities', 80);
|
$p[':activities'] = gpc_get_string($_POST, 'activities', 80);
|
||||||
$p[':remarks'] = gpc_get_string($_POST, 'remarks', 150);
|
$p[':remarks'] = gpc_get_string($_POST, 'remarks', 150);
|
||||||
$p[':series'] = gpc_get_int($_POST, 'series');
|
$p[':series'] = gpc_get_int($_POST, 'series');
|
||||||
|
$p[':plan_date'] = gpc_get_date($_POST, 'plan_date');
|
||||||
|
$p[':completion_date'] = gpc_get_date($_POST, 'completion_date');
|
||||||
$p[':maintstate'] = gpc_get_string($_POST, 'maintstate');
|
$p[':maintstate'] = gpc_get_string($_POST, 'maintstate');
|
||||||
db_exec_update('maintenance', $p, 'maintid');
|
db_exec_update('maintenance', $p, 'maintid');
|
||||||
$action = ACT_VIEW;
|
$action = ACT_VIEW;
|
||||||
@@ -246,7 +249,8 @@ elseif ($action == ACT_VIEW):
|
|||||||
echo '<h2>', _('View Maintenance'), "</h2>\n";
|
echo '<h2>', _('View Maintenance'), "</h2>\n";
|
||||||
|
|
||||||
// load maintenance record
|
// load maintenance record
|
||||||
$sql = "SELECT m.activities, m.eid, m.remarks, m.series, m.maintstate, e.ename "
|
$sql = "SELECT m.activities, m.eid, m.remarks, m.series, m.maintstate, e.ename, "
|
||||||
|
. "m.plan_date, m.completion_date, m.interval_hours, m.last_hours "
|
||||||
. "FROM maintenance AS m LEFT OUTER JOIN equipment AS e USING (eid) "
|
. "FROM maintenance AS m LEFT OUTER JOIN equipment AS e USING (eid) "
|
||||||
. "WHERE m.maintid=?";
|
. "WHERE m.maintid=?";
|
||||||
$sth = $pdo->prepare($sql);
|
$sth = $pdo->prepare($sql);
|
||||||
@@ -281,6 +285,10 @@ if (isset($maint->eid) and $maint->eid>0) {
|
|||||||
echo "</td></tr>\n";
|
echo "</td></tr>\n";
|
||||||
echo '<tr><th>', _('Remarks'),"</th><td>", h($maint->remarks), "</td></tr>\n";
|
echo '<tr><th>', _('Remarks'),"</th><td>", h($maint->remarks), "</td></tr>\n";
|
||||||
echo '<tr><th>', _('Series'),"</th><td>", $maint->series, "</td></tr>\n";
|
echo '<tr><th>', _('Series'),"</th><td>", $maint->series, "</td></tr>\n";
|
||||||
|
echo '<tr><th>', _('Interval'),"</th><td>", $maint->interval_hours, " h</td></tr>\n";
|
||||||
|
echo '<tr><th>', _('Last'),"</th><td>", $maint->last_hours, "</td></tr>\n";
|
||||||
|
echo '<tr><th>', _('Plan date'),"</th><td>", format_date($maint->plan_date), "</td></tr>\n";
|
||||||
|
echo '<tr><th>', _('Completion date'),"</th><td>", format_date($maint->completion_date), "</td></tr>\n";
|
||||||
echo '<tr><th scope="row">', _('State'),"</th><td>", get_enum($maint->maintstate), "</td></tr>\n";
|
echo '<tr><th scope="row">', _('State'),"</th><td>", get_enum($maint->maintstate), "</td></tr>\n";
|
||||||
echo "</table>\n";
|
echo "</table>\n";
|
||||||
|
|
||||||
@@ -288,11 +296,13 @@ echo '</div>'; // Column break
|
|||||||
echo '<div class="col">';
|
echo '<div class="col">';
|
||||||
|
|
||||||
// TODO Show documents for equipment
|
// TODO Show documents for equipment
|
||||||
echo "<h4>Documents</h4>\n";
|
echo '<h4>Documents for ', h($maint->ename), "</h4>\n";
|
||||||
if (isset($docs)) {
|
if (isset($docs)) {
|
||||||
echo '<ul>', "\n";
|
echo '<ul>', "\n";
|
||||||
foreach ($docs as $d) {
|
foreach ($docs as $d) {
|
||||||
echo '<li>', $d['title'] ?? $d['filename'], ' (', $d['docid'], ")</li>\n";
|
echo '<li>', $d['title'] ?? $d['filename'], ' (', $d['docid'], ')';
|
||||||
|
echo ' <a href="documents.php?f=view&id=', $d['docid'], '"><i class="bi-eye"></i></a>';
|
||||||
|
echo "</li>\n";
|
||||||
}
|
}
|
||||||
echo "</ul>\n";
|
echo "</ul>\n";
|
||||||
} else {
|
} else {
|
||||||
@@ -331,7 +341,7 @@ echo "</div>\n";
|
|||||||
elseif ($action == ACT_EDIT):
|
elseif ($action == ACT_EDIT):
|
||||||
// ========== VARIANT: edit single record =====================================
|
// ========== VARIANT: edit single record =====================================
|
||||||
|
|
||||||
$sql = "SELECT activities, eid, remarks, series, maintstate "
|
$sql = "SELECT activities, eid, remarks, series, plan_date, completion_date, maintstate "
|
||||||
. "FROM maintenance "
|
. "FROM maintenance "
|
||||||
. "WHERE maintid=?";
|
. "WHERE maintid=?";
|
||||||
$sth = $pdo->prepare($sql);
|
$sth = $pdo->prepare($sql);
|
||||||
@@ -350,12 +360,28 @@ echo '<h2>', _('Edit Maintenance'), "</h2>\n";
|
|||||||
<?php form_create_select('eid', _('Equipment'), $opt_equipment, $maint->eid); ?>
|
<?php form_create_select('eid', _('Equipment'), $opt_equipment, $maint->eid); ?>
|
||||||
<div class="mb-3">
|
<div class="mb-3">
|
||||||
<label for="remarks" class="form-label"><?=_('Remarks')?></label>
|
<label for="remarks" class="form-label"><?=_('Remarks')?></label>
|
||||||
<textarea class="form-control" id="remarks" name="remarks" rows="3"><?=h($maint->remarks, br:true)?></textarea>
|
<textarea class="form-control" id="remarks" name="remarks" rows="3"><?=h($maint->remarks)?></textarea>
|
||||||
</div>
|
</div>
|
||||||
<div class="mb-3">
|
<div class="mb-3">
|
||||||
<label for="series" class="form-label"><?=_('Series')?></label>
|
<label for="series" class="form-label"><?=_('Series')?></label>
|
||||||
<input type="text" class="form-control" id="series" name="series" maxlength="4" value="<?=$maint->series ?>">
|
<input type="text" class="form-control" id="series" name="series" maxlength="4" value="<?=$maint->series ?>">
|
||||||
</div>
|
</div>
|
||||||
|
<div class="mb-3">
|
||||||
|
<label for="interval_hours" class="form-label"><?=_('Interval hours')?></label>
|
||||||
|
<input type="number" class="form-control" id="interval_hours" name="interval_hours" inputmode="numeric" maxlength="6" value="<?=$maint->interval_hours ?>">
|
||||||
|
</div>
|
||||||
|
<div class="mb-3">
|
||||||
|
<label for="last_hours" class="form-label"><?=_('Last hours')?></label>
|
||||||
|
<input type="number" class="form-control" id="last_hours" name="last_hours" inputmode="numeric" maxlength="6" value="<?=$maint->last_hours ?>">
|
||||||
|
</div>
|
||||||
|
<div class="mb-3">
|
||||||
|
<label for="plan_date"><?=_('Plan date')?></label>
|
||||||
|
<input type="date" class="form-control" id="plan_date" name="plan_date" value="<?=$maint->plan_date ?>">
|
||||||
|
</div>
|
||||||
|
<div class="mb-3">
|
||||||
|
<label for="completion_date"><?=_('Completion date')?></label>
|
||||||
|
<input type="date" class="form-control" id="completion_date" name="completion_date" value="<?=$maint->completion_date ?>">
|
||||||
|
</div>
|
||||||
<?php
|
<?php
|
||||||
form_create_select('maintstate', _('Status'), $opt_state, $maint->maintstate);
|
form_create_select('maintstate', _('Status'), $opt_state, $maint->maintstate);
|
||||||
|
|
||||||
|
|||||||
@@ -7,6 +7,7 @@
|
|||||||
******************************************************************************/
|
******************************************************************************/
|
||||||
|
|
||||||
require 'globals.inc';
|
require 'globals.inc';
|
||||||
|
require 'lib/db.inc';
|
||||||
require 'lib/gpc.inc';
|
require 'lib/gpc.inc';
|
||||||
|
|
||||||
// TODO move to somewhere else
|
// TODO move to somewhere else
|
||||||
@@ -307,7 +308,7 @@ echo '<tr><th>', _('Value 1'), '</th><td>', $measurement->val1, "</td></tr>\n";
|
|||||||
echo '<tr><th>', _('Value 2'), '</th><td>', $measurement->val2, "</td></tr>\n";
|
echo '<tr><th>', _('Value 2'), '</th><td>', $measurement->val2, "</td></tr>\n";
|
||||||
echo '<tr><th>', _('Value 3'), '</th><td>', $measurement->val3, "</td></tr>\n";
|
echo '<tr><th>', _('Value 3'), '</th><td>', $measurement->val3, "</td></tr>\n";
|
||||||
echo '<tr><th>', _('Accuracy'), '</th><td>', get_enum($measurement->accuracy), "</td></tr>\n";
|
echo '<tr><th>', _('Accuracy'), '</th><td>', get_enum($measurement->accuracy), "</td></tr>\n";
|
||||||
echo '<tr><th>', _('Date'), '</th><td>', $measurement->mdate, "</td></tr>\n";
|
echo '<tr><th>', _('Date'), '</th><td>', format_date($measurement->mdate), "</td></tr>\n";
|
||||||
echo '<tr><th>', _('Note'), '</th><td>', h($measurement->note), "</td></tr>\n";
|
echo '<tr><th>', _('Note'), '</th><td>', h($measurement->note), "</td></tr>\n";
|
||||||
echo '<tr><th>', _('Equipment'), '</th><td>', $opt_equipment[$measurement->eid], "</td></tr>\n";
|
echo '<tr><th>', _('Equipment'), '</th><td>', $opt_equipment[$measurement->eid], "</td></tr>\n";
|
||||||
echo "</table>\n";
|
echo "</table>\n";
|
||||||
|
|||||||
+8
-3
@@ -7,6 +7,7 @@
|
|||||||
******************************************************************************/
|
******************************************************************************/
|
||||||
|
|
||||||
require 'globals.inc';
|
require 'globals.inc';
|
||||||
|
require 'lib/db.inc';
|
||||||
require 'lib/gpc.inc';
|
require 'lib/gpc.inc';
|
||||||
|
|
||||||
$pagetitle = _('Note');
|
$pagetitle = _('Note');
|
||||||
@@ -30,6 +31,7 @@ switch ($submit = form_get_action()) {
|
|||||||
$p[':notetype'] = gpc_get_enum($_POST, 'notetype', $opt_notetype, 'task');
|
$p[':notetype'] = gpc_get_enum($_POST, 'notetype', $opt_notetype, 'task');
|
||||||
$p[':refid'] = gpc_get_int($_POST, 'refid');
|
$p[':refid'] = gpc_get_int($_POST, 'refid');
|
||||||
$p[':annotation'] = gpc_get_string($_POST, 'annotation');
|
$p[':annotation'] = gpc_get_string($_POST, 'annotation');
|
||||||
|
$p[':created_by'] = $user->id;
|
||||||
$id = db_exec_insert('note', $p);
|
$id = db_exec_insert('note', $p);
|
||||||
$caller = gpc_get_string($_POST, 'caller');
|
$caller = gpc_get_string($_POST, 'caller');
|
||||||
$callid = $p[':refid'];
|
$callid = $p[':refid'];
|
||||||
@@ -171,7 +173,9 @@ elseif ($action == ACT_VIEW):
|
|||||||
|
|
||||||
echo '<h2>', _('View Note'), "</h2>\n";
|
echo '<h2>', _('View Note'), "</h2>\n";
|
||||||
|
|
||||||
$sql = "SELECT refid, notetype, annotation FROM note WHERE noteid=?";
|
$sql = "SELECT n.refid, n.notetype, n.annotation, n.created_at, u.displayname "
|
||||||
|
. "FROM note AS n LEFT OUTER JOIN user AS u ON (n.created_by=u.userid) "
|
||||||
|
. "WHERE noteid=?";
|
||||||
$sth = $pdo->prepare($sql);
|
$sth = $pdo->prepare($sql);
|
||||||
$sth->execute([$id]);
|
$sth->execute([$id]);
|
||||||
$note = $sth->fetch(PDO::FETCH_OBJ);
|
$note = $sth->fetch(PDO::FETCH_OBJ);
|
||||||
@@ -184,9 +188,10 @@ echo '<table class="table">', "\n";
|
|||||||
echo '<tr><th>', _('Reference'),"</th><td>", $note->refid, "</td></tr>\n";
|
echo '<tr><th>', _('Reference'),"</th><td>", $note->refid, "</td></tr>\n";
|
||||||
echo '<tr><th>', _('Type'),"</th><td>", $note->notetype, "</td></tr>\n";
|
echo '<tr><th>', _('Type'),"</th><td>", $note->notetype, "</td></tr>\n";
|
||||||
echo '<tr><th>', _('Annotation'),"</th><td>", nl2br($note->annotation), "</td></tr>\n";
|
echo '<tr><th>', _('Annotation'),"</th><td>", nl2br($note->annotation), "</td></tr>\n";
|
||||||
|
echo '<tr><th>', _('Created at'),"</th><td>", format_datetime($note->created_at), "</td></tr>\n";
|
||||||
|
echo '<tr><th>', _('Created by'),"</th><td>", h($note->displayname), "</td></tr>\n";
|
||||||
echo "</table>\n";
|
echo "</table>\n";
|
||||||
|
|
||||||
|
|
||||||
$link = $note->notetype == 'task' ? 'task.php' : 'maintenance.php';
|
$link = $note->notetype == 'task' ? 'task.php' : 'maintenance.php';
|
||||||
// echo '<p><a href="', $link, '?f=view&id=', $note->refid, '">', _('Parent'), "</a></p>\n";
|
// echo '<p><a href="', $link, '?f=view&id=', $note->refid, '">', _('Parent'), "</a></p>\n";
|
||||||
form_view_buttons($g_scriptname, $id, $link.'?f=view&id='.$note->refid);
|
form_view_buttons($g_scriptname, $id, $link.'?f=view&id='.$note->refid);
|
||||||
@@ -205,7 +210,7 @@ echo '<h2>', _('Edit Note'), "</h2>\n";
|
|||||||
<input type="hidden" name="id" value="<?=$id?>">
|
<input type="hidden" name="id" value="<?=$id?>">
|
||||||
<div class="mb-3">
|
<div class="mb-3">
|
||||||
<label for="annotation" class="form-label"><?=_('Annotation')?></label>
|
<label for="annotation" class="form-label"><?=_('Annotation')?></label>
|
||||||
<textarea class="form-control" id="annotation" name="annotation" rows="5" autofocus><?=$note->annotation;?></textarea>
|
<textarea class="form-control" id="annotation" name="annotation" rows="5" autofocus><?=h($note->annotation);?></textarea>
|
||||||
</div>
|
</div>
|
||||||
<?php
|
<?php
|
||||||
form_edit_buttons($g_scriptname, $id);
|
form_edit_buttons($g_scriptname, $id);
|
||||||
|
|||||||
+8
-7
@@ -7,6 +7,7 @@
|
|||||||
******************************************************************************/
|
******************************************************************************/
|
||||||
|
|
||||||
require 'globals.inc';
|
require 'globals.inc';
|
||||||
|
require 'lib/db.inc';
|
||||||
require 'lib/gpc.inc';
|
require 'lib/gpc.inc';
|
||||||
|
|
||||||
$pagetitle = _('Projects');
|
$pagetitle = _('Projects');
|
||||||
@@ -209,13 +210,13 @@ foreach ($res as $row) {
|
|||||||
echo '<td>', $i;
|
echo '<td>', $i;
|
||||||
echo '<a class="text-nowrap" title="', _('View'), '" href="', $g_scriptname, '?f=view&id=', $row['projid'], '"><i class="bi bi-eye ms-2"></i></a>', "\n";
|
echo '<a class="text-nowrap" title="', _('View'), '" href="', $g_scriptname, '?f=view&id=', $row['projid'], '"><i class="bi bi-eye ms-2"></i></a>', "\n";
|
||||||
echo "</td>\n";
|
echo "</td>\n";
|
||||||
echo "<td>". $row['projname'] ."</td>\n";
|
echo '<td>', $row['projname'], "</td>\n";
|
||||||
echo "<td>". $row['startdate'] ."</td>\n";
|
echo '<td>', format_date($row['startdate']), "</td>\n";
|
||||||
echo "<td>". $row['duration'] ."</td>\n";
|
echo '<td>', $row['duration'], "</td>\n";
|
||||||
echo "<td>". get_enum($row['projstate']) ."</td>\n";
|
echo '<td>', get_enum($row['projstate']), "</td>\n";
|
||||||
echo "<td>". $row['remarks'] ."</td>\n";
|
echo '<td>', h($row['remarks']), "</td>\n";
|
||||||
// Edit current record button
|
// Edit current record button
|
||||||
echo "<td>";
|
echo '<td>';
|
||||||
echo '<a title="', _('Edit'), '" href="', $g_scriptname, '?f=edit&id=', $row['projid'], '"><i class="bi-pencil"></i></a>', "\n";
|
echo '<a title="', _('Edit'), '" href="', $g_scriptname, '?f=edit&id=', $row['projid'], '"><i class="bi-pencil"></i></a>', "\n";
|
||||||
echo "</td>\n";
|
echo "</td>\n";
|
||||||
|
|
||||||
@@ -401,7 +402,7 @@ form_create_select('projstate', _('Status'), $opt_state, $project->projstate);
|
|||||||
?>
|
?>
|
||||||
<div class="mb-3">
|
<div class="mb-3">
|
||||||
<label for="remarks" class="form-label"><?=_('Remarks')?></label>
|
<label for="remarks" class="form-label"><?=_('Remarks')?></label>
|
||||||
<textarea class="form-control" id="remarks" name="remarks" rows="3"><?=h($project->remarks, br:true)?></textarea>
|
<textarea class="form-control" id="remarks" name="remarks" rows="3"><?=h($project->remarks)?></textarea>
|
||||||
</div>
|
</div>
|
||||||
<button type="submit" name="submit[update]" class="btn btn-primary"><?=_('Save')?></button>
|
<button type="submit" name="submit[update]" class="btn btn-primary"><?=_('Save')?></button>
|
||||||
<a href="<?=$g_scriptname?>?f=view&id=<?=$id?>" class="btn btn-secondary"><?=_('Back')?></a>
|
<a href="<?=$g_scriptname?>?f=view&id=<?=$id?>" class="btn btn-secondary"><?=_('Back')?></a>
|
||||||
|
|||||||
@@ -7,6 +7,7 @@
|
|||||||
******************************************************************************/
|
******************************************************************************/
|
||||||
|
|
||||||
require 'globals.inc';
|
require 'globals.inc';
|
||||||
|
require 'lib/db.inc';
|
||||||
require 'lib/gpc.inc';
|
require 'lib/gpc.inc';
|
||||||
|
|
||||||
$pagetitle=_('Provisions');
|
$pagetitle=_('Provisions');
|
||||||
@@ -62,8 +63,8 @@ switch ($submit = form_get_action()) {
|
|||||||
$p[':weight_net'] = min(gpc_get_float($_POST, 'weight_net'), 999.99);
|
$p[':weight_net'] = min(gpc_get_float($_POST, 'weight_net'), 999.99);
|
||||||
$p[':unit'] = gpc_get_int($_POST, 'unit');
|
$p[':unit'] = gpc_get_int($_POST, 'unit');
|
||||||
$p[':calories'] = gpc_get_uint($_POST, 'calories');
|
$p[':calories'] = gpc_get_uint($_POST, 'calories');
|
||||||
$p[':storedate'] = gpc_get_string($_POST, 'storedate');
|
$p[':storedate'] = gpc_get_date($_POST, 'storedate');
|
||||||
$p[':shelflife'] = gpc_get_string($_POST, 'shelflife');
|
$p[':shelflife'] = gpc_get_date($_POST, 'shelflife');
|
||||||
$p[':price'] = gpc_get_currency($_POST, 'price');
|
$p[':price'] = gpc_get_currency($_POST, 'price');
|
||||||
$p[':sid'] = gpc_get_int($_POST, 'sid');
|
$p[':sid'] = gpc_get_int($_POST, 'sid');
|
||||||
if ($p[':sid'] <= 0) $p[':sid'] = NULL;
|
if ($p[':sid'] <= 0) $p[':sid'] = NULL;
|
||||||
@@ -288,8 +289,8 @@ echo "<tr><th>", _('Weight net'), "</th><td>", format_float($prov->weight_net, 2
|
|||||||
echo '<tr><th>', _('Unit'),"</th><td>", $opt_unit[$prov->unit], "</td></tr>\n";
|
echo '<tr><th>', _('Unit'),"</th><td>", $opt_unit[$prov->unit], "</td></tr>\n";
|
||||||
echo "<tr><th>", _('Calories'), "</th><td>", $prov->calories, " kcal</td></tr>\n";
|
echo "<tr><th>", _('Calories'), "</th><td>", $prov->calories, " kcal</td></tr>\n";
|
||||||
echo '<tr><th>', _('Category'),"</th><td>", $opt_category[$prov->provcat] ?? 'n/a', "</td></tr>\n";
|
echo '<tr><th>', _('Category'),"</th><td>", $opt_category[$prov->provcat] ?? 'n/a', "</td></tr>\n";
|
||||||
echo '<tr><th>', _('Storedate'),"</th><td>", $prov->storedate, "</td></tr>\n";
|
echo '<tr><th>', _('Storedate'),"</th><td>", format_date($prov->storedate), "</td></tr>\n";
|
||||||
echo '<tr><th>', _('Shelflife'),"</th><td>", $prov->shelflife, "</td></tr>\n";
|
echo '<tr><th>', _('Shelflife'),"</th><td>", format_date($prov->shelflife), "</td></tr>\n";
|
||||||
echo '<tr><th>', _('Price'), "</th><td>", format_currency($prov->price), "</td></tr>\n";
|
echo '<tr><th>', _('Price'), "</th><td>", format_currency($prov->price), "</td></tr>\n";
|
||||||
echo '<tr><th>', _('Storage'),"</th><td>", ($opt_storage[$prov->sid] ?? ''), "</td></tr>\n";
|
echo '<tr><th>', _('Storage'),"</th><td>", ($opt_storage[$prov->sid] ?? ''), "</td></tr>\n";
|
||||||
echo '<tr><th>', _('Remarks'),"</th><td>", h($prov->remarks, br:true), "</td></tr>\n";
|
echo '<tr><th>', _('Remarks'),"</th><td>", h($prov->remarks, br:true), "</td></tr>\n";
|
||||||
@@ -359,7 +360,7 @@ form_create_select('sid', _('Storage'), $g_opt_none + $opt_storage, $prov->sid);
|
|||||||
?>
|
?>
|
||||||
<div class="mb-3">
|
<div class="mb-3">
|
||||||
<label for="remarks" class="form-label"><?=_('Remarks')?></label>
|
<label for="remarks" class="form-label"><?=_('Remarks')?></label>
|
||||||
<textarea class="form-control" id="remarks" name="remarks" rows="3" maxlength="150"><?=h($prov->remarks, br:true)?></textarea>
|
<textarea class="form-control" id="remarks" name="remarks" rows="3" maxlength="150"><?=h($prov->remarks)?></textarea>
|
||||||
</div>
|
</div>
|
||||||
<?php
|
<?php
|
||||||
form_edit_buttons($g_scriptname, $id);
|
form_edit_buttons($g_scriptname, $id);
|
||||||
|
|||||||
@@ -7,6 +7,7 @@
|
|||||||
******************************************************************************/
|
******************************************************************************/
|
||||||
|
|
||||||
require 'globals.inc';
|
require 'globals.inc';
|
||||||
|
require 'lib/db.inc';
|
||||||
require 'lib/gpc.inc';
|
require 'lib/gpc.inc';
|
||||||
|
|
||||||
$pagetitle = _('Search');
|
$pagetitle = _('Search');
|
||||||
|
|||||||
+18
-3
@@ -7,6 +7,7 @@
|
|||||||
******************************************************************************/
|
******************************************************************************/
|
||||||
|
|
||||||
require 'globals.inc';
|
require 'globals.inc';
|
||||||
|
require 'lib/db.inc';
|
||||||
require 'lib/gpc.inc';
|
require 'lib/gpc.inc';
|
||||||
|
|
||||||
$pagetitle = _('Settings');
|
$pagetitle = _('Settings');
|
||||||
@@ -22,6 +23,11 @@ switch ($submit = form_get_action()) {
|
|||||||
// global settings
|
// global settings
|
||||||
if ($user->role == 'captain') {
|
if ($user->role == 'captain') {
|
||||||
$p[':userid'] = 0;
|
$p[':userid'] = 0;
|
||||||
|
$p[':sno'] = 4;
|
||||||
|
$p[':valstr'] = gpc_get_string($_POST, 'currsym', 3, '€');
|
||||||
|
db_exec_update('settings', $p, $pk);
|
||||||
|
$p[':valstr'] = NULL;
|
||||||
|
// image dimensions
|
||||||
$p[':sno'] = 20;
|
$p[':sno'] = 20;
|
||||||
$p[':valint'] = gpc_get_int($_POST, 'maximgx');
|
$p[':valint'] = gpc_get_int($_POST, 'maximgx');
|
||||||
db_exec_update('settings', $p, $pk);
|
db_exec_update('settings', $p, $pk);
|
||||||
@@ -80,13 +86,17 @@ if ($res = $sth->fetch(PDO::FETCH_NUM)) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
$curdate = new DateTime();
|
$curdate = new DateTime();
|
||||||
$opt_datefmt = array(
|
$opt_datefmt = array();
|
||||||
|
foreach ($g_opt_datefmt as $format => $description) {
|
||||||
|
$opt_datefmt[$format] = $description . $curdate->format(' - ' . $format);
|
||||||
|
}
|
||||||
|
/* $opt_datefmt = array(
|
||||||
'Y-m-d' => _('YYYY-MM-DD'). $curdate->format(' - Y-m-d'),
|
'Y-m-d' => _('YYYY-MM-DD'). $curdate->format(' - Y-m-d'),
|
||||||
'Y/m/d' => _('YYYY/MM/DD'). $curdate->format(' - Y/m/d'),
|
'Y/m/d' => _('YYYY/MM/DD'). $curdate->format(' - Y/m/d'),
|
||||||
'd.m.Y' => _('DD.MM.YYYY'). $curdate->format(' - d.m.Y'),
|
'd.m.Y' => _('DD.MM.YYYY'). $curdate->format(' - d.m.Y'),
|
||||||
'd/m/Y' => _('DD/MM/YYYY'). $curdate->format(' - d/m/Y'),
|
'd/m/Y' => _('DD/MM/YYYY'). $curdate->format(' - d/m/Y'),
|
||||||
'm-d-Y' => _('MM/DD/YYYY'). $curdate->format(' - m-d-Y')
|
'm-d-Y' => _('MM-DD-YYYY'). $curdate->format(' - m-d-Y')
|
||||||
);
|
); */
|
||||||
|
|
||||||
$rowspp = 10;
|
$rowspp = 10;
|
||||||
$sql = "SELECT valint FROM settings WHERE userid=? AND sno=10";
|
$sql = "SELECT valint FROM settings WHERE userid=? AND sno=10";
|
||||||
@@ -101,6 +111,7 @@ if ($res = $sth->fetch(PDO::FETCH_NUM)) {
|
|||||||
$sth->execute([$user->id, $rowspp]);
|
$sth->execute([$user->id, $rowspp]);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
$currsym = $pdo->query("SELECT valstr FROM settings WHERE userid=0 AND sno=4")->fetchColumn();
|
||||||
$maximgx = $pdo->query("SELECT valint FROM settings WHERE userid=0 AND sno=20")->fetchColumn();
|
$maximgx = $pdo->query("SELECT valint FROM settings WHERE userid=0 AND sno=20")->fetchColumn();
|
||||||
$maximgy = $pdo->query("SELECT valint FROM settings WHERE userid=0 AND sno=21")->fetchColumn();
|
$maximgy = $pdo->query("SELECT valint FROM settings WHERE userid=0 AND sno=21")->fetchColumn();
|
||||||
|
|
||||||
@@ -131,6 +142,10 @@ form_create_select('datefmt', _('Date format'), $opt_datefmt, $datefmt);
|
|||||||
if ($user->role == 'captain'):
|
if ($user->role == 'captain'):
|
||||||
?>
|
?>
|
||||||
<h2><?=_('global for all users')?></h2>
|
<h2><?=_('global for all users')?></h2>
|
||||||
|
<div class="mb-3">
|
||||||
|
<label for="currsym" class="form-label"><?=_('Currency symbol')?></label>
|
||||||
|
<input type="text" class="form-control" id="currsym" name="currsym" maxlength="3" value=<?=$currsym?>>
|
||||||
|
</div>
|
||||||
<div class="mb-3">
|
<div class="mb-3">
|
||||||
<label for="maximgx" class="form-label"><?=_('Maximal image width')?></label>
|
<label for="maximgx" class="form-label"><?=_('Maximal image width')?></label>
|
||||||
<input type="text" class="form-control" id="maximgx" name="maximgx" maxlength="4" value=<?=$maximgx?>>
|
<input type="text" class="form-control" id="maximgx" name="maximgx" maxlength="4" value=<?=$maximgx?>>
|
||||||
|
|||||||
+4
-2
@@ -7,6 +7,7 @@
|
|||||||
******************************************************************************/
|
******************************************************************************/
|
||||||
|
|
||||||
require 'globals.inc';
|
require 'globals.inc';
|
||||||
|
require 'lib/db.inc';
|
||||||
require 'lib/gpc.inc';
|
require 'lib/gpc.inc';
|
||||||
|
|
||||||
$pagetitle = _('Storage');
|
$pagetitle = _('Storage');
|
||||||
@@ -39,7 +40,7 @@ switch ($submit = form_get_action()) {
|
|||||||
$p[':sid'] = $id;
|
$p[':sid'] = $id;
|
||||||
$p[':sname'] = gpc_get_string($_POST, 'sname');
|
$p[':sname'] = gpc_get_string($_POST, 'sname');
|
||||||
$p[':stype'] = gpc_get_string($_POST, 'stype');
|
$p[':stype'] = gpc_get_string($_POST, 'stype');
|
||||||
$p[':x'] = gpc_get_int($_POST, 'x');
|
$p[':x'] = gpc_get_uint($_POST, 'x');
|
||||||
$p[':y'] = gpc_get_int($_POST, 'y');
|
$p[':y'] = gpc_get_int($_POST, 'y');
|
||||||
$p[':z'] = gpc_get_int($_POST, 'z');
|
$p[':z'] = gpc_get_int($_POST, 'z');
|
||||||
$p[':wx'] = gpc_get_int($_POST, 'wx');
|
$p[':wx'] = gpc_get_int($_POST, 'wx');
|
||||||
@@ -290,6 +291,7 @@ if (count($res) > 0) {
|
|||||||
echo "<td>", $row['provname'], "</td>";
|
echo "<td>", $row['provname'], "</td>";
|
||||||
echo "<td>", $row['number'], ' ', $opt_unit[$row['unit']], "</td>";
|
echo "<td>", $row['number'], ' ', $opt_unit[$row['unit']], "</td>";
|
||||||
echo "<td>", $row['storedate'], ' - ', $row['shelflife'], "</td>";
|
echo "<td>", $row['storedate'], ' - ', $row['shelflife'], "</td>";
|
||||||
|
echo '<td><a title="', _('View'), '" href="provisions.php?f=view&id=', $row['provid'], '"><i class="bi-eye"></i></a></td>';
|
||||||
echo "</tr>\n";
|
echo "</tr>\n";
|
||||||
}
|
}
|
||||||
echo "</table>\n";
|
echo "</table>\n";
|
||||||
@@ -358,7 +360,7 @@ form_create_select('stype', _('Type'), $opt_stype, $storage->stype);
|
|||||||
<?php form_create_select('capaunit', _('Capacity Unit'), $opt_capaunit, $storage->capaunit); ?>
|
<?php form_create_select('capaunit', _('Capacity Unit'), $opt_capaunit, $storage->capaunit); ?>
|
||||||
<div class="mb-3">
|
<div class="mb-3">
|
||||||
<label for="remarks" class="form-label"><?=_('Remarks')?></label>
|
<label for="remarks" class="form-label"><?=_('Remarks')?></label>
|
||||||
<textarea class="form-control" id="remarks" name="remarks" rows="3"><?=h($storage->remarks, br:true)?></textarea>
|
<textarea class="form-control" id="remarks" name="remarks" rows="3"><?=h($storage->remarks)?></textarea>
|
||||||
</div>
|
</div>
|
||||||
<button type="submit" name="submit[update]" class="btn btn-primary"><?=_('Save')?></button>
|
<button type="submit" name="submit[update]" class="btn btn-primary"><?=_('Save')?></button>
|
||||||
<a href="<?=$g_scriptname?>?f=view&id=<?=$id?>" class="btn btn-secondary"><?=_('Back')?></a>
|
<a href="<?=$g_scriptname?>?f=view&id=<?=$id?>" class="btn btn-secondary"><?=_('Back')?></a>
|
||||||
|
|||||||
@@ -7,6 +7,7 @@
|
|||||||
******************************************************************************/
|
******************************************************************************/
|
||||||
|
|
||||||
require 'globals.inc';
|
require 'globals.inc';
|
||||||
|
require 'lib/db.inc';
|
||||||
require 'lib/gpc.inc';
|
require 'lib/gpc.inc';
|
||||||
|
|
||||||
$pagetitle = _('Tags');
|
$pagetitle = _('Tags');
|
||||||
|
|||||||
+11
-3
@@ -7,6 +7,7 @@
|
|||||||
******************************************************************************/
|
******************************************************************************/
|
||||||
|
|
||||||
require 'globals.inc';
|
require 'globals.inc';
|
||||||
|
require 'lib/db.inc';
|
||||||
require 'lib/gpc.inc';
|
require 'lib/gpc.inc';
|
||||||
|
|
||||||
$pagetitle = _('Task');
|
$pagetitle = _('Task');
|
||||||
@@ -73,6 +74,7 @@ switch ($submit = form_get_action()) {
|
|||||||
$p[':finished'] = gpc_get_datetime($_POST, 'finished');
|
$p[':finished'] = gpc_get_datetime($_POST, 'finished');
|
||||||
$p[':taskstate'] = gpc_get_enum($_POST, 'taskstate', array_keys($opt_state));
|
$p[':taskstate'] = gpc_get_enum($_POST, 'taskstate', array_keys($opt_state));
|
||||||
$p[':responsible'] = gpc_get_int($_POST, 'responsible');
|
$p[':responsible'] = gpc_get_int($_POST, 'responsible');
|
||||||
|
$p[':remarks'] = gpc_get_string($_POST, 'remarks', 150);
|
||||||
db_exec_update('task', $p, 'taskid');
|
db_exec_update('task', $p, 'taskid');
|
||||||
$action = ACT_VIEW;
|
$action = ACT_VIEW;
|
||||||
break;
|
break;
|
||||||
@@ -175,7 +177,7 @@ try {
|
|||||||
}
|
}
|
||||||
$numrows = $sth->fetchColumn();
|
$numrows = $sth->fetchColumn();
|
||||||
$page = gpc_get_int($_REQUEST, 'p', 1);
|
$page = gpc_get_int($_REQUEST, 'p', 1);
|
||||||
$rows_pp = gpc_get_int($_REQUEST, 'n', $g_rows_pp);
|
$rows_pp = gpc_get_int($_REQUEST, 'n', $user->rows_pp);
|
||||||
$lastpage = ceil($numrows/$rows_pp);
|
$lastpage = ceil($numrows/$rows_pp);
|
||||||
|
|
||||||
$sql = "SELECT t.taskid, t.vid, t.projid, t.taskname, t.priority, t.taskstate,"
|
$sql = "SELECT t.taskid, t.vid, t.projid, t.taskname, t.priority, t.taskstate,"
|
||||||
@@ -297,7 +299,7 @@ elseif ($action == ACT_VIEW):
|
|||||||
|
|
||||||
$sql = "SELECT t.taskname, t.priority, t.plandate, t.duedate,"
|
$sql = "SELECT t.taskname, t.priority, t.plandate, t.duedate,"
|
||||||
. " t.started, t.finished, t.taskstate, t.responsible,"
|
. " t.started, t.finished, t.taskstate, t.responsible,"
|
||||||
. " u.displayname, p.projname "
|
. " t.remarks, u.displayname, p.projname "
|
||||||
. "FROM task AS t LEFT JOIN project AS p USING (projid) "
|
. "FROM task AS t LEFT JOIN project AS p USING (projid) "
|
||||||
. " LEFT JOIN user AS u ON (t.responsible=u.userid) "
|
. " LEFT JOIN user AS u ON (t.responsible=u.userid) "
|
||||||
. "WHERE taskid=?";
|
. "WHERE taskid=?";
|
||||||
@@ -316,6 +318,7 @@ echo '<tr><th>', _('Started at'),"</th><td>", $task->started, "</td></tr>\n";
|
|||||||
echo '<tr><th>', _('Finished at'),"</th><td>", $task->finished, "</td></tr>\n";
|
echo '<tr><th>', _('Finished at'),"</th><td>", $task->finished, "</td></tr>\n";
|
||||||
echo '<tr><th>', _('Status'),"</th><td>", $opt_state[$task->taskstate], "</td></tr>\n";
|
echo '<tr><th>', _('Status'),"</th><td>", $opt_state[$task->taskstate], "</td></tr>\n";
|
||||||
echo '<tr><th>', _('Responsible'),"</th><td>", $task->displayname, "</td></tr>\n";
|
echo '<tr><th>', _('Responsible'),"</th><td>", $task->displayname, "</td></tr>\n";
|
||||||
|
echo '<tr><th>', _('Remarks'),"</th><td>", h($task->remarks, br:true), "</td></tr>\n";
|
||||||
echo "</table>\n";
|
echo "</table>\n";
|
||||||
|
|
||||||
form_view_buttons($g_scriptname, $id);
|
form_view_buttons($g_scriptname, $id);
|
||||||
@@ -392,7 +395,12 @@ form_create_select('priority', _('Priority'), $opt_none + $opt_priority, $task->
|
|||||||
<?php
|
<?php
|
||||||
form_create_select('taskstate', _('Status'), $opt_state, $task->taskstate);
|
form_create_select('taskstate', _('Status'), $opt_state, $task->taskstate);
|
||||||
form_create_select('responsible', _('Responsible'), $opt_user, $user->id);
|
form_create_select('responsible', _('Responsible'), $opt_user, $user->id);
|
||||||
|
?>
|
||||||
|
<div class="mb-3">
|
||||||
|
<label for="remarks" class="form-label"><?=_('Remarks')?></label>
|
||||||
|
<textarea class="form-control" id="remarks" name="remarks" rows="3"><?=h($task->remarks)?></textarea>
|
||||||
|
</div>
|
||||||
|
<?php
|
||||||
form_edit_buttons($g_scriptname, $id);
|
form_edit_buttons($g_scriptname, $id);
|
||||||
echo "</form>\n";
|
echo "</form>\n";
|
||||||
|
|
||||||
|
|||||||
+1
-1
@@ -5,7 +5,7 @@ GenericName=Yacht Management
|
|||||||
GenericName[de]=Yacht-Verwaltungssoftware
|
GenericName[de]=Yacht-Verwaltungssoftware
|
||||||
Comment=Yacht Management Software
|
Comment=Yacht Management Software
|
||||||
Comment[de]=Verwaltung von Yachten, Dokumenten und technischen Daten
|
Comment[de]=Verwaltung von Yachten, Dokumenten und technischen Daten
|
||||||
Exec=/usr/local/bin/yms
|
Exec=@PREFIX@/bin/yms
|
||||||
Icon=yms
|
Icon=yms
|
||||||
StartupNotify=true
|
StartupNotify=true
|
||||||
Terminal=false
|
Terminal=false
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
table Icon
|
table Icon
|
||||||
Caption: Yacht Management
|
Caption: Yacht Management
|
||||||
Command: /usr/local/bin/yms
|
Command: @PREFIX@/bin/yms
|
||||||
Icon: /usr/local/share/icons/hicolor/48x48/apps/yms.png
|
Icon: @PREFIX@/share/icons/hicolor/48x48/apps/yms.png
|
||||||
Width: 48
|
Width: 48
|
||||||
Height: 48
|
Height: 48
|
||||||
X: 168
|
X: 168
|
||||||
|
|||||||
+4
-2
@@ -1,3 +1,5 @@
|
|||||||
|
# SPDX-License-Identifier: WTFPL
|
||||||
|
|
||||||
from gi.repository import Gtk
|
from gi.repository import Gtk
|
||||||
|
|
||||||
def load_from_dict(combobox, dictionary, selected=None, sort=False):
|
def load_from_dict(combobox, dictionary, selected=None, sort=False):
|
||||||
@@ -33,7 +35,7 @@ def refresh_dict(combobox, dictionary, keep_selection=True):
|
|||||||
model = combobox.get_model()
|
model = combobox.get_model()
|
||||||
selected = get_value(combobox)
|
selected = get_value(combobox)
|
||||||
model.clear()
|
model.clear()
|
||||||
for item in dictionary.iteritems():
|
for item in dictionary.items():
|
||||||
model.append(item)
|
model.append(item)
|
||||||
if keep_selection:
|
if keep_selection:
|
||||||
activate_row(combobox, selected)
|
activate_row(combobox, selected)
|
||||||
@@ -70,7 +72,7 @@ def get_value(combobox, decode=False):
|
|||||||
if active < 0:
|
if active < 0:
|
||||||
return None
|
return None
|
||||||
else:
|
else:
|
||||||
if type(model) == gtk.TreeStore:
|
if type(model) == Gtk.TreeStore:
|
||||||
it = combobox.get_active_iter()
|
it = combobox.get_active_iter()
|
||||||
val = model.get_value(it, 0)
|
val = model.get_value(it, 0)
|
||||||
if decode:
|
if decode:
|
||||||
|
|||||||
+97
-1
@@ -1,6 +1,7 @@
|
|||||||
import MySQLdb
|
import MySQLdb
|
||||||
|
import secrets
|
||||||
|
|
||||||
class Database():
|
class Database:
|
||||||
|
|
||||||
def __init__(self, hostname, dbname):
|
def __init__(self, hostname, dbname):
|
||||||
self.hostname = hostname
|
self.hostname = hostname
|
||||||
@@ -20,6 +21,7 @@ class Database():
|
|||||||
except MySQLdb.Error as e:
|
except MySQLdb.Error as e:
|
||||||
self.error = e
|
self.error = e
|
||||||
return False
|
return False
|
||||||
|
self.conn.autocommit(False)
|
||||||
self.cur = self.conn.cursor()
|
self.cur = self.conn.cursor()
|
||||||
self.dcur = self.conn.cursor(MySQLdb.cursors.DictCursor)
|
self.dcur = self.conn.cursor(MySQLdb.cursors.DictCursor)
|
||||||
return True
|
return True
|
||||||
@@ -47,6 +49,10 @@ class Database():
|
|||||||
def is_connected(self):
|
def is_connected(self):
|
||||||
return self.conn.open
|
return self.conn.open
|
||||||
|
|
||||||
|
def get_timestamp(self):
|
||||||
|
self.cur.execute("SELECT CURRENT_TIMESTAMP")
|
||||||
|
return self.cur.fetchone()[0]
|
||||||
|
|
||||||
def last_error(self):
|
def last_error(self):
|
||||||
if not self.error:
|
if not self.error:
|
||||||
return(0, '')
|
return(0, '')
|
||||||
@@ -54,3 +60,93 @@ class Database():
|
|||||||
text = self.error.args[1]
|
text = self.error.args[1]
|
||||||
self.error = None
|
self.error = None
|
||||||
return(code, text)
|
return(code, text)
|
||||||
|
|
||||||
|
def load_enum(self, table, column):
|
||||||
|
"""
|
||||||
|
TODO this is only an example! perhaps other keys needed
|
||||||
|
Load an enum directly from a database table and provide it as a
|
||||||
|
dictionary for use in, for example, selection lists.
|
||||||
|
"""
|
||||||
|
sql = (
|
||||||
|
"SELECT TRIM(TRAILING ')' FROM SUBSTRING(column_type,6)) "
|
||||||
|
"FROM information_schema.columns "
|
||||||
|
"WHERE table_schema=DATABASE() AND table_name=%s AND column_name=%s AND data_type='enum'"
|
||||||
|
)
|
||||||
|
self.cur.execute(sql, (table, column))
|
||||||
|
row = self.cur.fetchone()
|
||||||
|
if not row:
|
||||||
|
return {}
|
||||||
|
return {
|
||||||
|
i: _(value.strip("'"))
|
||||||
|
for i, value in enumerate(row[0].split(','), 1)
|
||||||
|
}
|
||||||
|
|
||||||
|
def lock_acquire(self, table, key, userid):
|
||||||
|
token = secrets.token_hex(8)
|
||||||
|
# first try new lock
|
||||||
|
sql = (
|
||||||
|
"INSERT INTO recordlock (lock_table, lock_key, token, userid)"
|
||||||
|
"VALUES (%s, %s, %s, %s)"
|
||||||
|
)
|
||||||
|
try:
|
||||||
|
self.cur.execute(sql, (table, key, token, userid))
|
||||||
|
self.conn.commit()
|
||||||
|
return token
|
||||||
|
except self.conn.IntegrityError as e:
|
||||||
|
self.conn.rollback()
|
||||||
|
if e.errno != 1062:
|
||||||
|
raise
|
||||||
|
# lazy locking: lock exists but is old, so we use it
|
||||||
|
sql = (
|
||||||
|
"UPDATE recordlock "
|
||||||
|
"SET token=%s, userid=%s,"
|
||||||
|
" created_at=CURRENT_TIMESTAMP, last_seen=CURRENT_TIMESTAMP "
|
||||||
|
"WHERE lock_table=%s AND lock_key=%s AND last_seen<CURRENT_TIMESTAMP-INTERVAL 5 MINUTE"
|
||||||
|
)
|
||||||
|
self.cur.execute(sql, (token, userid, table, key))
|
||||||
|
self.conn.commit()
|
||||||
|
if self.cur.rowcount == 1:
|
||||||
|
return token
|
||||||
|
return None
|
||||||
|
|
||||||
|
def lock_refresh(self, token):
|
||||||
|
sql = (
|
||||||
|
"UPDATE recordlock "
|
||||||
|
"SET last_seen=current_timestamp() "
|
||||||
|
"WHERE token=%s"
|
||||||
|
)
|
||||||
|
self.cur.execute(sql, (token,))
|
||||||
|
self.conn.commit()
|
||||||
|
return self.cur.rowcount == 1
|
||||||
|
|
||||||
|
def lock_release(self, token):
|
||||||
|
sql = "DELETE FROM recordlock WHERE token=%s"
|
||||||
|
self.cur.execute(sql, (token,))
|
||||||
|
self.conn.commit()
|
||||||
|
return self.cur.rowcount == 1
|
||||||
|
|
||||||
|
def execute_write(self, sql, values=(), expected_rows=None):
|
||||||
|
"""
|
||||||
|
Execute an INSERT, UPDATE, or DELETE statement.
|
||||||
|
expected_rows:
|
||||||
|
None = do not check the number of affected rows
|
||||||
|
1 = expect exactly one affected row
|
||||||
|
0 = expect no affected rows
|
||||||
|
"""
|
||||||
|
try:
|
||||||
|
self.cur.execute(sql, values)
|
||||||
|
except MySQLdb.Error as e:
|
||||||
|
self.rollback()
|
||||||
|
self.error = e
|
||||||
|
return False
|
||||||
|
if (expected_rows is not None and self.cur.rowcount != expected_rows):
|
||||||
|
self.rollback()
|
||||||
|
self.error = RuntimeError(
|
||||||
|
"Expected {} affected rows, got {}".format(
|
||||||
|
expected_rows,
|
||||||
|
self.cur.rowcount
|
||||||
|
)
|
||||||
|
)
|
||||||
|
return False
|
||||||
|
self.error = None
|
||||||
|
return True
|
||||||
|
|||||||
@@ -1,33 +0,0 @@
|
|||||||
# -*- coding: utf-8 -*-
|
|
||||||
|
|
||||||
import MySQLdb.cursors
|
|
||||||
|
|
||||||
class Equipment():
|
|
||||||
|
|
||||||
fields = ('vid' 'ename', 'shortname', 'model', 'ecat', 'serial', 'supplier',
|
|
||||||
'manufacturer', 'purchdate', 'price', 'weight', 'remarks', 'flags')
|
|
||||||
|
|
||||||
def __init__(self, dbconn, eid=None):
|
|
||||||
self.conn = dbconn
|
|
||||||
self.dcur = dbconn.cursor(MySQLdb.cursors.DictCursor)
|
|
||||||
|
|
||||||
self.remarks = None
|
|
||||||
self.data = {} # for old/new checks
|
|
||||||
|
|
||||||
def load(self):
|
|
||||||
sql = (
|
|
||||||
"SELECT {}".format(', '.join(self.fields))
|
|
||||||
"FROM equipment "
|
|
||||||
"WHERE eid=%s"
|
|
||||||
)
|
|
||||||
self.dcur.execute(sql, (self.eid,))
|
|
||||||
self.data = self.dcur.fetchone()
|
|
||||||
if self.data:
|
|
||||||
for field in self.fields:
|
|
||||||
setattr(self, field, self.data.get(field))
|
|
||||||
else:
|
|
||||||
for field in self.fields:
|
|
||||||
setattr(self, field, None)
|
|
||||||
|
|
||||||
def save(self):
|
|
||||||
pass
|
|
||||||
+8
-3
@@ -50,9 +50,7 @@ def messagebox(messagetext, symbol=None, title=None, parent=None):
|
|||||||
|
|
||||||
def questionbox(messagetext, symbol=None, title=None, parent=None):
|
def questionbox(messagetext, symbol=None, title=None, parent=None):
|
||||||
"""
|
"""
|
||||||
Ja/Nein-Nachfrage bei wirklich wichtigen Entscheidungen
|
The decision is returned as a value: True if agreed to, False if rejected
|
||||||
Die Entscheidung wird als Rückgabewert geliefert: True falls
|
|
||||||
zugestimmt wurde, False bei Ablehnung
|
|
||||||
"""
|
"""
|
||||||
if not symbol:
|
if not symbol:
|
||||||
symbol = Gtk.MessageType.QUESTION
|
symbol = Gtk.MessageType.QUESTION
|
||||||
@@ -69,3 +67,10 @@ def questionbox(messagetext, symbol=None, title=None, parent=None):
|
|||||||
response = md.run()
|
response = md.run()
|
||||||
md.destroy()
|
md.destroy()
|
||||||
return response == Gtk.ResponseType.YES
|
return response == Gtk.ResponseType.YES
|
||||||
|
|
||||||
|
def get_text_contents(textview):
|
||||||
|
"""
|
||||||
|
Convenience function to get all contents from GtkTextView
|
||||||
|
"""
|
||||||
|
buf = textview.get_buffer()
|
||||||
|
return buf.get_text(buf.get_start_iter(), buf.get_end_iter(), True)
|
||||||
|
|||||||
+130
@@ -0,0 +1,130 @@
|
|||||||
|
# SPDX-License-Identifier: WTFPL
|
||||||
|
|
||||||
|
"""
|
||||||
|
Dropdowns and database enums
|
||||||
|
|
||||||
|
dropdowns can change
|
||||||
|
enums are static
|
||||||
|
|
||||||
|
"""
|
||||||
|
|
||||||
|
class Dropdown:
|
||||||
|
HULL_TYPE = 1
|
||||||
|
COMPANY_TYPE = 2
|
||||||
|
STORAGE_TYPE = 3
|
||||||
|
EQUIPMENT_CATEGORY = 4
|
||||||
|
PROVISION_CATEGORY = 5
|
||||||
|
PROVISION_UNIT = 6
|
||||||
|
FUSE_TYPE = 7
|
||||||
|
UNIT = 8
|
||||||
|
BOX_TYPE = 9
|
||||||
|
FUSE_BLOCK = 10
|
||||||
|
CABLE_TYPE = 11
|
||||||
|
CABLE_TECHNAME = 12
|
||||||
|
|
||||||
|
class Lookup:
|
||||||
|
|
||||||
|
def __init__(self, db):
|
||||||
|
self.db = db
|
||||||
|
self._enums = {}
|
||||||
|
self._dropdowns = {}
|
||||||
|
|
||||||
|
def load(self):
|
||||||
|
self._load_enums()
|
||||||
|
self._load_dropdowns()
|
||||||
|
|
||||||
|
def _load_enums(self):
|
||||||
|
"""
|
||||||
|
TODO translation via gettext needed
|
||||||
|
"""
|
||||||
|
db_enums = {
|
||||||
|
'user.role': ('user', 'role'),
|
||||||
|
'dropdown.flags': ('dropdown', 'flags'),
|
||||||
|
'vessel.vtype': ('vessel', 'vtype'),
|
||||||
|
'storage.capaunit': ('storage', 'capaunit'),
|
||||||
|
'tagref.objtype': ('tagref', 'objtype'),
|
||||||
|
'inventory.conttype': ('inventory', 'conttype'),
|
||||||
|
'inventory.invcond': ('inventory', 'invcond'),
|
||||||
|
'cable.cablecond': ('cable', 'cablecond'),
|
||||||
|
'measurement.accuracy': ('measurement', 'accuracy'),
|
||||||
|
'document.doctype': ('document', 'doctype'),
|
||||||
|
'document.roleaccess': ('document', 'roleaccess'),
|
||||||
|
'docref.reftype': ('docref', 'reftype'),
|
||||||
|
'maintenance.maintstate': ('maintenance', 'maintstate'),
|
||||||
|
'project.projstate': ('project', 'projstate'),
|
||||||
|
'task.priority': ('task', 'priority'),
|
||||||
|
'task.taskstate': ('task', 'taskstate'),
|
||||||
|
'note.notetype': ('note', 'notetype'),
|
||||||
|
'checklist.clstate': ('checklist', 'clstate'),
|
||||||
|
'checkitem.checkresult': ('checkitem', 'checkresult'),
|
||||||
|
'signalk.objtype': ('signalk', 'objtype'),
|
||||||
|
'signalk.datatype': ('signalk', 'datatype')
|
||||||
|
}
|
||||||
|
for key, (table, column) in db_enums.items():
|
||||||
|
self._enums[key] = self.db.load_enum(table, column)
|
||||||
|
|
||||||
|
def _load_dropdowns(self):
|
||||||
|
self._dropdowns.clear()
|
||||||
|
sql = (
|
||||||
|
"SELECT ddid, ddval, ddtext "
|
||||||
|
"FROM dropdown "
|
||||||
|
"WHERE ddid>0 "
|
||||||
|
"ORDER BY ddid, sort, ddval"
|
||||||
|
)
|
||||||
|
self.db.cur.execute(sql)
|
||||||
|
for ddid, ddval, ddtext in self.db.cur.fetchall():
|
||||||
|
if ddid not in self._dropdowns:
|
||||||
|
self._dropdowns[ddid] = {}
|
||||||
|
self._dropdowns[ddid][ddval] = ddtext
|
||||||
|
|
||||||
|
def enum(self, name):
|
||||||
|
return self._enums[name]
|
||||||
|
|
||||||
|
def dropdown(self, ddid):
|
||||||
|
return self._dropdowns[ddid]
|
||||||
|
|
||||||
|
def refresh(self):
|
||||||
|
# TODO ugly hack please improve
|
||||||
|
self._load_dropdowns()
|
||||||
|
|
||||||
|
class ListDefinition:
|
||||||
|
pass
|
||||||
|
|
||||||
|
"""
|
||||||
|
EQUIPMENT_LIST = ListDefinition(
|
||||||
|
name="equipment",
|
||||||
|
|
||||||
|
query=
|
||||||
|
"SELECT
|
||||||
|
e.eid,
|
||||||
|
e.ename,
|
||||||
|
c.name AS manufacturer,
|
||||||
|
e.model,
|
||||||
|
e.ecat,
|
||||||
|
e.weight
|
||||||
|
FROM equipment e
|
||||||
|
LEFT JOIN company c
|
||||||
|
ON c.cid = e.manufacturer"
|
||||||
|
,
|
||||||
|
|
||||||
|
columns=[
|
||||||
|
Column("ename", _("Name")),
|
||||||
|
Column("manufacturer", _("Manufacturer")),
|
||||||
|
Column(
|
||||||
|
"model",
|
||||||
|
_("Model")
|
||||||
|
),
|
||||||
|
Column(
|
||||||
|
"ecat",
|
||||||
|
_("Category"),
|
||||||
|
formatter=dropdown(Dropdown.EQUIPMENT_CATEGORY)
|
||||||
|
),
|
||||||
|
Column(
|
||||||
|
"weight",
|
||||||
|
_("Weight"),
|
||||||
|
formatter=weight()
|
||||||
|
),
|
||||||
|
]
|
||||||
|
)
|
||||||
|
|
||||||
|
"""
|
||||||
@@ -0,0 +1,14 @@
|
|||||||
|
# SPDX-License-Identifier: WTFPL
|
||||||
|
|
||||||
|
from .dbrecord import DbRecord
|
||||||
|
|
||||||
|
class Box(DbRecord):
|
||||||
|
|
||||||
|
table = "box"
|
||||||
|
pk_field = "boxid"
|
||||||
|
fields = ('boxid', 'sid', 'boxtype', 'parent', 'label', 'color', 'content',
|
||||||
|
'wx', 'wy', 'wz', 'weight', 'weight_net', 'price', 'remarks')
|
||||||
|
|
||||||
|
def __init__(self, db, boxid=None):
|
||||||
|
super().__init__(db, boxid)
|
||||||
|
self.title = _("Box({})")
|
||||||
@@ -0,0 +1,15 @@
|
|||||||
|
# SPDX-License-Identifier: WTFPL
|
||||||
|
|
||||||
|
from .dbrecord import DbRecord
|
||||||
|
|
||||||
|
class Cable(DbRecord):
|
||||||
|
|
||||||
|
table = "cable"
|
||||||
|
pk_field = "cableid"
|
||||||
|
fields = ('cableid', 'vid', 'cablename', 'cabletype', 'techname', 'length',
|
||||||
|
'conductors', 'diameter', 'xsection', 'weight', 'color', 'supplier',
|
||||||
|
'manufacturer', 'cablecond', 'remarks')
|
||||||
|
|
||||||
|
def __init__(self, db, cableid=None):
|
||||||
|
super().__init__(db, cableid)
|
||||||
|
self.title = _("Cable({})")
|
||||||
@@ -0,0 +1,15 @@
|
|||||||
|
# SPDX-License-Identifier: WTFPL
|
||||||
|
|
||||||
|
from .dbrecord import DbRecord
|
||||||
|
|
||||||
|
class Company(DbRecord):
|
||||||
|
|
||||||
|
table = "company"
|
||||||
|
pk_field = "compid"
|
||||||
|
fields = ('compid', 'compname', 'comptype', 'comptype2', 'shortname',
|
||||||
|
'street', 'zip', 'city', 'country', 'contact', 'phone', 'email',
|
||||||
|
'web', 'customerno', 'contractno', 'remarks', 'flags' )
|
||||||
|
|
||||||
|
def __init__(self, db, compid=None):
|
||||||
|
super().__init__(db, compid)
|
||||||
|
self.title = _("Company({})")
|
||||||
@@ -0,0 +1,149 @@
|
|||||||
|
# SPDX-License-Identifier: WTFPL
|
||||||
|
|
||||||
|
"""
|
||||||
|
No commits here: Has to be done elsewhere to support transactions!
|
||||||
|
|
||||||
|
"""
|
||||||
|
|
||||||
|
from datetime import datetime
|
||||||
|
|
||||||
|
class DbRecord:
|
||||||
|
|
||||||
|
def __init__(self, db, record_id=None):
|
||||||
|
if not hasattr(self, "table"):
|
||||||
|
raise TypeError("DbRecord subclass must define 'table'")
|
||||||
|
if not hasattr(self, "pk_field"):
|
||||||
|
raise TypeError("DbRecord subclass must define 'pk_field'")
|
||||||
|
if not hasattr(self, "fields"):
|
||||||
|
raise TypeError("DbRecord subclass must define 'fields'")
|
||||||
|
|
||||||
|
self.db = db
|
||||||
|
self.cur = db.cur
|
||||||
|
self.dcur = db.dcur
|
||||||
|
self.conn = db.conn
|
||||||
|
self.last_update = None
|
||||||
|
|
||||||
|
self.title = _("DbRecord({})") # for pretty print
|
||||||
|
|
||||||
|
if record_id is not None:
|
||||||
|
self.pk_value = int(record_id)
|
||||||
|
self.load()
|
||||||
|
else:
|
||||||
|
self.clear()
|
||||||
|
|
||||||
|
def clear(self):
|
||||||
|
self.pk_value = None
|
||||||
|
self.data = {} # for old/new checks
|
||||||
|
for field in self.fields:
|
||||||
|
setattr(self, field, None)
|
||||||
|
self.data[field] = None
|
||||||
|
|
||||||
|
def load(self, record_id=None):
|
||||||
|
if record_id is not None:
|
||||||
|
self.pk_value = int(record_id)
|
||||||
|
if self.pk_value is None:
|
||||||
|
self.clear()
|
||||||
|
return
|
||||||
|
sql = ("SELECT {} FROM {} WHERE {}=%s").format(', '.join(self.fields), self.table, self.pk_field)
|
||||||
|
try:
|
||||||
|
self.dcur.execute(sql, (self.pk_value,))
|
||||||
|
self.data = self.dcur.fetchone()
|
||||||
|
except Exception as e:
|
||||||
|
print(e)
|
||||||
|
print(sql)
|
||||||
|
self.db.error = e
|
||||||
|
self.clear()
|
||||||
|
return False
|
||||||
|
if self.data:
|
||||||
|
for field, value in self.data.items():
|
||||||
|
setattr(self, field, value)
|
||||||
|
return True
|
||||||
|
else:
|
||||||
|
self.clear()
|
||||||
|
return False
|
||||||
|
|
||||||
|
def save(self):
|
||||||
|
self.last_update = datetime.now()
|
||||||
|
if self.pk_value is not None:
|
||||||
|
return self._update()
|
||||||
|
else:
|
||||||
|
return self._insert()
|
||||||
|
|
||||||
|
def _update(self):
|
||||||
|
sqlfield = []
|
||||||
|
values = []
|
||||||
|
for field in self.fields:
|
||||||
|
newdata = getattr(self, field)
|
||||||
|
if self.data[field] != newdata:
|
||||||
|
sqlfield.append("{}=%s".format(field))
|
||||||
|
values.append(newdata)
|
||||||
|
if values:
|
||||||
|
# only save if there are changes
|
||||||
|
sql = (
|
||||||
|
f"UPDATE {self.table} SET " + ",".join(sqlfield) +
|
||||||
|
f" WHERE {self.pk_field}=%s"
|
||||||
|
)
|
||||||
|
values.append(self.pk_value)
|
||||||
|
try:
|
||||||
|
self.dcur.execute(sql, values)
|
||||||
|
except Exception as e:
|
||||||
|
print(e)
|
||||||
|
print(sql)
|
||||||
|
print(values)
|
||||||
|
self.db.error = e
|
||||||
|
return False
|
||||||
|
for field in self.fields:
|
||||||
|
self.data[field] = getattr(self, field)
|
||||||
|
return True
|
||||||
|
|
||||||
|
def _insert(self):
|
||||||
|
sql = (
|
||||||
|
"INSERT INTO {} ({}) "
|
||||||
|
"VALUES ({})"
|
||||||
|
).format(
|
||||||
|
self.table,
|
||||||
|
','.join(self.fields),
|
||||||
|
','.join(["%s"] * len(self.fields))
|
||||||
|
)
|
||||||
|
values = []
|
||||||
|
for field in self.fields:
|
||||||
|
newdata = getattr(self, field)
|
||||||
|
values.append(newdata)
|
||||||
|
self.data[field] = newdata
|
||||||
|
try:
|
||||||
|
self.dcur.execute(sql, values)
|
||||||
|
except Exception as e:
|
||||||
|
print(e)
|
||||||
|
print(sql)
|
||||||
|
print(values)
|
||||||
|
self.db.error = e
|
||||||
|
return False
|
||||||
|
self.pk_value = self.dcur.lastrowid
|
||||||
|
return True
|
||||||
|
|
||||||
|
def delete(self, record_id=None):
|
||||||
|
if record_id is None:
|
||||||
|
if self.pk_value is None:
|
||||||
|
return False
|
||||||
|
record_id = self.pk_value
|
||||||
|
sql = "DELETE FROM {} WHERE {}=%s".format(self.table, self.pk_field)
|
||||||
|
try:
|
||||||
|
self.dcur.execute(sql, (record_id,))
|
||||||
|
except Exception as e:
|
||||||
|
print(e)
|
||||||
|
print(sql)
|
||||||
|
self.db.error = e
|
||||||
|
return False
|
||||||
|
if self.dcur.rowcount != 1:
|
||||||
|
return False
|
||||||
|
if self.pk_value == record_id:
|
||||||
|
self.pk_value = None
|
||||||
|
self.clear()
|
||||||
|
return True
|
||||||
|
|
||||||
|
def __str__(self):
|
||||||
|
out = [self.title.format(self.pk_value)]
|
||||||
|
for field in self.fields:
|
||||||
|
value = getattr(self, field, None)
|
||||||
|
out.append(" {:15}: {}".format(field, value))
|
||||||
|
return "\n".join(out)
|
||||||
@@ -0,0 +1,15 @@
|
|||||||
|
# SPDX-License-Identifier: WTFPL
|
||||||
|
|
||||||
|
from .dbrecord import DbRecord
|
||||||
|
|
||||||
|
class Document(DbRecord):
|
||||||
|
|
||||||
|
table = "document"
|
||||||
|
pk_field = "docid"
|
||||||
|
fields = ('docid', 'doctype', 'mimetype', 'filename', 'extension',
|
||||||
|
'hash', 'docsize', 'doctime', 'docdate', 'title', 'pages', 'remarks',
|
||||||
|
'roleaccess')
|
||||||
|
|
||||||
|
def __init__(self, db, docid=None):
|
||||||
|
super().__init__(db, docid)
|
||||||
|
self.title = _("Document({})")
|
||||||
@@ -0,0 +1,15 @@
|
|||||||
|
# SPDX-License-Identifier: WTFPL
|
||||||
|
|
||||||
|
from .dbrecord import DbRecord
|
||||||
|
|
||||||
|
class Equipment(DbRecord):
|
||||||
|
|
||||||
|
table = "equipment"
|
||||||
|
pk_field = "eid"
|
||||||
|
fields = ('eid', 'vid' 'ename', 'shortname', 'model', 'ecat', 'serial',
|
||||||
|
'supplier', 'manufacturer', 'purchdate', 'price', 'weight', 'remarks',
|
||||||
|
'flags')
|
||||||
|
|
||||||
|
def __init__(self, db, eid=None):
|
||||||
|
super().__init__(db, eid)
|
||||||
|
self.title = _("Equipment({})")
|
||||||
@@ -0,0 +1,14 @@
|
|||||||
|
# SPDX-License-Identifier: WTFPL
|
||||||
|
|
||||||
|
from .dbrecord import DbRecord
|
||||||
|
|
||||||
|
class Fuse(DbRecord):
|
||||||
|
|
||||||
|
table = "fuse"
|
||||||
|
pk_field = "fuseid"
|
||||||
|
fields = ('fuseid', 'vid', 'fnumber', 'ftype', 'current', 'cableid',
|
||||||
|
'eid', 'location', 'description', 'remarks')
|
||||||
|
|
||||||
|
def __init__(self, db, fuseid=None):
|
||||||
|
super().__init__(db, fuseid)
|
||||||
|
self.title = _("Fuse({})")
|
||||||
@@ -0,0 +1,14 @@
|
|||||||
|
# SPDX-License-Identifier: WTFPL
|
||||||
|
|
||||||
|
from .dbrecord import DbRecord
|
||||||
|
|
||||||
|
class Inventory(DbRecord):
|
||||||
|
|
||||||
|
table = "inventory"
|
||||||
|
pk_field = "invid"
|
||||||
|
fields = ('invid', 'invname', 'conttype', 'sid', 'boxid', 'eid', 'number',
|
||||||
|
'weight', 'price', 'purchdate', 'invcond', 'remarks', 'flags')
|
||||||
|
|
||||||
|
def __init__(self, db, invid=None):
|
||||||
|
super().__init__(db, invid)
|
||||||
|
self.title = _("Inventory({})")
|
||||||
@@ -0,0 +1,15 @@
|
|||||||
|
# SPDX-License-Identifier: WTFPL
|
||||||
|
|
||||||
|
from .dbrecord import DbRecord
|
||||||
|
|
||||||
|
class Maintenance(DbRecord):
|
||||||
|
|
||||||
|
table = "maintenance"
|
||||||
|
pk_field = "maintid"
|
||||||
|
fields = ('maintid', 'vid', 'eid', 'series', 'activities', 'plan_date',
|
||||||
|
'completion_date', 'interval_hours', 'last_hours', 'remarks',
|
||||||
|
'maintstate')
|
||||||
|
|
||||||
|
def __init__(self, db, maintid=None):
|
||||||
|
super().__init__(db, maintid)
|
||||||
|
self.title = _("Maintenance({})")
|
||||||
@@ -0,0 +1,14 @@
|
|||||||
|
# SPDX-License-Identifier: WTFPL
|
||||||
|
|
||||||
|
from .dbrecord import DbRecord
|
||||||
|
|
||||||
|
class Measurement(DbRecord):
|
||||||
|
|
||||||
|
table = "measurement"
|
||||||
|
pk_field = "mid"
|
||||||
|
fields = ('mid', 'mname', 'vid', 'eid', 'nval', 'val1', 'val2', 'val3',
|
||||||
|
'unit', 'accuracy', 'mdate', 'note')
|
||||||
|
|
||||||
|
def __init__(self, db, mid=None):
|
||||||
|
super().__init__(db, mid)
|
||||||
|
self.title = _("Measurement({})")
|
||||||
@@ -0,0 +1,14 @@
|
|||||||
|
# SPDX-License-Identifier: WTFPL
|
||||||
|
|
||||||
|
from .dbrecord import DbRecord
|
||||||
|
|
||||||
|
class Project(DbRecord):
|
||||||
|
|
||||||
|
table = "project"
|
||||||
|
pk_field = "prokid"
|
||||||
|
fields = ('projid', 'projname', 'vid', 'responsible', 'startdate',
|
||||||
|
'duration', 'costs_plan', 'costs_final', 'remarks', 'projstate')
|
||||||
|
|
||||||
|
def __init__(self, db, projid=None):
|
||||||
|
super().__init__(db, projid)
|
||||||
|
self.title = _("Project({})")
|
||||||
@@ -0,0 +1,15 @@
|
|||||||
|
# SPDX-License-Identifier: WTFPL
|
||||||
|
|
||||||
|
from .dbrecord import DbRecord
|
||||||
|
|
||||||
|
class Provision(DbRecord):
|
||||||
|
|
||||||
|
table = "provisions"
|
||||||
|
pk_field = "provid"
|
||||||
|
fields = ('provid', 'provname', 'provcat', 'sid', 'boxid', 'number',
|
||||||
|
'target', 'weight', 'weight_net', 'unit', 'calories', 'storedate',
|
||||||
|
'shelflife', 'price', 'remarks')
|
||||||
|
|
||||||
|
def __init__(self, db, provid=None):
|
||||||
|
super().__init__(db, provid)
|
||||||
|
self.title = _("Provision({})")
|
||||||
@@ -0,0 +1,23 @@
|
|||||||
|
# SPDX-License-Identifier: WTFPL
|
||||||
|
|
||||||
|
from .dbrecord import DbRecord
|
||||||
|
|
||||||
|
class Storage(DbRecord):
|
||||||
|
|
||||||
|
table = "storage"
|
||||||
|
pk_field = "sid"
|
||||||
|
fields = ('vid', 'sname', 'stype', 'capacity', 'capaunit',
|
||||||
|
'x', 'y', 'z', 'wx', 'wy', 'wz', 'angle', 'color', 'remarks')
|
||||||
|
|
||||||
|
def __init__(self, db, sid=None):
|
||||||
|
super().__init__(db, sid)
|
||||||
|
self.title = _("Storage({})")
|
||||||
|
|
||||||
|
def save(self, commit=True):
|
||||||
|
super().save()
|
||||||
|
if commit:
|
||||||
|
self.conn.commit()
|
||||||
|
|
||||||
|
def delete(self):
|
||||||
|
# there must be no assiciated data!
|
||||||
|
pass
|
||||||
@@ -0,0 +1,14 @@
|
|||||||
|
# SPDX-License-Identifier: WTFPL
|
||||||
|
|
||||||
|
from .dbrecord import DbRecord
|
||||||
|
|
||||||
|
class Task(DbRecord):
|
||||||
|
|
||||||
|
table = "task"
|
||||||
|
pk_field = "taskid"
|
||||||
|
fields = ('taskid', 'vid', 'projid', 'taskname', 'priority', 'taskstate',
|
||||||
|
'state_ts', 'plandate', 'duedate', 'started', 'finished', 'responsible')
|
||||||
|
|
||||||
|
def __init__(self, db, taskid=None):
|
||||||
|
super().__init__(db, taskid)
|
||||||
|
self.title = _("Task({})")
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
# -*- coding: utf-8 -*-
|
# SPDX-License-Identifier: WTFPL
|
||||||
|
|
||||||
import MySQLdb.cursors
|
import MySQLdb.cursors
|
||||||
import bcrypt
|
import bcrypt
|
||||||
@@ -11,9 +11,9 @@ class User(object):
|
|||||||
def genpass(cls, length=12):
|
def genpass(cls, length=12):
|
||||||
return ''.join(random.choices(string.ascii_letters + string.digits, k=length))
|
return ''.join(random.choices(string.ascii_letters + string.digits, k=length))
|
||||||
|
|
||||||
def __init__(self, dbconn, user_id=None):
|
def __init__(self, db, user_id=None):
|
||||||
self.conn = dbconn
|
self.conn = db.conn
|
||||||
self.cur = dbconn.cursor(MySQLdb.cursors.DictCursor)
|
self.cur = db.conn.cursor(MySQLdb.cursors.DictCursor)
|
||||||
if user_id is not None:
|
if user_id is not None:
|
||||||
self.user_id = int(user_id)
|
self.user_id = int(user_id)
|
||||||
self.load()
|
self.load()
|
||||||
@@ -123,7 +123,7 @@ class User(object):
|
|||||||
|
|
||||||
def __repr__(self):
|
def __repr__(self):
|
||||||
# Unique description
|
# Unique description
|
||||||
out = "User(%d)" % self.user_id
|
out = "User({})".format(self.user_id)
|
||||||
return out
|
return out
|
||||||
|
|
||||||
def __str__(self):
|
def __str__(self):
|
||||||
@@ -0,0 +1,46 @@
|
|||||||
|
# SPDX-License-Identifier: WTFPL
|
||||||
|
|
||||||
|
from .dbrecord import DbRecord
|
||||||
|
|
||||||
|
class Vessel(DbRecord):
|
||||||
|
|
||||||
|
table = "vessel"
|
||||||
|
pk_field = "vid"
|
||||||
|
fields = ('vid', 'vtype', 'vesselname', 'model', 'shipyard', 'loa', 'lwl',
|
||||||
|
'beam', 'draught', 'draught_min', 'displacement', 'ballast',
|
||||||
|
'beltpos_aft', 'beltpos_bow', 'shapefile', 'sid_default', 'year_built',
|
||||||
|
'remarks')
|
||||||
|
|
||||||
|
def __init__(self, db, vid=None):
|
||||||
|
super().__init__(db, vid)
|
||||||
|
self.title = _("Vessel({})")
|
||||||
|
|
||||||
|
def create(self):
|
||||||
|
sql = (
|
||||||
|
"SELECT MIN(v1.vid+1) AS newid "
|
||||||
|
"FROM vessel AS v1 LEFT JOIN vessel AS v2 ON v2.vid=v1.vid+1 "
|
||||||
|
"WHERE v1.vid>=0 AND v2.vid IS NULL"
|
||||||
|
)
|
||||||
|
self.dcur.execute(sql)
|
||||||
|
row = self.dcur.fetchone()
|
||||||
|
if row is None:
|
||||||
|
# vessel table empty: create first vessel
|
||||||
|
self.pk_value = 1
|
||||||
|
else:
|
||||||
|
# create additional vessel
|
||||||
|
self.pk_value = row['newid']
|
||||||
|
self.clear()
|
||||||
|
self.vid = self.pk_value
|
||||||
|
self.vesselname = f"Vessel #{self.pk_value}"
|
||||||
|
self.vtype = 1 # monohull
|
||||||
|
self._insert()
|
||||||
|
self.conn.commit()
|
||||||
|
|
||||||
|
def save(self, commit=True):
|
||||||
|
super().save()
|
||||||
|
if commit:
|
||||||
|
self.conn.commit()
|
||||||
|
|
||||||
|
def delete(self):
|
||||||
|
# there must be no assiciated data!
|
||||||
|
pass
|
||||||
@@ -1,3 +1,5 @@
|
|||||||
|
# SPDX-License-Identifier: WTFPL
|
||||||
|
|
||||||
from gi.repository import Gtk
|
from gi.repository import Gtk
|
||||||
|
|
||||||
def add_column(treeview, label, index, xalign=None, col_fg=None, col_bg=None, visible=True):
|
def add_column(treeview, label, index, xalign=None, col_fg=None, col_bg=None, visible=True):
|
||||||
|
|||||||
+1619
File diff suppressed because it is too large
Load Diff
+909
@@ -0,0 +1,909 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<!-- Generated with glade 3.40.0 -->
|
||||||
|
<interface>
|
||||||
|
<requires lib="gtk+" version="3.24"/>
|
||||||
|
<object class="GtkAdjustment" id="adj_price">
|
||||||
|
<property name="upper">90</property>
|
||||||
|
<property name="step-increment">1</property>
|
||||||
|
<property name="page-increment">10</property>
|
||||||
|
</object>
|
||||||
|
<object class="GtkAdjustment" id="adj_weight">
|
||||||
|
<property name="upper">100</property>
|
||||||
|
<property name="step-increment">1</property>
|
||||||
|
<property name="page-increment">10</property>
|
||||||
|
</object>
|
||||||
|
<object class="GtkAdjustment" id="adj_weight_net">
|
||||||
|
<property name="upper">100</property>
|
||||||
|
<property name="step-increment">1</property>
|
||||||
|
<property name="page-increment">10</property>
|
||||||
|
</object>
|
||||||
|
<object class="GtkAdjustment" id="adj_width_x">
|
||||||
|
<property name="upper">9999</property>
|
||||||
|
<property name="step-increment">10</property>
|
||||||
|
<property name="page-increment">100</property>
|
||||||
|
</object>
|
||||||
|
<object class="GtkAdjustment" id="adj_width_y">
|
||||||
|
<property name="upper">9999</property>
|
||||||
|
<property name="step-increment">10</property>
|
||||||
|
<property name="page-increment">100</property>
|
||||||
|
</object>
|
||||||
|
<object class="GtkAdjustment" id="adj_width_z">
|
||||||
|
<property name="upper">9999</property>
|
||||||
|
<property name="step-increment">10</property>
|
||||||
|
<property name="page-increment">100</property>
|
||||||
|
</object>
|
||||||
|
<object class="GtkStack" id="topobject">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can-focus">False</property>
|
||||||
|
<property name="margin-start">8</property>
|
||||||
|
<child>
|
||||||
|
<object class="GtkBox" id="box_box">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can-focus">False</property>
|
||||||
|
<property name="orientation">vertical</property>
|
||||||
|
<child>
|
||||||
|
<object class="GtkExpander">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can-focus">True</property>
|
||||||
|
<child>
|
||||||
|
<!-- n-columns=3 n-rows=2 -->
|
||||||
|
<object class="GtkGrid">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can-focus">False</property>
|
||||||
|
<child>
|
||||||
|
<object class="GtkButtonBox">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can-focus">False</property>
|
||||||
|
<property name="orientation">vertical</property>
|
||||||
|
<property name="layout-style">start</property>
|
||||||
|
<child>
|
||||||
|
<object class="GtkButton" id="but_flt_clear">
|
||||||
|
<property name="label" translatable="yes">Clear</property>
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can-focus">True</property>
|
||||||
|
<property name="receives-default">True</property>
|
||||||
|
</object>
|
||||||
|
<packing>
|
||||||
|
<property name="expand">True</property>
|
||||||
|
<property name="fill">True</property>
|
||||||
|
<property name="position">0</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
<child>
|
||||||
|
<object class="GtkButton" id="but_flt_apply">
|
||||||
|
<property name="label" translatable="yes">Apply</property>
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can-focus">True</property>
|
||||||
|
<property name="receives-default">True</property>
|
||||||
|
</object>
|
||||||
|
<packing>
|
||||||
|
<property name="expand">True</property>
|
||||||
|
<property name="fill">True</property>
|
||||||
|
<property name="position">1</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
</object>
|
||||||
|
<packing>
|
||||||
|
<property name="left-attach">2</property>
|
||||||
|
<property name="top-attach">0</property>
|
||||||
|
<property name="height">2</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
<child>
|
||||||
|
<object class="GtkLabel">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can-focus">False</property>
|
||||||
|
<property name="label" translatable="yes">Type</property>
|
||||||
|
</object>
|
||||||
|
<packing>
|
||||||
|
<property name="left-attach">0</property>
|
||||||
|
<property name="top-attach">0</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
<child>
|
||||||
|
<object class="GtkComboBox" id="cmb_flt_type">
|
||||||
|
<property name="name">cmb_flt_type</property>
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can-focus">False</property>
|
||||||
|
<property name="hexpand">True</property>
|
||||||
|
</object>
|
||||||
|
<packing>
|
||||||
|
<property name="left-attach">1</property>
|
||||||
|
<property name="top-attach">0</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
<child>
|
||||||
|
<object class="GtkLabel">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can-focus">False</property>
|
||||||
|
<property name="label" translatable="yes">Name</property>
|
||||||
|
</object>
|
||||||
|
<packing>
|
||||||
|
<property name="left-attach">0</property>
|
||||||
|
<property name="top-attach">1</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
<child>
|
||||||
|
<object class="GtkEntry" id="ent_flt_name">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can-focus">True</property>
|
||||||
|
</object>
|
||||||
|
<packing>
|
||||||
|
<property name="left-attach">1</property>
|
||||||
|
<property name="top-attach">1</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
</object>
|
||||||
|
</child>
|
||||||
|
<child type="label">
|
||||||
|
<object class="GtkLabel">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can-focus">False</property>
|
||||||
|
<property name="label" translatable="yes">Filter Box</property>
|
||||||
|
</object>
|
||||||
|
</child>
|
||||||
|
</object>
|
||||||
|
<packing>
|
||||||
|
<property name="expand">False</property>
|
||||||
|
<property name="fill">True</property>
|
||||||
|
<property name="position">0</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
<child>
|
||||||
|
<object class="GtkScrolledWindow">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can-focus">True</property>
|
||||||
|
<property name="shadow-type">in</property>
|
||||||
|
<child>
|
||||||
|
<object class="GtkTreeView" id="tvw_box">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can-focus">True</property>
|
||||||
|
<child internal-child="selection">
|
||||||
|
<object class="GtkTreeSelection"/>
|
||||||
|
</child>
|
||||||
|
</object>
|
||||||
|
</child>
|
||||||
|
</object>
|
||||||
|
<packing>
|
||||||
|
<property name="expand">True</property>
|
||||||
|
<property name="fill">True</property>
|
||||||
|
<property name="position">1</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
<child>
|
||||||
|
<object class="GtkButtonBox">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can-focus">False</property>
|
||||||
|
<property name="layout-style">end</property>
|
||||||
|
<child>
|
||||||
|
<object class="GtkButton" id="but_new">
|
||||||
|
<property name="label" translatable="yes">New</property>
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can-focus">True</property>
|
||||||
|
<property name="receives-default">True</property>
|
||||||
|
<signal name="clicked" handler="on_but_new_clicked" swapped="no"/>
|
||||||
|
</object>
|
||||||
|
<packing>
|
||||||
|
<property name="expand">True</property>
|
||||||
|
<property name="fill">True</property>
|
||||||
|
<property name="position">0</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
<child>
|
||||||
|
<object class="GtkButton" id="but_edit">
|
||||||
|
<property name="label" translatable="yes">Edit</property>
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can-focus">True</property>
|
||||||
|
<property name="receives-default">True</property>
|
||||||
|
<signal name="clicked" handler="on_but_edit_clicked" swapped="no"/>
|
||||||
|
</object>
|
||||||
|
<packing>
|
||||||
|
<property name="expand">True</property>
|
||||||
|
<property name="fill">True</property>
|
||||||
|
<property name="position">1</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
<child>
|
||||||
|
<object class="GtkButton" id="but_detail">
|
||||||
|
<property name="label" translatable="yes">Details</property>
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can-focus">True</property>
|
||||||
|
<property name="receives-default">True</property>
|
||||||
|
<signal name="clicked" handler="on_but_detail_clicked" swapped="no"/>
|
||||||
|
</object>
|
||||||
|
<packing>
|
||||||
|
<property name="expand">True</property>
|
||||||
|
<property name="fill">True</property>
|
||||||
|
<property name="position">2</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
</object>
|
||||||
|
<packing>
|
||||||
|
<property name="expand">False</property>
|
||||||
|
<property name="fill">True</property>
|
||||||
|
<property name="position">2</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
</object>
|
||||||
|
<packing>
|
||||||
|
<property name="name">page0</property>
|
||||||
|
<property name="title" translatable="yes">page0</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
<child>
|
||||||
|
<object class="GtkBox" id="box_box_detail">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can-focus">False</property>
|
||||||
|
<property name="orientation">vertical</property>
|
||||||
|
<child>
|
||||||
|
<object class="GtkLabel" id="lbl_title_details">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can-focus">False</property>
|
||||||
|
<property name="label" translatable="yes">Box Details</property>
|
||||||
|
<attributes>
|
||||||
|
<attribute name="weight" value="bold"/>
|
||||||
|
</attributes>
|
||||||
|
</object>
|
||||||
|
<packing>
|
||||||
|
<property name="expand">False</property>
|
||||||
|
<property name="fill">True</property>
|
||||||
|
<property name="position">0</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
<child>
|
||||||
|
<!-- n-columns=2 n-rows=8 -->
|
||||||
|
<object class="GtkGrid" id="grd_details">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can-focus">False</property>
|
||||||
|
<child>
|
||||||
|
<object class="GtkLabel" id="lbl_lb_name">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can-focus">False</property>
|
||||||
|
<property name="label" translatable="yes">Label</property>
|
||||||
|
</object>
|
||||||
|
<packing>
|
||||||
|
<property name="left-attach">0</property>
|
||||||
|
<property name="top-attach">0</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
<child>
|
||||||
|
<object class="GtkLabel" id="lbl_label">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can-focus">False</property>
|
||||||
|
<property name="hexpand">True</property>
|
||||||
|
</object>
|
||||||
|
<packing>
|
||||||
|
<property name="left-attach">1</property>
|
||||||
|
<property name="top-attach">0</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
<child>
|
||||||
|
<object class="GtkLabel" id="lbl_lb_remarks">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can-focus">False</property>
|
||||||
|
<property name="label" translatable="yes">Remarks</property>
|
||||||
|
<property name="yalign">0</property>
|
||||||
|
</object>
|
||||||
|
<packing>
|
||||||
|
<property name="left-attach">0</property>
|
||||||
|
<property name="top-attach">7</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
<child>
|
||||||
|
<object class="GtkLabel" id="lbl_remarks">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can-focus">False</property>
|
||||||
|
<property name="hexpand">True</property>
|
||||||
|
<property name="vexpand">True</property>
|
||||||
|
</object>
|
||||||
|
<packing>
|
||||||
|
<property name="left-attach">1</property>
|
||||||
|
<property name="top-attach">7</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
<child>
|
||||||
|
<object class="GtkLabel" id="lbl_lb_content">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can-focus">False</property>
|
||||||
|
<property name="label" translatable="yes">Content</property>
|
||||||
|
</object>
|
||||||
|
<packing>
|
||||||
|
<property name="left-attach">0</property>
|
||||||
|
<property name="top-attach">1</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
<child>
|
||||||
|
<object class="GtkLabel" id="lbl_content">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can-focus">False</property>
|
||||||
|
<property name="hexpand">True</property>
|
||||||
|
</object>
|
||||||
|
<packing>
|
||||||
|
<property name="left-attach">1</property>
|
||||||
|
<property name="top-attach">1</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
<child>
|
||||||
|
<object class="GtkLabel" id="lbl_lb_type">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can-focus">False</property>
|
||||||
|
<property name="label" translatable="yes">Type</property>
|
||||||
|
</object>
|
||||||
|
<packing>
|
||||||
|
<property name="left-attach">0</property>
|
||||||
|
<property name="top-attach">2</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
<child>
|
||||||
|
<object class="GtkLabel" id="lbl_lb_color">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can-focus">False</property>
|
||||||
|
<property name="label" translatable="yes">Color</property>
|
||||||
|
</object>
|
||||||
|
<packing>
|
||||||
|
<property name="left-attach">0</property>
|
||||||
|
<property name="top-attach">3</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
<child>
|
||||||
|
<object class="GtkLabel" id="lbl_lb_weight">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can-focus">False</property>
|
||||||
|
<property name="label" translatable="yes">Weight</property>
|
||||||
|
</object>
|
||||||
|
<packing>
|
||||||
|
<property name="left-attach">0</property>
|
||||||
|
<property name="top-attach">4</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
<child>
|
||||||
|
<object class="GtkLabel" id="lbl_type">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can-focus">False</property>
|
||||||
|
<property name="hexpand">True</property>
|
||||||
|
</object>
|
||||||
|
<packing>
|
||||||
|
<property name="left-attach">1</property>
|
||||||
|
<property name="top-attach">2</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
<child>
|
||||||
|
<object class="GtkLabel" id="lbl_color">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can-focus">False</property>
|
||||||
|
<property name="hexpand">True</property>
|
||||||
|
</object>
|
||||||
|
<packing>
|
||||||
|
<property name="left-attach">1</property>
|
||||||
|
<property name="top-attach">3</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
<child>
|
||||||
|
<object class="GtkLabel" id="lbl_weight">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can-focus">False</property>
|
||||||
|
<property name="hexpand">True</property>
|
||||||
|
</object>
|
||||||
|
<packing>
|
||||||
|
<property name="left-attach">1</property>
|
||||||
|
<property name="top-attach">4</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
<child>
|
||||||
|
<object class="GtkLabel" id="lbl_lb_weight_net">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can-focus">False</property>
|
||||||
|
<property name="label" translatable="yes">Weight net</property>
|
||||||
|
</object>
|
||||||
|
<packing>
|
||||||
|
<property name="left-attach">0</property>
|
||||||
|
<property name="top-attach">5</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
<child>
|
||||||
|
<object class="GtkLabel" id="lbl_weight_net">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can-focus">False</property>
|
||||||
|
<property name="hexpand">True</property>
|
||||||
|
</object>
|
||||||
|
<packing>
|
||||||
|
<property name="left-attach">1</property>
|
||||||
|
<property name="top-attach">5</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
<child>
|
||||||
|
<object class="GtkLabel" id="lbl_lb_price">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can-focus">False</property>
|
||||||
|
<property name="label" translatable="yes">Price</property>
|
||||||
|
</object>
|
||||||
|
<packing>
|
||||||
|
<property name="left-attach">0</property>
|
||||||
|
<property name="top-attach">6</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
<child>
|
||||||
|
<object class="GtkLabel" id="lbl_price">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can-focus">False</property>
|
||||||
|
<property name="hexpand">True</property>
|
||||||
|
</object>
|
||||||
|
<packing>
|
||||||
|
<property name="left-attach">1</property>
|
||||||
|
<property name="top-attach">6</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
</object>
|
||||||
|
<packing>
|
||||||
|
<property name="expand">True</property>
|
||||||
|
<property name="fill">True</property>
|
||||||
|
<property name="position">1</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
<child>
|
||||||
|
<object class="GtkButtonBox">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can-focus">False</property>
|
||||||
|
<property name="layout-style">end</property>
|
||||||
|
<child>
|
||||||
|
<object class="GtkButton" id="but_delete">
|
||||||
|
<property name="label" translatable="yes">Delete</property>
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can-focus">True</property>
|
||||||
|
<property name="receives-default">True</property>
|
||||||
|
<signal name="clicked" handler="on_but_delete_clicked" swapped="no"/>
|
||||||
|
</object>
|
||||||
|
<packing>
|
||||||
|
<property name="expand">True</property>
|
||||||
|
<property name="fill">True</property>
|
||||||
|
<property name="position">0</property>
|
||||||
|
<property name="secondary">True</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
<child>
|
||||||
|
<object class="GtkButton" id="but_edit2">
|
||||||
|
<property name="label" translatable="yes">Edit</property>
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can-focus">True</property>
|
||||||
|
<property name="receives-default">True</property>
|
||||||
|
<signal name="clicked" handler="on_but_edit_clicked" swapped="no"/>
|
||||||
|
</object>
|
||||||
|
<packing>
|
||||||
|
<property name="expand">True</property>
|
||||||
|
<property name="fill">True</property>
|
||||||
|
<property name="position">1</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
<child>
|
||||||
|
<object class="GtkButton" id="but_close">
|
||||||
|
<property name="label" translatable="yes">Close</property>
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can-focus">True</property>
|
||||||
|
<property name="receives-default">True</property>
|
||||||
|
<signal name="clicked" handler="on_but_close_clicked" swapped="no"/>
|
||||||
|
</object>
|
||||||
|
<packing>
|
||||||
|
<property name="expand">True</property>
|
||||||
|
<property name="fill">True</property>
|
||||||
|
<property name="position">2</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
</object>
|
||||||
|
<packing>
|
||||||
|
<property name="expand">False</property>
|
||||||
|
<property name="fill">True</property>
|
||||||
|
<property name="position">2</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
</object>
|
||||||
|
<packing>
|
||||||
|
<property name="name">page1</property>
|
||||||
|
<property name="title" translatable="yes">page1</property>
|
||||||
|
<property name="position">1</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
<child>
|
||||||
|
<object class="GtkBox" id="box_box_edit">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can-focus">False</property>
|
||||||
|
<property name="orientation">vertical</property>
|
||||||
|
<child>
|
||||||
|
<object class="GtkLabel" id="lbl_title_edit">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can-focus">False</property>
|
||||||
|
<property name="label" translatable="yes">Edit Box</property>
|
||||||
|
<attributes>
|
||||||
|
<attribute name="weight" value="bold"/>
|
||||||
|
</attributes>
|
||||||
|
</object>
|
||||||
|
<packing>
|
||||||
|
<property name="expand">False</property>
|
||||||
|
<property name="fill">True</property>
|
||||||
|
<property name="position">0</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
<child>
|
||||||
|
<!-- n-columns=7 n-rows=9 -->
|
||||||
|
<object class="GtkGrid" id="grd_editor">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can-focus">False</property>
|
||||||
|
<child>
|
||||||
|
<object class="GtkLabel">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can-focus">False</property>
|
||||||
|
<property name="label" translatable="yes">Label</property>
|
||||||
|
</object>
|
||||||
|
<packing>
|
||||||
|
<property name="left-attach">0</property>
|
||||||
|
<property name="top-attach">0</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
<child>
|
||||||
|
<object class="GtkLabel">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can-focus">False</property>
|
||||||
|
<property name="label" translatable="yes">Type</property>
|
||||||
|
</object>
|
||||||
|
<packing>
|
||||||
|
<property name="left-attach">0</property>
|
||||||
|
<property name="top-attach">1</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
<child>
|
||||||
|
<object class="GtkEntry" id="ent_label">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can-focus">True</property>
|
||||||
|
</object>
|
||||||
|
<packing>
|
||||||
|
<property name="left-attach">1</property>
|
||||||
|
<property name="top-attach">0</property>
|
||||||
|
<property name="width">6</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
<child>
|
||||||
|
<object class="GtkComboBox" id="cmb_type">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can-focus">False</property>
|
||||||
|
</object>
|
||||||
|
<packing>
|
||||||
|
<property name="left-attach">1</property>
|
||||||
|
<property name="top-attach">1</property>
|
||||||
|
<property name="width">6</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
<child>
|
||||||
|
<object class="GtkLabel">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can-focus">False</property>
|
||||||
|
<property name="label" translatable="yes">Dimensions (L x W x H)</property>
|
||||||
|
</object>
|
||||||
|
<packing>
|
||||||
|
<property name="left-attach">0</property>
|
||||||
|
<property name="top-attach">3</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
<child>
|
||||||
|
<object class="GtkLabel">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can-focus">False</property>
|
||||||
|
<property name="margin-start">4</property>
|
||||||
|
<property name="margin-end">4</property>
|
||||||
|
<property name="label" translatable="yes">x</property>
|
||||||
|
</object>
|
||||||
|
<packing>
|
||||||
|
<property name="left-attach">2</property>
|
||||||
|
<property name="top-attach">3</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
<child>
|
||||||
|
<object class="GtkLabel">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can-focus">False</property>
|
||||||
|
<property name="margin-start">4</property>
|
||||||
|
<property name="margin-end">4</property>
|
||||||
|
<property name="label" translatable="yes">x</property>
|
||||||
|
</object>
|
||||||
|
<packing>
|
||||||
|
<property name="left-attach">4</property>
|
||||||
|
<property name="top-attach">3</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
<child>
|
||||||
|
<object class="GtkSpinButton" id="spi_wx">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can-focus">True</property>
|
||||||
|
<property name="max-length">4</property>
|
||||||
|
<property name="width-chars">4</property>
|
||||||
|
<property name="text" translatable="yes">0</property>
|
||||||
|
<property name="adjustment">adj_width_x</property>
|
||||||
|
<property name="numeric">True</property>
|
||||||
|
</object>
|
||||||
|
<packing>
|
||||||
|
<property name="left-attach">1</property>
|
||||||
|
<property name="top-attach">3</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
<child>
|
||||||
|
<object class="GtkSpinButton" id="spi_wy">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can-focus">True</property>
|
||||||
|
<property name="max-length">4</property>
|
||||||
|
<property name="width-chars">4</property>
|
||||||
|
<property name="text" translatable="yes">0</property>
|
||||||
|
<property name="adjustment">adj_width_y</property>
|
||||||
|
<property name="numeric">True</property>
|
||||||
|
</object>
|
||||||
|
<packing>
|
||||||
|
<property name="left-attach">3</property>
|
||||||
|
<property name="top-attach">3</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
<child>
|
||||||
|
<object class="GtkSpinButton" id="spi_wz">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can-focus">True</property>
|
||||||
|
<property name="max-length">4</property>
|
||||||
|
<property name="width-chars">4</property>
|
||||||
|
<property name="text" translatable="yes">0</property>
|
||||||
|
<property name="adjustment">adj_width_z</property>
|
||||||
|
<property name="numeric">True</property>
|
||||||
|
</object>
|
||||||
|
<packing>
|
||||||
|
<property name="left-attach">5</property>
|
||||||
|
<property name="top-attach">3</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
<child>
|
||||||
|
<object class="GtkLabel">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can-focus">False</property>
|
||||||
|
<property name="label" translatable="yes">Price</property>
|
||||||
|
</object>
|
||||||
|
<packing>
|
||||||
|
<property name="left-attach">0</property>
|
||||||
|
<property name="top-attach">5</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
<child>
|
||||||
|
<object class="GtkLabel">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can-focus">False</property>
|
||||||
|
<property name="label" translatable="yes">Weight</property>
|
||||||
|
</object>
|
||||||
|
<packing>
|
||||||
|
<property name="left-attach">0</property>
|
||||||
|
<property name="top-attach">6</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
<child>
|
||||||
|
<object class="GtkLabel">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can-focus">False</property>
|
||||||
|
<property name="label" translatable="yes">Remarks</property>
|
||||||
|
</object>
|
||||||
|
<packing>
|
||||||
|
<property name="left-attach">0</property>
|
||||||
|
<property name="top-attach">8</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
<child>
|
||||||
|
<object class="GtkScrolledWindow">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can-focus">True</property>
|
||||||
|
<property name="shadow-type">in</property>
|
||||||
|
<child>
|
||||||
|
<object class="GtkTextView" id="txt_remarks">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can-focus">True</property>
|
||||||
|
</object>
|
||||||
|
</child>
|
||||||
|
</object>
|
||||||
|
<packing>
|
||||||
|
<property name="left-attach">1</property>
|
||||||
|
<property name="top-attach">8</property>
|
||||||
|
<property name="width">6</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
<child>
|
||||||
|
<object class="GtkLabel">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can-focus">False</property>
|
||||||
|
<property name="label" translatable="yes">Weight net</property>
|
||||||
|
</object>
|
||||||
|
<packing>
|
||||||
|
<property name="left-attach">0</property>
|
||||||
|
<property name="top-attach">7</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
<child>
|
||||||
|
<object class="GtkLabel">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can-focus">False</property>
|
||||||
|
<property name="margin-start">4</property>
|
||||||
|
<property name="margin-end">4</property>
|
||||||
|
<property name="label" translatable="yes">mm</property>
|
||||||
|
</object>
|
||||||
|
<packing>
|
||||||
|
<property name="left-attach">6</property>
|
||||||
|
<property name="top-attach">3</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
<child>
|
||||||
|
<object class="GtkLabel">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can-focus">False</property>
|
||||||
|
<property name="label" translatable="yes">Content</property>
|
||||||
|
</object>
|
||||||
|
<packing>
|
||||||
|
<property name="left-attach">0</property>
|
||||||
|
<property name="top-attach">2</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
<child>
|
||||||
|
<object class="GtkEntry" id="ent_content">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can-focus">True</property>
|
||||||
|
</object>
|
||||||
|
<packing>
|
||||||
|
<property name="left-attach">1</property>
|
||||||
|
<property name="top-attach">2</property>
|
||||||
|
<property name="width">6</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
<child>
|
||||||
|
<object class="GtkSpinButton" id="spi_weight_net">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can-focus">True</property>
|
||||||
|
<property name="text" translatable="yes">0</property>
|
||||||
|
<property name="adjustment">adj_weight_net</property>
|
||||||
|
</object>
|
||||||
|
<packing>
|
||||||
|
<property name="left-attach">1</property>
|
||||||
|
<property name="top-attach">7</property>
|
||||||
|
<property name="width">3</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
<child>
|
||||||
|
<object class="GtkSpinButton" id="spi_weight">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can-focus">True</property>
|
||||||
|
<property name="text" translatable="yes">0</property>
|
||||||
|
<property name="adjustment">adj_weight</property>
|
||||||
|
</object>
|
||||||
|
<packing>
|
||||||
|
<property name="left-attach">1</property>
|
||||||
|
<property name="top-attach">6</property>
|
||||||
|
<property name="width">3</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
<child>
|
||||||
|
<object class="GtkSpinButton" id="spi_price">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can-focus">True</property>
|
||||||
|
<property name="text" translatable="yes">0</property>
|
||||||
|
<property name="adjustment">adj_price</property>
|
||||||
|
</object>
|
||||||
|
<packing>
|
||||||
|
<property name="left-attach">1</property>
|
||||||
|
<property name="top-attach">5</property>
|
||||||
|
<property name="width">3</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
<child>
|
||||||
|
<object class="GtkLabel">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can-focus">False</property>
|
||||||
|
<property name="label" translatable="yes">Color</property>
|
||||||
|
</object>
|
||||||
|
<packing>
|
||||||
|
<property name="left-attach">0</property>
|
||||||
|
<property name="top-attach">4</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
<child>
|
||||||
|
<object class="GtkButton" id="but_color">
|
||||||
|
<property name="label" translatable="yes">#FFFFFF</property>
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can-focus">True</property>
|
||||||
|
<property name="receives-default">True</property>
|
||||||
|
<property name="relief">half</property>
|
||||||
|
<signal name="clicked" handler="on_but_color_clicked" swapped="no"/>
|
||||||
|
</object>
|
||||||
|
<packing>
|
||||||
|
<property name="left-attach">1</property>
|
||||||
|
<property name="top-attach">4</property>
|
||||||
|
<property name="width">3</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
<child>
|
||||||
|
<placeholder/>
|
||||||
|
</child>
|
||||||
|
<child>
|
||||||
|
<placeholder/>
|
||||||
|
</child>
|
||||||
|
<child>
|
||||||
|
<placeholder/>
|
||||||
|
</child>
|
||||||
|
<child>
|
||||||
|
<placeholder/>
|
||||||
|
</child>
|
||||||
|
<child>
|
||||||
|
<placeholder/>
|
||||||
|
</child>
|
||||||
|
<child>
|
||||||
|
<placeholder/>
|
||||||
|
</child>
|
||||||
|
<child>
|
||||||
|
<placeholder/>
|
||||||
|
</child>
|
||||||
|
<child>
|
||||||
|
<placeholder/>
|
||||||
|
</child>
|
||||||
|
<child>
|
||||||
|
<placeholder/>
|
||||||
|
</child>
|
||||||
|
<child>
|
||||||
|
<placeholder/>
|
||||||
|
</child>
|
||||||
|
<child>
|
||||||
|
<placeholder/>
|
||||||
|
</child>
|
||||||
|
<child>
|
||||||
|
<placeholder/>
|
||||||
|
</child>
|
||||||
|
</object>
|
||||||
|
<packing>
|
||||||
|
<property name="expand">True</property>
|
||||||
|
<property name="fill">True</property>
|
||||||
|
<property name="position">1</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
<child>
|
||||||
|
<object class="GtkButtonBox">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can-focus">False</property>
|
||||||
|
<property name="layout-style">end</property>
|
||||||
|
<child>
|
||||||
|
<object class="GtkButton" id="but_save">
|
||||||
|
<property name="label" translatable="yes">Save</property>
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can-focus">True</property>
|
||||||
|
<property name="receives-default">True</property>
|
||||||
|
<signal name="clicked" handler="on_but_save_clicked" swapped="no"/>
|
||||||
|
</object>
|
||||||
|
<packing>
|
||||||
|
<property name="expand">True</property>
|
||||||
|
<property name="fill">True</property>
|
||||||
|
<property name="position">0</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
<child>
|
||||||
|
<object class="GtkButton" id="but_cancel">
|
||||||
|
<property name="label" translatable="yes">Cancel</property>
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can-focus">True</property>
|
||||||
|
<property name="receives-default">True</property>
|
||||||
|
<signal name="clicked" handler="on_but_cancel_clicked" swapped="no"/>
|
||||||
|
</object>
|
||||||
|
<packing>
|
||||||
|
<property name="expand">True</property>
|
||||||
|
<property name="fill">True</property>
|
||||||
|
<property name="position">2</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
</object>
|
||||||
|
<packing>
|
||||||
|
<property name="expand">False</property>
|
||||||
|
<property name="fill">True</property>
|
||||||
|
<property name="position">2</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
</object>
|
||||||
|
<packing>
|
||||||
|
<property name="name">page2</property>
|
||||||
|
<property name="title" translatable="yes">page2</property>
|
||||||
|
<property name="position">2</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
</object>
|
||||||
|
</interface>
|
||||||
+1001
File diff suppressed because it is too large
Load Diff
+1024
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,668 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<!-- Generated with glade 3.40.0 -->
|
||||||
|
<interface>
|
||||||
|
<requires lib="gtk+" version="3.24"/>
|
||||||
|
<object class="GtkStack" id="topobject">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can-focus">False</property>
|
||||||
|
<property name="margin-start">8</property>
|
||||||
|
<child>
|
||||||
|
<object class="GtkBox" id="box_documents">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can-focus">False</property>
|
||||||
|
<property name="orientation">vertical</property>
|
||||||
|
<child>
|
||||||
|
<object class="GtkExpander">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can-focus">True</property>
|
||||||
|
<child>
|
||||||
|
<!-- n-columns=3 n-rows=3 -->
|
||||||
|
<object class="GtkGrid">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can-focus">False</property>
|
||||||
|
<child>
|
||||||
|
<object class="GtkButtonBox">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can-focus">False</property>
|
||||||
|
<property name="orientation">vertical</property>
|
||||||
|
<property name="layout-style">start</property>
|
||||||
|
<child>
|
||||||
|
<object class="GtkButton">
|
||||||
|
<property name="label" translatable="yes">Clear</property>
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can-focus">True</property>
|
||||||
|
<property name="receives-default">True</property>
|
||||||
|
</object>
|
||||||
|
<packing>
|
||||||
|
<property name="expand">True</property>
|
||||||
|
<property name="fill">True</property>
|
||||||
|
<property name="position">0</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
<child>
|
||||||
|
<object class="GtkButton">
|
||||||
|
<property name="label" translatable="yes">Apply</property>
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can-focus">True</property>
|
||||||
|
<property name="receives-default">True</property>
|
||||||
|
</object>
|
||||||
|
<packing>
|
||||||
|
<property name="expand">True</property>
|
||||||
|
<property name="fill">True</property>
|
||||||
|
<property name="position">1</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
</object>
|
||||||
|
<packing>
|
||||||
|
<property name="left-attach">2</property>
|
||||||
|
<property name="top-attach">0</property>
|
||||||
|
<property name="height">3</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
<child>
|
||||||
|
<object class="GtkLabel">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can-focus">False</property>
|
||||||
|
<property name="label" translatable="yes">Type</property>
|
||||||
|
</object>
|
||||||
|
<packing>
|
||||||
|
<property name="left-attach">0</property>
|
||||||
|
<property name="top-attach">0</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
<child>
|
||||||
|
<object class="GtkLabel">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can-focus">False</property>
|
||||||
|
<property name="label" translatable="yes">Reference</property>
|
||||||
|
</object>
|
||||||
|
<packing>
|
||||||
|
<property name="left-attach">0</property>
|
||||||
|
<property name="top-attach">1</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
<child>
|
||||||
|
<object class="GtkLabel">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can-focus">False</property>
|
||||||
|
<property name="label" translatable="yes">Text</property>
|
||||||
|
</object>
|
||||||
|
<packing>
|
||||||
|
<property name="left-attach">0</property>
|
||||||
|
<property name="top-attach">2</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
<child>
|
||||||
|
<object class="GtkComboBox">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can-focus">False</property>
|
||||||
|
</object>
|
||||||
|
<packing>
|
||||||
|
<property name="left-attach">1</property>
|
||||||
|
<property name="top-attach">0</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
<child>
|
||||||
|
<object class="GtkComboBox">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can-focus">False</property>
|
||||||
|
</object>
|
||||||
|
<packing>
|
||||||
|
<property name="left-attach">1</property>
|
||||||
|
<property name="top-attach">1</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
<child>
|
||||||
|
<object class="GtkEntry">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can-focus">True</property>
|
||||||
|
</object>
|
||||||
|
<packing>
|
||||||
|
<property name="left-attach">1</property>
|
||||||
|
<property name="top-attach">2</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
</object>
|
||||||
|
</child>
|
||||||
|
<child type="label">
|
||||||
|
<object class="GtkLabel">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can-focus">False</property>
|
||||||
|
<property name="label" translatable="yes">Filter Documents</property>
|
||||||
|
</object>
|
||||||
|
</child>
|
||||||
|
</object>
|
||||||
|
<packing>
|
||||||
|
<property name="expand">False</property>
|
||||||
|
<property name="fill">True</property>
|
||||||
|
<property name="position">0</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
<child>
|
||||||
|
<object class="GtkScrolledWindow">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can-focus">True</property>
|
||||||
|
<property name="shadow-type">in</property>
|
||||||
|
<child>
|
||||||
|
<object class="GtkTreeView" id="tvw_documents">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can-focus">True</property>
|
||||||
|
<child internal-child="selection">
|
||||||
|
<object class="GtkTreeSelection"/>
|
||||||
|
</child>
|
||||||
|
</object>
|
||||||
|
</child>
|
||||||
|
</object>
|
||||||
|
<packing>
|
||||||
|
<property name="expand">True</property>
|
||||||
|
<property name="fill">True</property>
|
||||||
|
<property name="position">1</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
<child>
|
||||||
|
<object class="GtkButtonBox">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can-focus">False</property>
|
||||||
|
<property name="layout-style">end</property>
|
||||||
|
<child>
|
||||||
|
<object class="GtkButton" id="but_new">
|
||||||
|
<property name="label" translatable="yes">New</property>
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can-focus">True</property>
|
||||||
|
<property name="receives-default">True</property>
|
||||||
|
<signal name="clicked" handler="on_but_new_clicked" swapped="no"/>
|
||||||
|
</object>
|
||||||
|
<packing>
|
||||||
|
<property name="expand">True</property>
|
||||||
|
<property name="fill">True</property>
|
||||||
|
<property name="position">0</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
<child>
|
||||||
|
<object class="GtkButton" id="but_edit">
|
||||||
|
<property name="label" translatable="yes">Edit</property>
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can-focus">True</property>
|
||||||
|
<property name="receives-default">True</property>
|
||||||
|
<signal name="clicked" handler="on_but_edit_clicked" swapped="no"/>
|
||||||
|
</object>
|
||||||
|
<packing>
|
||||||
|
<property name="expand">True</property>
|
||||||
|
<property name="fill">True</property>
|
||||||
|
<property name="position">1</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
<child>
|
||||||
|
<object class="GtkButton" id="but_detail">
|
||||||
|
<property name="label" translatable="yes">Details</property>
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can-focus">True</property>
|
||||||
|
<property name="receives-default">True</property>
|
||||||
|
<signal name="clicked" handler="on_but_detail_clicked" swapped="no"/>
|
||||||
|
</object>
|
||||||
|
<packing>
|
||||||
|
<property name="expand">True</property>
|
||||||
|
<property name="fill">True</property>
|
||||||
|
<property name="position">2</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
</object>
|
||||||
|
<packing>
|
||||||
|
<property name="expand">False</property>
|
||||||
|
<property name="fill">True</property>
|
||||||
|
<property name="position">2</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
</object>
|
||||||
|
<packing>
|
||||||
|
<property name="name">page0</property>
|
||||||
|
<property name="title" translatable="yes">page0</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
<child>
|
||||||
|
<object class="GtkBox" id="box_doc_detail">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can-focus">False</property>
|
||||||
|
<property name="orientation">vertical</property>
|
||||||
|
<child>
|
||||||
|
<object class="GtkLabel">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can-focus">False</property>
|
||||||
|
<property name="label" translatable="yes">Document Details</property>
|
||||||
|
<attributes>
|
||||||
|
<attribute name="weight" value="bold"/>
|
||||||
|
</attributes>
|
||||||
|
</object>
|
||||||
|
<packing>
|
||||||
|
<property name="expand">False</property>
|
||||||
|
<property name="fill">True</property>
|
||||||
|
<property name="position">0</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
<child>
|
||||||
|
<!-- n-columns=2 n-rows=8 -->
|
||||||
|
<object class="GtkGrid" id="grd_details">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can-focus">False</property>
|
||||||
|
<child>
|
||||||
|
<object class="GtkLabel" id="lbl_lb_title">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can-focus">False</property>
|
||||||
|
<property name="label" translatable="yes">Title</property>
|
||||||
|
</object>
|
||||||
|
<packing>
|
||||||
|
<property name="left-attach">0</property>
|
||||||
|
<property name="top-attach">0</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
<child>
|
||||||
|
<object class="GtkLabel" id="lbl_title">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can-focus">False</property>
|
||||||
|
<property name="hexpand">True</property>
|
||||||
|
</object>
|
||||||
|
<packing>
|
||||||
|
<property name="left-attach">1</property>
|
||||||
|
<property name="top-attach">0</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
<child>
|
||||||
|
<object class="GtkLabel" id="lbl_lb_filename">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can-focus">False</property>
|
||||||
|
<property name="label" translatable="yes">Filename</property>
|
||||||
|
</object>
|
||||||
|
<packing>
|
||||||
|
<property name="left-attach">0</property>
|
||||||
|
<property name="top-attach">1</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
<child>
|
||||||
|
<object class="GtkLabel" id="lbl_lb_extents">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can-focus">False</property>
|
||||||
|
<property name="label" translatable="yes">Image extents</property>
|
||||||
|
</object>
|
||||||
|
<packing>
|
||||||
|
<property name="left-attach">0</property>
|
||||||
|
<property name="top-attach">2</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
<child>
|
||||||
|
<object class="GtkLabel" id="lbl_lb_mimetype">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can-focus">False</property>
|
||||||
|
<property name="label" translatable="yes">Mimetype</property>
|
||||||
|
</object>
|
||||||
|
<packing>
|
||||||
|
<property name="left-attach">0</property>
|
||||||
|
<property name="top-attach">3</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
<child>
|
||||||
|
<object class="GtkLabel" id="lbl_filename">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can-focus">False</property>
|
||||||
|
<property name="hexpand">True</property>
|
||||||
|
</object>
|
||||||
|
<packing>
|
||||||
|
<property name="left-attach">1</property>
|
||||||
|
<property name="top-attach">1</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
<child>
|
||||||
|
<object class="GtkLabel" id="lbl_extents">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can-focus">False</property>
|
||||||
|
<property name="hexpand">True</property>
|
||||||
|
</object>
|
||||||
|
<packing>
|
||||||
|
<property name="left-attach">1</property>
|
||||||
|
<property name="top-attach">2</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
<child>
|
||||||
|
<object class="GtkLabel" id="lbl_mimetype">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can-focus">False</property>
|
||||||
|
<property name="hexpand">True</property>
|
||||||
|
</object>
|
||||||
|
<packing>
|
||||||
|
<property name="left-attach">1</property>
|
||||||
|
<property name="top-attach">3</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
<child>
|
||||||
|
<object class="GtkLabel" id="lbl_lb_filesize">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can-focus">False</property>
|
||||||
|
<property name="label" translatable="yes">File size</property>
|
||||||
|
</object>
|
||||||
|
<packing>
|
||||||
|
<property name="left-attach">0</property>
|
||||||
|
<property name="top-attach">4</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
<child>
|
||||||
|
<object class="GtkLabel" id="lbl_lb_date">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can-focus">False</property>
|
||||||
|
<property name="label" translatable="yes">Upload date</property>
|
||||||
|
</object>
|
||||||
|
<packing>
|
||||||
|
<property name="left-attach">0</property>
|
||||||
|
<property name="top-attach">5</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
<child>
|
||||||
|
<object class="GtkLabel" id="lbl_lb_doctype">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can-focus">False</property>
|
||||||
|
<property name="label" translatable="yes">Document type</property>
|
||||||
|
</object>
|
||||||
|
<packing>
|
||||||
|
<property name="left-attach">0</property>
|
||||||
|
<property name="top-attach">6</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
<child>
|
||||||
|
<object class="GtkLabel" id="lbl_filesize">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can-focus">False</property>
|
||||||
|
<property name="hexpand">True</property>
|
||||||
|
</object>
|
||||||
|
<packing>
|
||||||
|
<property name="left-attach">1</property>
|
||||||
|
<property name="top-attach">4</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
<child>
|
||||||
|
<object class="GtkLabel" id="lbl_date">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can-focus">False</property>
|
||||||
|
<property name="hexpand">True</property>
|
||||||
|
</object>
|
||||||
|
<packing>
|
||||||
|
<property name="left-attach">1</property>
|
||||||
|
<property name="top-attach">5</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
<child>
|
||||||
|
<object class="GtkLabel" id="lbl_doctype">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can-focus">False</property>
|
||||||
|
<property name="hexpand">True</property>
|
||||||
|
</object>
|
||||||
|
<packing>
|
||||||
|
<property name="left-attach">1</property>
|
||||||
|
<property name="top-attach">6</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
<child>
|
||||||
|
<object class="GtkLabel" id="lbl_lb_doctype1">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can-focus">False</property>
|
||||||
|
<property name="label" translatable="yes">Remarks</property>
|
||||||
|
</object>
|
||||||
|
<packing>
|
||||||
|
<property name="left-attach">0</property>
|
||||||
|
<property name="top-attach">7</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
<child>
|
||||||
|
<object class="GtkLabel" id="lbl_remarks">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can-focus">False</property>
|
||||||
|
<property name="hexpand">True</property>
|
||||||
|
<property name="vexpand">True</property>
|
||||||
|
</object>
|
||||||
|
<packing>
|
||||||
|
<property name="left-attach">1</property>
|
||||||
|
<property name="top-attach">7</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
</object>
|
||||||
|
<packing>
|
||||||
|
<property name="expand">False</property>
|
||||||
|
<property name="fill">True</property>
|
||||||
|
<property name="position">1</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
<child>
|
||||||
|
<object class="GtkButtonBox">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can-focus">False</property>
|
||||||
|
<property name="layout-style">end</property>
|
||||||
|
<child>
|
||||||
|
<object class="GtkButton" id="but_delete">
|
||||||
|
<property name="label" translatable="yes">Delete</property>
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can-focus">True</property>
|
||||||
|
<property name="receives-default">True</property>
|
||||||
|
<signal name="clicked" handler="on_but_delete_clicked" swapped="no"/>
|
||||||
|
</object>
|
||||||
|
<packing>
|
||||||
|
<property name="expand">True</property>
|
||||||
|
<property name="fill">True</property>
|
||||||
|
<property name="position">0</property>
|
||||||
|
<property name="secondary">True</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
<child>
|
||||||
|
<object class="GtkButton" id="but_edit2">
|
||||||
|
<property name="label" translatable="yes">Edit</property>
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can-focus">True</property>
|
||||||
|
<property name="receives-default">True</property>
|
||||||
|
<signal name="clicked" handler="on_but_edit_clicked" swapped="no"/>
|
||||||
|
</object>
|
||||||
|
<packing>
|
||||||
|
<property name="expand">True</property>
|
||||||
|
<property name="fill">True</property>
|
||||||
|
<property name="position">1</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
<child>
|
||||||
|
<object class="GtkButton" id="but_close">
|
||||||
|
<property name="label" translatable="yes">Close</property>
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can-focus">True</property>
|
||||||
|
<property name="receives-default">True</property>
|
||||||
|
<signal name="clicked" handler="on_but_close_clicked" swapped="no"/>
|
||||||
|
</object>
|
||||||
|
<packing>
|
||||||
|
<property name="expand">True</property>
|
||||||
|
<property name="fill">True</property>
|
||||||
|
<property name="position">2</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
</object>
|
||||||
|
<packing>
|
||||||
|
<property name="expand">False</property>
|
||||||
|
<property name="fill">True</property>
|
||||||
|
<property name="position">2</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
</object>
|
||||||
|
<packing>
|
||||||
|
<property name="name">page1</property>
|
||||||
|
<property name="title" translatable="yes">page1</property>
|
||||||
|
<property name="position">1</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
<child>
|
||||||
|
<object class="GtkBox" id="box_doc_edit">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can-focus">False</property>
|
||||||
|
<property name="orientation">vertical</property>
|
||||||
|
<child>
|
||||||
|
<object class="GtkLabel" id="lbl_title_edit">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can-focus">False</property>
|
||||||
|
<property name="label" translatable="yes">Edit Document</property>
|
||||||
|
<attributes>
|
||||||
|
<attribute name="weight" value="bold"/>
|
||||||
|
</attributes>
|
||||||
|
</object>
|
||||||
|
<packing>
|
||||||
|
<property name="expand">False</property>
|
||||||
|
<property name="fill">True</property>
|
||||||
|
<property name="position">0</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
<child>
|
||||||
|
<!-- n-columns=2 n-rows=4 -->
|
||||||
|
<object class="GtkGrid" id="grd_editor">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can-focus">False</property>
|
||||||
|
<child>
|
||||||
|
<object class="GtkLabel">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can-focus">False</property>
|
||||||
|
<property name="label" translatable="yes">Title</property>
|
||||||
|
</object>
|
||||||
|
<packing>
|
||||||
|
<property name="left-attach">0</property>
|
||||||
|
<property name="top-attach">1</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
<child>
|
||||||
|
<object class="GtkEntry" id="ent_title">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can-focus">True</property>
|
||||||
|
<property name="hexpand">True</property>
|
||||||
|
</object>
|
||||||
|
<packing>
|
||||||
|
<property name="left-attach">1</property>
|
||||||
|
<property name="top-attach">1</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
<child>
|
||||||
|
<object class="GtkLabel">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can-focus">False</property>
|
||||||
|
<property name="label" translatable="yes">Filename</property>
|
||||||
|
</object>
|
||||||
|
<packing>
|
||||||
|
<property name="left-attach">0</property>
|
||||||
|
<property name="top-attach">2</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
<child>
|
||||||
|
<object class="GtkLabel">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can-focus">False</property>
|
||||||
|
<property name="label" translatable="yes">Remarks</property>
|
||||||
|
<property name="yalign">0</property>
|
||||||
|
</object>
|
||||||
|
<packing>
|
||||||
|
<property name="left-attach">0</property>
|
||||||
|
<property name="top-attach">3</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
<child>
|
||||||
|
<object class="GtkEntry" id="ent_filename">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can-focus">True</property>
|
||||||
|
</object>
|
||||||
|
<packing>
|
||||||
|
<property name="left-attach">1</property>
|
||||||
|
<property name="top-attach">2</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
<child>
|
||||||
|
<object class="GtkScrolledWindow">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can-focus">True</property>
|
||||||
|
<property name="hexpand">False</property>
|
||||||
|
<property name="vexpand">False</property>
|
||||||
|
<property name="shadow-type">in</property>
|
||||||
|
<child>
|
||||||
|
<object class="GtkTextView" id="txt_remarks">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can-focus">True</property>
|
||||||
|
</object>
|
||||||
|
</child>
|
||||||
|
</object>
|
||||||
|
<packing>
|
||||||
|
<property name="left-attach">1</property>
|
||||||
|
<property name="top-attach">3</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
<child>
|
||||||
|
<object class="GtkLabel">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can-focus">False</property>
|
||||||
|
<property name="label" translatable="yes">Document type</property>
|
||||||
|
</object>
|
||||||
|
<packing>
|
||||||
|
<property name="left-attach">0</property>
|
||||||
|
<property name="top-attach">0</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
<child>
|
||||||
|
<object class="GtkComboBox" id="cmb_doctype">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can-focus">False</property>
|
||||||
|
</object>
|
||||||
|
<packing>
|
||||||
|
<property name="left-attach">1</property>
|
||||||
|
<property name="top-attach">0</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
</object>
|
||||||
|
<packing>
|
||||||
|
<property name="expand">True</property>
|
||||||
|
<property name="fill">True</property>
|
||||||
|
<property name="position">1</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
<child>
|
||||||
|
<object class="GtkButtonBox">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can-focus">False</property>
|
||||||
|
<property name="layout-style">end</property>
|
||||||
|
<child>
|
||||||
|
<object class="GtkButton" id="but_save">
|
||||||
|
<property name="label" translatable="yes">Save</property>
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can-focus">True</property>
|
||||||
|
<property name="receives-default">True</property>
|
||||||
|
<signal name="clicked" handler="on_but_save_clicked" swapped="no"/>
|
||||||
|
</object>
|
||||||
|
<packing>
|
||||||
|
<property name="expand">True</property>
|
||||||
|
<property name="fill">True</property>
|
||||||
|
<property name="position">1</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
<child>
|
||||||
|
<object class="GtkButton" id="but_cancel">
|
||||||
|
<property name="label" translatable="yes">Cancel</property>
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can-focus">True</property>
|
||||||
|
<property name="receives-default">True</property>
|
||||||
|
<signal name="clicked" handler="on_but_cancel_clicked" swapped="no"/>
|
||||||
|
</object>
|
||||||
|
<packing>
|
||||||
|
<property name="expand">True</property>
|
||||||
|
<property name="fill">True</property>
|
||||||
|
<property name="position">2</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
</object>
|
||||||
|
<packing>
|
||||||
|
<property name="expand">False</property>
|
||||||
|
<property name="fill">True</property>
|
||||||
|
<property name="position">2</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
</object>
|
||||||
|
<packing>
|
||||||
|
<property name="name">page2</property>
|
||||||
|
<property name="title" translatable="yes">page2</property>
|
||||||
|
<property name="position">2</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
</object>
|
||||||
|
</interface>
|
||||||
@@ -0,0 +1,970 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<!-- Generated with glade 3.40.0 -->
|
||||||
|
<interface>
|
||||||
|
<requires lib="gtk+" version="3.24"/>
|
||||||
|
<object class="GtkAdjustment" id="adj_price">
|
||||||
|
<property name="upper">100</property>
|
||||||
|
<property name="step-increment">1</property>
|
||||||
|
<property name="page-increment">10</property>
|
||||||
|
</object>
|
||||||
|
<object class="GtkAdjustment" id="adj_weight">
|
||||||
|
<property name="upper">100</property>
|
||||||
|
<property name="step-increment">1</property>
|
||||||
|
<property name="page-increment">10</property>
|
||||||
|
</object>
|
||||||
|
<object class="GtkStack" id="topobject">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can-focus">False</property>
|
||||||
|
<property name="margin-start">8</property>
|
||||||
|
<child>
|
||||||
|
<object class="GtkBox" id="box_equipment">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can-focus">False</property>
|
||||||
|
<property name="orientation">vertical</property>
|
||||||
|
<child>
|
||||||
|
<object class="GtkExpander">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can-focus">True</property>
|
||||||
|
<child>
|
||||||
|
<!-- n-columns=4 n-rows=5 -->
|
||||||
|
<object class="GtkGrid">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can-focus">False</property>
|
||||||
|
<child>
|
||||||
|
<object class="GtkButtonBox">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can-focus">False</property>
|
||||||
|
<property name="orientation">vertical</property>
|
||||||
|
<property name="layout-style">start</property>
|
||||||
|
<child>
|
||||||
|
<object class="GtkButton" id="but_flt_clear">
|
||||||
|
<property name="label" translatable="yes">Clear</property>
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can-focus">True</property>
|
||||||
|
<property name="receives-default">True</property>
|
||||||
|
</object>
|
||||||
|
<packing>
|
||||||
|
<property name="expand">True</property>
|
||||||
|
<property name="fill">True</property>
|
||||||
|
<property name="position">0</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
<child>
|
||||||
|
<object class="GtkButton" id="but_flt_apply">
|
||||||
|
<property name="label" translatable="yes">Apply</property>
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can-focus">True</property>
|
||||||
|
<property name="receives-default">True</property>
|
||||||
|
</object>
|
||||||
|
<packing>
|
||||||
|
<property name="expand">True</property>
|
||||||
|
<property name="fill">True</property>
|
||||||
|
<property name="position">1</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
</object>
|
||||||
|
<packing>
|
||||||
|
<property name="left-attach">3</property>
|
||||||
|
<property name="top-attach">0</property>
|
||||||
|
<property name="height">4</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
<child>
|
||||||
|
<object class="GtkLabel">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can-focus">False</property>
|
||||||
|
<property name="label" translatable="yes">Category</property>
|
||||||
|
</object>
|
||||||
|
<packing>
|
||||||
|
<property name="left-attach">0</property>
|
||||||
|
<property name="top-attach">0</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
<child>
|
||||||
|
<object class="GtkLabel">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can-focus">False</property>
|
||||||
|
<property name="label" translatable="yes">Manufacturer</property>
|
||||||
|
</object>
|
||||||
|
<packing>
|
||||||
|
<property name="left-attach">0</property>
|
||||||
|
<property name="top-attach">1</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
<child>
|
||||||
|
<object class="GtkLabel">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can-focus">False</property>
|
||||||
|
<property name="label" translatable="yes">Supplier</property>
|
||||||
|
</object>
|
||||||
|
<packing>
|
||||||
|
<property name="left-attach">0</property>
|
||||||
|
<property name="top-attach">2</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
<child>
|
||||||
|
<object class="GtkLabel">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can-focus">False</property>
|
||||||
|
<property name="label" translatable="yes">Text</property>
|
||||||
|
</object>
|
||||||
|
<packing>
|
||||||
|
<property name="left-attach">0</property>
|
||||||
|
<property name="top-attach">3</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
<child>
|
||||||
|
<object class="GtkLabel">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can-focus">False</property>
|
||||||
|
<property name="label" translatable="yes">Flags</property>
|
||||||
|
</object>
|
||||||
|
<packing>
|
||||||
|
<property name="left-attach">0</property>
|
||||||
|
<property name="top-attach">4</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
<child>
|
||||||
|
<object class="GtkEntry" id="ent_flt_text">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can-focus">True</property>
|
||||||
|
</object>
|
||||||
|
<packing>
|
||||||
|
<property name="left-attach">1</property>
|
||||||
|
<property name="top-attach">3</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
<child>
|
||||||
|
<object class="GtkComboBox" id="cmb_flt_category">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can-focus">False</property>
|
||||||
|
</object>
|
||||||
|
<packing>
|
||||||
|
<property name="left-attach">1</property>
|
||||||
|
<property name="top-attach">0</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
<child>
|
||||||
|
<object class="GtkComboBox" id="cmb_flt_manuf">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can-focus">False</property>
|
||||||
|
</object>
|
||||||
|
<packing>
|
||||||
|
<property name="left-attach">1</property>
|
||||||
|
<property name="top-attach">1</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
<child>
|
||||||
|
<object class="GtkComboBox" id="cmb_flt_supp">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can-focus">False</property>
|
||||||
|
</object>
|
||||||
|
<packing>
|
||||||
|
<property name="left-attach">1</property>
|
||||||
|
<property name="top-attach">2</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
<child>
|
||||||
|
<object class="GtkCheckButton" id="chk_flt_ordered">
|
||||||
|
<property name="label" translatable="yes">ordered</property>
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can-focus">True</property>
|
||||||
|
<property name="receives-default">False</property>
|
||||||
|
<property name="draw-indicator">True</property>
|
||||||
|
</object>
|
||||||
|
<packing>
|
||||||
|
<property name="left-attach">1</property>
|
||||||
|
<property name="top-attach">4</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
<child>
|
||||||
|
<object class="GtkCheckButton" id="chk_flt_removed">
|
||||||
|
<property name="label" translatable="yes">removed</property>
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can-focus">True</property>
|
||||||
|
<property name="receives-default">False</property>
|
||||||
|
<property name="draw-indicator">True</property>
|
||||||
|
</object>
|
||||||
|
<packing>
|
||||||
|
<property name="left-attach">2</property>
|
||||||
|
<property name="top-attach">4</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
<child>
|
||||||
|
<object class="GtkCheckButton" id="chk_flt_deleted">
|
||||||
|
<property name="label" translatable="yes">deleted</property>
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can-focus">True</property>
|
||||||
|
<property name="receives-default">False</property>
|
||||||
|
<property name="draw-indicator">True</property>
|
||||||
|
</object>
|
||||||
|
<packing>
|
||||||
|
<property name="left-attach">3</property>
|
||||||
|
<property name="top-attach">4</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
<child>
|
||||||
|
<placeholder/>
|
||||||
|
</child>
|
||||||
|
<child>
|
||||||
|
<placeholder/>
|
||||||
|
</child>
|
||||||
|
<child>
|
||||||
|
<placeholder/>
|
||||||
|
</child>
|
||||||
|
<child>
|
||||||
|
<placeholder/>
|
||||||
|
</child>
|
||||||
|
</object>
|
||||||
|
</child>
|
||||||
|
<child type="label">
|
||||||
|
<object class="GtkLabel">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can-focus">False</property>
|
||||||
|
<property name="label" translatable="yes">Filter Equipment</property>
|
||||||
|
</object>
|
||||||
|
</child>
|
||||||
|
</object>
|
||||||
|
<packing>
|
||||||
|
<property name="expand">False</property>
|
||||||
|
<property name="fill">True</property>
|
||||||
|
<property name="position">0</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
<child>
|
||||||
|
<object class="GtkScrolledWindow">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can-focus">True</property>
|
||||||
|
<property name="shadow-type">in</property>
|
||||||
|
<child>
|
||||||
|
<object class="GtkTreeView" id="tvw_equipment">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can-focus">True</property>
|
||||||
|
<signal name="row-activated" handler="on_tvw_equipment_row_activated" swapped="no"/>
|
||||||
|
<child internal-child="selection">
|
||||||
|
<object class="GtkTreeSelection"/>
|
||||||
|
</child>
|
||||||
|
</object>
|
||||||
|
</child>
|
||||||
|
</object>
|
||||||
|
<packing>
|
||||||
|
<property name="expand">True</property>
|
||||||
|
<property name="fill">True</property>
|
||||||
|
<property name="position">1</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
<child>
|
||||||
|
<object class="GtkButtonBox">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can-focus">False</property>
|
||||||
|
<property name="layout-style">end</property>
|
||||||
|
<child>
|
||||||
|
<object class="GtkButton" id="but_new">
|
||||||
|
<property name="label" translatable="yes">New</property>
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can-focus">True</property>
|
||||||
|
<property name="receives-default">True</property>
|
||||||
|
<signal name="clicked" handler="on_but_new_clicked" swapped="no"/>
|
||||||
|
</object>
|
||||||
|
<packing>
|
||||||
|
<property name="expand">True</property>
|
||||||
|
<property name="fill">True</property>
|
||||||
|
<property name="position">0</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
<child>
|
||||||
|
<object class="GtkButton" id="but_edit">
|
||||||
|
<property name="label" translatable="yes">Edit</property>
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can-focus">True</property>
|
||||||
|
<property name="receives-default">True</property>
|
||||||
|
<signal name="clicked" handler="on_but_edit_clicked" swapped="no"/>
|
||||||
|
</object>
|
||||||
|
<packing>
|
||||||
|
<property name="expand">True</property>
|
||||||
|
<property name="fill">True</property>
|
||||||
|
<property name="position">1</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
<child>
|
||||||
|
<object class="GtkButton" id="but_detail">
|
||||||
|
<property name="label" translatable="yes">Details</property>
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can-focus">True</property>
|
||||||
|
<property name="receives-default">True</property>
|
||||||
|
<signal name="clicked" handler="on_but_detail_clicked" swapped="no"/>
|
||||||
|
</object>
|
||||||
|
<packing>
|
||||||
|
<property name="expand">True</property>
|
||||||
|
<property name="fill">True</property>
|
||||||
|
<property name="position">2</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
</object>
|
||||||
|
<packing>
|
||||||
|
<property name="expand">False</property>
|
||||||
|
<property name="fill">True</property>
|
||||||
|
<property name="position">2</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
</object>
|
||||||
|
<packing>
|
||||||
|
<property name="name">page0</property>
|
||||||
|
<property name="title" translatable="yes">page0</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
<child>
|
||||||
|
<object class="GtkBox" id="box_equip_detail">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can-focus">False</property>
|
||||||
|
<property name="orientation">vertical</property>
|
||||||
|
<child>
|
||||||
|
<object class="GtkLabel" id="lbl_title_detail">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can-focus">False</property>
|
||||||
|
<property name="label" translatable="yes">Equipment details</property>
|
||||||
|
<attributes>
|
||||||
|
<attribute name="weight" value="bold"/>
|
||||||
|
</attributes>
|
||||||
|
</object>
|
||||||
|
<packing>
|
||||||
|
<property name="expand">False</property>
|
||||||
|
<property name="fill">True</property>
|
||||||
|
<property name="position">0</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
<child>
|
||||||
|
<!-- n-columns=2 n-rows=11 -->
|
||||||
|
<object class="GtkGrid" id="grd_details">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can-focus">False</property>
|
||||||
|
<child>
|
||||||
|
<object class="GtkLabel" id="lbl_lb_name">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can-focus">False</property>
|
||||||
|
<property name="label" translatable="yes">Name</property>
|
||||||
|
</object>
|
||||||
|
<packing>
|
||||||
|
<property name="left-attach">0</property>
|
||||||
|
<property name="top-attach">0</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
<child>
|
||||||
|
<object class="GtkLabel" id="lbl_lb_shortname">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can-focus">False</property>
|
||||||
|
<property name="label" translatable="yes">Short name</property>
|
||||||
|
</object>
|
||||||
|
<packing>
|
||||||
|
<property name="left-attach">0</property>
|
||||||
|
<property name="top-attach">1</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
<child>
|
||||||
|
<object class="GtkLabel" id="lbl_lb_manufacturer">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can-focus">False</property>
|
||||||
|
<property name="label" translatable="yes">Manufacturer</property>
|
||||||
|
</object>
|
||||||
|
<packing>
|
||||||
|
<property name="left-attach">0</property>
|
||||||
|
<property name="top-attach">2</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
<child>
|
||||||
|
<object class="GtkLabel" id="lbl_lb_model">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can-focus">False</property>
|
||||||
|
<property name="label" translatable="yes">Model</property>
|
||||||
|
</object>
|
||||||
|
<packing>
|
||||||
|
<property name="left-attach">0</property>
|
||||||
|
<property name="top-attach">3</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
<child>
|
||||||
|
<object class="GtkLabel" id="lbl_lb_serial">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can-focus">False</property>
|
||||||
|
<property name="label" translatable="yes">Serial no.</property>
|
||||||
|
</object>
|
||||||
|
<packing>
|
||||||
|
<property name="left-attach">0</property>
|
||||||
|
<property name="top-attach">4</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
<child>
|
||||||
|
<object class="GtkLabel" id="lbl_lb_weight">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can-focus">False</property>
|
||||||
|
<property name="label" translatable="yes">Weight</property>
|
||||||
|
</object>
|
||||||
|
<packing>
|
||||||
|
<property name="left-attach">0</property>
|
||||||
|
<property name="top-attach">5</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
<child>
|
||||||
|
<object class="GtkLabel" id="lbl_lb_price">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can-focus">False</property>
|
||||||
|
<property name="label" translatable="yes">Price</property>
|
||||||
|
</object>
|
||||||
|
<packing>
|
||||||
|
<property name="left-attach">0</property>
|
||||||
|
<property name="top-attach">6</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
<child>
|
||||||
|
<object class="GtkLabel" id="lbl_lb_purchdate">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can-focus">False</property>
|
||||||
|
<property name="label" translatable="yes">Date purchase</property>
|
||||||
|
</object>
|
||||||
|
<packing>
|
||||||
|
<property name="left-attach">0</property>
|
||||||
|
<property name="top-attach">7</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
<child>
|
||||||
|
<object class="GtkLabel" id="lbl_lb_supplier">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can-focus">False</property>
|
||||||
|
<property name="label" translatable="yes">Supplier</property>
|
||||||
|
</object>
|
||||||
|
<packing>
|
||||||
|
<property name="left-attach">0</property>
|
||||||
|
<property name="top-attach">8</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
<child>
|
||||||
|
<object class="GtkLabel" id="lbl_lb_category">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can-focus">False</property>
|
||||||
|
<property name="label" translatable="yes">Category</property>
|
||||||
|
</object>
|
||||||
|
<packing>
|
||||||
|
<property name="left-attach">0</property>
|
||||||
|
<property name="top-attach">9</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
<child>
|
||||||
|
<object class="GtkLabel" id="lbl_lb_remarks">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can-focus">False</property>
|
||||||
|
<property name="label" translatable="yes">Remarks</property>
|
||||||
|
<property name="yalign">0</property>
|
||||||
|
</object>
|
||||||
|
<packing>
|
||||||
|
<property name="left-attach">0</property>
|
||||||
|
<property name="top-attach">10</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
<child>
|
||||||
|
<object class="GtkLabel" id="lbl_name">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can-focus">False</property>
|
||||||
|
<property name="hexpand">True</property>
|
||||||
|
</object>
|
||||||
|
<packing>
|
||||||
|
<property name="left-attach">1</property>
|
||||||
|
<property name="top-attach">0</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
<child>
|
||||||
|
<object class="GtkLabel" id="lbl_shortname">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can-focus">False</property>
|
||||||
|
<property name="hexpand">True</property>
|
||||||
|
</object>
|
||||||
|
<packing>
|
||||||
|
<property name="left-attach">1</property>
|
||||||
|
<property name="top-attach">1</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
<child>
|
||||||
|
<object class="GtkLabel" id="lbl_manufacturer">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can-focus">False</property>
|
||||||
|
<property name="hexpand">True</property>
|
||||||
|
</object>
|
||||||
|
<packing>
|
||||||
|
<property name="left-attach">1</property>
|
||||||
|
<property name="top-attach">2</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
<child>
|
||||||
|
<object class="GtkLabel" id="lbl_model">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can-focus">False</property>
|
||||||
|
<property name="hexpand">True</property>
|
||||||
|
</object>
|
||||||
|
<packing>
|
||||||
|
<property name="left-attach">1</property>
|
||||||
|
<property name="top-attach">3</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
<child>
|
||||||
|
<object class="GtkLabel" id="lbl_serial">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can-focus">False</property>
|
||||||
|
<property name="hexpand">False</property>
|
||||||
|
</object>
|
||||||
|
<packing>
|
||||||
|
<property name="left-attach">1</property>
|
||||||
|
<property name="top-attach">4</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
<child>
|
||||||
|
<object class="GtkLabel" id="lbl_weight">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can-focus">False</property>
|
||||||
|
<property name="hexpand">True</property>
|
||||||
|
</object>
|
||||||
|
<packing>
|
||||||
|
<property name="left-attach">1</property>
|
||||||
|
<property name="top-attach">5</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
<child>
|
||||||
|
<object class="GtkLabel" id="lbl_price">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can-focus">False</property>
|
||||||
|
<property name="hexpand">True</property>
|
||||||
|
</object>
|
||||||
|
<packing>
|
||||||
|
<property name="left-attach">1</property>
|
||||||
|
<property name="top-attach">6</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
<child>
|
||||||
|
<object class="GtkLabel" id="lbl_date_purch">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can-focus">False</property>
|
||||||
|
<property name="hexpand">True</property>
|
||||||
|
</object>
|
||||||
|
<packing>
|
||||||
|
<property name="left-attach">1</property>
|
||||||
|
<property name="top-attach">7</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
<child>
|
||||||
|
<object class="GtkLabel" id="lbl_supplier">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can-focus">False</property>
|
||||||
|
<property name="hexpand">True</property>
|
||||||
|
</object>
|
||||||
|
<packing>
|
||||||
|
<property name="left-attach">1</property>
|
||||||
|
<property name="top-attach">8</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
<child>
|
||||||
|
<object class="GtkLabel" id="lbl_category">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can-focus">False</property>
|
||||||
|
<property name="hexpand">True</property>
|
||||||
|
</object>
|
||||||
|
<packing>
|
||||||
|
<property name="left-attach">1</property>
|
||||||
|
<property name="top-attach">9</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
<child>
|
||||||
|
<object class="GtkLabel" id="lbl_remarks">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can-focus">False</property>
|
||||||
|
<property name="hexpand">True</property>
|
||||||
|
<property name="vexpand">True</property>
|
||||||
|
</object>
|
||||||
|
<packing>
|
||||||
|
<property name="left-attach">1</property>
|
||||||
|
<property name="top-attach">10</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
</object>
|
||||||
|
<packing>
|
||||||
|
<property name="expand">True</property>
|
||||||
|
<property name="fill">True</property>
|
||||||
|
<property name="position">1</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
<child>
|
||||||
|
<object class="GtkButtonBox">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can-focus">False</property>
|
||||||
|
<property name="layout-style">end</property>
|
||||||
|
<child>
|
||||||
|
<object class="GtkButton" id="but_delete">
|
||||||
|
<property name="label" translatable="yes">Delete</property>
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can-focus">True</property>
|
||||||
|
<property name="receives-default">True</property>
|
||||||
|
<signal name="clicked" handler="on_but_delete_clicked" swapped="no"/>
|
||||||
|
</object>
|
||||||
|
<packing>
|
||||||
|
<property name="expand">True</property>
|
||||||
|
<property name="fill">True</property>
|
||||||
|
<property name="position">0</property>
|
||||||
|
<property name="secondary">True</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
<child>
|
||||||
|
<object class="GtkButton" id="but_edit2">
|
||||||
|
<property name="label" translatable="yes">Edit</property>
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can-focus">True</property>
|
||||||
|
<property name="receives-default">True</property>
|
||||||
|
<signal name="clicked" handler="on_but_edit_clicked" swapped="no"/>
|
||||||
|
</object>
|
||||||
|
<packing>
|
||||||
|
<property name="expand">True</property>
|
||||||
|
<property name="fill">True</property>
|
||||||
|
<property name="position">1</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
<child>
|
||||||
|
<object class="GtkButton" id="but_close">
|
||||||
|
<property name="label" translatable="yes">Close</property>
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can-focus">True</property>
|
||||||
|
<property name="receives-default">True</property>
|
||||||
|
<signal name="clicked" handler="on_but_close_clicked" swapped="no"/>
|
||||||
|
</object>
|
||||||
|
<packing>
|
||||||
|
<property name="expand">True</property>
|
||||||
|
<property name="fill">True</property>
|
||||||
|
<property name="position">2</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
</object>
|
||||||
|
<packing>
|
||||||
|
<property name="expand">False</property>
|
||||||
|
<property name="fill">True</property>
|
||||||
|
<property name="position">2</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
</object>
|
||||||
|
<packing>
|
||||||
|
<property name="name">page1</property>
|
||||||
|
<property name="title" translatable="yes">page1</property>
|
||||||
|
<property name="position">1</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
<child>
|
||||||
|
<object class="GtkBox" id="box_equip_edit">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can-focus">False</property>
|
||||||
|
<property name="orientation">vertical</property>
|
||||||
|
<child>
|
||||||
|
<object class="GtkLabel">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can-focus">False</property>
|
||||||
|
<property name="label" translatable="yes">Edit Equipment</property>
|
||||||
|
<attributes>
|
||||||
|
<attribute name="weight" value="bold"/>
|
||||||
|
</attributes>
|
||||||
|
</object>
|
||||||
|
<packing>
|
||||||
|
<property name="expand">False</property>
|
||||||
|
<property name="fill">True</property>
|
||||||
|
<property name="position">0</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
<child>
|
||||||
|
<!-- n-columns=2 n-rows=11 -->
|
||||||
|
<object class="GtkGrid" id="grd_editor">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can-focus">False</property>
|
||||||
|
<child>
|
||||||
|
<object class="GtkLabel">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can-focus">False</property>
|
||||||
|
<property name="label" translatable="yes">Name</property>
|
||||||
|
</object>
|
||||||
|
<packing>
|
||||||
|
<property name="left-attach">0</property>
|
||||||
|
<property name="top-attach">0</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
<child>
|
||||||
|
<object class="GtkLabel">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can-focus">False</property>
|
||||||
|
<property name="label" translatable="yes">Short name</property>
|
||||||
|
</object>
|
||||||
|
<packing>
|
||||||
|
<property name="left-attach">0</property>
|
||||||
|
<property name="top-attach">1</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
<child>
|
||||||
|
<object class="GtkEntry" id="ent_name">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can-focus">True</property>
|
||||||
|
</object>
|
||||||
|
<packing>
|
||||||
|
<property name="left-attach">1</property>
|
||||||
|
<property name="top-attach">0</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
<child>
|
||||||
|
<object class="GtkEntry" id="ent_shortname">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can-focus">True</property>
|
||||||
|
</object>
|
||||||
|
<packing>
|
||||||
|
<property name="left-attach">1</property>
|
||||||
|
<property name="top-attach">1</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
<child>
|
||||||
|
<object class="GtkLabel">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can-focus">False</property>
|
||||||
|
<property name="label" translatable="yes">Manufacturer</property>
|
||||||
|
</object>
|
||||||
|
<packing>
|
||||||
|
<property name="left-attach">0</property>
|
||||||
|
<property name="top-attach">2</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
<child>
|
||||||
|
<object class="GtkLabel">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can-focus">False</property>
|
||||||
|
<property name="label" translatable="yes">Model</property>
|
||||||
|
</object>
|
||||||
|
<packing>
|
||||||
|
<property name="left-attach">0</property>
|
||||||
|
<property name="top-attach">3</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
<child>
|
||||||
|
<object class="GtkLabel">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can-focus">False</property>
|
||||||
|
<property name="label" translatable="yes">Serial no.</property>
|
||||||
|
</object>
|
||||||
|
<packing>
|
||||||
|
<property name="left-attach">0</property>
|
||||||
|
<property name="top-attach">4</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
<child>
|
||||||
|
<object class="GtkLabel">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can-focus">False</property>
|
||||||
|
<property name="label" translatable="yes">Weight, kg</property>
|
||||||
|
</object>
|
||||||
|
<packing>
|
||||||
|
<property name="left-attach">0</property>
|
||||||
|
<property name="top-attach">5</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
<child>
|
||||||
|
<object class="GtkLabel">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can-focus">False</property>
|
||||||
|
<property name="label" translatable="yes">Price, €</property>
|
||||||
|
</object>
|
||||||
|
<packing>
|
||||||
|
<property name="left-attach">0</property>
|
||||||
|
<property name="top-attach">6</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
<child>
|
||||||
|
<object class="GtkLabel">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can-focus">False</property>
|
||||||
|
<property name="label" translatable="yes">Date puchase</property>
|
||||||
|
</object>
|
||||||
|
<packing>
|
||||||
|
<property name="left-attach">0</property>
|
||||||
|
<property name="top-attach">7</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
<child>
|
||||||
|
<object class="GtkComboBox">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can-focus">False</property>
|
||||||
|
</object>
|
||||||
|
<packing>
|
||||||
|
<property name="left-attach">1</property>
|
||||||
|
<property name="top-attach">2</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
<child>
|
||||||
|
<object class="GtkEntry" id="ent_model">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can-focus">True</property>
|
||||||
|
</object>
|
||||||
|
<packing>
|
||||||
|
<property name="left-attach">1</property>
|
||||||
|
<property name="top-attach">3</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
<child>
|
||||||
|
<object class="GtkEntry" id="ent_serial">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can-focus">True</property>
|
||||||
|
</object>
|
||||||
|
<packing>
|
||||||
|
<property name="left-attach">1</property>
|
||||||
|
<property name="top-attach">4</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
<child>
|
||||||
|
<object class="GtkEntry" id="ent_purchdate">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can-focus">True</property>
|
||||||
|
</object>
|
||||||
|
<packing>
|
||||||
|
<property name="left-attach">1</property>
|
||||||
|
<property name="top-attach">7</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
<child>
|
||||||
|
<object class="GtkLabel">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can-focus">False</property>
|
||||||
|
<property name="label" translatable="yes">Supplier</property>
|
||||||
|
</object>
|
||||||
|
<packing>
|
||||||
|
<property name="left-attach">0</property>
|
||||||
|
<property name="top-attach">8</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
<child>
|
||||||
|
<object class="GtkLabel">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can-focus">False</property>
|
||||||
|
<property name="label" translatable="yes">Category</property>
|
||||||
|
</object>
|
||||||
|
<packing>
|
||||||
|
<property name="left-attach">0</property>
|
||||||
|
<property name="top-attach">9</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
<child>
|
||||||
|
<object class="GtkLabel">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can-focus">False</property>
|
||||||
|
<property name="label" translatable="yes">Remarks</property>
|
||||||
|
</object>
|
||||||
|
<packing>
|
||||||
|
<property name="left-attach">0</property>
|
||||||
|
<property name="top-attach">10</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
<child>
|
||||||
|
<object class="GtkComboBox">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can-focus">False</property>
|
||||||
|
</object>
|
||||||
|
<packing>
|
||||||
|
<property name="left-attach">1</property>
|
||||||
|
<property name="top-attach">8</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
<child>
|
||||||
|
<object class="GtkComboBox">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can-focus">False</property>
|
||||||
|
</object>
|
||||||
|
<packing>
|
||||||
|
<property name="left-attach">1</property>
|
||||||
|
<property name="top-attach">9</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
<child>
|
||||||
|
<object class="GtkEntry">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can-focus">True</property>
|
||||||
|
</object>
|
||||||
|
<packing>
|
||||||
|
<property name="left-attach">1</property>
|
||||||
|
<property name="top-attach">10</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
<child>
|
||||||
|
<object class="GtkSpinButton">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can-focus">True</property>
|
||||||
|
<property name="adjustment">adj_weight</property>
|
||||||
|
<property name="digits">2</property>
|
||||||
|
</object>
|
||||||
|
<packing>
|
||||||
|
<property name="left-attach">1</property>
|
||||||
|
<property name="top-attach">5</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
<child>
|
||||||
|
<object class="GtkSpinButton">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can-focus">True</property>
|
||||||
|
<property name="adjustment">adj_price</property>
|
||||||
|
<property name="digits">2</property>
|
||||||
|
</object>
|
||||||
|
<packing>
|
||||||
|
<property name="left-attach">1</property>
|
||||||
|
<property name="top-attach">6</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
</object>
|
||||||
|
<packing>
|
||||||
|
<property name="expand">False</property>
|
||||||
|
<property name="fill">True</property>
|
||||||
|
<property name="position">1</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
<child>
|
||||||
|
<object class="GtkButtonBox">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can-focus">False</property>
|
||||||
|
<property name="layout-style">end</property>
|
||||||
|
<child>
|
||||||
|
<object class="GtkButton" id="but_save">
|
||||||
|
<property name="label" translatable="yes">Save</property>
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can-focus">True</property>
|
||||||
|
<property name="receives-default">True</property>
|
||||||
|
<signal name="clicked" handler="on_but_save_clicked" swapped="no"/>
|
||||||
|
</object>
|
||||||
|
<packing>
|
||||||
|
<property name="expand">True</property>
|
||||||
|
<property name="fill">True</property>
|
||||||
|
<property name="position">0</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
<child>
|
||||||
|
<object class="GtkButton" id="but_cancel">
|
||||||
|
<property name="label" translatable="yes">Cancel</property>
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can-focus">True</property>
|
||||||
|
<property name="receives-default">True</property>
|
||||||
|
<signal name="clicked" handler="on_but_cancel_clicked" swapped="no"/>
|
||||||
|
</object>
|
||||||
|
<packing>
|
||||||
|
<property name="expand">True</property>
|
||||||
|
<property name="fill">True</property>
|
||||||
|
<property name="position">1</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
</object>
|
||||||
|
<packing>
|
||||||
|
<property name="expand">False</property>
|
||||||
|
<property name="fill">True</property>
|
||||||
|
<property name="pack-type">end</property>
|
||||||
|
<property name="position">2</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
</object>
|
||||||
|
<packing>
|
||||||
|
<property name="name">page2</property>
|
||||||
|
<property name="title" translatable="yes">page2</property>
|
||||||
|
<property name="position">2</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
</object>
|
||||||
|
</interface>
|
||||||
+767
@@ -0,0 +1,767 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<!-- Generated with glade 3.40.0 -->
|
||||||
|
<interface>
|
||||||
|
<requires lib="gtk+" version="3.24"/>
|
||||||
|
<object class="GtkAdjustment" id="adj_current">
|
||||||
|
<property name="upper">500</property>
|
||||||
|
<property name="step-increment">1</property>
|
||||||
|
<property name="page-increment">10</property>
|
||||||
|
</object>
|
||||||
|
<object class="GtkAdjustment" id="adj_fnumber">
|
||||||
|
<property name="upper">10000</property>
|
||||||
|
<property name="step-increment">1</property>
|
||||||
|
<property name="page-increment">10</property>
|
||||||
|
</object>
|
||||||
|
<object class="GtkStack" id="topobject">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can-focus">False</property>
|
||||||
|
<property name="margin-start">8</property>
|
||||||
|
<child>
|
||||||
|
<object class="GtkBox" id="box_fuses">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can-focus">False</property>
|
||||||
|
<property name="orientation">vertical</property>
|
||||||
|
<child>
|
||||||
|
<object class="GtkExpander">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can-focus">True</property>
|
||||||
|
<child>
|
||||||
|
<!-- n-columns=3 n-rows=3 -->
|
||||||
|
<object class="GtkGrid">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can-focus">False</property>
|
||||||
|
<child>
|
||||||
|
<object class="GtkButtonBox">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can-focus">False</property>
|
||||||
|
<property name="orientation">vertical</property>
|
||||||
|
<property name="layout-style">start</property>
|
||||||
|
<child>
|
||||||
|
<object class="GtkButton" id="but_flt_clear">
|
||||||
|
<property name="label" translatable="yes">Clear</property>
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can-focus">True</property>
|
||||||
|
<property name="receives-default">True</property>
|
||||||
|
</object>
|
||||||
|
<packing>
|
||||||
|
<property name="expand">True</property>
|
||||||
|
<property name="fill">True</property>
|
||||||
|
<property name="position">0</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
<child>
|
||||||
|
<object class="GtkButton" id="but_flt_apply">
|
||||||
|
<property name="label" translatable="yes">Apply</property>
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can-focus">True</property>
|
||||||
|
<property name="receives-default">True</property>
|
||||||
|
</object>
|
||||||
|
<packing>
|
||||||
|
<property name="expand">True</property>
|
||||||
|
<property name="fill">True</property>
|
||||||
|
<property name="position">1</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
</object>
|
||||||
|
<packing>
|
||||||
|
<property name="left-attach">2</property>
|
||||||
|
<property name="top-attach">0</property>
|
||||||
|
<property name="height">3</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
<child>
|
||||||
|
<object class="GtkLabel">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can-focus">False</property>
|
||||||
|
<property name="label" translatable="yes">Name</property>
|
||||||
|
</object>
|
||||||
|
<packing>
|
||||||
|
<property name="left-attach">0</property>
|
||||||
|
<property name="top-attach">0</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
<child>
|
||||||
|
<object class="GtkLabel">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can-focus">False</property>
|
||||||
|
<property name="label" translatable="yes">Status</property>
|
||||||
|
</object>
|
||||||
|
<packing>
|
||||||
|
<property name="left-attach">0</property>
|
||||||
|
<property name="top-attach">1</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
<child>
|
||||||
|
<object class="GtkLabel">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can-focus">False</property>
|
||||||
|
<property name="label" translatable="yes">Remarks</property>
|
||||||
|
</object>
|
||||||
|
<packing>
|
||||||
|
<property name="left-attach">0</property>
|
||||||
|
<property name="top-attach">2</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
<child>
|
||||||
|
<object class="GtkEntry" id="ent_flt_name">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can-focus">True</property>
|
||||||
|
</object>
|
||||||
|
<packing>
|
||||||
|
<property name="left-attach">1</property>
|
||||||
|
<property name="top-attach">0</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
<child>
|
||||||
|
<object class="GtkEntry" id="ent_flt_remarks">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can-focus">True</property>
|
||||||
|
</object>
|
||||||
|
<packing>
|
||||||
|
<property name="left-attach">1</property>
|
||||||
|
<property name="top-attach">2</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
<child>
|
||||||
|
<object class="GtkComboBox" id="cmb_flt_status">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can-focus">False</property>
|
||||||
|
</object>
|
||||||
|
<packing>
|
||||||
|
<property name="left-attach">1</property>
|
||||||
|
<property name="top-attach">1</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
</object>
|
||||||
|
</child>
|
||||||
|
<child type="label">
|
||||||
|
<object class="GtkLabel">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can-focus">False</property>
|
||||||
|
<property name="label" translatable="yes">Filter Fuses</property>
|
||||||
|
</object>
|
||||||
|
</child>
|
||||||
|
</object>
|
||||||
|
<packing>
|
||||||
|
<property name="expand">False</property>
|
||||||
|
<property name="fill">True</property>
|
||||||
|
<property name="position">0</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
<child>
|
||||||
|
<object class="GtkScrolledWindow">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can-focus">True</property>
|
||||||
|
<property name="shadow-type">in</property>
|
||||||
|
<child>
|
||||||
|
<object class="GtkTreeView" id="tvw_fuses">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can-focus">True</property>
|
||||||
|
<child internal-child="selection">
|
||||||
|
<object class="GtkTreeSelection"/>
|
||||||
|
</child>
|
||||||
|
</object>
|
||||||
|
</child>
|
||||||
|
</object>
|
||||||
|
<packing>
|
||||||
|
<property name="expand">True</property>
|
||||||
|
<property name="fill">True</property>
|
||||||
|
<property name="position">1</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
<child>
|
||||||
|
<object class="GtkButtonBox">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can-focus">False</property>
|
||||||
|
<property name="layout-style">end</property>
|
||||||
|
<child>
|
||||||
|
<object class="GtkButton" id="but_new">
|
||||||
|
<property name="label" translatable="yes">New</property>
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can-focus">True</property>
|
||||||
|
<property name="receives-default">True</property>
|
||||||
|
<signal name="clicked" handler="on_but_new_clicked" swapped="no"/>
|
||||||
|
</object>
|
||||||
|
<packing>
|
||||||
|
<property name="expand">True</property>
|
||||||
|
<property name="fill">True</property>
|
||||||
|
<property name="position">0</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
<child>
|
||||||
|
<object class="GtkButton" id="but_edit">
|
||||||
|
<property name="label" translatable="yes">Edit</property>
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can-focus">True</property>
|
||||||
|
<property name="receives-default">True</property>
|
||||||
|
<signal name="clicked" handler="on_but_edit_clicked" swapped="no"/>
|
||||||
|
</object>
|
||||||
|
<packing>
|
||||||
|
<property name="expand">True</property>
|
||||||
|
<property name="fill">True</property>
|
||||||
|
<property name="position">1</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
<child>
|
||||||
|
<object class="GtkButton" id="but_detail">
|
||||||
|
<property name="label" translatable="yes">Details</property>
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can-focus">True</property>
|
||||||
|
<property name="receives-default">True</property>
|
||||||
|
<signal name="clicked" handler="on_but_detail_clicked" swapped="no"/>
|
||||||
|
</object>
|
||||||
|
<packing>
|
||||||
|
<property name="expand">True</property>
|
||||||
|
<property name="fill">True</property>
|
||||||
|
<property name="position">2</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
</object>
|
||||||
|
<packing>
|
||||||
|
<property name="expand">False</property>
|
||||||
|
<property name="fill">True</property>
|
||||||
|
<property name="position">2</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
</object>
|
||||||
|
<packing>
|
||||||
|
<property name="name">page0</property>
|
||||||
|
<property name="title" translatable="yes">page0</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
<child>
|
||||||
|
<object class="GtkBox" id="box_fuse_detail">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can-focus">False</property>
|
||||||
|
<property name="orientation">vertical</property>
|
||||||
|
<child>
|
||||||
|
<object class="GtkLabel" id="lbl_title_details">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can-focus">False</property>
|
||||||
|
<property name="label" translatable="yes">Fuse Details</property>
|
||||||
|
<attributes>
|
||||||
|
<attribute name="weight" value="bold"/>
|
||||||
|
</attributes>
|
||||||
|
</object>
|
||||||
|
<packing>
|
||||||
|
<property name="expand">False</property>
|
||||||
|
<property name="fill">True</property>
|
||||||
|
<property name="position">0</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
<child>
|
||||||
|
<!-- n-columns=2 n-rows=8 -->
|
||||||
|
<object class="GtkGrid">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can-focus">False</property>
|
||||||
|
<property name="row-spacing">4</property>
|
||||||
|
<property name="column-spacing">4</property>
|
||||||
|
<child>
|
||||||
|
<object class="GtkLabel" id="lbl_fnumber">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can-focus">False</property>
|
||||||
|
<property name="hexpand">True</property>
|
||||||
|
</object>
|
||||||
|
<packing>
|
||||||
|
<property name="left-attach">1</property>
|
||||||
|
<property name="top-attach">0</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
<child>
|
||||||
|
<object class="GtkLabel">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can-focus">False</property>
|
||||||
|
<property name="label" translatable="yes">Number</property>
|
||||||
|
</object>
|
||||||
|
<packing>
|
||||||
|
<property name="left-attach">0</property>
|
||||||
|
<property name="top-attach">0</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
<child>
|
||||||
|
<object class="GtkLabel">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can-focus">False</property>
|
||||||
|
<property name="label" translatable="yes">Type</property>
|
||||||
|
</object>
|
||||||
|
<packing>
|
||||||
|
<property name="left-attach">0</property>
|
||||||
|
<property name="top-attach">1</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
<child>
|
||||||
|
<object class="GtkLabel">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can-focus">False</property>
|
||||||
|
<property name="label" translatable="yes">Current</property>
|
||||||
|
</object>
|
||||||
|
<packing>
|
||||||
|
<property name="left-attach">0</property>
|
||||||
|
<property name="top-attach">2</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
<child>
|
||||||
|
<object class="GtkLabel">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can-focus">False</property>
|
||||||
|
<property name="label" translatable="yes">Cable</property>
|
||||||
|
</object>
|
||||||
|
<packing>
|
||||||
|
<property name="left-attach">0</property>
|
||||||
|
<property name="top-attach">3</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
<child>
|
||||||
|
<object class="GtkLabel">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can-focus">False</property>
|
||||||
|
<property name="label" translatable="yes">Equipment</property>
|
||||||
|
</object>
|
||||||
|
<packing>
|
||||||
|
<property name="left-attach">0</property>
|
||||||
|
<property name="top-attach">4</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
<child>
|
||||||
|
<object class="GtkLabel">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can-focus">False</property>
|
||||||
|
<property name="label" translatable="yes">Location</property>
|
||||||
|
</object>
|
||||||
|
<packing>
|
||||||
|
<property name="left-attach">0</property>
|
||||||
|
<property name="top-attach">5</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
<child>
|
||||||
|
<object class="GtkLabel">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can-focus">False</property>
|
||||||
|
<property name="label" translatable="yes">Description</property>
|
||||||
|
</object>
|
||||||
|
<packing>
|
||||||
|
<property name="left-attach">0</property>
|
||||||
|
<property name="top-attach">6</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
<child>
|
||||||
|
<object class="GtkLabel">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can-focus">False</property>
|
||||||
|
<property name="label" translatable="yes">Remarks</property>
|
||||||
|
</object>
|
||||||
|
<packing>
|
||||||
|
<property name="left-attach">0</property>
|
||||||
|
<property name="top-attach">7</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
<child>
|
||||||
|
<object class="GtkLabel" id="lbl_type">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can-focus">False</property>
|
||||||
|
<property name="hexpand">True</property>
|
||||||
|
</object>
|
||||||
|
<packing>
|
||||||
|
<property name="left-attach">1</property>
|
||||||
|
<property name="top-attach">1</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
<child>
|
||||||
|
<object class="GtkLabel" id="lbl_location">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can-focus">False</property>
|
||||||
|
<property name="hexpand">True</property>
|
||||||
|
</object>
|
||||||
|
<packing>
|
||||||
|
<property name="left-attach">1</property>
|
||||||
|
<property name="top-attach">5</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
<child>
|
||||||
|
<object class="GtkLabel" id="lbl_description">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can-focus">False</property>
|
||||||
|
<property name="hexpand">True</property>
|
||||||
|
</object>
|
||||||
|
<packing>
|
||||||
|
<property name="left-attach">1</property>
|
||||||
|
<property name="top-attach">6</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
<child>
|
||||||
|
<object class="GtkLabel" id="lbl_remarks">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can-focus">False</property>
|
||||||
|
<property name="hexpand">True</property>
|
||||||
|
</object>
|
||||||
|
<packing>
|
||||||
|
<property name="left-attach">1</property>
|
||||||
|
<property name="top-attach">7</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
<child>
|
||||||
|
<object class="GtkLabel" id="lbl_equipment">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can-focus">False</property>
|
||||||
|
<property name="hexpand">True</property>
|
||||||
|
</object>
|
||||||
|
<packing>
|
||||||
|
<property name="left-attach">1</property>
|
||||||
|
<property name="top-attach">4</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
<child>
|
||||||
|
<object class="GtkLabel" id="lbl_current">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can-focus">False</property>
|
||||||
|
<property name="hexpand">True</property>
|
||||||
|
</object>
|
||||||
|
<packing>
|
||||||
|
<property name="left-attach">1</property>
|
||||||
|
<property name="top-attach">2</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
<child>
|
||||||
|
<object class="GtkLabel" id="lbl_cable">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can-focus">False</property>
|
||||||
|
<property name="hexpand">True</property>
|
||||||
|
</object>
|
||||||
|
<packing>
|
||||||
|
<property name="left-attach">1</property>
|
||||||
|
<property name="top-attach">3</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
</object>
|
||||||
|
<packing>
|
||||||
|
<property name="expand">True</property>
|
||||||
|
<property name="fill">True</property>
|
||||||
|
<property name="position">1</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
<child>
|
||||||
|
<object class="GtkButtonBox">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can-focus">False</property>
|
||||||
|
<property name="layout-style">end</property>
|
||||||
|
<child>
|
||||||
|
<object class="GtkButton" id="but_delete">
|
||||||
|
<property name="label" translatable="yes">Delete</property>
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can-focus">True</property>
|
||||||
|
<property name="receives-default">True</property>
|
||||||
|
<signal name="clicked" handler="on_but_delete_clicked" swapped="no"/>
|
||||||
|
</object>
|
||||||
|
<packing>
|
||||||
|
<property name="expand">True</property>
|
||||||
|
<property name="fill">True</property>
|
||||||
|
<property name="position">0</property>
|
||||||
|
<property name="secondary">True</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
<child>
|
||||||
|
<object class="GtkButton" id="but_edit2">
|
||||||
|
<property name="label" translatable="yes">Edit</property>
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can-focus">True</property>
|
||||||
|
<property name="receives-default">True</property>
|
||||||
|
<signal name="clicked" handler="on_but_edit_clicked" swapped="no"/>
|
||||||
|
</object>
|
||||||
|
<packing>
|
||||||
|
<property name="expand">True</property>
|
||||||
|
<property name="fill">True</property>
|
||||||
|
<property name="position">1</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
<child>
|
||||||
|
<object class="GtkButton" id="but_close">
|
||||||
|
<property name="label" translatable="yes">Close</property>
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can-focus">True</property>
|
||||||
|
<property name="receives-default">True</property>
|
||||||
|
<signal name="clicked" handler="on_but_close_clicked" swapped="no"/>
|
||||||
|
</object>
|
||||||
|
<packing>
|
||||||
|
<property name="expand">True</property>
|
||||||
|
<property name="fill">True</property>
|
||||||
|
<property name="position">2</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
</object>
|
||||||
|
<packing>
|
||||||
|
<property name="expand">False</property>
|
||||||
|
<property name="fill">True</property>
|
||||||
|
<property name="position">2</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
</object>
|
||||||
|
<packing>
|
||||||
|
<property name="name">page1</property>
|
||||||
|
<property name="title" translatable="yes">page1</property>
|
||||||
|
<property name="position">1</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
<child>
|
||||||
|
<object class="GtkBox" id="box_fuse_edit">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can-focus">False</property>
|
||||||
|
<property name="orientation">vertical</property>
|
||||||
|
<child>
|
||||||
|
<object class="GtkLabel" id="lbl_title_edit">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can-focus">False</property>
|
||||||
|
<property name="label" translatable="yes">Edit Fuse</property>
|
||||||
|
<attributes>
|
||||||
|
<attribute name="weight" value="bold"/>
|
||||||
|
</attributes>
|
||||||
|
</object>
|
||||||
|
<packing>
|
||||||
|
<property name="expand">False</property>
|
||||||
|
<property name="fill">True</property>
|
||||||
|
<property name="position">0</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
<child>
|
||||||
|
<!-- n-columns=2 n-rows=8 -->
|
||||||
|
<object class="GtkGrid">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can-focus">False</property>
|
||||||
|
<child>
|
||||||
|
<object class="GtkLabel">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can-focus">False</property>
|
||||||
|
<property name="label" translatable="yes">Number</property>
|
||||||
|
</object>
|
||||||
|
<packing>
|
||||||
|
<property name="left-attach">0</property>
|
||||||
|
<property name="top-attach">0</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
<child>
|
||||||
|
<object class="GtkLabel">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can-focus">False</property>
|
||||||
|
<property name="label" translatable="yes">Description</property>
|
||||||
|
</object>
|
||||||
|
<packing>
|
||||||
|
<property name="left-attach">0</property>
|
||||||
|
<property name="top-attach">1</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
<child>
|
||||||
|
<object class="GtkLabel">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can-focus">False</property>
|
||||||
|
<property name="label" translatable="yes">Type</property>
|
||||||
|
</object>
|
||||||
|
<packing>
|
||||||
|
<property name="left-attach">0</property>
|
||||||
|
<property name="top-attach">2</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
<child>
|
||||||
|
<object class="GtkLabel">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can-focus">False</property>
|
||||||
|
<property name="label" translatable="yes">Current</property>
|
||||||
|
</object>
|
||||||
|
<packing>
|
||||||
|
<property name="left-attach">0</property>
|
||||||
|
<property name="top-attach">3</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
<child>
|
||||||
|
<object class="GtkLabel">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can-focus">False</property>
|
||||||
|
<property name="label" translatable="yes">Cable</property>
|
||||||
|
</object>
|
||||||
|
<packing>
|
||||||
|
<property name="left-attach">0</property>
|
||||||
|
<property name="top-attach">4</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
<child>
|
||||||
|
<object class="GtkLabel">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can-focus">False</property>
|
||||||
|
<property name="label" translatable="yes">Equipment</property>
|
||||||
|
</object>
|
||||||
|
<packing>
|
||||||
|
<property name="left-attach">0</property>
|
||||||
|
<property name="top-attach">5</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
<child>
|
||||||
|
<object class="GtkLabel">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can-focus">False</property>
|
||||||
|
<property name="label" translatable="yes">Location</property>
|
||||||
|
</object>
|
||||||
|
<packing>
|
||||||
|
<property name="left-attach">0</property>
|
||||||
|
<property name="top-attach">6</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
<child>
|
||||||
|
<object class="GtkLabel">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can-focus">False</property>
|
||||||
|
<property name="label" translatable="yes">Remarks</property>
|
||||||
|
</object>
|
||||||
|
<packing>
|
||||||
|
<property name="left-attach">0</property>
|
||||||
|
<property name="top-attach">7</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
<child>
|
||||||
|
<object class="GtkSpinButton" id="spi_fnumber">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can-focus">True</property>
|
||||||
|
<property name="adjustment">adj_fnumber</property>
|
||||||
|
</object>
|
||||||
|
<packing>
|
||||||
|
<property name="left-attach">1</property>
|
||||||
|
<property name="top-attach">0</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
<child>
|
||||||
|
<object class="GtkEntry" id="ent_description">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can-focus">True</property>
|
||||||
|
<property name="hexpand">True</property>
|
||||||
|
</object>
|
||||||
|
<packing>
|
||||||
|
<property name="left-attach">1</property>
|
||||||
|
<property name="top-attach">1</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
<child>
|
||||||
|
<object class="GtkComboBox" id="cmb_ftype">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can-focus">False</property>
|
||||||
|
</object>
|
||||||
|
<packing>
|
||||||
|
<property name="left-attach">1</property>
|
||||||
|
<property name="top-attach">2</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
<child>
|
||||||
|
<object class="GtkSpinButton" id="spi_current">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can-focus">True</property>
|
||||||
|
<property name="adjustment">adj_current</property>
|
||||||
|
</object>
|
||||||
|
<packing>
|
||||||
|
<property name="left-attach">1</property>
|
||||||
|
<property name="top-attach">3</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
<child>
|
||||||
|
<object class="GtkComboBox" id="cmb_cable">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can-focus">False</property>
|
||||||
|
</object>
|
||||||
|
<packing>
|
||||||
|
<property name="left-attach">1</property>
|
||||||
|
<property name="top-attach">4</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
<child>
|
||||||
|
<object class="GtkComboBox" id="cmb_equipment">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can-focus">False</property>
|
||||||
|
</object>
|
||||||
|
<packing>
|
||||||
|
<property name="left-attach">1</property>
|
||||||
|
<property name="top-attach">5</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
<child>
|
||||||
|
<object class="GtkEntry" id="ent_location">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can-focus">True</property>
|
||||||
|
<property name="hexpand">True</property>
|
||||||
|
</object>
|
||||||
|
<packing>
|
||||||
|
<property name="left-attach">1</property>
|
||||||
|
<property name="top-attach">6</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
<child>
|
||||||
|
<object class="GtkScrolledWindow">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can-focus">True</property>
|
||||||
|
<property name="shadow-type">in</property>
|
||||||
|
<child>
|
||||||
|
<object class="GtkTextView" id="txt_remarks">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can-focus">True</property>
|
||||||
|
<property name="hexpand">True</property>
|
||||||
|
</object>
|
||||||
|
</child>
|
||||||
|
</object>
|
||||||
|
<packing>
|
||||||
|
<property name="left-attach">1</property>
|
||||||
|
<property name="top-attach">7</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
</object>
|
||||||
|
<packing>
|
||||||
|
<property name="expand">False</property>
|
||||||
|
<property name="fill">True</property>
|
||||||
|
<property name="position">1</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
<child>
|
||||||
|
<object class="GtkButtonBox">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can-focus">False</property>
|
||||||
|
<property name="layout-style">end</property>
|
||||||
|
<child>
|
||||||
|
<placeholder/>
|
||||||
|
</child>
|
||||||
|
<child>
|
||||||
|
<object class="GtkButton" id="but_save">
|
||||||
|
<property name="label" translatable="yes">Save</property>
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can-focus">True</property>
|
||||||
|
<property name="receives-default">True</property>
|
||||||
|
<signal name="clicked" handler="on_but_save_clicked" swapped="no"/>
|
||||||
|
</object>
|
||||||
|
<packing>
|
||||||
|
<property name="expand">True</property>
|
||||||
|
<property name="fill">True</property>
|
||||||
|
<property name="position">1</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
<child>
|
||||||
|
<object class="GtkButton" id="but_cancel">
|
||||||
|
<property name="label" translatable="yes">Cancel</property>
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can-focus">True</property>
|
||||||
|
<property name="receives-default">True</property>
|
||||||
|
<signal name="clicked" handler="on_but_cancel_clicked" swapped="no"/>
|
||||||
|
</object>
|
||||||
|
<packing>
|
||||||
|
<property name="expand">True</property>
|
||||||
|
<property name="fill">True</property>
|
||||||
|
<property name="position">2</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
</object>
|
||||||
|
<packing>
|
||||||
|
<property name="expand">False</property>
|
||||||
|
<property name="fill">True</property>
|
||||||
|
<property name="position">2</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
</object>
|
||||||
|
<packing>
|
||||||
|
<property name="name">page2</property>
|
||||||
|
<property name="title" translatable="yes">page2</property>
|
||||||
|
<property name="position">2</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
</object>
|
||||||
|
</interface>
|
||||||
@@ -0,0 +1,938 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<!-- Generated with glade 3.40.0 -->
|
||||||
|
<interface>
|
||||||
|
<requires lib="gtk+" version="3.24"/>
|
||||||
|
<object class="GtkAdjustment" id="adj_number">
|
||||||
|
<property name="upper">1000</property>
|
||||||
|
<property name="step-increment">1</property>
|
||||||
|
<property name="page-increment">10</property>
|
||||||
|
</object>
|
||||||
|
<object class="GtkAdjustment" id="adj_price">
|
||||||
|
<property name="upper">10000</property>
|
||||||
|
<property name="step-increment">10</property>
|
||||||
|
<property name="page-increment">100</property>
|
||||||
|
</object>
|
||||||
|
<object class="GtkAdjustment" id="adj_weight">
|
||||||
|
<property name="upper">1000</property>
|
||||||
|
<property name="step-increment">1</property>
|
||||||
|
<property name="page-increment">10</property>
|
||||||
|
</object>
|
||||||
|
<object class="GtkStack" id="topobject">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can-focus">False</property>
|
||||||
|
<property name="margin-start">8</property>
|
||||||
|
<child>
|
||||||
|
<object class="GtkBox" id="box_inventory">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can-focus">False</property>
|
||||||
|
<property name="orientation">vertical</property>
|
||||||
|
<child>
|
||||||
|
<object class="GtkExpander">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can-focus">True</property>
|
||||||
|
<child>
|
||||||
|
<!-- n-columns=3 n-rows=3 -->
|
||||||
|
<object class="GtkGrid">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can-focus">False</property>
|
||||||
|
<child>
|
||||||
|
<object class="GtkButtonBox">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can-focus">False</property>
|
||||||
|
<property name="orientation">vertical</property>
|
||||||
|
<property name="layout-style">start</property>
|
||||||
|
<child>
|
||||||
|
<object class="GtkButton">
|
||||||
|
<property name="label" translatable="yes">Clear</property>
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can-focus">True</property>
|
||||||
|
<property name="receives-default">True</property>
|
||||||
|
</object>
|
||||||
|
<packing>
|
||||||
|
<property name="expand">True</property>
|
||||||
|
<property name="fill">True</property>
|
||||||
|
<property name="position">0</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
<child>
|
||||||
|
<object class="GtkButton">
|
||||||
|
<property name="label" translatable="yes">Apply</property>
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can-focus">True</property>
|
||||||
|
<property name="receives-default">True</property>
|
||||||
|
</object>
|
||||||
|
<packing>
|
||||||
|
<property name="expand">True</property>
|
||||||
|
<property name="fill">True</property>
|
||||||
|
<property name="position">1</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
</object>
|
||||||
|
<packing>
|
||||||
|
<property name="left-attach">2</property>
|
||||||
|
<property name="top-attach">0</property>
|
||||||
|
<property name="height">3</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
<child>
|
||||||
|
<object class="GtkLabel">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can-focus">False</property>
|
||||||
|
<property name="label" translatable="yes">Storage</property>
|
||||||
|
</object>
|
||||||
|
<packing>
|
||||||
|
<property name="left-attach">0</property>
|
||||||
|
<property name="top-attach">0</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
<child>
|
||||||
|
<object class="GtkLabel">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can-focus">False</property>
|
||||||
|
<property name="label" translatable="yes">Condition</property>
|
||||||
|
</object>
|
||||||
|
<packing>
|
||||||
|
<property name="left-attach">0</property>
|
||||||
|
<property name="top-attach">1</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
<child>
|
||||||
|
<object class="GtkLabel">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can-focus">False</property>
|
||||||
|
<property name="label" translatable="yes">Text</property>
|
||||||
|
</object>
|
||||||
|
<packing>
|
||||||
|
<property name="left-attach">0</property>
|
||||||
|
<property name="top-attach">2</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
<child>
|
||||||
|
<object class="GtkComboBox">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can-focus">False</property>
|
||||||
|
</object>
|
||||||
|
<packing>
|
||||||
|
<property name="left-attach">1</property>
|
||||||
|
<property name="top-attach">0</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
<child>
|
||||||
|
<object class="GtkComboBox">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can-focus">False</property>
|
||||||
|
</object>
|
||||||
|
<packing>
|
||||||
|
<property name="left-attach">1</property>
|
||||||
|
<property name="top-attach">1</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
<child>
|
||||||
|
<object class="GtkEntry">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can-focus">True</property>
|
||||||
|
</object>
|
||||||
|
<packing>
|
||||||
|
<property name="left-attach">1</property>
|
||||||
|
<property name="top-attach">2</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
</object>
|
||||||
|
</child>
|
||||||
|
<child type="label">
|
||||||
|
<object class="GtkLabel">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can-focus">False</property>
|
||||||
|
<property name="label" translatable="yes">Filter Inventory</property>
|
||||||
|
</object>
|
||||||
|
</child>
|
||||||
|
</object>
|
||||||
|
<packing>
|
||||||
|
<property name="expand">False</property>
|
||||||
|
<property name="fill">True</property>
|
||||||
|
<property name="position">0</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
<child>
|
||||||
|
<object class="GtkScrolledWindow">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can-focus">True</property>
|
||||||
|
<property name="shadow-type">in</property>
|
||||||
|
<child>
|
||||||
|
<object class="GtkTreeView" id="tvw_inventory">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can-focus">True</property>
|
||||||
|
<signal name="row-activated" handler="on_tvw_inventory_row_activated" swapped="no"/>
|
||||||
|
<child internal-child="selection">
|
||||||
|
<object class="GtkTreeSelection"/>
|
||||||
|
</child>
|
||||||
|
</object>
|
||||||
|
</child>
|
||||||
|
</object>
|
||||||
|
<packing>
|
||||||
|
<property name="expand">True</property>
|
||||||
|
<property name="fill">True</property>
|
||||||
|
<property name="position">1</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
<child>
|
||||||
|
<object class="GtkButtonBox">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can-focus">False</property>
|
||||||
|
<property name="spacing">2</property>
|
||||||
|
<property name="layout-style">end</property>
|
||||||
|
<child>
|
||||||
|
<object class="GtkButton" id="but_new">
|
||||||
|
<property name="label" translatable="yes">New</property>
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can-focus">True</property>
|
||||||
|
<property name="receives-default">True</property>
|
||||||
|
<signal name="clicked" handler="on_but_new_clicked" swapped="no"/>
|
||||||
|
</object>
|
||||||
|
<packing>
|
||||||
|
<property name="expand">True</property>
|
||||||
|
<property name="fill">True</property>
|
||||||
|
<property name="position">0</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
<child>
|
||||||
|
<object class="GtkButton" id="but_edit">
|
||||||
|
<property name="label" translatable="yes">Edit</property>
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can-focus">True</property>
|
||||||
|
<property name="receives-default">True</property>
|
||||||
|
<signal name="clicked" handler="on_but_edit_clicked" swapped="no"/>
|
||||||
|
</object>
|
||||||
|
<packing>
|
||||||
|
<property name="expand">True</property>
|
||||||
|
<property name="fill">True</property>
|
||||||
|
<property name="position">1</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
<child>
|
||||||
|
<object class="GtkButton" id="but_detail">
|
||||||
|
<property name="label" translatable="yes">Details</property>
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can-focus">True</property>
|
||||||
|
<property name="receives-default">True</property>
|
||||||
|
<signal name="clicked" handler="on_but_detail_clicked" swapped="no"/>
|
||||||
|
</object>
|
||||||
|
<packing>
|
||||||
|
<property name="expand">True</property>
|
||||||
|
<property name="fill">True</property>
|
||||||
|
<property name="position">2</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
</object>
|
||||||
|
<packing>
|
||||||
|
<property name="expand">False</property>
|
||||||
|
<property name="fill">True</property>
|
||||||
|
<property name="position">2</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
</object>
|
||||||
|
<packing>
|
||||||
|
<property name="name">page0</property>
|
||||||
|
<property name="title" translatable="yes">page0</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
<child>
|
||||||
|
<object class="GtkBox" id="box_inv_detail">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can-focus">False</property>
|
||||||
|
<property name="orientation">vertical</property>
|
||||||
|
<child>
|
||||||
|
<object class="GtkLabel" id="lbl_title_detail">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can-focus">False</property>
|
||||||
|
<property name="label" translatable="yes">Inventory details</property>
|
||||||
|
<attributes>
|
||||||
|
<attribute name="weight" value="bold"/>
|
||||||
|
</attributes>
|
||||||
|
</object>
|
||||||
|
<packing>
|
||||||
|
<property name="expand">False</property>
|
||||||
|
<property name="fill">True</property>
|
||||||
|
<property name="position">0</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
<child>
|
||||||
|
<!-- n-columns=2 n-rows=12 -->
|
||||||
|
<object class="GtkGrid" id="grd_details">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can-focus">False</property>
|
||||||
|
<child>
|
||||||
|
<object class="GtkLabel" id="lbl_lb_name">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can-focus">False</property>
|
||||||
|
<property name="label" translatable="yes">Name</property>
|
||||||
|
</object>
|
||||||
|
<packing>
|
||||||
|
<property name="left-attach">0</property>
|
||||||
|
<property name="top-attach">0</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
<child>
|
||||||
|
<object class="GtkLabel" id="lbl_lb_type">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can-focus">False</property>
|
||||||
|
<property name="label" translatable="yes">Type</property>
|
||||||
|
</object>
|
||||||
|
<packing>
|
||||||
|
<property name="left-attach">0</property>
|
||||||
|
<property name="top-attach">1</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
<child>
|
||||||
|
<object class="GtkLabel" id="lbl_lb_storage">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can-focus">False</property>
|
||||||
|
<property name="label" translatable="yes">Storage</property>
|
||||||
|
</object>
|
||||||
|
<packing>
|
||||||
|
<property name="left-attach">0</property>
|
||||||
|
<property name="top-attach">2</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
<child>
|
||||||
|
<object class="GtkLabel" id="lbl_lb_box">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can-focus">False</property>
|
||||||
|
<property name="label" translatable="yes">Box</property>
|
||||||
|
</object>
|
||||||
|
<packing>
|
||||||
|
<property name="left-attach">0</property>
|
||||||
|
<property name="top-attach">3</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
<child>
|
||||||
|
<object class="GtkLabel" id="lbl_lb_equipment">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can-focus">False</property>
|
||||||
|
<property name="label" translatable="yes">Equipment</property>
|
||||||
|
</object>
|
||||||
|
<packing>
|
||||||
|
<property name="left-attach">0</property>
|
||||||
|
<property name="top-attach">4</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
<child>
|
||||||
|
<object class="GtkLabel" id="lbl_lb_number">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can-focus">False</property>
|
||||||
|
<property name="label" translatable="yes">Number</property>
|
||||||
|
</object>
|
||||||
|
<packing>
|
||||||
|
<property name="left-attach">0</property>
|
||||||
|
<property name="top-attach">5</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
<child>
|
||||||
|
<object class="GtkLabel" id="lbl_lb_weight">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can-focus">False</property>
|
||||||
|
<property name="label" translatable="yes">Weight</property>
|
||||||
|
</object>
|
||||||
|
<packing>
|
||||||
|
<property name="left-attach">0</property>
|
||||||
|
<property name="top-attach">6</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
<child>
|
||||||
|
<object class="GtkLabel" id="lbl_lb_price">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can-focus">False</property>
|
||||||
|
<property name="label" translatable="yes">Price</property>
|
||||||
|
</object>
|
||||||
|
<packing>
|
||||||
|
<property name="left-attach">0</property>
|
||||||
|
<property name="top-attach">7</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
<child>
|
||||||
|
<object class="GtkLabel" id="lbl_lb_purchdate">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can-focus">False</property>
|
||||||
|
<property name="label" translatable="yes">Purchase Date</property>
|
||||||
|
</object>
|
||||||
|
<packing>
|
||||||
|
<property name="left-attach">0</property>
|
||||||
|
<property name="top-attach">8</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
<child>
|
||||||
|
<object class="GtkLabel" id="lbl_lb_condition">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can-focus">False</property>
|
||||||
|
<property name="label" translatable="yes">Condition</property>
|
||||||
|
</object>
|
||||||
|
<packing>
|
||||||
|
<property name="left-attach">0</property>
|
||||||
|
<property name="top-attach">9</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
<child>
|
||||||
|
<object class="GtkLabel" id="lbl_lb_remarks">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can-focus">False</property>
|
||||||
|
<property name="label" translatable="yes">Remarks</property>
|
||||||
|
<property name="yalign">0</property>
|
||||||
|
</object>
|
||||||
|
<packing>
|
||||||
|
<property name="left-attach">0</property>
|
||||||
|
<property name="top-attach">11</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
<child>
|
||||||
|
<object class="GtkLabel" id="lbl_name">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can-focus">False</property>
|
||||||
|
<property name="hexpand">True</property>
|
||||||
|
<property name="label" translatable="yes">ddd</property>
|
||||||
|
</object>
|
||||||
|
<packing>
|
||||||
|
<property name="left-attach">1</property>
|
||||||
|
<property name="top-attach">0</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
<child>
|
||||||
|
<object class="GtkLabel" id="lbl_conttype">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can-focus">False</property>
|
||||||
|
<property name="hexpand">True</property>
|
||||||
|
</object>
|
||||||
|
<packing>
|
||||||
|
<property name="left-attach">1</property>
|
||||||
|
<property name="top-attach">1</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
<child>
|
||||||
|
<object class="GtkLabel" id="lbl_storage">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can-focus">False</property>
|
||||||
|
<property name="hexpand">True</property>
|
||||||
|
</object>
|
||||||
|
<packing>
|
||||||
|
<property name="left-attach">1</property>
|
||||||
|
<property name="top-attach">2</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
<child>
|
||||||
|
<object class="GtkLabel" id="lbl_box">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can-focus">False</property>
|
||||||
|
<property name="hexpand">True</property>
|
||||||
|
</object>
|
||||||
|
<packing>
|
||||||
|
<property name="left-attach">1</property>
|
||||||
|
<property name="top-attach">3</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
<child>
|
||||||
|
<object class="GtkLabel" id="lbl_equipment">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can-focus">False</property>
|
||||||
|
<property name="hexpand">True</property>
|
||||||
|
</object>
|
||||||
|
<packing>
|
||||||
|
<property name="left-attach">1</property>
|
||||||
|
<property name="top-attach">4</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
<child>
|
||||||
|
<object class="GtkLabel" id="lbl_number">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can-focus">False</property>
|
||||||
|
<property name="hexpand">True</property>
|
||||||
|
</object>
|
||||||
|
<packing>
|
||||||
|
<property name="left-attach">1</property>
|
||||||
|
<property name="top-attach">5</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
<child>
|
||||||
|
<object class="GtkLabel" id="lbl_weight">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can-focus">False</property>
|
||||||
|
<property name="hexpand">True</property>
|
||||||
|
</object>
|
||||||
|
<packing>
|
||||||
|
<property name="left-attach">1</property>
|
||||||
|
<property name="top-attach">6</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
<child>
|
||||||
|
<object class="GtkLabel" id="lbl_price">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can-focus">False</property>
|
||||||
|
<property name="hexpand">True</property>
|
||||||
|
</object>
|
||||||
|
<packing>
|
||||||
|
<property name="left-attach">1</property>
|
||||||
|
<property name="top-attach">7</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
<child>
|
||||||
|
<object class="GtkLabel" id="lbl_purchdate">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can-focus">False</property>
|
||||||
|
<property name="hexpand">True</property>
|
||||||
|
</object>
|
||||||
|
<packing>
|
||||||
|
<property name="left-attach">1</property>
|
||||||
|
<property name="top-attach">8</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
<child>
|
||||||
|
<object class="GtkLabel" id="lbl_condition">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can-focus">False</property>
|
||||||
|
<property name="hexpand">True</property>
|
||||||
|
</object>
|
||||||
|
<packing>
|
||||||
|
<property name="left-attach">1</property>
|
||||||
|
<property name="top-attach">9</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
<child>
|
||||||
|
<object class="GtkLabel" id="lbl_remarks">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can-focus">False</property>
|
||||||
|
<property name="hexpand">True</property>
|
||||||
|
<property name="vexpand">True</property>
|
||||||
|
</object>
|
||||||
|
<packing>
|
||||||
|
<property name="left-attach">1</property>
|
||||||
|
<property name="top-attach">11</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
<child>
|
||||||
|
<object class="GtkLabel" id="lbl_lb_category">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can-focus">False</property>
|
||||||
|
<property name="label" translatable="yes">Category</property>
|
||||||
|
</object>
|
||||||
|
<packing>
|
||||||
|
<property name="left-attach">0</property>
|
||||||
|
<property name="top-attach">10</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
<child>
|
||||||
|
<object class="GtkLabel" id="lbl_category">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can-focus">False</property>
|
||||||
|
<property name="hexpand">True</property>
|
||||||
|
</object>
|
||||||
|
<packing>
|
||||||
|
<property name="left-attach">1</property>
|
||||||
|
<property name="top-attach">10</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
</object>
|
||||||
|
<packing>
|
||||||
|
<property name="expand">True</property>
|
||||||
|
<property name="fill">True</property>
|
||||||
|
<property name="position">1</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
<child>
|
||||||
|
<object class="GtkButtonBox">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can-focus">False</property>
|
||||||
|
<property name="layout-style">end</property>
|
||||||
|
<child>
|
||||||
|
<object class="GtkButton" id="but_delete">
|
||||||
|
<property name="label" translatable="yes">Delete</property>
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can-focus">True</property>
|
||||||
|
<property name="receives-default">True</property>
|
||||||
|
<signal name="clicked" handler="on_but_delete_clicked" swapped="no"/>
|
||||||
|
</object>
|
||||||
|
<packing>
|
||||||
|
<property name="expand">True</property>
|
||||||
|
<property name="fill">True</property>
|
||||||
|
<property name="position">0</property>
|
||||||
|
<property name="secondary">True</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
<child>
|
||||||
|
<object class="GtkButton" id="but_edit2">
|
||||||
|
<property name="label" translatable="yes">Edit</property>
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can-focus">True</property>
|
||||||
|
<property name="receives-default">True</property>
|
||||||
|
<signal name="clicked" handler="on_but_edit_clicked" swapped="no"/>
|
||||||
|
</object>
|
||||||
|
<packing>
|
||||||
|
<property name="expand">True</property>
|
||||||
|
<property name="fill">True</property>
|
||||||
|
<property name="position">1</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
<child>
|
||||||
|
<object class="GtkButton" id="but_close">
|
||||||
|
<property name="label" translatable="yes">Close</property>
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can-focus">True</property>
|
||||||
|
<property name="receives-default">True</property>
|
||||||
|
<signal name="clicked" handler="on_but_close_clicked" swapped="no"/>
|
||||||
|
</object>
|
||||||
|
<packing>
|
||||||
|
<property name="expand">True</property>
|
||||||
|
<property name="fill">True</property>
|
||||||
|
<property name="position">2</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
</object>
|
||||||
|
<packing>
|
||||||
|
<property name="expand">False</property>
|
||||||
|
<property name="fill">True</property>
|
||||||
|
<property name="position">2</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
</object>
|
||||||
|
<packing>
|
||||||
|
<property name="name">page1</property>
|
||||||
|
<property name="title" translatable="yes">page1</property>
|
||||||
|
<property name="position">1</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
<child>
|
||||||
|
<object class="GtkBox" id="box_inv_edit">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can-focus">False</property>
|
||||||
|
<property name="orientation">vertical</property>
|
||||||
|
<child>
|
||||||
|
<object class="GtkLabel" id="lbl_title_edit">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can-focus">False</property>
|
||||||
|
<property name="label" translatable="yes">Edit inventory</property>
|
||||||
|
<attributes>
|
||||||
|
<attribute name="weight" value="bold"/>
|
||||||
|
</attributes>
|
||||||
|
</object>
|
||||||
|
<packing>
|
||||||
|
<property name="expand">False</property>
|
||||||
|
<property name="fill">True</property>
|
||||||
|
<property name="position">0</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
<child>
|
||||||
|
<!-- n-columns=2 n-rows=12 -->
|
||||||
|
<object class="GtkGrid" id="grd_editor">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can-focus">False</property>
|
||||||
|
<child>
|
||||||
|
<object class="GtkLabel">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can-focus">False</property>
|
||||||
|
<property name="label" translatable="yes">Name</property>
|
||||||
|
</object>
|
||||||
|
<packing>
|
||||||
|
<property name="left-attach">0</property>
|
||||||
|
<property name="top-attach">0</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
<child>
|
||||||
|
<object class="GtkLabel">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can-focus">False</property>
|
||||||
|
<property name="label" translatable="yes">Type</property>
|
||||||
|
</object>
|
||||||
|
<packing>
|
||||||
|
<property name="left-attach">0</property>
|
||||||
|
<property name="top-attach">1</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
<child>
|
||||||
|
<object class="GtkLabel">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can-focus">False</property>
|
||||||
|
<property name="label" translatable="yes">Storage</property>
|
||||||
|
</object>
|
||||||
|
<packing>
|
||||||
|
<property name="left-attach">0</property>
|
||||||
|
<property name="top-attach">2</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
<child>
|
||||||
|
<object class="GtkLabel">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can-focus">False</property>
|
||||||
|
<property name="label" translatable="yes">Box</property>
|
||||||
|
</object>
|
||||||
|
<packing>
|
||||||
|
<property name="left-attach">0</property>
|
||||||
|
<property name="top-attach">3</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
<child>
|
||||||
|
<object class="GtkLabel">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can-focus">False</property>
|
||||||
|
<property name="label" translatable="yes">Equipment</property>
|
||||||
|
</object>
|
||||||
|
<packing>
|
||||||
|
<property name="left-attach">0</property>
|
||||||
|
<property name="top-attach">4</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
<child>
|
||||||
|
<object class="GtkLabel">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can-focus">False</property>
|
||||||
|
<property name="label" translatable="yes">Number</property>
|
||||||
|
</object>
|
||||||
|
<packing>
|
||||||
|
<property name="left-attach">0</property>
|
||||||
|
<property name="top-attach">5</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
<child>
|
||||||
|
<object class="GtkLabel">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can-focus">False</property>
|
||||||
|
<property name="label" translatable="yes">Weight</property>
|
||||||
|
</object>
|
||||||
|
<packing>
|
||||||
|
<property name="left-attach">0</property>
|
||||||
|
<property name="top-attach">6</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
<child>
|
||||||
|
<object class="GtkLabel">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can-focus">False</property>
|
||||||
|
<property name="label" translatable="yes">Price</property>
|
||||||
|
</object>
|
||||||
|
<packing>
|
||||||
|
<property name="left-attach">0</property>
|
||||||
|
<property name="top-attach">7</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
<child>
|
||||||
|
<object class="GtkLabel">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can-focus">False</property>
|
||||||
|
<property name="label" translatable="yes">Puchase date</property>
|
||||||
|
</object>
|
||||||
|
<packing>
|
||||||
|
<property name="left-attach">0</property>
|
||||||
|
<property name="top-attach">8</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
<child>
|
||||||
|
<object class="GtkLabel">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can-focus">False</property>
|
||||||
|
<property name="label" translatable="yes">Condition</property>
|
||||||
|
</object>
|
||||||
|
<packing>
|
||||||
|
<property name="left-attach">0</property>
|
||||||
|
<property name="top-attach">9</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
<child>
|
||||||
|
<object class="GtkLabel">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can-focus">False</property>
|
||||||
|
<property name="label" translatable="yes">Remarks</property>
|
||||||
|
</object>
|
||||||
|
<packing>
|
||||||
|
<property name="left-attach">0</property>
|
||||||
|
<property name="top-attach">11</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
<child>
|
||||||
|
<object class="GtkEntry" id="ent_name">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can-focus">True</property>
|
||||||
|
<property name="hexpand">True</property>
|
||||||
|
</object>
|
||||||
|
<packing>
|
||||||
|
<property name="left-attach">1</property>
|
||||||
|
<property name="top-attach">0</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
<child>
|
||||||
|
<object class="GtkEntry" id="ent_remarks">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can-focus">True</property>
|
||||||
|
</object>
|
||||||
|
<packing>
|
||||||
|
<property name="left-attach">1</property>
|
||||||
|
<property name="top-attach">11</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
<child>
|
||||||
|
<object class="GtkComboBox" id="cmb_type">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can-focus">False</property>
|
||||||
|
</object>
|
||||||
|
<packing>
|
||||||
|
<property name="left-attach">1</property>
|
||||||
|
<property name="top-attach">1</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
<child>
|
||||||
|
<object class="GtkComboBox" id="cmd_storage">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can-focus">False</property>
|
||||||
|
</object>
|
||||||
|
<packing>
|
||||||
|
<property name="left-attach">1</property>
|
||||||
|
<property name="top-attach">2</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
<child>
|
||||||
|
<object class="GtkComboBox" id="cmb_box">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can-focus">False</property>
|
||||||
|
</object>
|
||||||
|
<packing>
|
||||||
|
<property name="left-attach">1</property>
|
||||||
|
<property name="top-attach">3</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
<child>
|
||||||
|
<object class="GtkComboBox" id="cmb_equipment">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can-focus">False</property>
|
||||||
|
</object>
|
||||||
|
<packing>
|
||||||
|
<property name="left-attach">1</property>
|
||||||
|
<property name="top-attach">4</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
<child>
|
||||||
|
<object class="GtkComboBox" id="cmb_condition">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can-focus">False</property>
|
||||||
|
</object>
|
||||||
|
<packing>
|
||||||
|
<property name="left-attach">1</property>
|
||||||
|
<property name="top-attach">9</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
<child>
|
||||||
|
<object class="GtkEntry" id="ent_date">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can-focus">True</property>
|
||||||
|
</object>
|
||||||
|
<packing>
|
||||||
|
<property name="left-attach">1</property>
|
||||||
|
<property name="top-attach">8</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
<child>
|
||||||
|
<object class="GtkSpinButton" id="spi_number">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can-focus">True</property>
|
||||||
|
<property name="adjustment">adj_number</property>
|
||||||
|
</object>
|
||||||
|
<packing>
|
||||||
|
<property name="left-attach">1</property>
|
||||||
|
<property name="top-attach">5</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
<child>
|
||||||
|
<object class="GtkSpinButton" id="spi_weight">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can-focus">True</property>
|
||||||
|
<property name="adjustment">adj_weight</property>
|
||||||
|
<property name="digits">2</property>
|
||||||
|
</object>
|
||||||
|
<packing>
|
||||||
|
<property name="left-attach">1</property>
|
||||||
|
<property name="top-attach">6</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
<child>
|
||||||
|
<object class="GtkSpinButton" id="spi_price">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can-focus">True</property>
|
||||||
|
<property name="adjustment">adj_price</property>
|
||||||
|
<property name="digits">2</property>
|
||||||
|
</object>
|
||||||
|
<packing>
|
||||||
|
<property name="left-attach">1</property>
|
||||||
|
<property name="top-attach">7</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
<child>
|
||||||
|
<object class="GtkLabel">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can-focus">False</property>
|
||||||
|
<property name="label" translatable="yes">Category</property>
|
||||||
|
</object>
|
||||||
|
<packing>
|
||||||
|
<property name="left-attach">0</property>
|
||||||
|
<property name="top-attach">10</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
<child>
|
||||||
|
<object class="GtkComboBox" id="cmb_category">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can-focus">False</property>
|
||||||
|
</object>
|
||||||
|
<packing>
|
||||||
|
<property name="left-attach">1</property>
|
||||||
|
<property name="top-attach">10</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
</object>
|
||||||
|
<packing>
|
||||||
|
<property name="expand">False</property>
|
||||||
|
<property name="fill">True</property>
|
||||||
|
<property name="position">1</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
<child>
|
||||||
|
<object class="GtkButtonBox">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can-focus">False</property>
|
||||||
|
<property name="layout-style">end</property>
|
||||||
|
<child>
|
||||||
|
<object class="GtkButton" id="but_save">
|
||||||
|
<property name="label" translatable="yes">Save</property>
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can-focus">True</property>
|
||||||
|
<property name="receives-default">True</property>
|
||||||
|
<signal name="clicked" handler="on_but_save_clicked" swapped="no"/>
|
||||||
|
</object>
|
||||||
|
<packing>
|
||||||
|
<property name="expand">True</property>
|
||||||
|
<property name="fill">True</property>
|
||||||
|
<property name="position">0</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
<child>
|
||||||
|
<object class="GtkButton" id="but_cancel">
|
||||||
|
<property name="label" translatable="yes">Cancel</property>
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can-focus">True</property>
|
||||||
|
<property name="receives-default">True</property>
|
||||||
|
<signal name="clicked" handler="on_but_cancel_clicked" swapped="no"/>
|
||||||
|
</object>
|
||||||
|
<packing>
|
||||||
|
<property name="expand">True</property>
|
||||||
|
<property name="fill">True</property>
|
||||||
|
<property name="position">1</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
</object>
|
||||||
|
<packing>
|
||||||
|
<property name="expand">False</property>
|
||||||
|
<property name="fill">True</property>
|
||||||
|
<property name="position">2</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
</object>
|
||||||
|
<packing>
|
||||||
|
<property name="name">page2</property>
|
||||||
|
<property name="title" translatable="yes">page2</property>
|
||||||
|
<property name="position">2</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
</object>
|
||||||
|
</interface>
|
||||||
+1
-2653
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,774 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<!-- Generated with glade 3.40.0 -->
|
||||||
|
<interface>
|
||||||
|
<requires lib="gtk+" version="3.24"/>
|
||||||
|
<object class="GtkStack" id="topobject">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can-focus">False</property>
|
||||||
|
<property name="margin-start">8</property>
|
||||||
|
<child>
|
||||||
|
<object class="GtkBox" id="box_maintenance">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can-focus">False</property>
|
||||||
|
<property name="orientation">vertical</property>
|
||||||
|
<child>
|
||||||
|
<object class="GtkExpander">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can-focus">True</property>
|
||||||
|
<child>
|
||||||
|
<!-- n-columns=3 n-rows=2 -->
|
||||||
|
<object class="GtkGrid">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can-focus">False</property>
|
||||||
|
<child>
|
||||||
|
<object class="GtkButtonBox">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can-focus">False</property>
|
||||||
|
<property name="orientation">vertical</property>
|
||||||
|
<property name="layout-style">start</property>
|
||||||
|
<child>
|
||||||
|
<object class="GtkButton" id="but_flt_clear">
|
||||||
|
<property name="label" translatable="yes">Clear</property>
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can-focus">True</property>
|
||||||
|
<property name="receives-default">True</property>
|
||||||
|
</object>
|
||||||
|
<packing>
|
||||||
|
<property name="expand">True</property>
|
||||||
|
<property name="fill">True</property>
|
||||||
|
<property name="position">0</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
<child>
|
||||||
|
<object class="GtkButton" id="but_flt_apply">
|
||||||
|
<property name="label" translatable="yes">Apply</property>
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can-focus">True</property>
|
||||||
|
<property name="receives-default">True</property>
|
||||||
|
</object>
|
||||||
|
<packing>
|
||||||
|
<property name="expand">True</property>
|
||||||
|
<property name="fill">True</property>
|
||||||
|
<property name="position">1</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
</object>
|
||||||
|
<packing>
|
||||||
|
<property name="left-attach">2</property>
|
||||||
|
<property name="top-attach">0</property>
|
||||||
|
<property name="height">2</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
<child>
|
||||||
|
<object class="GtkLabel">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can-focus">False</property>
|
||||||
|
<property name="label" translatable="yes">Equipment</property>
|
||||||
|
</object>
|
||||||
|
<packing>
|
||||||
|
<property name="left-attach">0</property>
|
||||||
|
<property name="top-attach">0</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
<child>
|
||||||
|
<object class="GtkLabel">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can-focus">False</property>
|
||||||
|
<property name="label" translatable="yes">Text</property>
|
||||||
|
</object>
|
||||||
|
<packing>
|
||||||
|
<property name="left-attach">0</property>
|
||||||
|
<property name="top-attach">1</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
<child>
|
||||||
|
<object class="GtkComboBox" id="cmb_flt_equip">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can-focus">False</property>
|
||||||
|
<property name="hexpand">True</property>
|
||||||
|
</object>
|
||||||
|
<packing>
|
||||||
|
<property name="left-attach">1</property>
|
||||||
|
<property name="top-attach">0</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
<child>
|
||||||
|
<object class="GtkEntry" id="ent_flt_text">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can-focus">True</property>
|
||||||
|
</object>
|
||||||
|
<packing>
|
||||||
|
<property name="left-attach">1</property>
|
||||||
|
<property name="top-attach">1</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
</object>
|
||||||
|
</child>
|
||||||
|
<child type="label">
|
||||||
|
<object class="GtkLabel">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can-focus">False</property>
|
||||||
|
<property name="label" translatable="yes">Filter Maintenance</property>
|
||||||
|
</object>
|
||||||
|
</child>
|
||||||
|
</object>
|
||||||
|
<packing>
|
||||||
|
<property name="expand">False</property>
|
||||||
|
<property name="fill">True</property>
|
||||||
|
<property name="position">0</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
<child>
|
||||||
|
<object class="GtkScrolledWindow">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can-focus">True</property>
|
||||||
|
<property name="shadow-type">in</property>
|
||||||
|
<child>
|
||||||
|
<object class="GtkTreeView" id="tvw_maintenance">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can-focus">True</property>
|
||||||
|
<child internal-child="selection">
|
||||||
|
<object class="GtkTreeSelection"/>
|
||||||
|
</child>
|
||||||
|
</object>
|
||||||
|
</child>
|
||||||
|
</object>
|
||||||
|
<packing>
|
||||||
|
<property name="expand">True</property>
|
||||||
|
<property name="fill">True</property>
|
||||||
|
<property name="position">1</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
<child>
|
||||||
|
<object class="GtkButtonBox">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can-focus">False</property>
|
||||||
|
<property name="layout-style">end</property>
|
||||||
|
<child>
|
||||||
|
<object class="GtkButton" id="but_new">
|
||||||
|
<property name="label" translatable="yes">New</property>
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can-focus">True</property>
|
||||||
|
<property name="receives-default">True</property>
|
||||||
|
<signal name="clicked" handler="on_but_new_clicked" swapped="no"/>
|
||||||
|
</object>
|
||||||
|
<packing>
|
||||||
|
<property name="expand">True</property>
|
||||||
|
<property name="fill">True</property>
|
||||||
|
<property name="position">0</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
<child>
|
||||||
|
<object class="GtkButton" id="but_edit">
|
||||||
|
<property name="label" translatable="yes">Edit</property>
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can-focus">True</property>
|
||||||
|
<property name="receives-default">True</property>
|
||||||
|
<signal name="clicked" handler="on_but_edit_clicked" swapped="no"/>
|
||||||
|
</object>
|
||||||
|
<packing>
|
||||||
|
<property name="expand">True</property>
|
||||||
|
<property name="fill">True</property>
|
||||||
|
<property name="position">1</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
<child>
|
||||||
|
<object class="GtkButton" id="but_detail">
|
||||||
|
<property name="label" translatable="yes">Details</property>
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can-focus">True</property>
|
||||||
|
<property name="receives-default">True</property>
|
||||||
|
<signal name="clicked" handler="on_but_detail_clicked" swapped="no"/>
|
||||||
|
</object>
|
||||||
|
<packing>
|
||||||
|
<property name="expand">True</property>
|
||||||
|
<property name="fill">True</property>
|
||||||
|
<property name="position">2</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
</object>
|
||||||
|
<packing>
|
||||||
|
<property name="expand">False</property>
|
||||||
|
<property name="fill">True</property>
|
||||||
|
<property name="position">2</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
</object>
|
||||||
|
<packing>
|
||||||
|
<property name="name">page0</property>
|
||||||
|
<property name="title" translatable="yes">page0</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
<child>
|
||||||
|
<object class="GtkBox" id="box_maint_detail">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can-focus">False</property>
|
||||||
|
<property name="orientation">vertical</property>
|
||||||
|
<child>
|
||||||
|
<object class="GtkLabel" id="lbl_title_detail">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can-focus">False</property>
|
||||||
|
<property name="label" translatable="yes">Maintenance Details</property>
|
||||||
|
<attributes>
|
||||||
|
<attribute name="weight" value="bold"/>
|
||||||
|
</attributes>
|
||||||
|
</object>
|
||||||
|
<packing>
|
||||||
|
<property name="expand">False</property>
|
||||||
|
<property name="fill">True</property>
|
||||||
|
<property name="position">0</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
<child>
|
||||||
|
<!-- n-columns=2 n-rows=9 -->
|
||||||
|
<object class="GtkGrid" id="grd_details">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can-focus">False</property>
|
||||||
|
<child>
|
||||||
|
<object class="GtkLabel" id="lbl_lb_activities">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can-focus">False</property>
|
||||||
|
<property name="label" translatable="yes">Activities</property>
|
||||||
|
</object>
|
||||||
|
<packing>
|
||||||
|
<property name="left-attach">0</property>
|
||||||
|
<property name="top-attach">0</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
<child>
|
||||||
|
<object class="GtkLabel" id="lbl_activities">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can-focus">False</property>
|
||||||
|
<property name="hexpand">True</property>
|
||||||
|
</object>
|
||||||
|
<packing>
|
||||||
|
<property name="left-attach">1</property>
|
||||||
|
<property name="top-attach">0</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
<child>
|
||||||
|
<object class="GtkLabel" id="lbl_lb_equipment">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can-focus">False</property>
|
||||||
|
<property name="label" translatable="yes">Equipment</property>
|
||||||
|
</object>
|
||||||
|
<packing>
|
||||||
|
<property name="left-attach">0</property>
|
||||||
|
<property name="top-attach">1</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
<child>
|
||||||
|
<object class="GtkLabel" id="lbl_equipment">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can-focus">False</property>
|
||||||
|
<property name="hexpand">True</property>
|
||||||
|
</object>
|
||||||
|
<packing>
|
||||||
|
<property name="left-attach">1</property>
|
||||||
|
<property name="top-attach">1</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
<child>
|
||||||
|
<object class="GtkLabel" id="lbl_lb_series">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can-focus">False</property>
|
||||||
|
<property name="label" translatable="yes">Series</property>
|
||||||
|
</object>
|
||||||
|
<packing>
|
||||||
|
<property name="left-attach">0</property>
|
||||||
|
<property name="top-attach">2</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
<child>
|
||||||
|
<object class="GtkLabel" id="lbl_lb_interval">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can-focus">False</property>
|
||||||
|
<property name="label" translatable="yes">Interval hours</property>
|
||||||
|
</object>
|
||||||
|
<packing>
|
||||||
|
<property name="left-attach">0</property>
|
||||||
|
<property name="top-attach">3</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
<child>
|
||||||
|
<object class="GtkLabel" id="lbl_lb_last">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can-focus">False</property>
|
||||||
|
<property name="label" translatable="yes">Last hours</property>
|
||||||
|
</object>
|
||||||
|
<packing>
|
||||||
|
<property name="left-attach">0</property>
|
||||||
|
<property name="top-attach">4</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
<child>
|
||||||
|
<object class="GtkLabel" id="lbl_lb_plandate">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can-focus">False</property>
|
||||||
|
<property name="label" translatable="yes">Plan date</property>
|
||||||
|
</object>
|
||||||
|
<packing>
|
||||||
|
<property name="left-attach">0</property>
|
||||||
|
<property name="top-attach">5</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
<child>
|
||||||
|
<object class="GtkLabel" id="lbl_lb_completion">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can-focus">False</property>
|
||||||
|
<property name="label" translatable="yes">Completion date</property>
|
||||||
|
</object>
|
||||||
|
<packing>
|
||||||
|
<property name="left-attach">0</property>
|
||||||
|
<property name="top-attach">6</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
<child>
|
||||||
|
<object class="GtkLabel" id="lbl_lb_status">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can-focus">False</property>
|
||||||
|
<property name="label" translatable="yes">Status</property>
|
||||||
|
</object>
|
||||||
|
<packing>
|
||||||
|
<property name="left-attach">0</property>
|
||||||
|
<property name="top-attach">7</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
<child>
|
||||||
|
<object class="GtkLabel" id="lbl_lb_remarks">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can-focus">False</property>
|
||||||
|
<property name="label" translatable="yes">Remarks</property>
|
||||||
|
</object>
|
||||||
|
<packing>
|
||||||
|
<property name="left-attach">0</property>
|
||||||
|
<property name="top-attach">8</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
<child>
|
||||||
|
<object class="GtkLabel" id="lbl_series">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can-focus">False</property>
|
||||||
|
<property name="hexpand">True</property>
|
||||||
|
</object>
|
||||||
|
<packing>
|
||||||
|
<property name="left-attach">1</property>
|
||||||
|
<property name="top-attach">2</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
<child>
|
||||||
|
<object class="GtkLabel" id="lbl_interval">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can-focus">False</property>
|
||||||
|
<property name="hexpand">True</property>
|
||||||
|
</object>
|
||||||
|
<packing>
|
||||||
|
<property name="left-attach">1</property>
|
||||||
|
<property name="top-attach">3</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
<child>
|
||||||
|
<object class="GtkLabel" id="lbl_last">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can-focus">False</property>
|
||||||
|
<property name="hexpand">True</property>
|
||||||
|
</object>
|
||||||
|
<packing>
|
||||||
|
<property name="left-attach">1</property>
|
||||||
|
<property name="top-attach">4</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
<child>
|
||||||
|
<object class="GtkLabel" id="lbl_plandate">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can-focus">False</property>
|
||||||
|
<property name="hexpand">True</property>
|
||||||
|
</object>
|
||||||
|
<packing>
|
||||||
|
<property name="left-attach">1</property>
|
||||||
|
<property name="top-attach">5</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
<child>
|
||||||
|
<object class="GtkLabel" id="lbl_completion">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can-focus">False</property>
|
||||||
|
<property name="hexpand">True</property>
|
||||||
|
</object>
|
||||||
|
<packing>
|
||||||
|
<property name="left-attach">1</property>
|
||||||
|
<property name="top-attach">6</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
<child>
|
||||||
|
<object class="GtkLabel" id="lbl_status">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can-focus">False</property>
|
||||||
|
<property name="hexpand">True</property>
|
||||||
|
</object>
|
||||||
|
<packing>
|
||||||
|
<property name="left-attach">1</property>
|
||||||
|
<property name="top-attach">7</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
<child>
|
||||||
|
<object class="GtkLabel" id="lbl_remarks">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can-focus">False</property>
|
||||||
|
<property name="hexpand">True</property>
|
||||||
|
</object>
|
||||||
|
<packing>
|
||||||
|
<property name="left-attach">1</property>
|
||||||
|
<property name="top-attach">8</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
</object>
|
||||||
|
<packing>
|
||||||
|
<property name="expand">True</property>
|
||||||
|
<property name="fill">True</property>
|
||||||
|
<property name="position">1</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
<child>
|
||||||
|
<object class="GtkButtonBox">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can-focus">False</property>
|
||||||
|
<property name="layout-style">end</property>
|
||||||
|
<child>
|
||||||
|
<object class="GtkButton" id="but_delete">
|
||||||
|
<property name="label" translatable="yes">Delete</property>
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can-focus">True</property>
|
||||||
|
<property name="receives-default">True</property>
|
||||||
|
<signal name="clicked" handler="on_but_delete_clicked" swapped="no"/>
|
||||||
|
</object>
|
||||||
|
<packing>
|
||||||
|
<property name="expand">True</property>
|
||||||
|
<property name="fill">True</property>
|
||||||
|
<property name="position">0</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
<child>
|
||||||
|
<object class="GtkButton" id="but_edit2">
|
||||||
|
<property name="label" translatable="yes">Edit</property>
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can-focus">True</property>
|
||||||
|
<property name="receives-default">True</property>
|
||||||
|
<signal name="clicked" handler="on_but_edit_clicked" swapped="no"/>
|
||||||
|
</object>
|
||||||
|
<packing>
|
||||||
|
<property name="expand">True</property>
|
||||||
|
<property name="fill">True</property>
|
||||||
|
<property name="position">1</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
<child>
|
||||||
|
<object class="GtkButton" id="but_close">
|
||||||
|
<property name="label" translatable="yes">Close</property>
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can-focus">True</property>
|
||||||
|
<property name="receives-default">True</property>
|
||||||
|
<signal name="clicked" handler="on_but_close_clicked" swapped="no"/>
|
||||||
|
</object>
|
||||||
|
<packing>
|
||||||
|
<property name="expand">True</property>
|
||||||
|
<property name="fill">True</property>
|
||||||
|
<property name="position">2</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
</object>
|
||||||
|
<packing>
|
||||||
|
<property name="expand">False</property>
|
||||||
|
<property name="fill">True</property>
|
||||||
|
<property name="position">2</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
</object>
|
||||||
|
<packing>
|
||||||
|
<property name="name">page1</property>
|
||||||
|
<property name="title" translatable="yes">page1</property>
|
||||||
|
<property name="position">1</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
<child>
|
||||||
|
<object class="GtkBox" id="box_maint_edit">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can-focus">False</property>
|
||||||
|
<property name="orientation">vertical</property>
|
||||||
|
<child>
|
||||||
|
<object class="GtkLabel" id="lbl_title_edit">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can-focus">False</property>
|
||||||
|
<property name="label" translatable="yes">Edit Maintenance</property>
|
||||||
|
<attributes>
|
||||||
|
<attribute name="weight" value="bold"/>
|
||||||
|
</attributes>
|
||||||
|
</object>
|
||||||
|
<packing>
|
||||||
|
<property name="expand">False</property>
|
||||||
|
<property name="fill">True</property>
|
||||||
|
<property name="position">0</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
<child>
|
||||||
|
<!-- n-columns=2 n-rows=9 -->
|
||||||
|
<object class="GtkGrid" id="grd_editor">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can-focus">False</property>
|
||||||
|
<child>
|
||||||
|
<object class="GtkLabel">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can-focus">False</property>
|
||||||
|
<property name="label" translatable="yes">Activities</property>
|
||||||
|
</object>
|
||||||
|
<packing>
|
||||||
|
<property name="left-attach">0</property>
|
||||||
|
<property name="top-attach">0</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
<child>
|
||||||
|
<object class="GtkLabel">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can-focus">False</property>
|
||||||
|
<property name="label" translatable="yes">Equipment</property>
|
||||||
|
</object>
|
||||||
|
<packing>
|
||||||
|
<property name="left-attach">0</property>
|
||||||
|
<property name="top-attach">1</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
<child>
|
||||||
|
<object class="GtkLabel">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can-focus">False</property>
|
||||||
|
<property name="label" translatable="yes">Series</property>
|
||||||
|
</object>
|
||||||
|
<packing>
|
||||||
|
<property name="left-attach">0</property>
|
||||||
|
<property name="top-attach">2</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
<child>
|
||||||
|
<object class="GtkLabel">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can-focus">False</property>
|
||||||
|
<property name="label" translatable="yes">Interval</property>
|
||||||
|
</object>
|
||||||
|
<packing>
|
||||||
|
<property name="left-attach">0</property>
|
||||||
|
<property name="top-attach">3</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
<child>
|
||||||
|
<object class="GtkLabel">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can-focus">False</property>
|
||||||
|
<property name="label" translatable="yes">Last hours</property>
|
||||||
|
</object>
|
||||||
|
<packing>
|
||||||
|
<property name="left-attach">0</property>
|
||||||
|
<property name="top-attach">4</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
<child>
|
||||||
|
<object class="GtkLabel">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can-focus">False</property>
|
||||||
|
<property name="label" translatable="yes">Plan date</property>
|
||||||
|
</object>
|
||||||
|
<packing>
|
||||||
|
<property name="left-attach">0</property>
|
||||||
|
<property name="top-attach">5</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
<child>
|
||||||
|
<object class="GtkLabel">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can-focus">False</property>
|
||||||
|
<property name="label" translatable="yes">Completion date</property>
|
||||||
|
</object>
|
||||||
|
<packing>
|
||||||
|
<property name="left-attach">0</property>
|
||||||
|
<property name="top-attach">6</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
<child>
|
||||||
|
<object class="GtkLabel">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can-focus">False</property>
|
||||||
|
<property name="label" translatable="yes">Status</property>
|
||||||
|
</object>
|
||||||
|
<packing>
|
||||||
|
<property name="left-attach">0</property>
|
||||||
|
<property name="top-attach">7</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
<child>
|
||||||
|
<object class="GtkLabel">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can-focus">False</property>
|
||||||
|
<property name="label" translatable="yes">Remarks</property>
|
||||||
|
</object>
|
||||||
|
<packing>
|
||||||
|
<property name="left-attach">0</property>
|
||||||
|
<property name="top-attach">8</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
<child>
|
||||||
|
<object class="GtkEntry" id="txt_activities">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can-focus">True</property>
|
||||||
|
<property name="hexpand">True</property>
|
||||||
|
</object>
|
||||||
|
<packing>
|
||||||
|
<property name="left-attach">1</property>
|
||||||
|
<property name="top-attach">0</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
<child>
|
||||||
|
<object class="GtkComboBox" id="cmb_equipment">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can-focus">False</property>
|
||||||
|
</object>
|
||||||
|
<packing>
|
||||||
|
<property name="left-attach">1</property>
|
||||||
|
<property name="top-attach">1</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
<child>
|
||||||
|
<object class="GtkSpinButton" id="spi_series">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can-focus">True</property>
|
||||||
|
</object>
|
||||||
|
<packing>
|
||||||
|
<property name="left-attach">1</property>
|
||||||
|
<property name="top-attach">2</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
<child>
|
||||||
|
<object class="GtkSpinButton" id="spi_interval">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can-focus">True</property>
|
||||||
|
</object>
|
||||||
|
<packing>
|
||||||
|
<property name="left-attach">1</property>
|
||||||
|
<property name="top-attach">3</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
<child>
|
||||||
|
<object class="GtkSpinButton" id="spi_last_hours">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can-focus">True</property>
|
||||||
|
</object>
|
||||||
|
<packing>
|
||||||
|
<property name="left-attach">1</property>
|
||||||
|
<property name="top-attach">4</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
<child>
|
||||||
|
<object class="GtkEntry" id="ent_plandate">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can-focus">True</property>
|
||||||
|
<property name="hexpand">True</property>
|
||||||
|
</object>
|
||||||
|
<packing>
|
||||||
|
<property name="left-attach">1</property>
|
||||||
|
<property name="top-attach">5</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
<child>
|
||||||
|
<object class="GtkEntry" id="ent_completion">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can-focus">True</property>
|
||||||
|
<property name="hexpand">True</property>
|
||||||
|
</object>
|
||||||
|
<packing>
|
||||||
|
<property name="left-attach">1</property>
|
||||||
|
<property name="top-attach">6</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
<child>
|
||||||
|
<object class="GtkComboBox" id="cmb_status">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can-focus">False</property>
|
||||||
|
</object>
|
||||||
|
<packing>
|
||||||
|
<property name="left-attach">1</property>
|
||||||
|
<property name="top-attach">7</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
<child>
|
||||||
|
<object class="GtkScrolledWindow">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can-focus">True</property>
|
||||||
|
<property name="hexpand">True</property>
|
||||||
|
<property name="vexpand">True</property>
|
||||||
|
<property name="shadow-type">in</property>
|
||||||
|
<child>
|
||||||
|
<object class="GtkTextView" id="txt_remarks">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can-focus">True</property>
|
||||||
|
</object>
|
||||||
|
</child>
|
||||||
|
</object>
|
||||||
|
<packing>
|
||||||
|
<property name="left-attach">1</property>
|
||||||
|
<property name="top-attach">8</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
</object>
|
||||||
|
<packing>
|
||||||
|
<property name="expand">True</property>
|
||||||
|
<property name="fill">True</property>
|
||||||
|
<property name="position">1</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
<child>
|
||||||
|
<object class="GtkButtonBox">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can-focus">False</property>
|
||||||
|
<property name="layout-style">end</property>
|
||||||
|
<child>
|
||||||
|
<object class="GtkButton" id="but_save">
|
||||||
|
<property name="label" translatable="yes">Save</property>
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can-focus">True</property>
|
||||||
|
<property name="receives-default">True</property>
|
||||||
|
<signal name="clicked" handler="on_but_save_clicked" swapped="no"/>
|
||||||
|
</object>
|
||||||
|
<packing>
|
||||||
|
<property name="expand">True</property>
|
||||||
|
<property name="fill">True</property>
|
||||||
|
<property name="position">1</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
<child>
|
||||||
|
<object class="GtkButton" id="but_cancel">
|
||||||
|
<property name="label" translatable="yes">Cancel</property>
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can-focus">True</property>
|
||||||
|
<property name="receives-default">True</property>
|
||||||
|
<signal name="clicked" handler="on_but_cancel_clicked" swapped="no"/>
|
||||||
|
</object>
|
||||||
|
<packing>
|
||||||
|
<property name="expand">True</property>
|
||||||
|
<property name="fill">True</property>
|
||||||
|
<property name="position">2</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
</object>
|
||||||
|
<packing>
|
||||||
|
<property name="expand">False</property>
|
||||||
|
<property name="fill">True</property>
|
||||||
|
<property name="position">2</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
</object>
|
||||||
|
<packing>
|
||||||
|
<property name="name">page2</property>
|
||||||
|
<property name="title" translatable="yes">page2</property>
|
||||||
|
<property name="position">2</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
</object>
|
||||||
|
</interface>
|
||||||
@@ -0,0 +1,766 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<!-- Generated with glade 3.40.0 -->
|
||||||
|
<interface>
|
||||||
|
<requires lib="gtk+" version="3.24"/>
|
||||||
|
<object class="GtkAdjustment" id="adj_const_final">
|
||||||
|
<property name="upper">99999</property>
|
||||||
|
<property name="step-increment">1</property>
|
||||||
|
<property name="page-increment">10</property>
|
||||||
|
</object>
|
||||||
|
<object class="GtkAdjustment" id="adj_costs_plan">
|
||||||
|
<property name="upper">99999</property>
|
||||||
|
<property name="step-increment">1</property>
|
||||||
|
<property name="page-increment">10</property>
|
||||||
|
</object>
|
||||||
|
<object class="GtkAdjustment" id="adj_duration">
|
||||||
|
<property name="upper">1000</property>
|
||||||
|
<property name="step-increment">1</property>
|
||||||
|
<property name="page-increment">10</property>
|
||||||
|
</object>
|
||||||
|
<object class="GtkStack" id="topobject">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can-focus">False</property>
|
||||||
|
<property name="margin-start">8</property>
|
||||||
|
<child>
|
||||||
|
<object class="GtkBox" id="box_projects">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can-focus">False</property>
|
||||||
|
<property name="orientation">vertical</property>
|
||||||
|
<child>
|
||||||
|
<object class="GtkExpander">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can-focus">True</property>
|
||||||
|
<child>
|
||||||
|
<!-- n-columns=3 n-rows=3 -->
|
||||||
|
<object class="GtkGrid">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can-focus">False</property>
|
||||||
|
<child>
|
||||||
|
<object class="GtkButtonBox">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can-focus">False</property>
|
||||||
|
<property name="orientation">vertical</property>
|
||||||
|
<property name="layout-style">start</property>
|
||||||
|
<child>
|
||||||
|
<object class="GtkButton">
|
||||||
|
<property name="label" translatable="yes">Clear</property>
|
||||||
|
<property name="name">but_flt_clear</property>
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can-focus">True</property>
|
||||||
|
<property name="receives-default">True</property>
|
||||||
|
</object>
|
||||||
|
<packing>
|
||||||
|
<property name="expand">True</property>
|
||||||
|
<property name="fill">True</property>
|
||||||
|
<property name="position">0</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
<child>
|
||||||
|
<object class="GtkButton">
|
||||||
|
<property name="label" translatable="yes">Apply</property>
|
||||||
|
<property name="name">but_flt_apply</property>
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can-focus">True</property>
|
||||||
|
<property name="receives-default">True</property>
|
||||||
|
</object>
|
||||||
|
<packing>
|
||||||
|
<property name="expand">True</property>
|
||||||
|
<property name="fill">True</property>
|
||||||
|
<property name="position">1</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
</object>
|
||||||
|
<packing>
|
||||||
|
<property name="left-attach">2</property>
|
||||||
|
<property name="top-attach">0</property>
|
||||||
|
<property name="height">3</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
<child>
|
||||||
|
<object class="GtkLabel">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can-focus">False</property>
|
||||||
|
<property name="label" translatable="yes">Name</property>
|
||||||
|
</object>
|
||||||
|
<packing>
|
||||||
|
<property name="left-attach">0</property>
|
||||||
|
<property name="top-attach">0</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
<child>
|
||||||
|
<object class="GtkLabel">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can-focus">False</property>
|
||||||
|
<property name="label" translatable="yes">Status</property>
|
||||||
|
</object>
|
||||||
|
<packing>
|
||||||
|
<property name="left-attach">0</property>
|
||||||
|
<property name="top-attach">1</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
<child>
|
||||||
|
<object class="GtkLabel">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can-focus">False</property>
|
||||||
|
<property name="label" translatable="yes">Remarks</property>
|
||||||
|
</object>
|
||||||
|
<packing>
|
||||||
|
<property name="left-attach">0</property>
|
||||||
|
<property name="top-attach">2</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
<child>
|
||||||
|
<object class="GtkEntry">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can-focus">True</property>
|
||||||
|
<property name="hexpand">True</property>
|
||||||
|
</object>
|
||||||
|
<packing>
|
||||||
|
<property name="left-attach">1</property>
|
||||||
|
<property name="top-attach">0</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
<child>
|
||||||
|
<object class="GtkEntry">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can-focus">True</property>
|
||||||
|
</object>
|
||||||
|
<packing>
|
||||||
|
<property name="left-attach">1</property>
|
||||||
|
<property name="top-attach">2</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
<child>
|
||||||
|
<object class="GtkComboBox">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can-focus">False</property>
|
||||||
|
</object>
|
||||||
|
<packing>
|
||||||
|
<property name="left-attach">1</property>
|
||||||
|
<property name="top-attach">1</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
</object>
|
||||||
|
</child>
|
||||||
|
<child type="label">
|
||||||
|
<object class="GtkLabel">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can-focus">False</property>
|
||||||
|
<property name="label" translatable="yes">Filter Projects</property>
|
||||||
|
</object>
|
||||||
|
</child>
|
||||||
|
</object>
|
||||||
|
<packing>
|
||||||
|
<property name="expand">False</property>
|
||||||
|
<property name="fill">True</property>
|
||||||
|
<property name="position">0</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
<child>
|
||||||
|
<object class="GtkScrolledWindow">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can-focus">True</property>
|
||||||
|
<property name="shadow-type">in</property>
|
||||||
|
<child>
|
||||||
|
<object class="GtkTreeView" id="tvw_projects">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can-focus">True</property>
|
||||||
|
<child internal-child="selection">
|
||||||
|
<object class="GtkTreeSelection"/>
|
||||||
|
</child>
|
||||||
|
</object>
|
||||||
|
</child>
|
||||||
|
</object>
|
||||||
|
<packing>
|
||||||
|
<property name="expand">True</property>
|
||||||
|
<property name="fill">True</property>
|
||||||
|
<property name="position">1</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
<child>
|
||||||
|
<object class="GtkButtonBox">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can-focus">False</property>
|
||||||
|
<property name="layout-style">end</property>
|
||||||
|
<child>
|
||||||
|
<object class="GtkButton">
|
||||||
|
<property name="label" translatable="yes">New</property>
|
||||||
|
<property name="name">but_new</property>
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can-focus">True</property>
|
||||||
|
<property name="receives-default">True</property>
|
||||||
|
</object>
|
||||||
|
<packing>
|
||||||
|
<property name="expand">True</property>
|
||||||
|
<property name="fill">True</property>
|
||||||
|
<property name="position">0</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
<child>
|
||||||
|
<object class="GtkButton">
|
||||||
|
<property name="label" translatable="yes">Edit</property>
|
||||||
|
<property name="name">but_edit</property>
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can-focus">True</property>
|
||||||
|
<property name="receives-default">True</property>
|
||||||
|
</object>
|
||||||
|
<packing>
|
||||||
|
<property name="expand">True</property>
|
||||||
|
<property name="fill">True</property>
|
||||||
|
<property name="position">1</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
<child>
|
||||||
|
<object class="GtkButton">
|
||||||
|
<property name="label" translatable="yes">Delete</property>
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can-focus">True</property>
|
||||||
|
<property name="receives-default">True</property>
|
||||||
|
</object>
|
||||||
|
<packing>
|
||||||
|
<property name="expand">True</property>
|
||||||
|
<property name="fill">True</property>
|
||||||
|
<property name="position">2</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
</object>
|
||||||
|
<packing>
|
||||||
|
<property name="expand">False</property>
|
||||||
|
<property name="fill">True</property>
|
||||||
|
<property name="position">2</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
</object>
|
||||||
|
<packing>
|
||||||
|
<property name="name">page0</property>
|
||||||
|
<property name="title" translatable="yes">page0</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
<child>
|
||||||
|
<object class="GtkBox" id="box_proj_detail">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can-focus">False</property>
|
||||||
|
<property name="orientation">vertical</property>
|
||||||
|
<child>
|
||||||
|
<object class="GtkLabel" id="lbl_title_detail">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can-focus">False</property>
|
||||||
|
<property name="label" translatable="yes">Project Details</property>
|
||||||
|
<attributes>
|
||||||
|
<attribute name="weight" value="bold"/>
|
||||||
|
</attributes>
|
||||||
|
</object>
|
||||||
|
<packing>
|
||||||
|
<property name="expand">False</property>
|
||||||
|
<property name="fill">True</property>
|
||||||
|
<property name="position">0</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
<child>
|
||||||
|
<!-- n-columns=2 n-rows=8 -->
|
||||||
|
<object class="GtkGrid" id="grd_details">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can-focus">False</property>
|
||||||
|
<child>
|
||||||
|
<object class="GtkLabel">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can-focus">False</property>
|
||||||
|
<property name="label" translatable="yes">Name</property>
|
||||||
|
</object>
|
||||||
|
<packing>
|
||||||
|
<property name="left-attach">0</property>
|
||||||
|
<property name="top-attach">0</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
<child>
|
||||||
|
<object class="GtkLabel">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can-focus">False</property>
|
||||||
|
<property name="label" translatable="yes">Responsible</property>
|
||||||
|
</object>
|
||||||
|
<packing>
|
||||||
|
<property name="left-attach">0</property>
|
||||||
|
<property name="top-attach">1</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
<child>
|
||||||
|
<object class="GtkLabel">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can-focus">False</property>
|
||||||
|
<property name="label" translatable="yes">Date start</property>
|
||||||
|
</object>
|
||||||
|
<packing>
|
||||||
|
<property name="left-attach">0</property>
|
||||||
|
<property name="top-attach">2</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
<child>
|
||||||
|
<object class="GtkLabel">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can-focus">False</property>
|
||||||
|
<property name="label" translatable="yes">Duration, days</property>
|
||||||
|
</object>
|
||||||
|
<packing>
|
||||||
|
<property name="left-attach">0</property>
|
||||||
|
<property name="top-attach">3</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
<child>
|
||||||
|
<object class="GtkLabel">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can-focus">False</property>
|
||||||
|
<property name="label" translatable="yes">Costs plan</property>
|
||||||
|
</object>
|
||||||
|
<packing>
|
||||||
|
<property name="left-attach">0</property>
|
||||||
|
<property name="top-attach">4</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
<child>
|
||||||
|
<object class="GtkLabel">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can-focus">False</property>
|
||||||
|
<property name="label" translatable="yes">Costs final</property>
|
||||||
|
</object>
|
||||||
|
<packing>
|
||||||
|
<property name="left-attach">0</property>
|
||||||
|
<property name="top-attach">5</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
<child>
|
||||||
|
<object class="GtkLabel">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can-focus">False</property>
|
||||||
|
<property name="label" translatable="yes">Status</property>
|
||||||
|
</object>
|
||||||
|
<packing>
|
||||||
|
<property name="left-attach">0</property>
|
||||||
|
<property name="top-attach">6</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
<child>
|
||||||
|
<object class="GtkLabel">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can-focus">False</property>
|
||||||
|
<property name="label" translatable="yes">Remarks</property>
|
||||||
|
</object>
|
||||||
|
<packing>
|
||||||
|
<property name="left-attach">0</property>
|
||||||
|
<property name="top-attach">7</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
<child>
|
||||||
|
<object class="GtkLabel" id="lbl_name">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can-focus">False</property>
|
||||||
|
<property name="hexpand">True</property>
|
||||||
|
</object>
|
||||||
|
<packing>
|
||||||
|
<property name="left-attach">1</property>
|
||||||
|
<property name="top-attach">0</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
<child>
|
||||||
|
<object class="GtkLabel" id="lbl_responsible">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can-focus">False</property>
|
||||||
|
<property name="hexpand">True</property>
|
||||||
|
</object>
|
||||||
|
<packing>
|
||||||
|
<property name="left-attach">1</property>
|
||||||
|
<property name="top-attach">1</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
<child>
|
||||||
|
<object class="GtkLabel" id="lbl_date_start">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can-focus">False</property>
|
||||||
|
<property name="hexpand">True</property>
|
||||||
|
</object>
|
||||||
|
<packing>
|
||||||
|
<property name="left-attach">1</property>
|
||||||
|
<property name="top-attach">2</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
<child>
|
||||||
|
<object class="GtkLabel" id="lbl_duration">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can-focus">False</property>
|
||||||
|
<property name="hexpand">True</property>
|
||||||
|
</object>
|
||||||
|
<packing>
|
||||||
|
<property name="left-attach">1</property>
|
||||||
|
<property name="top-attach">3</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
<child>
|
||||||
|
<object class="GtkLabel" id="lbl_costs_plan">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can-focus">False</property>
|
||||||
|
<property name="hexpand">True</property>
|
||||||
|
</object>
|
||||||
|
<packing>
|
||||||
|
<property name="left-attach">1</property>
|
||||||
|
<property name="top-attach">4</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
<child>
|
||||||
|
<object class="GtkLabel" id="lbl_costs_final">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can-focus">False</property>
|
||||||
|
<property name="hexpand">True</property>
|
||||||
|
</object>
|
||||||
|
<packing>
|
||||||
|
<property name="left-attach">1</property>
|
||||||
|
<property name="top-attach">5</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
<child>
|
||||||
|
<object class="GtkLabel" id="lbl_status">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can-focus">False</property>
|
||||||
|
<property name="hexpand">True</property>
|
||||||
|
</object>
|
||||||
|
<packing>
|
||||||
|
<property name="left-attach">1</property>
|
||||||
|
<property name="top-attach">6</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
<child>
|
||||||
|
<object class="GtkLabel" id="lbl_remarks">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can-focus">False</property>
|
||||||
|
<property name="hexpand">True</property>
|
||||||
|
</object>
|
||||||
|
<packing>
|
||||||
|
<property name="left-attach">1</property>
|
||||||
|
<property name="top-attach">7</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
</object>
|
||||||
|
<packing>
|
||||||
|
<property name="expand">False</property>
|
||||||
|
<property name="fill">True</property>
|
||||||
|
<property name="position">1</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
<child>
|
||||||
|
<object class="GtkButtonBox">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can-focus">False</property>
|
||||||
|
<property name="layout-style">end</property>
|
||||||
|
<child>
|
||||||
|
<object class="GtkButton" id="but_delete">
|
||||||
|
<property name="label" translatable="yes">Delete</property>
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can-focus">True</property>
|
||||||
|
<property name="receives-default">True</property>
|
||||||
|
</object>
|
||||||
|
<packing>
|
||||||
|
<property name="expand">True</property>
|
||||||
|
<property name="fill">True</property>
|
||||||
|
<property name="position">0</property>
|
||||||
|
<property name="secondary">True</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
<child>
|
||||||
|
<object class="GtkButton" id="but_edit">
|
||||||
|
<property name="label" translatable="yes">Edit</property>
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can-focus">True</property>
|
||||||
|
<property name="receives-default">True</property>
|
||||||
|
</object>
|
||||||
|
<packing>
|
||||||
|
<property name="expand">True</property>
|
||||||
|
<property name="fill">True</property>
|
||||||
|
<property name="position">1</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
<child>
|
||||||
|
<object class="GtkButton" id="but_close">
|
||||||
|
<property name="label" translatable="yes">Close</property>
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can-focus">True</property>
|
||||||
|
<property name="receives-default">True</property>
|
||||||
|
</object>
|
||||||
|
<packing>
|
||||||
|
<property name="expand">True</property>
|
||||||
|
<property name="fill">True</property>
|
||||||
|
<property name="position">2</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
</object>
|
||||||
|
<packing>
|
||||||
|
<property name="expand">False</property>
|
||||||
|
<property name="fill">True</property>
|
||||||
|
<property name="position">2</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
</object>
|
||||||
|
<packing>
|
||||||
|
<property name="name">page1</property>
|
||||||
|
<property name="title" translatable="yes">page1</property>
|
||||||
|
<property name="position">1</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
<child>
|
||||||
|
<object class="GtkBox" id="box_proj_edit">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can-focus">False</property>
|
||||||
|
<property name="orientation">vertical</property>
|
||||||
|
<child>
|
||||||
|
<object class="GtkLabel" id="lbl_title_edit">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can-focus">False</property>
|
||||||
|
<property name="label" translatable="yes">label</property>
|
||||||
|
</object>
|
||||||
|
<packing>
|
||||||
|
<property name="expand">False</property>
|
||||||
|
<property name="fill">True</property>
|
||||||
|
<property name="position">0</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
<child>
|
||||||
|
<!-- n-columns=2 n-rows=8 -->
|
||||||
|
<object class="GtkGrid" id="grd_editor">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can-focus">False</property>
|
||||||
|
<child>
|
||||||
|
<object class="GtkLabel">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can-focus">False</property>
|
||||||
|
<property name="label" translatable="yes">Name</property>
|
||||||
|
</object>
|
||||||
|
<packing>
|
||||||
|
<property name="left-attach">0</property>
|
||||||
|
<property name="top-attach">0</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
<child>
|
||||||
|
<object class="GtkLabel">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can-focus">False</property>
|
||||||
|
<property name="label" translatable="yes">Responsible</property>
|
||||||
|
</object>
|
||||||
|
<packing>
|
||||||
|
<property name="left-attach">0</property>
|
||||||
|
<property name="top-attach">1</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
<child>
|
||||||
|
<object class="GtkLabel">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can-focus">False</property>
|
||||||
|
<property name="label" translatable="yes">Date start</property>
|
||||||
|
</object>
|
||||||
|
<packing>
|
||||||
|
<property name="left-attach">0</property>
|
||||||
|
<property name="top-attach">2</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
<child>
|
||||||
|
<object class="GtkLabel">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can-focus">False</property>
|
||||||
|
<property name="label" translatable="yes">Duration days</property>
|
||||||
|
</object>
|
||||||
|
<packing>
|
||||||
|
<property name="left-attach">0</property>
|
||||||
|
<property name="top-attach">3</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
<child>
|
||||||
|
<object class="GtkLabel">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can-focus">False</property>
|
||||||
|
<property name="label" translatable="yes">Costs plan</property>
|
||||||
|
</object>
|
||||||
|
<packing>
|
||||||
|
<property name="left-attach">0</property>
|
||||||
|
<property name="top-attach">4</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
<child>
|
||||||
|
<object class="GtkLabel">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can-focus">False</property>
|
||||||
|
<property name="label" translatable="yes">Costs final</property>
|
||||||
|
</object>
|
||||||
|
<packing>
|
||||||
|
<property name="left-attach">0</property>
|
||||||
|
<property name="top-attach">5</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
<child>
|
||||||
|
<object class="GtkLabel">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can-focus">False</property>
|
||||||
|
<property name="label" translatable="yes">Status</property>
|
||||||
|
</object>
|
||||||
|
<packing>
|
||||||
|
<property name="left-attach">0</property>
|
||||||
|
<property name="top-attach">6</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
<child>
|
||||||
|
<object class="GtkLabel">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can-focus">False</property>
|
||||||
|
<property name="label" translatable="yes">Remarks</property>
|
||||||
|
<property name="yalign">0</property>
|
||||||
|
</object>
|
||||||
|
<packing>
|
||||||
|
<property name="left-attach">0</property>
|
||||||
|
<property name="top-attach">7</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
<child>
|
||||||
|
<object class="GtkEntry" id="ent_name">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can-focus">True</property>
|
||||||
|
<property name="hexpand">True</property>
|
||||||
|
</object>
|
||||||
|
<packing>
|
||||||
|
<property name="left-attach">1</property>
|
||||||
|
<property name="top-attach">0</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
<child>
|
||||||
|
<object class="GtkComboBox" id="cmb_responsible">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can-focus">False</property>
|
||||||
|
</object>
|
||||||
|
<packing>
|
||||||
|
<property name="left-attach">1</property>
|
||||||
|
<property name="top-attach">1</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
<child>
|
||||||
|
<object class="GtkEntry" id="ent_date_start">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can-focus">True</property>
|
||||||
|
<property name="hexpand">True</property>
|
||||||
|
</object>
|
||||||
|
<packing>
|
||||||
|
<property name="left-attach">1</property>
|
||||||
|
<property name="top-attach">2</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
<child>
|
||||||
|
<object class="GtkSpinButton" id="spi_duration">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can-focus">True</property>
|
||||||
|
<property name="adjustment">adj_duration</property>
|
||||||
|
</object>
|
||||||
|
<packing>
|
||||||
|
<property name="left-attach">1</property>
|
||||||
|
<property name="top-attach">3</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
<child>
|
||||||
|
<object class="GtkSpinButton" id="spi_costs_plan">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can-focus">True</property>
|
||||||
|
<property name="adjustment">adj_costs_plan</property>
|
||||||
|
</object>
|
||||||
|
<packing>
|
||||||
|
<property name="left-attach">1</property>
|
||||||
|
<property name="top-attach">4</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
<child>
|
||||||
|
<object class="GtkSpinButton" id="spi_costs_final">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can-focus">True</property>
|
||||||
|
<property name="adjustment">adj_const_final</property>
|
||||||
|
</object>
|
||||||
|
<packing>
|
||||||
|
<property name="left-attach">1</property>
|
||||||
|
<property name="top-attach">5</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
<child>
|
||||||
|
<object class="GtkComboBox" id="cmb_status">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can-focus">False</property>
|
||||||
|
</object>
|
||||||
|
<packing>
|
||||||
|
<property name="left-attach">1</property>
|
||||||
|
<property name="top-attach">6</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
<child>
|
||||||
|
<object class="GtkScrolledWindow">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can-focus">True</property>
|
||||||
|
<property name="hexpand">True</property>
|
||||||
|
<property name="vexpand">True</property>
|
||||||
|
<property name="shadow-type">in</property>
|
||||||
|
<child>
|
||||||
|
<object class="GtkTextView" id="txt_remarks">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can-focus">True</property>
|
||||||
|
</object>
|
||||||
|
</child>
|
||||||
|
</object>
|
||||||
|
<packing>
|
||||||
|
<property name="left-attach">1</property>
|
||||||
|
<property name="top-attach">7</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
</object>
|
||||||
|
<packing>
|
||||||
|
<property name="expand">False</property>
|
||||||
|
<property name="fill">True</property>
|
||||||
|
<property name="position">1</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
<child>
|
||||||
|
<object class="GtkButtonBox">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can-focus">False</property>
|
||||||
|
<property name="layout-style">end</property>
|
||||||
|
<child>
|
||||||
|
<object class="GtkButton" id="but_save">
|
||||||
|
<property name="label" translatable="yes">Save</property>
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can-focus">True</property>
|
||||||
|
<property name="receives-default">True</property>
|
||||||
|
<signal name="clicked" handler="on_but_save_clicked" swapped="no"/>
|
||||||
|
</object>
|
||||||
|
<packing>
|
||||||
|
<property name="expand">True</property>
|
||||||
|
<property name="fill">True</property>
|
||||||
|
<property name="position">1</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
<child>
|
||||||
|
<object class="GtkButton" id="but_cancel">
|
||||||
|
<property name="label" translatable="yes">Cancel</property>
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can-focus">True</property>
|
||||||
|
<property name="receives-default">True</property>
|
||||||
|
<signal name="clicked" handler="on_but_cancel_clicked" swapped="no"/>
|
||||||
|
</object>
|
||||||
|
<packing>
|
||||||
|
<property name="expand">True</property>
|
||||||
|
<property name="fill">True</property>
|
||||||
|
<property name="position">2</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
</object>
|
||||||
|
<packing>
|
||||||
|
<property name="expand">False</property>
|
||||||
|
<property name="fill">True</property>
|
||||||
|
<property name="position">2</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
</object>
|
||||||
|
<packing>
|
||||||
|
<property name="name">page2</property>
|
||||||
|
<property name="title" translatable="yes">page2</property>
|
||||||
|
<property name="position">2</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
</object>
|
||||||
|
</interface>
|
||||||
@@ -0,0 +1,793 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<!-- Generated with glade 3.40.0 -->
|
||||||
|
<interface>
|
||||||
|
<requires lib="gtk+" version="3.24"/>
|
||||||
|
<object class="GtkStack" id="topobject">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can-focus">False</property>
|
||||||
|
<property name="margin-start">8</property>
|
||||||
|
<child>
|
||||||
|
<object class="GtkBox" id="box_provisions">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can-focus">False</property>
|
||||||
|
<property name="orientation">vertical</property>
|
||||||
|
<child>
|
||||||
|
<object class="GtkExpander">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can-focus">True</property>
|
||||||
|
<child>
|
||||||
|
<!-- n-columns=4 n-rows=2 -->
|
||||||
|
<object class="GtkGrid" id="grd_provisions">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can-focus">False</property>
|
||||||
|
<property name="row-spacing">2</property>
|
||||||
|
<property name="column-spacing">2</property>
|
||||||
|
<child>
|
||||||
|
<object class="GtkLabel">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can-focus">False</property>
|
||||||
|
<property name="label" translatable="yes">Kategorie</property>
|
||||||
|
</object>
|
||||||
|
<packing>
|
||||||
|
<property name="left-attach">0</property>
|
||||||
|
<property name="top-attach">0</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
<child>
|
||||||
|
<object class="GtkComboBox">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can-focus">False</property>
|
||||||
|
<property name="hexpand">True</property>
|
||||||
|
</object>
|
||||||
|
<packing>
|
||||||
|
<property name="left-attach">1</property>
|
||||||
|
<property name="top-attach">0</property>
|
||||||
|
<property name="width">2</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
<child>
|
||||||
|
<object class="GtkLabel">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can-focus">False</property>
|
||||||
|
<property name="label" translatable="yes">Text</property>
|
||||||
|
</object>
|
||||||
|
<packing>
|
||||||
|
<property name="left-attach">0</property>
|
||||||
|
<property name="top-attach">1</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
<child>
|
||||||
|
<object class="GtkEntry">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can-focus">True</property>
|
||||||
|
<property name="hexpand">True</property>
|
||||||
|
</object>
|
||||||
|
<packing>
|
||||||
|
<property name="left-attach">1</property>
|
||||||
|
<property name="top-attach">1</property>
|
||||||
|
<property name="width">2</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
<child>
|
||||||
|
<object class="GtkButtonBox">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can-focus">False</property>
|
||||||
|
<property name="orientation">vertical</property>
|
||||||
|
<property name="spacing">2</property>
|
||||||
|
<property name="layout-style">start</property>
|
||||||
|
<child>
|
||||||
|
<object class="GtkButton" id="but_prov_clear">
|
||||||
|
<property name="label" translatable="yes">Clear</property>
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can-focus">True</property>
|
||||||
|
<property name="receives-default">True</property>
|
||||||
|
</object>
|
||||||
|
<packing>
|
||||||
|
<property name="expand">True</property>
|
||||||
|
<property name="fill">True</property>
|
||||||
|
<property name="position">0</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
<child>
|
||||||
|
<object class="GtkButton" id="but_prov_filter">
|
||||||
|
<property name="label" translatable="yes">Apply</property>
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can-focus">True</property>
|
||||||
|
<property name="receives-default">True</property>
|
||||||
|
</object>
|
||||||
|
<packing>
|
||||||
|
<property name="expand">True</property>
|
||||||
|
<property name="fill">True</property>
|
||||||
|
<property name="position">1</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
</object>
|
||||||
|
<packing>
|
||||||
|
<property name="left-attach">3</property>
|
||||||
|
<property name="top-attach">0</property>
|
||||||
|
<property name="height">2</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
</object>
|
||||||
|
</child>
|
||||||
|
<child type="label">
|
||||||
|
<object class="GtkLabel">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can-focus">False</property>
|
||||||
|
<property name="label" translatable="yes">Filter Providions (here selection description)</property>
|
||||||
|
</object>
|
||||||
|
</child>
|
||||||
|
</object>
|
||||||
|
<packing>
|
||||||
|
<property name="expand">False</property>
|
||||||
|
<property name="fill">True</property>
|
||||||
|
<property name="position">0</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
<child>
|
||||||
|
<object class="GtkScrolledWindow">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can-focus">True</property>
|
||||||
|
<property name="shadow-type">in</property>
|
||||||
|
<child>
|
||||||
|
<object class="GtkTreeView" id="tvw_provisions">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can-focus">True</property>
|
||||||
|
<child internal-child="selection">
|
||||||
|
<object class="GtkTreeSelection"/>
|
||||||
|
</child>
|
||||||
|
</object>
|
||||||
|
</child>
|
||||||
|
</object>
|
||||||
|
<packing>
|
||||||
|
<property name="expand">True</property>
|
||||||
|
<property name="fill">True</property>
|
||||||
|
<property name="position">1</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
<child>
|
||||||
|
<object class="GtkButtonBox">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can-focus">False</property>
|
||||||
|
<property name="layout-style">end</property>
|
||||||
|
<child>
|
||||||
|
<object class="GtkButton" id="but_new">
|
||||||
|
<property name="label" translatable="yes">New</property>
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can-focus">True</property>
|
||||||
|
<property name="receives-default">True</property>
|
||||||
|
<signal name="clicked" handler="on_but_new_clicked" swapped="no"/>
|
||||||
|
</object>
|
||||||
|
<packing>
|
||||||
|
<property name="expand">True</property>
|
||||||
|
<property name="fill">True</property>
|
||||||
|
<property name="position">0</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
<child>
|
||||||
|
<object class="GtkButton" id="but_edit">
|
||||||
|
<property name="label" translatable="yes">Edit</property>
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can-focus">True</property>
|
||||||
|
<property name="receives-default">True</property>
|
||||||
|
<signal name="clicked" handler="on_but_edit_clicked" swapped="no"/>
|
||||||
|
</object>
|
||||||
|
<packing>
|
||||||
|
<property name="expand">True</property>
|
||||||
|
<property name="fill">True</property>
|
||||||
|
<property name="position">1</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
<child>
|
||||||
|
<object class="GtkButton" id="but_detail">
|
||||||
|
<property name="label" translatable="yes">Details</property>
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can-focus">True</property>
|
||||||
|
<property name="receives-default">True</property>
|
||||||
|
<signal name="clicked" handler="on_but_detail_clicked" swapped="no"/>
|
||||||
|
</object>
|
||||||
|
<packing>
|
||||||
|
<property name="expand">True</property>
|
||||||
|
<property name="fill">True</property>
|
||||||
|
<property name="position">2</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
</object>
|
||||||
|
<packing>
|
||||||
|
<property name="expand">False</property>
|
||||||
|
<property name="fill">True</property>
|
||||||
|
<property name="position">2</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
</object>
|
||||||
|
<packing>
|
||||||
|
<property name="name">page0</property>
|
||||||
|
<property name="title" translatable="yes">page0</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
<child>
|
||||||
|
<object class="GtkBox" id="box_prov_edit">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can-focus">False</property>
|
||||||
|
<property name="orientation">vertical</property>
|
||||||
|
<child>
|
||||||
|
<object class="GtkLabel">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can-focus">False</property>
|
||||||
|
<property name="label" translatable="yes">Edit provision</property>
|
||||||
|
</object>
|
||||||
|
<packing>
|
||||||
|
<property name="expand">False</property>
|
||||||
|
<property name="fill">True</property>
|
||||||
|
<property name="position">0</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
<child>
|
||||||
|
<!-- n-columns=2 n-rows=10 -->
|
||||||
|
<object class="GtkGrid" id="grd_editor">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can-focus">False</property>
|
||||||
|
<child>
|
||||||
|
<object class="GtkLabel">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can-focus">False</property>
|
||||||
|
<property name="label" translatable="yes">Name</property>
|
||||||
|
</object>
|
||||||
|
<packing>
|
||||||
|
<property name="left-attach">0</property>
|
||||||
|
<property name="top-attach">0</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
<child>
|
||||||
|
<object class="GtkLabel">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can-focus">False</property>
|
||||||
|
<property name="label" translatable="yes">Category</property>
|
||||||
|
</object>
|
||||||
|
<packing>
|
||||||
|
<property name="left-attach">0</property>
|
||||||
|
<property name="top-attach">1</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
<child>
|
||||||
|
<object class="GtkLabel">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can-focus">False</property>
|
||||||
|
<property name="label" translatable="yes">Storage</property>
|
||||||
|
</object>
|
||||||
|
<packing>
|
||||||
|
<property name="left-attach">0</property>
|
||||||
|
<property name="top-attach">2</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
<child>
|
||||||
|
<object class="GtkLabel">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can-focus">False</property>
|
||||||
|
<property name="label" translatable="yes">Box</property>
|
||||||
|
</object>
|
||||||
|
<packing>
|
||||||
|
<property name="left-attach">0</property>
|
||||||
|
<property name="top-attach">3</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
<child>
|
||||||
|
<object class="GtkLabel">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can-focus">False</property>
|
||||||
|
<property name="label" translatable="yes">Number</property>
|
||||||
|
</object>
|
||||||
|
<packing>
|
||||||
|
<property name="left-attach">0</property>
|
||||||
|
<property name="top-attach">4</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
<child>
|
||||||
|
<object class="GtkLabel">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can-focus">False</property>
|
||||||
|
<property name="label" translatable="yes">Weight</property>
|
||||||
|
</object>
|
||||||
|
<packing>
|
||||||
|
<property name="left-attach">0</property>
|
||||||
|
<property name="top-attach">5</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
<child>
|
||||||
|
<object class="GtkLabel">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can-focus">False</property>
|
||||||
|
<property name="label" translatable="yes">Weight net</property>
|
||||||
|
</object>
|
||||||
|
<packing>
|
||||||
|
<property name="left-attach">0</property>
|
||||||
|
<property name="top-attach">6</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
<child>
|
||||||
|
<object class="GtkLabel">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can-focus">False</property>
|
||||||
|
<property name="label" translatable="yes">Unit</property>
|
||||||
|
</object>
|
||||||
|
<packing>
|
||||||
|
<property name="left-attach">0</property>
|
||||||
|
<property name="top-attach">7</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
<child>
|
||||||
|
<object class="GtkLabel">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can-focus">False</property>
|
||||||
|
<property name="label" translatable="yes">Storedate</property>
|
||||||
|
</object>
|
||||||
|
<packing>
|
||||||
|
<property name="left-attach">0</property>
|
||||||
|
<property name="top-attach">8</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
<child>
|
||||||
|
<object class="GtkLabel">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can-focus">False</property>
|
||||||
|
<property name="label" translatable="yes">Shelflife</property>
|
||||||
|
</object>
|
||||||
|
<packing>
|
||||||
|
<property name="left-attach">0</property>
|
||||||
|
<property name="top-attach">9</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
<child>
|
||||||
|
<object class="GtkEntry" id="ent_name">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can-focus">True</property>
|
||||||
|
</object>
|
||||||
|
<packing>
|
||||||
|
<property name="left-attach">1</property>
|
||||||
|
<property name="top-attach">0</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
<child>
|
||||||
|
<object class="GtkComboBox" id="cmb_category">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can-focus">False</property>
|
||||||
|
</object>
|
||||||
|
<packing>
|
||||||
|
<property name="left-attach">1</property>
|
||||||
|
<property name="top-attach">1</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
<child>
|
||||||
|
<object class="GtkComboBox" id="cmb_storage">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can-focus">False</property>
|
||||||
|
</object>
|
||||||
|
<packing>
|
||||||
|
<property name="left-attach">1</property>
|
||||||
|
<property name="top-attach">2</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
<child>
|
||||||
|
<object class="GtkComboBox" id="cmb_box">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can-focus">False</property>
|
||||||
|
</object>
|
||||||
|
<packing>
|
||||||
|
<property name="left-attach">1</property>
|
||||||
|
<property name="top-attach">3</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
<child>
|
||||||
|
<object class="GtkComboBox" id="cmb_unit">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can-focus">False</property>
|
||||||
|
</object>
|
||||||
|
<packing>
|
||||||
|
<property name="left-attach">1</property>
|
||||||
|
<property name="top-attach">7</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
<child>
|
||||||
|
<object class="GtkSpinButton" id="spi_number">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can-focus">True</property>
|
||||||
|
</object>
|
||||||
|
<packing>
|
||||||
|
<property name="left-attach">1</property>
|
||||||
|
<property name="top-attach">4</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
<child>
|
||||||
|
<object class="GtkSpinButton" id="spi_weight">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can-focus">True</property>
|
||||||
|
</object>
|
||||||
|
<packing>
|
||||||
|
<property name="left-attach">1</property>
|
||||||
|
<property name="top-attach">5</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
<child>
|
||||||
|
<object class="GtkSpinButton" id="spi_weight_net">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can-focus">True</property>
|
||||||
|
</object>
|
||||||
|
<packing>
|
||||||
|
<property name="left-attach">1</property>
|
||||||
|
<property name="top-attach">6</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
<child>
|
||||||
|
<object class="GtkEntry" id="ent_storedate">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can-focus">True</property>
|
||||||
|
</object>
|
||||||
|
<packing>
|
||||||
|
<property name="left-attach">1</property>
|
||||||
|
<property name="top-attach">8</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
<child>
|
||||||
|
<object class="GtkEntry" id="ent_shelflife">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can-focus">True</property>
|
||||||
|
</object>
|
||||||
|
<packing>
|
||||||
|
<property name="left-attach">1</property>
|
||||||
|
<property name="top-attach">9</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
</object>
|
||||||
|
<packing>
|
||||||
|
<property name="expand">False</property>
|
||||||
|
<property name="fill">True</property>
|
||||||
|
<property name="position">1</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
<child>
|
||||||
|
<object class="GtkButtonBox">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can-focus">False</property>
|
||||||
|
<property name="layout-style">end</property>
|
||||||
|
<child>
|
||||||
|
<object class="GtkButton" id="but_save">
|
||||||
|
<property name="label" translatable="yes">Save</property>
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can-focus">True</property>
|
||||||
|
<property name="receives-default">True</property>
|
||||||
|
<signal name="clicked" handler="on_but_save_clicked" swapped="no"/>
|
||||||
|
</object>
|
||||||
|
<packing>
|
||||||
|
<property name="expand">True</property>
|
||||||
|
<property name="fill">True</property>
|
||||||
|
<property name="position">0</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
<child>
|
||||||
|
<object class="GtkButton" id="but_cancel">
|
||||||
|
<property name="label" translatable="yes">Cancel</property>
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can-focus">True</property>
|
||||||
|
<property name="receives-default">True</property>
|
||||||
|
<signal name="clicked" handler="on_but_cancel_clicked" swapped="no"/>
|
||||||
|
</object>
|
||||||
|
<packing>
|
||||||
|
<property name="expand">True</property>
|
||||||
|
<property name="fill">True</property>
|
||||||
|
<property name="position">1</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
</object>
|
||||||
|
<packing>
|
||||||
|
<property name="expand">False</property>
|
||||||
|
<property name="fill">True</property>
|
||||||
|
<property name="position">2</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
</object>
|
||||||
|
<packing>
|
||||||
|
<property name="name">page1</property>
|
||||||
|
<property name="title" translatable="yes">page1</property>
|
||||||
|
<property name="position">1</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
<child>
|
||||||
|
<object class="GtkBox" id="box_prov_detail">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can-focus">False</property>
|
||||||
|
<property name="orientation">vertical</property>
|
||||||
|
<child>
|
||||||
|
<object class="GtkLabel">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can-focus">False</property>
|
||||||
|
<property name="label" translatable="yes">View Provision</property>
|
||||||
|
</object>
|
||||||
|
<packing>
|
||||||
|
<property name="expand">False</property>
|
||||||
|
<property name="fill">True</property>
|
||||||
|
<property name="position">0</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
<child>
|
||||||
|
<!-- n-columns=2 n-rows=10 -->
|
||||||
|
<object class="GtkGrid" id="grd_details">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can-focus">False</property>
|
||||||
|
<child>
|
||||||
|
<object class="GtkLabel">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can-focus">False</property>
|
||||||
|
<property name="label" translatable="yes">Name</property>
|
||||||
|
</object>
|
||||||
|
<packing>
|
||||||
|
<property name="left-attach">0</property>
|
||||||
|
<property name="top-attach">0</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
<child>
|
||||||
|
<object class="GtkLabel">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can-focus">False</property>
|
||||||
|
<property name="label" translatable="yes">Category</property>
|
||||||
|
</object>
|
||||||
|
<packing>
|
||||||
|
<property name="left-attach">0</property>
|
||||||
|
<property name="top-attach">1</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
<child>
|
||||||
|
<object class="GtkLabel">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can-focus">False</property>
|
||||||
|
<property name="label" translatable="yes">Storage</property>
|
||||||
|
</object>
|
||||||
|
<packing>
|
||||||
|
<property name="left-attach">0</property>
|
||||||
|
<property name="top-attach">2</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
<child>
|
||||||
|
<object class="GtkLabel" id="lbl_name">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can-focus">False</property>
|
||||||
|
<property name="label" translatable="yes">Placeholder</property>
|
||||||
|
</object>
|
||||||
|
<packing>
|
||||||
|
<property name="left-attach">1</property>
|
||||||
|
<property name="top-attach">0</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
<child>
|
||||||
|
<object class="GtkLabel" id="lbl_category">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can-focus">False</property>
|
||||||
|
</object>
|
||||||
|
<packing>
|
||||||
|
<property name="left-attach">1</property>
|
||||||
|
<property name="top-attach">1</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
<child>
|
||||||
|
<object class="GtkLabel" id="lbl_storage">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can-focus">False</property>
|
||||||
|
</object>
|
||||||
|
<packing>
|
||||||
|
<property name="left-attach">1</property>
|
||||||
|
<property name="top-attach">2</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
<child>
|
||||||
|
<object class="GtkLabel">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can-focus">False</property>
|
||||||
|
<property name="label" translatable="yes">Box</property>
|
||||||
|
</object>
|
||||||
|
<packing>
|
||||||
|
<property name="left-attach">0</property>
|
||||||
|
<property name="top-attach">3</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
<child>
|
||||||
|
<object class="GtkLabel">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can-focus">False</property>
|
||||||
|
<property name="label" translatable="yes">Number</property>
|
||||||
|
</object>
|
||||||
|
<packing>
|
||||||
|
<property name="left-attach">0</property>
|
||||||
|
<property name="top-attach">4</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
<child>
|
||||||
|
<object class="GtkLabel">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can-focus">False</property>
|
||||||
|
<property name="label" translatable="yes">Weight</property>
|
||||||
|
</object>
|
||||||
|
<packing>
|
||||||
|
<property name="left-attach">0</property>
|
||||||
|
<property name="top-attach">5</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
<child>
|
||||||
|
<object class="GtkLabel">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can-focus">False</property>
|
||||||
|
<property name="label" translatable="yes">Weight net</property>
|
||||||
|
</object>
|
||||||
|
<packing>
|
||||||
|
<property name="left-attach">0</property>
|
||||||
|
<property name="top-attach">6</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
<child>
|
||||||
|
<object class="GtkLabel">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can-focus">False</property>
|
||||||
|
<property name="label" translatable="yes">Unit</property>
|
||||||
|
</object>
|
||||||
|
<packing>
|
||||||
|
<property name="left-attach">0</property>
|
||||||
|
<property name="top-attach">7</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
<child>
|
||||||
|
<object class="GtkLabel">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can-focus">False</property>
|
||||||
|
<property name="label" translatable="yes">Storedate</property>
|
||||||
|
</object>
|
||||||
|
<packing>
|
||||||
|
<property name="left-attach">0</property>
|
||||||
|
<property name="top-attach">8</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
<child>
|
||||||
|
<object class="GtkLabel">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can-focus">False</property>
|
||||||
|
<property name="label" translatable="yes">Shelflife</property>
|
||||||
|
</object>
|
||||||
|
<packing>
|
||||||
|
<property name="left-attach">0</property>
|
||||||
|
<property name="top-attach">9</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
<child>
|
||||||
|
<object class="GtkLabel" id="lbl_box">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can-focus">False</property>
|
||||||
|
</object>
|
||||||
|
<packing>
|
||||||
|
<property name="left-attach">1</property>
|
||||||
|
<property name="top-attach">3</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
<child>
|
||||||
|
<object class="GtkLabel" id="lbl_number">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can-focus">False</property>
|
||||||
|
</object>
|
||||||
|
<packing>
|
||||||
|
<property name="left-attach">1</property>
|
||||||
|
<property name="top-attach">4</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
<child>
|
||||||
|
<object class="GtkLabel" id="lbl_weight">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can-focus">False</property>
|
||||||
|
</object>
|
||||||
|
<packing>
|
||||||
|
<property name="left-attach">1</property>
|
||||||
|
<property name="top-attach">5</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
<child>
|
||||||
|
<object class="GtkLabel" id="lbl_weight_net">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can-focus">False</property>
|
||||||
|
</object>
|
||||||
|
<packing>
|
||||||
|
<property name="left-attach">1</property>
|
||||||
|
<property name="top-attach">6</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
<child>
|
||||||
|
<object class="GtkLabel" id="lbl_unit">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can-focus">False</property>
|
||||||
|
</object>
|
||||||
|
<packing>
|
||||||
|
<property name="left-attach">1</property>
|
||||||
|
<property name="top-attach">7</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
<child>
|
||||||
|
<object class="GtkLabel" id="lbl_storedate">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can-focus">False</property>
|
||||||
|
</object>
|
||||||
|
<packing>
|
||||||
|
<property name="left-attach">1</property>
|
||||||
|
<property name="top-attach">8</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
<child>
|
||||||
|
<object class="GtkLabel" id="lbl_shelflife">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can-focus">False</property>
|
||||||
|
</object>
|
||||||
|
<packing>
|
||||||
|
<property name="left-attach">1</property>
|
||||||
|
<property name="top-attach">9</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
</object>
|
||||||
|
<packing>
|
||||||
|
<property name="expand">True</property>
|
||||||
|
<property name="fill">True</property>
|
||||||
|
<property name="position">1</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
<child>
|
||||||
|
<object class="GtkButtonBox">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can-focus">False</property>
|
||||||
|
<property name="layout-style">end</property>
|
||||||
|
<child>
|
||||||
|
<object class="GtkButton" id="but_delete">
|
||||||
|
<property name="label" translatable="yes">Delete</property>
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can-focus">True</property>
|
||||||
|
<property name="receives-default">True</property>
|
||||||
|
</object>
|
||||||
|
<packing>
|
||||||
|
<property name="expand">True</property>
|
||||||
|
<property name="fill">True</property>
|
||||||
|
<property name="position">0</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
<child>
|
||||||
|
<object class="GtkButton" id="but_edit2">
|
||||||
|
<property name="label" translatable="yes">Edit</property>
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can-focus">True</property>
|
||||||
|
<property name="receives-default">True</property>
|
||||||
|
</object>
|
||||||
|
<packing>
|
||||||
|
<property name="expand">True</property>
|
||||||
|
<property name="fill">True</property>
|
||||||
|
<property name="position">1</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
<child>
|
||||||
|
<object class="GtkButton" id="but_close">
|
||||||
|
<property name="label" translatable="yes">Close</property>
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can-focus">True</property>
|
||||||
|
<property name="receives-default">True</property>
|
||||||
|
</object>
|
||||||
|
<packing>
|
||||||
|
<property name="expand">True</property>
|
||||||
|
<property name="fill">True</property>
|
||||||
|
<property name="position">2</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
</object>
|
||||||
|
<packing>
|
||||||
|
<property name="expand">False</property>
|
||||||
|
<property name="fill">True</property>
|
||||||
|
<property name="position">2</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
</object>
|
||||||
|
<packing>
|
||||||
|
<property name="name">page2</property>
|
||||||
|
<property name="title" translatable="yes">page2</property>
|
||||||
|
<property name="position">2</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
</object>
|
||||||
|
</interface>
|
||||||
@@ -0,0 +1,190 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<!-- Generated with glade 3.40.0 -->
|
||||||
|
<interface>
|
||||||
|
<requires lib="gtk+" version="3.24"/>
|
||||||
|
<object class="GtkBox" id="topobject">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can-focus">False</property>
|
||||||
|
<property name="margin-start">8</property>
|
||||||
|
<property name="orientation">vertical</property>
|
||||||
|
<child>
|
||||||
|
<object class="GtkLabel" id="lbl_title">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can-focus">False</property>
|
||||||
|
<property name="label" translatable="yes">Status</property>
|
||||||
|
<attributes>
|
||||||
|
<attribute name="weight" value="bold"/>
|
||||||
|
</attributes>
|
||||||
|
</object>
|
||||||
|
<packing>
|
||||||
|
<property name="expand">False</property>
|
||||||
|
<property name="fill">True</property>
|
||||||
|
<property name="position">0</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
<child>
|
||||||
|
<object class="GtkNotebook" id="ntb_status">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can-focus">True</property>
|
||||||
|
<child>
|
||||||
|
<object class="GtkBox" id="box_info">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can-focus">False</property>
|
||||||
|
<property name="orientation">vertical</property>
|
||||||
|
<property name="spacing">4</property>
|
||||||
|
<child>
|
||||||
|
<object class="GtkLabel" id="lbl_dbinfo">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can-focus">False</property>
|
||||||
|
</object>
|
||||||
|
<packing>
|
||||||
|
<property name="expand">False</property>
|
||||||
|
<property name="fill">True</property>
|
||||||
|
<property name="position">0</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
<child>
|
||||||
|
<object class="GtkLabel" id="lbl_infotext">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can-focus">False</property>
|
||||||
|
<property name="label" translatable="yes">This is an early release of YMS native GUI.
|
||||||
|
Please use the web frontend wich is already
|
||||||
|
in an usable state.
|
||||||
|
|
||||||
|
For further assistance please consult the related
|
||||||
|
thread in "Segeln Forum"</property>
|
||||||
|
</object>
|
||||||
|
<packing>
|
||||||
|
<property name="expand">False</property>
|
||||||
|
<property name="fill">True</property>
|
||||||
|
<property name="position">1</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
<child>
|
||||||
|
<object class="GtkDrawingArea" id="drw_status">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can-focus">False</property>
|
||||||
|
<property name="hexpand">True</property>
|
||||||
|
<property name="vexpand">True</property>
|
||||||
|
<signal name="draw" handler="on_drw_status_draw" swapped="no"/>
|
||||||
|
</object>
|
||||||
|
<packing>
|
||||||
|
<property name="expand">True</property>
|
||||||
|
<property name="fill">True</property>
|
||||||
|
<property name="position">2</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
</object>
|
||||||
|
</child>
|
||||||
|
<child type="tab">
|
||||||
|
<object class="GtkLabel">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can-focus">False</property>
|
||||||
|
<property name="label" translatable="yes">Info</property>
|
||||||
|
</object>
|
||||||
|
<packing>
|
||||||
|
<property name="tab-fill">False</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
<child>
|
||||||
|
<object class="GtkScrolledWindow">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can-focus">True</property>
|
||||||
|
<property name="shadow-type">in</property>
|
||||||
|
<child>
|
||||||
|
<object class="GtkTreeView" id="tvw_tables">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can-focus">True</property>
|
||||||
|
<child internal-child="selection">
|
||||||
|
<object class="GtkTreeSelection"/>
|
||||||
|
</child>
|
||||||
|
</object>
|
||||||
|
</child>
|
||||||
|
</object>
|
||||||
|
<packing>
|
||||||
|
<property name="position">1</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
<child type="tab">
|
||||||
|
<object class="GtkLabel">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can-focus">False</property>
|
||||||
|
<property name="label" translatable="yes">Tables</property>
|
||||||
|
</object>
|
||||||
|
<packing>
|
||||||
|
<property name="position">1</property>
|
||||||
|
<property name="tab-fill">False</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
<child>
|
||||||
|
<object class="GtkBox" id="box_config">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can-focus">False</property>
|
||||||
|
<property name="orientation">vertical</property>
|
||||||
|
<child>
|
||||||
|
<object class="GtkLabel" id="lbl_config">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can-focus">False</property>
|
||||||
|
</object>
|
||||||
|
<packing>
|
||||||
|
<property name="expand">False</property>
|
||||||
|
<property name="fill">True</property>
|
||||||
|
<property name="position">0</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
<child>
|
||||||
|
<object class="GtkScrolledWindow">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can-focus">True</property>
|
||||||
|
<property name="shadow-type">in</property>
|
||||||
|
<child>
|
||||||
|
<object class="GtkTextView" id="txt_config">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can-focus">True</property>
|
||||||
|
<property name="editable">False</property>
|
||||||
|
</object>
|
||||||
|
</child>
|
||||||
|
</object>
|
||||||
|
<packing>
|
||||||
|
<property name="expand">True</property>
|
||||||
|
<property name="fill">True</property>
|
||||||
|
<property name="position">1</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
</object>
|
||||||
|
<packing>
|
||||||
|
<property name="position">2</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
<child type="tab">
|
||||||
|
<object class="GtkLabel">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can-focus">False</property>
|
||||||
|
<property name="label" translatable="yes">Config</property>
|
||||||
|
</object>
|
||||||
|
<packing>
|
||||||
|
<property name="position">2</property>
|
||||||
|
<property name="tab-fill">False</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
</object>
|
||||||
|
<packing>
|
||||||
|
<property name="expand">True</property>
|
||||||
|
<property name="fill">True</property>
|
||||||
|
<property name="position">1</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
<child>
|
||||||
|
<object class="GtkLabel" id="lbl_version">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can-focus">False</property>
|
||||||
|
<property name="label" translatable="yes">YMS version x.x.x</property>
|
||||||
|
</object>
|
||||||
|
<packing>
|
||||||
|
<property name="expand">False</property>
|
||||||
|
<property name="fill">True</property>
|
||||||
|
<property name="position">3</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
</object>
|
||||||
|
</interface>
|
||||||
@@ -0,0 +1,905 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<!-- Generated with glade 3.40.0 -->
|
||||||
|
<interface>
|
||||||
|
<requires lib="gtk+" version="3.24"/>
|
||||||
|
<object class="GtkAdjustment" id="adj_angle">
|
||||||
|
<property name="upper">90</property>
|
||||||
|
<property name="step-increment">1</property>
|
||||||
|
<property name="page-increment">10</property>
|
||||||
|
</object>
|
||||||
|
<object class="GtkAdjustment" id="adj_capacity">
|
||||||
|
<property name="upper">100</property>
|
||||||
|
<property name="step-increment">1</property>
|
||||||
|
<property name="page-increment">10</property>
|
||||||
|
</object>
|
||||||
|
<object class="GtkAdjustment" id="adj_pos_x">
|
||||||
|
<property name="upper">99999</property>
|
||||||
|
<property name="step-increment">10</property>
|
||||||
|
<property name="page-increment">100</property>
|
||||||
|
</object>
|
||||||
|
<object class="GtkAdjustment" id="adj_pos_y">
|
||||||
|
<property name="upper">99999</property>
|
||||||
|
<property name="step-increment">10</property>
|
||||||
|
<property name="page-increment">100</property>
|
||||||
|
</object>
|
||||||
|
<object class="GtkAdjustment" id="adj_pos_z">
|
||||||
|
<property name="upper">99999</property>
|
||||||
|
<property name="step-increment">10</property>
|
||||||
|
<property name="page-increment">100</property>
|
||||||
|
</object>
|
||||||
|
<object class="GtkAdjustment" id="adj_width_x">
|
||||||
|
<property name="upper">9999</property>
|
||||||
|
<property name="step-increment">10</property>
|
||||||
|
<property name="page-increment">100</property>
|
||||||
|
</object>
|
||||||
|
<object class="GtkAdjustment" id="adj_width_y">
|
||||||
|
<property name="upper">9999</property>
|
||||||
|
<property name="step-increment">10</property>
|
||||||
|
<property name="page-increment">100</property>
|
||||||
|
</object>
|
||||||
|
<object class="GtkAdjustment" id="adj_width_z">
|
||||||
|
<property name="upper">9999</property>
|
||||||
|
<property name="step-increment">10</property>
|
||||||
|
<property name="page-increment">100</property>
|
||||||
|
</object>
|
||||||
|
<object class="GtkStack" id="topobject">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can-focus">False</property>
|
||||||
|
<property name="margin-start">8</property>
|
||||||
|
<child>
|
||||||
|
<object class="GtkBox" id="box_storage">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can-focus">False</property>
|
||||||
|
<property name="orientation">vertical</property>
|
||||||
|
<child>
|
||||||
|
<object class="GtkExpander">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can-focus">True</property>
|
||||||
|
<child>
|
||||||
|
<!-- n-columns=3 n-rows=2 -->
|
||||||
|
<object class="GtkGrid">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can-focus">False</property>
|
||||||
|
<child>
|
||||||
|
<object class="GtkButtonBox">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can-focus">False</property>
|
||||||
|
<property name="orientation">vertical</property>
|
||||||
|
<property name="layout-style">start</property>
|
||||||
|
<child>
|
||||||
|
<object class="GtkButton" id="but_flt_clear">
|
||||||
|
<property name="label" translatable="yes">Clear</property>
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can-focus">True</property>
|
||||||
|
<property name="receives-default">True</property>
|
||||||
|
</object>
|
||||||
|
<packing>
|
||||||
|
<property name="expand">True</property>
|
||||||
|
<property name="fill">True</property>
|
||||||
|
<property name="position">0</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
<child>
|
||||||
|
<object class="GtkButton" id="but_flt_apply">
|
||||||
|
<property name="label" translatable="yes">Apply</property>
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can-focus">True</property>
|
||||||
|
<property name="receives-default">True</property>
|
||||||
|
</object>
|
||||||
|
<packing>
|
||||||
|
<property name="expand">True</property>
|
||||||
|
<property name="fill">True</property>
|
||||||
|
<property name="position">1</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
</object>
|
||||||
|
<packing>
|
||||||
|
<property name="left-attach">2</property>
|
||||||
|
<property name="top-attach">0</property>
|
||||||
|
<property name="height">2</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
<child>
|
||||||
|
<object class="GtkLabel">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can-focus">False</property>
|
||||||
|
<property name="label" translatable="yes">Text</property>
|
||||||
|
</object>
|
||||||
|
<packing>
|
||||||
|
<property name="left-attach">0</property>
|
||||||
|
<property name="top-attach">0</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
<child>
|
||||||
|
<object class="GtkEntry" id="ent_flt_text">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can-focus">True</property>
|
||||||
|
<property name="hexpand">True</property>
|
||||||
|
</object>
|
||||||
|
<packing>
|
||||||
|
<property name="left-attach">1</property>
|
||||||
|
<property name="top-attach">0</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
<child>
|
||||||
|
<placeholder/>
|
||||||
|
</child>
|
||||||
|
<child>
|
||||||
|
<placeholder/>
|
||||||
|
</child>
|
||||||
|
</object>
|
||||||
|
</child>
|
||||||
|
<child type="label">
|
||||||
|
<object class="GtkLabel">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can-focus">False</property>
|
||||||
|
<property name="label" translatable="yes">Filter Storage</property>
|
||||||
|
</object>
|
||||||
|
</child>
|
||||||
|
</object>
|
||||||
|
<packing>
|
||||||
|
<property name="expand">False</property>
|
||||||
|
<property name="fill">True</property>
|
||||||
|
<property name="position">0</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
<child>
|
||||||
|
<object class="GtkScrolledWindow">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can-focus">True</property>
|
||||||
|
<property name="shadow-type">in</property>
|
||||||
|
<child>
|
||||||
|
<object class="GtkTreeView" id="tvw_storage">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can-focus">True</property>
|
||||||
|
<child internal-child="selection">
|
||||||
|
<object class="GtkTreeSelection"/>
|
||||||
|
</child>
|
||||||
|
</object>
|
||||||
|
</child>
|
||||||
|
</object>
|
||||||
|
<packing>
|
||||||
|
<property name="expand">True</property>
|
||||||
|
<property name="fill">True</property>
|
||||||
|
<property name="position">1</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
<child>
|
||||||
|
<object class="GtkButtonBox">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can-focus">False</property>
|
||||||
|
<property name="layout-style">end</property>
|
||||||
|
<child>
|
||||||
|
<object class="GtkButton" id="but_new">
|
||||||
|
<property name="label" translatable="yes">New</property>
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can-focus">True</property>
|
||||||
|
<property name="receives-default">True</property>
|
||||||
|
<signal name="clicked" handler="on_but_new_clicked" swapped="no"/>
|
||||||
|
</object>
|
||||||
|
<packing>
|
||||||
|
<property name="expand">True</property>
|
||||||
|
<property name="fill">True</property>
|
||||||
|
<property name="position">0</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
<child>
|
||||||
|
<object class="GtkButton" id="but_edit">
|
||||||
|
<property name="label" translatable="yes">Edit</property>
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can-focus">True</property>
|
||||||
|
<property name="receives-default">True</property>
|
||||||
|
<signal name="clicked" handler="on_but_edit_clicked" swapped="no"/>
|
||||||
|
</object>
|
||||||
|
<packing>
|
||||||
|
<property name="expand">True</property>
|
||||||
|
<property name="fill">True</property>
|
||||||
|
<property name="position">1</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
<child>
|
||||||
|
<object class="GtkButton" id="but_detail">
|
||||||
|
<property name="label" translatable="yes">Details</property>
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can-focus">True</property>
|
||||||
|
<property name="receives-default">True</property>
|
||||||
|
<signal name="clicked" handler="on_but_detail_clicked" swapped="no"/>
|
||||||
|
</object>
|
||||||
|
<packing>
|
||||||
|
<property name="expand">True</property>
|
||||||
|
<property name="fill">True</property>
|
||||||
|
<property name="position">2</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
</object>
|
||||||
|
<packing>
|
||||||
|
<property name="expand">False</property>
|
||||||
|
<property name="fill">True</property>
|
||||||
|
<property name="position">2</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
</object>
|
||||||
|
<packing>
|
||||||
|
<property name="name">page0</property>
|
||||||
|
<property name="title" translatable="yes">page0</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
<child>
|
||||||
|
<object class="GtkBox" id="box_stor_detail">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can-focus">False</property>
|
||||||
|
<property name="orientation">vertical</property>
|
||||||
|
<child>
|
||||||
|
<object class="GtkLabel">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can-focus">False</property>
|
||||||
|
<property name="label" translatable="yes">Storage Detais</property>
|
||||||
|
<attributes>
|
||||||
|
<attribute name="weight" value="bold"/>
|
||||||
|
</attributes>
|
||||||
|
</object>
|
||||||
|
<packing>
|
||||||
|
<property name="expand">False</property>
|
||||||
|
<property name="fill">True</property>
|
||||||
|
<property name="position">0</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
<child>
|
||||||
|
<!-- n-columns=2 n-rows=7 -->
|
||||||
|
<object class="GtkGrid">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can-focus">False</property>
|
||||||
|
<child>
|
||||||
|
<object class="GtkLabel">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can-focus">False</property>
|
||||||
|
<property name="label" translatable="yes">Name</property>
|
||||||
|
</object>
|
||||||
|
<packing>
|
||||||
|
<property name="left-attach">0</property>
|
||||||
|
<property name="top-attach">0</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
<child>
|
||||||
|
<object class="GtkLabel" id="lbl_name">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can-focus">False</property>
|
||||||
|
<property name="hexpand">True</property>
|
||||||
|
</object>
|
||||||
|
<packing>
|
||||||
|
<property name="left-attach">1</property>
|
||||||
|
<property name="top-attach">0</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
<child>
|
||||||
|
<object class="GtkLabel">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can-focus">False</property>
|
||||||
|
<property name="label" translatable="yes">Remarks</property>
|
||||||
|
</object>
|
||||||
|
<packing>
|
||||||
|
<property name="left-attach">0</property>
|
||||||
|
<property name="top-attach">6</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
<child>
|
||||||
|
<object class="GtkLabel" id="lbl_remarks">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can-focus">False</property>
|
||||||
|
</object>
|
||||||
|
<packing>
|
||||||
|
<property name="left-attach">1</property>
|
||||||
|
<property name="top-attach">6</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
<child>
|
||||||
|
<object class="GtkLabel">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can-focus">False</property>
|
||||||
|
<property name="label" translatable="yes">Type</property>
|
||||||
|
</object>
|
||||||
|
<packing>
|
||||||
|
<property name="left-attach">0</property>
|
||||||
|
<property name="top-attach">1</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
<child>
|
||||||
|
<object class="GtkLabel">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can-focus">False</property>
|
||||||
|
<property name="label" translatable="yes">Position (x, y, z)</property>
|
||||||
|
</object>
|
||||||
|
<packing>
|
||||||
|
<property name="left-attach">0</property>
|
||||||
|
<property name="top-attach">2</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
<child>
|
||||||
|
<object class="GtkLabel">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can-focus">False</property>
|
||||||
|
<property name="label" translatable="yes">Dimension (x, y, z)</property>
|
||||||
|
</object>
|
||||||
|
<packing>
|
||||||
|
<property name="left-attach">0</property>
|
||||||
|
<property name="top-attach">3</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
<child>
|
||||||
|
<object class="GtkLabel">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can-focus">False</property>
|
||||||
|
<property name="label" translatable="yes">Angle</property>
|
||||||
|
</object>
|
||||||
|
<packing>
|
||||||
|
<property name="left-attach">0</property>
|
||||||
|
<property name="top-attach">4</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
<child>
|
||||||
|
<object class="GtkLabel">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can-focus">False</property>
|
||||||
|
<property name="label" translatable="yes">Capacity</property>
|
||||||
|
</object>
|
||||||
|
<packing>
|
||||||
|
<property name="left-attach">0</property>
|
||||||
|
<property name="top-attach">5</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
<child>
|
||||||
|
<object class="GtkLabel" id="lbl_type">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can-focus">False</property>
|
||||||
|
<property name="hexpand">True</property>
|
||||||
|
</object>
|
||||||
|
<packing>
|
||||||
|
<property name="left-attach">1</property>
|
||||||
|
<property name="top-attach">1</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
<child>
|
||||||
|
<object class="GtkLabel" id="lbl_position">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can-focus">False</property>
|
||||||
|
<property name="hexpand">True</property>
|
||||||
|
</object>
|
||||||
|
<packing>
|
||||||
|
<property name="left-attach">1</property>
|
||||||
|
<property name="top-attach">2</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
<child>
|
||||||
|
<object class="GtkLabel" id="lbl_dimension">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can-focus">False</property>
|
||||||
|
<property name="hexpand">True</property>
|
||||||
|
</object>
|
||||||
|
<packing>
|
||||||
|
<property name="left-attach">1</property>
|
||||||
|
<property name="top-attach">3</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
<child>
|
||||||
|
<object class="GtkLabel" id="lbl_angle">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can-focus">False</property>
|
||||||
|
<property name="hexpand">True</property>
|
||||||
|
</object>
|
||||||
|
<packing>
|
||||||
|
<property name="left-attach">1</property>
|
||||||
|
<property name="top-attach">4</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
<child>
|
||||||
|
<object class="GtkLabel" id="lbl_capacity">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can-focus">False</property>
|
||||||
|
<property name="hexpand">True</property>
|
||||||
|
</object>
|
||||||
|
<packing>
|
||||||
|
<property name="left-attach">1</property>
|
||||||
|
<property name="top-attach">5</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
</object>
|
||||||
|
<packing>
|
||||||
|
<property name="expand">True</property>
|
||||||
|
<property name="fill">True</property>
|
||||||
|
<property name="position">1</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
<child>
|
||||||
|
<object class="GtkButtonBox">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can-focus">False</property>
|
||||||
|
<property name="layout-style">end</property>
|
||||||
|
<child>
|
||||||
|
<object class="GtkButton" id="but_delete">
|
||||||
|
<property name="label" translatable="yes">Delete</property>
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can-focus">True</property>
|
||||||
|
<property name="receives-default">True</property>
|
||||||
|
<signal name="clicked" handler="on_but_delete_clicked" swapped="no"/>
|
||||||
|
</object>
|
||||||
|
<packing>
|
||||||
|
<property name="expand">True</property>
|
||||||
|
<property name="fill">True</property>
|
||||||
|
<property name="position">0</property>
|
||||||
|
<property name="secondary">True</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
<child>
|
||||||
|
<object class="GtkButton" id="but_edit2">
|
||||||
|
<property name="label" translatable="yes">Edit</property>
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can-focus">True</property>
|
||||||
|
<property name="receives-default">True</property>
|
||||||
|
<signal name="clicked" handler="on_but_edit_clicked" swapped="no"/>
|
||||||
|
</object>
|
||||||
|
<packing>
|
||||||
|
<property name="expand">True</property>
|
||||||
|
<property name="fill">True</property>
|
||||||
|
<property name="position">1</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
<child>
|
||||||
|
<object class="GtkButton" id="but_close">
|
||||||
|
<property name="label" translatable="yes">Close</property>
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can-focus">True</property>
|
||||||
|
<property name="receives-default">True</property>
|
||||||
|
<signal name="clicked" handler="on_but_close_clicked" swapped="no"/>
|
||||||
|
</object>
|
||||||
|
<packing>
|
||||||
|
<property name="expand">True</property>
|
||||||
|
<property name="fill">True</property>
|
||||||
|
<property name="position">2</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
</object>
|
||||||
|
<packing>
|
||||||
|
<property name="expand">False</property>
|
||||||
|
<property name="fill">True</property>
|
||||||
|
<property name="position">2</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
</object>
|
||||||
|
<packing>
|
||||||
|
<property name="name">page1</property>
|
||||||
|
<property name="title" translatable="yes">page1</property>
|
||||||
|
<property name="position">1</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
<child>
|
||||||
|
<object class="GtkBox" id="box_stor_edit">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can-focus">False</property>
|
||||||
|
<property name="orientation">vertical</property>
|
||||||
|
<child>
|
||||||
|
<object class="GtkLabel" id="lbl_title_edit">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can-focus">False</property>
|
||||||
|
<property name="label" translatable="yes">Edit Storage</property>
|
||||||
|
<attributes>
|
||||||
|
<attribute name="weight" value="bold"/>
|
||||||
|
</attributes>
|
||||||
|
</object>
|
||||||
|
<packing>
|
||||||
|
<property name="expand">False</property>
|
||||||
|
<property name="fill">True</property>
|
||||||
|
<property name="position">0</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
<child>
|
||||||
|
<!-- n-columns=7 n-rows=7 -->
|
||||||
|
<object class="GtkGrid">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can-focus">False</property>
|
||||||
|
<child>
|
||||||
|
<object class="GtkLabel">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can-focus">False</property>
|
||||||
|
<property name="label" translatable="yes">Name</property>
|
||||||
|
</object>
|
||||||
|
<packing>
|
||||||
|
<property name="left-attach">0</property>
|
||||||
|
<property name="top-attach">0</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
<child>
|
||||||
|
<object class="GtkLabel">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can-focus">False</property>
|
||||||
|
<property name="label" translatable="yes">Typ</property>
|
||||||
|
</object>
|
||||||
|
<packing>
|
||||||
|
<property name="left-attach">0</property>
|
||||||
|
<property name="top-attach">1</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
<child>
|
||||||
|
<object class="GtkLabel">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can-focus">False</property>
|
||||||
|
<property name="label" translatable="yes">Position, mm</property>
|
||||||
|
</object>
|
||||||
|
<packing>
|
||||||
|
<property name="left-attach">0</property>
|
||||||
|
<property name="top-attach">2</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
<child>
|
||||||
|
<object class="GtkLabel">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can-focus">False</property>
|
||||||
|
<property name="margin-start">4</property>
|
||||||
|
<property name="margin-end">4</property>
|
||||||
|
<property name="label" translatable="yes">X</property>
|
||||||
|
</object>
|
||||||
|
<packing>
|
||||||
|
<property name="left-attach">1</property>
|
||||||
|
<property name="top-attach">2</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
<child>
|
||||||
|
<object class="GtkLabel">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can-focus">False</property>
|
||||||
|
<property name="margin-start">4</property>
|
||||||
|
<property name="margin-end">4</property>
|
||||||
|
<property name="label" translatable="yes">Y</property>
|
||||||
|
</object>
|
||||||
|
<packing>
|
||||||
|
<property name="left-attach">3</property>
|
||||||
|
<property name="top-attach">2</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
<child>
|
||||||
|
<object class="GtkLabel">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can-focus">False</property>
|
||||||
|
<property name="margin-start">4</property>
|
||||||
|
<property name="margin-end">4</property>
|
||||||
|
<property name="label" translatable="yes">Z</property>
|
||||||
|
</object>
|
||||||
|
<packing>
|
||||||
|
<property name="left-attach">5</property>
|
||||||
|
<property name="top-attach">2</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
<child>
|
||||||
|
<object class="GtkSpinButton" id="spi_x">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can-focus">True</property>
|
||||||
|
<property name="max-length">5</property>
|
||||||
|
<property name="width-chars">5</property>
|
||||||
|
<property name="adjustment">adj_pos_x</property>
|
||||||
|
<property name="numeric">True</property>
|
||||||
|
</object>
|
||||||
|
<packing>
|
||||||
|
<property name="left-attach">2</property>
|
||||||
|
<property name="top-attach">2</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
<child>
|
||||||
|
<object class="GtkSpinButton" id="spi_y">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can-focus">True</property>
|
||||||
|
<property name="max-length">5</property>
|
||||||
|
<property name="width-chars">5</property>
|
||||||
|
<property name="adjustment">adj_pos_y</property>
|
||||||
|
<property name="numeric">True</property>
|
||||||
|
</object>
|
||||||
|
<packing>
|
||||||
|
<property name="left-attach">4</property>
|
||||||
|
<property name="top-attach">2</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
<child>
|
||||||
|
<object class="GtkSpinButton" id="spi_z">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can-focus">True</property>
|
||||||
|
<property name="max-length">5</property>
|
||||||
|
<property name="width-chars">5</property>
|
||||||
|
<property name="adjustment">adj_pos_z</property>
|
||||||
|
<property name="numeric">True</property>
|
||||||
|
</object>
|
||||||
|
<packing>
|
||||||
|
<property name="left-attach">6</property>
|
||||||
|
<property name="top-attach">2</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
<child>
|
||||||
|
<object class="GtkEntry" id="ent_sname">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can-focus">True</property>
|
||||||
|
</object>
|
||||||
|
<packing>
|
||||||
|
<property name="left-attach">1</property>
|
||||||
|
<property name="top-attach">0</property>
|
||||||
|
<property name="width">6</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
<child>
|
||||||
|
<object class="GtkComboBox" id="cmb_type">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can-focus">False</property>
|
||||||
|
</object>
|
||||||
|
<packing>
|
||||||
|
<property name="left-attach">1</property>
|
||||||
|
<property name="top-attach">1</property>
|
||||||
|
<property name="width">6</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
<child>
|
||||||
|
<object class="GtkLabel">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can-focus">False</property>
|
||||||
|
<property name="label" translatable="yes">Width, mm</property>
|
||||||
|
</object>
|
||||||
|
<packing>
|
||||||
|
<property name="left-attach">0</property>
|
||||||
|
<property name="top-attach">3</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
<child>
|
||||||
|
<object class="GtkLabel">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can-focus">False</property>
|
||||||
|
<property name="margin-start">4</property>
|
||||||
|
<property name="margin-end">4</property>
|
||||||
|
<property name="label" translatable="yes">WX</property>
|
||||||
|
</object>
|
||||||
|
<packing>
|
||||||
|
<property name="left-attach">1</property>
|
||||||
|
<property name="top-attach">3</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
<child>
|
||||||
|
<object class="GtkLabel">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can-focus">False</property>
|
||||||
|
<property name="margin-start">4</property>
|
||||||
|
<property name="margin-end">4</property>
|
||||||
|
<property name="label" translatable="yes">WY</property>
|
||||||
|
</object>
|
||||||
|
<packing>
|
||||||
|
<property name="left-attach">3</property>
|
||||||
|
<property name="top-attach">3</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
<child>
|
||||||
|
<object class="GtkLabel">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can-focus">False</property>
|
||||||
|
<property name="margin-start">4</property>
|
||||||
|
<property name="margin-end">4</property>
|
||||||
|
<property name="label" translatable="yes">WZ</property>
|
||||||
|
</object>
|
||||||
|
<packing>
|
||||||
|
<property name="left-attach">5</property>
|
||||||
|
<property name="top-attach">3</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
<child>
|
||||||
|
<object class="GtkSpinButton" id="spi_wx">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can-focus">True</property>
|
||||||
|
<property name="max-length">4</property>
|
||||||
|
<property name="width-chars">4</property>
|
||||||
|
<property name="text" translatable="yes">0</property>
|
||||||
|
<property name="adjustment">adj_width_x</property>
|
||||||
|
<property name="numeric">True</property>
|
||||||
|
</object>
|
||||||
|
<packing>
|
||||||
|
<property name="left-attach">2</property>
|
||||||
|
<property name="top-attach">3</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
<child>
|
||||||
|
<object class="GtkSpinButton" id="spi_wy">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can-focus">True</property>
|
||||||
|
<property name="max-length">4</property>
|
||||||
|
<property name="width-chars">4</property>
|
||||||
|
<property name="text" translatable="yes">0</property>
|
||||||
|
<property name="adjustment">adj_width_y</property>
|
||||||
|
<property name="numeric">True</property>
|
||||||
|
</object>
|
||||||
|
<packing>
|
||||||
|
<property name="left-attach">4</property>
|
||||||
|
<property name="top-attach">3</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
<child>
|
||||||
|
<object class="GtkSpinButton" id="spi_wz">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can-focus">True</property>
|
||||||
|
<property name="max-length">4</property>
|
||||||
|
<property name="width-chars">4</property>
|
||||||
|
<property name="text" translatable="yes">0</property>
|
||||||
|
<property name="adjustment">adj_width_z</property>
|
||||||
|
<property name="numeric">True</property>
|
||||||
|
</object>
|
||||||
|
<packing>
|
||||||
|
<property name="left-attach">6</property>
|
||||||
|
<property name="top-attach">3</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
<child>
|
||||||
|
<object class="GtkLabel">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can-focus">False</property>
|
||||||
|
<property name="label" translatable="yes">Angle</property>
|
||||||
|
</object>
|
||||||
|
<packing>
|
||||||
|
<property name="left-attach">0</property>
|
||||||
|
<property name="top-attach">4</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
<child>
|
||||||
|
<object class="GtkSpinButton" id="spi_angle">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can-focus">True</property>
|
||||||
|
<property name="adjustment">adj_angle</property>
|
||||||
|
</object>
|
||||||
|
<packing>
|
||||||
|
<property name="left-attach">2</property>
|
||||||
|
<property name="top-attach">4</property>
|
||||||
|
<property name="width">2</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
<child>
|
||||||
|
<object class="GtkLabel">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can-focus">False</property>
|
||||||
|
<property name="label" translatable="yes">Capacity</property>
|
||||||
|
</object>
|
||||||
|
<packing>
|
||||||
|
<property name="left-attach">0</property>
|
||||||
|
<property name="top-attach">5</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
<child>
|
||||||
|
<object class="GtkSpinButton" id="spi_capacity">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can-focus">True</property>
|
||||||
|
<property name="adjustment">adj_capacity</property>
|
||||||
|
</object>
|
||||||
|
<packing>
|
||||||
|
<property name="left-attach">2</property>
|
||||||
|
<property name="top-attach">5</property>
|
||||||
|
<property name="width">2</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
<child>
|
||||||
|
<object class="GtkLabel">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can-focus">False</property>
|
||||||
|
<property name="label" translatable="yes">Remarks</property>
|
||||||
|
</object>
|
||||||
|
<packing>
|
||||||
|
<property name="left-attach">0</property>
|
||||||
|
<property name="top-attach">6</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
<child>
|
||||||
|
<object class="GtkScrolledWindow">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can-focus">True</property>
|
||||||
|
<property name="shadow-type">in</property>
|
||||||
|
<child>
|
||||||
|
<object class="GtkTextView" id="txt_remarks">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can-focus">True</property>
|
||||||
|
</object>
|
||||||
|
</child>
|
||||||
|
</object>
|
||||||
|
<packing>
|
||||||
|
<property name="left-attach">1</property>
|
||||||
|
<property name="top-attach">6</property>
|
||||||
|
<property name="width">6</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
<child>
|
||||||
|
<object class="GtkComboBox" id="cmb_unit">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can-focus">False</property>
|
||||||
|
</object>
|
||||||
|
<packing>
|
||||||
|
<property name="left-attach">5</property>
|
||||||
|
<property name="top-attach">5</property>
|
||||||
|
<property name="width">2</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
<child>
|
||||||
|
<object class="GtkLabel">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can-focus">False</property>
|
||||||
|
<property name="label" translatable="yes">Unit</property>
|
||||||
|
</object>
|
||||||
|
<packing>
|
||||||
|
<property name="left-attach">4</property>
|
||||||
|
<property name="top-attach">5</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
<child>
|
||||||
|
<object class="GtkLabel">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can-focus">False</property>
|
||||||
|
<property name="label" translatable="yes">Degrees</property>
|
||||||
|
</object>
|
||||||
|
<packing>
|
||||||
|
<property name="left-attach">4</property>
|
||||||
|
<property name="top-attach">4</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
<child>
|
||||||
|
<placeholder/>
|
||||||
|
</child>
|
||||||
|
<child>
|
||||||
|
<placeholder/>
|
||||||
|
</child>
|
||||||
|
<child>
|
||||||
|
<placeholder/>
|
||||||
|
</child>
|
||||||
|
<child>
|
||||||
|
<placeholder/>
|
||||||
|
</child>
|
||||||
|
</object>
|
||||||
|
<packing>
|
||||||
|
<property name="expand">True</property>
|
||||||
|
<property name="fill">True</property>
|
||||||
|
<property name="position">1</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
<child>
|
||||||
|
<object class="GtkButtonBox">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can-focus">False</property>
|
||||||
|
<property name="layout-style">end</property>
|
||||||
|
<child>
|
||||||
|
<object class="GtkButton" id="but_save">
|
||||||
|
<property name="label" translatable="yes">Save</property>
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can-focus">True</property>
|
||||||
|
<property name="receives-default">True</property>
|
||||||
|
<signal name="clicked" handler="on_but_save_clicked" swapped="no"/>
|
||||||
|
</object>
|
||||||
|
<packing>
|
||||||
|
<property name="expand">True</property>
|
||||||
|
<property name="fill">True</property>
|
||||||
|
<property name="position">0</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
<child>
|
||||||
|
<object class="GtkButton" id="but_cancel">
|
||||||
|
<property name="label" translatable="yes">Cancel</property>
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can-focus">True</property>
|
||||||
|
<property name="receives-default">True</property>
|
||||||
|
<signal name="clicked" handler="on_but_cancel_clicked" swapped="no"/>
|
||||||
|
</object>
|
||||||
|
<packing>
|
||||||
|
<property name="expand">True</property>
|
||||||
|
<property name="fill">True</property>
|
||||||
|
<property name="position">2</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
</object>
|
||||||
|
<packing>
|
||||||
|
<property name="expand">False</property>
|
||||||
|
<property name="fill">True</property>
|
||||||
|
<property name="position">2</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
</object>
|
||||||
|
<packing>
|
||||||
|
<property name="name">page2</property>
|
||||||
|
<property name="title" translatable="yes">page2</property>
|
||||||
|
<property name="position">2</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
</object>
|
||||||
|
</interface>
|
||||||
@@ -1,90 +0,0 @@
|
|||||||
# -*- coding: utf-8 -*-
|
|
||||||
|
|
||||||
from datetime import datetime
|
|
||||||
import MySQLdb.cursors
|
|
||||||
|
|
||||||
class Vessel():
|
|
||||||
|
|
||||||
fields = ('vid', 'vtype', 'vesselname', 'model', 'loa', 'lwl',
|
|
||||||
'beam', 'draught', 'draught_min', 'displacement', 'ballast',
|
|
||||||
'beltpos_aft', 'beltpos_bow', 'shapefile', 'remarks')
|
|
||||||
|
|
||||||
def __init__(self, dbconn, vessel_id=None):
|
|
||||||
self.conn = dbconn
|
|
||||||
self.dcur = dbconn.cursor(MySQLdb.cursors.DictCursor)
|
|
||||||
if vessel_id:
|
|
||||||
self.vid = long(vessel_id)
|
|
||||||
self.load()
|
|
||||||
else:
|
|
||||||
self.vid = None
|
|
||||||
self.vtype = None
|
|
||||||
self.model = None
|
|
||||||
self.loa = None
|
|
||||||
self.lwl = None
|
|
||||||
self.beam = None
|
|
||||||
self.draught = None
|
|
||||||
self.draught_min = None
|
|
||||||
self.displacement = None
|
|
||||||
self.ballast = None
|
|
||||||
self.beltpos_aft = None
|
|
||||||
self.beltpos_bow = None
|
|
||||||
self.shapefile = None
|
|
||||||
self.remarks = None
|
|
||||||
self.data = {} # for old/new checks
|
|
||||||
|
|
||||||
def load(self):
|
|
||||||
sql = (
|
|
||||||
"SELECT {}".format(', '.join(self.fields))
|
|
||||||
"FROM vessel "
|
|
||||||
"WHERE vessel_id=%s"
|
|
||||||
)
|
|
||||||
self.dcur.execute(sql, (self.vid,))
|
|
||||||
self.data = self.dcur.fetchone()
|
|
||||||
# TODO
|
|
||||||
self.parent_id = self.data['parent_id']
|
|
||||||
|
|
||||||
def save(self):
|
|
||||||
last_row_id = None
|
|
||||||
self.last_update = datetime.now()
|
|
||||||
if self.vid:
|
|
||||||
# record already available
|
|
||||||
sqlfield = []
|
|
||||||
values = []
|
|
||||||
for field in self.fields:
|
|
||||||
newdata = getattr(self, field)
|
|
||||||
if self.data[field] != newdata:
|
|
||||||
sqlfield.append("{}=%s".format(field))
|
|
||||||
values.append(newdata)
|
|
||||||
self.data[field] = newdata
|
|
||||||
if values:
|
|
||||||
# only save ich there are changes
|
|
||||||
sql = (
|
|
||||||
"UPDATE vessel SET " + ",".join(sqlfield) +
|
|
||||||
" WHERE vidid=%s"
|
|
||||||
)
|
|
||||||
values.append(self.vid)
|
|
||||||
self.dcur.execute(sql, values)
|
|
||||||
# TODO check sql result
|
|
||||||
last_row_id = self.vid
|
|
||||||
else:
|
|
||||||
# new record
|
|
||||||
sql = (
|
|
||||||
"INSERT INTO risk (" + ",".join(self.fields) +
|
|
||||||
") VALUES (" + ",".join(["%s"] * len(self.fields)) + ")"
|
|
||||||
)
|
|
||||||
values = []
|
|
||||||
for field in self.fields:
|
|
||||||
newdata = getattr(self, field)
|
|
||||||
values.append(newdata)
|
|
||||||
self.data[field] = newdata
|
|
||||||
self.dcur.execute(sql, values)
|
|
||||||
last_row_id = self.dcur.lastrowid
|
|
||||||
self.vid = last_row_id
|
|
||||||
|
|
||||||
def delete(self, vessel_id):
|
|
||||||
sql = "DELETE FROM vessel WHERE vid=%s"
|
|
||||||
self.cur.execute(sql, (self.vid,))
|
|
||||||
|
|
||||||
def __str__(self):
|
|
||||||
out = "Vessel({})".format(self.vid)
|
|
||||||
return out
|
|
||||||
@@ -0,0 +1,279 @@
|
|||||||
|
# SPDX-License-Identifier: WTFPL
|
||||||
|
|
||||||
|
"""
|
||||||
|
Spezial:
|
||||||
|
Notebook mit Vessel, User, Lists, Settings
|
||||||
|
|
||||||
|
"""
|
||||||
|
|
||||||
|
import os
|
||||||
|
from gi.repository import GLib, Gtk, Gdk, Rsvg
|
||||||
|
|
||||||
|
from .view import View
|
||||||
|
from yms import gtkutils, combobox, treeview
|
||||||
|
from yms.lookup import Dropdown
|
||||||
|
|
||||||
|
class BaseView(View):
|
||||||
|
|
||||||
|
def __init__(self, context):
|
||||||
|
super().__init__(context, _("Base Data"), "base.ui")
|
||||||
|
#self.title = _("Base Data")
|
||||||
|
#builder = Gtk.Builder()
|
||||||
|
#builder.set_translation_domain(context.textdomain)
|
||||||
|
#builder.add_from_file(os.path.join(context.ui_path, "base.ui"))
|
||||||
|
#builder.connect_signals(self)
|
||||||
|
#self.topwidget = builder.get_object("topobject")
|
||||||
|
#gtkutils.init_named_controls(self, builder)
|
||||||
|
|
||||||
|
# combos
|
||||||
|
roles = {'captain': 'Captain', 'helmsman': 'Helmsman', 'sailor': 'Sailor'}
|
||||||
|
combobox.load_from_dict(self.combo['user_role'], roles)
|
||||||
|
langs = {'de': 'Deutsch', 'en': 'English'}
|
||||||
|
combobox.load_from_dict(self.combo['user_lang'], langs)
|
||||||
|
|
||||||
|
# shipyard
|
||||||
|
self.db.cur.execute("SELECT compid, compname FROM company WHERE comptype=3 ORDER BY compname")
|
||||||
|
shipyards = dict(self.db.cur.fetchall())
|
||||||
|
combobox.load_from_dict(self.combo['shipyard'], {-1: _("─── none ───")} | shipyards)
|
||||||
|
|
||||||
|
# get current vessel data
|
||||||
|
self.db.cur.execute("SELECT valint FROM settings WHERE userid=0 AND sno=1")
|
||||||
|
row = self.db.cur.fetchone()
|
||||||
|
if not row:
|
||||||
|
self.context.vessel.vid = 0
|
||||||
|
self.context.vessel.vesselname = "Ghost"
|
||||||
|
self.db.cur.execute("INSERT INTO settings (userid, sno, valint) VALUES (0, 1, 0)")
|
||||||
|
self.db.conn.commit()
|
||||||
|
else:
|
||||||
|
# check if vessel from settings exist
|
||||||
|
self.db.cur.execute("SELECT count(*) FROM vessel WHERE vid=%s", (row[0],))
|
||||||
|
res = self.db.cur.fetchone()[0]
|
||||||
|
if res > 0:
|
||||||
|
self.context.vessel.vid = row[0]
|
||||||
|
else:
|
||||||
|
# TODO set vessel to first in list
|
||||||
|
self.context.vessel.vid = 0
|
||||||
|
self.context.vessel.vesselname = "Ghost"
|
||||||
|
|
||||||
|
# default storage for current vessel
|
||||||
|
sql = "SELECT sid, sname FROM storage WHERE stype=0 AND vid=%s ORDER BY sname"
|
||||||
|
self.db.cur.execute(sql, (self.context.vessel.vid,))
|
||||||
|
storages = dict(self.db.cur.fetchall())
|
||||||
|
combobox.load_from_dict(self.combo['storage'], {-1: _("─── none ───")} | storages)
|
||||||
|
|
||||||
|
# get list of vessels
|
||||||
|
vessellist = {}
|
||||||
|
self.db.dcur.execute("SELECT vid, vesselname, model FROM vessel ORDER BY vid")
|
||||||
|
for row in self.db.dcur.fetchall():
|
||||||
|
vessellist[row['vid']] = (
|
||||||
|
row['vesselname'] if row['model'] is None
|
||||||
|
else row['vesselname'] + " - " + row['model']
|
||||||
|
)
|
||||||
|
combobox.load_from_dict(self.combo['vessel'], vessellist, self.context.vessel.vid)
|
||||||
|
# vessel load triggered from combobox init
|
||||||
|
|
||||||
|
# prepare lists
|
||||||
|
self.lst_user = Gtk.ListStore(int, str)
|
||||||
|
self.db.cur.execute("SELECT userid, login FROM user WHERE userid>0 ORDER BY login")
|
||||||
|
for row in self.db.cur.fetchall():
|
||||||
|
self.lst_user.append(row)
|
||||||
|
treeview.add_column(self.tree['user'], 'ID', 0)
|
||||||
|
treeview.add_column(self.tree['user'], 'Login', 1)
|
||||||
|
self.tree['user'].set_model(self.lst_user)
|
||||||
|
|
||||||
|
# list of dropdown lists
|
||||||
|
self.lst_lists = Gtk.ListStore(int, str, int)
|
||||||
|
# self.db.cur.execute("SELECT ddval, ddtext FROM dropdown WHERE ddid=0 AND ddval>0 ORDER BY ddval")
|
||||||
|
sql = (
|
||||||
|
"SELECT dd.ddval, dd.ddtext, COUNT(n.ddval) AS records "
|
||||||
|
"FROM dropdown AS dd LEFT JOIN dropdown AS n ON dd.ddval=n.ddid "
|
||||||
|
"WHERE dd.ddid=0 "
|
||||||
|
"GROUP BY dd.ddval, dd.ddtext "
|
||||||
|
"ORDER BY dd.ddval"
|
||||||
|
)
|
||||||
|
self.db.cur.execute(sql)
|
||||||
|
for row in self.db.cur.fetchall():
|
||||||
|
self.lst_lists.append(row)
|
||||||
|
treeview.add_column(self.tree['ddlists'], _('ID'), 0)
|
||||||
|
treeview.add_column(self.tree['ddlists'], _('List'), 1)
|
||||||
|
treeview.add_column(self.tree['ddlists'], _('Records'), 2)
|
||||||
|
self.tree['ddlists'].set_model(self.lst_lists)
|
||||||
|
|
||||||
|
# Settings date format selection list
|
||||||
|
# self.context.datefmt_map
|
||||||
|
|
||||||
|
# load shape of vessel if available
|
||||||
|
if self.context.vessel.vid > 0:
|
||||||
|
self.db.cur.execute("SELECT shapefile FROM vessel WHERE vid=%s", (self.context.vessel.vid, ))
|
||||||
|
filename = self.db.cur.fetchone()[0] or ''
|
||||||
|
shapefilepath = os.path.join(context.cfg['shapedir'], filename)
|
||||||
|
if os.path.isfile(shapefilepath):
|
||||||
|
handle = Rsvg.Handle()
|
||||||
|
self._svg = handle.new_from_file(shapefilepath)
|
||||||
|
#self._svg = handle.new_from_file(os.path.join(sys.path[0], cfg['shapedir'], "elizabethan29.svg"))
|
||||||
|
#viewport = Rsvg.Rectangle()
|
||||||
|
#viewport.x = 0
|
||||||
|
#viewport.y = 0
|
||||||
|
#viewport.width = 320
|
||||||
|
#viewport.height = 240
|
||||||
|
#self._svg.render_document(ctx, viewport)
|
||||||
|
|
||||||
|
# WIP generic remarks handling
|
||||||
|
self.text['vessel_remarks'].set_size_request(200, 70)
|
||||||
|
|
||||||
|
def load_dropdowns(self):
|
||||||
|
# non static dropdown (re-)load feature
|
||||||
|
# default storage for current vessel
|
||||||
|
sql = "SELECT sid, sname FROM storage WHERE stype=0 AND vid=%s ORDER BY sname"
|
||||||
|
self.db.cur.execute(sql, (self.context.vessel.vid,))
|
||||||
|
storages = dict(self.db.cur.fetchall())
|
||||||
|
combobox.refresh_dict(self.combo['storage'], {-1: _("─── none ───")} | storages)
|
||||||
|
|
||||||
|
def on_cmb_vessel_changed(self, widget):
|
||||||
|
self.context.vessel.load(combobox.get_list_value(widget))
|
||||||
|
sql = ("UPDATE settings SET valint=%s WHERE userid=0 AND sno=1")
|
||||||
|
self.db.cur.execute(sql, (self.context.vessel.vid,))
|
||||||
|
self.db.conn.commit()
|
||||||
|
# Refresh dependent data
|
||||||
|
self.load_dropdowns()
|
||||||
|
# Show data
|
||||||
|
self.display_vessel(self.context.vessel)
|
||||||
|
|
||||||
|
def on_but_vessel_add_clicked(self, widget):
|
||||||
|
answer = gtkutils.questionbox(
|
||||||
|
_("Add new vessel.\n"
|
||||||
|
"Are you sure?"
|
||||||
|
), title="YMS")
|
||||||
|
if answer == False:
|
||||||
|
return
|
||||||
|
self.context.vessel.create()
|
||||||
|
model = self.combo['vessel'].get_model()
|
||||||
|
model.append((self.context.vessel.vid, self.context.vessel.vesselname))
|
||||||
|
combobox.activate_row(self.combo['vessel'], self.context.vessel.vid)
|
||||||
|
self.edit_vessel(self.context.vessel)
|
||||||
|
self.stack['vessel'].set_visible_child(self.box['vessel_edit'])
|
||||||
|
|
||||||
|
def on_but_vessel_edit_clicked(self, widget):
|
||||||
|
self.edit_vessel(self.context.vessel)
|
||||||
|
self.stack['vessel'].set_visible_child(self.box['vessel_edit'])
|
||||||
|
|
||||||
|
def on_but_vessel_save_clicked(self, widget):
|
||||||
|
print("Save vessel")
|
||||||
|
vessel = self.context.vessel
|
||||||
|
vessel.vesselname = self.entry['vesselname'].get_text()
|
||||||
|
vessel.model = self.entry['model'].get_text()
|
||||||
|
vessel.year_built = self.spin['year_built'].get_value_as_int()
|
||||||
|
vessel.loa = self.spin['loa'].get_value()
|
||||||
|
vessel.lwl = self.spin['lwl'].get_value()
|
||||||
|
vessel.beam = self.spin['beam'].get_value()
|
||||||
|
vessel.draught = self.spin['draught'].get_value()
|
||||||
|
vessel.draught_min = self.spin['draught_min'].get_value()
|
||||||
|
vessel.displacement = self.spin['displacement'].get_value_as_int()
|
||||||
|
vessel.ballast = self.spin['ballast'].get_value_as_int()
|
||||||
|
vessel.remarks = gtkutils.get_text_contents(self.text['vessel_remarks'])
|
||||||
|
vessel.save()
|
||||||
|
self.stack['vessel'].set_visible_child(self.box['vessel'])
|
||||||
|
|
||||||
|
def on_but_vessel_cancel_clicked(self, widget):
|
||||||
|
self.stack['vessel'].set_visible_child(self.box['vessel'])
|
||||||
|
|
||||||
|
def on_but_vessel_delete_clicked(self, widget):
|
||||||
|
pass
|
||||||
|
|
||||||
|
def on_but_settings_save_clicked(self, widget):
|
||||||
|
print("Save settings")
|
||||||
|
#self.entry['sys_currency']
|
||||||
|
#self.spin['sys_max_width']
|
||||||
|
#self.spin['sys_max_height']
|
||||||
|
|
||||||
|
def display_vessel(self, vessel):
|
||||||
|
self.label['vesselname'].set_text(vessel.vesselname)
|
||||||
|
self.label['model'].set_text(vessel.model or '')
|
||||||
|
self.label['year_built'].set_text(self.format_int(vessel.year_built, default='n/a'))
|
||||||
|
|
||||||
|
def edit_vessel(self, vessel):
|
||||||
|
self.entry['vesselname'].set_text(vessel.vesselname)
|
||||||
|
self.entry['model'].set_text(vessel.model or '')
|
||||||
|
self.spin['year_built'].set_value(vessel.year_built or 0)
|
||||||
|
self.spin['loa'].set_value(vessel.loa or 0)
|
||||||
|
self.spin['lwl'].set_value(vessel.lwl or 0)
|
||||||
|
self.spin['beam'].set_value(vessel.beam or 0)
|
||||||
|
self.spin['draught'].set_value(vessel.draught or 0)
|
||||||
|
self.spin['draught_min'].set_value(vessel.draught_min or 0)
|
||||||
|
self.spin['displacement'].set_value(vessel.displacement or 0)
|
||||||
|
self.spin['ballast'].set_value(vessel.ballast or 0)
|
||||||
|
self.text['vessel_remarks'].get_buffer().set_text(vessel.remarks or '')
|
||||||
|
combobox.activate_row(self.combo['shipyard'], vessel.shipyard or -1)
|
||||||
|
combobox.activate_row(self.combo['storage'], vessel.sid_default or -1)
|
||||||
|
|
||||||
|
def display_user(self, user):
|
||||||
|
self.entry['user_login'].set_text(user.login)
|
||||||
|
self.entry['user_displayname'].set_text(user.displayname)
|
||||||
|
combobox.activate_row(self.combo['user_role'], user.role)
|
||||||
|
combobox.activate_row(self.combo['user_lang'], user.language)
|
||||||
|
self.check['user_locked'].set_active('locked' in user.flags)
|
||||||
|
self.check['user_deleted'].set_active('deleted' in user.flags)
|
||||||
|
self.entry['user_pass'].set_text('')
|
||||||
|
|
||||||
|
def on_tvw_user_row_activated(self, widget, path, column):
|
||||||
|
# load selected user
|
||||||
|
self.context.user.user_id = treeview.get_value(widget, 0)
|
||||||
|
self.context.user.load()
|
||||||
|
self.display_user(self.context.user)
|
||||||
|
|
||||||
|
def on_but_user_new_clicked(self, widget):
|
||||||
|
# get first free user id and create a new record with name "user<nnn>"
|
||||||
|
self.context.user.create()
|
||||||
|
self.lst_user.append((self.context.user.user_id, self.context.user.login))
|
||||||
|
|
||||||
|
def on_but_user_del_clicked(self, widget):
|
||||||
|
print("Delete user")
|
||||||
|
answer = gtkutils.questionbox(
|
||||||
|
_("Delete user!\n"
|
||||||
|
"Are you sure?"
|
||||||
|
), title="YMS")
|
||||||
|
if answer == False:
|
||||||
|
return
|
||||||
|
self.context.user.delete()
|
||||||
|
selection = self.tree['user'].get_selection()
|
||||||
|
model, tree_iter = selection.get_selected()
|
||||||
|
model.remove(tree_iter)
|
||||||
|
# TODO Select some other user from new list selection
|
||||||
|
self.context.user.user_id = treeview.get_value(self.tree['user'])
|
||||||
|
self.context.user.load()
|
||||||
|
self.display_user(self.context.user)
|
||||||
|
|
||||||
|
def on_but_user_newpass_clicked(self, widget):
|
||||||
|
self.entry['user_pass'].set_text(self.context.user.genpass())
|
||||||
|
|
||||||
|
def on_but_user_save_clicked(self, widget):
|
||||||
|
newlogin = self.entry['user_login'].get_text()
|
||||||
|
# check if changed login exists and throw error in that case
|
||||||
|
if newlogin != self.context.user.login:
|
||||||
|
sql = "SELECT COUNT(login) FROM user WHERE login=%s"
|
||||||
|
self.db.cur.execute(sql, (newlogin, ))
|
||||||
|
if self.db.cur.fetchone()[0] > 0:
|
||||||
|
# TODO set error indicator
|
||||||
|
print("Error: Login already exists!")
|
||||||
|
return
|
||||||
|
sql = "UPDATE user SET login=%s WHERE userid=%s"
|
||||||
|
self.db.cur.execute(sql, (newlogin, self.context.user.user_id))
|
||||||
|
treeview.set_value(self.tree['user'], 1, newlogin)
|
||||||
|
self.context.user.displayname = self.entry['user_displayname'].get_text()
|
||||||
|
self.context.user.role = combobox.get_list_value(self.combo['user_role'])
|
||||||
|
self.context.user.language = combobox.get_list_value(self.combo['user_lang'])
|
||||||
|
self.context.user.flags = []
|
||||||
|
if self.check['user_locked'].get_active(): self.context.user.flags.append('locked')
|
||||||
|
if self.check['user_deleted'].get_active(): self.context.user.flags.append('deleted')
|
||||||
|
self.context.user.save()
|
||||||
|
# password field is different. if filled set new password
|
||||||
|
newpass = self.entry['user_pass'].get_text()
|
||||||
|
if len(newpass) >= 8:
|
||||||
|
try:
|
||||||
|
self.context.user.setpass(newpass)
|
||||||
|
finally:
|
||||||
|
newpass = None
|
||||||
|
self.entry['user_pass'].set_text('')
|
||||||
|
else:
|
||||||
|
# Password to short
|
||||||
|
pass
|
||||||
@@ -0,0 +1,92 @@
|
|||||||
|
# SPDX-License-Identifier: WTFPL
|
||||||
|
|
||||||
|
import os
|
||||||
|
from gi.repository import GLib, Gtk, Gdk
|
||||||
|
|
||||||
|
from .view import View
|
||||||
|
from yms import gtkutils, combobox, treeview
|
||||||
|
from yms.model import box
|
||||||
|
|
||||||
|
class BoxesView(View):
|
||||||
|
|
||||||
|
def __init__(self, context):
|
||||||
|
super().__init__(context, _("Box"), "boxes.ui")
|
||||||
|
|
||||||
|
# box already used for controls so other name here
|
||||||
|
self.sbox = box.Box(context.db) # current record
|
||||||
|
self.newrecord = False
|
||||||
|
|
||||||
|
self.lst_box = Gtk.ListStore(int, str, str, str)
|
||||||
|
sql = (
|
||||||
|
"SELECT b.boxid, b.label, b.content, b.remarks "
|
||||||
|
"FROM box AS b JOIN storage AS s USING (sid) "
|
||||||
|
"WHERE s.vid=%s "
|
||||||
|
"ORDER BY b.label"
|
||||||
|
)
|
||||||
|
self.db.cur.execute(sql, (context.vessel.vid,))
|
||||||
|
for row in self.db.cur.fetchall():
|
||||||
|
self.lst_box.append(row)
|
||||||
|
|
||||||
|
treeview.add_column(self.tree['box'], _('ID'), 0)
|
||||||
|
treeview.add_column(self.tree['box'], _('Label'), 1)
|
||||||
|
treeview.add_column(self.tree['box'], _('Content'), 2)
|
||||||
|
treeview.add_column(self.tree['box'], _('Remarks'), 3)
|
||||||
|
self.tree['box'].set_model(self.lst_box)
|
||||||
|
|
||||||
|
|
||||||
|
def load_list(self):
|
||||||
|
pass
|
||||||
|
|
||||||
|
def display_record(self):
|
||||||
|
self.label['label'].set_text(self.sbox.label)
|
||||||
|
self.label['remarks'].set_text(self.sbox.remarks or '')
|
||||||
|
|
||||||
|
def edit_record(self):
|
||||||
|
self.entry['label'].set_text(self.sbox.label)
|
||||||
|
self.entry['content'].set_text(self.sbox.content or '')
|
||||||
|
self.spin['wx'].set_value(self.sbox.wx or 0)
|
||||||
|
self.spin['wy'].set_value(self.sbox.wy or 0)
|
||||||
|
self.spin['wz'].set_value(self.sbox.wz or 0)
|
||||||
|
self.text['remarks'].get_buffer().set_text(self.sbox.remarks or '')
|
||||||
|
|
||||||
|
# buttons on list page
|
||||||
|
def on_but_new_clicked(self, widget):
|
||||||
|
self.newrecord = True
|
||||||
|
self.label['title_edit'].set_text("Add new Box")
|
||||||
|
self.topwidget.set_visible_child(self.box['box_edit'])
|
||||||
|
|
||||||
|
def on_but_edit_clicked(self, widget):
|
||||||
|
self.newrecord = False
|
||||||
|
self.label['title_edit'].set_text("Edit Box")
|
||||||
|
sid = treeview.get_value(self.tree['box'], 0)
|
||||||
|
self.sbox.load(sid)
|
||||||
|
self.edit_record()
|
||||||
|
self.topwidget.set_visible_child(self.box['box_edit'])
|
||||||
|
|
||||||
|
def on_but_detail_clicked(self, widget):
|
||||||
|
sid = treeview.get_value(self.tree['box'], 0)
|
||||||
|
self.sbox.load(sid)
|
||||||
|
self.display_record()
|
||||||
|
self.topwidget.set_visible_child(self.box['box_detail'])
|
||||||
|
|
||||||
|
# buttons on detail page
|
||||||
|
# edit2 uses edit callback
|
||||||
|
def on_but_close_clicked(self, widget):
|
||||||
|
self.topwidget.set_visible_child(self.box['box'])
|
||||||
|
|
||||||
|
def on_but_delete_clicked(self, widget):
|
||||||
|
self.topwidget.set_visible_child(self.box['box'])
|
||||||
|
self.newrecord = False
|
||||||
|
|
||||||
|
# buttons on edit page
|
||||||
|
def on_but_save_clicked(self, widget):
|
||||||
|
print("save not implemented yet")
|
||||||
|
self.newrecord = False
|
||||||
|
|
||||||
|
def on_but_cancel_clicked(self, widget):
|
||||||
|
self.topwidget.set_visible_child(self.box['box'])
|
||||||
|
self.newrecord = False
|
||||||
|
|
||||||
|
def on_but_color_clicked(self, widget):
|
||||||
|
pass
|
||||||
|
|
||||||
@@ -0,0 +1,68 @@
|
|||||||
|
# SPDX-License-Identifier: WTFPL
|
||||||
|
|
||||||
|
import os
|
||||||
|
from gi.repository import Gtk
|
||||||
|
|
||||||
|
from .view import View
|
||||||
|
from yms import gtkutils, combobox, treeview
|
||||||
|
from yms.model import cable
|
||||||
|
|
||||||
|
class CablesView(View):
|
||||||
|
|
||||||
|
def __init__(self, context):
|
||||||
|
super().__init__(context, _("Cables"), "cables.ui")
|
||||||
|
|
||||||
|
self.cable = cable.Cable(context.db) # current record
|
||||||
|
self.newrecord = False
|
||||||
|
|
||||||
|
self.lst_cables = Gtk.ListStore(int, str, str)
|
||||||
|
sql = (
|
||||||
|
"SELECT cableid, cablename, cablecond "
|
||||||
|
"FROM cable "
|
||||||
|
"WHERE vid=%s "
|
||||||
|
"ORDER BY cableid"
|
||||||
|
)
|
||||||
|
self.db.dcur.execute(sql, (context.vessel.vid,))
|
||||||
|
for row in self.db.dcur.fetchall():
|
||||||
|
data = (
|
||||||
|
row['cableid'],
|
||||||
|
row['cablename'],
|
||||||
|
row['cablecond']
|
||||||
|
)
|
||||||
|
self.lst_cables.append(data)
|
||||||
|
|
||||||
|
treeview.add_column(self.tree['cables'], _('ID'), 0)
|
||||||
|
treeview.add_column(self.tree['cables'], _('Name'), 1)
|
||||||
|
treeview.add_column(self.tree['cables'], _('Condition'), 2)
|
||||||
|
self.tree['cables'].set_model(self.lst_cables)
|
||||||
|
|
||||||
|
# buttons on list page
|
||||||
|
def on_but_new_clicked(self, widget):
|
||||||
|
self.topwidget.set_visible_child(self.box['cable_edit'])
|
||||||
|
|
||||||
|
def on_but_edit_clicked(self, widget):
|
||||||
|
self.topwidget.set_visible_child(self.box['cable_edit'])
|
||||||
|
|
||||||
|
def on_but_detail_clicked(self, widget):
|
||||||
|
self.topwidget.set_visible_child(self.box['cable_detail'])
|
||||||
|
|
||||||
|
# buttons on detail page
|
||||||
|
# edit2 uses edit callback
|
||||||
|
def on_but_close_clicked(self, widget):
|
||||||
|
self.topwidget.set_visible_child(self.box['cables'])
|
||||||
|
|
||||||
|
def on_but_delete_clicked(self, widget):
|
||||||
|
self.topwidget.set_visible_child(self.box['cables'])
|
||||||
|
|
||||||
|
# buttons on edit page
|
||||||
|
def on_but_save_clicked(self, widget):
|
||||||
|
pass
|
||||||
|
|
||||||
|
def on_but_cancel_clicked(self, widget):
|
||||||
|
self.topwidget.set_visible_child(self.box['cables'])
|
||||||
|
|
||||||
|
def display_record(self):
|
||||||
|
pass
|
||||||
|
|
||||||
|
def edit_record(self):
|
||||||
|
pass
|
||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user