Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add icon to admin page sidebar #18

Merged
merged 1 commit into from
Jan 25, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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');
}
}