mirror of
https://github.com/ansible/awx.git
synced 2026-05-11 11:27:36 -02:30
Changed notification ADD button to text with a link to the notification add form
This commit is contained in:
@@ -427,6 +427,11 @@ table, tbody {
|
|||||||
cursor: not-allowed;
|
cursor: not-allowed;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.List-action--notificationAdd {
|
||||||
|
text-align: right;
|
||||||
|
font-size: 11px;
|
||||||
|
}
|
||||||
|
|
||||||
.List-dropdownButton {
|
.List-dropdownButton {
|
||||||
border: none;
|
border: none;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -0,0 +1,4 @@
|
|||||||
|
<div class="List-action--notificationAdd">
|
||||||
|
<div>GO TO <a ui-sref="notifications.add">NOTIFICATIONS</a> TO</div>
|
||||||
|
<div>ADD A NEW TEMPLATE</div>
|
||||||
|
</div>
|
||||||
@@ -8,7 +8,7 @@
|
|||||||
* used in the related tabs
|
* used in the related tabs
|
||||||
*/
|
*/
|
||||||
|
|
||||||
export default ['i18n', function(i18n){
|
export default ['i18n', 'templateUrl', function(i18n, templateUrl){
|
||||||
return {
|
return {
|
||||||
// These tooltip fields are consumed to build disabled related tabs tooltips in the form > add view
|
// These tooltip fields are consumed to build disabled related tabs tooltips in the form > add view
|
||||||
dataPlacement: 'top',
|
dataPlacement: 'top',
|
||||||
@@ -58,12 +58,8 @@ export default ['i18n', function(i18n){
|
|||||||
},
|
},
|
||||||
actions: {
|
actions: {
|
||||||
add: {
|
add: {
|
||||||
label: i18n._('Add Notification'),
|
type: 'template',
|
||||||
mode: 'all', // One of: edit, select, all
|
template: templateUrl('notifications/notification-templates-list/add-notifications-action'),
|
||||||
ngClick: 'addNotificationTemplate()',
|
|
||||||
awToolTip: i18n._('Create a new notification template'),
|
|
||||||
actionClass: 'btn List-buttonSubmit',
|
|
||||||
buttonContent: '+ ' + i18n._('ADD NOTIFICATION TEMPLATE'),
|
|
||||||
ngShow: 'current_user.is_superuser || (current_user_admin_orgs && current_user_admin_orgs.length > 0)'
|
ngShow: 'current_user.is_superuser || (current_user_admin_orgs && current_user_admin_orgs.length > 0)'
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
<span ng-repeat="(name, options) in list.actions" class="List-action" ng-hide="isHiddenByOptions(options) ||
|
<span ng-repeat="(name, options) in list.actions" class="List-action" ng-hide="isHiddenByOptions(options) ||
|
||||||
hiddenOnCurrentPage(options.basePaths) ||
|
hiddenOnCurrentPage(options.basePaths) ||
|
||||||
hiddenInCurrentMode(options.mode)">
|
hiddenInCurrentMode(options.mode)">
|
||||||
|
<div ng-if="options.type && options.type === 'template'" ng-include="options.template" ng-show="{{options.ngShow}}"></div>
|
||||||
<div class="List-action--showTooltipOnDisabled" ng-if="options.showTipWhenDisabled" aw-tool-tip="{{options.awToolTip}}" data-tip-watch="{{options.dataTipWatch}}" data-placement="{{options.dataPlacement}}" data-container="{{options.dataContainer}}" data-title="{{options.dataTitle}}" data-tooltip-inner-class="{{options.tooltipInnerClass}}">
|
<div class="List-action--showTooltipOnDisabled" ng-if="options.showTipWhenDisabled" aw-tool-tip="{{options.awToolTip}}" data-tip-watch="{{options.dataTipWatch}}" data-placement="{{options.dataPlacement}}" data-container="{{options.dataContainer}}" data-title="{{options.dataTitle}}" data-tooltip-inner-class="{{options.tooltipInnerClass}}">
|
||||||
<div class="btn-group" ng-if="options.type === 'buttonDropdown'" ng-disabled="{{options.ngDisabled}}">
|
<div class="btn-group" ng-if="options.type === 'buttonDropdown'" ng-disabled="{{options.ngDisabled}}">
|
||||||
<button type="button" class="{{options.actionClass}} List-dropdownButton" ng-bind-html="options.buttonContent"></button>
|
<button type="button" class="{{options.actionClass}} List-dropdownButton" ng-bind-html="options.buttonContent"></button>
|
||||||
|
|||||||
Reference in New Issue
Block a user