Merge branch '517-pdf-button-for-open-job-orders-screen' into '488-cmb-live'
Add pdf link to open jo list #517 See merge request jankstudio/resq!600
This commit is contained in:
commit
5bfa34525d
2 changed files with 6 additions and 1 deletions
|
|
@ -285,6 +285,7 @@ class JobOrderController extends Controller
|
|||
// $rows[$key]['meta']['edit_url'] = $this->generateUrl('jo_open_edit_form', ['id' => $jo_id]);
|
||||
$rows[$key]['meta']['edit_url'] = $this->generateUrl($jo_handler->getEditRoute($jo_id, $tier_params['edit_route']), ['id' => $jo_id]);
|
||||
//$rows[$key]['meta']['onestep_edit_url'] = $this->generateUrl('jo_onestep_edit_form', ['id' => $jo_id]);
|
||||
$rows[$key]['meta']['pdf_url'] = $this->generateUrl('jo_pdf_form', ['id' => $jo_id]);
|
||||
}
|
||||
else if ($tier == 'behind_schedule')
|
||||
{
|
||||
|
|
|
|||
|
|
@ -114,8 +114,12 @@
|
|||
sortable: false,
|
||||
overflow: 'visible',
|
||||
template: function (row, index, datatable) {
|
||||
var actions = '';
|
||||
{% if is_granted('jo_onestep.edit') or is_granted('jo_advance_order.edit') or is_granted('jo_assign_advance_order.edit') %}
|
||||
var actions = '<a href="' + row.meta.edit_url + '" class="m-portlet__nav-link btn m-btn m-btn--hover-accent m-btn--icon m-btn--icon-only m-btn--pill btn-reassign-hub" title="Edit"><i class="la la-edit"></i></a>';
|
||||
actions += '<a href="' + row.meta.edit_url + '" class="m-portlet__nav-link btn m-btn m-btn--hover-accent m-btn--icon m-btn--icon-only m-btn--pill btn-reassign-hub" title="Edit"><i class="la la-edit"></i></a>';
|
||||
{% endif %}
|
||||
{% if is_granted('jo_pdf.list') %}
|
||||
actions += '<a href="' + row.meta.pdf_url + '" class="m-portlet__nav-link btn m-btn m-btn--hover-accent m-btn--icon m-btn--icon-only m-btn--pill btn-edit" title="PDF" target="_blank"><i class="la la-file-o"></i></a>';
|
||||
{% endif %}
|
||||
|
||||
return actions;
|
||||
|
|
|
|||
Loading…
Reference in a new issue