Subversion Repositories SmartDukaan

Rev

Rev 14509 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 14509 Rev 14547
Line 137... Line 137...
137
 * @return void
137
 * @return void
138
 */
138
 */
139
	public function admin_index() {
139
	public function admin_index() {
140
		$this->Campaign->recursive = 0;
140
		$this->Campaign->recursive = 0;
141
		$this->set('campaigns', $this->Paginator->paginate());
141
		$this->set('campaigns', $this->Paginator->paginate());
-
 
142
		$this->loadModel('Store');
-
 
143
		$this->set('stores',$this->Store->find('list'));
142
	}
144
	}
143
 
145
 
144
/**
146
/**
145
 * admin_view method
147
 * admin_view method
146
 *
148
 *
Line 170... Line 172...
170
				return $this->redirect(array('action' => 'index'));
172
				return $this->redirect(array('action' => 'index'));
171
			} else {
173
			} else {
172
				$this->Session->setFlash(__('The campaign could not be saved. Please, try again.'));
174
				$this->Session->setFlash(__('The campaign could not be saved. Please, try again.'));
173
			}
175
			}
174
		}
176
		}
-
 
177
		$this->loadModel('Store');
-
 
178
		$this->set('stores',$this->Store->find('list'));
175
	}
179
	}
176
 
180
 
177
/**
181
/**
178
 * admin_edit method
182
 * admin_edit method
179
 *
183
 *
Line 194... Line 198...
194
			}
198
			}
195
		} else {
199
		} else {
196
			$options = array('conditions' => array('Campaign.' . $this->Campaign->primaryKey => $id));
200
			$options = array('conditions' => array('Campaign.' . $this->Campaign->primaryKey => $id));
197
			$this->request->data = $this->Campaign->find('first', $options);
201
			$this->request->data = $this->Campaign->find('first', $options);
198
		}
202
		}
-
 
203
		$this->loadModel('Store');
-
 
204
		$this->set('stores',$this->Store->find('list'));
199
	}
205
	}
200
 
206
 
201
/**
207
/**
202
 * admin_delete method
208
 * admin_delete method
203
 *
209
 *