diff --git a/client/components/main/popup.css b/client/components/main/popup.css index 889c1eb4c..7ddba701c 100644 --- a/client/components/main/popup.css +++ b/client/components/main/popup.css @@ -93,6 +93,29 @@ max-height: inherit; } +/* Admin edit popups: use full height */ +.pop-over[data-popup="editUser"], +.pop-over[data-popup="editOrg"], +.pop-over[data-popup="editTeam"] { + height: calc(100vh - 20px) !important; + max-height: calc(100vh - 20px) !important; +} + +.pop-over[data-popup="editUser"] .content-wrapper, +.pop-over[data-popup="editOrg"] .content-wrapper, +.pop-over[data-popup="editTeam"] .content-wrapper { + max-height: calc(100vh - 80px) !important; /* Subtract header height */ + height: calc(100vh - 80px) !important; + overflow-y: auto !important; +} + +.pop-over[data-popup="editUser"] .content-container, +.pop-over[data-popup="editOrg"] .content-container, +.pop-over[data-popup="editTeam"] .content-container { + max-height: calc(100vh - 80px) !important; /* Subtract header height */ + height: calc(100vh - 80px) !important; +} + /* Ensure language popup list can scroll properly */ .pop-over .pop-over-list { max-height: none; diff --git a/client/components/settings/peopleBody.css b/client/components/settings/peopleBody.css index 5bbd70e96..bb529b2d2 100644 --- a/client/components/settings/peopleBody.css +++ b/client/components/settings/peopleBody.css @@ -71,6 +71,13 @@ table tr:nth-child(even) { left: 0 !important; display: block !important; } + +/* Make checkbox column fit content */ +table th:first-child, +table td:first-child { + width: auto; + min-width: auto; +} #divAddOrRemoveTeam { background: #008000; display: none; @@ -141,7 +148,7 @@ table tr:nth-child(even) { } .account-active-status { - width: 20px; + width: auto; text-align: center; } @@ -170,7 +177,7 @@ table tr:nth-child(even) { } .account-status { - width: 20px; + width: auto; text-align: center; } diff --git a/client/components/settings/peopleBody.jade b/client/components/settings/peopleBody.jade index bd5641067..0aa9a4dba 100644 --- a/client/components/settings/peopleBody.jade +++ b/client/components/settings/peopleBody.jade @@ -46,6 +46,7 @@ template(name="people") option(value="locked") {{_ 'admin-people-filter-locked'}} option(value="active") {{_ 'admin-people-filter-active'}} option(value="inactive") {{_ 'admin-people-filter-inactive'}} + option(value="admin") Admin button#unlockAllUsers.unlock-all-btn | 🔓 | {{_ 'accounts-lockout-unlock-all'}} @@ -57,7 +58,7 @@ template(name="people") | {{_ 'add'}} / {{_ 'delete'}} {{_ 'teams'}} else if lockedUsersSetting.get span - | 🔒.text-red + span.text-red 🔒 unless isMiniScreen | {{_ 'accounts-lockout-locked-users'}} @@ -78,7 +79,7 @@ template(name="people") | {{_ 'people'}} li a.js-locked-users-menu(data-id="locked-users-setting") - | 🔒.text-red + span.text-red 🔒 | {{_ 'accounts-lockout-locked-users'}} .main-body if loading.get @@ -100,7 +101,6 @@ template(name="orgGeneral") th {{_ 'displayName'}} th {{_ 'description'}} th {{_ 'shortName'}} - th {{_ 'autoAddUsersWithDomainName'}} th {{_ 'website'}} th {{_ 'createdAt'}} th {{_ 'active'}} @@ -140,16 +140,9 @@ template(name="peopleGeneral") th {{_ 'admin-people-active-status'}} th {{_ 'username'}} th {{_ 'fullname'}} - th {{_ 'initials'}} th {{_ 'admin'}} th {{_ 'email'}} - th {{_ 'verified'}} th {{_ 'createdAt'}} - th {{_ 'active'}} - th {{_ 'authentication-method'}} - th {{_ 'import-usernames'}} - th {{_ 'organizations'}} - th {{_ 'teams'}} th +newUserRow tbody @@ -190,10 +183,6 @@ template(name="orgRow") td {{ orgData.orgShortName }} else td {{ orgData.orgShortName }} - if orgData.orgIsActive - td {{ orgData.orgAutoAddUsersWithDomainName }} - else - td {{ orgData.orgAutoAddUsersWithDomainName }} if orgData.orgIsActive td {{ orgData.orgWebsite }} else @@ -258,14 +247,14 @@ template(name="peopleRow") input.selectUserChkBox(type="checkbox", id="{{userData._id}}") td.account-status if isUserLocked - | 🔒.text-red.js-toggle-lock-status(data-user-id=userData._id, data-is-locked="true", title="{{_ 'accounts-lockout-click-to-unlock'}}") + span.text-red.js-toggle-lock-status(data-user-id=userData._id, data-is-locked="true", title="{{_ 'accounts-lockout-click-to-unlock'}}") 🔒 else - | 🔓.text-green.js-toggle-lock-status(data-user-id=userData._id, data-is-locked="false", title="{{_ 'accounts-lockout-user-unlocked'}}") + span.text-green.js-toggle-lock-status(data-user-id=userData._id, data-is-locked="false", title="{{_ 'accounts-lockout-user-unlocked'}}") 🔓 td.account-active-status if userData.loginDisabled - | 🚫.text-red.js-toggle-active-status(data-user-id=userData._id, data-is-active="false", title="{{_ 'admin-people-user-inactive'}}") + span.text-red.js-toggle-active-status(data-user-id=userData._id, data-is-active="false", title="{{_ 'admin-people-user-inactive'}}") 🚫 else - | ✅.text-green.js-toggle-active-status(data-user-id=userData._id, data-is-active="true", title="{{_ 'admin-people-user-active'}}") + span.text-green.js-toggle-active-status(data-user-id=userData._id, data-is-active="true", title="{{_ 'admin-people-user-active'}}") ✅ if userData.loginDisabled td.username {{ userData.username }} else if isUserLocked @@ -276,10 +265,6 @@ template(name="peopleRow") td {{ userData.profile.fullname }} else td {{ userData.profile.fullname }} - if userData.loginDisabled - td {{ userData.profile.initials }} - else - td {{ userData.profile.initials }} if userData.loginDisabled td if userData.isAdmin @@ -296,43 +281,10 @@ template(name="peopleRow") td {{ userData.emails.[0].address }} else td {{ userData.emails.[0].address }} - if userData.loginDisabled - td - if userData.emails.[0].verified - | {{_ 'yes'}} - else - | {{_ 'no'}} - else - td - if userData.emails.[0].verified - | {{_ 'yes'}} - else - | {{_ 'no'}} if userData.loginDisabled td {{ moment userData.createdAt 'LLL' }} else td {{ moment userData.createdAt 'LLL' }} - td - if userData.loginDisabled - | {{_ 'no'}} - else - | {{_ 'yes'}} - if userData.loginDisabled - td {{_ userData.authenticationMethod }} - else - td {{_ userData.authenticationMethod }} - if userData.loginDisabled - td {{ userData.importUsernamesString }} - else - td {{ userData.importUsernamesString }} - if userData.loginDisabled - td {{ userData.orgsUserBelongs }} - else - td {{ userData.orgsUserBelongs }} - if userData.loginDisabled - td {{ userData.teamsUserBelongs }} - else - td {{ userData.teamsUserBelongs }} td a.edit-user | ✏️ @@ -448,8 +400,8 @@ template(name="editUserPopup") option(value="{{value}}") {{_ value}} label | {{_ 'organizations'}} - | ➕#addUserOrg - | ➖#removeUserOrg + span#addUserOrg ➕ + span#removeUserOrg ➖ select.js-orgs#jsOrgs option(value="-1") {{_ 'organizations'}} : each value in orgsDatas @@ -458,8 +410,8 @@ template(name="editUserPopup") input#jsUserOrgIdsInPut.js-userOrgIds.hide(type="hidden" value=user.orgIdsUserBelongs) label | {{_ 'teams'}} - | ➕#addUserTeam - | ➖#removeUserTeam + span#addUserTeam ➕ + span#removeUserTeam ➖ select.js-teams#jsTeams option(value="-1") {{_ 'teams'}} : each value in teamsDatas @@ -591,8 +543,8 @@ template(name="newUserPopup") option(value="{{value}}") {{_ value}} label | {{_ 'organizations'}} - | ➕#addUserOrgNewUser - | ➖#removeUserOrgNewUser + span#addUserOrgNewUser ➕ + span#removeUserOrgNewUser ➖ select.js-orgsNewUser#jsOrgsNewUser option(value="-1") {{_ 'organizations'}} : each value in orgsDatas @@ -601,8 +553,8 @@ template(name="newUserPopup") input#jsUserOrgIdsInPutNewUser.js-userOrgIdsNewUser.hide(type="text" value=user.orgIdsUserBelongs) label | {{_ 'teams'}} - | ➕#addUserTeamNewUser - | ➖#removeUserTeamNewUser + span#addUserTeamNewUser ➕ + span#removeUserTeamNewUser ➖ select.js-teamsNewUser#jsTeamsNewUser option(value="-1") {{_ 'teams'}} : each value in teamsDatas diff --git a/client/components/settings/peopleBody.js b/client/components/settings/peopleBody.js index 622155d61..9abaf7ff3 100644 --- a/client/components/settings/peopleBody.js +++ b/client/components/settings/peopleBody.js @@ -172,6 +172,10 @@ BlazeComponent.extendComponent({ // Show only inactive users (loginDisabled is true) query['loginDisabled'] = true; break; + case 'admin': + // Show only admin users (isAdmin is true) + query['isAdmin'] = true; + break; case 'all': default: // Show all users, no additional filter diff --git a/client/lib/popup.js b/client/lib/popup.js index 5c0c7a6c9..6825f7032 100644 --- a/client/lib/popup.js +++ b/client/lib/popup.js @@ -218,6 +218,22 @@ window.Popup = new (class { const viewportHeight = $(window).height(); const popupWidth = Math.min(380, viewportWidth * 0.55) + 15; // Add 15px for margin + // Check if this is an admin panel edit popup + const isAdminEditPopup = $element.hasClass('edit-user') || + $element.hasClass('edit-org') || + $element.hasClass('edit-team'); + + if (isAdminEditPopup) { + // Center the popup horizontally and use full height + const centeredLeft = (viewportWidth - popupWidth) / 2; + + return { + left: Math.max(10, centeredLeft), // Ensure popup doesn't go off screen + top: 10, // Start from top with small margin + maxHeight: viewportHeight - 20, // Use full height minus small margins + }; + } + // Calculate available height for popup const popupTop = offset.top + $element.outerHeight();