Skip to content

Commit

Permalink
Merge pull request #625 from nextcloud/backport/621/stable20
Browse files Browse the repository at this point in the history
[stable20] link from app-navigation-settings to personal settings
  • Loading branch information
szaimen authored Jul 24, 2021
2 parents 3c8fc5a + 623aaf7 commit adb03a0
Show file tree
Hide file tree
Showing 4 changed files with 23 additions and 0 deletions.
9 changes: 9 additions & 0 deletions css/style.scss
Original file line number Diff line number Diff line change
Expand Up @@ -208,6 +208,15 @@
margin-left: 5px;
}

#activity-personal-settings-link {
text-decoration: underline;

a {
display: block;
padding: 10px 0px 10px 25px;
}
}

.activitymessage .avatar-name-wrapper,
.activitysubject .avatar-name-wrapper {
position: relative;
Expand Down
8 changes: 8 additions & 0 deletions lib/Navigation.php
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,7 @@ public function getTemplate($forceActive = 'all') {
$template->assign('activeNavigation', $active);
$template->assign('navigations', $this->getLinkList());
$template->assign('rssLink', $this->getRSSLink());
$template->assign('personalSettingsLink', $this->getPersonalSettingsLink());

return $template;
}
Expand Down Expand Up @@ -130,4 +131,11 @@ public function getLinkList() {

return $entries;
}

/**
* @return string
*/
protected function getPersonalSettingsLink() {
return $this->URLGenerator->linkToRouteAbsolute('settings.PersonalSettings.index', ['section' => 'activity']);
}
}
5 changes: 5 additions & 0 deletions templates/stream.app.navigation.php
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,11 @@
<input id="feed-link" class="feed-link" type="text" readonly="readonly" value="<?php p($_['rssLink']); ?>" />
<a class="icon-clippy" data-clipboard-target="#rssurl input"></a>
</span>
<div id="activity-personal-settings-link">
<a href="<?php p($_['personalSettingsLink']); ?>">
<span class="no-icon"><?php p($l->t('Personal Activity Settings')); ?></span>
</a>
</div>
</div>
</div>
</div>
1 change: 1 addition & 0 deletions tests/Controller/ActivitiesControllerTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,7 @@ public function testShowList(): void {
$template->assign('activeNavigation', 'all');
$template->assign('navigations', []);
$template->assign('rssLink', '');
$template->assign('personalSettingsLink', '');
$this->navigation->expects($this->any())
->method('getTemplate')
->willReturn($template);
Expand Down

0 comments on commit adb03a0

Please sign in to comment.