Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/server.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoas Schilling <coding@schilljs.com>2019-01-22 17:36:57 +0300
committerJoas Schilling <coding@schilljs.com>2019-01-22 17:37:07 +0300
commit55cd35132494056a4102649591f862816ee7ab25 (patch)
tree1b069359e5e16ae126492d4203c0518e40261395
parent0d33302350faba0eb7cf543d8eef225c7e77fddd (diff)
Add icon to restore activity
Signed-off-by: Joas Schilling <coding@schilljs.com>
-rw-r--r--apps/files/lib/Activity/Provider.php9
-rw-r--r--core/img/actions/history.pngbin0 -> 358 bytes
2 files changed, 6 insertions, 3 deletions
diff --git a/apps/files/lib/Activity/Provider.php b/apps/files/lib/Activity/Provider.php
index e868e1c464a..469c26cb47f 100644
--- a/apps/files/lib/Activity/Provider.php
+++ b/apps/files/lib/Activity/Provider.php
@@ -113,11 +113,11 @@ class Provider implements IProvider {
return $this->parseLongVersion($event, $previousEvent);
}
- protected function setIcon(IEvent $event, $icon) {
+ protected function setIcon(IEvent $event, string $icon, string $app = 'files') {
if ($this->activityManager->getRequirePNG()) {
- $event->setIcon($this->url->getAbsoluteURL($this->url->imagePath('files', $icon . '.png')));
+ $event->setIcon($this->url->getAbsoluteURL($this->url->imagePath($app, $icon . '.png')));
} else {
- $event->setIcon($this->url->getAbsoluteURL($this->url->imagePath('files', $icon . '.svg')));
+ $event->setIcon($this->url->getAbsoluteURL($this->url->imagePath($app, $icon . '.svg')));
}
}
@@ -142,6 +142,7 @@ class Provider implements IProvider {
$this->setIcon($event, 'delete-color');
} else if ($event->getSubject() === 'restored_by') {
$subject = $this->l->t('Restored by {user}');
+ $this->setIcon($event, 'actions/history', 'core');
} else if ($event->getSubject() === 'renamed_by') {
$subject = $this->l->t('Renamed by {user}');
$this->setIcon($event, 'change');
@@ -214,8 +215,10 @@ class Provider implements IProvider {
$this->setIcon($event, 'delete-color');
} else if ($event->getSubject() === 'restored_self') {
$subject = $this->l->t('You restored {file}');
+ $this->setIcon($event, 'actions/history', 'core');
} else if ($event->getSubject() === 'restored_by') {
$subject = $this->l->t('{user} restored {file}');
+ $this->setIcon($event, 'actions/history', 'core');
} else if ($event->getSubject() === 'renamed_self') {
$subject = $this->l->t('You renamed {oldfile} to {newfile}');
$this->setIcon($event, 'change');
diff --git a/core/img/actions/history.png b/core/img/actions/history.png
new file mode 100644
index 00000000000..11eb83309fb
--- /dev/null
+++ b/core/img/actions/history.png
Binary files differ