新增游客查看各个用户项目的功能之显示用户列表并支持跳转

This commit is contained in:
高子兴 2024-07-14 17:52:52 +08:00
parent 9c018b126b
commit ff46d02ec2
2 changed files with 12 additions and 1 deletions

View File

@ -27,6 +27,17 @@
<h:body>
<ui:include src="header.xhtml"/>
<main>
<h:form id="visitorForm" rendered="#{!projectBean.isLoggedIn}">
<section id="user-list">
<h1>Select a user and visit their projects</h1>
<ui:repeat value="#{projectBean.users}" var="user">
<h:commandButton value="#{user}" action="#{projectBean.visitorSetUsername(user)}"
styleClass="project-button">
<f:ajax render="visitorForm"/>
</h:commandButton>
</ui:repeat>
</section>
</h:form>
<h:form id="userInfoForm" rendered="#{projectBean.isLoggedIn}">
<h:panelGroup id="displayState" style="display: block;">
<section id="user-info">

View File

@ -129,7 +129,7 @@ footer {
}
/* Project list item styling */
#project-list {
#project-list, #user-list {
font-family: Arial, sans-serif;
background-color: #f9f9f9;
padding: 20px;