mirror of
https://github.com/ansible/awx.git
synced 2026-03-22 11:25:08 -02:30
Related tab-search-bars 100% width w/o actions
If there are no actions like ADD, then the search bar should be 100% width
This commit is contained in:
@@ -1793,7 +1793,7 @@ angular.module('FormGenerator', [GeneratorHelpers.name, 'Utilities', listGenerat
|
|||||||
form = params.form,
|
form = params.form,
|
||||||
itm = params.related,
|
itm = params.related,
|
||||||
collection = form.related[itm],
|
collection = form.related[itm],
|
||||||
act, fld, cnt, base, fAction;
|
act, fld, cnt, base, fAction, width;
|
||||||
|
|
||||||
if (collection.instructions) {
|
if (collection.instructions) {
|
||||||
html += "<div class=\"alert alert-info alert-block\">\n";
|
html += "<div class=\"alert alert-info alert-block\">\n";
|
||||||
@@ -1817,10 +1817,18 @@ angular.module('FormGenerator', [GeneratorHelpers.name, 'Utilities', listGenerat
|
|||||||
});
|
});
|
||||||
var hideOnSuperuser = (hideOnSuperuser === true) ? true : false;
|
var hideOnSuperuser = (hideOnSuperuser === true) ? true : false;
|
||||||
|
|
||||||
|
if(actionButtons.length === 0 ){
|
||||||
|
// The search bar should be full width if there are no
|
||||||
|
// action buttons
|
||||||
|
width = "col-lg-12 col-md-12 col-sm-12 col-xs-12";
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
width = "col-lg-8 col-md-8 col-sm-8 col-xs-12";
|
||||||
|
}
|
||||||
html += `
|
html += `
|
||||||
<div class=\"row\"
|
<div class=\"row\"
|
||||||
ng-show=\"${collection.hideSearchAndActions ? false : true}\">
|
ng-show=\"${collection.hideSearchAndActions ? false : true}\">
|
||||||
<div class=\"col-lg-8 col-md-8 col-sm-8 col-xs-12\"
|
<div class=\"${width}\"
|
||||||
ng-show=\"${collection.iterator}Loading == true ||
|
ng-show=\"${collection.iterator}Loading == true ||
|
||||||
${collection.iterator}_active_search == true || (
|
${collection.iterator}_active_search == true || (
|
||||||
${collection.iterator}Loading == false &&
|
${collection.iterator}Loading == false &&
|
||||||
@@ -1828,14 +1836,16 @@ angular.module('FormGenerator', [GeneratorHelpers.name, 'Utilities', listGenerat
|
|||||||
${collection.iterator}_total_rows > 0) &&
|
${collection.iterator}_total_rows > 0) &&
|
||||||
!(is_superuser && ${hideOnSuperuser})\">
|
!(is_superuser && ${hideOnSuperuser})\">
|
||||||
${tagSearch}
|
${tagSearch}
|
||||||
|
</div>`;
|
||||||
|
|
||||||
|
if(actionButtons.length>0){
|
||||||
|
html += `<div class=\"col-lg-4 col-md-4 col-sm-4 col-xs-12 action_column\">
|
||||||
|
<div class=\"list-actions\">
|
||||||
|
${actionButtons}
|
||||||
</div>
|
</div>
|
||||||
<div class=\"col-lg-4 col-md-4 col-sm-4 col-xs-12 action_column\">
|
</div>`;
|
||||||
<div class=\"list-actions\">
|
}
|
||||||
${actionButtons}
|
html += "</div>";
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
`;
|
|
||||||
|
|
||||||
// Message for when a search returns no results. This should only get shown after a search is executed with no results.
|
// Message for when a search returns no results. This should only get shown after a search is executed with no results.
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user