2017-07-18 11:17:03 -04:00
|
|
|
import { popupAjaxError } from 'discourse/lib/ajax-error';
|
|
|
|
|
|
|
|
export default Ember.Component.extend({
|
|
|
|
tagName: 'tr',
|
|
|
|
|
|
|
|
actions: {
|
|
|
|
edit: function(){
|
2017-07-31 12:09:21 -04:00
|
|
|
this.sendAction('edit', this.get('rule'))
|
2017-07-18 11:17:03 -04:00
|
|
|
},
|
|
|
|
delete(rule){
|
|
|
|
rule.destroyRecord().then(() => {
|
|
|
|
this.send('refresh');
|
|
|
|
}).catch(popupAjaxError)
|
|
|
|
},
|
|
|
|
refresh: function(){
|
|
|
|
this.sendAction('refresh');
|
|
|
|
}
|
2017-07-31 12:09:21 -04:00
|
|
|
|
|
|
|
|
|
|
|
|
2017-07-18 11:17:03 -04:00
|
|
|
}
|
|
|
|
});
|