Version Notes
This is a first release version
Download this release
Release Info
Developer | Medma Infomatix |
Extension | medma_job_management |
Version | 1.0.0 |
Comparing to | |
See all releases |
Version 1.0.0
- app/code/community/Medma/Job/Block/Adminhtml/Jobbackend.php +15 -0
- app/code/community/Medma/Job/Block/Adminhtml/Jobbackend/Edit.php +0 -0
- app/code/community/Medma/Job/Block/Adminhtml/Jobbackend/Grid.php +74 -0
- app/code/community/Medma/Job/Block/Index.php +11 -0
- app/code/community/Medma/Job/Helper/Data.php +5 -0
- app/code/community/Medma/Job/Model/Jobmanagement.php +12 -0
- app/code/community/Medma/Job/Model/Mysql4/Jobmanagement.php +8 -0
- app/code/community/Medma/Job/Model/Mysql4/Jobmanagement/Collection.php +9 -0
- app/code/community/Medma/Job/controllers/Adminhtml/JobbackendController.php +72 -0
- app/code/community/Medma/Job/controllers/IndexController.php +75 -0
- app/code/community/Medma/Job/etc/config.xml +125 -0
- app/code/community/Medma/Job/sql/job_setup/mysql4-install-0.1.0.php +18 -0
- app/design/adminhtml/default/default/layout/job.xml +8 -0
- app/design/frontend/default/default/layout/job.xml +23 -0
- app/design/frontend/default/default/template/job/index.phtml +60 -0
- app/etc/modules/Medma_Job.xml +10 -0
- package.xml +18 -0
app/code/community/Medma/Job/Block/Adminhtml/Jobbackend.php
ADDED
@@ -0,0 +1,15 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
class Medma_Job_Block_Adminhtml_Jobbackend extends Mage_Adminhtml_Block_Widget_Grid_Container
|
4 |
+
{
|
5 |
+
public function __construct()
|
6 |
+
{
|
7 |
+
$this->_controller = 'adminhtml_jobbackend';
|
8 |
+
$this->_blockGroup = 'jobbackend';
|
9 |
+
$this->_headerText = Mage::helper('job')->__('Job Management');
|
10 |
+
$this->_addButtonLabel = Mage::helper('job')->__('Add job');
|
11 |
+
parent::__construct();
|
12 |
+
}
|
13 |
+
}
|
14 |
+
|
15 |
+
?>
|
app/code/community/Medma/Job/Block/Adminhtml/Jobbackend/Edit.php
ADDED
File without changes
|
app/code/community/Medma/Job/Block/Adminhtml/Jobbackend/Grid.php
ADDED
@@ -0,0 +1,74 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
class Medma_Job_Block_Adminhtml_Jobbackend_Grid extends Mage_Adminhtml_Block_Widget_Grid
|
4 |
+
{
|
5 |
+
public function __construct()
|
6 |
+
{
|
7 |
+
parent::__construct();
|
8 |
+
$this->setId('jobGrid');
|
9 |
+
$this->setDefaultSort('job_id');
|
10 |
+
$this->setDefaultDir('ASC');
|
11 |
+
$this->setSaveParametersInSession(true);
|
12 |
+
}
|
13 |
+
|
14 |
+
protected function _prepareCollection()
|
15 |
+
{
|
16 |
+
$collection = Mage::getModel('job/jobmanagement')->getCollection();
|
17 |
+
$this->setCollection($collection);
|
18 |
+
return parent::_prepareCollection();
|
19 |
+
}
|
20 |
+
|
21 |
+
protected function _prepareColumns()
|
22 |
+
{
|
23 |
+
$this->addColumn('job_id', array(
|
24 |
+
'header' => Mage::helper('job')->__('ID'),
|
25 |
+
'align' =>'right',
|
26 |
+
'width' => '50px',
|
27 |
+
'index' => 'job_id',
|
28 |
+
));
|
29 |
+
|
30 |
+
$this->addColumn('applicant_name', array(
|
31 |
+
'header' => Mage::helper('job')->__('Applicant Name'),
|
32 |
+
'align' =>'left',
|
33 |
+
'index' => 'applicant_name',
|
34 |
+
));
|
35 |
+
|
36 |
+
$this->addColumn('applicant_email', array(
|
37 |
+
'header' => Mage::helper('job')->__('Applicant Email'),
|
38 |
+
'width' => '150px',
|
39 |
+
'index' => 'applicant_email',
|
40 |
+
));
|
41 |
+
|
42 |
+
$this->addColumn('applicant_phone', array(
|
43 |
+
'header' => Mage::helper('job')->__('Applicant Phone'),
|
44 |
+
'width' => '150px',
|
45 |
+
'index' => 'applicant_phone',
|
46 |
+
));
|
47 |
+
|
48 |
+
$this->addColumn('filename', array(
|
49 |
+
'header' => Mage::helper('job')->__('File Path'),
|
50 |
+
'width' => '100px',
|
51 |
+
'index' => 'filename',
|
52 |
+
));
|
53 |
+
|
54 |
+
$this->addExportType('*/*/exportCsv', Mage::helper('job')->__('CSV'));
|
55 |
+
$this->addExportType('*/*/exportXml', Mage::helper('job')->__('XML'));
|
56 |
+
|
57 |
+
return parent::_prepareColumns();
|
58 |
+
}
|
59 |
+
|
60 |
+
protected function _prepareMassaction()
|
61 |
+
{
|
62 |
+
$this->setMassactionIdField('job_id');
|
63 |
+
$this->getMassactionBlock()->setFormFieldName('job');
|
64 |
+
|
65 |
+
$this->getMassactionBlock()->addItem('delete', array(
|
66 |
+
'label' => Mage::helper('job')->__('Delete'),
|
67 |
+
'url' => $this->getUrl('*/*/massDelete'),
|
68 |
+
'confirm' => Mage::helper('job')->__('Are you sure?')
|
69 |
+
));
|
70 |
+
|
71 |
+
return $this;
|
72 |
+
}
|
73 |
+
|
74 |
+
}
|
app/code/community/Medma/Job/Block/Index.php
ADDED
@@ -0,0 +1,11 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
class Medma_Job_Block_Index extends Mage_Core_Block_Template{
|
3 |
+
|
4 |
+
public function getPostUrl($destination)
|
5 |
+
{
|
6 |
+
return $this->getUrl($destination);
|
7 |
+
}
|
8 |
+
}
|
9 |
+
|
10 |
+
|
11 |
+
?>
|
app/code/community/Medma/Job/Helper/Data.php
ADDED
@@ -0,0 +1,5 @@
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
class Medma_Job_Helper_Data extends Mage_Core_Helper_Abstract
|
3 |
+
{
|
4 |
+
}
|
5 |
+
|
app/code/community/Medma/Job/Model/Jobmanagement.php
ADDED
@@ -0,0 +1,12 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
class Medma_Job_Model_Jobmanagement extends Mage_Core_Model_Abstract
|
4 |
+
{
|
5 |
+
protected function _construct(){
|
6 |
+
|
7 |
+
$this->_init("job/jobmanagement");
|
8 |
+
|
9 |
+
}
|
10 |
+
|
11 |
+
}
|
12 |
+
|
app/code/community/Medma/Job/Model/Mysql4/Jobmanagement.php
ADDED
@@ -0,0 +1,8 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
class Medma_Job_Model_Mysql4_Jobmanagement extends Mage_Core_Model_Mysql4_Abstract
|
3 |
+
{
|
4 |
+
protected function _construct()
|
5 |
+
{
|
6 |
+
$this->_init("job/jobmanagement", "job_id");
|
7 |
+
}
|
8 |
+
}
|
app/code/community/Medma/Job/Model/Mysql4/Jobmanagement/Collection.php
ADDED
@@ -0,0 +1,9 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
class Medma_Job_Model_Mysql4_Jobmanagement_Collection extends Mage_Core_Model_Mysql4_Collection_Abstract
|
3 |
+
{
|
4 |
+
|
5 |
+
public function _construct(){
|
6 |
+
$this->_init("job/jobmanagement");
|
7 |
+
}
|
8 |
+
}
|
9 |
+
|
app/code/community/Medma/Job/controllers/Adminhtml/JobbackendController.php
ADDED
@@ -0,0 +1,72 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
class Medma_Job_Adminhtml_JobbackendController extends Mage_Adminhtml_Controller_Action
|
4 |
+
{
|
5 |
+
public function indexAction()
|
6 |
+
{
|
7 |
+
$this->loadLayout()
|
8 |
+
->_setActiveMenu('job/jobbackend')
|
9 |
+
->_addBreadcrumb(Mage::helper('adminhtml')->__('Job Manager'), Mage::helper('adminhtml')->__('Job Manager'));
|
10 |
+
$this->_title($this->__("Job Management"));
|
11 |
+
$this->renderLayout();
|
12 |
+
}
|
13 |
+
|
14 |
+
public function exportCsvAction()
|
15 |
+
{
|
16 |
+
$fileName = 'applicants.csv';
|
17 |
+
$content = $this->getLayout()->createBlock('job/adminhtml_jobbackend_grid')->getCsv();
|
18 |
+
$this->_sendUploadResponse($fileName, $content);
|
19 |
+
}
|
20 |
+
|
21 |
+
protected function _sendUploadResponse($fileName, $content, $contentType='application/octet-stream')
|
22 |
+
{
|
23 |
+
$response = $this->getResponse();
|
24 |
+
$response->setHeader('HTTP/1.1 200 OK','');
|
25 |
+
$response->setHeader('Pragma', 'public', true);
|
26 |
+
$response->setHeader('Cache-Control', 'must-revalidate, post-check=0, pre-check=0', true);
|
27 |
+
$response->setHeader('Content-Disposition', 'attachment; filename='.$fileName);
|
28 |
+
$response->setHeader('Last-Modified', date('r'));
|
29 |
+
$response->setHeader('Accept-Ranges', 'bytes');
|
30 |
+
$response->setHeader('Content-Length', strlen($content));
|
31 |
+
$response->setHeader('Content-type', $contentType);
|
32 |
+
$response->setBody($content);
|
33 |
+
$response->sendResponse();
|
34 |
+
die;
|
35 |
+
}
|
36 |
+
|
37 |
+
public function exportXmlAction()
|
38 |
+
{
|
39 |
+
$fileName = 'applicants.xml';
|
40 |
+
$content = $this->getLayout()->createBlock('job/adminhtml_jobbackend_grid')->getXml();
|
41 |
+
$this->_sendUploadResponse($fileName, $content);
|
42 |
+
}
|
43 |
+
|
44 |
+
public function massDeleteAction() {
|
45 |
+
$jobIds = $this->getRequest()->getParam('job');
|
46 |
+
if(!is_array($jobIds)) {
|
47 |
+
Mage::getSingleton('adminhtml/session')->addError(Mage::helper('adminhtml')->__('Please select Applicant(s)'));
|
48 |
+
} else {
|
49 |
+
try {
|
50 |
+
foreach ($jobIds as $jobId) {
|
51 |
+
$job = Mage::getModel('job/jobmanagement')->load($jobId);
|
52 |
+
$image = $job->getFilename();
|
53 |
+
|
54 |
+
// echo Mage::getBaseDir('media').'/stores/'.$image; exit;
|
55 |
+
/* Remove Mass Images */
|
56 |
+
$path = Mage::getBaseDir('media') . DS .'cv';
|
57 |
+
unlink(Mage::getBaseDir('media').'/stores/'.$image);
|
58 |
+
|
59 |
+
$job->delete();
|
60 |
+
}
|
61 |
+
Mage::getSingleton('adminhtml/session')->addSuccess(
|
62 |
+
Mage::helper('adminhtml')->__(
|
63 |
+
'Total of %d record(s) were successfully deleted', count($jobIds)
|
64 |
+
)
|
65 |
+
);
|
66 |
+
} catch (Exception $e) {
|
67 |
+
Mage::getSingleton('adminhtml/session')->addError($e->getMessage());
|
68 |
+
}
|
69 |
+
}
|
70 |
+
$this->_redirect('*/*/index');
|
71 |
+
}
|
72 |
+
}
|
app/code/community/Medma/Job/controllers/IndexController.php
ADDED
@@ -0,0 +1,75 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
class Medma_Job_IndexController extends Mage_Core_Controller_Front_Action
|
3 |
+
{
|
4 |
+
public function IndexAction()
|
5 |
+
{
|
6 |
+
$this->loadLayout();
|
7 |
+
$this->getLayout()->getBlock("head")->setTitle($this->__("Job Management"));
|
8 |
+
$breadcrumbs = $this->getLayout()->getBlock("breadcrumbs");
|
9 |
+
|
10 |
+
$breadcrumbs->addCrumb("home", array(
|
11 |
+
"label" => $this->__("Home Page"),
|
12 |
+
"title" => $this->__("Home Page"),
|
13 |
+
"link" => Mage::getBaseUrl()
|
14 |
+
));
|
15 |
+
|
16 |
+
$breadcrumbs->addCrumb("job management", array(
|
17 |
+
"label" => $this->__("Job Management"),
|
18 |
+
"title" => $this->__("Job Management")
|
19 |
+
));
|
20 |
+
|
21 |
+
$this->renderLayout();
|
22 |
+
}
|
23 |
+
|
24 |
+
public function saveAction()
|
25 |
+
{
|
26 |
+
if ($data = $this->getRequest()->getPost())
|
27 |
+
{
|
28 |
+
//echo "Test 1".$_FILES['filename']['name'];
|
29 |
+
if(isset($_FILES['filename']['name']) && $_FILES['filename']['name'] != '')
|
30 |
+
{
|
31 |
+
try {
|
32 |
+
/* Starting upload */
|
33 |
+
$uploader = new Varien_File_Uploader('filename');
|
34 |
+
|
35 |
+
/* Any extention would work */
|
36 |
+
$uploader->setAllowedExtensions(array('doc','docx','txt','odt'));
|
37 |
+
$uploader->setAllowRenameFiles(false);
|
38 |
+
|
39 |
+
/*
|
40 |
+
* Set the file upload mode
|
41 |
+
* false -> get the file directly in the specified folder
|
42 |
+
* true -> get the file in the product like folders
|
43 |
+
* (file.jpg will go in something like /media/f/i/file.jpg)
|
44 |
+
*/
|
45 |
+
$uploader->setFilesDispersion(false);
|
46 |
+
|
47 |
+
// We set media as the upload dir
|
48 |
+
$path = Mage::getBaseDir('media') . DS .'cv';
|
49 |
+
$uploader->save($path, $_FILES['filename']['name'] );
|
50 |
+
|
51 |
+
//this way the name is saved in DB
|
52 |
+
$data['filename'] = Mage::getBaseUrl(Mage_Core_Model_Store::URL_TYPE_MEDIA).'cv/'.$_FILES['filename']['name'];
|
53 |
+
|
54 |
+
//echo $data['filename']; exit;
|
55 |
+
|
56 |
+
$model = Mage::getModel('job/jobmanagement');
|
57 |
+
|
58 |
+
$model->setData($data)
|
59 |
+
->setId($this->getRequest()->getParam('job_id'));
|
60 |
+
|
61 |
+
$model->save();
|
62 |
+
Mage::getSingleton('core/session')->addSuccess('You have applied Successfully.');
|
63 |
+
|
64 |
+
}
|
65 |
+
catch (Exception $e) {
|
66 |
+
Mage::getSingleton('core/session')->addError($e->getMessage());
|
67 |
+
Mage::getSingleton('core/session')->setFormData($data);
|
68 |
+
$this->_redirect('*/*/');
|
69 |
+
}
|
70 |
+
|
71 |
+
}
|
72 |
+
}
|
73 |
+
$this->_redirect('*/*/');
|
74 |
+
}
|
75 |
+
}
|
app/code/community/Medma/Job/etc/config.xml
ADDED
@@ -0,0 +1,125 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?xml version="1.0"?>
|
2 |
+
<config>
|
3 |
+
<modules>
|
4 |
+
<Medma_Job>
|
5 |
+
<version>0.1.0</version>
|
6 |
+
</Medma_Job>
|
7 |
+
</modules>
|
8 |
+
<frontend>
|
9 |
+
<routers>
|
10 |
+
<job>
|
11 |
+
<use>standard</use>
|
12 |
+
<args>
|
13 |
+
<module>Medma_Job</module>
|
14 |
+
<frontName>job</frontName>
|
15 |
+
</args>
|
16 |
+
</job>
|
17 |
+
</routers>
|
18 |
+
<layout>
|
19 |
+
<updates>
|
20 |
+
<job>
|
21 |
+
<file>job.xml</file>
|
22 |
+
</job>
|
23 |
+
</updates>
|
24 |
+
</layout>
|
25 |
+
</frontend>
|
26 |
+
<global>
|
27 |
+
<helpers>
|
28 |
+
<job>
|
29 |
+
<class>Medma_Job_Helper</class>
|
30 |
+
</job>
|
31 |
+
</helpers>
|
32 |
+
<blocks>
|
33 |
+
<job>
|
34 |
+
<class>Medma_Job_Block</class>
|
35 |
+
</job>
|
36 |
+
</blocks>
|
37 |
+
<models>
|
38 |
+
<job>
|
39 |
+
<class>Medma_Job_Model</class>
|
40 |
+
<resourceModel>job_mysql4</resourceModel>
|
41 |
+
</job>
|
42 |
+
<job_mysql4>
|
43 |
+
<class>Medma_Job_Model_Mysql4</class>
|
44 |
+
<entities>
|
45 |
+
<jobmanagement>
|
46 |
+
<table>job_manager</table>
|
47 |
+
</jobmanagement>
|
48 |
+
</entities>
|
49 |
+
</job_mysql4>
|
50 |
+
</models>
|
51 |
+
<resources>
|
52 |
+
<job_setup>
|
53 |
+
<setup>
|
54 |
+
<module>Medma_Job</module>
|
55 |
+
</setup>
|
56 |
+
<connection>
|
57 |
+
<use>core_setup</use>
|
58 |
+
</connection>
|
59 |
+
</job_setup>
|
60 |
+
<job_write>
|
61 |
+
<connection>
|
62 |
+
<use>core_write</use>
|
63 |
+
</connection>
|
64 |
+
</job_write>
|
65 |
+
<job_read>
|
66 |
+
<connection>
|
67 |
+
<use>core_read</use>
|
68 |
+
</connection>
|
69 |
+
</job_read>
|
70 |
+
</resources>
|
71 |
+
</global>
|
72 |
+
<admin>
|
73 |
+
<routers>
|
74 |
+
<job>
|
75 |
+
<use>admin</use>
|
76 |
+
<args>
|
77 |
+
<module>Medma_Job</module>
|
78 |
+
<frontName>job</frontName>
|
79 |
+
</args>
|
80 |
+
</job>
|
81 |
+
</routers>
|
82 |
+
</admin>
|
83 |
+
<adminhtml>
|
84 |
+
<menu>
|
85 |
+
<job module="job">
|
86 |
+
<title>Job</title>
|
87 |
+
<sort_order>100</sort_order>
|
88 |
+
<children>
|
89 |
+
<jobbackend module="job">
|
90 |
+
<title>Job Management</title>
|
91 |
+
<sort_order>0</sort_order>
|
92 |
+
<action>job/adminhtml_jobbackend</action>
|
93 |
+
</jobbackend>
|
94 |
+
</children>
|
95 |
+
</job>
|
96 |
+
</menu>
|
97 |
+
<acl>
|
98 |
+
<resources>
|
99 |
+
<all>
|
100 |
+
<title>Allow Everything</title>
|
101 |
+
</all>
|
102 |
+
<admin>
|
103 |
+
<children>
|
104 |
+
<job translate="title" module="job">
|
105 |
+
<title>Job</title>
|
106 |
+
<sort_order>1000</sort_order>
|
107 |
+
<children>
|
108 |
+
<jobbackend translate="title">
|
109 |
+
<title>Job Management</title>
|
110 |
+
</jobbackend>
|
111 |
+
</children>
|
112 |
+
</job>
|
113 |
+
</children>
|
114 |
+
</admin>
|
115 |
+
</resources>
|
116 |
+
</acl>
|
117 |
+
<layout>
|
118 |
+
<updates>
|
119 |
+
<job>
|
120 |
+
<file>job.xml</file>
|
121 |
+
</job>
|
122 |
+
</updates>
|
123 |
+
</layout>
|
124 |
+
</adminhtml>
|
125 |
+
</config>
|
app/code/community/Medma/Job/sql/job_setup/mysql4-install-0.1.0.php
ADDED
@@ -0,0 +1,18 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
$installer = $this;
|
3 |
+
$installer->startSetup();
|
4 |
+
$this->run("
|
5 |
+
|
6 |
+
CREATE TABLE `{$this->getTable('job_manager')}`(
|
7 |
+
job_id int not null auto_increment,
|
8 |
+
applicant_name varchar(225),
|
9 |
+
applicant_phone varchar(50),
|
10 |
+
applicant_email varchar(225),
|
11 |
+
filename varchar(512),
|
12 |
+
primary key(job_id)) ENGINE=Innodb DEFAULT CHARSET=utf8;
|
13 |
+
");
|
14 |
+
|
15 |
+
$installer->run($sql);
|
16 |
+
$installer->endSetup();
|
17 |
+
|
18 |
+
|
app/design/adminhtml/default/default/layout/job.xml
ADDED
@@ -0,0 +1,8 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?xml version="1.0"?>
|
2 |
+
<layout version="0.1.0">
|
3 |
+
<job_adminhtml_jobbackend_index>
|
4 |
+
<reference name="content">
|
5 |
+
<block type="job/adminhtml_jobbackend_grid" name="jobbackend.grid"/>
|
6 |
+
</reference>
|
7 |
+
</job_adminhtml_jobbackend_index>
|
8 |
+
</layout>
|
app/design/frontend/default/default/layout/job.xml
ADDED
@@ -0,0 +1,23 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?xml version="1.0"?>
|
2 |
+
<layout version="0.1.0">
|
3 |
+
<default>
|
4 |
+
<reference name="top.links">
|
5 |
+
<action method="addLink" translate="label title">
|
6 |
+
<label>Career</label>
|
7 |
+
<url>job</url>
|
8 |
+
<title>Career</title>
|
9 |
+
<prepare>true</prepare>
|
10 |
+
<position>2</position>
|
11 |
+
</action>
|
12 |
+
</reference>
|
13 |
+
</default>
|
14 |
+
<job_index_index>
|
15 |
+
<reference name="root">
|
16 |
+
<action method="setTemplate"><template>page/1column.phtml</template></action>
|
17 |
+
</reference>
|
18 |
+
<reference name="content">
|
19 |
+
<block type="job/index" name="job_index" template="job/index.phtml"/>
|
20 |
+
</reference>
|
21 |
+
</job_index_index>
|
22 |
+
</layout>
|
23 |
+
|
app/design/frontend/default/default/template/job/index.phtml
ADDED
@@ -0,0 +1,60 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/*
|
3 |
+
* Module : Job Management
|
4 |
+
* Powered By
|
5 |
+
* Anx Medma
|
6 |
+
*/
|
7 |
+
?>
|
8 |
+
|
9 |
+
<h1>Job Management</h1>
|
10 |
+
|
11 |
+
<form action="<?php echo $this->getPostUrl('job/index/save') ?>" id="jobForm" method="post" enctype="multipart/form-data">
|
12 |
+
<div class="fieldset">
|
13 |
+
<h2 class="legend">Applicant Information</h2>
|
14 |
+
<ul class="form-list">
|
15 |
+
<li class="fields">
|
16 |
+
<div class="field">
|
17 |
+
<label for="name" class="required"><em>*</em>Applicant Name</label>
|
18 |
+
<div class="input-box">
|
19 |
+
<input name="applicant_name" id="applicant_name" title="Applicant Name" class="input-text required-entry" type="text">
|
20 |
+
</div>
|
21 |
+
</div>
|
22 |
+
<div class="field">
|
23 |
+
<label for="email" class="required"><em>*</em>Email</label>
|
24 |
+
<div class="input-box">
|
25 |
+
<input name="applicant_email" id="applicant_email" title="Applicant Email" value="" class="input-text required-entry validate-email" type="text">
|
26 |
+
</div>
|
27 |
+
</div>
|
28 |
+
</li>
|
29 |
+
<li>
|
30 |
+
<label for="telephone">Telephone</label>
|
31 |
+
<div class="input-box">
|
32 |
+
<input name="applicant_phone" id="applicant_phone" title="Applicant Phone" value="" class="input-text" type="text">
|
33 |
+
</div>
|
34 |
+
</li>
|
35 |
+
</ul>
|
36 |
+
</div>
|
37 |
+
<div class="fieldset">
|
38 |
+
<h2 class="legend">Upload CV</h2>
|
39 |
+
<ul class="form-list">
|
40 |
+
<li class="fields">
|
41 |
+
<div class="field">
|
42 |
+
<label for="name" class="required"><em>*</em>Upload</label>
|
43 |
+
<div class="input-box">
|
44 |
+
<input type="file" name="filename" id="filename" title="Upload File" value="" class="required-entry" />
|
45 |
+
</div>
|
46 |
+
</div>
|
47 |
+
</li>
|
48 |
+
</ul>
|
49 |
+
</div>
|
50 |
+
<div class="buttons-set">
|
51 |
+
<p class="required">* Required Fields</p>
|
52 |
+
<button type="submit" title="Submit" class="button"><span><span>Submit</span></span></button>
|
53 |
+
</div>
|
54 |
+
</form>
|
55 |
+
|
56 |
+
<script type="text/javascript">
|
57 |
+
//<![CDATA[
|
58 |
+
var jobForm = new VarienForm('jobForm', true);
|
59 |
+
//]]>
|
60 |
+
</script>
|
app/etc/modules/Medma_Job.xml
ADDED
@@ -0,0 +1,10 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?xml version="1.0"?>
|
2 |
+
<config>
|
3 |
+
<modules>
|
4 |
+
<Medma_Job>
|
5 |
+
<active>true</active>
|
6 |
+
<codePool>community</codePool>
|
7 |
+
<version>0.1.0</version>
|
8 |
+
</Medma_Job>
|
9 |
+
</modules>
|
10 |
+
</config>
|
package.xml
ADDED
@@ -0,0 +1,18 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?xml version="1.0"?>
|
2 |
+
<package>
|
3 |
+
<name>medma_job_management</name>
|
4 |
+
<version>1.0.0</version>
|
5 |
+
<stability>stable</stability>
|
6 |
+
<license>OSL v3.0</license>
|
7 |
+
<channel>community</channel>
|
8 |
+
<extends/>
|
9 |
+
<summary>Medma offers a section for adding a careers option to your store</summary>
|
10 |
+
<description>Medma offers a section for adding a careers option to your store</description>
|
11 |
+
<notes>This is a first release version</notes>
|
12 |
+
<authors><author><name>Medma Infomatix</name><user>Medma_Infomatix</user><email>gaurav@medma.in</email></author></authors>
|
13 |
+
<date>2012-12-19</date>
|
14 |
+
<time>06:24:07</time>
|
15 |
+
<contents><target name="magecommunity"><dir name="Medma"><dir name="Job"><dir name="Block"><dir name="Adminhtml"><dir name="Jobbackend"><file name="Edit.php" hash="d41d8cd98f00b204e9800998ecf8427e"/><file name="Grid.php" hash="8b533a04b92966fd27700d8b32f7a179"/></dir><file name="Jobbackend.php" hash="1e929e331fdfd77516d815053980d7ac"/></dir><file name="Index.php" hash="bda36f4d481cf4558dd8ef547de180f0"/></dir><dir name="Helper"><file name="Data.php" hash="041134e77527eaa974f7b6428a89785a"/></dir><dir name="Model"><file name="Jobmanagement.php" hash="ed3ce4642391593b83482ff81ea4cac9"/><dir name="Mysql4"><dir name="Jobmanagement"><file name="Collection.php" hash="f0caf42962ecd569390132bcd8788232"/></dir><file name="Jobmanagement.php" hash="3275740d7d05f872b33392f760626b96"/></dir></dir><dir name="controllers"><dir name="Adminhtml"><file name="JobbackendController.php" hash="36797cf05ab904ea25a7cde104b57cdc"/></dir><file name="IndexController.php" hash="10fb2fc0f9de76f3be1a7f23d088e7aa"/></dir><dir name="etc"><file name="config.xml" hash="b8bbe9d6e96f1affe1f2222062ad909d"/></dir><dir name="sql"><dir name="job_setup"><file name="mysql4-install-0.1.0.php" hash="947e0160dfb3a1190cdabed2f6869d2a"/></dir></dir></dir></dir></target><target name="mageetc"><dir name="modules"><file name="Medma_Job.xml" hash="7405985e231df64bdf3d4970e6c1bc60"/></dir></target><target name="magedesign"><dir name="adminhtml"><dir name="default"><dir name="default"><dir name="layout"><file name="job.xml" hash="452312eaebcfbc53d53c832da9ed3f91"/></dir></dir></dir></dir><dir name="frontend"><dir name="default"><dir name="default"><dir name="layout"><file name="job.xml" hash="2df851d767c9fa3939ece46762b62244"/></dir><dir name="template"><dir name="job"><file name="index.phtml" hash="57e0dc33ae2f6c1654e849aef6a77931"/></dir></dir></dir></dir></dir></target></contents>
|
16 |
+
<compatible/>
|
17 |
+
<dependencies><required><php><min>5.2.0</min><max>6.0.0</max></php></required></dependencies>
|
18 |
+
</package>
|