From 6aad7fca4bd1ef6aab41340091dae5eda8b5e9af Mon Sep 17 00:00:00 2001 From: Roland Haeder Date: Fri, 16 Oct 2015 18:38:26 +0200 Subject: [PATCH] Rewrite (unfinished): - added beans for profile and profile modes - added new template user_profile_link.xhtml for easy inclusion of profile links. Just handle over the whole User instance - added new template profile_mode_selection_box.tpl for easy profile mode selection - updated jar(s) --- lib/jcontacts-business-core.jar | Bin 54173 -> 54173 bytes lib/jcontacts-core.jar | Bin 20766 -> 20766 bytes lib/jcontacts-lib.jar | Bin 660 -> 660 bytes lib/jcore-logger-lib.jar | Bin 2533 -> 2533 bytes lib/jcore.jar | Bin 13656 -> 13656 bytes lib/jcoreee.jar | Bin 18591 -> 18591 bytes lib/jcountry-core.jar | Bin 6194 -> 6194 bytes lib/jphone-core.jar | Bin 22986 -> 22986 bytes lib/juser-core.jar | Bin 26317 -> 28474 bytes lib/juser-lib.jar | Bin 3987 -> 3987 bytes .../beans/profile/UserProfileWebBean.java | 59 ++++++++++++++++++ .../profile/UserProfileWebController.java | 42 +++++++++++++ .../beans/profilemode/ProfileModeWebBean.java | 48 ++++++++++++++ .../profilemode/ProfileModeWebController.java | 35 +++++++++++ .../addressbook/beans/user/UserWebBean.java | 21 ++++--- .../beans/user/UserWebController.java | 13 ++-- .../localization/bundle_de_DE.properties | 1 + .../localization/bundle_en_US.properties | 1 + .../templates/generic/form_personal_data.tpl | 7 +-- .../generic/profile_mode_selection_box.tpl | 12 ++++ .../templates/generic/user_profile_link.tpl | 23 +++++++ web/login/login_shared_addressbooks.xhtml | 7 +-- .../login_start_sharing_addressbook.xhtml | 6 +- web/user/show_addressbook.xhtml | 4 +- web/user/user_list.xhtml | 12 ++-- 25 files changed, 255 insertions(+), 36 deletions(-) create mode 100644 src/java/org/mxchange/addressbook/beans/profile/UserProfileWebBean.java create mode 100644 src/java/org/mxchange/addressbook/beans/profile/UserProfileWebController.java create mode 100644 src/java/org/mxchange/addressbook/beans/profilemode/ProfileModeWebBean.java create mode 100644 src/java/org/mxchange/addressbook/beans/profilemode/ProfileModeWebController.java create mode 100644 web/WEB-INF/templates/generic/profile_mode_selection_box.tpl create mode 100644 web/WEB-INF/templates/generic/user_profile_link.tpl diff --git a/lib/jcontacts-business-core.jar b/lib/jcontacts-business-core.jar index c2de43d60cf9c954aee5af584e3669c569c4cc4d..3c2c675d34181336d42c69619169c25415eb9a2a 100644 GIT binary patch delta 420 zcmbQcoO$kYW}X0VW)?061`Y;>w^JwbXfnN-I?;Rqh`gx)B7cKKCaW=8GrgTUIhoNF zM6F_U0#WZ6-9VHXlM9HdVe$Y`$C%tf6hE^AP~YZ2=7+2x+JtkxD2RS4C&vbq-pr~x zUjoEmX1jwG#7}V6kOa|PG0XWu;>J0V%piVWzL^w=f2{KdSl@vOm69O7^(qc9-*v-T zE)ZX2w-6JE*4X=*5u{IczcUw*o}6^j5-2=*?n#hqCf`440HOp>fdzd|d4rV9JQWI} zKAZ{yQ7)&$K-8SmAt370=?Dy_g5$eZ2@)nQ|!uBzW!;Sc%c) FYycfs$bbL< delta 420 zcmbQcoO$kYW}X0VW)?061`Y;>33U^BG@1JACYmn*kvA1U5S7g63Zhmq zI)SKnjBX&xjL8K=)i8O0sAEj-Ac~*a0Z45QWPZpBqD?s0i-PEk_33m3i1IlT4x*Nx2>?;w&m@4T$g}YvYS-Bu5T$W08$?Y#mja@GLwFhI wb3wf8=hHxx{e?^rwdz6=h~m3g3Zhys=7FfM7r`o1E@gmt=PrSj7+uZ=0M1RX1ONa4 diff --git a/lib/jcontacts-core.jar b/lib/jcontacts-core.jar index c86495c7e7c050e1a3601f996a49d4a280760bf4..c0b14e4478c1cdddc52d75c13e9dd45854341f2f 100644 GIT binary patch delta 199 zcmbQYh;iN`MxFp~W)?061`Y;>H&Z9_XfnN?I?;Rq6OesV0Yv`R1d@~07>z+xG@~_$ zn!)GlZSXW7jGi(7b{WdZUhv-?^C4WI1f>j2`l z_!@wyZ9qXF_0iWEM49<{gQ#Y|AP{xk&ksbY`$vGNM*kQPb>BY@MA-){B*k22nE@ zoj}wbMmr$2S%yiB6GWSE=W2lH#l~N`K=drTIbd-MkFzXH{dJSseJz2)lbw7WKvavb y0f^cL5&Y=u4C0yjd4s5CzaS8G-Omq1sryHOs7C)75Ov=_4n)}pB!j3W0aXB_O-Nn< diff --git a/lib/jcontacts-lib.jar b/lib/jcontacts-lib.jar index abcaef84108457319ee82b2cef4f98f34167a28c..b68b58118ffea01b1f5651b62d4c1b1fb13493a0 100644 GIT binary patch delta 80 zcmbQjI)#-dz?+$ci-CcIf#L1ci9DK2Z>CN(U%&)p-&6pRzcqp6WHm-p5EaX436!5a VgV6!RyTxb#qIj4rL6kd_F92fT9jX8T delta 80 zcmbQjI)#-dz?+$ci-CcIfnh@3L>^71{&R zI)kXkj9x%$vp$m{6NpY?DFD%vudrDH4Vlc(?f~KivKxS?W_C*uwU6B$M6q-Df~YW# SU=X#MBML0YnGB+GI4c1>JUaLQ delta 152 zcmaDV{8X4Hz?+$ci-CcIfuW;rB9A6hd)-9y1x!HpO$8A7TN6l5R%0{=QSpqnAZi|? zGl+W3=mn%U>oXZLf#@Wb0uVj<3Y#U+kjeb)4j^72y8(!5X14@U``Fz<6g!76hzjEf S22rayqQHWj$sj6+vl0N8rZKDl diff --git a/lib/jcore.jar b/lib/jcore.jar index 88b7a44ddf14adc8aa4682d7fffd48ff6317d488..9e3538d91c157679bcad8ef905c8cc45c413b40c 100644 GIT binary patch delta 371 zcmcbSbt8)>z?+$ci-CcIf#Jo}i9DK2&!E^f(r&Q4w2B{?&Q?uf1L?b{J&lp+#nj1}x|Trh z^&0}BT0*@Jjf^t?gTLp?VTrK#@);mJ&%sILWL?$vh(QEUdmAS&7* z0z_>!2nSJohA|*2$1njzoihvrQEEm(Agao!07Shp$_7!9#yKGBxG`9Xya`xIu?bl2 Hfk_1bEoqu9 delta 371 zcmcbSbt8)>z?+$ci-CcIfuW;rB9A6hd)-9y1t9XK0*L$#5}B;Vs1KsT8LdGS2b1b# z0~Yql2N=0P+%t?;5K%J_<-lYPqAHo3fz;-GOs9B2bQiw|6NtVdc$*PKZxnt4rl*U( zULzFES^~L~ zm*_fxsAswcAWA|HEEue358_SH^9E55_1r*|roI=1Co_4Xz7~kNSKl2(u^9w|sAz)- z5Vh4H97ORM#(=0C!vqj@&M*u_sTl=S5qhQXfnN=I?;Rqh`gx)B7cKKCaWBon~^69Y`;Bvtea=HFdIwqa~0xx!Doy zhNF%KAl`R~ppla!h*#?51)>f*d4niE=Kv6u;2Z~{4mbxvcrud>T)@sc;4CwFf{PhQ t^n^gh}!F(4WhI>N&){7jClY6 delta 341 zcmbO~k#YV+MxFp~W)?061`Y;>uDXdlnoON_6U`TZ$eRiv@;69ivKpfyh>B#i0#Q>L ztwGc!Mh6hJg2{05d}mQEm@z=1A3&l1&YY9yF>ydt_<^V&Oim!mhS>v1ZEj<}zy_it zxXeL{Hcu2PX(spBf%IZG8&;;Sy2&1nmO$R*W=F6a zjyf8Ec;6v{Mox|(Ua6B8h&t%x4Wjs*13*-Qa~y~|;2Z?u$xJqI0Xyq}v&`fPE@mLn t6D|=TO35_=M76l4fT&llSs*IRtr0}sbjt)$F7D+ZYOi}Xh|=;X1pt_Lc=G@N diff --git a/lib/jcountry-core.jar b/lib/jcountry-core.jar index a4ca64879ae0c0f7d0d6c1706b65c1e6da7ff60d..7b0501d2ef370d08e325c522f0da339da564ab06 100644 GIT binary patch delta 124 zcmdmFu*rZYz?+$ci-CcIf#KEEi9DK2FQ-m4UjQO+DuBq}Ad$&xj7CharcRDxGzaoF zPiE|6268tmv)&T`2{VgXf)v?_Ie@4JF#`~_2_pDb%n78#P~06PSS20;;$09=0svNH BFz)~W delta 124 zcmdmFu*rZYz?+$ci-CcIfuXBzB9A6hXWc~e1x!HpO$8A7TN6l5R%0{*QBjQMKx*@3 z#y(~ct;~8)03^&TW(m|b*-p#>#A^^U08yKOfVkL@0HhTu AhX4Qo diff --git a/lib/jphone-core.jar b/lib/jphone-core.jar index c9d5f503a7eb5b20e55e3e25fe059a49f3cf9785..018368a9653b49ef34de6147f45a8e7e76909cf6 100644 GIT binary patch delta 316 zcmX@Lneo(SMxFp~W)?061`Y;>H&Z9_XfnN?I?;Rqh`gx)B7cKKCaWiIuVdW|rZ;+B2dnS$z0Sh)X6oeRAWNX~$@797K-7aEuycfh!GgZQV8Q-i zUy$6r;BXLS9uf$mx+c4HgVd1W|88b3jydSP6)_7?uH|tiuyP)ZFkQ V5G5Fq1)^#r3P99*2roJ^9{@#+iM{{; delta 316 zcmX@Lneo(SMxFp~W)?061`Y;>zPgD#noPZQ6U`Se0ogYdK;&;tAURo$(Evn6FxrBs z>5T3m>H(u8h*D;915w#bo*-%)lQodq{F$kM2}Gx|o)84l`rpEC{m+y5Jpt{M)L6$(5O`aFz0OCCe0y{@2*b>C^4F(JL z2m69}_kzPglzB)Xi0TRn15uAcB0-dGs5e+JG!aC-4b1^j(P1SZ>S9<1h_Vh(08w+p Wi$IiML>7pujVJ(7?;*VC$b10d$#${; diff --git a/lib/juser-core.jar b/lib/juser-core.jar index 8ec885568dd80e945c627cd2a49856fc6ee1b99d..ff5b3c74e1c64d288b59fb88e1e3974250580b90 100644 GIT binary patch delta 2425 zcmcgtZERCj7=G`)y=~XsZf*C~ZkO$rj*Si00UaNMZH%!pI@(cI_5~fK+lpbLLkjv! z(Zs}PLNYknAB~E_5B=p>i5gVo$4Ep4A!-OFqA}4(OqgE~iHN@MX(zkW`qP`7^Yne* zkNcc+-=1^vqHyNApoF(b1`B{0U}oZ|QX}4+IJ){c&DS)Ve`w|b0 zjUNV+xK*;2MMnXXea64#qOJtAPA{?g+208C3>KBQByrkbic(tsN zqeDBw<6iNMaz!SQVE2NKtJt$X_1Z6^SYh$98`_~Czr<7PGAV$ke-Su6NiX9Im4))Bi)^g0T$on6~9Lawqv5L*r&TJ{E ziZz#|%H+ZL!9z)HLsz?Y$UAQZTC=v6iz;X`3M|s^sm@kQfSf>AZy*wA3;G49V&ki- zQqkr+0(+*#YVm;p4GCBYt5Wgx(e^=El>~3OyDxXatqjC1x-Hk zG?>9*hLsllxr*%7W+)_FV}>HaMiZ(;ZUT>%DFB{%CW0m3^r?nc8ARu zleWaAKoc~xZT*Y-vMoq~a%fRtA*@%R7)k_i^+f#Lv2gd+O@W|47TVhGM{xJ^isylZvkza=0J-=#(a+P7zP}9vLkKg8{b1)nu6TOfME)(kpX!M z@*^n_PT{N4yW+t11>BE(Tu?a*s>9tBGZL4;QZBV_?s1*EwEeVEoS9%x@8qZc`#br? zAVinpAZYFk8JACE9gf-OZPQRl1e(iGZluuHu&Ao&iD5{zjJoZ@9yDS zW@d&_iItp8iBKp)!vj8*iS-Tma&Ex$wE)lGpkM>D2hhwE0Io7cfOpJ(KpblUw6J9W zJ!irZx-dM?Dq;AE%?qdp0k^pl0{;^Cg#j+eJqlors+^8T!}T1DA4SwrYP2m>_eM9e zpik=>Wx!-UkJ2h!q`t37Zpx;VJCtF&o^s*70kQ1ytp|N#3__xR!EBHhX?nWtU1HBE zkIN=@bvj%gJAJ50U4v*yYyY@cgnzT;) z*@lg^qK&3at7*G8wQnGp>Uht6ZaJCFzGQHZ57Ez+iA>}Ns{A?jHDJ88 z4zS!>0VuJHfD!v~z@ohdU~!ZOMm)ah*bQHEojm^OFyMvk5Vcszuv#wA^(1x4$+Oou zoW;fB$t?-^qcajF{37ZFIaM!*>;P4OL;IFKG4vfF1d&f-?K3{O6o&O$0WYe<@!iur zl$a&3gs-YvEVv>Qp+v1v>iWSV1W~*;pKyH8hL5`H=rX)+Mf;a%5W$}NQKVogR=QQN zM2wqfbza3(WF}HqGe%J9X4YR$ z@`7dsZRVVroO&`o-yTPeL2Vjjj4Pu?(zW=*YSn&IR%9RfGlK}O`loW;T+pGTm1oCJ h&K*-A1YrrP{G>i$&W^zeooaO=N<@WW2=z9D>mSxAo|*sv diff --git a/lib/juser-lib.jar b/lib/juser-lib.jar index 1e1d78671130111afc6017b45dddc25771fe7dcf..d4090c07c6c9e68d9d9a618e907e727b32c0f76a 100644 GIT binary patch delta 180 zcmbO%KUtn9z?+$ci-CcIf#Lnsi9DK2@1{;PU%&)p-&6pRzcqp6WHm-(5Ead638JPk z+JmU;j7}g*n#m4GZH{K*V+PULtQ=svl*121Pd>_R2{dyOj{}I~#A5)WN_fELtmknC l@xJhQf+%}le-Jf+HwZ*M;q?PiCVcrIYAIhOh*ID$1^^5rM+E=? delta 180 zcmbO%KUtn9z?+$ci-CcIfnieJL>^71iFFgr7cc?YHx)qSZ%rUMS&h*cL`5@Nf~aYX z_8{syqZ5ddX0iiPo1>Zdm_c+lD+ib^v^0( kye~YSAj+QCA4E;y4FXY5c>O?>312>lTFO@mq7?Xx0bNTxB>(^b diff --git a/src/java/org/mxchange/addressbook/beans/profile/UserProfileWebBean.java b/src/java/org/mxchange/addressbook/beans/profile/UserProfileWebBean.java new file mode 100644 index 00000000..f7fd28c7 --- /dev/null +++ b/src/java/org/mxchange/addressbook/beans/profile/UserProfileWebBean.java @@ -0,0 +1,59 @@ +/* + * Copyright (C) 2015 Roland Haeder + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU 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 General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ +package org.mxchange.addressbook.beans.profile; + +import javax.enterprise.context.RequestScoped; +import javax.inject.Inject; +import javax.inject.Named; +import org.mxchange.addressbook.beans.login.UserLoginWebController; +import org.mxchange.jusercore.model.user.User; + +/** + * A web request bean for user profiles + *

+ * @author Roland Haeder + */ +@Named (value = "profileController") +@RequestScoped +public class UserProfileWebBean implements UserProfileWebController { + + /** + * Serial number + */ + private static final long serialVersionUID = 187_687_145_286_710L; + + /** + * Login controller + */ + @Inject + private UserLoginWebController loginController; + + /** + * User instance + */ + private User user; + + @Override + public User getUser () { + return this.user; + } + + @Override + public void setUser (final User user) { + this.user = user; + } +} diff --git a/src/java/org/mxchange/addressbook/beans/profile/UserProfileWebController.java b/src/java/org/mxchange/addressbook/beans/profile/UserProfileWebController.java new file mode 100644 index 00000000..219a7e9b --- /dev/null +++ b/src/java/org/mxchange/addressbook/beans/profile/UserProfileWebController.java @@ -0,0 +1,42 @@ +/* + * Copyright (C) 2015 Roland Haeder + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU 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 General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ +package org.mxchange.addressbook.beans.profile; + +import java.io.Serializable; +import org.mxchange.jusercore.model.user.User; + +/** + * A bean interface for user profiles + *

+ * @author Roland Haeder + */ +public interface UserProfileWebController extends Serializable { + + /** + * Getter for user instance + *

+ * @return User instance + */ + public User getUser (); + + /** + * Setter for user instance + *

+ * @param user User instance + */ + public void setUser (final User user); +} diff --git a/src/java/org/mxchange/addressbook/beans/profilemode/ProfileModeWebBean.java b/src/java/org/mxchange/addressbook/beans/profilemode/ProfileModeWebBean.java new file mode 100644 index 00000000..a7506ee5 --- /dev/null +++ b/src/java/org/mxchange/addressbook/beans/profilemode/ProfileModeWebBean.java @@ -0,0 +1,48 @@ +/* + * Copyright (C) 2015 Roland Haeder + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU 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 General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ +package org.mxchange.addressbook.beans.profilemode; + +import javax.enterprise.context.ApplicationScoped; +import javax.inject.Named; +import org.mxchange.jusercore.model.user.profilemodes.ProfileMode; + +/** + * A profile mode bean + *

+ * @author Roland Haeder + */ +@Named ("profileMode") +@ApplicationScoped +public class ProfileModeWebBean implements ProfileModeWebController { + + /** + * Serial number + */ + private static final long serialVersionUID = 835_482_364_189L; + + /** + * Default constructor + */ + public ProfileModeWebBean () { + } + + @Override + public ProfileMode[] getAllProfileModes () { + // Return it + return ProfileMode.values(); + } +} diff --git a/src/java/org/mxchange/addressbook/beans/profilemode/ProfileModeWebController.java b/src/java/org/mxchange/addressbook/beans/profilemode/ProfileModeWebController.java new file mode 100644 index 00000000..2f6a7ae5 --- /dev/null +++ b/src/java/org/mxchange/addressbook/beans/profilemode/ProfileModeWebController.java @@ -0,0 +1,35 @@ +/* + * Copyright (C) 2015 Roland Haeder + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU 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 General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ +package org.mxchange.addressbook.beans.profilemode; + +import java.io.Serializable; +import org.mxchange.jusercore.model.user.profilemodes.ProfileMode; + +/** + * An interface for data beans + *

+ * @author Roland Haeder + */ +public interface ProfileModeWebController extends Serializable { + + /** + * Getter for all genders as array + *

+ * @return All genders as array + */ + ProfileMode[] getAllProfileModes (); +} diff --git a/src/java/org/mxchange/addressbook/beans/user/UserWebBean.java b/src/java/org/mxchange/addressbook/beans/user/UserWebBean.java index 446624f6..97cdd0a0 100644 --- a/src/java/org/mxchange/addressbook/beans/user/UserWebBean.java +++ b/src/java/org/mxchange/addressbook/beans/user/UserWebBean.java @@ -45,6 +45,7 @@ import org.mxchange.jusercore.events.registration.UserRegisteredEvent; import org.mxchange.jusercore.model.user.LoginUser; import org.mxchange.jusercore.model.user.User; import org.mxchange.jusercore.model.user.UserSessionBeanRemote; +import org.mxchange.jusercore.model.user.profilemodes.ProfileMode; /** * A user bean (controller) @@ -199,7 +200,7 @@ public class UserWebBean implements UserWebController { /** * Whether the user wants a public profile */ - private Boolean userProfilePublic; + private ProfileMode userProfileMode; /** * ZIP code @@ -265,7 +266,7 @@ public class UserWebBean implements UserWebController { this.setUserId(registeredUser.getUserId()); // Is the account public? - if (registeredUser.getUserPublicProfile()) { + if (registeredUser.getUserProfileMode().equals(ProfileMode.PUBLIC)) { // Also add it to this list this.publicUserList.add(registeredUser); } @@ -291,7 +292,7 @@ public class UserWebBean implements UserWebController { // Create new user instance User user = new LoginUser(); user.setUserName(this.getUserName()); - user.setUserPublicProfile(this.getUserProfilePublic()); + user.setUserProfileMode(this.getUserProfileMode()); user.setUserCreated(new GregorianCalendar()); // Generate phone number @@ -612,13 +613,13 @@ public class UserWebBean implements UserWebController { } @Override - public Boolean getUserProfilePublic () { - return this.userProfilePublic; + public ProfileMode getUserProfileMode () { + return this.userProfileMode; } @Override - public void setUserProfilePublic (final Boolean userProfilePublic) { - this.userProfilePublic = userProfilePublic; + public void setUserProfileMode (final ProfileMode userProfileMode) { + this.userProfileMode = userProfileMode; } @Override @@ -656,7 +657,7 @@ public class UserWebBean implements UserWebController { @Override public boolean isRequiredPersonalDataSet () { return ((this.getUserName() != null) && - (this.getUserProfilePublic() != null) && + (this.getUserProfileMode() != null) && (this.getGender() != null) && (this.getFirstName() != null) && (this.getFamilyName() != null) && @@ -716,8 +717,8 @@ public class UserWebBean implements UserWebController { // Clear all data // - personal data this.setUserId(null); - this.setUserProfilePublic(null); this.setGender(Gender.UNKNOWN); + this.setUserProfileMode(null); this.setFirstName(null); this.setFamilyName(null); this.setStreet(null); @@ -750,7 +751,7 @@ public class UserWebBean implements UserWebController { // Copy all fields: // - base data this.setUserId(user.getUserId()); - this.setUserProfilePublic(user.getUserPublicProfile()); + this.setUserProfileMode(user.getUserProfileMode()); this.setGender(user.getUserContact().getContactGender()); this.setFirstName(user.getUserContact().getContactFirstName()); this.setFamilyName(user.getUserContact().getContactFamilyName()); diff --git a/src/java/org/mxchange/addressbook/beans/user/UserWebController.java b/src/java/org/mxchange/addressbook/beans/user/UserWebController.java index 1fecf472..a0bf8d59 100644 --- a/src/java/org/mxchange/addressbook/beans/user/UserWebController.java +++ b/src/java/org/mxchange/addressbook/beans/user/UserWebController.java @@ -24,6 +24,7 @@ import org.mxchange.jcountry.data.Country; import org.mxchange.jphone.phonenumbers.smsprovider.SmsProvider; import org.mxchange.jusercore.events.registration.UserRegisteredEvent; import org.mxchange.jusercore.model.user.User; +import org.mxchange.jusercore.model.user.profilemodes.ProfileMode; /** * An interface for user beans @@ -383,18 +384,18 @@ public interface UserWebController extends Serializable { void setZipCode (final Integer zipCode); /** - * Getter for user public profile flag + * Getter for user profile mode *

- * @return User public profile flag + * @return User profile mode */ - Boolean getUserProfilePublic (); + ProfileMode getUserProfileMode (); /** - * Setter for user public profile flag + * Setter for user profile mode *

- * @param userProfilePublic User public profile flag + * @param userProfileMode User profile mode */ - void setUserProfilePublic (final Boolean userProfilePublic); + void setUserProfileMode (final ProfileMode userProfileMode); /** * Checks whether user instance's email address is used diff --git a/src/java/org/mxchange/localization/bundle_de_DE.properties b/src/java/org/mxchange/localization/bundle_de_DE.properties index 0623ee56..edeadb2a 100644 --- a/src/java/org/mxchange/localization/bundle_de_DE.properties +++ b/src/java/org/mxchange/localization/bundle_de_DE.properties @@ -247,3 +247,4 @@ SHAREE_USER_NAME_TITLE=Mit wem Sie Ihr Adressbuch teilen ADDRESSBOOK_OWNER=Besitzer: ADDRESSBOOK_STATUS=Status: PAGE_TITLE_INDEX_SHOW_ADDRESSBOOK=\u00d6ffentlicher Teil des Adressbuchs anzeigen +USER_PROFILE_NOT_PUBLICLY_VISIBLE=Das Benutzerprofil ist privat. diff --git a/src/java/org/mxchange/localization/bundle_en_US.properties b/src/java/org/mxchange/localization/bundle_en_US.properties index 6b104835..65a5a353 100644 --- a/src/java/org/mxchange/localization/bundle_en_US.properties +++ b/src/java/org/mxchange/localization/bundle_en_US.properties @@ -247,3 +247,4 @@ SHAREE_USER_NAME_TITLE=With who you shared your address book ADDRESSBOOK_OWNER=Owner: ADDRESSBOOK_STATUS=Status: PAGE_TITLE_INDEX_SHOW_ADDRESSBOOK=Show public part of address book +USER_PROFILE_NOT_PUBLICLY_VISIBLE=The user profile is private. diff --git a/web/WEB-INF/templates/generic/form_personal_data.tpl b/web/WEB-INF/templates/generic/form_personal_data.tpl index ad7e4133..2b714b80 100644 --- a/web/WEB-INF/templates/generic/form_personal_data.tpl +++ b/web/WEB-INF/templates/generic/form_personal_data.tpl @@ -201,12 +201,7 @@

- - - - - - +
diff --git a/web/WEB-INF/templates/generic/profile_mode_selection_box.tpl b/web/WEB-INF/templates/generic/profile_mode_selection_box.tpl new file mode 100644 index 00000000..9779bdb5 --- /dev/null +++ b/web/WEB-INF/templates/generic/profile_mode_selection_box.tpl @@ -0,0 +1,12 @@ + + + + + + + + diff --git a/web/WEB-INF/templates/generic/user_profile_link.tpl b/web/WEB-INF/templates/generic/user_profile_link.tpl new file mode 100644 index 00000000..faadd593 --- /dev/null +++ b/web/WEB-INF/templates/generic/user_profile_link.tpl @@ -0,0 +1,23 @@ + + + + + + + + + + + + + + + #{msg.USER_PROFILE_NOT_PUBLICLY_VISIBLE} + + + diff --git a/web/login/login_shared_addressbooks.xhtml b/web/login/login_shared_addressbooks.xhtml index c6b56daa..f63cf622 100644 --- a/web/login/login_shared_addressbooks.xhtml +++ b/web/login/login_shared_addressbooks.xhtml @@ -32,10 +32,9 @@ #{msg.SHAREE_USER_NAME} - - - - + + + diff --git a/web/login/login_start_sharing_addressbook.xhtml b/web/login/login_start_sharing_addressbook.xhtml index d16ac9ff..cd9f4ac2 100644 --- a/web/login/login_start_sharing_addressbook.xhtml +++ b/web/login/login_start_sharing_addressbook.xhtml @@ -24,9 +24,9 @@ #{msg.USER_ID} - - - + + + diff --git a/web/user/show_addressbook.xhtml b/web/user/show_addressbook.xhtml index 8e46e559..ba477df5 100644 --- a/web/user/show_addressbook.xhtml +++ b/web/user/show_addressbook.xhtml @@ -33,7 +33,9 @@ #{msg.ADDRESSBOOK_OWNER} - + + + #{msg.ADDRESSBOOK_CREATED} diff --git a/web/user/user_list.xhtml b/web/user/user_list.xhtml index a10bcb50..9b32294a 100644 --- a/web/user/user_list.xhtml +++ b/web/user/user_list.xhtml @@ -22,16 +22,16 @@ #{msg.USER_ID} - - - + + + #{msg.USER_NAME} - - - + + + -- 2.39.5