<li><a href="#" class="button small{if !$filteredByFollowedUsers} active{/if}">{lang}wcf.user.recentActivity.scope.all{/lang}</a></li>
<li><a href="#" class="button small{if $filteredByFollowedUsers} active{/if}">{lang}wcf.user.recentActivity.scope.followedUsers{/lang}</a></li>
</ul>
+
+ {if $filteredByFollowedUsersOverride}
+ <p class="info recentActivityFollowedNoResults">{lang}wcf.user.recentActivity.scope.followedUsers.noResults{/lang}</p>
+ {/if}
</li>
{/if}
*/
public $filteredByFollowedUsers = false;
+ /**
+ * is true if filtering by followed users yielded no results
+ * @var boolean
+ */
+ public $filteredByFollowedUsersOverride = false;
+
/**
* @inheritDoc
*/
'canFilterByFollowedUsers' => $this->canFilterByFollowedUsers,
'eventList' => $this->objectList,
'lastEventTime' => $this->objectList->getLastEventTime(),
- 'filteredByFollowedUsers' => $this->filteredByFollowedUsers
+ 'filteredByFollowedUsers' => $this->filteredByFollowedUsers,
+ 'filteredByFollowedUsersOverride' => $this->filteredByFollowedUsersOverride
], true);
}
else {
return true;
}
+ /**
+ * @inheritDoc
+ */
+ public function hasContent() {
+ $hasContent = parent::hasContent();
+
+ if (!$hasContent) {
+ if (($this->getBox()->position == 'contentTop' || $this->getBox()->position == 'contentBottom') && $this->filteredByFollowedUsers) {
+ $this->filteredByFollowedUsersOverride = true;
+
+ $this->loadContent();
+
+ return count($this->objectList) > 0;
+ }
+ }
+
+ return $hasContent;
+ }
+
/**
* @inheritDoc
*/
protected function readObjects() {
// apply filter
if (($this->getBox()->position == 'contentTop' || $this->getBox()->position == 'contentBottom') && $this->filteredByFollowedUsers) {
- /** @noinspection PhpUndefinedMethodInspection */
- $this->objectList->getConditionBuilder()->add('user_activity_event.userID IN (?)', [WCF::getUserProfileHandler()->getFollowingUsers()]);
+ if (!$this->filteredByFollowedUsersOverride) {
+ /** @noinspection PhpUndefinedMethodInspection */
+ $this->objectList->getConditionBuilder()->add('user_activity_event.userID IN (?)', [WCF::getUserProfileHandler()->getFollowingUsers()]);
+ }
}
// load more items than necessary to avoid empty list if some items are invisible for current user
<item name="wcf.user.recentActivity.condition.excludedObjectType"><![CDATA[Ausgeschlossene Aktivitäten]]></item>
<item name="wcf.user.recentActivity.scope.all"><![CDATA[Aktivitäten aller Benutzer]]></item>
<item name="wcf.user.recentActivity.scope.followedUsers"><![CDATA[Aktivitäten von Benutzern, denen {if LANGUAGE_USE_INFORMAL_VARIANT}du folgst{else}Sie folgen{/if}]]></item>
+ <item name="wcf.user.recentActivity.scope.followedUsers.noResults"><![CDATA[Es gibt aktuell keine Aktivitäten von Benutzeren, denen {if LANGUAGE_USE_INFORMAL_VARIANT}du folgst{else}Sie folgen{/if}. Es werden alle Aktivitäten angezeigt.]]></item>
</category>
<category name="wcf.user.3rdparty">
<item name="wcf.user.recentActivity.condition.excludedObjectType"><![CDATA[Excluded Activities]]></item>
<item name="wcf.user.recentActivity.scope.all"><![CDATA[All Activities]]></item>
<item name="wcf.user.recentActivity.scope.followedUsers"><![CDATA[Filter by Followed Users]]></item>
+ <item name="wcf.user.recentActivity.scope.followedUsers.noResults"><![CDATA[There are no recent activities by followed users. Displaying activity for all users.]]></item>
</category>
<category name="wcf.user.3rdparty">