1
0
mirror of https://github.com/ansible/awx.git synced 2024-11-01 08:21:15 +03:00

Changed notification ADD button to text with a link to the notification add form

This commit is contained in:
Michael Abashian 2017-07-10 12:38:22 -04:00
parent 35e28e9347
commit 1813109a76
4 changed files with 13 additions and 7 deletions

View File

@ -427,6 +427,11 @@ table, tbody {
cursor: not-allowed;
}
.List-action--notificationAdd {
text-align: right;
font-size: 11px;
}
.List-dropdownButton {
border: none;
}

View File

@ -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>

View File

@ -8,7 +8,7 @@
* used in the related tabs
*/
export default ['i18n', function(i18n){
export default ['i18n', 'templateUrl', function(i18n, templateUrl){
return {
// These tooltip fields are consumed to build disabled related tabs tooltips in the form > add view
dataPlacement: 'top',
@ -58,12 +58,8 @@ export default ['i18n', function(i18n){
},
actions: {
add: {
label: i18n._('Add Notification'),
mode: 'all', // One of: edit, select, all
ngClick: 'addNotificationTemplate()',
awToolTip: i18n._('Create a new notification template'),
actionClass: 'btn List-buttonSubmit',
buttonContent: '&#43; ' + i18n._('ADD NOTIFICATION TEMPLATE'),
type: 'template',
template: templateUrl('notifications/notification-templates-list/add-notifications-action'),
ngShow: 'current_user.is_superuser || (current_user_admin_orgs && current_user_admin_orgs.length > 0)'
}
}

View File

@ -1,6 +1,7 @@
<span ng-repeat="(name, options) in list.actions" class="List-action" ng-hide="isHiddenByOptions(options) ||
hiddenOnCurrentPage(options.basePaths) ||
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="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>