';
$output .= Form::close();
Block::factory()
->title('Duplicate Photo:'.$po->id)
->title_icon('icon-edit')
->body($output);
}
public function action_thumbnail() {
// Get the file path from the request
$po = ORM::factory('Photo',$this->request->param('id'));
return $this->image($po->thumbnail(),$po->date_taken,$po->type(TRUE));
}
public function action_view() {
$po = ORM::factory('Photo',$this->request->param('id'));
return $this->image($po->image(),$po->date_taken,$po->type(TRUE));
}
private function image($content,$modified,$type) {
// Send the file content as the response
if ($content)
$this->response->body($content);
// Return a 404 status
else
$this->response->status(404);
// Generate and check the ETag for this file
if (Kohana::$environment < Kohana::TESTING OR Kohana::$config->load('debug')->etag)
$this->check_cache(sha1($this->response->body()));
// Set the proper headers to allow caching
$this->response->headers('Content-Type',$type);
$this->response->headers('Content-Length',(string)$this->response->content_length());
$this->response->headers('Last-Modified',date('r',$modified));
$this->auto_render = FALSE;
}
private function table_duplicate_checkbox(Database_MySQL_Result $dp,Model_Photo $po,$param,$title,$condition) {
$output = '