Skip to content

Commit

Permalink
Merge pull request #18 from nextcloud/settings-icon
Browse files Browse the repository at this point in the history
Add icon to admin page sidebar
  • Loading branch information
nickvergessen authored Jan 25, 2017
2 parents f1b886e + 18d3498 commit 7b7b97b
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 4 deletions.
2 changes: 1 addition & 1 deletion appinfo/info.xml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
<category>office</category>
<category>integration</category>
<dependencies>
<nextcloud min-version="11" max-version="11" />
<nextcloud min-version="12" max-version="12" />
</dependencies>
<documentation>
<admin>https://nextcloud.com/collaboraonline/</admin>
Expand Down
4 changes: 4 additions & 0 deletions img/app-dark.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
19 changes: 16 additions & 3 deletions lib/Settings/Section.php
Original file line number Diff line number Diff line change
Expand Up @@ -24,16 +24,22 @@
namespace OCA\Richdocuments\Settings;

use OCP\IL10N;
use OCP\Settings\ISection;
use OCP\IURLGenerator;
use OCP\Settings\IIconSection;

class Section implements ISection {
class Section implements IIconSection {
/** @var IL10N */
private $l;
/** @var IURLGenerator */
private $url;

/**
* @param IL10N $l
* @param IURLGenerator $url
*/
public function __construct(IL10N $l) {
public function __construct(IL10N $l, IURLGenerator $url) {
$this->l = $l;
$this->url = $url;
}
/**
* {@inheritdoc}
Expand All @@ -53,4 +59,11 @@ public function getName() {
public function getPriority() {
return 75;
}

/**
* {@inheritdoc}
*/
public function getIcon() {
return $this->url->imagePath('richdocuments', 'app-dark.svg');
}
}

0 comments on commit 7b7b97b

Please sign in to comment.