Skip to content

Commit

Permalink
webui: introduce formatJobName function
Browse files Browse the repository at this point in the history
  • Loading branch information
fbergkemper committed Mar 12, 2020
1 parent 6c2e07f commit 70ee9b7
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion webui/module/Job/view/job/job/actions.phtml
Original file line number Diff line number Diff line change
Expand Up @@ -130,6 +130,10 @@ $this->headTitle($title);

}

function formatJobName(value) {
return '<a href="<?php echo $this->basePath() . '/job/index?jobname='; ?>'+value+'">'+value+'</a>';
}

function attachJobActionsTable() {
jobactions = $('#jobactions').bootstrapTable({
locale: '<?php echo str_replace('_','-', $_SESSION['bareos']['locale']); ?>',
Expand All @@ -152,7 +156,7 @@ $this->headTitle($title);
field: 'name',
sortable: true,
formatter: function(value) {
return '<a href="<?php echo $this->basePath() . '/job/index?jobname='; ?>'+value+'">'+value+'</a>';
return formatJobName(value);
}
},
{
Expand Down

0 comments on commit 70ee9b7

Please sign in to comment.