Added Service Add, some internal consistency updates

This commit is contained in:
Deon George
2013-11-27 11:22:20 +11:00
parent c18d5a3881
commit 0ed5e5163d
29 changed files with 372 additions and 179 deletions

View File

@@ -47,14 +47,6 @@ abstract class Model_Service_Plugin extends ORM_OSB {
}
}
/**
* Form info for admins to update
*/
public function admin_update() {
return View::factory(sprintf('service/admin/plugin/%s/edit',$this->plugin()))
->set('o',$this);
}
/**
* Provide the button that launches the management of this service, generally from a 3rd party
*/
@@ -96,18 +88,26 @@ function() { $("form[id=id_"+t[0]+"_"+t[1]+"]").submit(); });
}
/**
* Show our service name as defined in the DB with product suffix.
* Form info for admins to update plugin data
*/
public function service_name() {
return sprintf('%s - %s',$this->service->product->title(),$this->name());
public function render_edit() {
return View::factory(sprintf('service/admin/plugin/%s/edit',$this->plugin()))
->set('o',$this);
}
/**
* View details of the service
*/
public function service_view() {
public function render_view() {
return View::factory(sprintf('service/user/plugin/%s/view',$this->plugin()))
->set('o',$this);
}
/**
* Show our service name as defined in the DB with product suffix.
*/
public function service_name() {
return sprintf('%s - %s',$this->service->product->title(),$this->name());
}
}
?>