[Bps-public-commit] rt-extension-assets branch, 1.1/people-display, created. 1.0-7-g0018f71
Alex Vandiver
alexmv at bestpractical.com
Wed Apr 9 14:47:09 EDT 2014
The branch, 1.1/people-display has been created
at 0018f71b7b6d80f21d5e20db8ac020a22105df2e (commit)
- Log -----------------------------------------------------------------
commit cce7922d1fa396b073b3fc02d3ae924ed0f59d51
Author: Alex Vandiver <alexmv at bestpractical.com>
Date: Wed Apr 9 14:46:39 2014 -0400
More concise user display in assets
This makes better use of horizontal space.
diff --git a/html/Asset/Elements/ShowPeople b/html/Asset/Elements/ShowPeople
index 35cbdb4..7886bae 100644
--- a/html/Asset/Elements/ShowPeople
+++ b/html/Asset/Elements/ShowPeople
@@ -53,17 +53,20 @@ my $CatalogObj = $AssetObj->CatalogObj;
</%init>
<table>
% for my $role ($AssetObj->Roles) {
-<tr>
- <td class="label"><% loc($role) %>:</td>
+<tr><td class="label"><% loc($role) %>:
% if ($AssetObj->Role($role)->{Single}) {
- <td><& ShowRoleMembers, Group => $AssetObj->RoleGroup($role), Single => 1 &></td>
+% my $user = $AssetObj->RoleGroup($role)->UserMembersObj(Recursively => 0)->Next;
+<& /Elements/ShowUser, User => $user, Link => 1 &></td></tr>
+% next if $user->id == RT->Nobody->id;
+<tr><td>
+<& ShowRoleMembers, Group => $AssetObj->RoleGroup($role), Title => 0 &>
+</div></td></tr>
% } else {
- <td class="user-accordion">
+</td></tr><tr><td class="user-accordion">
<& ShowRoleMembers, Group => $AssetObj->RoleGroup($role) &>
<& ShowRoleMembers, Group => $CatalogObj->RoleGroup($role), Skip => $AssetObj->RoleGroup($role), Note => loc("(via this asset's catalog)") &>
- </td>
+ </td></tr>
% }
-</tr>
% }
<& /Elements/ShowCustomFields, Object => $AssetObj, Grouping => 'People', Table => 0 &>
diff --git a/html/Asset/Elements/ShowRoleMembers b/html/Asset/Elements/ShowRoleMembers
index d15f22c..62f92ef 100644
--- a/html/Asset/Elements/ShowRoleMembers
+++ b/html/Asset/Elements/ShowRoleMembers
@@ -48,7 +48,8 @@
% my $users = $Group->UserMembersObj( Recursively => 0 );
% while ( my $user = $users->Next ) {
% next if $Skip and $Skip->HasMember( $user->PrincipalId );
-% if ($Single) {
+% if (not $Title) {
+% } elsif ($Single) {
<h3><& /Elements/ShowUser, User => $user, Link => 1 &></h3>
% next if $user->id == RT->Nobody->id;
% } else {
@@ -85,4 +86,5 @@ $Group => undef
$Note => ''
$Skip => undef
$Single => 0
+$Title => 1
</%ARGS>
diff --git a/static/css/RTx-Assets.css b/static/css/RTx-Assets.css
index 2af16d7..6298ff5 100644
--- a/static/css/RTx-Assets.css
+++ b/static/css/RTx-Assets.css
@@ -35,8 +35,7 @@
}
#comp-Asset-Display .asset-people td.label {
- vertical-align: top;
- width: 8em;
+ text-align: left;
}
#comp-Asset-Display .asset-people h3 {
commit 0018f71b7b6d80f21d5e20db8ac020a22105df2e
Author: Alex Vandiver <alexmv at bestpractical.com>
Date: Wed Apr 9 14:47:01 2014 -0400
With the previous commit, "User Summary" now has enough space to not need this
diff --git a/static/css/RTx-Assets.css b/static/css/RTx-Assets.css
index 6298ff5..234298d 100644
--- a/static/css/RTx-Assets.css
+++ b/static/css/RTx-Assets.css
@@ -220,13 +220,3 @@
width: 10em;
}
}
-
- at media (max-width:1440px) {
-
- /* on a not-wide-enough screen, don't position "User Summary" link as
- * "absolute" in case of overlapping */
- #comp-Asset-Display .asset-people a.user-summary {
- position: relative;
- white-space: nowrap;
- }
-}
-----------------------------------------------------------------------
More information about the Bps-public-commit
mailing list