This commit is contained in:
Chris Meyers 2017-01-12 10:55:54 -05:00
parent 1cf3a259ee
commit ee0295a378
2 changed files with 41 additions and 4 deletions

View File

@ -0,0 +1,37 @@
/** @define OwnerList */
@import "./client/src/shared/branding/colors.default.less";
.OwnerList {
display: flex;
flex-wrap: wrap;
align-items: flex-start;
}
.OwnerList-seeBase {
display: flex;
max-width: 100%;
color: @default-link;
margin: 5px 0px;
text-transform: uppercase;
padding: 2px 0px;
cursor: pointer;
border-radius: 5px;
font-size: 11px;
}
.OwnerList-seeBase:hover {
color: @default-link-hov;
}
.OwnerList-seeLess {
.OwnerList-seeBase;
}
.OwnerList-seeMore {
.OwnerList-seeBase;
}
.OwnerList-Container {
margin-right: 5px;
}

View File

@ -1,12 +1,12 @@
<div ng-init="ownersLimit = 5; ownersLimitConst = 5; ">
<div ng-repeat="owner in owners_list | limitTo:ownersLimit">
<div class="OwnerList" ng-init="ownersLimit = 5; ownersLimitConst = 5; ">
<div class="OwnerList-Container" ng-repeat="owner in owners_list | limitTo:ownersLimit">
<a ng-if="owner.type === 'organization'" ui-sref="organizations.edit({ organization_id: owner.id })">{{ owner.name }}{{$last ? '' : ', '}}</a>
<a ng-if="owner.type === 'user'" ui-sref="users.edit({ user_id: owner.id })">{{ owner.name }}{{$last ? '' : ', '}}</a>
<a ng-if="owner.type === 'team'" ui-sref="teams.edit({ team_id: owner.id })">{{ owner.name }}{{$last ? '' : ', '}}</a>
</div>
<div class="LabelList-seeMoreLess" ng-show="owners_list.length > ownersLimitConst && ownersLimit == ownersLimitConst"
<div class="OwnerList-seeMore" ng-show="owners_list.length > ownersLimitConst && ownersLimit == ownersLimitConst"
ng-click="ownersLimit = owners_list.length">View More</div>
<div class="LabelList-seeMoreLess" ng-show="owners_list.length > ownersLimitConst && ownersLimit != ownersLimitConst"
<div class="OwnerList-seeLess" ng-show="owners_list.length > ownersLimitConst && ownersLimit != ownersLimitConst"
ng-click="ownersLimit = ownersLimitConst">View Less</div>
</div>