Changed Text of Knowledge base button to Help Article

This commit is contained in:
Ashwini Save 2017-08-04 16:14:38 +05:30
parent 329aae2458
commit cbef770ed7

View File

@ -18,12 +18,12 @@ frappe.ui.form.on("Issue", {
},
timeline_refresh: function(frm) {
// create button for "Add to Knowledge Base"
// create button for "Help Article"
if(frappe.model.can_create('Help Article')) {
// Removing Knowledge Base button if exists to avoid multiple occurance
// Removing Help Article button if exists to avoid multiple occurance
frm.timeline.wrapper.find('.comment-header .asset-details .btn-add-to-kb').remove();
$('<button class="btn btn-xs btn-default btn-add-to-kb hidden-xs pull-right" style="margin-top: -2px">'+
__('Add to Knowledge Base') + '</button>')
$('<button class="btn btn-xs btn-link btn-add-to-kb text-muted hidden-xs pull-right">'+
__('Help Article') + '</button>')
.appendTo(frm.timeline.wrapper.find('.comment-header .asset-details'))
.on('click', function() {
var content = $(this).parents('.timeline-item:first').find('.timeline-item-content').html();