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

Inserting ADD NOTIFICATION TEMPLATE button for tabs

with notification templates
This commit is contained in:
Jared Tabor 2016-06-22 13:14:58 -07:00
parent a9162278f8
commit b1fff38243
3 changed files with 24 additions and 3 deletions

View File

@ -3,8 +3,10 @@
*
* All Rights Reserved
*************************************************/
/**
* This is the list definition for the notification templates list
* off of the settings page
*/
export default function(){
return {

View File

@ -3,6 +3,10 @@
*
* All Rights Reserved
*************************************************/
/**
* This is the list definition for the notification templates list
* used in the related tabs
*/
export default function(){
return {
@ -53,6 +57,16 @@ export default function(){
searchable: false,
nosort: true,
}
},
actions: {
add: {
label: 'Add Notification',
mode: 'all', // One of: edit, select, all
ngClick: 'addNotificationTemplate()',
awToolTip: 'Create a new notification template',
actionClass: 'btn List-buttonSubmit',
buttonContent: '+ ADD NOTIFICATION TEMPLATE'
}
}
};

View File

@ -15,12 +15,17 @@
*/
export default ['Wait', 'GetBasePath', 'ProcessErrors', 'Rest', 'GetChoices',
function(Wait, GetBasePath, ProcessErrors, Rest, GetChoices) {
'$state',
function(Wait, GetBasePath, ProcessErrors, Rest, GetChoices, $state) {
return function(params) {
var scope = params.scope,
url = params.url,
id = params.id;
scope.addNotificationTemplate = function(){
$state.go('notifications.add');
}
if (scope.relatednotificationsRemove) {
scope.relatednotificationsRemove();
}