mirror of
https://github.com/ansible/awx.git
synced 2026-01-14 03:10:42 -03:30
adding 'noLink' property for list generators
adding noLink option which will override any other options to make a list column an href. This is useful when using the 'key' attribute, which sorts a list and includes links on the items. Now there is a way to override this feature. This is for portal mode and used in custom inv scripts as well.
This commit is contained in:
parent
8e28c73623
commit
be63b3e0b3
@ -607,7 +607,10 @@ angular.module('GeneratorHelpers', [])
|
||||
// Start the Link
|
||||
if ((field.key || field.link || field.linkTo || field.ngClick || field.ngHref || field.awToolTip || field.awPopOver) &&
|
||||
options.mode !== 'lookup' && options.mode !== 'select' && !field.noLink && !field.ngBindHtml) {
|
||||
if (field.icons) {
|
||||
if(field.noLink === true){
|
||||
// provide an override here in case we want key=true for sorting purposes but don't want links -- see: portal mode,
|
||||
}
|
||||
else if (field.icons) {
|
||||
field.icons.forEach(function(icon, idx) {
|
||||
var key, i = field.icons[idx];
|
||||
for (key in i) {
|
||||
|
||||
@ -59,6 +59,7 @@
|
||||
* | columnClick | Adds an ng-click directive to the <td> element. |
|
||||
* | excludeModal | true or false. If false, the field will not be included in the generated HTML when the mode is 'lookup' |
|
||||
* | key | true or false. If set to true, helpers/search.js will use the field name as the default sort order when generating the API request. |
|
||||
* | noLink | true or false. If set to true this will override any 'key', 'linkTo', 'ngClick', or other option that would cause the field to be a link. Used in portal mode and custom inv. script. |
|
||||
* | label | Text string used as the column header text. |
|
||||
* | linkTo | Wraps the field value with an <a> element. Set to the value of the href attribute. |
|
||||
* | ngClick | Wraps the field value with an <a> and adds the ng-click directive. Set to the JS expression that ng-click will evaluate. |
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user