diff --git a/src/main/java/org/olat/user/HomePageDisplayController.java b/src/main/java/org/olat/user/HomePageDisplayController.java index 17b09d7792edcfdec1f195701c14dadcf4c8aae2..86bd497d7f8713b892825a9a969f249c1a0a810e 100644 --- a/src/main/java/org/olat/user/HomePageDisplayController.java +++ b/src/main/java/org/olat/user/HomePageDisplayController.java @@ -34,11 +34,13 @@ import org.olat.core.gui.UserRequest; import org.olat.core.gui.components.Component; import org.olat.core.gui.components.link.Link; import org.olat.core.gui.components.link.LinkFactory; +import org.olat.core.gui.components.panel.Panel; import org.olat.core.gui.components.velocity.VelocityContainer; import org.olat.core.gui.control.Controller; import org.olat.core.gui.control.Event; import org.olat.core.gui.control.WindowControl; import org.olat.core.gui.control.controller.BasicController; +import org.olat.core.helpers.Settings; import org.olat.core.id.Identity; import org.olat.core.id.User; import org.olat.core.id.UserConstants; @@ -56,7 +58,7 @@ import org.springframework.beans.factory.annotation.Autowired; * * @author Alexander Schneider * - * Comment: + * Comment: This controller displays the users visiting card */ public class HomePageDisplayController extends BasicController { private static final String usageIdentifyer = HomePageConfig.class.getCanonicalName(); @@ -75,7 +77,7 @@ public class HomePageDisplayController extends BasicController { */ public HomePageDisplayController(UserRequest ureq, WindowControl wControl, Identity homeIdentity, HomePageConfig hpc) { super(ureq, wControl); - + // use property handler translator for translating of user fields setTranslator(userManager.getPropertyHandlerTranslator(getTranslator())); VelocityContainer mainVC = createVelocityContainer("homepagedisplay"); @@ -98,6 +100,12 @@ public class HomePageDisplayController extends BasicController { } mainVC.contextPut("userPropertyHandlers", userPropertyHandlers); mainVC.contextPut("homepageConfig", hpc); + + // Add external link to visiting card + StringBuilder extLink = new StringBuilder(); + extLink.append(Settings.getServerContextPathURI()) + .append("/url/HomeSite/").append(homeIdentity.getKey()); + mainVC.contextPut("extLink", extLink); Controller dpc = new DisplayPortraitController(ureq, getWindowControl(), homeIdentity, true, false); listenTo(dpc); // auto dispose diff --git a/src/main/java/org/olat/user/UserInfoMainController.java b/src/main/java/org/olat/user/UserInfoMainController.java index f13de012d9970725c1be21f897eaf134578d978d..ddf4a6b61c24a2b5dbd6b9ae8fb2f967b3738c7b 100644 --- a/src/main/java/org/olat/user/UserInfoMainController.java +++ b/src/main/java/org/olat/user/UserInfoMainController.java @@ -119,7 +119,7 @@ public class UserInfoMainController extends MainLayoutBasicController implements */ public UserInfoMainController(UserRequest ureq, WindowControl wControl, Identity chosenIdentity) { super(ureq, wControl); - + this.chosenIdentity = chosenIdentity; main = new Panel("userinfomain"); @@ -134,6 +134,12 @@ public class UserInfoMainController extends MainLayoutBasicController implements menuTree.setSelectedNodeId(tm.getRootNode().getChildAt(0).getIdent()); menuTree.addListener(this); + // override if user is guest, don't show anything + if (ureq.getUserSession().getRoles().isGuestOnly()) { + main = new Panel("empty"); + menuTree = null; + } + LayoutMain3ColsController columnLayoutCtr = new LayoutMain3ColsController(ureq, getWindowControl(), menuTree, main, "userinfomain"); listenTo(columnLayoutCtr); putInitialPanel(columnLayoutCtr.getInitialComponent()); diff --git a/src/main/java/org/olat/user/_content/homepagedisplay.html b/src/main/java/org/olat/user/_content/homepagedisplay.html index 51f5d7de255832e9db00169c7c86d2e8a636a5d9..b90847be93ccb61e4dc8b38dcf373c24a4d6eafa 100644 --- a/src/main/java/org/olat/user/_content/homepagedisplay.html +++ b/src/main/java/org/olat/user/_content/homepagedisplay.html @@ -56,4 +56,19 @@ #end </table> </div> -</div></div> \ No newline at end of file +</div></div> + +<div class="o_extlink clearfix o_block_large_bottom"> + <h5>$r.translate("extlink")</h5> + <div class="o_copy_code"> + <a href="javascript:;" id="o_extlink" data-original-title="" title=""><i class="o_icon o_icon-lg o_icon-fw o_icon_qrcode"></i></a> + $extLink + <script type="text/javascript"> + /* <![CDATA[ */ + jQuery(function() { + o_QRCodePopup('o_extlink', '$extLink', 'right'); + }); + /* ]]> */ + </script> + </div> +</div> diff --git a/src/main/java/org/olat/user/_i18n/LocalStrings_de.properties b/src/main/java/org/olat/user/_i18n/LocalStrings_de.properties index c7d046af712f27daeab77235ba6fc21b3b087d55..6a201168a1a807b2fc048062cc5cc66ca1e70d64 100644 --- a/src/main/java/org/olat/user/_i18n/LocalStrings_de.properties +++ b/src/main/java/org/olat/user/_i18n/LocalStrings_de.properties @@ -104,6 +104,7 @@ error.password.empty=Geben Sie Ihr bisheriges Passwort an error.password.noauth=Ihr bisheriges Passwort ist nicht korrekt error.password.nomatch=Die beiden neuen Passw\u00F6rter stimmen nicht \u00FCberein. error.user.logged.in=Diese \u00C4nderung kann nicht vorgenommen werden da der Benutzer {0} zur Zeit eingeloggt ist. Warten Sie bis der Benutzer sich ausloggt und versuchen Sie es erneut. +extlink=Externer Link zur Visitenkarte form.address=Adresse form.charset=Zeichensatz f\u00FCr Download form.checkPassword=Das Passwort muss mindestens 4 Zeichen haben. Verwenden Sie dabei sowohl Ziffern als auch Buchstaben. diff --git a/src/main/java/org/olat/user/_i18n/LocalStrings_en.properties b/src/main/java/org/olat/user/_i18n/LocalStrings_en.properties index 564e229a9d1104565021194ca3f10db1d26495ef..4eadc608fd5f7444d13d95666877556908ebb244 100644 --- a/src/main/java/org/olat/user/_i18n/LocalStrings_en.properties +++ b/src/main/java/org/olat/user/_i18n/LocalStrings_en.properties @@ -104,6 +104,7 @@ error.password.empty=Please indicate your previous password error.password.noauth=Your previous password is inaccurate error.password.nomatch=The two new passwords do not match. error.user.logged.in=This change can not be made as the user {0} is currently logged in. Please wait until the user has logged out and try it again. +extlink=External link to visiting card form.address=Address form.charset=Character set used in download form.checkPassword=Your password must contain at least 4 characters and include digits and letters. diff --git a/src/main/resources/database/mysql/alter_10_0_0_to_10_1_0.sql b/src/main/resources/database/mysql/alter_10_0_0_to_10_1_0.sql index efc55b1713b5e6e225235d4ee088c99a939ed624..9610ca7f2bfab47bb7f22c6bd099c544ed754362 100644 --- a/src/main/resources/database/mysql/alter_10_0_0_to_10_1_0.sql +++ b/src/main/resources/database/mysql/alter_10_0_0_to_10_1_0.sql @@ -133,7 +133,7 @@ create or replace view o_as_eff_statement_groups_v as ( ); ---clean up +-- clean up drop view o_qp_item_shared_v; drop view o_qp_item_pool_v; drop view o_qp_item_author_v; diff --git a/src/main/resources/database/oracle/alter_10_0_0_to_10_1_0.sql b/src/main/resources/database/oracle/alter_10_0_0_to_10_1_0.sql index 93d49b57cf9d74a7961c08f379dc27c8f2ddfa75..2f336a790ef4112f95b58402ba5fbbb67a665d8e 100644 --- a/src/main/resources/database/oracle/alter_10_0_0_to_10_1_0.sql +++ b/src/main/resources/database/oracle/alter_10_0_0_to_10_1_0.sql @@ -43,7 +43,7 @@ alter table o_bs_identity add external_id varchar2(64 char); alter table o_catentry add style varchar2(16 char); ---coaching +-- coaching create or replace view o_as_eff_statement_identity_v as ( select sg_re.repositoryentry_id as re_id, diff --git a/src/main/resources/database/postgresql/alter_10_0_0_to_10_1_0.sql b/src/main/resources/database/postgresql/alter_10_0_0_to_10_1_0.sql index f6f4beba0b04c064ee60a9f8ef8cd0adb17be8cf..34582f10fd867069c335bf0574cc911872d6c2ca 100644 --- a/src/main/resources/database/postgresql/alter_10_0_0_to_10_1_0.sql +++ b/src/main/resources/database/postgresql/alter_10_0_0_to_10_1_0.sql @@ -43,7 +43,7 @@ alter table o_bs_identity add column external_id varchar(64); alter table o_catentry add column style varchar(16); ---coaching +-- coaching create view o_as_eff_statement_identity_v as ( select sg_re.repositoryentry_id as re_id, diff --git a/src/main/resources/serviceconfig/olat.properties b/src/main/resources/serviceconfig/olat.properties index 0dcbfb022ab7bd89aa4fa933429c90b300367085..2ac4b6be647894e60e6222b321583d63d5b815dc 100644 --- a/src/main/resources/serviceconfig/olat.properties +++ b/src/main/resources/serviceconfig/olat.properties @@ -931,7 +931,7 @@ ldap.learningResourceManagerRoleValue= # Build properties ##### application.name=OpenOLAT -build.version=10.1a +build.version=10.1b build.identifier=openolat101-dev build.repo.revision=local-devel diff --git a/src/main/webapp/static/cp_offline_menu_mat/mktree.css b/src/main/webapp/static/cp_offline_menu_mat/mktree.css index fe7986d1a8597e6df04d977c3ccf28d95a5ab3c7..7cb8494928f622167ab7a307bfe04079e475f5ed 100644 --- a/src/main/webapp/static/cp_offline_menu_mat/mktree.css +++ b/src/main/webapp/static/cp_offline_menu_mat/mktree.css @@ -19,10 +19,12 @@ html, body { } #main { background:#fff; + width: 100%; + height:100%; min-height:500px; } #menu { width:250px; float:left; font-size: 90%; padding: 5px;} -#content {margin-left:250px; position:relative;} +#content {margin-left:250px; position:relative; height: 100%;} #content iframe { width:100%; min-height:100%; border:none; } /* Turn off list bullets */