Making us less dependant on javascript trust

Many of the microapps are pretty javascript dependant, but at least
we should allow users to get to the new notice field without allowing
javascript to run in the browser. :)
This commit is contained in:
Mikael Nordfeldth
2014-02-24 02:05:31 +01:00
parent c0c8250ff7
commit 1e37f374b3
5 changed files with 28 additions and 6 deletions

View File

@@ -162,6 +162,14 @@ abstract class MicroAppPlugin extends Plugin
*/
abstract function deleteRelated($notice);
/**
*
*/
public function newFormAction() {
// such as 'newbookmark' or 'newevent' route
return 'new'.$this->tag();
}
/**
* Check if a given notice object should be handled by this micro-app
* plugin.
@@ -536,7 +544,9 @@ abstract class MicroAppPlugin extends Plugin
function onStartShowEntryForms(&$tabs)
{
$tabs[$this->tag()] = $this->appTitle();
$tabs[$this->tag()] = array('title' => $this->appTitle(),
'href' => common_local_url($this->newFormAction()),
);
return true;
}