Update# add register button on login page

This commit is contained in:
Pellaeon Lin 2015-05-05 21:56:51 +08:00
parent 1db9ec3a7b
commit 431a471c02
3 changed files with 10 additions and 5 deletions

View File

@ -9,7 +9,7 @@
* @copyright Pellaeon Lin 2014 * @copyright Pellaeon Lin 2014
*/ */
namespace OCA\Registration\AppInfo; namespace OCA\Registration\App;
use \OCP\AppFramework\App; use \OCP\AppFramework\App;
@ -19,7 +19,7 @@ use \OCA\Registration\Wrapper;
use \OCA\Registration\Db\PendingRegist; use \OCA\Registration\Db\PendingRegist;
class Application extends App { class Registration extends App {
public function __construct (array $urlParams=array()) { public function __construct (array $urlParams=array()) {
parent::__construct('registration', $urlParams); parent::__construct('registration', $urlParams);

View File

@ -9,4 +9,9 @@
* @copyright Pellaeon Lin 2014 * @copyright Pellaeon Lin 2014
*/ */
namespace OCA\Registration\AppInfo; namespace OCA\Registration\App;
$app = new Registration();
$c = $app->getContainer();
\OC_App::registerLogIn(array('name' => $c->query('L10N')->t('Register'), 'href' => $c->query('URLGenerator')->linkToRoute('registration.register.askEmail')));

View File

@ -9,7 +9,7 @@
* @copyright Pellaeon Lin 2014 * @copyright Pellaeon Lin 2014
*/ */
namespace OCA\Registration\AppInfo; namespace OCA\Registration\App;
/** /**
* Create your routes in here. The name is the lowercase name of the controller * Create your routes in here. The name is the lowercase name of the controller
@ -19,7 +19,7 @@ namespace OCA\Registration\AppInfo;
* The controller class has to be registered in the application.php file since * The controller class has to be registered in the application.php file since
* it's instantiated in there * it's instantiated in there
*/ */
$application = new Application(); $application = new Registration();
$application->registerRoutes($this, array('routes' => array( $application->registerRoutes($this, array('routes' => array(
array('name' => 'register#askEmail', 'url' => '/', 'verb' => 'GET'), array('name' => 'register#askEmail', 'url' => '/', 'verb' => 'GET'),