Skip to content

Add optional image to card aggregate status #222

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 6 additions & 3 deletions dist/angular-patternfly.js
Original file line number Diff line number Diff line change
Expand Up @@ -157,9 +157,11 @@ angular.module('patternfly.autofocus', []).directive('pfFocused', ["$timeout", f
* <li>.count - the number count of the main statuses
* <li>.href - the href to navigate to if one clicks on the title or count
* <li>.iconClass - an icon to display to the left of the count
* <li>.iconImage - an image to display to the left of the count
* <li>.notifications - an array of status icons & counts
* <ul style='list-style-type: none'>
* <li>.iconClass - an icon to display to the right of the notification count
* <li>.iconImage - an image to display to the left of the notification count
* <li>.count - the number count of the notification status
* <li>.href - href to navigate to if one clicks on the notification status icon or count
* </ul>
Expand All @@ -170,6 +172,7 @@ angular.module('patternfly.autofocus', []).directive('pfFocused', ["$timeout", f
* <li><strong>.notification</strong> - an <em>object</em> of containing a single notification icon & count
* <ul style='list-style-type: none'>
* <li>.iconClass - an icon to display to the right of the notification count
* <li>.iconImage - an image to display to the left of the notification count
* <li>.count - the number count of the notification status
* <li>.href - href to navigate to if one clicks on the notification status icon or count
* </ul>
Expand Down Expand Up @@ -237,12 +240,12 @@ angular.module('patternfly.autofocus', []).directive('pfFocused', ["$timeout", f
"count":3,
"notifications":[
{
"iconClass":"pficon pficon-openshift",
"iconImage":"img/kubernetes.svg",
"count":1,
"href":"#"
},
{
"iconClass":"pficon pficon-kubernetes",
"iconImage":"img/OpenShift-logo.svg",
"count":2,
"href":"#"
}
Expand Down Expand Up @@ -5870,7 +5873,7 @@ angular.module('patternfly.views').directive('pfListView', ["$timeout", "$window
'use strict';

$templateCache.put('card/aggregate-status/aggregate-status-card.html',
"<div ng-if=!isMiniLayout class=\"card-pf card-pf-aggregate-status\" ng-class=\"{'card-pf-accented': shouldShowTopBorder, 'card-pf-aggregate-status-alt': isAltLayout}\"><h2 class=card-pf-title><a href={{status.href}} ng-if=status.href><span class={{status.iconClass}}></span> <span class=card-pf-aggregate-status-count>{{status.count}}</span> <span class=card-pf-aggregate-status-title>{{status.title}}</span></a> <span ng-if=!status.href><span class={{status.iconClass}}></span> <span class=card-pf-aggregate-status-count>{{status.count}}</span> <span class=card-pf-aggregate-status-title>{{status.title}}</span></span></h2><div class=card-pf-body><p class=card-pf-aggregate-status-notifications><span class=card-pf-aggregate-status-notification ng-repeat=\"notification in status.notifications\"><a href={{notification.href}} ng-if=notification.href><span class={{notification.iconClass}}></span>{{ notification.count }}</a> <span ng-if=!notification.href><span class={{notification.iconClass}}></span>{{ notification.count }}</span></span></p></div></div><div ng-if=isMiniLayout class=\"card-pf card-pf-aggregate-status card-pf-aggregate-status-mini\" ng-class=\"{'card-pf-accented': shouldShowTopBorder}\"><h2 class=card-pf-title><span ng-if=status.iconClass class={{status.iconClass}}></span> <a ng-if=status.href href={{status.href}}><span class=card-pf-aggregate-status-count>{{status.count}}</span> {{status.title}}</a> <span ng-if=!status.href><span class=card-pf-aggregate-status-count>{{status.count}}</span> {{status.title}}</span></h2><div class=card-pf-body><p ng-if=\"status.notification.iconClass || status.notification.count\" class=card-pf-aggregate-status-notifications><span class=card-pf-aggregate-status-notification><a ng-if=status.notification.href href={{status.notification.href}}><span ng-if=status.notification.iconClass class={{status.notification.iconClass}}></span><span ng-if=status.notification.count>{{status.notification.count}}</span></a> <span ng-if=!status.notification.href><span ng-if=status.notification.iconClass class={{status.notification.iconClass}}></span><span ng-if=status.notification.count>{{status.notification.count}}</span></span></span></p></div></div>"
"<div ng-if=!isMiniLayout class=\"card-pf card-pf-aggregate-status\" ng-class=\"{'card-pf-accented': shouldShowTopBorder, 'card-pf-aggregate-status-alt': isAltLayout}\"><h2 class=card-pf-title><a href={{status.href}} ng-if=status.href><image ng-if=status.iconImage ng-src={{status.iconImage}} alt=\"\" class=card-pf-icon-image></image><span class={{status.iconClass}}></span> <span class=card-pf-aggregate-status-count>{{status.count}}</span> <span class=card-pf-aggregate-status-title>{{status.title}}</span></a> <span ng-if=!status.href><image ng-if=status.iconImage ng-src={{status.iconImage}} alt=\"\" class=card-pf-icon-image></image><span class={{status.iconClass}}></span> <span class=card-pf-aggregate-status-count>{{status.count}}</span> <span class=card-pf-aggregate-status-title>{{status.title}}</span></span></h2><div class=card-pf-body><p class=card-pf-aggregate-status-notifications><span class=card-pf-aggregate-status-notification ng-repeat=\"notification in status.notifications\"><a href={{notification.href}} ng-if=notification.href><image ng-if=notification.iconImage ng-src={{notification.iconImage}} alt=\"\" class=card-pf-icon-image></image><span class={{notification.iconClass}}></span>{{ notification.count }}</a> <span ng-if=!notification.href><image ng-if=notification.iconImage ng-src={{notification.iconImage}} alt=\"\" class=card-pf-icon-image></image><span class={{notification.iconClass}}></span>{{ notification.count }}</span></span></p></div></div><div ng-if=isMiniLayout class=\"card-pf card-pf-aggregate-status card-pf-aggregate-status-mini\" ng-class=\"{'card-pf-accented': shouldShowTopBorder}\"><h2 class=card-pf-title><image ng-if=status.iconImage ng-src={{status.iconImage}} alt=\"\" class=card-pf-icon-image></image><span ng-if=status.iconClass class={{status.iconClass}}></span> <a ng-if=status.href href={{status.href}}><span class=card-pf-aggregate-status-count>{{status.count}}</span> {{status.title}}</a> <span ng-if=!status.href><span class=card-pf-aggregate-status-count>{{status.count}}</span> {{status.title}}</span></h2><div class=card-pf-body><p ng-if=\"status.notification.iconImage || status.notification.iconClass || status.notification.count\" class=card-pf-aggregate-status-notifications><span class=card-pf-aggregate-status-notification><a ng-if=status.notification.href href={{status.notification.href}}><image ng-if=status.notification.iconImage ng-src={{status.notification.iconImage}} alt=\"\" class=card-pf-icon-image></image><span ng-if=status.notification.iconClass class={{status.notification.iconClass}}></span><span ng-if=status.notification.count>{{status.notification.count}}</span></a> <span ng-if=!status.notification.href><image ng-if=status.notification.iconImage ng-src={{status.notification.iconImage}} alt=\"\" class=card-pf-icon-image></image><span ng-if=status.notification.iconClass class={{status.notification.iconClass}}></span><span ng-if=status.notification.count>{{status.notification.count}}</span></span></span></p></div></div>"
);


Expand Down
4 changes: 2 additions & 2 deletions dist/angular-patternfly.min.js

Large diffs are not rendered by default.

5 changes: 5 additions & 0 deletions dist/styles/angular-patternfly.css
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,11 @@
padding: 0 20px 0;
}

.card-pf-icon-image {
height: 18px;
margin: 0 5px 5px;
}

.empty-chart-content {
text-align: center;
}
Expand Down
2 changes: 1 addition & 1 deletion dist/styles/angular-patternfly.min.css

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading