mirror of
https://github.com/ansible/awx.git
synced 2026-03-13 15:09:32 -02:30
Added the ability to pass the listTitleBadge parameter to the list generator. Passing a false flag will hide the badge in the title. This is desired on the Activity Stream.
This commit is contained in:
@@ -13,6 +13,7 @@ export default
|
|||||||
iterator: 'activity',
|
iterator: 'activity',
|
||||||
editTitle: 'Activity Stream',
|
editTitle: 'Activity Stream',
|
||||||
listTitle: 'Activity Stream',
|
listTitle: 'Activity Stream',
|
||||||
|
listTitleBadge: false,
|
||||||
selectInstructions: '',
|
selectInstructions: '',
|
||||||
index: false,
|
index: false,
|
||||||
hover: true,
|
hover: true,
|
||||||
@@ -26,7 +27,8 @@ export default
|
|||||||
desc: true,
|
desc: true,
|
||||||
noLink: true,
|
noLink: true,
|
||||||
searchable: false,
|
searchable: false,
|
||||||
filter: "longDate"
|
filter: "longDate",
|
||||||
|
columnClass: 'col-lg-3 col-md-2 col-sm-3 col-xs-3'
|
||||||
},
|
},
|
||||||
user: {
|
user: {
|
||||||
label: 'Initiated by',
|
label: 'Initiated by',
|
||||||
@@ -36,14 +38,15 @@ export default
|
|||||||
//awToolTip: "\{\{ userToolTip \}\}",
|
//awToolTip: "\{\{ userToolTip \}\}",
|
||||||
//dataPlacement: 'top',
|
//dataPlacement: 'top',
|
||||||
searchPlaceholder: 'Username',
|
searchPlaceholder: 'Username',
|
||||||
searchWidget: 1
|
searchWidget: 1,
|
||||||
|
columnClass: 'col-lg-3 col-md-3 col-sm-3 col-xs-3'
|
||||||
},
|
},
|
||||||
description: {
|
description: {
|
||||||
label: 'Action',
|
label: 'Action',
|
||||||
ngBindHtml: 'activity.description',
|
ngBindHtml: 'activity.description',
|
||||||
nosort: true,
|
nosort: true,
|
||||||
searchable: false,
|
searchable: false,
|
||||||
columnClass: 'col-lg-7'
|
columnClass: 'col-lg-5 col-md-6 col-sm-4 col-xs-4'
|
||||||
},
|
},
|
||||||
actor: {
|
actor: {
|
||||||
label: 'System event',
|
label: 'System event',
|
||||||
@@ -264,6 +267,9 @@ export default
|
|||||||
},
|
},
|
||||||
|
|
||||||
fieldActions: {
|
fieldActions: {
|
||||||
|
|
||||||
|
columnClass: 'col-lg-1 col-md-1 col-sm-2 col-xs-2',
|
||||||
|
|
||||||
view: {
|
view: {
|
||||||
label: 'View',
|
label: 'View',
|
||||||
ngClick: "showDetail(activity.id)",
|
ngClick: "showDetail(activity.id)",
|
||||||
|
|||||||
@@ -306,7 +306,11 @@ export default ['$location', '$compile', '$rootScope', 'SearchWidget', 'Paginate
|
|||||||
if (list.listTitle) {
|
if (list.listTitle) {
|
||||||
|
|
||||||
html += "<div class=\"List-titleText\">" + list.listTitle + "</div>";
|
html += "<div class=\"List-titleText\">" + list.listTitle + "</div>";
|
||||||
html += "<span class=\"badge List-titleBadge\">{{(" + list.iterator + "_total_rows | number:0)}}</span>";
|
// We want to show the list title badge by default and only hide it when the list config specifically passes a false flag
|
||||||
|
list.listTitleBadge = (typeof list.listTitleBadge === 'boolean' && list.listTitleBadge == false) ? false : true;
|
||||||
|
if(list.listTitleBadge) {
|
||||||
|
html += "<span class=\"badge List-titleBadge\">{{(" + list.iterator + "_total_rows | number:0)}}</span>";
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user