Improved recent activity filter button
authorMarcel Werk <burntime@woltlab.com>
Mon, 29 Sep 2014 14:11:47 +0000 (16:11 +0200)
committerMarcel Werk <burntime@woltlab.com>
Mon, 29 Sep 2014 14:11:47 +0000 (16:11 +0200)
com.woltlab.wcf/templates/dashboardBoxRecentActivity.tpl
wcfsetup/install/files/js/WCF.User.js
wcfsetup/install/files/style/user.less
wcfsetup/install/lang/de.xml
wcfsetup/install/lang/en.xml

index f41cf59460be2a7d15693af067d112780439699b..80f22b1ceedabfd3fb5aa9d979e2b44fd93b4f04 100644 (file)
@@ -1,8 +1,14 @@
-<header class="boxHeadline boxSubHeadline">
+<header class="boxHeadline boxSubHeadline dashboardBoxRecentActivityHeadline">
        <h2>{lang}wcf.user.recentActivity{/lang}</h2>
-       {if $filteredByFollowedUsers}<p>{lang}wcf.user.recentActivity.filteredByFollowedUsers{/lang}</p>{/if}
-       {* TODO: styling *}
-       {if $canFilterByFollowedUsers}<a class="jsOnly jsRecentActivitySwitchContext" style="float: right">{lang}wcf.user.recentActivity.scope.{if $filteredByFollowedUsers}all{else}followedUsers{/if}{/lang}</a>{/if}
+       
+       {if $canFilterByFollowedUsers}
+               <nav class="jsMobileNavigation buttonGroupNavigation jsOnly jsRecentActivitySwitchContext">
+                       <ul class="buttonGroup">
+                               <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>
+               </nav>
+       {/if}
 </header>
 
 <div class="container marginTop">
index 7dad12a7b2603c5003c8205b4319b53d99367b92..a711b5d675cb6f391bb45e05bb1c6e081de1eef1 100644 (file)
@@ -1639,7 +1639,7 @@ WCF.User.RecentActivityLoader = Class.extend({
                }
                
                if (WCF.User.userID) {
-                       $('.jsRecentActivitySwitchContext').click($.proxy(this._switchContext, this));
+                       $('.jsRecentActivitySwitchContext .button').click($.proxy(this._switchContext, this));
                }
        },
        
index 81b1344dc29b36fee5a3c53f5e9bc49902d40174..87d65bf61324063190ede6871e5ace70c227deef 100644 (file)
                        }
                }
        }
+}
+
+.dashboardBoxRecentActivityHeadline {
+       overflow: visible;
+       position: relative;
+       min-height: 30px;
+       
+       > nav.buttonGroupNavigation {
+               position: absolute;
+               right: 4px;
+               top: 2px;
+       } 
 }
\ No newline at end of file
index e6768be1b2243a6bc6e2cbc11e155d53767ad91d..b1f9934eb396f019a942706ddf11b9dc85a597cd 100644 (file)
@@ -2920,15 +2920,14 @@ Sollten Sie sich nicht auf der Website: {@PAGE_TITLE|language} angemeldet haben,
        
        <category name="wcf.user.recentActivity">
                <item name="wcf.user.recentActivity"><![CDATA[Letzte Aktivitäten]]></item>
-               <item name="wcf.user.recentActivity.filteredByFollowedUsers"><![CDATA[Von Benutzern, denen Sie folgen]]></item>
                <item name="wcf.user.recentActivity.more"><![CDATA[Weitere Aktivitäten]]></item>
                <item name="wcf.user.recentActivity.noMoreEntries"><![CDATA[Keine weiteren Aktivitäten]]></item>
                <item name="wcf.user.recentActivity.noEntries"><![CDATA[Es sind keine Aktivitäten vorhanden.]]></item>
                <item name="wcf.user.recentActivity.com.woltlab.wcf.user.recentActivityEvent.follow"><![CDATA[Folgen]]></item>
                <item name="wcf.user.recentActivity.com.woltlab.wcf.user.profileComment.recentActivityEvent"><![CDATA[Pinnwand-Kommentar]]></item>
                <item name="wcf.user.recentActivity.com.woltlab.wcf.user.profileComment.response.recentActivityEvent"><![CDATA[Pinnwand-Antwort]]></item>
-               <item name="wcf.user.recentActivity.scope.all"><![CDATA[Zeige Aktivitäten aller Benutzer]]></item>
-               <item name="wcf.user.recentActivity.scope.followedUsers"><![CDATA[Zeige Aktivitäten von Benutzeren, denen Sie folgen]]></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 Sie folgen]]></item>
        </category>
        
        <category name="wcf.user.3rdparty">
index f32429558d60585bab45abd57525480e25cd9e9e..0e191df7105460070858e67609660138cb747d6d 100644 (file)
@@ -2810,15 +2810,14 @@ You can safely ignore this email if you did not register with the website: {@PAG
        
        <category name="wcf.user.recentActivity">
                <item name="wcf.user.recentActivity"><![CDATA[Recent Activities]]></item>
-               <item name="wcf.user.recentActivity.filteredByFollowedUsers"><![CDATA[Of users you follow]]></item>
                <item name="wcf.user.recentActivity.more"><![CDATA[Show More]]></item>
                <item name="wcf.user.recentActivity.noMoreEntries"><![CDATA[No more activities]]></item>
                <item name="wcf.user.recentActivity.noEntries"><![CDATA[There are no activities.]]></item>
                <item name="wcf.user.recentActivity.com.woltlab.wcf.user.recentActivityEvent.follow"><![CDATA[Follow]]></item>
                <item name="wcf.user.recentActivity.com.woltlab.wcf.user.profileComment.recentActivityEvent"><![CDATA[Wall Comment]]></item>
                <item name="wcf.user.recentActivity.com.woltlab.wcf.user.profileComment.response.recentActivityEvent"><![CDATA[Wall Reply]]></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.all"><![CDATA[All Activities]]></item>
+               <item name="wcf.user.recentActivity.scope.followedUsers"><![CDATA[Filter by Followed Users]]></item>
        </category>
        
        <category name="wcf.user.3rdparty">