Added job sorting links to index
This commit is contained in:
parent
acd21f97f2
commit
674876f2e4
|
|
@ -14,9 +14,37 @@ class JobsController extends AppController {
|
|||
|
||||
);
|
||||
|
||||
function index() {
|
||||
function index($showUnpaid = null, $showUnsent = null) {
|
||||
$this->Job->recursive = 1;
|
||||
$this->set('jobs', $this->paginate());
|
||||
|
||||
|
||||
|
||||
if(isset($showUnpaid) && isset($showUnsent)) {
|
||||
|
||||
$conditions = array(
|
||||
'Job.all_paid' => 0,
|
||||
'Job.all_sent' => 0,
|
||||
);
|
||||
}
|
||||
|
||||
else if(isset($showUnpaid)) {
|
||||
$conditions = array(
|
||||
'Job.all_paid' => 0,
|
||||
|
||||
);
|
||||
}
|
||||
|
||||
else if(isset($showUnsent)) {
|
||||
$conditions = array(
|
||||
'Job.all_sent' => 0,
|
||||
);
|
||||
}
|
||||
else {
|
||||
$conditions = array();
|
||||
}
|
||||
|
||||
$this->set('jobs', $this->paginate($conditions));
|
||||
|
||||
$this->set('customers', $this->Job->Enquiry->Customer->find('list'));
|
||||
$this->set('currencies', $this->Job->Currency->find('list'));
|
||||
|
||||
|
|
|
|||
|
|
@ -7,12 +7,14 @@ echo $javascript->link('job_index');
|
|||
|
||||
<h2><?php __('Jobs');?></h2>
|
||||
|
||||
|
||||
|
||||
<? //<iframe src="/jobs/index_grid" id="jobs_grid_iframe"></iframe>
|
||||
?>
|
||||
|
||||
|
||||
<div class="showActions">
|
||||
<ul>
|
||||
<li><?=$html->link('Show all', array('action'=>'index'));?></li>
|
||||
<li><?=$html->link('Show only Unpaid', array('action'=>'index/1'));?></li>
|
||||
<li><?=$html->link('Show only Unsent', array('action'=>'index/0/1'));?></li>
|
||||
<li><?=$html->link('Show only Unpaid & Unsent', array('action'=>'index/1/1'));?></li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
<?php
|
||||
echo $paginator->counter(array(
|
||||
|
|
@ -27,10 +29,7 @@ echo $paginator->counter(array(
|
|||
|
||||
|
||||
<?php echo $form->create('Job', array('action'=>'/jobs/ajax_edit'));?>
|
||||
<div id="fixedHeader">
|
||||
</div>
|
||||
|
||||
|
||||
<div class="scrollHorizontal">
|
||||
<table cellpadding="0" cellspacing="0" class="jobsTable">
|
||||
<thead class="jobTableHead">
|
||||
<tr class="jobTableHeadRow" id="originalHeader">
|
||||
|
|
@ -184,6 +183,8 @@ echo $paginator->counter(array(
|
|||
</tbody>
|
||||
</table>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="paging">
|
||||
|
||||
<?php echo $paginator->prev('<< '.__('previous', true), array(), null, array('class'=>'disabled'));?>
|
||||
|
|
|
|||
|
|
@ -1335,7 +1335,24 @@ select.job_status {
|
|||
}
|
||||
|
||||
|
||||
.showActions ul {
|
||||
list-style: none;
|
||||
}
|
||||
|
||||
.showActions ul li {
|
||||
display: inline;
|
||||
padding-left: 0.2em;
|
||||
}
|
||||
|
||||
.showActions {
|
||||
padding-bottom: 1em;
|
||||
}
|
||||
|
||||
|
||||
.scrollHorizontal {
|
||||
height: 800px;
|
||||
overflow:scroll;
|
||||
}
|
||||
|
||||
|
||||
/* CSS for the Job Reporting */
|
||||
|
|
|
|||
Loading…
Reference in a new issue