msg
This commit is contained in:
parent
b399eefb06
commit
89f2eaca14
|
@ -66,9 +66,9 @@ class HomeController extends AppController {
|
||||||
$this->MiconwareSession->init($this);
|
$this->MiconwareSession->init($this);
|
||||||
|
|
||||||
if($this->MiconwareSession->logout())
|
if($this->MiconwareSession->logout())
|
||||||
$this->MiconwareSession->setFlash('dreamjob.loggingoutSucess','flash',array('alert'=>'success'));
|
$this->MiconwareSession->setFlash(__('dreamjob.loggingoutSucess'),'flash',array('alert'=>'success'));
|
||||||
else
|
else
|
||||||
$this->MiconwareSession->setFlash('dreamjob.loggingoutError','flash',array('alert'=>'danger'));
|
$this->MiconwareSession->setFlash(__('dreamjob.loggingoutError'),'flash',array('alert'=>'danger'));
|
||||||
|
|
||||||
$this->MiconwareSession->initWeb($this);
|
$this->MiconwareSession->initWeb($this);
|
||||||
$openings = $this->DreamjobJobOpening->find('all',array('conditions'=>$this->MiconwareSession->getOpeningCondition(),
|
$openings = $this->DreamjobJobOpening->find('all',array('conditions'=>$this->MiconwareSession->getOpeningCondition(),
|
||||||
|
|
|
@ -37,9 +37,9 @@ class JobController extends AppController {
|
||||||
$o =$this->DreamjobJobOpening->findById($this->request->query['del']);
|
$o =$this->DreamjobJobOpening->findById($this->request->query['del']);
|
||||||
if($o['AppUser']['id']== $self['AppUser']['id']){
|
if($o['AppUser']['id']== $self['AppUser']['id']){
|
||||||
$this->DreamjobJobOpening->delete($this->request->query['del'],false);
|
$this->DreamjobJobOpening->delete($this->request->query['del'],false);
|
||||||
$this->MiconwareSession->setFlash('dreamjob.opening.delete','flash',array('alert'=>'success'));
|
$this->MiconwareSession->setFlash(__('dreamjob.opening.delete'),'flash',array('alert'=>'success'));
|
||||||
}else{
|
}else{
|
||||||
$this->MiconwareSession->setFlash('dreamjob.opening.delete.error','flash',array('alert'=>'danger'));
|
$this->MiconwareSession->setFlash(__('dreamjob.opening.delete.error'),'flash',array('alert'=>'danger'));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
$openings = $this->DreamjobJobOpening->find('all',array('conditions' => array('DreamjobJobOpening.company_id' => $self['AppUser']['id'])));
|
$openings = $this->DreamjobJobOpening->find('all',array('conditions' => array('DreamjobJobOpening.company_id' => $self['AppUser']['id'])));
|
||||||
|
@ -57,9 +57,9 @@ class JobController extends AppController {
|
||||||
$this->DreamjobJobOpening->create($this->request->data);
|
$this->DreamjobJobOpening->create($this->request->data);
|
||||||
$this->DreamjobJobOpening->data['DreamjobJobOpening']['company_id'] = $c['AppUser']['id'];
|
$this->DreamjobJobOpening->data['DreamjobJobOpening']['company_id'] = $c['AppUser']['id'];
|
||||||
if ($this->DreamjobJobOpening->save()) {
|
if ($this->DreamjobJobOpening->save()) {
|
||||||
$this->MiconwareSession->setFlash('dreamjob.opening.save.add','flash',array('alert'=>'success'));
|
$this->MiconwareSession->setFlash(__('dreamjob.opening.save.add'),'flash',array('alert'=>'success'));
|
||||||
}else{
|
}else{
|
||||||
$this->MiconwareSession->setFlash('dreamjob.opening.save.error','flash',array('alert'=>'danger'));
|
$this->MiconwareSession->setFlash(__('dreamjob.opening.save.error'),'flash',array('alert'=>'danger'));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
$this->set('kindofjobs', $this->DreamjobJobOpening->DreamjobListKindofjob->find('list'));
|
$this->set('kindofjobs', $this->DreamjobJobOpening->DreamjobListKindofjob->find('list'));
|
||||||
|
@ -91,10 +91,10 @@ class JobController extends AppController {
|
||||||
$this->DreamjobJobOpening->data['DreamjobJobOpening']['id'] = $this->request->params['id'];
|
$this->DreamjobJobOpening->data['DreamjobJobOpening']['id'] = $this->request->params['id'];
|
||||||
$this->DreamjobJobOpening->data['DreamjobJobOpening']['company_id'] = $cid;
|
$this->DreamjobJobOpening->data['DreamjobJobOpening']['company_id'] = $cid;
|
||||||
if ($this->DreamjobJobOpening->save($this->DreamjobJobOpening->data)) {
|
if ($this->DreamjobJobOpening->save($this->DreamjobJobOpening->data)) {
|
||||||
$this->MiconwareSession->setFlash('dreamjob.opening.save','flash',array('alert'=>'success'));
|
$this->MiconwareSession->setFlash(__('dreamjob.opening.save'),'flash',array('alert'=>'success'));
|
||||||
|
|
||||||
}else
|
}else
|
||||||
$this->MiconwareSession->setFlash('dreamjob.opening.save.error','flash',array('alert'=>'danger'));
|
$this->MiconwareSession->setFlash(__('dreamjob.opening.save.error'),'flash',array('alert'=>'danger'));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
$this->request->data=$load;
|
$this->request->data=$load;
|
||||||
|
@ -132,12 +132,12 @@ class JobController extends AppController {
|
||||||
$data = array('DreamjobJobFavority' => array('opening_id' => $this->request->params['id'], 'worker_id' => $WORKER['AppUser']['id']),'modified' => false);
|
$data = array('DreamjobJobFavority' => array('opening_id' => $this->request->params['id'], 'worker_id' => $WORKER['AppUser']['id']),'modified' => false);
|
||||||
$data2 = array('DreamjobJobFavority.opening_id' => $this->request->params['id'], 'DreamjobJobFavority.worker_id' => $WORKER['AppUser']['id']);
|
$data2 = array('DreamjobJobFavority.opening_id' => $this->request->params['id'], 'DreamjobJobFavority.worker_id' => $WORKER['AppUser']['id']);
|
||||||
if($fav){
|
if($fav){
|
||||||
$this->MiconwareSession->setFlash('dreamjob.opening.fav.delete','flash',array('alert'=>'success'));
|
$this->MiconwareSession->setFlash(__('dreamjob.opening.fav.delete'),'flash',array('alert'=>'success'));
|
||||||
$this->DreamjobJobFavority->deleteAll($data2,false);
|
$this->DreamjobJobFavority->deleteAll($data2,false);
|
||||||
}else{
|
}else{
|
||||||
$this->DreamjobJobFavority->create();
|
$this->DreamjobJobFavority->create();
|
||||||
$this->DreamjobJobFavority->save($data);
|
$this->DreamjobJobFavority->save($data);
|
||||||
$this->MiconwareSession->setFlash('dreamjob.opening.fav.add','flash',array('alert'=>'success'));
|
$this->MiconwareSession->setFlash(__('dreamjob.opening.fav.add'),'flash',array('alert'=>'success'));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
$con = $this->MiconwareSession->getOpeningCondition();
|
$con = $this->MiconwareSession->getOpeningCondition();
|
||||||
|
@ -218,9 +218,9 @@ class JobController extends AppController {
|
||||||
$this->DreamjobJobApplication->id = $application['DreamjobJobApplication']['id'];
|
$this->DreamjobJobApplication->id = $application['DreamjobJobApplication']['id'];
|
||||||
if ($this->DreamjobJobApplication->saveField('closed',!$application['DreamjobJobApplication']['closed'])) {
|
if ($this->DreamjobJobApplication->saveField('closed',!$application['DreamjobJobApplication']['closed'])) {
|
||||||
$application = $this->DreamjobJobApplication->find('first',array('conditions' => array('DreamjobJobApplication.id'=> $this->request->params['id'] )));
|
$application = $this->DreamjobJobApplication->find('first',array('conditions' => array('DreamjobJobApplication.id'=> $this->request->params['id'] )));
|
||||||
$this->MiconwareSession->setFlash('dreamjob.application.archiv','flash',array('alert'=>'success'));
|
$this->MiconwareSession->setFlash(__('dreamjob.application.archiv'),'flash',array('alert'=>'success'));
|
||||||
}else{
|
}else{
|
||||||
$this->MiconwareSession->setFlash('dreamjob.application.archiv.error','flash',array('alert'=>'danger'));
|
$this->MiconwareSession->setFlash(__('dreamjob.application.archiv.error'),'flash',array('alert'=>'danger'));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if(!empty($this->request->params['ages'])){
|
if(!empty($this->request->params['ages'])){
|
||||||
|
@ -232,9 +232,9 @@ class JobController extends AppController {
|
||||||
$this->DreamjobJobMsg->data['DreamjobJobMsg']['fromcompany'] = is_array($COMPANY) and count($COMPANY) > 0;
|
$this->DreamjobJobMsg->data['DreamjobJobMsg']['fromcompany'] = is_array($COMPANY) and count($COMPANY) > 0;
|
||||||
if($this->DreamjobJobMsg->sendMessage()) {
|
if($this->DreamjobJobMsg->sendMessage()) {
|
||||||
$application = $this->DreamjobJobApplication->find('first',array('conditions' => array('DreamjobJobApplication.id'=> $this->request->params['id'] )));
|
$application = $this->DreamjobJobApplication->find('first',array('conditions' => array('DreamjobJobApplication.id'=> $this->request->params['id'] )));
|
||||||
$this->MiconwareSession->setFlash('dreamjob.application.msg.add','flash',array('alert'=>'success'));
|
$this->MiconwareSession->setFlash(__('dreamjob.application.msg.add'),'flash',array('alert'=>'success'));
|
||||||
}else{
|
}else{
|
||||||
$this->MiconwareSession->setFlash('dreamjob.application.msg.error','flash',array('alert'=>'danger'));
|
$this->MiconwareSession->setFlash(__('dreamjob.application.msg.error'),'flash',array('alert'=>'danger'));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if(is_array($WORKER) and count($WORKER) > 0)
|
if(is_array($WORKER) and count($WORKER) > 0)
|
||||||
|
@ -285,9 +285,9 @@ class JobController extends AppController {
|
||||||
$this->DreamjobJobApplication->id = $this->request->query['archiv'];
|
$this->DreamjobJobApplication->id = $this->request->query['archiv'];
|
||||||
if ($this->DreamjobJobApplication->saveField('closed',!$application['DreamjobJobApplication']['closed'])) {
|
if ($this->DreamjobJobApplication->saveField('closed',!$application['DreamjobJobApplication']['closed'])) {
|
||||||
$application = $this->DreamjobJobApplication->find('first',array('conditions' => array('DreamjobJobApplication.id'=> $this->request->params['id'] )));
|
$application = $this->DreamjobJobApplication->find('first',array('conditions' => array('DreamjobJobApplication.id'=> $this->request->params['id'] )));
|
||||||
$this->MiconwareSession->setFlash('dreamjob.application.archiv','flash',array('alert'=>'success'));
|
$this->MiconwareSession->setFlash(__('dreamjob.application.archiv'),'flash',array('alert'=>'success'));
|
||||||
}else{
|
}else{
|
||||||
$this->MiconwareSession->setFlash('dreamjob.application.archiv.error','flash',array('alert'=>'danger'));
|
$this->MiconwareSession->setFlash(__('dreamjob.application.archiv.error'),'flash',array('alert'=>'danger'));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -344,12 +344,12 @@ class JobController extends AppController {
|
||||||
$this->request->data['DreamjobJobApplicationPage'][]=array('page_id'=> $id);
|
$this->request->data['DreamjobJobApplicationPage'][]=array('page_id'=> $id);
|
||||||
$result = $this->DreamjobJobApplication->sendApplication($this->request->data);
|
$result = $this->DreamjobJobApplication->sendApplication($this->request->data);
|
||||||
if ($result) {
|
if ($result) {
|
||||||
$this->MiconwareSession->setFlash('dreamjob.opening.save.add','flash',array('alert'=>'success'));
|
$this->MiconwareSession->setFlash(__('dreamjob.opening.save.add'),'flash',array('alert'=>'success'));
|
||||||
}else{
|
}else{
|
||||||
$this->MiconwareSession->setFlash('dreamjob.opening.save.error','flash',array('alert'=>'danger'));
|
$this->MiconwareSession->setFlash(__('dreamjob.opening.save.error'),'flash',array('alert'=>'danger'));
|
||||||
}
|
}
|
||||||
}else{
|
}else{
|
||||||
$this->MiconwareSession->setFlash('dreamjob.agb.error.notAccept','flash',array('alert'=>'danger'));
|
$this->MiconwareSession->setFlash(__('dreamjob.agb.error.notAccept'),'flash',array('alert'=>'danger'));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
$this->set('pages', $w['DreamjobPageInh']);
|
$this->set('pages', $w['DreamjobPageInh']);
|
||||||
|
|
|
@ -56,15 +56,15 @@ class RegistrationController extends AppController {
|
||||||
$result = $this->DreamjobCompany->registration($data);
|
$result = $this->DreamjobCompany->registration($data);
|
||||||
if ($result) {
|
if ($result) {
|
||||||
$regResult = true;
|
$regResult = true;
|
||||||
$this->MiconwareSession->setFlash('dreamjob.registration.done','flash',array('alert'=>'success'));
|
$this->MiconwareSession->setFlash(__('dreamjob.registration.done'),'flash',array('alert'=>'success'));
|
||||||
}else{
|
}else{
|
||||||
$this->MiconwareSession->setFlash('dreamjob.registration.error','flash',array('alert'=>'danger'));
|
$this->MiconwareSession->setFlash(__('dreamjob.registration.error'),'flash',array('alert'=>'danger'));
|
||||||
}
|
}
|
||||||
}else if($this->request->data['User']['password1']!='' or $this->request->data['User']['password2']!=''){
|
}else if($this->request->data['User']['password1']!='' or $this->request->data['User']['password2']!=''){
|
||||||
$this->MiconwareSession->setFlash(__('dreamjob.error.password.notEqual'),'flash',array('alert'=>'danger'));
|
$this->MiconwareSession->setFlash(__('dreamjob.error.password.notEqual'),'flash',array('alert'=>'danger'));
|
||||||
}
|
}
|
||||||
}else{
|
}else{
|
||||||
$this->MiconwareSession->setFlash('dreamjob.agb.error.notAccept','flash',array('alert'=>'danger'));
|
$this->MiconwareSession->setFlash(__('dreamjob.agb.error.notAccept'),'flash',array('alert'=>'danger'));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
$this->set('result',$regResult);
|
$this->set('result',$regResult);
|
||||||
|
@ -113,15 +113,15 @@ class RegistrationController extends AppController {
|
||||||
|
|
||||||
if ($result) {
|
if ($result) {
|
||||||
$regResult = true;
|
$regResult = true;
|
||||||
$this->MiconwareSession->setFlash('dreamjob.registration.done','flash',array('alert'=>'success'));
|
$this->MiconwareSession->setFlash(__('dreamjob.registration.done'),'flash',array('alert'=>'success'));
|
||||||
}else{
|
}else{
|
||||||
$this->MiconwareSession->setFlash('dreamjob.registration.error','flash',array('alert'=>'danger'));
|
$this->MiconwareSession->setFlash(__('dreamjob.registration.error'),'flash',array('alert'=>'danger'));
|
||||||
}
|
}
|
||||||
}else if($this->request->data['User']['password1']!='' or $this->request->data['User']['password2']!=''){
|
}else if($this->request->data['User']['password1']!='' or $this->request->data['User']['password2']!=''){
|
||||||
$this->MiconwareSession->setFlash(__('dreamjob.error.password.notEqual'),'flash',array('alert'=>'danger'));
|
$this->MiconwareSession->setFlash(__('dreamjob.error.password.notEqual'),'flash',array('alert'=>'danger'));
|
||||||
}
|
}
|
||||||
}else{
|
}else{
|
||||||
$this->MiconwareSession->setFlash('dreamjob.agb.error.notAccept','flash',array('alert'=>'danger'));
|
$this->MiconwareSession->setFlash(__('dreamjob.agb.error.notAccept'),'flash',array('alert'=>'danger'));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
$this->set('result',$regResult);
|
$this->set('result',$regResult);
|
||||||
|
|
|
@ -137,9 +137,9 @@ class UserController extends AppController {
|
||||||
}
|
}
|
||||||
$result = $this->DreamjobCvEntry->saveAndDelete($tosave,$self['DreamjobCvEntry']);
|
$result = $this->DreamjobCvEntry->saveAndDelete($tosave,$self['DreamjobCvEntry']);
|
||||||
if($result){
|
if($result){
|
||||||
$this->MiconwareSession->setFlash('dreamjob.settings.save','flash',array('alert'=>'success'));
|
$this->MiconwareSession->setFlash(__('dreamjob.settings.save'),'flash',array('alert'=>'success'));
|
||||||
}else{
|
}else{
|
||||||
$this->MiconwareSession->setFlash('dreamjob.settings.save.error','flash',array('alert'=>'danger'));
|
$this->MiconwareSession->setFlash(__('dreamjob.settings.save.error'),'flash',array('alert'=>'danger'));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
$cvc = $this->DreamjobListCvCategory->find('all');
|
$cvc = $this->DreamjobListCvCategory->find('all');
|
||||||
|
@ -284,9 +284,9 @@ class UserController extends AppController {
|
||||||
|
|
||||||
|
|
||||||
if($result){
|
if($result){
|
||||||
$this->MiconwareSession->setFlash('dreamjob.settings.save','flash',array('alert'=>'success'));
|
$this->MiconwareSession->setFlash(__('dreamjob.settings.save'),'flash',array('alert'=>'success'));
|
||||||
}else{
|
}else{
|
||||||
$this->MiconwareSession->setFlash('dreamjob.settings.save.error','flash',array('alert'=>'danger'));
|
$this->MiconwareSession->setFlash(__('dreamjob.settings.save.error'),'flash',array('alert'=>'danger'));
|
||||||
}
|
}
|
||||||
|
|
||||||
}else if($this->request->data['User']['password1']!='' or $this->request->data['User']['password2']!=''){
|
}else if($this->request->data['User']['password1']!='' or $this->request->data['User']['password2']!=''){
|
||||||
|
@ -381,9 +381,9 @@ class UserController extends AppController {
|
||||||
$profil = $this->MiconwareSession->getWorker();
|
$profil = $this->MiconwareSession->getWorker();
|
||||||
if(empty($profil) or count($profil) <= 0)
|
if(empty($profil) or count($profil) <= 0)
|
||||||
$profil = $this->MiconwareSession->getCompany();
|
$profil = $this->MiconwareSession->getCompany();
|
||||||
$this->MiconwareSession->setFlash('dreamjob.pages.delete','flash',array('alert'=>'success'));
|
$this->MiconwareSession->setFlash(__('dreamjob.pages.delete'),'flash',array('alert'=>'success'));
|
||||||
}else{
|
}else{
|
||||||
$this->MiconwareSession->setFlash('dreamjob.pages.delete.error','flash',array('alert'=>'danger'));
|
$this->MiconwareSession->setFlash(__('dreamjob.pages.delete.error'),'flash',array('alert'=>'danger'));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
$result = false;
|
$result = false;
|
||||||
|
@ -448,9 +448,9 @@ class UserController extends AppController {
|
||||||
if($result){
|
if($result){
|
||||||
$this->MiconwareSession->refreshCache();
|
$this->MiconwareSession->refreshCache();
|
||||||
$profil = $this->MiconwareSession->getWorker();
|
$profil = $this->MiconwareSession->getWorker();
|
||||||
$this->MiconwareSession->setFlash('dreamjob.settings.save','flash',array('alert'=>'success'));
|
$this->MiconwareSession->setFlash(__('dreamjob.settings.save'),'flash',array('alert'=>'success'));
|
||||||
}else{
|
}else{
|
||||||
$this->MiconwareSession->setFlash('dreamjob.settings.save.error','flash',array('alert'=>'danger'));
|
$this->MiconwareSession->setFlash(__('dreamjob.settings.save.error'),'flash',array('alert'=>'danger'));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
$this->request->data = $profil;
|
$this->request->data = $profil;
|
||||||
|
@ -489,9 +489,9 @@ class UserController extends AppController {
|
||||||
$result = $this->User->sendDelete($profil);
|
$result = $this->User->sendDelete($profil);
|
||||||
|
|
||||||
if($result){
|
if($result){
|
||||||
$this->MiconwareSession->setFlash('dreamjob.settings.delete.agree','flash',array('alert'=>'success'));
|
$this->MiconwareSession->setFlash(__('dreamjob.settings.delete.agree'),'flash',array('alert'=>'success'));
|
||||||
}else{
|
}else{
|
||||||
$this->MiconwareSession->setFlash('dreamjob.settings.delete.error','flash',array('alert'=>'danger'));
|
$this->MiconwareSession->setFlash(__('dreamjob.settings.delete.error'),'flash',array('alert'=>'danger'));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
$this->render('/User/settings_account_delete');
|
$this->render('/User/settings_account_delete');
|
||||||
|
@ -519,9 +519,9 @@ class UserController extends AppController {
|
||||||
$data['AppUser']['avatar'] = $this->request->data['AppUser']['avatar'];
|
$data['AppUser']['avatar'] = $this->request->data['AppUser']['avatar'];
|
||||||
$result = $this->AppUser->imageUpload($data);
|
$result = $this->AppUser->imageUpload($data);
|
||||||
if($result){
|
if($result){
|
||||||
$this->MiconwareSession->setFlash('dreamjob.settings.avatar.done','flash',array('alert'=>'success'));
|
$this->MiconwareSession->setFlash(__('dreamjob.settings.avatar.done'),'flash',array('alert'=>'success'));
|
||||||
}else{
|
}else{
|
||||||
$this->MiconwareSession->setFlash('dreamjob.settings.avatar.error','flash',array('alert'=>'danger'));
|
$this->MiconwareSession->setFlash(__('dreamjob.settings.avatar.error'),'flash',array('alert'=>'danger'));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
$this->request->data = $profil;
|
$this->request->data = $profil;
|
||||||
|
|
|
@ -40,7 +40,6 @@ class DreamjobJobMsg extends AppModel {
|
||||||
$Email->subject('Welcome to our really cool thing');
|
$Email->subject('Welcome to our really cool thing');
|
||||||
$Email->template('job_application_msg');
|
$Email->template('job_application_msg');
|
||||||
$Email->viewVars(array('id'=>$id));
|
$Email->viewVars(array('id'=>$id));
|
||||||
echo "Warum";
|
|
||||||
return $Email->send();
|
return $Email->send();
|
||||||
}
|
}
|
||||||
public function sendMessage(){
|
public function sendMessage(){
|
||||||
|
@ -49,6 +48,7 @@ class DreamjobJobMsg extends AppModel {
|
||||||
$result = $this->save();
|
$result = $this->save();
|
||||||
if($result){
|
if($result){
|
||||||
$app = $this->Application->find('first', array('conditions' => array('DreamjobJobApplication.id' => $this->application_id)));
|
$app = $this->Application->find('first', array('conditions' => array('DreamjobJobApplication.id' => $this->application_id)));
|
||||||
|
die($app);
|
||||||
if($this->fromcompany)
|
if($this->fromcompany)
|
||||||
$result = self::sendMail($app['User']['mail'],$this->application_id);
|
$result = self::sendMail($app['User']['mail'],$this->application_id);
|
||||||
else
|
else
|
||||||
|
|
Loading…
Reference in New Issue