]> git.mxchange.org Git - jjobs-war.git/commitdiff
Continued with land-line and fax numbers: (please cherry-pick)
authorRoland Häder <roland@mxchange.org>
Tue, 16 Aug 2016 14:08:48 +0000 (16:08 +0200)
committerRoland Haeder <roland@mxchange.org>
Sun, 21 Aug 2016 18:18:42 +0000 (20:18 +0200)
- added "all" (?) JSF pages for administrative land-line/fax number pages
- added admin menus for fax/land-line number listing
- added navigation rules
- added more class (controller=managed bean) fields for fax/land-line
- implemented method allFaxNumberContacts()
- implemented method allLandLineNumberContacts()
- implemented method allNonLinkedFaxNumbers()
- implemented method allNonLinkedLandLineNumbers()
- some methods had been renamed (cellphone -> mobile)
- added missing i18n strings
- renamed some i18n strings as they can be generic (for all 3 types)

Signed-off-by: Roland Häder <roland@mxchange.org>
34 files changed:
src/java/de/chotime/landingpage/converter/fax/LandingFaxConverter.java [new file with mode: 0644]
src/java/de/chotime/landingpage/converter/landline/LandingLandLineConverter.java [new file with mode: 0644]
src/java/org/mxchange/jjobs/beans/contact/JobsContactWebSessionBean.java
src/java/org/mxchange/jjobs/beans/contact/phone/JobsContactPhoneWebSessionBean.java
src/java/org/mxchange/jjobs/beans/contact/phone/JobsContactPhoneWebSessionController.java
src/java/org/mxchange/jjobs/beans/phone/JobsAdminPhoneWebRequestBean.java
src/java/org/mxchange/jjobs/beans/phone/JobsAdminPhoneWebRequestController.java
src/java/org/mxchange/localization/bundle_de_DE.properties
src/java/org/mxchange/localization/bundle_en_US.properties
web/WEB-INF/faces-config.xml
web/WEB-INF/templates/admin/admin_menu.tpl
web/WEB-INF/templates/admin/fax/admin_fax_add_show.tpl [new file with mode: 0644]
web/WEB-INF/templates/admin/fax/admin_fax_data.tpl [new file with mode: 0644]
web/WEB-INF/templates/admin/fax/admin_fax_links.tpl [new file with mode: 0644]
web/WEB-INF/templates/admin/fax/admin_form_add_contact_fax.tpl [new file with mode: 0644]
web/WEB-INF/templates/admin/fax/admin_form_fax_data.tpl [new file with mode: 0644]
web/WEB-INF/templates/admin/landline/admin_form_add_contact_landline.tpl [new file with mode: 0644]
web/WEB-INF/templates/admin/landline/admin_form_landline_data.tpl [new file with mode: 0644]
web/WEB-INF/templates/admin/landline/admin_landline_add_show.tpl [new file with mode: 0644]
web/WEB-INF/templates/admin/landline/admin_landline_data.tpl [new file with mode: 0644]
web/WEB-INF/templates/admin/landline/admin_landline_links.tpl [new file with mode: 0644]
web/WEB-INF/templates/admin/mobile/admin_form_mobile_data.tpl
web/WEB-INF/templates/admin/mobile/admin_mobile_data.tpl
web/admin/fax/admin_contact_fax_unlink.xhtml [new file with mode: 0644]
web/admin/fax/admin_fax_delete.xhtml [new file with mode: 0644]
web/admin/fax/admin_fax_edit.xhtml [new file with mode: 0644]
web/admin/fax/admin_fax_list.xhtml [new file with mode: 0644]
web/admin/fax/admin_fax_show.xhtml [new file with mode: 0644]
web/admin/landline/admin_contact_landline_unlink.xhtml [new file with mode: 0644]
web/admin/landline/admin_landline_delete.xhtml [new file with mode: 0644]
web/admin/landline/admin_landline_edit.xhtml [new file with mode: 0644]
web/admin/landline/admin_landline_list.xhtml [new file with mode: 0644]
web/admin/landline/admin_landline_show.xhtml [new file with mode: 0644]
web/admin/mobile/admin_mobile_list.xhtml

diff --git a/src/java/de/chotime/landingpage/converter/fax/LandingFaxConverter.java b/src/java/de/chotime/landingpage/converter/fax/LandingFaxConverter.java
new file mode 100644 (file)
index 0000000..28a6c52
--- /dev/null
@@ -0,0 +1,121 @@
+/*
+ * Copyright (C) 2016 Cho-Time GmbH
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Affero General Public License as
+ * published by the Free Software Foundation, either version 3 of the
+ * License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU Affero General Public License for more details.
+ *
+ * You should have received a copy of the GNU Affero General Public License
+ * along with this program.  If not, see <http://www.gnu.org/licenses/>.
+ */
+package de.chotime.landingpage.converter.fax;
+
+import java.text.MessageFormat;
+import javax.faces.component.UIComponent;
+import javax.faces.context.FacesContext;
+import javax.faces.convert.Converter;
+import javax.faces.convert.ConverterException;
+import javax.faces.convert.FacesConverter;
+import javax.naming.Context;
+import javax.naming.InitialContext;
+import javax.naming.NamingException;
+import org.mxchange.jcoreeelogger.beans.local.logger.Log;
+import org.mxchange.jcoreeelogger.beans.local.logger.LoggerBeanLocal;
+import org.mxchange.jphone.exceptions.PhoneEntityNotFoundException;
+import org.mxchange.jphone.phonenumbers.DialableNumber;
+import org.mxchange.jphone.phonenumbers.fax.DialableFaxNumber;
+import org.mxchange.jphone.phonenumbers.phone.PhoneSessionBeanRemote;
+
+/**
+ * Converter for fax id <-> valid fax number instance
+ * <p>
+ * @author Roland Haeder<rhaeder@cho-time.de>
+ */
+@FacesConverter (value = "FaxConverter")
+public class LandingFaxConverter implements Converter {
+
+       /**
+        * Logger instance
+        */
+       @Log
+       private LoggerBeanLocal loggerBeanLocal;
+
+       /**
+        * Phone EJB
+        */
+       private PhoneSessionBeanRemote phoneBean;
+
+       /**
+        * Initialization of this converter
+        */
+       public LandingFaxConverter () {
+               // Try to get it
+               try {
+                       // Get initial context
+                       Context context = new InitialContext();
+
+                       // Lookup logger
+                       this.loggerBeanLocal = (LoggerBeanLocal) context.lookup("java:global/jcore-logger-ejb/logger!org.mxchange.jcoreeelogger.beans.local.logger.LoggerBeanLocal"); //NOI18N
+
+                       // ... and user controller
+                       this.phoneBean = (PhoneSessionBeanRemote) context.lookup("java:global/jlandingpage-ejb/phone!org.mxchange.jphone.phonenumbers.phone.PhoneSessionBeanRemote"); //NOI18N
+               } catch (final NamingException ex) {
+                       // Continue to throw it
+                       throw new RuntimeException(MessageFormat.format("context.lookup() failed: {0}", ex.getMessage()), ex); //NOI18N
+               }
+       }
+
+       @Override
+       public Object getAsObject (final FacesContext context, final UIComponent component, final String submittedValue) {
+               // Is the value null or empty?
+               if ((null == submittedValue) || (submittedValue.trim().isEmpty())) {
+                       // Warning message
+                       this.loggerBeanLocal.logWarning(MessageFormat.format("{0}.getAsObject(): submittedValue is null or empty - EXIT!", this.getClass().getSimpleName())); //NOI18N
+
+                       // Return null
+                       return null;
+               }
+
+               // Init instance
+               DialableFaxNumber faxNumber = null;
+
+               try {
+                       // Try to parse the value as long
+                       Long faxNumberId = Long.valueOf(submittedValue);
+
+                       // Try to get mobile instance from it
+                       faxNumber = this.phoneBean.findFaxNumberById(faxNumberId);
+               } catch (final NumberFormatException ex) {
+                       // Throw again
+                       throw new ConverterException(ex);
+               } catch (final PhoneEntityNotFoundException ex) {
+                       // Debug message
+                       this.loggerBeanLocal.logDebug(MessageFormat.format("{0}.getAsObject(): Exception: {1} - Returning null ...", this.getClass().getSimpleName(), ex)); //NOI18N
+               }
+
+               // Return it
+               return faxNumber;
+       }
+
+       @Override
+       public String getAsString (final FacesContext context, final UIComponent component, final Object value) {
+               // Is the object null?
+               if ((null == value) || ((String.valueOf(value)).isEmpty())) {
+                       // Is null
+                       return ""; //NOI18N
+               } else if (!(value instanceof DialableNumber)) {
+                       // Not same interface
+                       throw new IllegalArgumentException(MessageFormat.format("value {0} does not implement DialableNumber.", value)); //NOI18N
+               }
+
+               // Return category id
+               return String.valueOf(((DialableNumber) value).getPhoneId());
+       }
+
+}
diff --git a/src/java/de/chotime/landingpage/converter/landline/LandingLandLineConverter.java b/src/java/de/chotime/landingpage/converter/landline/LandingLandLineConverter.java
new file mode 100644 (file)
index 0000000..fdf2758
--- /dev/null
@@ -0,0 +1,121 @@
+/*
+ * Copyright (C) 2016 Cho-Time GmbH
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Affero General Public License as
+ * published by the Free Software Foundation, either version 3 of the
+ * License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU Affero General Public License for more details.
+ *
+ * You should have received a copy of the GNU Affero General Public License
+ * along with this program.  If not, see <http://www.gnu.org/licenses/>.
+ */
+package de.chotime.landingpage.converter.landline;
+
+import java.text.MessageFormat;
+import javax.faces.component.UIComponent;
+import javax.faces.context.FacesContext;
+import javax.faces.convert.Converter;
+import javax.faces.convert.ConverterException;
+import javax.faces.convert.FacesConverter;
+import javax.naming.Context;
+import javax.naming.InitialContext;
+import javax.naming.NamingException;
+import org.mxchange.jcoreeelogger.beans.local.logger.Log;
+import org.mxchange.jcoreeelogger.beans.local.logger.LoggerBeanLocal;
+import org.mxchange.jphone.exceptions.PhoneEntityNotFoundException;
+import org.mxchange.jphone.phonenumbers.DialableNumber;
+import org.mxchange.jphone.phonenumbers.landline.DialableLandLineNumber;
+import org.mxchange.jphone.phonenumbers.phone.PhoneSessionBeanRemote;
+
+/**
+ * Converter for land-line id <-> valid land-line number instance
+ * <p>
+ * @author Roland Haeder<rhaeder@cho-time.de>
+ */
+@FacesConverter (value = "LandLineConverter")
+public class LandingLandLineConverter implements Converter {
+
+       /**
+        * Logger instance
+        */
+       @Log
+       private LoggerBeanLocal loggerBeanLocal;
+
+       /**
+        * Phone EJB
+        */
+       private PhoneSessionBeanRemote phoneBean;
+
+       /**
+        * Initialization of this converter
+        */
+       public LandingLandLineConverter () {
+               // Try to get it
+               try {
+                       // Get initial context
+                       Context context = new InitialContext();
+
+                       // Lookup logger
+                       this.loggerBeanLocal = (LoggerBeanLocal) context.lookup("java:global/jcore-logger-ejb/logger!org.mxchange.jcoreeelogger.beans.local.logger.LoggerBeanLocal"); //NOI18N
+
+                       // ... and user controller
+                       this.phoneBean = (PhoneSessionBeanRemote) context.lookup("java:global/jlandingpage-ejb/phone!org.mxchange.jphone.phonenumbers.phone.PhoneSessionBeanRemote"); //NOI18N
+               } catch (final NamingException ex) {
+                       // Continue to throw it
+                       throw new RuntimeException(MessageFormat.format("context.lookup() failed: {0}", ex.getMessage()), ex); //NOI18N
+               }
+       }
+
+       @Override
+       public Object getAsObject (final FacesContext context, final UIComponent component, final String submittedValue) {
+               // Is the value null or empty?
+               if ((null == submittedValue) || (submittedValue.trim().isEmpty())) {
+                       // Warning message
+                       this.loggerBeanLocal.logWarning(MessageFormat.format("{0}.getAsObject(): submittedValue is null or empty - EXIT!", this.getClass().getSimpleName())); //NOI18N
+
+                       // Return null
+                       return null;
+               }
+
+               // Init instance
+               DialableLandLineNumber landLineNumber = null;
+
+               try {
+                       // Try to parse the value as long
+                       Long landLineNumberId = Long.valueOf(submittedValue);
+
+                       // Try to get mobile instance from it
+                       landLineNumber = this.phoneBean.findLandLineNumberById(landLineNumberId);
+               } catch (final NumberFormatException ex) {
+                       // Throw again
+                       throw new ConverterException(ex);
+               } catch (final PhoneEntityNotFoundException ex) {
+                       // Debug message
+                       this.loggerBeanLocal.logDebug(MessageFormat.format("{0}.getAsObject(): Exception: {1} - Returning null ...", this.getClass().getSimpleName(), ex)); //NOI18N
+               }
+
+               // Return it
+               return landLineNumber;
+       }
+
+       @Override
+       public String getAsString (final FacesContext context, final UIComponent component, final Object value) {
+               // Is the object null?
+               if ((null == value) || ((String.valueOf(value)).isEmpty())) {
+                       // Is null
+                       return ""; //NOI18N
+               } else if (!(value instanceof DialableNumber)) {
+                       // Not same interface
+                       throw new IllegalArgumentException(MessageFormat.format("value {0} does not implement DialableNumber.", value)); //NOI18N
+               }
+
+               // Return category id
+               return String.valueOf(((DialableNumber) value).getPhoneId());
+       }
+
+}
index 2f0e7ef957eeab2c79c90b3122523024c1753343..f0e11841f793733441fd4d3b323408ea48b32d84 100644 (file)
@@ -970,10 +970,10 @@ public class JobsContactWebSessionBean extends BaseJobsController implements Job
                if (null == event) {
                        // Throw NPE
                        throw new NullPointerException("event is null"); //NOI18N
-               } else if (event.getCellphoneList() == null) {
+               } else if (event.getMobileNumberList() == null) {
                        // Throw NPE again
                        throw new NullPointerException("event.mobileList is null"); //NOI18N
-               } else if (event.getCellphoneList().isEmpty()) {
+               } else if (event.getMobileNumberList().isEmpty()) {
                        // List is empty, no need to check
                        return;
                }
@@ -981,9 +981,9 @@ public class JobsContactWebSessionBean extends BaseJobsController implements Job
                // Check all entries
                for (final Contact contact : this.contactList) {
                        // Is the mobile instance set and in list?
-                       if ((contact.getContactMobileNumber() instanceof DialableMobileNumber) && (event.getCellphoneList().contains(contact.getContactMobileNumber()))) {
+                       if ((contact.getContactMobileNumber() instanceof DialableMobileNumber) && (event.getMobileNumberList().contains(contact.getContactMobileNumber()))) {
                                // Found it, so remvoe it from list
-                               event.getCellphoneList().remove(contact.getContactMobileNumber());
+                               event.getMobileNumberList().remove(contact.getContactMobileNumber());
                        }
                }
        }
index 0f156a448ab211600db205d4f8cfcfa57a558c41..6065ddccf7d41c4614c5ab50c326d57733b0efac 100644 (file)
@@ -34,6 +34,8 @@ import org.mxchange.jcontacts.events.contact.add.AdminAddedContactEvent;
 import org.mxchange.jcontacts.events.contact.update.AdminUpdatedContactEvent;
 import org.mxchange.jcontacts.events.mobile.unlinked.AdminUnlinkedMobileNumberEvent;
 import org.mxchange.jphone.phonenumbers.DialableNumber;
+import org.mxchange.jphone.phonenumbers.fax.DialableFaxNumber;
+import org.mxchange.jphone.phonenumbers.landline.DialableLandLineNumber;
 import org.mxchange.jphone.phonenumbers.mobile.DialableMobileNumber;
 import org.mxchange.jusercore.events.user.add.AdminAddedUserEvent;
 
@@ -65,8 +67,8 @@ public class JobsContactPhoneWebSessionBean extends BaseLandingController implem
 
        /**
         * "Cache" for contact's mobile, land-line and fax numbers. Currently one
-        * one per each type is supported. Maybe later this will change into a
-        * OneToMany relationship (one contact, many numbers).
+        * per each type is supported. Maybe later this will change into a OneToMany
+        * relationship (one contact, many numbers).
         */
        private final Map<DialableNumber, List<Contact>> contacts;
 
@@ -165,6 +167,66 @@ public class JobsContactPhoneWebSessionBean extends BaseLandingController implem
                this.clear();
        }
 
+       @Override
+       public List<Contact> allFaxNumberContacts () {
+               // Get id
+               DialableFaxNumber faxNumber = this.beanHelper.getFaxNumber();
+
+               // Is cache there?
+               if (this.contacts.containsKey(faxNumber)) {
+                       // Return cached version
+                       return this.contacts.get(faxNumber);
+               } else {
+                       // Ask bean
+                       List<Contact> list = new LinkedList<>();
+
+                       // "Walk" through all contacts
+                       for (final Contact contact : this.contactController.allContacts()) {
+                               // Is mobile instance the same?
+                               if (Objects.equals(contact.getContactFaxNumber(), this.beanHelper.getFaxNumber())) {
+                                       // Found one
+                                       list.add(contact);
+                               }
+                       }
+
+                       // Store result in cache
+                       this.contacts.put(faxNumber, list);
+
+                       // Return now-cached list
+                       return list;
+               }
+       }
+
+       @Override
+       public List<Contact> allLandLineNumberContacts () {
+               // Get id
+               DialableLandLineNumber landLineNumber = this.beanHelper.getLandLineNumber();
+
+               // Is cache there?
+               if (this.contacts.containsKey(landLineNumber)) {
+                       // Return cached version
+                       return this.contacts.get(landLineNumber);
+               } else {
+                       // Ask bean
+                       List<Contact> list = new LinkedList<>();
+
+                       // "Walk" through all contacts
+                       for (final Contact contact : this.contactController.allContacts()) {
+                               // Is mobile instance the same?
+                               if (Objects.equals(contact.getContactLandLineNumber(), this.beanHelper.getLandLineNumber())) {
+                                       // Found one
+                                       list.add(contact);
+                               }
+                       }
+
+                       // Store result in cache
+                       this.contacts.put(landLineNumber, list);
+
+                       // Return now-cached list
+                       return list;
+               }
+       }
+
        @Override
        public List<Contact> allMobileNumberContacts () {
                // Get id
index 9a8f06ccd3631697b6bf1ffe8d7a7776c12ed189..9fb14699b353a33c41b7e16ad179696d0bfc21e7 100644 (file)
@@ -33,6 +33,20 @@ import org.mxchange.jusercore.events.user.add.AdminAddedUserEvent;
 @Local
 public interface JobsContactPhoneWebSessionController extends Serializable {
 
+       /**
+        * Getter for all contacts having current fax number linked
+        * <p>
+        * @return List of all linked contacts
+        */
+       List<Contact> allFaxNumberContacts ();
+
+       /**
+        * Getter for all contacts having current land-line number linked
+        * <p>
+        * @return List of all linked contacts
+        */
+       List<Contact> allLandLineNumberContacts ();
+
        /**
         * Getter for all contacts having current mobile number linked
         * <p>
index 239ccb6bfbed5ed420fd86a8b505ee0945269eea..b05a7ea395f10f7554daad14da5a9ece62945d68 100644 (file)
@@ -30,12 +30,18 @@ import javax.naming.InitialContext;
 import javax.naming.NamingException;
 import org.mxchange.jjobs.beans.BaseJobsController;
 import org.mxchange.jjobs.beans.helper.JobsWebRequestController;
+import org.mxchange.jphone.events.fax.removed.AdminFaxNumberRemovedFromListEvent;
+import org.mxchange.jphone.events.fax.removed.AdminRemoveFaxNumberFromListEvent;
+import org.mxchange.jphone.events.landline.removed.AdminLandLineNumberRemovedFromListEvent;
+import org.mxchange.jphone.events.landline.removed.AdminRemoveLandLineNumberFromListEvent;
 import org.mxchange.jphone.events.mobile.deleted.AdminDeletedMobileNumberEvent;
 import org.mxchange.jphone.events.mobile.deleted.AdminMobileNumberDeletedEvent;
 import org.mxchange.jphone.events.mobile.remove.AdminMobileNumberRemovedFromListEvent;
 import org.mxchange.jphone.events.mobile.remove.AdminRemoveMobileNumberFromListEvent;
 import org.mxchange.jphone.events.mobile.updated.AdminMobileNumberUpdatedEvent;
 import org.mxchange.jphone.events.mobile.updated.AdminUpdatedMobileNumberEvent;
+import org.mxchange.jphone.phonenumbers.fax.DialableFaxNumber;
+import org.mxchange.jphone.phonenumbers.landline.DialableLandLineNumber;
 import org.mxchange.jphone.phonenumbers.mobile.DialableMobileNumber;
 import org.mxchange.jphone.phonenumbers.mobileprovider.MobileProvider;
 import org.mxchange.jphone.phonenumbers.phone.AdminPhoneSessionBeanRemote;
@@ -65,6 +71,21 @@ public class JobsAdminPhoneWebRequestBean extends BaseJobsController implements
        @Inject
        private JobsWebRequestController beanHelper;
 
+       /**
+        * Choosen land-line number
+        */
+       private DialableLandLineNumber choosenLandLineNumber;
+
+       /**
+        * Choosen mobile number
+        */
+       private DialableMobileNumber choosenMobileNumber;
+
+       /**
+        * (Entered) mobile number
+        */
+       private Long mobileNumber;
+
        /**
         * Event being fired when an administrator has deleted mobile number
         */
@@ -79,16 +100,6 @@ public class JobsAdminPhoneWebRequestBean extends BaseJobsController implements
        @Any
        private Event<AdminUpdatedMobileNumberEvent> mobileNumberUpdatedEvent;
 
-       /**
-        * Choosen mobile number
-        */
-       private DialableMobileNumber choosenMobileNumber;
-
-       /**
-        * (Entered) mobile number
-        */
-       private Long mobileNumber;
-
        /**
         * Mobile provider
         */
@@ -105,13 +116,29 @@ public class JobsAdminPhoneWebRequestBean extends BaseJobsController implements
         */
        private Long phoneNumber;
 
+       /**
+        * Event being fired when a list of all unsed fax numbers is being
+        * created.
+        */
+       @Inject
+       @Any
+       private Event<AdminRemoveFaxNumberFromListEvent> removeLinkedFaxNumbersEvent;
+
+       /**
+        * Event being fired when a list of all unsed land-line numbers is being
+        * created.
+        */
+       @Inject
+       @Any
+       private Event<AdminRemoveLandLineNumberFromListEvent> removeLinkedLandLineNumbersEvent;
+
        /**
         * Event being fired when a list of all unsed mobile numbers is being
         * created.
         */
        @Inject
        @Any
-       private Event<AdminRemoveMobileNumberFromListEvent> removeLinkedCellphoneNumbersEvent;
+       private Event<AdminRemoveMobileNumberFromListEvent> removeLinkedMobileNumbersEvent;
 
        /**
         * Default constructor
@@ -130,13 +157,37 @@ public class JobsAdminPhoneWebRequestBean extends BaseJobsController implements
                }
        }
 
+       @Override
+       public List<DialableFaxNumber> allNonLinkedFaxNumbers () {
+               // Get list of all mobile numbers
+               List<DialableFaxNumber> list = this.phoneController.allFaxNumbers();
+
+               // Visit all controllers to reduce the list
+               this.removeLinkedFaxNumbersEvent.fire(new AdminFaxNumberRemovedFromListEvent(list));
+
+               // Return it
+               return list;
+       }
+
+       @Override
+       public List<DialableLandLineNumber> allNonLinkedLandLineNumbers () {
+               // Get list of all mobile numbers
+               List<DialableLandLineNumber> list = this.phoneController.allLandLineNumbers();
+
+               // Visit all controllers to reduce the list
+               this.removeLinkedLandLineNumbersEvent.fire(new AdminLandLineNumberRemovedFromListEvent(list));
+
+               // Return it
+               return list;
+       }
+
        @Override
        public List<DialableMobileNumber> allNonLinkedMobileNumbers () {
                // Get list of all mobile numbers
                List<DialableMobileNumber> list = this.phoneController.allMobileNumbers();
 
                // Visit all controllers to reduce the list
-               this.removeLinkedCellphoneNumbersEvent.fire(new AdminMobileNumberRemovedFromListEvent(list));
+               this.removeLinkedMobileNumbersEvent.fire(new AdminMobileNumberRemovedFromListEvent(list));
 
                // Return it
                return list;
@@ -244,6 +295,16 @@ public class JobsAdminPhoneWebRequestBean extends BaseJobsController implements
                return "admin_edit_mobile?faces-redirect=true&includeViewParams=true"; //NOI18N
        }
 
+       @Override
+       public DialableLandLineNumber getChoosenLandLineNumber () {
+               return this.choosenLandLineNumber;
+       }
+
+       @Override
+       public void setChoosenLandLineNumber (final DialableLandLineNumber choosenLandLineNumber) {
+               this.choosenLandLineNumber = choosenLandLineNumber;
+       }
+
        @Override
        public DialableMobileNumber getChoosenMobileNumber () {
                return this.choosenMobileNumber;
index cab34861b32981fb114a2d775738773a899ac933..7af1d526ebabed3256f393e00fffc77a0070abf5 100644 (file)
@@ -19,6 +19,8 @@ package org.mxchange.jjobs.beans.phone;
 import java.io.Serializable;
 import java.util.List;
 import javax.ejb.Local;
+import org.mxchange.jphone.phonenumbers.fax.DialableFaxNumber;
+import org.mxchange.jphone.phonenumbers.landline.DialableLandLineNumber;
 import org.mxchange.jphone.phonenumbers.mobile.DialableMobileNumber;
 import org.mxchange.jphone.phonenumbers.mobileprovider.MobileProvider;
 
@@ -38,6 +40,20 @@ public interface JobsAdminPhoneWebRequestController extends Serializable {
         */
        List<DialableMobileNumber> allNonLinkedMobileNumbers ();
 
+       /**
+        * Returns a list of all unused ("non-linked") land-line numbers
+        * <p>
+        * @return List with all unused land-line numbers
+        */
+       List<DialableFaxNumber> allNonLinkedFaxNumbers ();
+
+       /**
+        * Returns a list of all unused ("non-linked") land-line numbers
+        * <p>
+        * @return List with all unused land-line numbers
+        */
+       List<DialableLandLineNumber> allNonLinkedLandLineNumbers ();
+
        /**
         * Deletes given mobile entry data
         * <p>
@@ -80,6 +96,20 @@ public interface JobsAdminPhoneWebRequestController extends Serializable {
         */
        void setChoosenMobileNumber (final DialableMobileNumber choosenMobileNumber);
 
+       /**
+        * Getter for choosen land-line number
+        * <p>
+        * @return Choosen land-line number
+        */
+       DialableLandLineNumber getChoosenLandLineNumber ();
+
+       /**
+        * Setter for choosen land-line number
+        * <p>
+        * @param choosenLandLineNumber Choosen land-line number
+        */
+       void setChoosenLandLineNumber (final DialableLandLineNumber choosenLandLineNumber);
+
        /**
         * Getter for mobile number
         * <p>
index f0f69c5e92686b4207dc4a8279ec92d73c7594a4..7acabae08cdbfbc896bdcab8424dc127be719ece 100644 (file)
@@ -393,7 +393,7 @@ ADMIN_LINK_DELETE_USER_TITLE=L\u00f6scht das Benutzeraccount (nach Best\u00e4tig
 CONTENT_TITLE_ADMIN_DELETE_USER=Benutzeraccount l\u00f6schen:
 PAGE_TITLE_ADMIN_DELETE_USER=Benutzeraccount l\u00f6schen
 ADMIN_HEADER_SHOW_MOBILE_DATA=Daten des Mobiltelefons:
-ADMIN_SHOW_MOBILE_ID=Id-Nummer:
+ADMIN_SHOW_PHONE_ID=Id-Nummer:
 ADMIN_SHOW_MOBILE_PROVIDER_NAME=Mobilanbieter:
 ADMIN_SHOW_MOBILE_NUMBER_COMPLETE=Komplette Nummer:
 ADMIN_SHOW_MOBILE_LINKS=Administrative Links:
@@ -603,8 +603,8 @@ ADMIN_LIST_MOBILE_EMPTY=Es sind keine Mobilfunknummern gespeichert.
 ADMIN_MENU_PHONE_NUMBERS_TITLE=Telefonnummern:
 LINK_ADMIN_LIST_MOBILE_PHONE_NUMBERS=Handynummern ...
 LINK_ADMIN_LIST_MOBILE_PHONE_NUMBERS_TITLE=Alle Mobilfunknummern auflisten.
-ADMIN_SHOW_MOBILE_CREATED=Erstellt:
-ADMIN_SHOW_MOBILE_UPDATED=Zuletzt ge\u00e4ndert:
+ADMIN_SHOW_PHONE_CREATED=Erstellt:
+ADMIN_SHOW_PHONE_UPDATED=Zuletzt ge\u00e4ndert:
 ADMIN_EDIT_MOBILE_TITLE=Mobiltelefoneintrag editieren:
 ADMIN_MOBILE_DATA_LEGEND=Mobiltelefonnummerdaten editeren:
 ADMIN_EDIT_MOBILE_PROVIDER=Mobilfunkanbieter \u00e4ndern:
@@ -646,3 +646,13 @@ ADMIN_SELECT_MOBILE=Mobilfunknummer ausw\u00e4hlen:
 BUTTON_ADMIN_LINK_ADD_CONTACT_MOBILE=Mobilfunknummer zum Kontakt hinzuf\u00fcgen
 ADMIN_OR_ENTER_CONTACT_NEW_MOBILE_DATA=... oder neue Mobilfunknummer eingeben:
 ERROR_USER_EMAIL_ADDRESS_NOT_FOUND=Die eingegebene Email-Addresse konnte nicht gefunden werden.
+LINK_ADMIN_LIST_LAND_LINE_PHONE_NUMBERS=Festnetznummern ...
+LINK_ADMIN_LIST_LAND_LINE_PHONE_NUMBERS_TITLE=Listet alle Festnetznummern auf.
+LINK_ADMIN_LIST_FAX_PHONE_NUMBERS=Faxnummern ...
+LINK_ADMIN_LIST_FAX_PHONE_NUMBERS_TITLE=Listet alle Faxnummern auf.
+ADMIN_LIST_FAX_EMPTY=Es sind keine Faxnummern gelistet.
+PAGE_TITLE_ADMIN_LIST_CONTACT_FAX=Faxnummern auflisten
+CONTENT_TITLE_ADMIN_LIST_CONTACT_FAX=Faxnummern auflisten:
+PAGE_TITLE_ADMIN_LIST_CONTACT_LAND_LINE=Festnetznummern auflisten
+CONTENT_TITLE_ADMIN_LIST_CONTACT_LAND_LINE=Festnetznummern auflisten:
+ADMIN_SHOW_PHONE_NUMBER=Festnetznummer:
index a6f09503c22ae2b95fd426a4fd238578cb756db2..19a3711ab99fb157d9e6c7a87d486cc7b1f26eda 100644 (file)
@@ -376,7 +376,7 @@ ADMIN_LINK_DELETE_USER_TITLE=Deletes user account (after confirmation).
 CONTENT_TITLE_ADMIN_DELETE_USER=Delete user account:
 PAGE_TITLE_ADMIN_DELETE_USER=Delete user account
 ADMIN_HEADER_SHOW_MOBILE_DATA=Data of mobile phone:
-ADMIN_SHOW_MOBILE_ID=Id number:
+ADMIN_SHOW_PHONE_ID=Id number:
 ADMIN_SHOW_MOBILE_PROVIDER_NAME=Mobile provider:
 ADMIN_SHOW_MOBILE_NUMBER_COMPLETE=Complete number:
 ADMIN_SHOW_MOBILE_LINKS=Administrative links:
@@ -603,8 +603,8 @@ ADMIN_LIST_MOBILE_EMPTY=No mobile numbers are saved.
 ADMIN_MENU_PHONE_NUMBERS_TITLE=Phone numbers:
 LINK_ADMIN_LIST_MOBILE_PHONE_NUMBERS=Cell phone numbers ...
 LINK_ADMIN_LIST_MOBILE_PHONE_NUMBERS_TITLE=List all mobile numbers.
-ADMIN_SHOW_MOBILE_CREATED=Created:
-ADMIN_SHOW_MOBILE_UPDATED=Last changed:
+ADMIN_SHOW_PHONE_CREATED=Created:
+ADMIN_SHOW_PHONE_UPDATED=Last changed:
 ADMIN_EDIT_MOBILE_TITLE=Edit mobile entry:
 ADMIN_MOBILE_DATA_LEGEND=Edit mobile data:
 ADMIN_EDIT_MOBILE_PROVIDER=Change mobile phone provider:
@@ -646,3 +646,13 @@ ADMIN_SELECT_MOBILE=Choose mobile number:
 BUTTON_ADMIN_LINK_ADD_CONTACT_MOBILE=Add mobile number to contact
 ADMIN_OR_ENTER_CONTACT_NEW_MOBILE_DATA=... or add new mobile number:
 ERROR_USER_EMAIL_ADDRESS_NOT_FOUND=Your entered email address could not befound.
+LINK_ADMIN_LIST_LAND_LINE_PHONE_NUMBERS=Land-line numbers ...
+LINK_ADMIN_LIST_LAND_LINE_PHONE_NUMBERS_TITLE=Lists all land-line numbers.
+LINK_ADMIN_LIST_FAX_PHONE_NUMBERS=Fax numbers ...
+LINK_ADMIN_LIST_FAX_PHONE_NUMBERS_TITLE=Lists all fax numbers.
+ADMIN_LIST_FAX_EMPTY=There are no fax numbers listed.
+PAGE_TITLE_ADMIN_LIST_CONTACT_FAX=List fax numbers
+CONTENT_TITLE_ADMIN_LIST_CONTACT_FAX=List fax numbers:
+PAGE_TITLE_ADMIN_LIST_CONTACT_LAND_LINE=List land-line numbers
+CONTENT_TITLE_ADMIN_LIST_CONTACT_LAND_LINE=List land-line numbers:
+ADMIN_SHOW_PHONE_NUMBER=Land-line number:
index 8ff914f5d4118ff7746e725b01b4f05cc595bd83..9375fd1da880c85196c6236c7956e491d0adbd2e 100644 (file)
                        <from-outcome>user_profile</from-outcome>
                        <to-view-id>/user/user_profile.xhtml</to-view-id>
                </navigation-case>
+               <navigation-case>
+                       <from-outcome>admin_list_fax</from-outcome>
+                       <to-view-id>/admin/fax/admin_fax_list.xhtml</to-view-id>
+               </navigation-case>
+               <navigation-case>
+                       <from-outcome>admin_list_landline</from-outcome>
+                       <to-view-id>/admin/landline/admin_landline_list.xhtml</to-view-id>
+               </navigation-case>
                <navigation-case>
                        <from-outcome>admin_list_mobile</from-outcome>
                        <to-view-id>/admin/mobile/admin_mobile_list.xhtml</to-view-id>
                        <from-outcome>admin_list_mobile_provider</from-outcome>
                        <to-view-id>/admin/mobile_provider/admin_mobile_provider_list.xhtml</to-view-id>
                </navigation-case>
+               <navigation-case>
+                       <from-outcome>admin_list_contact_fax</from-outcome>
+                       <to-view-id>/admin/fax/admin_contact_fax_list.xhtml</to-view-id>
+               </navigation-case>
+               <navigation-case>
+                       <from-outcome>admin_list_contact_landline</from-outcome>
+                       <to-view-id>/admin/landline/admin_contact_landline_list.xhtml</to-view-id>
+               </navigation-case>
                <navigation-case>
                        <from-outcome>admin_list_contact_mobile</from-outcome>
                        <to-view-id>/admin/mobile/admin_contact_mobile_list.xhtml</to-view-id>
                        <from-outcome>admin_show_mobile_provider</from-outcome>
                        <to-view-id>/admin/mobile_provider/admin_mobile_provider_show.xhtml</to-view-id>
                </navigation-case>
+               <navigation-case>
+                       <from-outcome>admin_edit_fax</from-outcome>
+                       <to-view-id>/admin/fax/admin_fax_edit.xhtml</to-view-id>
+               </navigation-case>
+               <navigation-case>
+                       <from-outcome>admin_delete_fax</from-outcome>
+                       <to-view-id>/admin/fax/admin_fax_delete.xhtml</to-view-id>
+               </navigation-case>
+               <navigation-case>
+                       <from-outcome>admin_unlink_contact_fax</from-outcome>
+                       <to-view-id>/admin/fax/admin_contact_fax_unlink.xhtml</to-view-id>
+               </navigation-case>
+               <navigation-case>
+                       <from-outcome>admin_show_fax</from-outcome>
+                       <to-view-id>/admin/fax/admin_fax_show.xhtml</to-view-id>
+               </navigation-case>
+               <navigation-case>
+                       <from-outcome>admin_edit_landline</from-outcome>
+                       <to-view-id>/admin/landline/admin_landline_edit.xhtml</to-view-id>
+               </navigation-case>
+               <navigation-case>
+                       <from-outcome>admin_delete_landline</from-outcome>
+                       <to-view-id>/admin/landline/admin_landline_delete.xhtml</to-view-id>
+               </navigation-case>
+               <navigation-case>
+                       <from-outcome>admin_unlink_contact_landline</from-outcome>
+                       <to-view-id>/admin/landline/admin_contact_landline_unlink.xhtml</to-view-id>
+               </navigation-case>
+               <navigation-case>
+                       <from-outcome>admin_show_landline</from-outcome>
+                       <to-view-id>/admin/landline/admin_landline_show.xhtml</to-view-id>
+               </navigation-case>
                <navigation-case>
                        <from-outcome>admin_edit_mobile</from-outcome>
                        <to-view-id>/admin/mobile/admin_mobile_edit.xhtml</to-view-id>
                        <to-view-id>/admin/mobile/admin_mobile_show.xhtml</to-view-id>
                </navigation-case>
        </navigation-rule>
+       <navigation-rule>
+               <from-view-id>/admin/fax/admin_fax_list.xhtml</from-view-id>
+               <navigation-case>
+                       <from-outcome>admin_show_fax</from-outcome>
+                       <to-view-id>/admin/fax/admin_fax_show.xhtml</to-view-id>
+               </navigation-case>
+               <navigation-case>
+                       <from-outcome>admin_edit_fax</from-outcome>
+                       <to-view-id>/admin/fax/admin_fax_edit.xhtml</to-view-id>
+               </navigation-case>
+               <navigation-case>
+                       <from-outcome>admin_delete_fax</from-outcome>
+                       <to-view-id>/admin/fax/admin_fax_delete.xhtml</to-view-id>
+               </navigation-case>
+       </navigation-rule>
+       <navigation-rule>
+               <from-view-id>/admin/landline/admin_landline_list.xhtml</from-view-id>
+               <navigation-case>
+                       <from-outcome>admin_show_landline</from-outcome>
+                       <to-view-id>/admin/landline/admin_landline_show.xhtml</to-view-id>
+               </navigation-case>
+               <navigation-case>
+                       <from-outcome>admin_edit_landline</from-outcome>
+                       <to-view-id>/admin/landline/admin_landline_edit.xhtml</to-view-id>
+               </navigation-case>
+               <navigation-case>
+                       <from-outcome>admin_delete_landline</from-outcome>
+                       <to-view-id>/admin/landline/admin_landline_delete.xhtml</to-view-id>
+               </navigation-case>
+       </navigation-rule>
        <navigation-rule>
                <from-view-id>/admin/mobile/admin_mobile_list.xhtml</from-view-id>
                <navigation-case>
                        <to-view-id>/admin/mobile/admin_mobile_delete.xhtml</to-view-id>
                </navigation-case>
        </navigation-rule>
+       <navigation-rule>
+               <from-view-id>/admin/fax/admin_fax_show.xhtml</from-view-id>
+               <navigation-case>
+                       <from-outcome>admin_edit_fax</from-outcome>
+                       <to-view-id>/admin/fax/admin_fax_edit.xhtml</to-view-id>
+               </navigation-case>
+               <navigation-case>
+                       <from-outcome>admin_delete_fax</from-outcome>
+                       <to-view-id>/admin/fax/admin_fax_delete.xhtml</to-view-id>
+               </navigation-case>
+               <navigation-case>
+                       <from-outcome>admin_unlink_contact_fax</from-outcome>
+                       <to-view-id>/admin/fax/admin_contact_fax_unlink.xhtml</to-view-id>
+               </navigation-case>
+               <navigation-case>
+                       <from-outcome>admin_show_contact</from-outcome>
+                       <to-view-id>/admin/contact/admin_contact_show.xhtml</to-view-id>
+               </navigation-case>
+       </navigation-rule>
+       <navigation-rule>
+               <from-view-id>/admin/landline/admin_landline_show.xhtml</from-view-id>
+               <navigation-case>
+                       <from-outcome>admin_edit_landline</from-outcome>
+                       <to-view-id>/admin/landline/admin_landline_edit.xhtml</to-view-id>
+               </navigation-case>
+               <navigation-case>
+                       <from-outcome>admin_delete_landline</from-outcome>
+                       <to-view-id>/admin/landline/admin_landline_delete.xhtml</to-view-id>
+               </navigation-case>
+               <navigation-case>
+                       <from-outcome>admin_unlink_contact_landline</from-outcome>
+                       <to-view-id>/admin/landline/admin_contact_landline_unlink.xhtml</to-view-id>
+               </navigation-case>
+               <navigation-case>
+                       <from-outcome>admin_show_contact</from-outcome>
+                       <to-view-id>/admin/contact/admin_contact_show.xhtml</to-view-id>
+               </navigation-case>
+       </navigation-rule>
        <navigation-rule>
                <from-view-id>/admin/mobile/admin_mobile_show.xhtml</from-view-id>
                <navigation-case>
                        <to-view-id>/admin/mobile_provider/admin_mobile_provider_show.xhtml</to-view-id>
                </navigation-case>
        </navigation-rule>
+       <navigation-rule>
+               <from-view-id>/admin/fax/admin_contact_fax_unlink.xhtml</from-view-id>
+               <navigation-case>
+                       <from-outcome>admin_show_contact</from-outcome>
+                       <to-view-id>/admin/contact/admin_contact_show.xhtml</to-view-id>
+               </navigation-case>
+       </navigation-rule>
+       <navigation-rule>
+               <from-view-id>/admin/landline/admin_contact_landline_unlink.xhtml</from-view-id>
+               <navigation-case>
+                       <from-outcome>admin_show_contact</from-outcome>
+                       <to-view-id>/admin/contact/admin_contact_show.xhtml</to-view-id>
+               </navigation-case>
+       </navigation-rule>
        <navigation-rule>
                <from-view-id>/admin/mobile/admin_contact_mobile_unlink.xhtml</from-view-id>
                <navigation-case>
index 8a96da7ef90fd74e596aa191a9a1259f2cb5e773..731c3bf8d1a9d1344e1427bf496b925d5db20024 100644 (file)
@@ -37,7 +37,9 @@
                        </div>
 
                        <ul>
+                               <li><h:link title="#{msg.LINK_ADMIN_LIST_LAND_LINE_PHONE_NUMBERS_TITLE}" outcome="admin_list_landline" value="#{msg.LINK_ADMIN_LIST_LAND_LINE_PHONE_NUMBERS}" /></li>
                                <li><h:link title="#{msg.LINK_ADMIN_LIST_MOBILE_PHONE_NUMBERS_TITLE}" outcome="admin_list_mobile" value="#{msg.LINK_ADMIN_LIST_MOBILE_PHONE_NUMBERS}" /></li>
+                               <li><h:link title="#{msg.LINK_ADMIN_LIST_FAX_PHONE_NUMBERS_TITLE}" outcome="admin_list_fax" value="#{msg.LINK_ADMIN_LIST_FAX_PHONE_NUMBERS}" /></li>
                        </ul>
 
                        <div class="menu_header">
diff --git a/web/WEB-INF/templates/admin/fax/admin_fax_add_show.tpl b/web/WEB-INF/templates/admin/fax/admin_fax_add_show.tpl
new file mode 100644 (file)
index 0000000..0bc92a8
--- /dev/null
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<ui:composition
+       xmlns="http://www.w3.org/1999/xhtml"
+       xmlns:f="http://xmlns.jcp.org/jsf/core"
+       xmlns:h="http://xmlns.jcp.org/jsf/html"
+       xmlns:ui="http://xmlns.jcp.org/jsf/facelets">
+
+       <h:outputText styleClass="errors" value="#{msg.ERROR_BEAN_HELPER_CONTACT_NOT_SET}" rendered="#{empty beanHelper.contact}" />
+
+       <ui:fragment rendered="#{empty beanHelper.contact.contactLandLineNumber and not empty beanHelper.contact}">
+               <ui:include src="/WEB-INF/templates/admin/mobile/admin_form_add_contact_mobile.tpl" />
+       </ui:fragment>
+
+       <ui:fragment rendered="#{not empty beanHelper.contact.contactLandLineNumber and not empty beanHelper.contact}">
+               <ui:include src="/WEB-INF/templates/admin/mobile/admin_mobile_data.tpl" />
+       </ui:fragment>
+</ui:composition>
diff --git a/web/WEB-INF/templates/admin/fax/admin_fax_data.tpl b/web/WEB-INF/templates/admin/fax/admin_fax_data.tpl
new file mode 100644 (file)
index 0000000..4369ce0
--- /dev/null
@@ -0,0 +1,50 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<ui:composition
+       xmlns="http://www.w3.org/1999/xhtml"
+       xmlns:f="http://java.sun.com/jsf/core"
+       xmlns:h="http://java.sun.com/jsf/html"
+       xmlns:ui="http://xmlns.jcp.org/jsf/facelets">
+
+       <h:outputText styleClass="errors" value="#{msg.ERROR_BEAN_HELPER_LAND_LINE_NUMBER_NOT_SET}" rendered="#{empty beanHelper.landLineNumber}" />
+
+       <h:panelGrid id="mobile_data" summary="#{msg.ADMIN_TABLE_SUMMARY_SHOW_MOBILE_DATA}" headerClass="table_header_column" styleClass="table_big" columns="2" rendered="#{not empty beanHelper.landLineNumber}">
+               <f:facet name="header">
+                       <h:outputText value="#{msg.ADMIN_HEADER_SHOW_MOBILE_DATA}" />
+               </f:facet>
+
+               <h:column>
+                       <h:panelGroup>
+                               <h:outputLabel for="landLineNumberId" styleClass="table_data_label" value="#{msg.ADMIN_SHOW_PHONE_ID}" />
+
+                               <h:outputText id="landLineNumberId" styleClass="table_data_field" value="#{beanHelper.landLineNumber.phoneId}" />
+
+                               <h:message for="landLineNumberId" errorClass="errors" fatalClass="errors" warnClass="errors" />
+                       </h:panelGroup>
+               </h:column>
+
+               <h:column>
+                       <h:outputLabel for="mobileProvider" styleClass="table_data_label" value="#{msg.ADMIN_SHOW_MOBILE_PROVIDER_NAME}" />
+
+                       <h:link outcome="admin_show_mobile_provider">
+                               <f:param name="providerId" value="#{beanHelper.landLineNumber.mobileProvider.providerId}" />
+                               <h:outputText id="mobileProvider" styleClass="table_data_field" value="#{beanHelper.landLineNumber.mobileProvider.providerName}" />
+                       </h:link>
+               </h:column>
+
+               <h:column>
+                       <h:outputLabel for="landLineNumber" styleClass="table_data_label" value="#{msg.ADMIN_SHOW_LAND_LINE_NUMBER_COMPLETE}" />
+
+                       <h:outputText id="landLineNumber" styleClass="table_data_field" value="#{beanHelper.landLineNumber.mobileProvider.providerCountry.countryExternalDialPrefix}#{beanHelper.landLineNumber.mobileProvider.providerDialPrefix}-#{beanHelper.landLineNumber.phoneNumber}" />
+               </h:column>
+
+               <h:column rendered="#{empty showAdminLinks or showAdminLinks}">
+                       <h:outputLabel styleClass="table_data_label" value="#{msg.ADMIN_SHOW_MOBILE_LINKS}" />
+
+                       <div class="table_data_field">
+                               <ui:include src="/WEB-INF/templates/admin/mobile/admin_mobile_links.tpl">
+                                       <ui:param name="isShowPage" value="#{isShowPage}" />
+                               </ui:include>
+                       </div>
+               </h:column>
+       </h:panelGrid>
+</ui:composition>
diff --git a/web/WEB-INF/templates/admin/fax/admin_fax_links.tpl b/web/WEB-INF/templates/admin/fax/admin_fax_links.tpl
new file mode 100644 (file)
index 0000000..f5b64cc
--- /dev/null
@@ -0,0 +1,46 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<ui:composition
+       xmlns="http://www.w3.org/1999/xhtml"
+       xmlns:f="http://java.sun.com/jsf/core"
+       xmlns:h="http://java.sun.com/jsf/html"
+       xmlns:ui="http://xmlns.jcp.org/jsf/facelets">
+
+       <h:outputText styleClass="errors" value="#{msg.ERROR_BEAN_HELPER_LAND_LINE_NUMBER_NOT_SET}" rendered="#{empty beanHelper.landLineNumber}" />
+
+       <ui:fragment rendered="#{not empty beanHelper.landLineNumber}">
+               <ul class="mini_nav">
+                       <ui:fragment rendered="#{empty isShowPage or not isShowPage}">
+                               <li class="mini_link">
+                                       <h:link outcome="admin_show_mobile">
+                                               <h:outputText value="#{msg.ADMIN_LINK_SHOW_SHORT}" title="#{msg.ADMIN_LINK_SHOW_SHORT_TITLE}" />
+                                               <f:param name="phoneId" value="#{beanHelper.landLineNumber.phoneId}" />
+                                       </h:link>
+                               </li>
+                       </ui:fragment>
+
+                       <li class="mini_link">
+                               <h:link outcome="admin_edit_mobile">
+                                       <h:outputText value="#{msg.ADMIN_LINK_EDIT_SHORT}" title="#{msg.ADMIN_LINK_EDIT_SHORT_TITLE}" />
+                                       <f:param name="phoneId" value="#{beanHelper.landLineNumber.phoneId}" />
+                               </h:link>
+                       </li>
+
+                       <ui:fragment rendered="#{not empty beanHelper.contact}">
+                               <li class="mini_link">
+                                       <h:link outcome="admin_unlink_contact_mobile">
+                                               <h:outputText styleClass="unlink_link" value="#{msg.ADMIN_LINK_UNLINK_SHORT}" title="#{msg.ADMIN_LINK_UNLINK_SHORT_TITLE}" />
+                                               <f:param name="phoneId" value="#{beanHelper.landLineNumber.phoneId}" />
+                                               <f:param name="contactId" value="#{beanHelper.contact.contactId}" />
+                                       </h:link>
+                               </li>
+                       </ui:fragment>
+
+                       <li class="mini_link">
+                               <h:link outcome="admin_delete_mobile">
+                                       <h:outputText styleClass="delete_link" value="#{msg.ADMIN_LINK_DELETE_SHORT}" title="#{msg.ADMIN_LINK_DELETE_SHORT_TITLE}" />
+                                       <f:param name="phoneId" value="#{beanHelper.landLineNumber.phoneId}" />
+                               </h:link>
+                       </li>
+               </ul>
+       </ui:fragment>
+</ui:composition>
diff --git a/web/WEB-INF/templates/admin/fax/admin_form_add_contact_fax.tpl b/web/WEB-INF/templates/admin/fax/admin_form_add_contact_fax.tpl
new file mode 100644 (file)
index 0000000..59a0b28
--- /dev/null
@@ -0,0 +1,56 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<ui:composition
+       xmlns="http://www.w3.org/1999/xhtml"
+       xmlns:f="http://xmlns.jcp.org/jsf/core"
+       xmlns:h="http://xmlns.jcp.org/jsf/html"
+       xmlns:ui="http://xmlns.jcp.org/jsf/facelets">
+
+       <h:outputText styleClass="errors" value="#{msg.ERROR_BEAN_HELPER_CONTACT_NOT_SET}" rendered="#{empty beanHelper.contact}" />
+
+       <h:form id="form_add_contact_mobile" rendered="#{not empty beanHelper.contact}">
+               <h:panelGroup styleClass="table_medium" layout="block">
+                       <div class="table_header">
+                               <h:outputText value="#{msg.ADMIN_ADD_CONTACT_LAND_LINE_FORM_TITLE}" />
+                       </div>
+
+                       <div class="para">
+                               <ui:include src="/WEB-INF/templates/admin/contact/admin_contact_data_mini.tpl" />
+                       </div>
+
+                       <div class="table_row">
+                               <div class="table_left_medium">
+                                       <h:outputLabel for="choosenLandLineNumber" value="#{msg.ADMIN_SELECT_LAND_LINE}" />
+                               </div>
+
+                               <div class="table_right_medium">
+                                       <h:selectOneMenu styleClass="select right_space" id="choosenLandLineNumber" value="#{adminPhoneController.choosenLandLineNumber}">
+                                               <f:converter converterId="LandLineConverter" />
+                                               <f:selectItem itemValue="" itemLabel="#{msg.NONE_SELECTED}" />
+                                               <f:selectItems value="#{adminPhoneController.allNonLinkedLandLineNumbers()}" var="mobileNumber" itemValue="#{mobileNumber}" itemLabel="#{mobileNumber.mobileProvider.providerCountry.countryExternalDialPrefix} (#{mobileNumber.mobileProvider.providerDialPrefix}) #{mobileNumber.phoneNumber}" />
+                                       </h:selectOneMenu>
+                               </div>
+                       </div>
+
+                       <div class="para">
+                               <h:outputText value="#{msg.ADMIN_OR_ENTER_CONTACT_NEW_LAND_LINE_DATA}" />
+                       </div>
+
+                       <div class="table_row">
+                               <div class="table_left_medium">
+                                       <h:outputLabel for="mobileNumber" value="#{msg.ADMIN_PERSONAL_DATA_LAND_LINE_NUMBER}" />
+                               </div>
+
+                               <div class="table_right_medium">
+                                       <ui:include src="/WEB-INF/templates/generic/landline_selection_box.tpl">
+                                               <ui:param name="targetController" value="#{adminPhoneController}" />
+                                       </ui:include>
+                               </div>
+                       </div>
+
+                       <div class="table_footer">
+                               <h:commandButton styleClass="reset right_space" type="reset" value="#{msg.BUTTON_RESET_FORM}" />
+                               <h:commandButton styleClass="submit" type="submit" action="#{adminContactPhoneController.doLinkAddLandLine(beanHelper.contact)}" value="#{msg.BUTTON_ADMIN_LINK_ADD_CONTACT_LAND_LINE}" />
+                       </div>
+               </h:panelGroup>
+       </h:form>
+</ui:composition>
diff --git a/web/WEB-INF/templates/admin/fax/admin_form_fax_data.tpl b/web/WEB-INF/templates/admin/fax/admin_form_fax_data.tpl
new file mode 100644 (file)
index 0000000..145cb72
--- /dev/null
@@ -0,0 +1,47 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<ui:composition
+       xmlns="http://www.w3.org/1999/xhtml"
+       xmlns:f="http://java.sun.com/jsf/core"
+       xmlns:h="http://java.sun.com/jsf/html"
+       xmlns:ui="http://xmlns.jcp.org/jsf/facelets">
+
+       <h:outputText styleClass="errors" value="#{msg.ERROR_BEAN_HELPER_FAX_NUMBER_NOT_SET}" rendered="#{empty beanHelper.faxNumber}" />
+
+       <div class="para">
+               <fieldset class="fieldset" id="phone_data">
+                       <legend title="#{msg.ADMIN_FAX_DATA_LEGEND_TITLE}">
+                               <h:outputText value="#{msg.ADMIN_FAX_DATA_LEGEND}" />
+                       </legend>
+
+                       <div class="table_row">
+                               <div class="table_left_medium">
+                                       <h:outputLabel for="faxNumberId" value="#{msg.ADMIN_SHOW_PHONE_ID}" />
+                               </div>
+
+                               <div class="table_right_medium">
+                                       <h:outputText id="faxNumberId" value="#{beanHelper.faxNumber.phoneId}" />
+                               </div>
+
+                               <div class="clear"></div>
+                       </div>
+
+                       <div class="table_row">
+                               <div class="table_left_medium">
+                                       <h:outputLabel for="faxNumber" value="#{msg.ADMIN_EDIT_FAX_NUMBER}" />
+                               </div>
+
+                               <div class="table_right_medium">
+                                       <h:inputText styleClass="input" id="faxNumber" size="10" maxlength="20" value="#{adminPhoneController.phoneNumber}" required="true" requiredMessage="#{msg.ADMIN_FAX_NUMBER_REQUIRED}">
+                                               <f:validator for="faxNumber" validatorId="PhoneNumberValidator" />
+                                       </h:inputText>
+                               </div>
+
+                               <div class="clear"></div>
+
+                               <div class="error_container">
+                                       <h:message for="faxNumber" errorClass="errors" fatalClass="errors" warnClass="errors" />
+                               </div>
+                       </div>
+               </fieldset>
+       </div>
+</ui:composition>
diff --git a/web/WEB-INF/templates/admin/landline/admin_form_add_contact_landline.tpl b/web/WEB-INF/templates/admin/landline/admin_form_add_contact_landline.tpl
new file mode 100644 (file)
index 0000000..59a0b28
--- /dev/null
@@ -0,0 +1,56 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<ui:composition
+       xmlns="http://www.w3.org/1999/xhtml"
+       xmlns:f="http://xmlns.jcp.org/jsf/core"
+       xmlns:h="http://xmlns.jcp.org/jsf/html"
+       xmlns:ui="http://xmlns.jcp.org/jsf/facelets">
+
+       <h:outputText styleClass="errors" value="#{msg.ERROR_BEAN_HELPER_CONTACT_NOT_SET}" rendered="#{empty beanHelper.contact}" />
+
+       <h:form id="form_add_contact_mobile" rendered="#{not empty beanHelper.contact}">
+               <h:panelGroup styleClass="table_medium" layout="block">
+                       <div class="table_header">
+                               <h:outputText value="#{msg.ADMIN_ADD_CONTACT_LAND_LINE_FORM_TITLE}" />
+                       </div>
+
+                       <div class="para">
+                               <ui:include src="/WEB-INF/templates/admin/contact/admin_contact_data_mini.tpl" />
+                       </div>
+
+                       <div class="table_row">
+                               <div class="table_left_medium">
+                                       <h:outputLabel for="choosenLandLineNumber" value="#{msg.ADMIN_SELECT_LAND_LINE}" />
+                               </div>
+
+                               <div class="table_right_medium">
+                                       <h:selectOneMenu styleClass="select right_space" id="choosenLandLineNumber" value="#{adminPhoneController.choosenLandLineNumber}">
+                                               <f:converter converterId="LandLineConverter" />
+                                               <f:selectItem itemValue="" itemLabel="#{msg.NONE_SELECTED}" />
+                                               <f:selectItems value="#{adminPhoneController.allNonLinkedLandLineNumbers()}" var="mobileNumber" itemValue="#{mobileNumber}" itemLabel="#{mobileNumber.mobileProvider.providerCountry.countryExternalDialPrefix} (#{mobileNumber.mobileProvider.providerDialPrefix}) #{mobileNumber.phoneNumber}" />
+                                       </h:selectOneMenu>
+                               </div>
+                       </div>
+
+                       <div class="para">
+                               <h:outputText value="#{msg.ADMIN_OR_ENTER_CONTACT_NEW_LAND_LINE_DATA}" />
+                       </div>
+
+                       <div class="table_row">
+                               <div class="table_left_medium">
+                                       <h:outputLabel for="mobileNumber" value="#{msg.ADMIN_PERSONAL_DATA_LAND_LINE_NUMBER}" />
+                               </div>
+
+                               <div class="table_right_medium">
+                                       <ui:include src="/WEB-INF/templates/generic/landline_selection_box.tpl">
+                                               <ui:param name="targetController" value="#{adminPhoneController}" />
+                                       </ui:include>
+                               </div>
+                       </div>
+
+                       <div class="table_footer">
+                               <h:commandButton styleClass="reset right_space" type="reset" value="#{msg.BUTTON_RESET_FORM}" />
+                               <h:commandButton styleClass="submit" type="submit" action="#{adminContactPhoneController.doLinkAddLandLine(beanHelper.contact)}" value="#{msg.BUTTON_ADMIN_LINK_ADD_CONTACT_LAND_LINE}" />
+                       </div>
+               </h:panelGroup>
+       </h:form>
+</ui:composition>
diff --git a/web/WEB-INF/templates/admin/landline/admin_form_landline_data.tpl b/web/WEB-INF/templates/admin/landline/admin_form_landline_data.tpl
new file mode 100644 (file)
index 0000000..eb1d16a
--- /dev/null
@@ -0,0 +1,47 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<ui:composition
+       xmlns="http://www.w3.org/1999/xhtml"
+       xmlns:f="http://java.sun.com/jsf/core"
+       xmlns:h="http://java.sun.com/jsf/html"
+       xmlns:ui="http://xmlns.jcp.org/jsf/facelets">
+
+       <h:outputText styleClass="errors" value="#{msg.ERROR_BEAN_HELPER_LAND_LINE_NUMBER_NOT_SET}" rendered="#{empty beanHelper.landLineNumber}" />
+
+       <div class="para">
+               <fieldset class="fieldset" id="phone_data">
+                       <legend title="#{msg.ADMIN_LAND_LINE_DATA_LEGEND_TITLE}">
+                               <h:outputText value="#{msg.ADMIN_LAND_LINE_DATA_LEGEND}" />
+                       </legend>
+
+                       <div class="table_row">
+                               <div class="table_left_medium">
+                                       <h:outputLabel for="landLineNumberId" value="#{msg.ADMIN_SHOW_PHONE_ID}" />
+                               </div>
+
+                               <div class="table_right_medium">
+                                       <h:outputText id="landLineNumberId" value="#{beanHelper.landLineNumber.phoneId}" />
+                               </div>
+
+                               <div class="clear"></div>
+                       </div>
+
+                       <div class="table_row">
+                               <div class="table_left_medium">
+                                       <h:outputLabel for="landLineNumber" value="#{msg.ADMIN_EDIT_LAND_LINE_NUMBER}" />
+                               </div>
+
+                               <div class="table_right_medium">
+                                       <h:inputText styleClass="input" id="landLineNumber" size="10" maxlength="20" value="#{adminPhoneController.phoneNumber}" required="true" requiredMessage="#{msg.ADMIN_LAND_LINE_NUMBER_REQUIRED}">
+                                               <f:validator for="landLineNumber" validatorId="PhoneNumberValidator" />
+                                       </h:inputText>
+                               </div>
+
+                               <div class="clear"></div>
+
+                               <div class="error_container">
+                                       <h:message for="landLineNumber" errorClass="errors" fatalClass="errors" warnClass="errors" />
+                               </div>
+                       </div>
+               </fieldset>
+       </div>
+</ui:composition>
diff --git a/web/WEB-INF/templates/admin/landline/admin_landline_add_show.tpl b/web/WEB-INF/templates/admin/landline/admin_landline_add_show.tpl
new file mode 100644 (file)
index 0000000..0bc92a8
--- /dev/null
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<ui:composition
+       xmlns="http://www.w3.org/1999/xhtml"
+       xmlns:f="http://xmlns.jcp.org/jsf/core"
+       xmlns:h="http://xmlns.jcp.org/jsf/html"
+       xmlns:ui="http://xmlns.jcp.org/jsf/facelets">
+
+       <h:outputText styleClass="errors" value="#{msg.ERROR_BEAN_HELPER_CONTACT_NOT_SET}" rendered="#{empty beanHelper.contact}" />
+
+       <ui:fragment rendered="#{empty beanHelper.contact.contactLandLineNumber and not empty beanHelper.contact}">
+               <ui:include src="/WEB-INF/templates/admin/mobile/admin_form_add_contact_mobile.tpl" />
+       </ui:fragment>
+
+       <ui:fragment rendered="#{not empty beanHelper.contact.contactLandLineNumber and not empty beanHelper.contact}">
+               <ui:include src="/WEB-INF/templates/admin/mobile/admin_mobile_data.tpl" />
+       </ui:fragment>
+</ui:composition>
diff --git a/web/WEB-INF/templates/admin/landline/admin_landline_data.tpl b/web/WEB-INF/templates/admin/landline/admin_landline_data.tpl
new file mode 100644 (file)
index 0000000..4369ce0
--- /dev/null
@@ -0,0 +1,50 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<ui:composition
+       xmlns="http://www.w3.org/1999/xhtml"
+       xmlns:f="http://java.sun.com/jsf/core"
+       xmlns:h="http://java.sun.com/jsf/html"
+       xmlns:ui="http://xmlns.jcp.org/jsf/facelets">
+
+       <h:outputText styleClass="errors" value="#{msg.ERROR_BEAN_HELPER_LAND_LINE_NUMBER_NOT_SET}" rendered="#{empty beanHelper.landLineNumber}" />
+
+       <h:panelGrid id="mobile_data" summary="#{msg.ADMIN_TABLE_SUMMARY_SHOW_MOBILE_DATA}" headerClass="table_header_column" styleClass="table_big" columns="2" rendered="#{not empty beanHelper.landLineNumber}">
+               <f:facet name="header">
+                       <h:outputText value="#{msg.ADMIN_HEADER_SHOW_MOBILE_DATA}" />
+               </f:facet>
+
+               <h:column>
+                       <h:panelGroup>
+                               <h:outputLabel for="landLineNumberId" styleClass="table_data_label" value="#{msg.ADMIN_SHOW_PHONE_ID}" />
+
+                               <h:outputText id="landLineNumberId" styleClass="table_data_field" value="#{beanHelper.landLineNumber.phoneId}" />
+
+                               <h:message for="landLineNumberId" errorClass="errors" fatalClass="errors" warnClass="errors" />
+                       </h:panelGroup>
+               </h:column>
+
+               <h:column>
+                       <h:outputLabel for="mobileProvider" styleClass="table_data_label" value="#{msg.ADMIN_SHOW_MOBILE_PROVIDER_NAME}" />
+
+                       <h:link outcome="admin_show_mobile_provider">
+                               <f:param name="providerId" value="#{beanHelper.landLineNumber.mobileProvider.providerId}" />
+                               <h:outputText id="mobileProvider" styleClass="table_data_field" value="#{beanHelper.landLineNumber.mobileProvider.providerName}" />
+                       </h:link>
+               </h:column>
+
+               <h:column>
+                       <h:outputLabel for="landLineNumber" styleClass="table_data_label" value="#{msg.ADMIN_SHOW_LAND_LINE_NUMBER_COMPLETE}" />
+
+                       <h:outputText id="landLineNumber" styleClass="table_data_field" value="#{beanHelper.landLineNumber.mobileProvider.providerCountry.countryExternalDialPrefix}#{beanHelper.landLineNumber.mobileProvider.providerDialPrefix}-#{beanHelper.landLineNumber.phoneNumber}" />
+               </h:column>
+
+               <h:column rendered="#{empty showAdminLinks or showAdminLinks}">
+                       <h:outputLabel styleClass="table_data_label" value="#{msg.ADMIN_SHOW_MOBILE_LINKS}" />
+
+                       <div class="table_data_field">
+                               <ui:include src="/WEB-INF/templates/admin/mobile/admin_mobile_links.tpl">
+                                       <ui:param name="isShowPage" value="#{isShowPage}" />
+                               </ui:include>
+                       </div>
+               </h:column>
+       </h:panelGrid>
+</ui:composition>
diff --git a/web/WEB-INF/templates/admin/landline/admin_landline_links.tpl b/web/WEB-INF/templates/admin/landline/admin_landline_links.tpl
new file mode 100644 (file)
index 0000000..f5b64cc
--- /dev/null
@@ -0,0 +1,46 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<ui:composition
+       xmlns="http://www.w3.org/1999/xhtml"
+       xmlns:f="http://java.sun.com/jsf/core"
+       xmlns:h="http://java.sun.com/jsf/html"
+       xmlns:ui="http://xmlns.jcp.org/jsf/facelets">
+
+       <h:outputText styleClass="errors" value="#{msg.ERROR_BEAN_HELPER_LAND_LINE_NUMBER_NOT_SET}" rendered="#{empty beanHelper.landLineNumber}" />
+
+       <ui:fragment rendered="#{not empty beanHelper.landLineNumber}">
+               <ul class="mini_nav">
+                       <ui:fragment rendered="#{empty isShowPage or not isShowPage}">
+                               <li class="mini_link">
+                                       <h:link outcome="admin_show_mobile">
+                                               <h:outputText value="#{msg.ADMIN_LINK_SHOW_SHORT}" title="#{msg.ADMIN_LINK_SHOW_SHORT_TITLE}" />
+                                               <f:param name="phoneId" value="#{beanHelper.landLineNumber.phoneId}" />
+                                       </h:link>
+                               </li>
+                       </ui:fragment>
+
+                       <li class="mini_link">
+                               <h:link outcome="admin_edit_mobile">
+                                       <h:outputText value="#{msg.ADMIN_LINK_EDIT_SHORT}" title="#{msg.ADMIN_LINK_EDIT_SHORT_TITLE}" />
+                                       <f:param name="phoneId" value="#{beanHelper.landLineNumber.phoneId}" />
+                               </h:link>
+                       </li>
+
+                       <ui:fragment rendered="#{not empty beanHelper.contact}">
+                               <li class="mini_link">
+                                       <h:link outcome="admin_unlink_contact_mobile">
+                                               <h:outputText styleClass="unlink_link" value="#{msg.ADMIN_LINK_UNLINK_SHORT}" title="#{msg.ADMIN_LINK_UNLINK_SHORT_TITLE}" />
+                                               <f:param name="phoneId" value="#{beanHelper.landLineNumber.phoneId}" />
+                                               <f:param name="contactId" value="#{beanHelper.contact.contactId}" />
+                                       </h:link>
+                               </li>
+                       </ui:fragment>
+
+                       <li class="mini_link">
+                               <h:link outcome="admin_delete_mobile">
+                                       <h:outputText styleClass="delete_link" value="#{msg.ADMIN_LINK_DELETE_SHORT}" title="#{msg.ADMIN_LINK_DELETE_SHORT_TITLE}" />
+                                       <f:param name="phoneId" value="#{beanHelper.landLineNumber.phoneId}" />
+                               </h:link>
+                       </li>
+               </ul>
+       </ui:fragment>
+</ui:composition>
index e96f209a874871596c57700c5467e48047d2ad49..c9f99a2f0ab508d9f8a47f1862913c1663029c27 100644 (file)
@@ -15,7 +15,7 @@
 
                        <div class="table_row">
                                <div class="table_left_medium">
-                                       <h:outputLabel for="mobileNumberId" value="#{msg.ADMIN_SHOW_MOBILE_ID}" />
+                                       <h:outputLabel for="mobileNumberId" value="#{msg.ADMIN_SHOW_PHONE_ID}" />
                                </div>
 
                                <div class="table_right_medium">
index f3ecc47f579a64c4baf72a725a6f4a2d129eda17..92027f5f51cb9d7fb6cedb1b6f7024b63622027d 100644 (file)
@@ -14,7 +14,7 @@
 
                <h:column>
                        <h:panelGroup>
-                               <h:outputLabel for="mobileNumberId" styleClass="table_data_label" value="#{msg.ADMIN_SHOW_MOBILE_ID}" />
+                               <h:outputLabel for="mobileNumberId" styleClass="table_data_label" value="#{msg.ADMIN_SHOW_PHONE_ID}" />
 
                                <h:outputText id="mobileNumberId" styleClass="table_data_field" value="#{beanHelper.mobileNumber.phoneId}" />
 
diff --git a/web/admin/fax/admin_contact_fax_unlink.xhtml b/web/admin/fax/admin_contact_fax_unlink.xhtml
new file mode 100644 (file)
index 0000000..af4884f
--- /dev/null
@@ -0,0 +1,63 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html
+       lang="#{localizationController.language}" xml:lang="#{localizationController.language}"
+       xmlns="http://www.w3.org/1999/xhtml"
+       xmlns:ui="http://xmlns.jcp.org/jsf/facelets"
+       xmlns:h="http://xmlns.jcp.org/jsf/html"
+       xmlns:f="http://xmlns.jcp.org/jsf/core"
+       >
+
+       <f:metadata>
+               <f:viewParam name="phoneId" value="#{beanHelper.faxNumber}" converter="FaxConverter" required="true" requiredMessage="#{msg.ERROR_PARAMETER_PHONE_ID_NOT_SET}" />
+               <f:viewParam name="contactId" value="#{beanHelper.contact}" converter="ContactConverter" required="true" requiredMessage="#{msg.ERROR_PARAMETER_CONTACT_ID_NOT_SET}" />
+       </f:metadata>
+
+       <ui:composition template="/WEB-INF/templates/admin/admin_base.tpl">
+               <ui:define name="admin_title">#{msg.PAGE_TITLE_ADMIN_UNLINK_CONTACT_FAX}</ui:define>
+
+               <ui:define name="content_header">
+                       #{msg.CONTENT_TITLE_ADMIN_UNLINK_CONTACT_FAX}
+               </ui:define>
+
+               <ui:define name="content">
+                       <h:form id="form_unlink_contact_landline" rendered="#{not empty beanHelper.faxNumber and not empty beanHelper.contact and beanHelper.contact.contactMobileNumber == beanHelper.faxNumber}">
+                               <h:panelGroup styleClass="table" layout="block">
+                                       <div class="table_header">
+                                               <h:outputText value="#{msg.ADMIN_UNLINK_CONTACT_FAX_TITLE}" />
+                                       </div>
+
+                                       <div class="para">
+                                               <ui:include src="/WEB-INF/templates/admin/contact/admin_contact_data_mini.tpl" />
+                                       </div>
+
+                                       <div class="para">
+                                               <h:link outcome="admin_show_contact">
+                                                       <h:outputText value="#{msg.ADMIN_SHOW_FULL_CONTACT_DATA}" />
+                                                       <f:param name="contactId" value="#{beanHelper.contact.contactId}" />
+                                               </h:link>
+                                       </div>
+
+                                       <div class="para">
+                                               <ui:include src="/WEB-INF/templates/admin/landline/admin_landline_data.tpl">
+                                                       <ui:param name="isShowPage" value="#{false}" />
+                                                       <ui:param name="showAdminLinks" value="#{false}" />
+                                               </ui:include>
+                                       </div>
+
+                                       <div class="table_footer">
+                                               <h:commandButton styleClass="unlink_button" type="submit" id="unlink_landline" value="#{msg.BUTTON_ADMIN_UNLINK_CONTACT_FAX}" action="#{adminContactPhoneController.unlinkMobileContactData()}" />
+                                       </div>
+                               </h:panelGroup>
+                       </h:form>
+
+                       <h:outputText styleClass="errors" value="#{msg.ERROR_BEAN_HELPER_FAX_NUMBER_NOT_SET}" rendered="#{empty beanHelper.faxNumber}" />
+
+                       <h:outputText styleClass="errors" value="#{msg.ERROR_BEAN_HELPER_CONTACT_NOT_SET}" rendered="#{empty beanHelper.contact}" />
+
+                       <h:outputFormat styleClass="errors" value="#{msg.ERROR_FAX_CONTACT_NOT_LINKED}" rendered="#{not empty beanHelper.faxNumber and not empty beanHelper.contact and beanHelper.contact.contactMobileNumber != beanHelper.faxNumber}">
+                               <f:param value="#{beanHelper.faxNumber.phoneId}" />
+                               <f:param value="#{beanHelper.contact.contactId}" />
+                       </h:outputFormat>
+               </ui:define>
+       </ui:composition>
+</html>
diff --git a/web/admin/fax/admin_fax_delete.xhtml b/web/admin/fax/admin_fax_delete.xhtml
new file mode 100644 (file)
index 0000000..9f9ec09
--- /dev/null
@@ -0,0 +1,48 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html
+       lang="#{localizationController.language}" xml:lang="#{localizationController.language}"
+       xmlns="http://www.w3.org/1999/xhtml"
+       xmlns:ui="http://xmlns.jcp.org/jsf/facelets"
+       xmlns:h="http://xmlns.jcp.org/jsf/html"
+       xmlns:f="http://xmlns.jcp.org/jsf/core"
+       >
+
+       <f:metadata>
+               <f:viewParam name="phoneId" value="#{beanHelper.faxNumber}" converter="MobileConverter" required="true" requiredMessage="#{msg.ERROR_PARAMETER_PHONE_ID_NOT_SET}" />
+       </f:metadata>
+
+       <ui:composition template="/WEB-INF/templates/admin/admin_base.tpl">
+               <ui:define name="admin_title">#{msg.PAGE_TITLE_ADMIN_DELETE_FAX}</ui:define>
+
+               <ui:define name="content_header">
+                       #{msg.CONTENT_TITLE_ADMIN_DELETE_FAX}
+               </ui:define>
+
+               <ui:define name="content">
+                       <h:form id="form_delete_landline" rendered="#{not empty beanHelper.faxNumber}">
+                               <h:panelGroup styleClass="table" layout="block">
+                                       <div class="table_header">
+                                               <h:outputText value="#{msg.ADMIN_DELETE_FAX_TITLE}" />
+                                       </div>
+
+                                       <div class="para">
+                                               <ui:include src="/WEB-INF/templates/admin/landline/admin_landline_data.tpl">
+                                                       <ui:param name="isShowPage" value="#{false}" />
+                                                       <ui:param name="showAdminLinks" value="#{false}" />
+                                               </ui:include>
+                                       </div>
+
+                                       <div class="para">
+                                               <h:outputText value="#{msg.ADMIN_DELETE_FAX_DATA_NOTICE}" />
+                                       </div>
+
+                                       <div class="table_footer">
+                                               <h:commandButton styleClass="delete_button" type="submit" id="delete_landline" value="#{msg.BUTTON_ADMIN_DELETE_FAX}" action="#{adminPhoneController.deleteMobileData()}" />
+                                       </div>
+                               </h:panelGroup>
+                       </h:form>
+
+                       <h:outputText styleClass="errors" value="#{msg.ERROR_BEAN_HELPER_FAX_NUMBER_NOT_SET}" rendered="#{empty beanHelper.faxNumber}" />
+               </ui:define>
+       </ui:composition>
+</html>
diff --git a/web/admin/fax/admin_fax_edit.xhtml b/web/admin/fax/admin_fax_edit.xhtml
new file mode 100644 (file)
index 0000000..cef2bdf
--- /dev/null
@@ -0,0 +1,41 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html
+       lang="#{localizationController.language}" xml:lang="#{localizationController.language}"
+       xmlns="http://www.w3.org/1999/xhtml"
+       xmlns:ui="http://xmlns.jcp.org/jsf/facelets"
+       xmlns:h="http://xmlns.jcp.org/jsf/html"
+       xmlns:f="http://xmlns.jcp.org/jsf/core"
+       >
+
+       <f:metadata>
+               <f:viewParam name="phoneId" value="#{beanHelper.faxNumber}" converter="MobileConverter" required="true" requiredMessage="#{msg.ERROR_PARAMETER_PHONE_ID_NOT_SET}" />
+               <f:viewAction action="#{beanHelper.copyMobileNumberToController()}" />
+       </f:metadata>
+
+       <ui:composition template="/WEB-INF/templates/admin/admin_base.tpl">
+               <ui:define name="admin_title">#{msg.PAGE_TITLE_ADMIN_EDIT_FAX}</ui:define>
+
+               <ui:define name="content_header">
+                       #{msg.CONTENT_TITLE_ADMIN_EDIT_FAX}
+               </ui:define>
+
+               <ui:define name="content">
+                       <h:form id="form_edit_landline" rendered="#{not empty beanHelper.faxNumber}">
+                               <h:panelGroup styleClass="table_medium" layout="block">
+                                       <div class="table_header">
+                                               #{msg.ADMIN_EDIT_FAX_TITLE}
+                                       </div>
+
+                                       <ui:include src="/WEB-INF/templates/admin/landline/admin_form_landline_data.tpl" />
+
+                                       <div class="table_footer">
+                                               <h:commandButton styleClass="reset right_space" type="reset" value="#{msg.BUTTON_RESET_FORM}" />
+                                               <h:commandButton styleClass="submit" type="submit" id="edit_landline" value="#{msg.BUTTON_ADMIN_EDIT_FAX}" action="#{adminPhoneController.editMobileData()}" />
+                                       </div>
+                               </h:panelGroup>
+                       </h:form>
+
+                       <h:outputText styleClass="errors" value="#{msg.ERROR_BEAN_HELPER_FAX_NUMBER_NOT_SET}" rendered="#{empty beanHelper.faxNumber}" />
+               </ui:define>
+       </ui:composition>
+</html>
diff --git a/web/admin/fax/admin_fax_list.xhtml b/web/admin/fax/admin_fax_list.xhtml
new file mode 100644 (file)
index 0000000..9df4c25
--- /dev/null
@@ -0,0 +1,62 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html
+       lang="#{localizationController.language}" xml:lang="#{localizationController.language}"
+       xmlns="http://www.w3.org/1999/xhtml"
+       xmlns:ui="http://xmlns.jcp.org/jsf/facelets"
+       xmlns:h="http://xmlns.jcp.org/jsf/html"
+       xmlns:f="http://xmlns.jcp.org/jsf/core"
+       >
+
+       <ui:composition template="/WEB-INF/templates/admin/admin_base.tpl">
+               <ui:define name="admin_title">#{msg.PAGE_TITLE_ADMIN_LIST_CONTACT_FAX}</ui:define>
+
+               <ui:define name="content_header">
+                       #{msg.CONTENT_TITLE_ADMIN_LIST_CONTACT_FAX}
+               </ui:define>
+
+               <ui:define name="content">
+                       <h:dataTable id="table_list_landlines" var="faxNumber" value="#{phoneController.allFaxNumbers()}" styleClass="table_big" headerClass="table_header_column" summary="#{msg.TABLE_SUMMARY_ADMIN_LIST_FAXS}" rendered="#{not phoneController.allFaxNumbers().isEmpty()}">
+                               <h:column>
+                                       <f:facet name="header">
+                                               <h:outputText value="#{msg.ADMIN_SHOW_PHONE_ID}" />
+                                       </f:facet>
+
+                                       <h:link outcome="admin_show_landline">
+                                               <h:outputText value="#{faxNumber.phoneId}" title="#{msg.ADMIN_LINK_SHOW_SHORT_TITLE}" />
+                                               <f:param name="phoneId" value="#{faxNumber.phoneId}" />
+                                       </h:link>
+                               </h:column>
+
+                               <h:column>
+                                       <f:facet name="header">
+                                               <h:outputLabel for="phoneNumber" value="#{msg.PERSONAL_DATA_PHONE_NUMBER}" />
+
+                                               <h:outputText id="phoneNumber" value="#{faxNumber.phoneCountry.countryAbroadDialPrefix}#{faxNumber.phoneCountry.countryPhoneCode} (#{faxNumber.phoneAreaCode}) #{faxNumber.phoneNumber}" />
+                                       </f:facet>
+                               </h:column>
+
+                               <h:column>
+                                       <f:facet name="header">
+                                               <h:outputText value="#{msg.ADMIN_SHOW_PHONE_CREATED}" />
+                                       </f:facet>
+
+                                       <h:outputText value="#{faxNumber.phoneEntryCreated.time}">
+                                               <f:convertDateTime type="both" />
+                                       </h:outputText>
+                               </h:column>
+
+                               <h:column>
+                                       <f:facet name="header">
+                                               <h:outputText value="#{msg.ADMIN_SHOW_PHONE_UPDATED}" />
+                                       </f:facet>
+
+                                       <h:outputText value="#{faxNumber.phoneEntryUpdated.time}">
+                                               <f:convertDateTime type="both" />
+                                       </h:outputText>
+                               </h:column>
+                       </h:dataTable>
+
+                       <h:outputText styleClass="errors" value="#{msg.ADMIN_LIST_FAX_EMPTY}" rendered="#{phoneController.allFaxNumbers().isEmpty()}" />
+               </ui:define>
+       </ui:composition>
+</html>
diff --git a/web/admin/fax/admin_fax_show.xhtml b/web/admin/fax/admin_fax_show.xhtml
new file mode 100644 (file)
index 0000000..fcb5e81
--- /dev/null
@@ -0,0 +1,92 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html
+       lang="#{localizationController.language}" xml:lang="#{localizationController.language}"
+       xmlns="http://www.w3.org/1999/xhtml"
+       xmlns:ui="http://xmlns.jcp.org/jsf/facelets"
+       xmlns:h="http://xmlns.jcp.org/jsf/html"
+       xmlns:f="http://xmlns.jcp.org/jsf/core"
+       >
+
+       <f:metadata>
+               <f:viewParam name="phoneId" value="#{beanHelper.faxNumber}" converter="FaxConverter" required="true" requiredMessage="#{msg.ERROR_PARAMETER_PHONE_ID_NOT_SET}" />
+       </f:metadata>
+
+       <ui:composition template="/WEB-INF/templates/admin/admin_base.tpl">
+               <ui:define name="admin_title">#{msg.PAGE_TITLE_ADMIN_SHOW_FAX}</ui:define>
+
+               <ui:define name="content_header">
+                       #{msg.CONTENT_TITLE_ADMIN_SHOW_FAX}
+               </ui:define>
+
+               <ui:define name="content">
+                       <ui:include src="/WEB-INF/templates/admin/landline/admin_landline_data.tpl">
+                               <ui:param name="isShowPage" value="#{true}" />
+                       </ui:include>
+
+                       <h:dataTable id="contact_landline_link" var="contact" value="#{contactPhoneController.allFaxContacts()}" summary="#{msg.TABLE_SUMMARY_ADMIN_SHOW_FAX_LINKS}" headerClass="table_header_column" styleClass="table_medium">
+                               <f:facet name="header">
+                                       <h:outputFormat value="#{msg.ADMIN_HEADER_SHOW_FAX_LINKS}">
+                                               <f:param value="#{beanHelper.faxNumber.phoneId}" />
+                                       </h:outputFormat>
+                               </f:facet>
+
+                               <h:column>
+                                       <h:outputLabel for="contactId" styleClass="table_data_label" value="#{msg.ADMIN_CONTACT_ID}" />
+
+                                       <h:link id="contactId" styleClass="table_data_field" outcome="admin_show_contact">
+                                               <h:outputText value="#{contact.contactId}" />
+                                               <f:param name="contactId" value="#{contact.contactId}" />
+                                       </h:link>
+                               </h:column>
+
+                               <h:column>
+                                       <h:outputLabel for="contactGender" styleClass="table_data_label" value="#{msg.ADMIN_CONTACT_GENDER}" />
+
+                                       <h:outputText id="contactGender" styleClass="table_data_field" value="#{msg[contact.contactGender.messageKey]}" />
+                               </h:column>
+
+                               <h:column>
+                                       <h:outputLabel for="contactTitle" styleClass="table_data_label" value="#{msg.ADMIN_CONTACT_TITLE}" />
+
+                                       <h:outputText id="contactTitle" styleClass="table_data_field" value="#{contact.contactTitle}" />
+                               </h:column>
+
+                               <h:column>
+                                       <h:outputLabel for="contactFirstName" styleClass="table_data_label" value="#{msg.ADMIN_CONTACT_FIRST_NAME}" />
+
+                                       <h:outputText id="contactFirstName" styleClass="table_data_field" value="#{contact.contactFirstName}" />
+                               </h:column>
+
+                               <h:column>
+                                       <h:outputLabel for="contactFamilyName" styleClass="table_data_label" value="#{msg.ADMIN_CONTACT_FAMILY_NAME}" />
+
+                                       <h:outputText id="contactFamilyName" styleClass="table_data_field" value="#{contact.contactFamilyName}" />
+                               </h:column>
+
+                               <h:column>
+                                       <h:outputLabel for="contactEmailAddress" styleClass="table_data_label" value="#{msg.ADMIN_CONTACT_EMAIL_ADDRESS}" />
+
+                                       <h:outputLink id="contactEmailAddress" styleClass="table_data_field" value="mailto:#{contact.contactEmailAddress}">
+                                               <h:outputText value="#{contact.contactEmailAddress}" />
+                                       </h:outputLink>
+                               </h:column>
+
+                               <h:column>
+                                       <h:outputLabel styleClass="table_data_label" value="#{msg.ADMIN_SHOW_FAX_UNLINK}" />
+
+                                       <div class="table_data_field">
+                                               <ul class="mini_nav">
+                                                       <li class="mini_link">
+                                                               <h:link outcome="admin_unlink_contact_landline">
+                                                                       <h:outputText styleClass="unlink_link" value="#{msg.ADMIN_LINK_UNLINK_SHORT}" title="#{msg.ADMIN_LINK_UNLINK_SHORT_TITLE}" />
+                                                                       <f:param name="phoneId" value="#{beanHelper.faxNumber.phoneId}" />
+                                                                       <f:param name="contactId" value="#{contact.contactId}" />
+                                                               </h:link>
+                                                       </li>
+                                               </ul>
+                                       </div>
+                               </h:column>
+                       </h:dataTable>
+               </ui:define>
+       </ui:composition>
+</html>
diff --git a/web/admin/landline/admin_contact_landline_unlink.xhtml b/web/admin/landline/admin_contact_landline_unlink.xhtml
new file mode 100644 (file)
index 0000000..9cbc290
--- /dev/null
@@ -0,0 +1,63 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html
+       lang="#{localizationController.language}" xml:lang="#{localizationController.language}"
+       xmlns="http://www.w3.org/1999/xhtml"
+       xmlns:ui="http://xmlns.jcp.org/jsf/facelets"
+       xmlns:h="http://xmlns.jcp.org/jsf/html"
+       xmlns:f="http://xmlns.jcp.org/jsf/core"
+       >
+
+       <f:metadata>
+               <f:viewParam name="phoneId" value="#{beanHelper.landLineNumber}" converter="LandLineConverter" required="true" requiredMessage="#{msg.ERROR_PARAMETER_PHONE_ID_NOT_SET}" />
+               <f:viewParam name="contactId" value="#{beanHelper.contact}" converter="ContactConverter" required="true" requiredMessage="#{msg.ERROR_PARAMETER_CONTACT_ID_NOT_SET}" />
+       </f:metadata>
+
+       <ui:composition template="/WEB-INF/templates/admin/admin_base.tpl">
+               <ui:define name="admin_title">#{msg.PAGE_TITLE_ADMIN_UNLINK_CONTACT_LAND_LINE}</ui:define>
+
+               <ui:define name="content_header">
+                       #{msg.CONTENT_TITLE_ADMIN_UNLINK_CONTACT_LAND_LINE}
+               </ui:define>
+
+               <ui:define name="content">
+                       <h:form id="form_unlink_contact_landline" rendered="#{not empty beanHelper.landLineNumber and not empty beanHelper.contact and beanHelper.contact.contactMobileNumber == beanHelper.landLineNumber}">
+                               <h:panelGroup styleClass="table" layout="block">
+                                       <div class="table_header">
+                                               <h:outputText value="#{msg.ADMIN_UNLINK_CONTACT_LAND_LINE_TITLE}" />
+                                       </div>
+
+                                       <div class="para">
+                                               <ui:include src="/WEB-INF/templates/admin/contact/admin_contact_data_mini.tpl" />
+                                       </div>
+
+                                       <div class="para">
+                                               <h:link outcome="admin_show_contact">
+                                                       <h:outputText value="#{msg.ADMIN_SHOW_FULL_CONTACT_DATA}" />
+                                                       <f:param name="contactId" value="#{beanHelper.contact.contactId}" />
+                                               </h:link>
+                                       </div>
+
+                                       <div class="para">
+                                               <ui:include src="/WEB-INF/templates/admin/landline/admin_landline_data.tpl">
+                                                       <ui:param name="isShowPage" value="#{false}" />
+                                                       <ui:param name="showAdminLinks" value="#{false}" />
+                                               </ui:include>
+                                       </div>
+
+                                       <div class="table_footer">
+                                               <h:commandButton styleClass="unlink_button" type="submit" id="unlink_landline" value="#{msg.BUTTON_ADMIN_UNLINK_CONTACT_LAND_LINE}" action="#{adminContactPhoneController.unlinkMobileContactData()}" />
+                                       </div>
+                               </h:panelGroup>
+                       </h:form>
+
+                       <h:outputText styleClass="errors" value="#{msg.ERROR_BEAN_HELPER_LAND_LINE_NUMBER_NOT_SET}" rendered="#{empty beanHelper.landLineNumber}" />
+
+                       <h:outputText styleClass="errors" value="#{msg.ERROR_BEAN_HELPER_CONTACT_NOT_SET}" rendered="#{empty beanHelper.contact}" />
+
+                       <h:outputFormat styleClass="errors" value="#{msg.ERROR_LAND_LINE_CONTACT_NOT_LINKED}" rendered="#{not empty beanHelper.landLineNumber and not empty beanHelper.contact and beanHelper.contact.contactMobileNumber != beanHelper.landLineNumber}">
+                               <f:param value="#{beanHelper.landLineNumber.phoneId}" />
+                               <f:param value="#{beanHelper.contact.contactId}" />
+                       </h:outputFormat>
+               </ui:define>
+       </ui:composition>
+</html>
diff --git a/web/admin/landline/admin_landline_delete.xhtml b/web/admin/landline/admin_landline_delete.xhtml
new file mode 100644 (file)
index 0000000..faae7ca
--- /dev/null
@@ -0,0 +1,48 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html
+       lang="#{localizationController.language}" xml:lang="#{localizationController.language}"
+       xmlns="http://www.w3.org/1999/xhtml"
+       xmlns:ui="http://xmlns.jcp.org/jsf/facelets"
+       xmlns:h="http://xmlns.jcp.org/jsf/html"
+       xmlns:f="http://xmlns.jcp.org/jsf/core"
+       >
+
+       <f:metadata>
+               <f:viewParam name="phoneId" value="#{beanHelper.landLineNumber}" converter="MobileConverter" required="true" requiredMessage="#{msg.ERROR_PARAMETER_PHONE_ID_NOT_SET}" />
+       </f:metadata>
+
+       <ui:composition template="/WEB-INF/templates/admin/admin_base.tpl">
+               <ui:define name="admin_title">#{msg.PAGE_TITLE_ADMIN_DELETE_LAND_LINE}</ui:define>
+
+               <ui:define name="content_header">
+                       #{msg.CONTENT_TITLE_ADMIN_DELETE_LAND_LINE}
+               </ui:define>
+
+               <ui:define name="content">
+                       <h:form id="form_delete_landline" rendered="#{not empty beanHelper.landLineNumber}">
+                               <h:panelGroup styleClass="table" layout="block">
+                                       <div class="table_header">
+                                               <h:outputText value="#{msg.ADMIN_DELETE_LAND_LINE_TITLE}" />
+                                       </div>
+
+                                       <div class="para">
+                                               <ui:include src="/WEB-INF/templates/admin/landline/admin_landline_data.tpl">
+                                                       <ui:param name="isShowPage" value="#{false}" />
+                                                       <ui:param name="showAdminLinks" value="#{false}" />
+                                               </ui:include>
+                                       </div>
+
+                                       <div class="para">
+                                               <h:outputText value="#{msg.ADMIN_DELETE_LAND_LINE_DATA_NOTICE}" />
+                                       </div>
+
+                                       <div class="table_footer">
+                                               <h:commandButton styleClass="delete_button" type="submit" id="delete_landline" value="#{msg.BUTTON_ADMIN_DELETE_LAND_LINE}" action="#{adminPhoneController.deleteMobileData()}" />
+                                       </div>
+                               </h:panelGroup>
+                       </h:form>
+
+                       <h:outputText styleClass="errors" value="#{msg.ERROR_BEAN_HELPER_LAND_LINE_NUMBER_NOT_SET}" rendered="#{empty beanHelper.landLineNumber}" />
+               </ui:define>
+       </ui:composition>
+</html>
diff --git a/web/admin/landline/admin_landline_edit.xhtml b/web/admin/landline/admin_landline_edit.xhtml
new file mode 100644 (file)
index 0000000..edb64ce
--- /dev/null
@@ -0,0 +1,41 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html
+       lang="#{localizationController.language}" xml:lang="#{localizationController.language}"
+       xmlns="http://www.w3.org/1999/xhtml"
+       xmlns:ui="http://xmlns.jcp.org/jsf/facelets"
+       xmlns:h="http://xmlns.jcp.org/jsf/html"
+       xmlns:f="http://xmlns.jcp.org/jsf/core"
+       >
+
+       <f:metadata>
+               <f:viewParam name="phoneId" value="#{beanHelper.landLineNumber}" converter="MobileConverter" required="true" requiredMessage="#{msg.ERROR_PARAMETER_PHONE_ID_NOT_SET}" />
+               <f:viewAction action="#{beanHelper.copyMobileNumberToController()}" />
+       </f:metadata>
+
+       <ui:composition template="/WEB-INF/templates/admin/admin_base.tpl">
+               <ui:define name="admin_title">#{msg.PAGE_TITLE_ADMIN_EDIT_LAND_LINE}</ui:define>
+
+               <ui:define name="content_header">
+                       #{msg.CONTENT_TITLE_ADMIN_EDIT_LAND_LINE}
+               </ui:define>
+
+               <ui:define name="content">
+                       <h:form id="form_edit_landline" rendered="#{not empty beanHelper.landLineNumber}">
+                               <h:panelGroup styleClass="table_medium" layout="block">
+                                       <div class="table_header">
+                                               #{msg.ADMIN_EDIT_LAND_LINE_TITLE}
+                                       </div>
+
+                                       <ui:include src="/WEB-INF/templates/admin/landline/admin_form_landline_data.tpl" />
+
+                                       <div class="table_footer">
+                                               <h:commandButton styleClass="reset right_space" type="reset" value="#{msg.BUTTON_RESET_FORM}" />
+                                               <h:commandButton styleClass="submit" type="submit" id="edit_landline" value="#{msg.BUTTON_ADMIN_EDIT_LAND_LINE}" action="#{adminPhoneController.editMobileData()}" />
+                                       </div>
+                               </h:panelGroup>
+                       </h:form>
+
+                       <h:outputText styleClass="errors" value="#{msg.ERROR_BEAN_HELPER_LAND_LINE_NUMBER_NOT_SET}" rendered="#{empty beanHelper.landLineNumber}" />
+               </ui:define>
+       </ui:composition>
+</html>
diff --git a/web/admin/landline/admin_landline_list.xhtml b/web/admin/landline/admin_landline_list.xhtml
new file mode 100644 (file)
index 0000000..f73c46d
--- /dev/null
@@ -0,0 +1,62 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html
+       lang="#{localizationController.language}" xml:lang="#{localizationController.language}"
+       xmlns="http://www.w3.org/1999/xhtml"
+       xmlns:ui="http://xmlns.jcp.org/jsf/facelets"
+       xmlns:h="http://xmlns.jcp.org/jsf/html"
+       xmlns:f="http://xmlns.jcp.org/jsf/core"
+       >
+
+       <ui:composition template="/WEB-INF/templates/admin/admin_base.tpl">
+               <ui:define name="admin_title">#{msg.PAGE_TITLE_ADMIN_LIST_CONTACT_LAND_LINE}</ui:define>
+
+               <ui:define name="content_header">
+                       #{msg.CONTENT_TITLE_ADMIN_LIST_CONTACT_LAND_LINE}
+               </ui:define>
+
+               <ui:define name="content">
+                       <h:dataTable id="table_list_landlines" var="landLineNumber" value="#{phoneController.allLandLineNumbers()}" styleClass="table_big" headerClass="table_header_column" summary="#{msg.TABLE_SUMMARY_ADMIN_LIST_LAND_LINES}" rendered="#{not phoneController.allLandLineNumbers().isEmpty()}">
+                               <h:column>
+                                       <f:facet name="header">
+                                               <h:outputText value="#{msg.ADMIN_SHOW_PHONE_ID}" />
+                                       </f:facet>
+
+                                       <h:link outcome="admin_show_landline">
+                                               <h:outputText value="#{landLineNumber.phoneId}" title="#{msg.ADMIN_LINK_SHOW_SHORT_TITLE}" />
+                                               <f:param name="phoneId" value="#{landLineNumber.phoneId}" />
+                                       </h:link>
+                               </h:column>
+
+                               <h:column>
+                                       <f:facet name="header">
+                                               <h:outputText value="#{msg.ADMIN_SHOW_PHONE_NUMBER}" />
+                                       </f:facet>
+
+                                       <h:outputText value="#{landLineNumber.phoneCountry.countryAbroadDialPrefix}#{landLineNumber.phoneCountry.countryPhoneCode} (#{landLineNumber.phoneAreaCode}) #{landLineNumber.phoneNumber}" />
+                               </h:column>
+
+                               <h:column>
+                                       <f:facet name="header">
+                                               <h:outputText value="#{msg.ADMIN_SHOW_PHONE_CREATED}" />
+                                       </f:facet>
+
+                                       <h:outputText value="#{landLineNumber.phoneEntryCreated.time}">
+                                               <f:convertDateTime type="both" />
+                                       </h:outputText>
+                               </h:column>
+
+                               <h:column>
+                                       <f:facet name="header">
+                                               <h:outputText value="#{msg.ADMIN_SHOW_PHONE_UPDATED}" />
+                                       </f:facet>
+
+                                       <h:outputText value="#{landLineNumber.phoneEntryUpdated.time}">
+                                               <f:convertDateTime type="both" />
+                                       </h:outputText>
+                               </h:column>
+                       </h:dataTable>
+
+                       <h:outputText styleClass="errors" value="#{msg.ADMIN_LIST_LAND_LINE_EMPTY}" rendered="#{phoneController.allLandLineNumbers().isEmpty()}" />
+               </ui:define>
+       </ui:composition>
+</html>
diff --git a/web/admin/landline/admin_landline_show.xhtml b/web/admin/landline/admin_landline_show.xhtml
new file mode 100644 (file)
index 0000000..79e2d55
--- /dev/null
@@ -0,0 +1,92 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html
+       lang="#{localizationController.language}" xml:lang="#{localizationController.language}"
+       xmlns="http://www.w3.org/1999/xhtml"
+       xmlns:ui="http://xmlns.jcp.org/jsf/facelets"
+       xmlns:h="http://xmlns.jcp.org/jsf/html"
+       xmlns:f="http://xmlns.jcp.org/jsf/core"
+       >
+
+       <f:metadata>
+               <f:viewParam name="phoneId" value="#{beanHelper.landLineNumber}" converter="LandLineConverter" required="true" requiredMessage="#{msg.ERROR_PARAMETER_PHONE_ID_NOT_SET}" />
+       </f:metadata>
+
+       <ui:composition template="/WEB-INF/templates/admin/admin_base.tpl">
+               <ui:define name="admin_title">#{msg.PAGE_TITLE_ADMIN_SHOW_LAND_LINE}</ui:define>
+
+               <ui:define name="content_header">
+                       #{msg.CONTENT_TITLE_ADMIN_SHOW_LAND_LINE}
+               </ui:define>
+
+               <ui:define name="content">
+                       <ui:include src="/WEB-INF/templates/admin/landline/admin_landline_data.tpl">
+                               <ui:param name="isShowPage" value="#{true}" />
+                       </ui:include>
+
+                       <h:dataTable id="contact_landline_link" var="contact" value="#{contactPhoneController.allLandLineContacts()}" summary="#{msg.TABLE_SUMMARY_ADMIN_SHOW_LAND_LINE_LINKS}" headerClass="table_header_column" styleClass="table_medium">
+                               <f:facet name="header">
+                                       <h:outputFormat value="#{msg.ADMIN_HEADER_SHOW_LAND_LINE_LINKS}">
+                                               <f:param value="#{beanHelper.landLineNumber.phoneId}" />
+                                       </h:outputFormat>
+                               </f:facet>
+
+                               <h:column>
+                                       <h:outputLabel for="contactId" styleClass="table_data_label" value="#{msg.ADMIN_CONTACT_ID}" />
+
+                                       <h:link id="contactId" styleClass="table_data_field" outcome="admin_show_contact">
+                                               <h:outputText value="#{contact.contactId}" />
+                                               <f:param name="contactId" value="#{contact.contactId}" />
+                                       </h:link>
+                               </h:column>
+
+                               <h:column>
+                                       <h:outputLabel for="contactGender" styleClass="table_data_label" value="#{msg.ADMIN_CONTACT_GENDER}" />
+
+                                       <h:outputText id="contactGender" styleClass="table_data_field" value="#{msg[contact.contactGender.messageKey]}" />
+                               </h:column>
+
+                               <h:column>
+                                       <h:outputLabel for="contactTitle" styleClass="table_data_label" value="#{msg.ADMIN_CONTACT_TITLE}" />
+
+                                       <h:outputText id="contactTitle" styleClass="table_data_field" value="#{contact.contactTitle}" />
+                               </h:column>
+
+                               <h:column>
+                                       <h:outputLabel for="contactFirstName" styleClass="table_data_label" value="#{msg.ADMIN_CONTACT_FIRST_NAME}" />
+
+                                       <h:outputText id="contactFirstName" styleClass="table_data_field" value="#{contact.contactFirstName}" />
+                               </h:column>
+
+                               <h:column>
+                                       <h:outputLabel for="contactFamilyName" styleClass="table_data_label" value="#{msg.ADMIN_CONTACT_FAMILY_NAME}" />
+
+                                       <h:outputText id="contactFamilyName" styleClass="table_data_field" value="#{contact.contactFamilyName}" />
+                               </h:column>
+
+                               <h:column>
+                                       <h:outputLabel for="contactEmailAddress" styleClass="table_data_label" value="#{msg.ADMIN_CONTACT_EMAIL_ADDRESS}" />
+
+                                       <h:outputLink id="contactEmailAddress" styleClass="table_data_field" value="mailto:#{contact.contactEmailAddress}">
+                                               <h:outputText value="#{contact.contactEmailAddress}" />
+                                       </h:outputLink>
+                               </h:column>
+
+                               <h:column>
+                                       <h:outputLabel styleClass="table_data_label" value="#{msg.ADMIN_SHOW_LAND_LINE_UNLINK}" />
+
+                                       <div class="table_data_field">
+                                               <ul class="mini_nav">
+                                                       <li class="mini_link">
+                                                               <h:link outcome="admin_unlink_contact_landline">
+                                                                       <h:outputText styleClass="unlink_link" value="#{msg.ADMIN_LINK_UNLINK_SHORT}" title="#{msg.ADMIN_LINK_UNLINK_SHORT_TITLE}" />
+                                                                       <f:param name="phoneId" value="#{beanHelper.landLineNumber.phoneId}" />
+                                                                       <f:param name="contactId" value="#{contact.contactId}" />
+                                                               </h:link>
+                                                       </li>
+                                               </ul>
+                                       </div>
+                               </h:column>
+                       </h:dataTable>
+               </ui:define>
+       </ui:composition>
+</html>
index 4026710ab0bfe153aab40f066c0115a3d950cfae..7f03ff84616a57205d705863bab2821ef205302d 100644 (file)
@@ -18,7 +18,7 @@
                        <h:dataTable id="table_list_mobiles" var="mobile" value="#{phoneController.allMobileNumbers()}" styleClass="table_big" headerClass="table_header_column" summary="#{msg.TABLE_SUMMARY_ADMIN_LIST_MOBILES}" rendered="#{not phoneController.allMobileNumbers().isEmpty()}">
                                <h:column>
                                        <f:facet name="header">
-                                               <h:outputText value="#{msg.ADMIN_SHOW_MOBILE_ID}" />
+                                               <h:outputText value="#{msg.ADMIN_SHOW_PHONE_ID}" />
                                        </f:facet>
 
                                        <h:link outcome="admin_show_mobile">
@@ -48,7 +48,7 @@
 
                                <h:column>
                                        <f:facet name="header">
-                                               <h:outputText value="#{msg.ADMIN_SHOW_MOBILE_CREATED}" />
+                                               <h:outputText value="#{msg.ADMIN_SHOW_PHONE_CREATED}" />
                                        </f:facet>
 
                                        <h:outputText value="#{mobile.phoneEntryCreated.time}">
@@ -58,7 +58,7 @@
 
                                <h:column>
                                        <f:facet name="header">
-                                               <h:outputText value="#{msg.ADMIN_SHOW_MOBILE_UPDATED}" />
+                                               <h:outputText value="#{msg.ADMIN_SHOW_PHONE_UPDATED}" />
                                        </f:facet>
 
                                        <h:outputText value="#{mobile.phoneEntryUpdated.time}">